This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.DEBUG) | |
logger.addHandler(logging.NullHandler()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set up logging directory and create logging file. | |
os.makedirs(log_path, exist_ok=True) | |
log_file = os.path.join(log_path, f'{datetime.date.today()}.log') | |
if os.path.exists(log_file): | |
append_write = 'a' # append if already exists | |
else: | |
append_write = 'w' # make a new file if not | |
# Setup up logging configuration. | |
root_logger = logging.getLogger() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create and activate virtual environment | |
# ... | |
# Install MNE with sample datasets and 2D plotting capability | |
pip install mne mne[data] matplotlib pandas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import mne | |
sample_data_folder = mne.datasets.sample.data_path() | |
sample_data_raw_file = os.path.join( | |
sample_data_folder, 'MEG', 'sample', 'sample_audvis_filt-0-40_raw.fif') | |
raw = mne.io.read_raw_fif(sample_data_raw_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all_data = raw.to_data_frame() | |
all_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
pd.DataFrame(raw.info.get('chs')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add csabella git@github.com:csabella/cpython.git | |
git fetch csabella | |
git switch -c bpo-12067 csabella/compare |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands | |
server=1 | |
# Listen for RPC connections on this TCP port: | |
rpcport=8332 | |
# You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind | |
# running on another host using this option: | |
rpcconnect=127.0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git@github.com:bitcoin/bitcoin.git | |
cd bitcoin/share/rpcauth | |
rpcauth.py [Your Username] [Your Password] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import json | |
import random | |
import urllib.request | |
import urllib.error | |
import urllib.parse | |
# Define parameters for the RPC. | |
parameters = { | |
"host": "127.0.0.1", |
OlderNewer