<commit_before>- carriers = %w[coal crude_oil natural_gas biomass solar_thermal electricity steam_hot_water notdefined]

%h3{style:"color: #00c; border-bottom: 3px solid #00c"} Final Demands
%br
%table.condensed-table.bordered-table
  %thead
    %tr
      %th Input
      - carriers.each do |carrier|
        %th= carrier
  %tbody
    %tr
      %th households
      - carriers.each do |carrier|
        %td= number_field(carrier, :demand_total)
    
    %tr
      %th{:colspan => 9, :style => "background: #eee"}

        %strong application split
    
    %tr
      %th space heating
      - carriers[0...-1].each do |carrier|
        %td= number_field(carrier, :split, :useable_heat)
      %td 
    %tr
      %th hot water
      - carriers[0...-1].each do |carrier|
        %td= number_field(carrier, :split, :hot_water)
      %td 
    
    %tr
      %th cooking
      %td 
      %td 
      %td= number_field(:natural_gas, :split, :cooking)
      %td= number_field(:biomass, :split, :cooking)
      %td 
      %td= number_field(:electricity, :split, :cooking)
      %td 
      %td 
    
    %tr
      %th lighting
      %td 
      %td 
      %td 
      %td 
      %td 
      %td= number_field(:electricity, :split, :lighting)
      %td 
      %td 
    
    %tr
      %th cooling
      %td 
      %td 
      %td= number_field(:natural_gas, :split, :cooling)
      %td 
      %td 
      %td= number_field(:electricity, :split, :cooling)
      %td 
      %td 
    
    %tr
      %th appliances
      %td 
      %td 
      %td 
      %td 
      %td 
      %td= number_field(:electricity, :split, :appliances)
      %td 
      %td 

%ul.tabs{'data-tabs' => 'tabs'}
  - Etsource::Constants::HOUSEHOLDS.each do |section_carrier, carrier_converters|
    %li{:class => section_carrier == :useable_heat ? 'active' : nil}= link_to section_carrier.to_s, "##{section_carrier}"

#tab-content.tab-content{'data-tabs' => 'tabs'}
  - Etsource::Constants::HOUSEHOLDS.each do |section_carrier, carrier_converters|
    %div.tab-pane{:id => section_carrier.to_s, :class => section_carrier == :useable_heat ? 'active' : nil}
      %p== Split for #{section_carrier} technologies
      
      %table.condensed-table
        %thead
          %tr
            %th Name
            %th Split
            %th.debug Exp. demand
            %th.debug Output Share
            %th.debug Debug
        %tbody
          - carrier_converters.each do |carrier, converters| 
            %tr
              %th{:colspan => 5, :style => "background: #eee"}
                = carrier
              
            - converters.each do |converter|
              %tr
                %th
                  %label{:style => 'text-align:left'}
                    = link_to converter.gsub('_households_energetic', ''), data_converter_path(:api_scenario_id => 'latest', :id => converter), :target => :_blank
                - if converters.length == 1
                  %th= number_field(carrier, section_carrier, converter.to_sym, :disabled => true, :value => 100.0)
                - else
                  %th= number_field(carrier, section_carrier, converter.to_sym)
                
                %td.debug
                  %label{:style => 'text-align:left'}= (Current.gql.query("present:V(#{converter};demand_expected_value)") / BILLIONS).round(3) rescue -1.0
                %td.debug
                  %label= Current.gql.present_graph.converter(converter).object_dataset[:output_share].round(3) rescue -1.0
                %td.debug
                  %a.btn{:data => {:'controls-modal' => "debug_#{converter}", :backdrop => "true"}} Debug
                  %div.modal.hide{:id => "debug_#{converter}"}
                    .modal-header
                      %a.close{:href => "#"} &times;
                      %h3 Debug 
                    .modal-body
                      - InputTool::Form.all.inject({}) {|hsh,f| hsh.merge f.code => f.dataset_values}.each do |k,h|
                        %code= Current.gql.present_graph.converter(converter.to_sym).object_dataset.inspect<commit_msg>fix some things for renaming<commit_after>- carriers = %w[coal crude_oil natural_gas biomass solar_thermal electricity steam_hot_water notdefined]

