start new:
tmux
start new with session name:
tmux new -s myname
| class Program | |
| { | |
| static async Task DoSomethingAsync() | |
| { | |
| int val = 13; | |
| await Task.Delay(TimeSpan.FromSeconds(1)); | |
| val *= 2; |
| #List unique values in a DataFrame column | |
| pd.unique(df.column_name.ravel()) | |
| #Convert Series datatype to numeric, getting rid of any non-numeric values | |
| df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
| #Grab DataFrame rows where column has certain values | |
| valuelist = ['value1', 'value2', 'value3'] | |
| df = df[df.column.isin(value_list)] |
| // Learn more about F# at http://fsharp.org | |
| // See the 'F# Tutorial' project for more help. | |
| open Suave | |
| open Suave.Filters | |
| open Suave.Operators | |
| open Suave.Successful | |
| open Suave.Sockets | |
| open System.Net |
| // Read output from process' cosole | |
| def getOriginalSentences(more_params: String): Seq[String] = { | |
| val pb = Process("python", Array("test.py",more_params)) | |
| pb.lineStream | |
| } | |
| // Cast | |
| val a_int = 1 | |
| a_int.asInstanceOf[java.lang.Integer] |
| # Initialize the scroll | |
| page = es.search( | |
| index = 'yourIndex', | |
| doc_type = 'yourType', | |
| scroll = '2m', | |
| search_type = 'scan', | |
| size = 1000, | |
| body = { | |
| # Your query's body | |
| }) |
#GNU Screen Cheat Sheet
##Basics
| import tensorflow as tf | |
| import numpy as np | |
| import os | |
| with tf.Session() as sess: | |
| md = "./models/" | |
| fgn = "model.ckpt" | |
| fgp = os.path.join(md, fgn) | |
| saver = tf.train.import_meta_graph(fgp + ".meta") | |
| saver.restore(sess, fgp) |
| #include "tensorflow/core/public/session.h" | |
| #include "tensorflow/core/platform/env.h" | |
| using namespace tensorflow; | |
| int main(int argc, char* argv[]) { | |
| // Initialize a tensorflow session | |
| Session* session; | |
| Status status = NewSession(SessionOptions(), &session); | |
| if (!status.ok()) { | |
| std::cout << status.ToString() << "\n"; |
| KEYBINDINGS | |
| byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings | |
| are: | |
| F2 - Create a new window | |
| F3 - Move to previous window | |
| F4 - Move to next window |