Skip to content

Instantly share code, notes, and snippets.

@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
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]
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')
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')

Test

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

Answer

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Configuration file for jupyter-notebook.
#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This is an application.
## The date format used by logging formatters for %(asctime)s
#c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'

快捷键

Spark

  • Cmd + M: Mark as Read/Unread
  • Cmd + Shift + P: Pin

Magnet

  • U I J K: 四分之一
  • D F G: 三分之一
  • E T: 三分之二