Try to look in User Preferences
, in Input tab
. There is 2 different ways to do what.
First if your command called right from key-building. In this case you don't need to edit any python code, just go in Input tab, find command and here you can set any default settings as you like:

For example, I changed segments count. And after changing press Save user settings
.
Second than your command called from menu, like W -> Remove doubles
. You can also create a new shortcut and edit this settings like I explained before:

But of course it will affects only on new keybinding. So how to change default settings in menu? This time also go in Input tab, find command Call Menu
that calls from keybinding (in case of Remove doubles
it will be W ):
And we interested in Name of menu (in our case it is "VIEW3D_MT_edit_mesh_specials
")
This is what can search in files, and find menu like this:
class VIEW3D_MT_edit_mesh_specials(Menu):
bl_label = "Specials"
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mesh.subdivide", text="Subdivide").smoothness = 0.0
layout.operator("mesh.subdivide", text="Subdivide Smooth").smoothness = 1.0
layout.separator()
layout.operator("mesh.merge", text="Merge...")
layout.operator("mesh.remove_doubles")
layout.separator()
layout.operator("mesh.hide", text="Hide").unselected = False
layout.operator("mesh.reveal", text="Reveal")
layout.operator("mesh.select_all", text="Select Inverse").action = 'INVERT'
layout.separator()
layout.operator("mesh.flip_normals")
layout.operator("mesh.vertices_smooth", text="Smooth")
layout.operator("mesh.vertices_smooth_laplacian", text="Laplacian Smooth")
layout.separator()
layout.operator("mesh.inset")
layout.operator("mesh.bevel", text="Bevel")
layout.operator("mesh.bridge_edge_loops")
layout.separator()
layout.operator("mesh.faces_shade_smooth")
layout.operator("mesh.faces_shade_flat")
layout.separator()
layout.operator("mesh.blend_from_shape")
layout.operator("mesh.shape_propagate_to_all")
layout.operator("mesh.shortest_path_select")
layout.operator("mesh.sort_elements")
layout.operator("mesh.symmetrize")
layout.operator("mesh.symmetry_snap")
I found this file here: /usr/share/blender/2.79/scripts/startup/bl_ui/space_view3d.py
This is a menu, that called from Call Menu("VIEW3D_MT_edit_mesh_specials")
. Here you can add some default parameters.