
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Ruby library to assist in the visualization of Iraq data shared by Agence France-Presse.
$ gem install iraq_unrest
Requests are made to a Google Spreadsheet provided by Agence France-Presse. If you have any questions about the data, please contact AFP's Baghdad Bureau
Data sets currently supported:
IraqiCasualtiesComparison
IraqGovernmentCasualtyFigures
Each data set has Ruby methods for serializing and formatting records.
A visualize!
method is provided to create a time-series chart using HTML/Rickshaw.js
irb(main):002:0> IraqUnrest::IraqiCasualtiesComparison.visualize!
=> #<File:iraqi_casualties_comparison.html (closed)>
irb(main):001:0> IraqUnrest::IraqGovernmentCasualtyFigure.visualize!
=> #<File:iraq_government_casualty_figure.html (closed)>
Use ActiveModel::Serializers to return all records as a JSON Array
irb(main):003:0> IraqUnrest::IraqGovernmentCasualtyFigure.as_json
[
[ 0] {
:date => 1383202800,
:civilian_killed => "855",
:police_killed => "65",
:army_killed => "44",
:civilian_wounded => "1445",
:police_wounded => "88",
:army_wounded => "67",
:insurg_killed => "33",
:insurg_arrested => "167"
},
...
]
Return all records as a JSON hash, using each attribute as a segment. This data set can then be rendered into a Rickshaw.js graph.
irb(main):004:0> IraqUnrest::IraqiCasualtiesComparison.as_rickshaw
{
:afp => [
[ 0] {
:x => 1075536000,
:y => 0
},
[117] {
:x => 1383202800,
:y => 743
}
],
:iraq_gov => [...],
:iraq_body_count => [...]
}
CSV methods provide clean and formatted data as a string or file.
Creates a CSV file in local working directory
irb(main):005:0> IraqUnrest::IraqGovernmentCasualtyFigure.to_csv!
=> #<File:iraq_government_casualty_figure.csv (closed)>
As a string
irb(main):006:0> IraqUnrest::IraqGovernmentCasualtyFigure.to_csv
=> "date,civilian_killed,police_killed,army_killed,civilian_wounded,police_wounded..."
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that iraq_unrest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.