Skip to content

Commit

Permalink
Merge pull request #10 from SpikeInterface/update-code-snippet
Browse files Browse the repository at this point in the history
Update code snippet
  • Loading branch information
alejoe91 authored Jul 17, 2024
2 parents 34072dd + 4d0c674 commit 7fd3a5f
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 7fd3a5f

Please sign in to comment.