Skip to content

Commit

Permalink
Update code snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Jul 17, 2024
1 parent 34072dd commit 4d0c674
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/CodeSnippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import { vs } from 'react-syntax-highlighter/dist/esm/styles/prism';
function CodeSnippet({ selectedTemplates }) {
const generatePythonCode = (selectedTemplates) => {
const selectedUnitIndicesString = JSON.stringify([...selectedTemplates], null, 2);
return `from spikeinterface.generation import get_templates_from_database, generate_hybrid_recording
return `from spikeinterface.generation import fetch_templates_database_info, query_templates_from_database, generate_hybrid_recording
selected_unit_indices = ${selectedUnitIndicesString}
templates = get_templates_from_database(selected_unit_indices)
templates_info = fetch_templates_database_info()
templates = query_templates_from_database(templates_info.loc[selected_unit_indices])
# recording is an existing spikeinterface.BaseRecording
recording_hybrid = get_templates_from_database(recording, templates=templates)`;
Expand Down

0 comments on commit 4d0c674

Please sign in to comment.