Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Test

C D E F G A B C
啥音 啥啥音 啥音 啥啥音 啥音 啥啥音 啥音 啥音

Answer

| C | D | E | F | G | A | B | C |

import numpy as np
from bokeh.io import curdoc
from bokeh.layouts import row, column
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import Slider, TextInput, CheckboxButtonGroup
from bokeh.plotting import figure
# Set up widgets
text = TextInput(title="title", value='Sound Interference')
import numpy as np
from bokeh.io import curdoc
from bokeh.layouts import row, column
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import Slider, TextInput, CheckboxButtonGroup
from bokeh.plotting import figure
# Set up widgets
text = TextInput(title="title", value='Sound Interference')
import numpy as np
import bokeh
from bokeh.io import curdoc
from bokeh.layouts import row, column
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import Slider, TextInput, CheckboxButtonGroup
from bokeh.plotting import figure
# Set up widgets
text = TextInput(title="title", value='Particle in a 1D box')
def plot_MO(ground_true, pred, i, num_heavy_atom, num_all_atom, num_e, hide_padding=True):
if(hide_padding):
idx_zeros = np.argwhere(ground_true[i]==0)
tmp = 0
while(idx_zeros[tmp+1] - idx_zeros[tmp] > 1):
tmp += 1
first_0_idx = idx_zeros[tmp][0]
ground_true_data = ground_true[i][:first_0_idx]
pred_data = pred[i][:first_0_idx]
@yueyericardo
yueyericardo / tensorboard_logging.py
Created June 27, 2019 04:15 — forked from gyglim/tensorboard_logging.py
Logging to tensorboard without tensorflow operations. Uses manually generated summaries instead of summary ops
"""Simple example on how to log scalars and images to tensorboard without tensor ops.
License: Copyleft
"""
__author__ = "Michael Gygli"
import tensorflow as tf
from StringIO import StringIO
import matplotlib.pyplot as plt
import numpy as np
class Progbar(object):
"""Displays a progress bar.
Arguments:
target: Total number of steps expected, None if unknown.
width: Progress bar width on screen.
verbose: Verbosity mode, 0 (silent), 1 (verbose), 2 (semi-verbose)
stateful_metrics: Iterable of string names of metrics that
should *not* be averaged over time. Metrics in this list
will be displayed as-is. All others will be averaged
by the progbar before display.
plt.figure(figsize=(15,8))
plt.subplot(4, 1, 1)
plt.plot(OH.iloc[:,0],OH.iloc[:,1])
plt.ylim(0, 3.5e-18)
plt.xlim(3580, 3900)
plt.title('R branch', fontsize=16, pad=-20)
plt.subplot(4, 1, 2)
plt.plot(OH.iloc[:,0],OH.iloc[:,1])