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
| """ | |
| Analyzes and filters NASA contract data from CSV files generated by fetch-contracts.py. | |
| Key functionality: | |
| - Filters records by award type (grants, cooperative agreements) | |
| - Validates records are active within specified date range | |
| - Deduplicates contract records by keeping latest modification | |
| - Calculates summaries by state and congressional district | |
| - Generates filtered CSV output and summary statistics |
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
| from decimal import Decimal, getcontext | |
| import sys | |
| import time | |
| if len(sys.argv) < 2: | |
| print('Not enough arguments') | |
| quit() | |
| max_iterations = int(sys.argv[1]) # The maximum number of iterations to perform | |
| excess_prec = 2 # Additional precision to help avoid rounding errors |
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
| // System-wide application js manifest | |
| //= require jquery | |
| //= require jquery_ujs | |
| //= require jquery-ui | |
| //= require jqplot |
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
| // Loads the JQPlot files as defined in jquery.jqplot.js | |
| //= require jqplot/jqplot.core.js | |
| //= require jqplot/jqplot.linearTickGenerator.js | |
| //= require jqplot/jqplot.linearAxisRenderer.js | |
| //= require jqplot/jqplot.axisTickRenderer.js | |
| //= require jqplot/jqplot.axisLabelRenderer.js | |
| //= require jqplot/jqplot.tableLegendRenderer.js | |
| //= require jqplot/jqplot.lineRenderer.js | |
| //= require jqplot/jqplot.markerRenderer.js | |
| //= require jqplot/jqplot.divTitleRenderer.js |
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
| if false | |
| one = 1 | |
| two = 2 | |
| three = 3 | |
| end | |
| # Local variables are defined now, but not set to anything | |
| puts local_variables | |
| => [:one, :two, :three, :_] |
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
| # This report displays users who have created new accounts during the specified time period. | |
| class Admin::Reports::SignupsController < Admin::Reports::ApplicationController | |
| before_filter :load_building, :only => :show | |
| before_filter :parse_dates_or_use_default | |
| helper_method :title_for_display | |
| def index | |
| @users_created_count = collection_filter.created_between(@start_date, @end_date).active.count | |
| if params[:summary] | |
| @dorms = @current_site.university.try(:dorms) |
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
| # Gemfile | |
| source :rubygems | |
| gem 'sinatra', "~> 1.0.0" | |
| gem 'sinatra-default_charset' | |
| gem 'sinatra-reloader' | |
| gem 'sinatra-static-assets' | |
| gem 'emk-sinatra-url-for' | |
| gem 'activesupport' |
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
| <?php | |
| /** | |
| * Override the taxonomy term name to make sure it's the translated version. | |
| * Since Views does not support localizable taxonomy but we want Views to handle all good rendering stuff | |
| * it does, we just replace any occurrence of the original value with our localized string translation, | |
| * and leave the rest the same in the pre-rendered output. | |
| * Note that you should set your $tid to reference the proper value in your $row object, and that this is | |
| * for localized taxonomy only. | |
| */ | |
| $tid = $row->node_node__term_data_tid; |
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
| # Installed via: | |
| # rails plugin install git://github.com/rails/exception_notification.git | |
| # Then, created an initializer in | |
| # config/initializers/exception_notification.rb: | |
| Rsf::Application.config.middleware.use ExceptionNotifier, | |
| :email_prefix => "[RSF ERROR] ", | |
| :sender_address => %{"notifier" <notifier@example.com>}, | |
| :exception_recipients => %w{webmaster@singlebrook.com} |
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
| source :gemcutter | |
| gem "rails", "2.3.4" | |
| gem "radiant", "0.8.1" | |
| gem "sqlite3-ruby", "1.2.5", :require => "sqlite3" | |
| gem "mysql" | |
| gem "rack", "1.0.0" |
NewerOlder