-
Upload and Analysis data?5
Hi everyone,
I would like to build a web application able to analyse an uploaded file and then display the results.
My problem is that the analysis part will be composed of Perl scripts. I don't know anything about Perl (the script will be created by my client's team which only know that language) and I can't figure out where to start to execute a Perl script with Rails.
For information, the Perl scripts analyse the file and create an XML that Rails will use to display the information
In brief, here is what I would like to achieve :
Upload a file (Rails) => Launch the Perl analysis script (Rails) => File analysis (Perl) => Display the results (Rails)
Is it possible for Rails to use some Perl ? If yes, how can we execute a Perl script with rails ? Is the solution has something to do with CGI (I don't know anything about what this can be either) ?
Thanks in advance, for those that will take the time to answer my question.
Could you give me the details?
Xiuying
2008年11月07日 15:24
3个答案 按时间排序 按投票排序
-
if (file_name.slice("jbar") == "jbar") || (file_name.slice("jibar") == "jibar") @result = system("ruby script/web_populations/jibars.rb #{params[:url]}") end if file_name.slice("prime") == "prime" @result = system("ruby script/web_populations/prime.rb #{params[:url]}") end if file_name.slice("repo") == "repo" @result = system("ruby script/web_populations/repo.rb #{params[:url]}") end if file_name.slice("treasbil") == "treasbil" @result = system("ruby script/web_populations/tbill.rb #{params[:url]}") end if file_name.slice("bankacc") == "bankacc" @result = system("ruby script/web_populations/ba3.rb #{params[:url]}") end if file_name.slice("mtmdetail") == "mtmdetail" @result = system("ruby script/web_populations/bondexchange.rb #{params[:url]}") end
2008年11月07日 15:39
-
if (file_name.slice("jbar") == "jbar") || (file_name.slice("jibar") == "jibar") @result = system("ruby script/web_populations/jibars.rb #{params[:url]}") end if file_name.slice("prime") == "prime" @result = system("ruby script/web_populations/prime.rb #{params[:url]}") end if file_name.slice("repo") == "repo" @result = system("ruby script/web_populations/repo.rb #{params[:url]}") end if file_name.slice("treasbil") == "treasbil" @result = system("ruby script/web_populations/tbill.rb #{params[:url]}") end if file_name.slice("bankacc") == "bankacc" @result = system("ruby script/web_populations/ba3.rb #{params[:url]}") end if file_name.slice("mtmdetail") == "mtmdetail" @result = system("ruby script/web_populations/bondexchange.rb #{params[:url]}") end
2008年11月07日 15:37
-
Two options off the top of my head:
1) a Kernel.system call to Perl
system("perl your_perl_script.pl")
The problem with this may be that it only returns true or false depending on the success/failure of the system call to execute. If you need to store the results of the Perl script you'll want to use:
2) a Kernel.` call to Perl (note: that is a backtick)
results = `perl your_perl_script.pl`
Hopefully this gets you started.2008年11月07日 15:35
相关推荐
This platform allows the addition of various types of file categories, and it enables the upload of video, audio, and text data based on the material categories. To effectively track the usage of ...
5. **Data Validation and Preprocessing**:“valid”可能指的是数据验证或数据预处理,这是机器学习中不可或缺的步骤,确保数据质量和模型性能。 6. **Original and Derived Functions**:文件名中的"ori"和"Dg...
6. **Deployment**: Integrate the trained sentiment analysis model into the Flask application, allowing users to input or upload movie reviews, which the system then analyzes and returns the sentiment ...
By leveraging the capabilities of the SAM D21 and ESP8266, the system can not only collect data locally but also upload it to a cloud server for further analysis and remote access. In conclusion, ...
在这个项目“EEG_data_analysis:啮齿动物_EEG_data_analysis_for_neuroscience-matlab开发”中,我们将专注于使用MATLAB语言进行啮齿动物的EEG数据分析。MATLAB是一款强大的计算环境,特别适合于处理复杂的数据分析...
Secondly, the user interface should allow users to upload the cover image (the image that will carry the hidden information) and the secret message. Then, the LSB algorithm is applied to embed the ...
Upload the data to baseline.ws for later analysis. Audible Without a point of reference in the sky, it can be hard to know how efficiently you are flying your wingsuit. Audible mode gives r
- Direct upload Sketchfab resource and export to varios popular formats. - Photorealistic textures: HDR and multifile support. 4D modeling for dynamic scenes - Multi camera station data processing ...
测试完成后,通过Controller和Analysis工具查看测试结果,分析性能瓶颈、错误率和响应时间趋势,评估系统在高负载下的表现。如果发现问题,可以根据分析结果调整脚本或优化应用代码。 8. **异常处理和调试**: 在...
doccano:基于网页的开源协同多语言文本标注工具.zip,机器学习从业者的开源文本注释工具。 doccano is an open ... Just create a project, upload data and start annotating. You can build a dataset in hours.
获取和清理数据分配 Coursera的存储库: : ... Please upload your data set as a txt file created with write.table() using row.names=FALSE (do not cut and paste a dataset directly into the tex
获取和清理数据====================== Cousera 的存储库: : run_analysis.R 应该执行以下操作... Please upload your data set as a txt file created with write.table() using row.name=FALSE (do not cut and pas
24. Application-layer message: data which an application wants to send and passed onto the transport layer; transport-layer segment: generated by the transport layer and encapsulates application-layer...
Layer(carto_layer, geom_col='the_geom_webmercator', analysis='cluster_radial', cluster_distance=50, cluster_max_size=100, color='count', stroke_color='white') ``` 7. **数据下载** 反之,我们也可以...
6. **AL06 - Performance: Upload/Download**:提供上传和下载性能数据的功能,有助于进行性能分析。 7. **AL07 - Early Watch Report**:早期监视报告,可以自动收集系统状态数据,并生成报告,帮助诊断问题。 8. *...
开发者可能使用ADO(ActiveX Data Objects)来与数据库进行交互,执行查询、插入、更新和删除操作。 3. **网页设计**:文件中包含了多个`.gif`和`.jpg`图像文件,这些是网页设计中的图像资源,用于美化和增强用户...
`pyEDIutils` 是一个专门设计用于与Electronic Data Interchange(EDI)的PASTA(PASTA stands for Platform for the Analysis and Storage of Time Series in Agriculture)服务器进行交互的Python库。这个库的核心...
此外,对数据进行初步的探索性数据分析(EDA,Exploratory Data Analysis)是必要的,这包括检查缺失值、异常值、统计摘要以及可视化。这有助于我们理解数据的基本特征、分布和潜在的关联性。 最后,数据预处理是...
clustering <- cluster_analysis(fc_matrix) # 独立成分分析 ica_result (fc_matrix, n_components = 20) ``` 最后,为了共享和展示分析结果,我们可以利用HTML生成工具,如`shiny`或`flexdashboard`,创建交互式...