%h3{style:"color: #00c; border-bottom: 3px solid #00c"} Final Demands
%br
%table.condensed-table.bordered-table
  %thead
    %tr
      %th Input
      - carriers.each do |carrier|
        %th= carrier
  %tbody
    %tr
      %th households
      - carriers.each do |carrier|
        %td= number_field(carrier, :demand_total)
    
    %tr
      %th{:colspan => 9, :style => "background: #eee"}

        %strong application split
    
    %tr
      %th space heating
      - carriers[0...-1].each do |carrier|
        %td= number_field(carrier, :split, :useable_heat)
      %td 
    %tr
      %th hot water
      - carriers[0...-1].each do |carrier|
        %td= number_field(carrier, :split, :hot_water)
      %td 
    
    %tr
      %th cooking
      %td 
      %td 
      %td= number_field(:natural_gas, :split, :cooking)
      %td= number_field(:biomass, :split, :cooking)
      %td 
      %td= number_field(:electricity, :split, :cooking)
      %td 
      %td 
    
    %tr
      %th lighting
      %td 
      %td 
      %td 
      %td 
      %td 
      %td= number_field(:electricity, :split, :lighting)
      %td 
      %td 
    
    %tr
      %th cooling
      %td 
      %td 
      %td= number_field(:natural_gas, :split, :cooling)
      %td 
      %td 
      %td= number_field(:electricity, :split, :cooling)
      %td 
      %td 
    
    %tr
      %th appliances
      %td 
      %td 
      %td 
      %td 
      %td 
      %td= number_field(:electricity, :split, :appliances)
      %td 
      %td 

%ul.tabs{'data-tabs' => 'tabs'}
  - Etsource::Constants::HOUSEHOLDS.each do |section_carrier, carrier_converters|
    %li{:class => section_carrier == :useable_heat ? 'active' : nil}= link_to section_carrier.to_s, "##{section_carrier}"

#tab-content.tab-content{'data-tabs' => 'tabs'}
  - Etsource::Constants::HOUSEHOLDS.each do |section_carrier, carrier_converters|
    %div.tab-pane{:id => section_carrier.to_s, :class => section_carrier == :useable_heat ? 'active' : nil}
      %p== Split for #{section_carrier} technologies
      
      %table.condensed-table
        %thead
          %tr
            %th Name
            %th Split
            %th.debug Exp. demand
            %th.debug Output Share
            %th.debug Debug
        %tbody
          - carrier_converters.each do |carrier, converters| 
            %tr
              %th{:colspan => 5, :style => "background: #eee"}
                = carrier
              
            - converters.each do |converter|
              %tr
                %th
                  %label{:style => 'text-align:left'}
                    = link_to converter.gsub('_households_energetic', ''), data_converter_path(:api_scenario_id => 'latest', :id => converter), :target => :_blank
                - if converters.length == 1
                  %th= number_field(carrier, section_carrier, converter.to_sym, :disabled => true, :value => 100.0)
                - else
                  %th= number_field(carrier, section_carrier, converter.to_sym)
                
                %td.debug
                  %label{:style => 'text-align:left'}= (Current.gql.query("present:V(#{converter};demand_expected_value)") / BILLIONS).round(3) rescue -1.0
                %td.debug
                  %label= Current.gql.present_graph.converter(converter).object_dataset[:output_share].round(3) rescue -1.0
                %td.debug
                  %a.btn{:data => {:'controls-modal' => "debug_#{converter}", :backdrop => "true"}} Debug
                  %div.modal.hide{:id => "debug_#{converter}"}
                    .modal-header
                      %a.close{:href => "#"} &times;
                      %h3 Debug 
                    .modal-body
                      - InputTool::SavedWizard.all.inject({}) {|hsh,f| hsh.merge f.code => f.research_data_bucket}.each do |k,h|
                        %code= Current.gql.present_graph.converter(converter.to_sym).object_dataset.inspect
{'fraction_non_alphanumeric': 0.13298918387413963, 'fraction_numerical': 0.0058997050147492625, 'mean_word_length': 1.8500875656742557, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4615911', 'n_tokens_mistral': 2772, 'n_tokens_neox': 2546, 'n_words': 529}