Skip to content

Instantly share code, notes, and snippets.

db = db.getSiblingDB("RfpStreamingCustomerApi");
//db.getCollection("StreamingFileUploadMetadata").find({uploadedBucket:'aws S3'});
const batchSize = 100;
let skip = 0;
let recordsUpdated = true;
const startTime = new Date();
while (recordsUpdated) {
const documentsToUpdate = db.getCollection("StreamingFileUploadMetadata").find({
$or: [
Manuscript Number: ECOINF-D-23-00801  
Automatic age interpretation of cod otoliths using deep learning
Dear Mr Moen,
Thank you for submitting your manuscript to Ecological Informatics.
I have completed my evaluation of your manuscript. The reviewers recommend reconsideration of your manuscript following major revision. I invite you to resubmit your manuscript after addressing the comments below. Please resubmit your revised manuscript by Jul 28, 2023.
pil_img1 = load_img('/gpfs/gpfs0/deep/data/Savannah_Professional_Practice2021_08_12_2021/CodOtholiths-MachineLearning/Savannah_Professional_Practice/2013/70174/Nr06_age09/IMG_0034.JPG',target_size=(CONFIG.val_img_size, CONFIG.val_img_size))
pil_img2 = load_img('/gpfs/gpfs0/deep/data/Savannah_Professional_Practice2021_08_12_2021/CodOtholiths-MachineLearning/Savannah_Professional_Practice/2013/70174/Nr06_age09/IMG_0036.JPG',target_size=(CONFIG.val_img_size, CONFIG.val_img_size))
pil_img3 = load_img('/gpfs/gpfs0/deep/data/Savannah_Professional_Practice2021_08_12_2021/CodOtholiths-MachineLearning/Savannah_Professional_Practice/2013/70174/Nr06_age09/IMG_0032.JPG',target_size=(CONFIG.val_img_size, CONFIG.val_img_size))
array_img = img_to_array(pil_img1, data_format=CONFIG.CHANNELS)
array_img2 = img_to_array(pil_img2, data_format=CONFIG.CHANNELS)
array_img3 = img_to_array(pil_img3, data_format=CONFIG.CHANNELS)
array_img_6D = np.append(array_img, array_img2, axis=0)
array_img_9D = np.append(array_img_6D, array_img3
@emoen
emoen / TDA_resources.md
Created December 7, 2021 19:23 — forked from calstad/TDA_resources.md
List of resources for TDA

Quick List of Resources for Topological Data Analysis with Emphasis on Machine Learning

This is just a quick list of resourses on TDA that I put together for @rickasaurus after he was asking for links to papers, books, etc on Twitter and is by no means an exhaustive list.

Survey Papers

Both Carlsson's and Ghrist's survey papers offer a very good introduction to the subject

Other Papers and Web Resources

array([-0.017981056218653552, -0.028865222011924953, -0.02883519277863353,
-1.0, -0.3345186516808494, -0.07485946075394374,
-0.06771933304363233, 0.04338171908571236, 0.037040452642517104,
0.026807046489838948, 0.029447311252645336, 0.03366747566295075,
0.037927735291813036, 0.040548067779481244, 0.05101821927904818,
0.06242406034183629, 0.4811454403543517, 0.06481414558674645,
0.052957200375531546, 0.04632089908497214, 0.05784336198913077,
0.06428897776602346, 0.07524959786732224, 0.11196403799563442,
0.19138330661337297, 0.16398489163387953, 0.1289154209011335,
0.03251985784052742, 0.03487988820329655, 0.09365643783646456],
certifi==2019.11.28
cftime==1.0.4.2
chardet==3.0.4
cntk==2.7
configparser==4.0.2
DateTime==4.3
dms2dec==0.1
et-xmlfile==1.0.1
expatriate==0.4
idna==2.8
import pandas as pd
import numpy as np
import keras
from keras.layers import Dense, GlobalAveragePooling2D, GlobalMaxPooling2D, AveragePooling2D
from keras.layers import Conv2D, MaxPooling2D, Activation, Dropout, Flatten, Dense,Input,BatchNormalization
from keras.models import Model
from keras import optimizers, layers
import os
def missing_loss(y_true, y_pred):
# y_pred=tf.constant([[1.0,2.0],[5.0,10.0]])
bool_finite = tf.where(tf.equal(y_true, -1.0))
int_finite = K.cast(bool_finite, dtype='int32')
float_finite = K.cast(int_finite, dtype='float32')
y_pred = K.cast(y_pred, dtype='float32')
OSEBX ReturnOnCapital normalPE magicFormula
SALM.OL 0.38532 0.111425 0.496745
GSF.OL 0.35041 0.131827 0.482237
ENTRA.OL 0.27280 0.176673 0.449473
AFG.OL 0.35986 0.045839 0.405699
ASETEK.OL 0.39081 0.003481 0.394291
LSG.OL 0.27922 0.112436 0.391656
BAKKA.OL 0.37472 0.012517 0.387237
VEI.OL 0.29613 0.069698 0.365828
MHG.OL 0.30386 0.008684 0.312544
OSEBX ReturnOnCapital normalPE magicFormula
AKER.OL -0.03934 0.673972 0.634632
SALM.OL 0.38532 0.112390 0.497710
GSF.OL 0.35041 0.133167 0.483577
ENTRA.OL 0.27280 0.176673 0.449473
OLT.OL 0.19730 0.235120 0.432420
AFG.OL 0.35986 0.045234 0.405094
ASETEK.OL 0.39081 0.003514 0.394324
LSG.OL 0.27922 0.113086 0.392306
BAKKA.OL 0.37472 0.012550 0.387270