Skip to content

Instantly share code, notes, and snippets.

@joshp123
Last active August 29, 2015 13:57
Show Gist options
  • Save joshp123/9449352 to your computer and use it in GitHub Desktop.
Save joshp123/9449352 to your computer and use it in GitHub Desktop.
diffev and model methods
>>> print([m for m in dir(diffev.DiffEv) if m.startswith('set')])
['set_autosave_func', 'set_autosave_interval', 'set_chunksize', 'set_create_trial', 'set_fitting_ended_func', 'set_fom_allowed_dis', 'set_km', 'set_kr', 'set_max_generation_mult', 'set_max_generations', 'set_max_log', 'set_parameter_output_func', 'set_plot_output_func', 'set_pop_mult', 'set_pop_size', 'set_processes', 'set_sleep_time', 'set_text_output_func', 'set_use_autosave', 'set_use_boundaries', 'set_use_max_generations', 'set_use_parallel_processing', 'set_use_pop_mult', 'set_use_start_guess', 'setup_parallel']
>>> print([m for m in dir(model.Model) if m.startswith('')])
['__doc__', '__init__', '__module__', '_read_from_file', '_reset_module', '_save_to_file', 'calc_fom', 'compile_script', 'create_fit_func', 'eval_in_model', 'evaluate_fit_func', 'evaluate_sim_func', 'export_data', 'export_script', 'export_table', 'get_data', 'get_data_as_asciitable', 'get_filename', 'get_fit_pars', 'get_fit_values', 'get_parameters', 'get_possible_parameters', 'get_script', 'get_sim_pars', 'get_table_as_ascii', 'import_script', 'import_table', 'is_compiled', 'load', 'load_addition', 'new_model', 'pickable_copy', 'read_config', 'save', 'save_addition', 'set_fom_func', 'set_script', 'simulate']
>>>
>>> m.func_code.co_varnames[:m.func_code.co_argcount]
('self',)
@joshp123
Copy link
Author

joshp123 commented Mar 9, 2014

do same for model; load defaults from my existing classes

@joshp123
Copy link
Author

joshp123 commented Mar 9, 2014

getters/setters -> config dashboard
metaprogram it - repr, docstrincs? and errors?
exception flow upwards

@joshp123
Copy link
Author

joshp123 commented Mar 9, 2014

this guy's getter/setter and architecture is a good strenght and we can build on this, it just took bloody ages to understand because it's very monolthic (not split up into smaller manageble parts)

@joshp123
Copy link
Author

joshp123 commented Mar 9, 2014

args -> input fields

catch their generic errors? (could)

@joshp123
Copy link
Author

joshp123 commented Mar 9, 2014

filename is file else string nomfp lol

inb4 someone starts executing code hehehe

(snapshot and restart from API)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment