Skip to content

Commit

Permalink
black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MilagrosMarin committed May 17, 2024
1 parent 179c14e commit abe5e27
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 17 deletions.
1 change: 0 additions & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Codespell

on:
Expand Down
3 changes: 0 additions & 3 deletions completed_tutorials/03-Calcium Imaging Computed Tables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,6 @@
" def make(\n",
" self, key\n",
" ): # key is one of the primary keys of the join product of AverageFrame and ParameterSet\n",
"\n",
" print(\"Populating for: \", key)\n",
"\n",
" # fetch average image from the previous table AverageFrame\n",
Expand Down Expand Up @@ -2738,7 +2737,6 @@
"\n",
" # the master table is mainly to perform the computation, while the part table contains the result\n",
" def make(self, key):\n",
"\n",
" print(\"Populating: {}\".format(key))\n",
" # fetch data directory from table Session\n",
" data_path = \"../01-Calcium_Imaging/\" + (Session & key).fetch1(\"data_path\")\n",
Expand All @@ -2764,7 +2762,6 @@
"\n",
" traces = []\n",
" for roi_key, mask in zip(roi_keys, masks):\n",
"\n",
" # reshape mask\n",
" mask_reshaped = np.reshape(mask, [w * h])\n",
" trace = np.mean(im_reshaped[:, mask_reshaped], axis=1)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,6 @@
" 40,\n",
" ) # extract 40 sample points before and after a spike as the waveform\n",
" for spk_id, spk in enumerate(np.where(spikes == 1)[0]):\n",
"\n",
" # For simplicity, skip the spikes too close to the beginning or the end\n",
" if spk - before_spk < 0 or spk + after_spk > len(activity) + 1:\n",
" continue\n",
Expand Down
2 changes: 1 addition & 1 deletion db-course/006-Joins-HW.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1895,7 +1895,7 @@
}
],
"source": [
"dj.Diagram (nations)"
"dj.Diagram(nations)"
]
},
{
Expand Down
4 changes: 0 additions & 4 deletions db-course/008-Transactions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@
"outputs": [],
"source": [
"def transfer_bad(account1, account2, amount):\n",
"\n",
" current_balance = (Account & account1).fetch1(\"balance\")\n",
" if current_balance < amount:\n",
" raise RuntimeError(\"Insufficient funds\")\n",
Expand All @@ -268,10 +267,8 @@
"outputs": [],
"source": [
"def transfer_good(account1, account2, amount):\n",
"\n",
" conn = dj.conn()\n",
" with conn.transaction:\n",
"\n",
" current_balance = (Account & account1).fetch1(\"balance\")\n",
" if current_balance < amount:\n",
" raise RuntimeError(\"Insufficient funds\")\n",
Expand Down Expand Up @@ -634,7 +631,6 @@
"outputs": [],
"source": [
"def transfer(cursor, account1, account2, amount):\n",
"\n",
" cursor.execute(\"BEGIN TRANSACTION\")\n",
"\n",
" try:\n",
Expand Down
3 changes: 0 additions & 3 deletions db-course/DesignPatterns.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,7 @@
"outputs": [],
"source": [
"def transfer(account1, account2, amount):\n",
"\n",
" with Account.connection.transaction:\n",
"\n",
" current_balance = (Account & account1).fetch1(\"balance\")\n",
" if current_balance < amount:\n",
" raise RuntimeError(\"Insufficient funds\")\n",
Expand Down Expand Up @@ -1359,7 +1357,6 @@
"outputs": [],
"source": [
"def transfer(cursor, account1, account2, amount):\n",
"\n",
" cursor.execute(\"BEGIN TRANSACTION\")\n",
"\n",
" try:\n",
Expand Down
3 changes: 0 additions & 3 deletions tutorials/03-Calcium Imaging Computed Tables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@
" def make(\n",
" self, key\n",
" ): # key is one of the primary keys of the join product of AverageFrame and ParameterSet\n",
"\n",
" print(\"Populating for: \", key)\n",
"\n",
" # fetch average image from the previous table AverageFrame\n",
Expand Down Expand Up @@ -912,7 +911,6 @@
"\n",
" # the master table is mainly to perform the computation, while the part table contains the result\n",
" def make(self, key):\n",
"\n",
" print(\"Populating: {}\".format(key))\n",
" # fetch data directory from table Session\n",
" data_path = (Session & key).fetch1(\"data_path\")\n",
Expand All @@ -938,7 +936,6 @@
"\n",
" traces = []\n",
" for roi_key, mask in zip(roi_keys, masks):\n",
"\n",
" # reshape mask\n",
" mask_reshaped = np.reshape(mask, [w * h])\n",
" trace = np.mean(im_reshaped[:, mask_reshaped], axis=1)\n",
Expand Down
1 change: 0 additions & 1 deletion tutorials/05-Electrophysiology Computed Tables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@
" 40,\n",
" ) # extract 40 sample points before and after a spike as the waveform\n",
" for spk_id, spk in enumerate(np.where(spikes == 1)[0]):\n",
"\n",
" # For simplicity, skip the spikes too close to the beginning or the end\n",
" if spk - before_spk < 0 or spk + after_spk > len(activity) + 1:\n",
" continue\n",
Expand Down

0 comments on commit abe5e27

Please sign in to comment.