text:
Please

Hello, I wish you good work. Can you update the codes related to water quality?

Unfortunately these scripts are not maintained any more. They would need to be updated before they could run. You're very welcome to contribute to the repo.

I have edited the parts related to Landsat version. However, I am getting an error in the part related to Band 6. I would be very happy if you could help me. I would like to share the latest edited version with you.

Are you working on the js code or the python code?  Can you share the code in ur repo so i can look at it to help?

// This script processes a single Landsat 8 image of interest.
// WQ parameters such chlor-a, secchi depth, trophic state index are calculated
// How to use:
// (1) If a "geometry" variable exists in the imports window, delete it.
// (2) Within the map, select the point button near the top left side.
// (3) Create a new point by clicking on a location of interest.
// (4) Adjust the time frame you wish to browse by adding here:
// begin date
var iniDate = '2017-09-11';
// end date
var endDate = '2017-09-11';
// (5) Adjust a cloud % threshold here:
var oliCloudPerc = 30
// (6) Click Run
// (7) The "available imagery" ImageCollection within the console displays all available imagery. If you wish to investigate a single
//     image from this collection, find the FILE_ID within the features and copy and paste it here:
var l8 = ee.Image('LANDSAT/LC08/C02/T1/LC08_177033_20171109');
// (8) Click "Run"
// (9) Export each image by clicking on the run button within the "tasks" tab.
// Author: Benjamin Page //
// Citations:
// Page, B.P. and Mishra, D.R., 2018. A modified atmospheric correction when coupling sentinel-2 and landsat-8 for inland water quality monitoring, In Review
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Import Collections //
// landsat 8 raw dn
var OLI_DN = ee.ImageCollection('LANDSAT/LC08/C02/T1');
// landsat-8 surface reflactance product (for masking purposes)
var SRP = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2');
// toms / omi
var ozone = ee.ImageCollection('TOMS/MERGED');
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Filtering Collection and Masking //
var pi = ee.Image(3.141592);
// water mask
var startMonth = 5;
var endMonth = 9;
var startYear = 2013;
var endYear = 2017;
// filter landsat 8 collection
print(FC_OLI, 'Available Imagery')
print(l8, 'l8 image info')
// oli image date
var oliDate = l8.date();
print(oliDate, 'l8 Date')
var footprint = l8.geometry()
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// single OLI image ATMOSPHERIC CORRECTION //
// dem
var DEM_OLI = ee.Image('USGS/SRTMGL1_003').clip(footprint);
// ozone
var DU_OLI = ee.Image(ozone.filterDate(iniDate,endDate).filterBounds(footprint).mean());
//Julian Day
var imgDate_OLI = ee.Date(l8.get('system:time_start'));
var FOY_OLI = ee.Date.fromYMD(imgDate_OLI.get('year'),1,1);
var JD_OLI = imgDate_OLI.difference(FOY_OLI,'day').int().add(1);
// Earth-Sun distance
var d_OLI = ee.Image.constant(l8.get('EARTH_SUN_DISTANCE'));
//Sun elevation
var SunEl_OLI = ee.Image.constant(l8.get('SUN_ELEVATION'));
//Sun azimuth
var SunAz_OLI = ee.Image.constant(l8.get('SUN_AZIMUTH'));
//Satellite zenith
var SatZe_OLI = ee.Image(0.0)
var cosdSatZe_OLI = (SatZe_OLI).multiply(pi.divide(ee.Image(180))).cos();
var sindSatZe_OLI = (SatZe_OLI).multiply(pi.divide(ee.Image(180))).sin();
//Satellite azimuth
var SatAz_OLI = ee.Image(0.0)
//Sun zenith
var SunZe_OLI = ee.Image(90).subtract(SunEl_OLI)
var cosdSunZe_OLI = SunZe_OLI.multiply(pi.divide(ee.Image.constant(180))).cos(); // in degrees
var sindSunZe_OLI = SunZe_OLI.multiply(pi.divide(ee.Image(180))).sin(); // in degrees
//Relative azimuth
var RelAz_OLI = ee.Image(SunAz_OLI);
var cosdRelAz_OLI = RelAz_OLI.multiply(pi.divide(ee.Image(180))).cos();
//Pressure calculation
var P_OLI = ee.Image(101325).multiply(ee.Image(1).subtract(ee.Image(0.0000225577).multiply(DEM_OLI)).pow(5.25588)).multiply(0.01);
var Po_OLI = ee.Image(1013.25);
// Radiometric Calibration //
//define bands to be converted to radiance
var bands_OLI = ['B1','B2','B3','B4','B5','B6','B7'];
// radiance_mult_bands
var rad_mult_OLI = ee.Image(ee.Array([ee.Image(l8.get('RADIANCE_MULT_BAND_1')),
ee.Image(l8.get('RADIANCE_MULT_BAND_2')),
ee.Image(l8.get('RADIANCE_MULT_BAND_3')),
ee.Image(l8.get('RADIANCE_MULT_BAND_4')),
ee.Image(l8.get('RADIANCE_MULT_BAND_5')),
ee.Image(l8.get('RADIANCE_MULT_BAND_6')),
ee.Image(l8.get('RADIANCE_MULT_BAND_7'))]
)).toArray(1);
// radiance add band
var rad_add_OLI = ee.Image(ee.Array([ee.Image(l8.get('RADIANCE_ADD_BAND_1')),
ee.Image(l8.get('RADIANCE_ADD_BAND_2')),
ee.Image(l8.get('RADIANCE_ADD_BAND_3')),
ee.Image(l8.get('RADIANCE_ADD_BAND_4')),
ee.Image(l8.get('RADIANCE_ADD_BAND_5')),
ee.Image(l8.get('RADIANCE_ADD_BAND_6')),
ee.Image(l8.get('RADIANCE_ADD_BAND_7'))]
)).toArray(1);
//create an empty image to save new radiance bands to
var imgArr_OLI = l8.select(bands_OLI).toArray().toArray(1);
var Ltoa_OLI = imgArr_OLI.multiply(rad_mult_OLI).add(rad_add_OLI)
// esun
var ESUN_OLI = ee.Image.constant(197.24790954589844)
.addBands(ee.Image.constant(201.98426818847656))
.addBands(ee.Image.constant(186.12677001953125))
.addBands(ee.Image.constant(156.95257568359375))
.addBands(ee.Image.constant(96.04714965820312))
.addBands(ee.Image.constant(23.8833221450863))
.addBands(ee.Image.constant(8.04995873449635)).toArray().toArray(1);
ESUN_OLI = ESUN_OLI.multiply(ee.Image(1))
var ESUNImg_OLI = ESUN_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);
// Ozone Correction //
// Ozone coefficients
var koz_OLI = ee.Image.constant(0.0039).addBands(ee.Image.constant(0.0218))
.addBands(ee.Image.constant(0.1078))
.addBands(ee.Image.constant(0.0608))
.addBands(ee.Image.constant(0.0019))
.addBands(ee.Image.constant(0))
.addBands(ee.Image.constant(0))
.toArray().toArray(1);
// Calculate ozone optical thickness
var Toz_OLI = koz_OLI.multiply(DU_OLI).divide(ee.Image.constant(1000));
// Calculate TOA radiance in the absense of ozone
var Lt_OLI = Ltoa_OLI.multiply(((Toz_OLI)).multiply((ee.Image.constant(1).divide(cosdSunZe_OLI)).add(ee.Image.constant(1).divide(cosdSatZe_OLI))).exp());
// Rayleigh optical thickness
var bandCenter_OLI = ee.Image(443).divide(1000).addBands(ee.Image(483).divide(1000))
.addBands(ee.Image(561).divide(1000))
.addBands(ee.Image(655).divide(1000))
.addBands(ee.Image(865).divide(1000))
.addBands(ee.Image(1609).divide(1000))
.addBands(ee.Number(2201).divide(1000))
.toArray().toArray(1);
// create an empty image to save new Tr values to
var Tr_OLI = (P_OLI.divide(Po_OLI)).multiply(ee.Image(0.008569).multiply(bandCenter_OLI.pow(-4))).multiply((ee.Image(1).add(ee.Image(0.0113).multiply(bandCenter_OLI.pow(-2))).add(ee.Image(0.00013).multiply(bandCenter_OLI.pow(-4)))));
// Fresnel Reflection //
// Specular reflection (s- and p- polarization states)
var theta_V_OLI = ee.Image(0.0000000001);
var sin_theta_j_OLI = sindSunZe_OLI.divide(ee.Image(1.333));
var theta_j_OLI = sin_theta_j_OLI.asin().multiply(ee.Image(180).divide(pi));
var theta_SZ_OLI = SunZe_OLI;
var R_theta_SZ_s_OLI = (((theta_SZ_OLI.multiply(pi.divide(ee.Image(180)))).subtract(theta_j_OLI.multiply(pi.divide(ee.Image(180))))).sin().pow(2)).divide((((theta_SZ_OLI.multiply(pi.divide(ee.Image(180)))).add(theta_j_OLI.multiply(pi.divide(ee.Image(180))))).sin().pow(2)));
var R_theta_V_s_OLI = ee.Image(0.0000000001);
var R_theta_SZ_p_OLI = (((theta_SZ_OLI.multiply(pi.divide(180))).subtract(theta_j_OLI.multiply(pi.divide(180)))).tan().pow(2)).divide((((theta_SZ_OLI.multiply(pi.divide(180))).add(theta_j_OLI.multiply(pi.divide(180)))).tan().pow(2)));
var R_theta_V_p_OLI = ee.Image(0.0000000001);
var R_theta_SZ_OLI = ee.Image(0.5).multiply(R_theta_SZ_s_OLI.add(R_theta_SZ_p_OLI));
var R_theta_V_OLI = ee.Image(0.5).multiply(R_theta_V_s_OLI.add(R_theta_V_p_OLI));
// Rayleigh scattering phase function //
// Sun-sensor geometry
var theta_neg_OLI = ((cosdSunZe_OLI.multiply(ee.Image(-1))).multiply(cosdSatZe_OLI)).subtract((sindSunZe_OLI).multiply(sindSatZe_OLI).multiply(cosdRelAz_OLI));
var theta_neg_inv_OLI = theta_neg_OLI.acos().multiply(ee.Image(180).divide(pi));
var theta_pos_OLI = (cosdSunZe_OLI.multiply(cosdSatZe_OLI)).subtract(sindSunZe_OLI.multiply(sindSatZe_OLI).multiply(cosdRelAz_OLI));
var theta_pos_inv_OLI = theta_pos_OLI.acos().multiply(ee.Image(180).divide(pi));
var cosd_tni_OLI = theta_neg_inv_OLI.multiply(pi.divide(180)).cos(); // in degrees
var cosd_tpi_OLI = theta_pos_inv_OLI.multiply(pi.divide(180)).cos(); // in degrees
var Pr_neg_OLI = ee.Image(0.75).multiply((ee.Image(1).add(cosd_tni_OLI.pow(2))));
var Pr_pos_OLI = ee.Image(0.75).multiply((ee.Image(1).add(cosd_tpi_OLI.pow(2))));
// Rayleigh scattering phase function
var Pr_OLI = Pr_neg_OLI.add((R_theta_SZ_OLI.add(R_theta_V_OLI)).multiply(Pr_pos_OLI));
// Calulate Lr,
var denom_OLI = ee.Image(4).multiply(pi).multiply(cosdSatZe_OLI);
var Lr_OLI = (ESUN_OLI.multiply(Tr_OLI)).multiply(Pr_OLI.divide(denom_OLI));
// Rayleigh corrected radiance
var Lrc_OLI = (Lt_OLI.divide(ee.Image(10))).subtract(Lr_OLI);
var LrcImg_OLI = Lrc_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);
// Rayleigh corrected reflectance
var prc_OLI = Lrc_OLI.multiply(pi).multiply(d_OLI.pow(2)).divide(ESUN_OLI.multiply(cosdSunZe_OLI));
var prcImg_OLI = prc_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);
// Aerosol Correction //
// Bands in nm
var bands_nm_OLI = ee.Image(443).addBands(ee.Image(483))
.addBands(ee.Image(561))
.addBands(ee.Image(655))
.addBands(ee.Image(865))
.addBands(ee.Image(0))
.addBands(ee.Image(0))
.toArray().toArray(1);
// Lam in SWIR bands
var Lam_6_OLI = LrcImg_OLI.select('B6')
var Lam_7_OLI = LrcImg_OLI.select('B7')
// Calculate aerosol type
var eps_OLI = (((((Lam_7_OLI).divide(ESUNImg_OLI.select('B7'))).log()).subtract(((Lam_6_OLI).divide(ESUNImg_OLI.select('B6'))).log())).divide(ee.Image(2201).subtract(ee.Image(1609)))).multiply(mask)
// Calculate multiple scattering of aerosols for each band
var Lam_OLI = (Lam_7_OLI).multiply(((ESUN_OLI).divide(ESUNImg_OLI.select('B7')))).multiply((eps_OLI.multiply(ee.Image(-1))).multiply((bands_nm_OLI.divide(ee.Image(2201)))).exp());
// diffuse transmittance
var trans_OLI = Tr_OLI.multiply(ee.Image(-1)).divide(ee.Image(2)).multiply(ee.Image(1).divide(cosdSatZe_OLI)).exp();
// Compute water-leaving radiance
var Lw_OLI = Lrc_OLI.subtract(Lam_OLI).divide(trans_OLI);
// water-leaving reflectance
var pw_OLI = (Lw_OLI.multiply(pi).multiply(d_OLI.pow(2)).divide(ESUN_OLI.multiply(cosdSunZe_OLI)));
var pwImg_OLI = pw_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);
// Rrs
var Rrs = (pw_OLI.divide(pi).arrayProject([0]).arrayFlatten([bands_OLI]).slice(0,5));
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Models //
// Surface water temperature
var TIRS_1 = l8.select('B10');
var b10_add_band = ee.Number(TIRS_1.get('RADIANCE_ADD_BAND_10'));
var b10_mult_band = ee.Number(TIRS_1.get('RADIANCE_MULT_BAND_10'));
var Oi = ee.Number(0.29);
var TIRS_cal = (TIRS_1.multiply(b10_mult_band).add(b10_add_band).subtract(Oi)); //.multiply(lakes);
var K1_b10 = ee.Number(TIRS_1.get('K1_CONSTANT_BAND_10'));
var K2_b10 = ee.Number(TIRS_1.get('K2_CONSTANT_BAND_10'));
var LST = ((ee.Image(K2_b10).divide(((ee.Image(K1_b10).divide(ee.Image(TIRS_cal))).add(ee.Image(1))).log())).subtract(ee.Image(273))).multiply(mask); // Celsius
LST = (ee.Image(0.7745).multiply(LST)).add(ee.Image(9.6502)); // calibration R2 = 0.8599
// chlor_a
// Chlorophyll-a OC3
var a0 = ee.Image(0.2412);
var a1 = ee.Image(-2.0546);
var a2 = ee.Image(1.1776);
var a3 = ee.Image(-0.5538);
var a4 = ee.Image(-0.4570);
var log_BG = (Rrs.select('B1').divide(Rrs.select('B3'))).log10();
var a1a = a1.multiply(log_BG.pow(1));
var a2a = a2.multiply(log_BG.pow(2));
var a3a = a3.multiply(log_BG.pow(3));
var a4a = a4.multiply(log_BG.pow(4));
var sum = a1a.add(a2a).add(a3a).add(a4a);
var log10_chlor_a = a0.add(sum);
var chlor_a = ee.Image(10).pow(log10_chlor_a);
var chlor_a_cal = ee.Image(4.0752).multiply(chlor_a).subtract(ee.Image(3.9617));
// SD
var ln_BlueRed = (Rrs.select('B2').divide(Rrs.select('B4'))).log()
var lnMOSD = (ee.Image(1.4856).multiply(ln_BlueRed)).add(ee.Image(0.2734)); // R2 = 0.8748 with in-situ
var MOSD = ee.Image(10).pow(lnMOSD); // log space to (m)
var SD = (ee.Image(0.1777).multiply(MOSD)).add(ee.Image(1.0813));
// tsi
var TSI_c = ee.Image(30.6).add(ee.Image(9.81)).multiply(chlor_a_cal.log())
var TSI_s = ee.Image(60.0).subtract(ee.Image(14.41)).multiply(SD.log())
var TSI = (TSI_c.add(TSI_s)).divide(ee.Image(2));
// Reclassify TSI
// Create conditions
var mask1 = TSI.lt(30); // (1)
var mask2 = TSI.gte(30).and(TSI.lt(40));// (2)
var mask3 = TSI.gte(40).and(TSI.lt(50)); // (3)
var mask4 = TSI.gte(50).and(TSI.lt(60)); // (4)
var mask5 = TSI.gte(60).and(TSI.lt(70)); // (5)
var mask6 = TSI.gte(70).and(TSI.lt(80)); // (6)
var mask7 = TSI.gte(80); // (7)
// Reclassify conditions into new values
var img1 = TSI.where(mask1.eq(1), 1).mask(mask1);
var img2 = TSI.where(mask2.eq(1), 2).mask(mask2);
var img3 = TSI.where(mask3.eq(1), 3).mask(mask3);
var img4 = TSI.where(mask4.eq(1), 4).mask(mask4);
var img5 = TSI.where(mask5.eq(1), 5).mask(mask5);
var img6 = TSI.where(mask6.eq(1), 6).mask(mask6);
var img7 = TSI.where(mask7.eq(1), 7).mask(mask7);
// Ouput of reclassified image
var TSI_R = img1.unmask(img2).unmask(img3).unmask(img4).unmask(img5).unmask(img6).unmask(img7);
// Map Layers
Map.addLayer(footprint, {}, 'footprint')
Map.addLayer(l8.multiply(mask), {bands: ['B4', 'B3', 'B2'], min: 0, max: 15000}, 'rgb', false) // rgb
Map.addLayer(LST, {min: 20, max: 30, palette: ['darkblue', 'blue', 'white', 'red', 'darkred']}, 'LST', false)
Map.addLayer(chlor_a_cal, {min: 0, max: 80, palette: ['blue', 'cyan', 'limegreen', 'yellow', 'orange' , 'darkred']}, 'chlor_a', false)
Map.addLayer(SD, {min: 0, max: 3, palette: ['darkred', 'orange', 'yellow', 'limegreen', 'cyan', 'blue']}, 'SD', false)
Map.addLayer(TSI, {min: 30, max: 70, palette: ['blue', 'cyan', 'limegreen', 'yellow', 'orange' , 'darkred']}, 'TSI', false)
Map.addLayer(TSI_R, {min: 1, max: 7, palette: ['purple', 'blue', 'limegreen', 'yellow', 'orange', 'orangered', 'darkred']}, 'TSI_R', true)
Map.centerObject(footprint, 7)
// EXPORT IMAGES //
// Export LST
Export.image.toDrive({
image: LST,
description: 'LST',
scale: 30,
region: footprint
});
// Export chlor_a
Export.image.toDrive({
image: chlor_a,
description: 'chlor_a',
scale: 30,
region: footprint
});
// Export SD
Export.image.toDrive({
image: SD,
description: 'SD',
scale: 30,
region: footprint
});
// Export TSI
Export.image.toDrive({
image: TSI,
description: 'TSI',
scale: 30,
region: footprint
});
// Export TSI_R
Export.image.toDrive({
image: TSI_R,
description: 'TSI_R',
scale: 30,
region: footprint
});

am a PhD student in the department of surveying engineering in Turkey. I am grateful for your help. I have just started working on software. I am working on my PhD thesis. I would like to thank you for your work. Thank you very much for your interest and concern.

JS CODE

I'll start with the code u shared and go from there.  The error message image must be different code, since the line giving that error is not in the code u shared.  Give me a few minutes to see if i can quickly work out the error i'm seeing and get it running.

// This script processes a single Landsat 8 image of interest.
// WQ parameters such chlor-a, secchi depth, trophic state index are calculated
// How to use:
// (1) If a "geometry" variable exists in the imports window, delete it.
// (2) Within the map, select the point button near the top left side.
// (3) Create a new point by clicking on a location of interest.
// (4) Adjust the time frame you wish to browse by adding here:
// begin date
var iniDate = '2017-09-11';
// end date
var endDate = '2017-09-11';
// (5) Adjust a cloud % threshold here:
var oliCloudPerc = 30
// (6) Click Run
// (7) The "available imagery" ImageCollection within the console displays all available imagery. If you wish to investigate a single
//     image from this collection, find the FILE_ID within the features and copy and paste it here:
var l8 = ee.Image('LANDSAT/LC08/C02/T1/LC08_177033_20171109');
// (8) Click "Run"
// (9) Export each image by clicking on the run button within the "tasks" tab.
// Author: Benjamin Page //
// Citations:
// Page, B.P. and Mishra, D.R., 2018. A modified atmospheric correction when coupling sentinel-2 and landsat-8 for inland water quality monitoring, In Review
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Import Collections //
// landsat 8 raw dn
var OLI_DN = ee.ImageCollection('LANDSAT/LC08/C02/T1');
// landsat-8 surface reflactance product (for masking purposes)
var SRP = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2');
// toms / omi
var ozone = ee.ImageCollection('TOMS/MERGED');
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Filtering Collection and Masking //
var pi = ee.Image(3.141592);
// water mask
var startMonth = 5;
var endMonth = 9;
var startYear = 2013;
var endYear = 2017;
// filter landsat 8 collection
print(FC_OLI, 'Available Imagery')
print(l8, 'l8 image info')
// oli image date
var oliDate = l8.date();
print(oliDate, 'l8 Date')
var footprint = l8.geometry()
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// single OLI image ATMOSPHERIC CORRECTION //
// dem
var DEM_OLI = ee.Image('USGS/SRTMGL1_003').clip(footprint);
// ozone
var DU_OLI = ee.Image(ozone.filterDate(iniDate,endDate).filterBounds(footprint).mean());
//Julian Day
var imgDate_OLI = ee.Date(l8.get('system:time_start'));
var FOY_OLI = ee.Date.fromYMD(imgDate_OLI.get('year'),1,1);
var JD_OLI = imgDate_OLI.difference(FOY_OLI,'day').int().add(1);
// Earth-Sun distance
var d_OLI = ee.Image.constant(l8.get('EARTH_SUN_DISTANCE'));
//Sun elevation
var SunEl_OLI = ee.Image.constant(l8.get('SUN_ELEVATION'));
//Sun azimuth
var SunAz_OLI = ee.Image.constant(l8.get('SUN_AZIMUTH'));
//Satellite zenith
var SatZe_OLI = ee.Image(0.0)
var cosdSatZe_OLI = (SatZe_OLI).multiply(pi.divide(ee.Image(180))).cos();
var sindSatZe_OLI = (SatZe_OLI).multiply(pi.divide(ee.Image(180))).sin();
//Satellite azimuth
var SatAz_OLI = ee.Image(0.0)
//Sun zenith
var SunZe_OLI = ee.Image(90).subtract(SunEl_OLI)
var cosdSunZe_OLI = SunZe_OLI.multiply(pi.divide(ee.Image.constant(180))).cos(); // in degrees
var sindSunZe_OLI = SunZe_OLI.multiply(pi.divide(ee.Image(180))).sin(); // in degrees
//Relative azimuth
var RelAz_OLI = ee.Image(SunAz_OLI);
var cosdRelAz_OLI = RelAz_OLI.multiply(pi.divide(ee.Image(180))).cos();
//Pressure calculation
var P_OLI = ee.Image(101325).multiply(ee.Image(1).subtract(ee.Image(0.0000225577).multiply(DEM_OLI)).pow(5.25588)).multiply(0.01);
var Po_OLI = ee.Image(1013.25);
// Radiometric Calibration //
//define bands to be converted to radiance
var bands_OLI = ['B1','B2','B3','B4','B5','B6','B7'];
// radiance_mult_bands
var rad_mult_OLI = ee.Image(ee.Array([ee.Image(l8.get('RADIANCE_MULT_BAND_1')),
ee.Image(l8.get('RADIANCE_MULT_BAND_2')),
ee.Image(l8.get('RADIANCE_MULT_BAND_3')),
ee.Image(l8.get('RADIANCE_MULT_BAND_4')),
ee.Image(l8.get('RADIANCE_MULT_BAND_5')),
ee.Image(l8.get('RADIANCE_MULT_BAND_6')),
ee.Image(l8.get('RADIANCE_MULT_BAND_7'))]
)).toArray(1);
// radiance add band
var rad_add_OLI = ee.Image(ee.Array([ee.Image(l8.get('RADIANCE_ADD_BAND_1')),
ee.Image(l8.get('RADIANCE_ADD_BAND_2')),
ee.Image(l8.get('RADIANCE_ADD_BAND_3')),
ee.Image(l8.get('RADIANCE_ADD_BAND_4')),
ee.Image(l8.get('RADIANCE_ADD_BAND_5')),
ee.Image(l8.get('RADIANCE_ADD_BAND_6')),
ee.Image(l8.get('RADIANCE_ADD_BAND_7'))]
)).toArray(1);
//create an empty image to save new radiance bands to
var imgArr_OLI = l8.select(bands_OLI).toArray().toArray(1);
var Ltoa_OLI = imgArr_OLI.multiply(rad_mult_OLI).add(rad_add_OLI)
// esun
var ESUN_OLI = ee.Image.constant(197.24790954589844)
.addBands(ee.Image.constant(201.98426818847656))
.addBands(ee.Image.constant(186.12677001953125))
.addBands(ee.Image.constant(156.95257568359375))
.addBands(ee.Image.constant(96.04714965820312))
.addBands(ee.Image.constant(23.8833221450863))
.addBands(ee.Image.constant(8.04995873449635)).toArray().toArray(1);
ESUN_OLI = ESUN_OLI.multiply(ee.Image(1))
var ESUNImg_OLI = ESUN_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);
// Ozone Correction //
// Ozone coefficients
var koz_OLI = ee.Image.constant(0.0039).addBands(ee.Image.constant(0.0218))
.addBands(ee.Image.constant(0.1078))
.addBands(ee.Image.constant(0.0608))
.addBands(ee.Image.constant(0.0019))
.addBands(ee.Image.constant(0))
.addBands(ee.Image.constant(0))
.toArray().toArray(1);
// Calculate ozone optical thickness
var Toz_OLI = koz_OLI.multiply(DU_OLI).divide(ee.Image.constant(1000));
// Calculate TOA radiance in the absense of ozone
var Lt_OLI = Ltoa_OLI.multiply(((Toz_OLI)).multiply((ee.Image.constant(1).divide(cosdSunZe_OLI)).add(ee.Image.constant(1).divide(cosdSatZe_OLI))).exp());
// Rayleigh optical thickness
var bandCenter_OLI = ee.Image(443).divide(1000).addBands(ee.Image(483).divide(1000))
.addBands(ee.Image(561).divide(1000))
.addBands(ee.Image(655).divide(1000))
.addBands(ee.Image(865).divide(1000))
.addBands(ee.Image(1609).divide(1000))
.addBands(ee.Number(2201).divide(1000))
.toArray().toArray(1);
// create an empty image to save new Tr values to
var Tr_OLI = (P_OLI.divide(Po_OLI)).multiply(ee.Image(0.008569).multiply(bandCenter_OLI.pow(-4))).multiply((ee.Image(1).add(ee.Image(0.0113).multiply(bandCenter_OLI.pow(-2))).add(ee.Image(0.00013).multiply(bandCenter_OLI.pow(-4)))));
// Fresnel Reflection //
// Specular reflection (s- and p- polarization states)
var theta_V_OLI = ee.Image(0.0000000001);
var sin_theta_j_OLI = sindSunZe_OLI.divide(ee.Image(1.333));
var theta_j_OLI = sin_theta_j_OLI.asin().multiply(ee.Image(180).divide(pi));
var theta_SZ_OLI = SunZe_OLI;
var R_theta_SZ_s_OLI = (((theta_SZ_OLI.multiply(pi.divide(ee.Image(180)))).subtract(theta_j_OLI.multiply(pi.divide(ee.Image(180))))).sin().pow(2)).divide((((theta_SZ_OLI.multiply(pi.divide(ee.Image(180)))).add(theta_j_OLI.multiply(pi.divide(ee.Image(180))))).sin().pow(2)));
var R_theta_V_s_OLI = ee.Image(0.0000000001);
var R_theta_SZ_p_OLI = (((theta_SZ_OLI.multiply(pi.divide(180))).subtract(theta_j_OLI.multiply(pi.divide(180)))).tan().pow(2)).divide((((theta_SZ_OLI.multiply(pi.divide(180))).add(theta_j_OLI.multiply(pi.divide(180)))).tan().pow(2)));
var R_theta_V_p_OLI = ee.Image(0.0000000001);
var R_theta_SZ_OLI = ee.Image(0.5).multiply(R_theta_SZ_s_OLI.add(R_theta_SZ_p_OLI));
var R_theta_V_OLI = ee.Image(0.5).multiply(R_theta_V_s_OLI.add(R_theta_V_p_OLI));
// Rayleigh scattering phase function //
// Sun-sensor geometry
var theta_neg_OLI = ((cosdSunZe_OLI.multiply(ee.Image(-1))).multiply(cosdSatZe_OLI)).subtract((sindSunZe_OLI).multiply(sindSatZe_OLI).multiply(cosdRelAz_OLI));
var theta_neg_inv_OLI = theta_neg_OLI.acos().multiply(ee.Image(180).divide(pi));
var theta_pos_OLI = (cosdSunZe_OLI.multiply(cosdSatZe_OLI)).subtract(sindSunZe_OLI.multiply(sindSatZe_OLI).multiply(cosdRelAz_OLI));
var theta_pos_inv_OLI = theta_pos_OLI.acos().multiply(ee.Image(180).divide(pi));
var cosd_tni_OLI = theta_neg_inv_OLI.multiply(pi.divide(180)).cos(); // in degrees
var cosd_tpi_OLI = theta_pos_inv_OLI.multiply(pi.divide(180)).cos(); // in degrees
var Pr_neg_OLI = ee.Image(0.75).multiply((ee.Image(1).add(cosd_tni_OLI.pow(2))));
var Pr_pos_OLI = ee.Image(0.75).multiply((ee.Image(1).add(cosd_tpi_OLI.pow(2))));
// Rayleigh scattering phase function
var Pr_OLI = Pr_neg_OLI.add((R_theta_SZ_OLI.add(R_theta_V_OLI)).multiply(Pr_pos_OLI));
// Calulate Lr,
var denom_OLI = ee.Image(4).multiply(pi).multiply(cosdSatZe_OLI);
var Lr_OLI = (ESUN_OLI.multiply(Tr_OLI)).multiply(Pr_OLI.divide(denom_OLI));
// Rayleigh corrected radiance
var Lrc_OLI = (Lt_OLI.divide(ee.Image(10))).subtract(Lr_OLI);
var LrcImg_OLI = Lrc_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);
// Rayleigh corrected reflectance
var prc_OLI = Lrc_OLI.multiply(pi).multiply(d_OLI.pow(2)).divide(ESUN_OLI.multiply(cosdSunZe_OLI));
var prcImg_OLI = prc_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);
// Aerosol Correction //
// Bands in nm
var bands_nm_OLI = ee.Image(443).addBands(ee.Image(483))
.addBands(ee.Image(561))
.addBands(ee.Image(655))
.addBands(ee.Image(865))
.addBands(ee.Image(0))
.addBands(ee.Image(0))
.toArray().toArray(1);
// Lam in SWIR bands
var Lam_6_OLI = LrcImg_OLI.select('B6')
var Lam_7_OLI = LrcImg_OLI.select('B7')
// Calculate aerosol type
var eps_OLI = (((((Lam_7_OLI).divide(ESUNImg_OLI.select('B7'))).log()).subtract(((Lam_6_OLI).divide(ESUNImg_OLI.select('B6'))).log())).divide(ee.Image(2201).subtract(ee.Image(1609)))).multiply(mask)
// Calculate multiple scattering of aerosols for each band
var Lam_OLI = (Lam_7_OLI).multiply(((ESUN_OLI).divide(ESUNImg_OLI.select('B7')))).multiply((eps_OLI.multiply(ee.Image(-1))).multiply((bands_nm_OLI.divide(ee.Image(2201)))).exp());
// diffuse transmittance
var trans_OLI = Tr_OLI.multiply(ee.Image(-1)).divide(ee.Image(2)).multiply(ee.Image(1).divide(cosdSatZe_OLI)).exp();
// Compute water-leaving radiance
var Lw_OLI = Lrc_OLI.subtract(Lam_OLI).divide(trans_OLI);
// water-leaving reflectance
var pw_OLI = (Lw_OLI.multiply(pi).multiply(d_OLI.pow(2)).divide(ESUN_OLI.multiply(cosdSunZe_OLI)));
var pwImg_OLI = pw_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);
// Rrs
var Rrs = (pw_OLI.divide(pi).arrayProject([0]).arrayFlatten([bands_OLI]).slice(0,5));
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Models //
// Surface water temperature
var TIRS_1 = l8.select('B10');
var b10_add_band = ee.Number(TIRS_1.get('RADIANCE_ADD_BAND_10'));
var b10_mult_band = ee.Number(TIRS_1.get('RADIANCE_MULT_BAND_10'));
var Oi = ee.Number(0.29);
var TIRS_cal = (TIRS_1.multiply(b10_mult_band).add(b10_add_band).subtract(Oi)); //.multiply(lakes);
var K1_b10 = ee.Number(TIRS_1.get('K1_CONSTANT_BAND_10'));
var K2_b10 = ee.Number(TIRS_1.get('K2_CONSTANT_BAND_10'));
var LST = ((ee.Image(K2_b10).divide(((ee.Image(K1_b10).divide(ee.Image(TIRS_cal))).add(ee.Image(1))).log())).subtract(ee.Image(273))).multiply(mask); // Celsius
LST = (ee.Image(0.7745).multiply(LST)).add(ee.Image(9.6502)); // calibration R2 = 0.8599
// chlor_a
// Chlorophyll-a OC3
var a0 = ee.Image(0.2412);
var a1 = ee.Image(-2.0546);
var a2 = ee.Image(1.1776);
var a3 = ee.Image(-0.5538);
var a4 = ee.Image(-0.4570);
var log_BG = (Rrs.select('B1').divide(Rrs.select('B3'))).log10();
var a1a = a1.multiply(log_BG.pow(1));
var a2a = a2.multiply(log_BG.pow(2));
var a3a = a3.multiply(log_BG.pow(3));
var a4a = a4.multiply(log_BG.pow(4));
var sum = a1a.add(a2a).add(a3a).add(a4a);
var log10_chlor_a = a0.add(sum);
var chlor_a = ee.Image(10).pow(log10_chlor_a);
var chlor_a_cal = ee.Image(4.0752).multiply(chlor_a).subtract(ee.Image(3.9617));
// SD
var ln_BlueRed = (Rrs.select('B2').divide(Rrs.select('B4'))).log()
var lnMOSD = (ee.Image(1.4856).multiply(ln_BlueRed)).add(ee.Image(0.2734)); // R2 = 0.8748 with in-situ
var MOSD = ee.Image(10).pow(lnMOSD); // log space to (m)
var SD = (ee.Image(0.1777).multiply(MOSD)).add(ee.Image(1.0813));
// tsi
var TSI_c = ee.Image(30.6).add(ee.Image(9.81)).multiply(chlor_a_cal.log())
var TSI_s = ee.Image(60.0).subtract(ee.Image(14.41)).multiply(SD.log())
var TSI = (TSI_c.add(TSI_s)).divide(ee.Image(2));
// Reclassify TSI
// Create conditions
var mask1 = TSI.lt(30); // (1)
var mask2 = TSI.gte(30).and(TSI.lt(40));// (2)
var mask3 = TSI.gte(40).and(TSI.lt(50)); // (3)
var mask4 = TSI.gte(50).and(TSI.lt(60)); // (4)
var mask5 = TSI.gte(60).and(TSI.lt(70)); // (5)
var mask6 = TSI.gte(70).and(TSI.lt(80)); // (6)
var mask7 = TSI.gte(80); // (7)
// Reclassify conditions into new values
var img1 = TSI.where(mask1.eq(1), 1).mask(mask1);
var img2 = TSI.where(mask2.eq(1), 2).mask(mask2);
var img3 = TSI.where(mask3.eq(1), 3).mask(mask3);
var img4 = TSI.where(mask4.eq(1), 4).mask(mask4);
var img5 = TSI.where(mask5.eq(1), 5).mask(mask5);
var img6 = TSI.where(mask6.eq(1), 6).mask(mask6);
var img7 = TSI.where(mask7.eq(1), 7).mask(mask7);
// Ouput of reclassified image
var TSI_R = img1.unmask(img2).unmask(img3).unmask(img4).unmask(img5).unmask(img6).unmask(img7);
// Map Layers
Map.addLayer(footprint, {}, 'footprint')
Map.addLayer(l8.multiply(mask), {bands: ['B4', 'B3', 'B2'], min: 0, max: 15000}, 'rgb', false) // rgb
Map.addLayer(LST, {min: 20, max: 30, palette: ['darkblue', 'blue', 'white', 'red', 'darkred']}, 'LST', false)
Map.addLayer(chlor_a_cal, {min: 0, max: 80, palette: ['blue', 'cyan', 'limegreen', 'yellow', 'orange' , 'darkred']}, 'chlor_a', false)
Map.addLayer(SD, {min: 0, max: 3, palette: ['darkred', 'orange', 'yellow', 'limegreen', 'cyan', 'blue']}, 'SD', false)
Map.addLayer(TSI, {min: 30, max: 70, palette: ['blue', 'cyan', 'limegreen', 'yellow', 'orange' , 'darkred']}, 'TSI', false)
Map.addLayer(TSI_R, {min: 1, max: 7, palette: ['purple', 'blue', 'limegreen', 'yellow', 'orange', 'orangered', 'darkred']}, 'TSI_R', true)
Map.centerObject(footprint, 7)
// EXPORT IMAGES //
// Export LST
Export.image.toDrive({
image: LST,
description: 'LST',
scale: 30,
region: footprint
});
// Export chlor_a
Export.image.toDrive({
image: chlor_a,
description: 'chlor_a',
scale: 30,
region: footprint
});
// Export SD
Export.image.toDrive({
image: SD,
description: 'SD',
scale: 30,
region: footprint
});
// Export TSI
Export.image.toDrive({
image: TSI,
description: 'TSI',
scale: 30,
region: footprint
});
// Export TSI_R
Export.image.toDrive({
image: TSI_R,
description: 'TSI_R',
scale: 30,
region: footprint
});

YOU CAN USE THE LAST CODE I SENT. THANK YOU VERY MUCH

almost there, give me a few more minutes, i am down to two errors, which i am debugging

Here is the code that gets you past the original errors.  The only issue left is that it needs to have the date ranges for the operations.
// This script processes a single Landsat 8 image of interest.
// WQ parameters such chlor-a, secchi depth, trophic state index are calculated
// How to use:
// (1) If a "geometry" variable exists in the imports window, delete it.
// (2) Within the map, select the point button near the top left side.
// (3) Create a new point by clicking on a location of interest.
// (4) Adjust the time frame you wish to browse by adding here:
// begin date
var iniDate = '2017-09-11';
// end date
var endDate = '2017-09-11';
// (5) Adjust a cloud % threshold here:
var oliCloudPerc = 30
// (6) Click Run
// (7) The "available imagery" ImageCollection within the console displays all available imagery. If you wish to investigate a single
// image from this collection, find the FILE_ID within the features and copy and paste it here:
var l8 = ee.Image('LANDSAT/LC08/C02/T1/LC08_177033_20171109');
// (8) Click "Run"
// (9) Export each image by clicking on the run button within the "tasks" tab.

// Author: Benjamin Page //
// Citations:
// Page, B.P. and Mishra, D.R., 2018. A modified atmospheric correction when coupling sentinel-2 and landsat-8 for inland water quality monitoring, In Review

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Import Collections //

// landsat 8 raw dn
var OLI_DN = ee.ImageCollection('LANDSAT/LC08/C02/T1');

// landsat-8 surface reflactance product (for masking purposes)
var SRP = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2');

// toms / omi
var ozone = ee.ImageCollection('TOMS/MERGED');

var FC_OLI = OLI_DN.filterDate(iniDate, endDate).filterBounds(geometry).filterMetadata('CLOUD_COVER', "less_than", oliCloudPerc);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Filtering Collection and Masking //

var pi = ee.Image(3.141592);

// water mask
var startMonth = 5;
var endMonth = 9;
var startYear = 2013;
var endYear = 2017;

var footprint = l8.geometry()

geometry = footprint

var forMask = SRP.filterBounds(geometry).select('SR_B6').filterMetadata('CLOUD_COVER', "less_than", 10).filter(ee.Filter.calendarRange(startMonth, endMonth, 'month')).filter(ee.Filter.calendarRange(startYear, endYear, 'year'));
var mask = ee.Image(forMask.select('SR_B6').median().lt(600))
mask = mask.updateMask(mask)

// filter landsat 8 collection
print(FC_OLI, 'Available Imagery')

print(l8, 'l8 image info')

// oli image date
var oliDate = l8.date();
print(oliDate, 'l8 Date')

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// single OLI image ATMOSPHERIC CORRECTION //

// dem
var DEM_OLI = ee.Image('USGS/SRTMGL1_003').clip(footprint);

// ozone
var DU_OLI = ee.Image(ozone.filterDate(iniDate,endDate).filterBounds(footprint).mean());

//Julian Day
var imgDate_OLI = ee.Date(l8.get('system:time_start'));
var FOY_OLI = ee.Date.fromYMD(imgDate_OLI.get('year'),1,1);
var JD_OLI = imgDate_OLI.difference(FOY_OLI,'day').int().add(1);

// Earth-Sun distance
var d_OLI = ee.Image.constant(l8.get('EARTH_SUN_DISTANCE'));

//Sun elevation
var SunEl_OLI = ee.Image.constant(l8.get('SUN_ELEVATION'));

//Sun azimuth
var SunAz_OLI = ee.Image.constant(l8.get('SUN_AZIMUTH'));

//Satellite zenith
var SatZe_OLI = ee.Image(0.0)
var cosdSatZe_OLI = (SatZe_OLI).multiply(pi.divide(ee.Image(180))).cos();
var sindSatZe_OLI = (SatZe_OLI).multiply(pi.divide(ee.Image(180))).sin();

//Satellite azimuth
var SatAz_OLI = ee.Image(0.0)

//Sun zenith
var SunZe_OLI = ee.Image(90).subtract(SunEl_OLI)
var cosdSunZe_OLI = SunZe_OLI.multiply(pi.divide(ee.Image.constant(180))).cos(); // in degrees
var sindSunZe_OLI = SunZe_OLI.multiply(pi.divide(ee.Image(180))).sin(); // in degrees

//Relative azimuth
var RelAz_OLI = ee.Image(SunAz_OLI);
var cosdRelAz_OLI = RelAz_OLI.multiply(pi.divide(ee.Image(180))).cos();

//Pressure calculation
var P_OLI = ee.Image(101325).multiply(ee.Image(1).subtract(ee.Image(0.0000225577).multiply(DEM_OLI)).pow(5.25588)).multiply(0.01);
var Po_OLI = ee.Image(1013.25);

// Radiometric Calibration //
//define bands to be converted to radiance
var bands_OLI = ['B1','B2','B3','B4','B5','B6','B7'];

// radiance_mult_bands
var rad_mult_OLI = ee.Image(ee.Array([ee.Image(l8.get('RADIANCE_MULT_BAND_1')),
ee.Image(l8.get('RADIANCE_MULT_BAND_2')),
ee.Image(l8.get('RADIANCE_MULT_BAND_3')),
ee.Image(l8.get('RADIANCE_MULT_BAND_4')),
ee.Image(l8.get('RADIANCE_MULT_BAND_5')),
ee.Image(l8.get('RADIANCE_MULT_BAND_6')),
ee.Image(l8.get('RADIANCE_MULT_BAND_7'))]
)).toArray(1);

// radiance add band
var rad_add_OLI = ee.Image(ee.Array([ee.Image(l8.get('RADIANCE_ADD_BAND_1')),
ee.Image(l8.get('RADIANCE_ADD_BAND_2')),
ee.Image(l8.get('RADIANCE_ADD_BAND_3')),
ee.Image(l8.get('RADIANCE_ADD_BAND_4')),
ee.Image(l8.get('RADIANCE_ADD_BAND_5')),
ee.Image(l8.get('RADIANCE_ADD_BAND_6')),
ee.Image(l8.get('RADIANCE_ADD_BAND_7'))]
)).toArray(1);

//create an empty image to save new radiance bands to
var imgArr_OLI = l8.select(bands_OLI).toArray().toArray(1);
var Ltoa_OLI = imgArr_OLI.multiply(rad_mult_OLI).add(rad_add_OLI)

// esun
var ESUN_OLI = ee.Image.constant(197.24790954589844)
.addBands(ee.Image.constant(201.98426818847656))
.addBands(ee.Image.constant(186.12677001953125))
.addBands(ee.Image.constant(156.95257568359375))
.addBands(ee.Image.constant(96.04714965820312))
.addBands(ee.Image.constant(23.8833221450863))
.addBands(ee.Image.constant(8.04995873449635)).toArray().toArray(1);
ESUN_OLI = ESUN_OLI.multiply(ee.Image(1))

var ESUNImg_OLI = ESUN_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);

// Ozone Correction //
// Ozone coefficients
var koz_OLI = ee.Image.constant(0.0039).addBands(ee.Image.constant(0.0218))
.addBands(ee.Image.constant(0.1078))
.addBands(ee.Image.constant(0.0608))
.addBands(ee.Image.constant(0.0019))
.addBands(ee.Image.constant(0))
.addBands(ee.Image.constant(0))
.toArray().toArray(1);

// Calculate ozone optical thickness
var Toz_OLI = koz_OLI.multiply(DU_OLI).divide(ee.Image.constant(1000));

// Calculate TOA radiance in the absense of ozone
var Lt_OLI = Ltoa_OLI.multiply(((Toz_OLI)).multiply((ee.Image.constant(1).divide(cosdSunZe_OLI)).add(ee.Image.constant(1).divide(cosdSatZe_OLI))).exp());

// Rayleigh optical thickness
var bandCenter_OLI = ee.Image(443).divide(1000).addBands(ee.Image(483).divide(1000))
.addBands(ee.Image(561).divide(1000))
.addBands(ee.Image(655).divide(1000))
.addBands(ee.Image(865).divide(1000))
.addBands(ee.Image(1609).divide(1000))
.addBands(ee.Number(2201).divide(1000))
.toArray().toArray(1);

// create an empty image to save new Tr values to
var Tr_OLI = (P_OLI.divide(Po_OLI)).multiply(ee.Image(0.008569).multiply(bandCenter_OLI.pow(-4))).multiply((ee.Image(1).add(ee.Image(0.0113).multiply(bandCenter_OLI.pow(-2))).add(ee.Image(0.00013).multiply(bandCenter_OLI.pow(-4)))));

// Fresnel Reflection //
// Specular reflection (s- and p- polarization states)
var theta_V_OLI = ee.Image(0.0000000001);
var sin_theta_j_OLI = sindSunZe_OLI.divide(ee.Image(1.333));

var theta_j_OLI = sin_theta_j_OLI.asin().multiply(ee.Image(180).divide(pi));

var theta_SZ_OLI = SunZe_OLI;

var R_theta_SZ_s_OLI = (((theta_SZ_OLI.multiply(pi.divide(ee.Image(180)))).subtract(theta_j_OLI.multiply(pi.divide(ee.Image(180))))).sin().pow(2)).divide((((theta_SZ_OLI.multiply(pi.divide(ee.Image(180)))).add(theta_j_OLI.multiply(pi.divide(ee.Image(180))))).sin().pow(2)));

var R_theta_V_s_OLI = ee.Image(0.0000000001);

var R_theta_SZ_p_OLI = (((theta_SZ_OLI.multiply(pi.divide(180))).subtract(theta_j_OLI.multiply(pi.divide(180)))).tan().pow(2)).divide((((theta_SZ_OLI.multiply(pi.divide(180))).add(theta_j_OLI.multiply(pi.divide(180)))).tan().pow(2)));

var R_theta_V_p_OLI = ee.Image(0.0000000001);

var R_theta_SZ_OLI = ee.Image(0.5).multiply(R_theta_SZ_s_OLI.add(R_theta_SZ_p_OLI));

var R_theta_V_OLI = ee.Image(0.5).multiply(R_theta_V_s_OLI.add(R_theta_V_p_OLI));

// Rayleigh scattering phase function //
// Sun-sensor geometry
var theta_neg_OLI = ((cosdSunZe_OLI.multiply(ee.Image(-1))).multiply(cosdSatZe_OLI)).subtract((sindSunZe_OLI).multiply(sindSatZe_OLI).multiply(cosdRelAz_OLI));

var theta_neg_inv_OLI = theta_neg_OLI.acos().multiply(ee.Image(180).divide(pi));

var theta_pos_OLI = (cosdSunZe_OLI.multiply(cosdSatZe_OLI)).subtract(sindSunZe_OLI.multiply(sindSatZe_OLI).multiply(cosdRelAz_OLI));

var theta_pos_inv_OLI = theta_pos_OLI.acos().multiply(ee.Image(180).divide(pi));

var cosd_tni_OLI = theta_neg_inv_OLI.multiply(pi.divide(180)).cos(); // in degrees

var cosd_tpi_OLI = theta_pos_inv_OLI.multiply(pi.divide(180)).cos(); // in degrees

var Pr_neg_OLI = ee.Image(0.75).multiply((ee.Image(1).add(cosd_tni_OLI.pow(2))));

var Pr_pos_OLI = ee.Image(0.75).multiply((ee.Image(1).add(cosd_tpi_OLI.pow(2))));

// Rayleigh scattering phase function
var Pr_OLI = Pr_neg_OLI.add((R_theta_SZ_OLI.add(R_theta_V_OLI)).multiply(Pr_pos_OLI));

// Calulate Lr,
var denom_OLI = ee.Image(4).multiply(pi).multiply(cosdSatZe_OLI);
var Lr_OLI = (ESUN_OLI.multiply(Tr_OLI)).multiply(Pr_OLI.divide(denom_OLI));

// Rayleigh corrected radiance
var Lrc_OLI = (Lt_OLI.divide(ee.Image(10))).subtract(Lr_OLI);

var LrcImg_OLI = Lrc_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);

// Rayleigh corrected reflectance
var prc_OLI = Lrc_OLI.multiply(pi).multiply(d_OLI.pow(2)).divide(ESUN_OLI.multiply(cosdSunZe_OLI));

var prcImg_OLI = prc_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);

// Aerosol Correction //
// Bands in nm
var bands_nm_OLI = ee.Image(443).addBands(ee.Image(483))
.addBands(ee.Image(561))
.addBands(ee.Image(655))
.addBands(ee.Image(865))
.addBands(ee.Image(0))
.addBands(ee.Image(0))
.toArray().toArray(1);

// Lam in SWIR bands
var Lam_6_OLI = LrcImg_OLI.select('B6')
var Lam_7_OLI = LrcImg_OLI.select('B7')

// Calculate aerosol type
var eps_OLI = (((((Lam_7_OLI).divide(ESUNImg_OLI.select('B7'))).log()).subtract(((Lam_6_OLI).divide(ESUNImg_OLI.select('B6'))).log())).divide(ee.Image(2201).subtract(ee.Image(1609)))).multiply(mask)

// Calculate multiple scattering of aerosols for each band
var Lam_OLI = (Lam_7_OLI).multiply(((ESUN_OLI).divide(ESUNImg_OLI.select('B7')))).multiply((eps_OLI.multiply(ee.Image(-1))).multiply((bands_nm_OLI.divide(ee.Image(2201)))).exp());

// diffuse transmittance
var trans_OLI = Tr_OLI.multiply(ee.Image(-1)).divide(ee.Image(2)).multiply(ee.Image(1).divide(cosdSatZe_OLI)).exp();

// Compute water-leaving radiance
var Lw_OLI = Lrc_OLI.subtract(Lam_OLI).divide(trans_OLI);

// water-leaving reflectance
var pw_OLI = (Lw_OLI.multiply(pi).multiply(d_OLI.pow(2)).divide(ESUN_OLI.multiply(cosdSunZe_OLI)));

var pwImg_OLI = pw_OLI.arrayProject([0]).arrayFlatten([bands_OLI]);

// Rrs
var Rrs = (pw_OLI.divide(pi).arrayProject([0]).arrayFlatten([bands_OLI]).slice(0,5));

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Models //

// Surface water temperature
var TIRS_1 = l8.select('B10');

var b10_add_band = ee.Number(TIRS_1.get('RADIANCE_ADD_BAND_10'));
var b10_mult_band = ee.Number(TIRS_1.get('RADIANCE_MULT_BAND_10'));

var Oi = ee.Number(0.29);

var TIRS_cal = (TIRS_1.multiply(b10_mult_band).add(b10_add_band).subtract(Oi)); //.multiply(lakes);

var K1_b10 = ee.Number(TIRS_1.get('K1_CONSTANT_BAND_10'));
var K2_b10 = ee.Number(TIRS_1.get('K2_CONSTANT_BAND_10'));

var LST = ((ee.Image(K2_b10).divide(((ee.Image(K1_b10).divide(ee.Image(TIRS_cal))).add(ee.Image(1))).log())).subtract(ee.Image(273))).multiply(mask); // Celsius
LST = (ee.Image(0.7745).multiply(LST)).add(ee.Image(9.6502)); // calibration R2 = 0.8599

// chlor_a
// Chlorophyll-a OC3
var a0 = ee.Image(0.2412);
var a1 = ee.Image(-2.0546);
var a2 = ee.Image(1.1776);
var a3 = ee.Image(-0.5538);
var a4 = ee.Image(-0.4570);

var log_BG = (Rrs.select('B1').divide(Rrs.select('B3'))).log10();

var a1a = a1.multiply(log_BG.pow(1));
var a2a = a2.multiply(log_BG.pow(2));
var a3a = a3.multiply(log_BG.pow(3));
var a4a = a4.multiply(log_BG.pow(4));

var sum = a1a.add(a2a).add(a3a).add(a4a);

var log10_chlor_a = a0.add(sum);

var chlor_a = ee.Image(10).pow(log10_chlor_a);
var chlor_a_cal = ee.Image(4.0752).multiply(chlor_a).subtract(ee.Image(3.9617));

// SD
var ln_BlueRed = (Rrs.select('B2').divide(Rrs.select('B4'))).log()
var lnMOSD = (ee.Image(1.4856).multiply(ln_BlueRed)).add(ee.Image(0.2734)); // R2 = 0.8748 with in-situ
var MOSD = ee.Image(10).pow(lnMOSD); // log space to (m)
var SD = (ee.Image(0.1777).multiply(MOSD)).add(ee.Image(1.0813));

// tsi
var TSI_c = ee.Image(30.6).add(ee.Image(9.81)).multiply(chlor_a_cal.log())
var TSI_s = ee.Image(60.0).subtract(ee.Image(14.41)).multiply(SD.log())
var TSI = (TSI_c.add(TSI_s)).divide(ee.Image(2));

// Reclassify TSI

// Create conditions
var mask1 = TSI.lt(30); // (1)
var mask2 = TSI.gte(30).and(TSI.lt(40));// (2)
var mask3 = TSI.gte(40).and(TSI.lt(50)); // (3)
var mask4 = TSI.gte(50).and(TSI.lt(60)); // (4)
var mask5 = TSI.gte(60).and(TSI.lt(70)); // (5)
var mask6 = TSI.gte(70).and(TSI.lt(80)); // (6)
var mask7 = TSI.gte(80); // (7)

// Reclassify conditions into new values
var img1 = TSI.where(mask1.eq(1), 1).mask(mask1);
var img2 = TSI.where(mask2.eq(1), 2).mask(mask2);
var img3 = TSI.where(mask3.eq(1), 3).mask(mask3);
var img4 = TSI.where(mask4.eq(1), 4).mask(mask4);
var img5 = TSI.where(mask5.eq(1), 5).mask(mask5);
var img6 = TSI.where(mask6.eq(1), 6).mask(mask6);
var img7 = TSI.where(mask7.eq(1), 7).mask(mask7);

// Ouput of reclassified image
var TSI_R = img1.unmask(img2).unmask(img3).unmask(img4).unmask(img5).unmask(img6).unmask(img7);

// Map Layers
Map.addLayer(footprint, {}, 'footprint')
Map.addLayer(l8.multiply(mask), {bands: ['B4', 'B3', 'B2'], min: 0, max: 15000}, 'rgb', false) // rgb
Map.addLayer(LST, {min: 20, max: 30, palette: ['darkblue', 'blue', 'white', 'red', 'darkred']}, 'LST', false)
Map.addLayer(chlor_a_cal, {min: 0, max: 80, palette: ['blue', 'cyan', 'limegreen', 'yellow', 'orange' , 'darkred']}, 'chlor_a', false)
Map.addLayer(SD, {min: 0, max: 3, palette: ['darkred', 'orange', 'yellow', 'limegreen', 'cyan', 'blue']}, 'SD', false)
Map.addLayer(TSI, {min: 30, max: 70, palette: ['blue', 'cyan', 'limegreen', 'yellow', 'orange' , 'darkred']}, 'TSI', false)
Map.addLayer(TSI_R, {min: 1, max: 7, palette: ['purple', 'blue', 'limegreen', 'yellow', 'orange', 'orangered', 'darkred']}, 'TSI_R', true)
Map.centerObject(footprint, 7)

// EXPORT IMAGES //

// Export LST
Export.image.toDrive({
image: LST,
description: 'LST',
scale: 30,
region: footprint
});

// Export chlor_a
Export.image.toDrive({
image: chlor_a,
description: 'chlor_a',
scale: 30,
region: footprint
});

// Export SD
Export.image.toDrive({
image: SD,
description: 'SD',
scale: 30,
region: footprint
});

// Export TSI
Export.image.toDrive({
image: TSI,
description: 'TSI',
scale: 30,
region: footprint
});

// Export TSI_R
Export.image.toDrive({
image: TSI_R,
description: 'TSI_R',
scale: 30,
region: footprint
});

I AM GRATEFUL TO YOU. THANK YOU VERY MUCH. FOR YOUR SUPPORT OF SCIENTIFIC STUDY. YOU MADE ME VERY HAPPY.

I am getting this error. Do you have any idea about this?

repo: SERVIR/water-quality-gee


text:
Better error when service connect is called with an undefined service name

Current behavior:
$ cci service connect foo
Checking the version!
An update to CumulusCI is available. Use pip install --upgrade cumulusci to update.
Traceback (most recent call last):
  File "/Users/dglick/.pyenv/versions/cci-dev-py27/bin/cci", line 11, in <module>
    load_entry_point('cumulusci', 'console_scripts', 'cci')()
  File "/Users/dglick/.pyenv/versions/2.7.15/envs/cci-dev-py27/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/dglick/.pyenv/versions/2.7.15/envs/cci-dev-py27/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/dglick/.pyenv/versions/2.7.15/envs/cci-dev-py27/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/dglick/.pyenv/versions/2.7.15/envs/cci-dev-py27/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/dglick/.pyenv/versions/2.7.15/envs/cci-dev-py27/lib/python2.7/site-packages/click/core.py", line 1061, in invoke
    cmd_name, cmd, args = self.resolve_command(ctx, args)
  File "/Users/dglick/.pyenv/versions/2.7.15/envs/cci-dev-py27/lib/python2.7/site-packages/click/core.py", line 1100, in resolve_command
    cmd = self.get_command(ctx, cmd_name)
  File "/Users/dglick/Work/CumulusCI/cumulusci/cli/cci.py", line 574, in get_command
    config.project_config, "services__{0}__attributes".format(name)
AttributeError: 'NoneType' object has no attribute 'items'

**lurch: add

@ceiroa I think what we want to do in this situation is raise ServiceNotValid (from cumulusci.core.exceptions) with a more helpful message.

source: gharchive/issue

repo: SFDO-Tooling/CumulusCI

license_type: permissive

license_source: github-api


text:
implemented Event::FilesDropped for Windows

Disclaimer : this feature is not ready to be merged yet
Related forum thread: https://en.sfml-dev.org/forums/index.php?topic=19096
I have implemented this feature for personal use. I write simple map editors and other small tools with the aid of SFML because I don't want to bring out the big guns like Qt. For something like a map editor, the drag and drop functionality is very handy, especially for textures and materials.
As can be seen in the linked forum thread, I am not the only one wanting this feature. Therefore, I went ahead and created a pull request. This feature is not complete yet but it already works on Windows. I figured that once I take the first step maybe others are more inclined to chime in and collaborate.
Progress:

[x] Modify sf::Event to store the relevant information
[x] Implement interface in sf::Window (see setFileDroppingEnabled)
[x] Implement backend for Windows
[ ] Implement backend for *nix
[ ] Implement backend for OSX
[x] Add an example or another kind of test

Issues:

sf::Event::FileDropEvent is inevitably part of a union, so I couldn't use a vector but had to resort to a raw pointer. Personally, I think this is not a big deal because the usage is still very straight forward:
for (int i=0; i<event.droppedFiles.count; ++i) event.droppedFiles.files[i];
But maybe there's a better solution?
As sf::Event::FileDropEvent only stores pointers but not the filenames themselves, their lifetime is bound to the window, not to the event. Is there any case in which this window-specific buffer can cause trouble?
Am I right in assuming that WindowImplWin32::processEvent doesn't need to be thread-safe? Otherwise the aforementioned buffer would need to be protected by a mutex, ensuring that no concurrent accesses are possible.

Unfortunately, I'm not versed well enough in X11 to implement this feature for Linux, but I have found this which might be handy for anyone wanting to implement this feature.

Question: do Windows/Linux support drag operation for other kinds of data (e.g. text, image, ...)? Mac does, that's why I'm asking. It actually works like a clipboard for that. So, like in #1221, we can start by only supporting one kind of data (i.e. paths) but it'd be nice to have a rough idea how things could be extended to support other data formats.
In that respect, maybe a different API would be good. With 3.x we can think about using std::variant-like. But if we want to have something in 2.x, maybe something like this could be more flexible:

struct Data {
  template <T> T get();
  bool isPath(); // if true then get<String> is legal
  bool isImage(); // if true then get<Image> is legal
  // ...

  // or maybe something like that:
  struct Kind { Path, Image, ... };
  Kind getKind();
};

/* implementation defined */ Cookie;

struct DropEvent {
  Cookie cookie;
};

struct Window {
  // Let's say the Data for a Cookie is valid at least until
  // the next display/popEvent/whatever makes sense.
  Data getDropData(Cookie);

  void enableDropData(Kind kind, bool enable);
};

What do you think?

It looks like Linux does? It sends a MIME type with the data, from what I can tell here and the code from the link at the end of the issue text (although I'll admit I didn't understand most from either places).
Windows does seem to, since I just dragged highlighted text from Firefox directory to Visual Studio and it put the text in the editor. I can also drag an image directly from Firefox into MS Paint. (I'm lost trying to find documentation on how this works though. It seems related to clipboard formats? From what I read here, Windows can actually give multiple formats at once.)
The API just proposed can't support Windows having multiple types at once, so if that is chosen SFML would need to decide what is best and only give that (or generate an event for each supported type, but that doesn't sound good either).

Linux supports multiple formats as well.  A lot of software wrongly just chooses the first in the list, which causes things to not work properly quite often (try dragging some selected text to Dolphin for example, the first entry is a pointer to the text rather than the text itself (a later option), and it writes 4/8 bytes (the pointer itself) to a new file.  Always give the option to specify the formats and give the list of all available on linux.

Has there been any progress? Fytch's idea seems outstanding.

A bit late here, but instead of storing a raw pointer (not very user friendly) why not wrapping it into a custom class, which will manage it properly without any risks?
(and maybe then implement a forEach function or use iterators to iterate in the list, just like a std::vector or a std::list would, (we could even use std::list maybe? since I don't see a reason not to have FIFO behavior while reading the content of any drag'n drop event)
I don't know how much could be implemented of hat I said, or even if it is relevant since I am not a maintainer of the library, just a random user sorry in advance

source: gharchive/pull-request

repo: SFML/SFML

license: Zlib


text:
Add tests for sf::Utf

Description
These tests are incomplete and imperfect but are still a solid step forward. I made SECTIONs for all of the functions in Utf.hpp so that it's easy to tell what tests have not been written. Over time we will hopefully expand and refine these tests.

Pull Request Test Coverage Report for Build 12056005298
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.1%) to 57.013%

Totals

Change from base Build 12053639189:
0.1%

Covered Lines:
12051

Relevant Lines:
19984

💛  - Coveralls

authors: ChrisThrasher coveralls


text:
Loading pre-trained model doesn't work with new versions of keras

Describe the bug
With keras version 3.3.3 installed, I get an error when trying to load the model from h5 file (see below). The actual error comes from deep within keras, and seems to be related to using .pop() on a list instead of a dictionary. With keras version 2.11 and 2.15 it works.
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[46], line 2
      1 # Initialise the pipeline and run the initial steps
----> 2 processing_pipeline = pyopia.pipeline.Pipeline(toml_settings)

File ~/Projects/PyOpia/pyopia/pyopia/pipeline.py:78, in Pipeline.__init__(self, settings, initial_steps)
     76     continue
     77 if stepname == 'classifier':
---> 78     callobj = self.step_callobj(stepname)
     79     self.data['cl'] = callobj()
     80 else:

File ~/Projects/PyOpia/pyopia/pyopia/pipeline.py:132, in Pipeline.step_callobj(self, stepname)
    129     arguments[k] = self.settings['steps'][stepname][k]
    131 m = methodcaller(classname, **arguments)
--> 132 callobj = m(sys.modules[modulename])
    133 print(classname, ' ready with:', arguments, ' and data', self.data.keys())
    134 return callobj

File ~/Projects/PyOpia/pyopia/pyopia/classify.py:56, in Classify.__init__(self, model_path)
     54 def __init__(self, model_path=None):
     55     self.model_path = model_path
---> 56     self.load_model()

File ~/Projects/PyOpia/pyopia/pyopia/classify.py:88, in Classify.load_model(self)
     86 header = pd.read_csv(os.path.join(path, 'header.tfl.txt'))
     87 self.class_labels = header.columns
---> 88 self.model = keras.models.load_model(model_path)
     89 print('WARNING: Classification assumes loaded images have values in the range 0-255')
     90 return

File ~/mambaforge/envs/pyopia/lib/python3.10/site-packages/keras/src/saving/saving_api.py:183, in load_model(filepath, custom_objects, compile, safe_mode)
    176     return saving_lib.load_model(
    177         filepath,
    178         custom_objects=custom_objects,
    179         compile=compile,
    180         safe_mode=safe_mode,
    181     )
    182 if str(filepath).endswith((".h5", ".hdf5")):
--> 183     return legacy_h5_format.load_model_from_hdf5(
    184         filepath, custom_objects=custom_objects, compile=compile
    185     )
    186 elif str(filepath).endswith(".keras"):
    187     raise ValueError(
    188         f"File not found: filepath={filepath}. "
    189         "Please ensure the file is an accessible `.keras` "
    190         "zip file."
    191     )

File ~/mambaforge/envs/pyopia/lib/python3.10/site-packages/keras/src/legacy/saving/legacy_h5_format.py:133, in load_model_from_hdf5(filepath, custom_objects, compile)
    130 model_config = json_utils.decode(model_config)
    132 with saving_options.keras_option_scope(use_legacy_config=True):
--> 133     model = saving_utils.model_from_config(
    134         model_config, custom_objects=custom_objects
    135     )
    137     # set weights
    138     load_weights_from_hdf5_group(f["model_weights"], model)

File ~/mambaforge/envs/pyopia/lib/python3.10/site-packages/keras/src/legacy/saving/saving_utils.py:58, in model_from_config(config, custom_objects)
     55     MODULE_OBJECTS.ALL_OBJECTS["Model"] = models.Model
     56     MODULE_OBJECTS.ALL_OBJECTS["Sequential"] = models.Sequential
---> 58 batch_input_shape = config["config"].pop("batch_input_shape", None)
     59 if batch_input_shape is not None:
     60     if config["class_name"] == "InputLayer":

TypeError: pop expected at most 1 argument, got 2

This is why version 2.11 is explicitly specified in the dependencies, here

authors: emlynjdavies nordam

repo: SINTEF/pyopia


text:
🛑 DNS1.electro is down

In b17d536, DNS1.electro (ns1.elteam.ir) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DNS1.electro is back up in 5ad9e24 after 19 minutes.

repo: SIRMaxis/uptime-robot

license: MIT


text:
🛑 DNS1.electro is down

In 7d3e89f, DNS1.electro (ns1.elteam.ir) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DNS1.electro is back up in f06d69f after 7 minutes.


text:
🛑 DNS2.electro is down

In 79e203f, DNS2.electro (ns2.elteam.ir) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DNS2.electro is back up in 5058a04 after 39 minutes.


text:
🛑 DNS2.electro is down

In 0b5d85e, DNS2.electro (ns2.elteam.ir) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DNS2.electro is back up in adcabd5 after 1 hour, 1 minute.


text:
🛑 DE Server is down

In 3c1cfa7, DE Server (de1.elteam.ir) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DE Server is back up in 2d1f170 after 41 minutes.


text:
Update sbill

Add --range= option for specifying min and max of Service; to further filter jobs.

There is also a new hidden feature in --histogram for plotting histogram of CPUusage and GPUusage, but expected to be rarely use in practice.

repo: SKanoksi/SBILL-SLURM


text:
macOS Oracle connect error: Exited (-9)

final oracle = DartOdbc('/usr/local/lib/instantclient_23_3/libsqora.dylib.23.1');

It exited with error code -9.
I followed the Oracle ODBC setup instructions from this link.
The connection works fine when I test it with isql OracleODBC-23 id pw.
I tried postgreSQL below code.
final postgreSQL = DartOdbc('/opt/homebrew/Cellar/psqlodbc/16.00.0005/lib/psqlodbcw.so');

It works great.
Could you tell me how to properly set up Oracle ODBC for macOS?

I have not tested nor am able to test your configuration because I do not own a mac so helping you in this case would be a lot tricky but I will try my best. Since you have tested the connection with isql the driver seems to be working. In that case please provide me the full error output from dart_odbc library. I will try to make some sense out of it.
Thank you for reaching out with this issue. Hope I we can find a solution to this issue. 😊

@SL-Pirate
After testing step by step, I found that the problem was occurring at:
DynamicLibrary.open('/usr/local/lib/instantclient_23_3/libsqora.dylib.23.1');

The only error message was Exited. (-9).
So I removed all the drivers and set them up again in the HOME directory, and it loaded without any issues.
If there's any additional work I did, it was creating a symbolic link with the following command:
ln -s /opt/homebrew/Cellar/unixodbc/2.3.12/lib/libodbcinst.2.dylib /Users/$USER/instantclient_23_3/libodbcinst.2.dylib
Now it's working well on m2 macOS.
Thank you for your willingness to help!

You are welcome. Glad your issue was fixed!
Closing as completed

authors: SL-Pirate treestae


text:
Bug with --coresPerNode and  --gpusPerNode

When launching:
smart_dispatch.py -q gpu_1 --coresPerNode=2 --gpusPerNode=1 -x -t 10:00 launch nvidia-sm
The PBS generated will be wrong.
It does #PBS -l nodes=1:gpus=2 instead of #PBS -l nodes=2:gpus=1

Thanks to @Dutil's investigation, the problem comes from the fact that Helios job generator removes ppn because this option is invalid for this cluster. K20's job get 5 cores assigned and K80's get 3 cores, both getting 2 gpus.
So the value of PBS should indeed be -l nodes=1:gpus=2. The problem is this modifications is done without any warnings to the user who tries to specify something else.
Looking at the other job generators, it appears Helios is not the only one to behave differently than what the user would expect.
Helios doc
Removes ppn=*, set gpus=2
But cluster behavior is:

If you get K80, you have 3 cores and 2 gpus
If you get K20, you have 5 cores and 2 gpus

Because of this, division of commands for workers is incorrect if it tries to assign commands using more than the availlable cores (3 or 5).
Hades doc
Removes ppn=*, set ppn=nb of gpus
But cluster behavior is:

No constraints on ppn.
To get all 8 cores, set ppn=7.

This unables user from using many cpus with less gpus. I don't see why it should do so given Hades' doc.
Mammouth doc
Removes ppn=*, set ppn=1
Cluster behavior is:
Scheduler only see one core per node (even though there is 12), so node=1:ppn=1 gives 12 cores.
Because of this, division of commands for workers simply cannot fit more than one core per job, while the nodes actually have 12 cores each.

@mgermain @MarcCote I'd like to know why those substitutions where implemented that way. Was the worker system added later on?

I think the cluster config was done with some idea in mind, but make it hard to use in other case like our.
So it seam we can't rely on all cluster to handle the jobs as we want. The way jobdispatch supported that was by handling itself part of the submission by bunding jobs together to do what we want whatever the cluster allow.
If you need more information about how it was solved, tell me.

@nouiz Thank you now the worker system makes much more sense to me! I didn't realize it could be a way to get around the weird clusters' scheduler behaviors. I just noticed that the dispatching of the commands is done before ppn= and gpus= are modified. So it is not true that the dispatching is incorrect. I'll look at the code again and see what it implies. Anyhow, I won't close this issue until we have a clear warning to users to avoid further confusion.

We don't need just a clear warning. We need a way for the user to don't
know about this.
A local config on each cluster could tell smart-dispatch how to bundle. We
need to bundle the less frequently possible. Always bunding per node would
not be great. It would cause a lower utilisation of the cluster.
On Fri, Aug 18, 2017 at 3:46 PM Xavier Bouthillier notifications@github.com
wrote:

@nouiz https://github.com/nouiz Thank you now the worker system makes
much more sense to me! I didn't realize it could be a way to get around the
weird clusters' scheduler behaviors. I just noticed that the dispatching of
the commands is done before ppn= and gpus= are modified. So it is not true
that the dispatching is incorrect. I'll look at the code again and see what
it implies. Anyhow, I won't close this issue until we have a clear warning
to users to avoid further confusion.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SMART-Lab/smartdispatch/issues/99#issuecomment-323444868,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALC-9Hqt3CwGPHV-yFXBsDTuzhB883Nks5sZen9gaJpZM4FIIxp
.

We don't need just a clear warning. We need a way for the user to don't know about this.

Yes and no.
Yes) The user should not be warned about this when launching command line.
No) Looking at the PBS file generated could be quite confusing. Adding a "warning" comment in the PBS file around ppn and gpus settings would help clarify.

We need to bundle the less frequently possible. Always bunding per node would
not be great. It would cause a lower utilisation of the cluster.

I totally agree. The smaller the better for the scheduler.

Agree for a watching in the PBS file. I was thinking you wanted a watching
printed on the command line.
On ven. 18 août 2017 16:40 Xavier Bouthillier notifications@github.com
wrote:

We don't need just a clear warning. We need a way for the user to don't
know about this.
Yes and no.
Yes) The user should not be warned about this when launching command line.
No) Looking at the PBS file generated could be quite confusing. Adding a
"warning" comment in the PBS file around ppn and gpus settings would help
clarify.
We need to bundle the less frequently possible. Always bunding per node
would
not be great. It would cause a lower utilisation of the cluster.
I totally agree. The smaller the better for the scheduler.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SMART-Lab/smartdispatch/issues/99#issuecomment-323455688,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALC-zJ9T20NWN0-tGqTozG1Pfik4vF6ks5sZfaygaJpZM4FIIxp
.

@bouthilx no. "So the value of PBS should indeed be -l nodes=1:gpus=2."
gpus should not be equal to 2 as it is on the queue gpu_1 which contains only 1 GPU per node. Asking for 2 GPU in 1  node on a queue that only contains 1 results in an invalid batch file. That's the only problem related to this issue. Nothing else :p

@mgermain Yeah I forgot to revisit my message after we had a chat about the issue. So is this bug supposed to occur on every cluster or on a single one? Do you remember?

As far as I remember it was only on Helios but we would have to test on the
others anyway.
On Tue, Aug 29, 2017 at 8:59 PM, Xavier Bouthillier <
notifications@github.com> wrote:

@mgermain https://github.com/mgermain Yeah I forgot to revisit my
message after we had a chat about the issue. So is this bug supposed to
occur on every cluster or on a single one? Do you remember?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SMART-Lab/smartdispatch/issues/99#issuecomment-325846880,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABBvm2izBbg9VZ5q1SoKv3XQZEwuBK_Jks5sdLPXgaJpZM4FIIxp
.

I've just retested it and as @Dutil  says it's been fixed in the past. I've tested it on Helios and Guillimin (the 2 with gpus) and it's functional now.
Closing the issue.

Wow 2/2 tickets for @Dutil were already fixed.

authors: bouthilx mgermain nouiz

repo: SMART-Lab/smartdispatch

license: WTFPL


text:
Add pg reconnection loop

Signed-off-by: Fedor Muratov muratovfyodor@yandex.ru
Proposed changes
In the current implementation, PG backend tries to reconnect only once. But regarding soci::failover_callback documentation, a number of connections should be restricted by client code via failed method.
The PR contains improvement for PG backend which allows restoring a connection more than once.
Drawbacks
I haven't seen the usage of failover_callback in tests. So the test of the functionality is missed.
Discussion points

The implementation is not elegant, and maintainers could guide me in finding better ways to do such changes.
The number of attempts is limited only by a client's code, and probably there may happen some problems with the connection (e.g. expiration of connection).

Obvious question: what is potential for infinite loop?
Other than that, it looks good.

I think the infinite reconnection is possible only when a client always requests reconnection while the network is lost. But if it is - the client should manage the connection by him/herself.

Sounds good to me. Thanks

authors: mloskot muratovv

repo: SOCI/soci


text:
🛑 CAOS is down

In 83c9220, CAOS (http://caos.ayi-asociados.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CAOS is back up in c1bcfce after 50 minutes.

repo: SOPORTEAYIGROUP/AYIGROUP


text:
🛑 Internet EPEC is down

In 5037fd0, Internet EPEC (190.96.117.110) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Internet EPEC is back up in fabd874 after 14 minutes.


text:
🛑 CAOS is down

In 289159e, CAOS (http://caos.ayi-asociados.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CAOS is back up in a5db6d0 after 5 minutes.


text:
Postgres On Main Nuget Feed

Hi,
Is there any possibility of getting the postgres package on the main nuget feed.
maybe as pre-release ?
We're about to start some major testing using it on a big feature in our app. Would make life easier.
Also are there outstanding issues you are aware of with the PG impl at the moment ?
Regards

beta.2 prerelease packages on nuget. https://www.nuget.org/packages/SqlStreamStore.Postgres/1.2.0-beta.2  (though it's taking a wee bit of time to show up on indexes.
Closing the issue but please post any feedback here and will re-open if needed. Thanks!

thanks!!!

authors: damianh mickdelaney

repo: SQLStreamStore/SQLStreamStore

license: mit

license_source: bigquery


text:
🛑 Blog - Past is down

In 3a1299e, Blog - Past (https://nas-y-blog.stardream.online) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Blog - Past is back up in cb866aa after 7 minutes.

repo: STDM-Group/upptime


text:
Consider using defusedxml instead of  lxml.etree to avoid certain XML attacks.

I ran a quick bandit scan against python-stix and observed the following issues. Most are medium/low severity, though.

Issue: [B320:blacklist] Using lxml.etree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree.parse with its defusedxml equivalent function.
Severity: Medium   Confidence: High
Location: python-stix/stix/extensions/test_mechanism/open_ioc_2010_test_mechanism.py:95
94	            parser = mixbox.xml.get_xml_parser()
95	            return_obj.ioc = etree.parse(BytesIO(d['ioc']), parser=parser)
96

Issue: [B410:blacklist] Using etree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace etree with the equivalent defusedxml package.
Severity: Low   Confidence: High
Location: python-stix/stix/test/extensions/malware/maec_4_1_malware_test.py:5
4
5	from lxml import etree
6	import mixbox.xml

Issue: [B320:blacklist] Using lxml.etree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree.parse with its defusedxml equivalent function.
Severity: Medium   Confidence: High
Location: python-stix/stix/test/extensions/malware/maec_4_1_malware_test.py:86
85	        parser = mixbox.xml.get_xml_parser()
86	        tree = etree.parse(BytesIO(xml), parser=parser)
87	        root = tree.getroot()

Issue: [B320:blacklist] Using lxml.etree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree.parse with its defusedxml equivalent function.
Severity: Medium   Confidence: High
Location: python-stix/stix/test/extensions/malware/maec_4_1_malware_test.py:99
98	        parser = mixbox.xml.get_xml_parser()
99	        tree = etree.parse(StringIO(self.XML), parser=parser)
100

Issue: [B320:blacklist] Using lxml.etree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree.parse with its defusedxml equivalent function.
Severity: Medium   Confidence: High
Location: python-stix/stix/test/extensions/malware/maec_4_1_malware_test.py:108
107	        parser = mixbox.xml.get_xml_parser()
108	        tree = etree.parse(StringIO(self.XML), parser=parser)
109	        ext = MAECInstance()

Issue: [B410:blacklist] Using lxml to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml with the equivalent defusedxml package.
Severity: Low   Confidence: High
Location: python-stix/stix/test/extensions/test_mechanisms/openioc_test.py:6
5
6	import lxml
7
8	from mixbox import idgen

Issue: [B320:blacklist] Using lxml.etree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree.parse with its defusedxml equivalent function.
Severity: Medium   Confidence: High
Location: python-stix/stix/test/extensions/test_mechanisms/openioc_test.py:132
131	        parser = mixbox.xml.get_xml_parser()
132	        tree = lxml.etree.parse(BytesIO(xml), parser=parser)
133	        root = tree.getroot()

Issue: [B320:blacklist] Using lxml.etree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree.parse with its defusedxml equivalent function.
Severity: Medium   Confidence: High
Location: python-stix/stix/test/extensions/test_mechanisms/openioc_test.py:144
143	        parser = mixbox.xml.get_xml_parser()
144	        tree = lxml.etree.parse(StringIO(self.XML), parser=parser)
145

Issue: [B320:blacklist] Using lxml.etree.parse to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree.parse with its defusedxml equivalent function.
Severity: Medium   Confidence: High
Location: python-stix/stix/test/extensions/test_mechanisms/openioc_test.py:152
151	        parser = mixbox.xml.get_xml_parser()
152	        tree = lxml.etree.parse(StringIO(self.XML), parser=parser)
153	        ext = OpenIOCTestMechanism()

Issue: [B410:blacklist] Using lxml.etree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree with the equivalent defusedxml package.
Severity: Low   Confidence: High
Location: python-stix/stix/test/utils/nsparser_test.py:8
7	# external
8	import lxml.etree
9	from mixbox.vendor.six import StringIO

Issue: [B410:blacklist] Using lxml.etree to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree with the equivalent defusedxml package.
Severity: Low   Confidence: High
Location: python-stix/stix/utils/init.py:9
8
9	import lxml.etree
10
11	from mixbox.entities import Entity, EntityList

Issue: [B320:blacklist] Using lxml.etree.fromstring to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml.etree.fromstring with its defusedxml equivalent function.
Severity: Medium   Confidence: High
Location: python-stix/stix/utils/init.py:108
107	    xml = "{0}".format(text)
108	    node = lxml.etree.fromstring(xml)
109	    return node.text

Thanks, @santosomar. We'll take a look at this. If you have the time to make a pull request before we get a chance to, it would be greatly appreciated!

authors: gtback santosomar

repo: STIXProject/python-stix


text:
Figure object

How can I get the image object of matplotlib for the panel.Column object returned by the current data.plt.violin()? And why does Column().objects not contain image objects but display images in notebook? How to get image objects?

The panel.Column only contains the InputText widgets you see on notebook, the figure is not returned and is diplayed directly, what is your purpose of getting the figure object? if you want to save the figure, you can specify the save path by parameter out_path

authors: benben-miao tanliwei-coder

repo: STOmics/Stereopy


text:
React-router navbar causes issue when dragging elements.

I have a navbar with react-router and as a sub-route I tried to use react-grid-layout but there is one issue where when I click to drag an element the element will jump down, in the exact length of the height of the navbar. Any Idea why?

This sounds like a specific styling issue with react-router's navbar, not with this component. Without a working example I can't even begin to help you.

Was able to get around it, not by fixing the issue, but just rebuilding some stuff, i'll close.

authors: FerusAndBeyond STRML

repo: STRML/react-grid-layout


text:
Shape of pred & label is difference when training siamrpn_alex_dwxcorr/config.yaml

Hello every one,  I had trained siamrpn_r50_l234_dwxcorr/config.yaml with my PC successfully.
But when I train with siamrpn_alex_dwxcorr/config.yaml, it always raises Error during computing loss function.
After tracing, in the following function, I found that shape of pred & label is difference, pred is  (17x17) and label is (25x25). which is not the case for Alex Backbone. Should I change any other configuration before training with "--cfg=(path)/siamrpn_alex_dwxcorr/config.yaml" ? Thank you
def select_cross_entropy_loss(pred, label):
pred = pred.view(-1, 2)
label = label.view(-1)
pos = label.data.eq(1).nonzero().squeeze().cuda()
neg = label.data.eq(0).nonzero().squeeze().cuda()
loss_pos = get_cls_loss(pred, label, pos)
loss_neg = get_cls_loss(pred, label, neg)
return loss_pos * 0.5 + loss_neg * 0.5

You can use siamrpn_alex_dwxcorr_16gpu/config.yaml instead.
The error occurred because cfg.TRAIN.OUTPUT_SIZE remained 25 as defined in pysot/core/config.py, which should have been 17 in the AlexNet case. siamrpn_alex_dwxcorr_16gpu/config.yaml overwrites that kind of hyperparameters for training the AlexNet-based CNN but siamrpn_alex_dwxcorr/config.yaml does not.

@kumatheworld Thanks for you help, I think the problem is really due to the wrong setting of cfg.TRAIN.OUTPUT_SIZE. I can train the network, if I manually set cfg.TRAIN.OUTPUT_SIZE=17 now.
However, still some problem exists.
I have made sure cfg.TRAIN.OUTPUT_SIZE was 17 before entering the for loop as below:

However, it always becomes 25 again and again in getitem(...), even though I can set it back as follow, I don't know why this would happen?

OK, I see. Since dataset.py did not merge from config.yaml at all. I think this problem was solved.

You're more than welcome to submit a merge request

authors: FrogMegane kumatheworld zyc-ai

repo: STVIR/pysot


text:
City view buildings order

Played the original civ till ~1 AD. Some notes:

when building new cities, you start off with either mud huts or tents. This logic seems not to change at least until 1 AD. My capital had mud huts, 2nd city had tents, 3rd+4th had mud huts, 5th had tents, ... Seems to be random.

brown tents seem to be the 1st stage, followed by gray tents. At around 1200 BC all my brown tents changed color to gray. No idea what triggered this.

between 1400 BC and 1200 BC all my cities started getting a smaller number of wood+clay houses, replacing the original tents & mud huts. As the city grows the number of these houses increases in the middle of the city.

the positioning of buildings in the city seems to randomly change as your city gets bigger.
E.g. City pop. 9:

City pop. 10:

No clear logic how this happens.

An example of stacking of shields etc. in the city main view as the city grows (perhaps it will be of some help):

I keep making screenshots of 5 cities (main view+city view) as they grow and as the game progresses. I'll try to resolve more game mechanics this way. Will post updates on this.

Wow, great job! This is really useful.

So, getting The republic transforms all your mud hits and tents into wood + clay houses.

Nice find, thank you!

I found out that the appearance of houses is changed every 2 advances you make. Here's the progress (left=before, right=after advance is researched):
7th advance:
Sadly no screenshots for comparison:
11th advance:

13th advance:

15th advance:

17th advance:

19th advance:

21st advance:

23rd advance:

25th advance:

27th advance:

29th advance:

31st advance:

33rd advance:

35th advance:

37th advance:

39th advance (industrialization. It also changes citizens' appearance):

41st advance:

43rd advance:

45th advance:

47th advance:

49th advance:

51th advance:

53rd advance:

55th advance:

56th advance was Automobile. It changed dirt roads to asphalt & people to cars:

57th advance:

59th advance:

61st advance:

63rd advance:

Sadly with 3 or so advances left the game crashed and I ragequit.
Also during 47th advance the picture of scientist (Sid) changed to laboratory setting. I'll have to check if something else triggers this.
As you can see even late into the game you can still have old houses, especially with large cities. This is why smaller cities have a more modern appearance.

Funny thing, I tried the same and the changes happened with the even number of advances instead of the uneven number of advances. The changes started at the 10th advance in my game. The first wooden home appeared with the 16th advance.
I wonder what the deciding factor is for that.
As for the laboratory scientist changing: That happens with the advance after you have discovered Electricity.

Also - you can start with either tents or (mud) huts. Perhaps this is random.

For now, until we figure out how it actually works in the original game, I will implement it like this:

Changes happen every 2 advances, starting at the eleventh advance
Stone/Wood huts start at 11, full at 25
Old houses start at 27
Industrial houses start at at 41
Skyscrapers start at 49, in cities with a minimum size of 9

Support for all kinds of houses is implemented, though experimental, and seems to be functioning pretty much as described above.

With all building types implemented, I will close this issue. The rest of the City View implementation will be done on issue #32.


text:
🛑 Rahanet Movie AF is down

In ae6cfd1, Rahanet Movie AF (http://movie.af/) was down:

HTTP code: 403
Response time: 1032 ms

Resolved: Rahanet Movie AF is back up in a5e9758 after 31 minutes.

repo: Saboor-Hakimi/upptime


text:
🛑 Rahanet Movie AF is down

In 6ad010a, Rahanet Movie AF (http://movie.af/) was down:

HTTP code: 403
Response time: 1193 ms

Resolved: Rahanet Movie AF is back up in 1066012 after 11 minutes.


text:
offset parameter is ignored in search endpoint

Please explain the bug.
offset parameter is not working for /search endpoint as no matter the number, it always returns the first/most recent page
How can I reproduce it?
curl -X 'POST' \
  'https://api.saebasol.org/api/hitomi/search' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "offset": 1,
  "query": [
    "female:loli"
  ]
}'

returns same result as
curl -X 'POST' \
  'https://api.saebasol.org/api/hitomi/search' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "offset": 2,
  "query": [
    "female:loli"
  ]
}'

Logs/tracebacks
No response
Heliotrope version or Docker image version
6.4.3 https://api.saebasol.org/docs

Python Version
No response
OS
No response
Additional Description
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

https://github.com/Saebasol/Heliotrope/blob/d99e7cd7152b9f1838b29394b3c4166abad20790/heliotrope/database/odm/__init__.py#L113
https://github.com/Saebasol/Heliotrope/blob/d99e7cd7152b9f1838b29394b3c4166abad20790/heliotrope/database/odm/__init__.py#L153
It seems to be a problem while working on #268.
Perhaps we forgot to pass the offset and limit arguments to the function because the function that creates the pipeline has default values.
We will fix this issue tomorrow, and if you are interested in this issue, you can open a PR.

https://github.com/Saebasol/Heliotrope/blob/d99e7cd7152b9f1838b29394b3c4166abad20790/heliotrope/database/odm/__init__.py#L113
https://github.com/Saebasol/Heliotrope/blob/d99e7cd7152b9f1838b29394b3c4166abad20790/heliotrope/database/odm/__init__.py#L153
It seems to be a problem while working on #268.
Perhaps we forgot to pass the offset and limit arguments to the function because the function that creates the pipeline has default values.
We will fix this issue tomorrow, and if you are interested in this issue, you can open a PR.

I see, PR created

Close in #272

authors: FluffyDiscord SaidBySolo

repo: Saebasol/Heliotrope


text:
getHR function always returns NA values

Looks like getHR function doesn't output any data. Its always throwing out NA columns with some error.
Also, please change the name of the function.

This is closed in pull #15

repo: Sage-Bionetworks/mhealthtools


text:
Respect LSP suggestion ordering

Feature Description
Currently, blink doesn't seem to respect LSP suggestion ordering, defaulting to sorting by kind or label even when disabled in the config. This affects heuristic LSP suggestion ordering, such as enum variant suggestions within match blocks as demonstrated below.
VsCode:

Zed:

Blink:

My blink config:
opts = {
  fuzzy = {
    use_frecency = false,
    use_proximity = false,
    sort = {},
  },
}

My questions are:

How can I preserve LSP suggestion ordering as an end user?

Could we make LSP suggestion ordering the default behavior for blink.cmp? For reference, Zed implements this using a hybrid approach:

// We do want to strike a balance here between what the language server tells us
// to sort by (the sort_text) and what are "obvious" good matches (i.e. when you type
// `Creat` and there is a local variable called `CreateComponent`).
// So what we do is: we bucket all matches into two buckets
// - Strong matches
// - Weak matches
// Strong matches are the ones with a high fuzzy-matcher score (the "obvious" matches)
// and the Weak matches are the rest.
//
// For the strong matches, we sort by our fuzzy-finder score first and for the weak
// matches, we prefer language-server sort_text first.
//
// The thinking behind that: we want to show strong matches first in order of relevance(fuzzy score).
// Rest of the matches(weak) can be sorted as language-server expects.

The Zed idea sounds quite clever, I'll open a separate issue for that

authors: Saghen wonrax


text:
🛑 Nostr Relay - wss://nostr.oxtr.dev is down

In 705e59e, Nostr Relay - wss://nostr.oxtr.dev (https://nostr.oxtr.dev) was down:

HTTP code: 500
Response time: 1350 ms

Resolved: Nostr Relay - wss://nostr.oxtr.dev is back up in 47f4e74 after 17 minutes.

repo: Sakhalinfox/orangepilldevuptime


text:
Update Campaign Household Mailing List report button to work in both Lightning and Classic

Critical Changes
Changes
The old "NPSP Campaign Household Mailing List" report included with the NPSP Households package is being replaced with a new version of the report that works properly in both the Salesforce Classic and Lightning user interfaces. The old report will still exist in custom orgs, but will not be used with the Household Mailing List custom button. If a custom organization has modified the older report, those changes will need to be applied to the new report.
Issues Closed
Fixes #2324
New Metadata
Reports/Nonprofit Edition Reports/NPSP Campaign Household Mailing List V2
Deleted Metadata

I'm wondering if it's worth holding off merge on this feature until next sprint when we do the underlying package update, which will then allow deleting the old deprecated report. I hate having to tell admins "Update this new report with stuff from the old report, then wait a few weeks before you can delete the old one." Thoughts @force2b @judisohn @smarovich ?

@njjc Guess what? There is nothing I can see that prevents the user from deleting the report right now. I fired up a scratch org with the managed release, went to a managed report, hit Delete and it's gone.

So I think we should do it in the underlying only to prevent it in new orgs, but it doesn't seem to matter for existing customers.

@force2b @smarovich

Yeah. That makes sense based on this doc. Reports are subscriber deletable even if the report isn't removed from the original package. https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/packaging_packageable_components.htm#packaging_packageable_components

Wonderful, maybe let's add to the release notes that users can safely delete the old one once the new one has been updated, if applicable?

@smarovich See comments above. Maybe 'Note that If a customer organization has modified the old report, those changes will need to be applied to the new report. Once the changes are applied to the new report and NPSP Settings updated in People > Households to reference the new v2 report, the old "NPSP Campaign Household Mailing List" can be safely deleted.' What do you think?

@judisohn and @smarovich The settings won't need to be updated by the User. I added code to the post install script to do that for them.

authors: force2b judisohn njjc

repo: SalesforceFoundation/Cumulus


text:
Friendship feature

can now add friends by sending requests to other users and accepting them. It may be a little buggy, but all critical features work as intended.

Amazing. really well implemented.

authors: AveryNewkirk ThomasMcCauley


text:
Add cli rule

A rule that checks if the package is a cli package (if bin is provided in package.json) and performs the following checks.

Checks if the file exists
Checks if the file is executable
Checks if update-notifier is a dependency

Not sure about the update-notifier dependency though. Do we always want this?
// @sindresorhus

Not sure about the update-notifier dependency though. Do we always want this?

No, not always.

Alright, will drop that check then, thanks for the feedback!

authors: SamVerschueren sindresorhus

repo: SamVerschueren/clinton


text:
sing-box

سلام. وقت بخیر.
بابت ساخت و نگهداری این ریپو ارزشمند از شما ممنونم.
میخواستم بدونم امکانش هست از لیست دامنه ها مطابق با فرمتی که sing-box هم پشتیبانی کنه خروجی گرفته بشه؟
https://sing-box.sagernet.org/configuration/route/geoip/
https://github.com/SagerNet/sing-geoip
https://github.com/SagerNet/sing-geosite
https://github.com/SagerNet/sing-box/issues/190
این لینک ها ممکنه کمک کنه. خودم واقعاً هیچ ایده ندارم راجع بهش برا همین نمیتونم PR بدم. امیدوارم شما بتونید کمک کنید.
مزیت sing-box این هست که بجز پروتکل هایی مثل vmess و vless و ... از hysteria و naive هم پشتیبانی میکنه.
بازم از شما تشکر می کنم.

سلام.
در حال حاضر من نمیرسم پیاده سازی کنم.
اگر فرد دیگه ای وقت انجام این کار رو داره، لطفا درست کنه، تست کنه و PR بده.

authors: SamadiPour privatesupport

repo: SamadiPour/iran-hosted-domains


text:
Changed if statement checking if there are multiple children to use built in Array.isArray().

Added test case to show a case where length existing doesn't mean
there are multiple children.

The test is contrived however this would allow compatibility with https://github.com/preactjs/preact.

@Sambego Could you please review this PR?

@DhruvSheth sorry, this escaped my attention. It's available in v1.3.6.
Thanks for the contribution 💪

authors: DhruvSheth Sambego

repo: Sambego/storybook-state


text:
File type is extracted to separated field for deep scan

Description

use separated field file_type to send it into MlValidator as is. It helps to apply correct feature for ml model during deep scan when file_path is kept unchanged but the file contains another files with different type.

How has this been tested?
Please describe the tests that you ran to verify your changes.

[x] File path in report must be equal real file name. Info field contains path how the credential was found

That why i don't like squash :(
This branch has conflicts that must be resolved
to resolve conflicts before continuing.
Conflicting files
credsweeper/app.py
credsweeper/credentials/candidate.py
and many-many ...
...

repo: Samsung/CredSweeper


text:
[OneExplorer] Exclude UI related codes from coverage analysis

UI related codes are hard to be managed about to code quality.
This commit excludes them.
ONE-vscode-DCO-1.0-Signed-off-by: Seok NamKoong seok9311@naver.com

If there are something verifiable I missed, please let me know..!

repo: Samsung/ONE-vscode


text:
Support macOS

Currently, it is only available in Ubuntu.
Need to support macOS.

Now, we are trying to implement ioter feature on mac os.
To support mac os, we have to make all-cluster-app binary and openthread library.
Regarding all-cluster-app binary,
we need to implement DarwinThreadDriver and ThreadStackManagerImpl.
Regarding openthread library,
It's successful for us to build it for mac os. https://github.com/junyong-sim/openthread/commit/72b44348eb900a925ba776c55d1192c1392c057b
Not tested, yet.

Advertising operation has been confirmed, but onboarding is not possible because service data cannot be added (macOS constraints).
https://github.com/project-chip/connectedhomeip/issues/26677
https://developer.apple.com/documentation/corebluetooth/cbperipheralmanager/1393252-startadvertising
https://stackoverflow.com/questions/67028049/core-bluetooth-cbadvertisementdataservicedatakey-could-have-some-custom-data
https://stackoverflow.com/questions/32134436/how-to-pass-additional-advertising-ble-data

I'd like to share the working branches. I hope that it will be helpful to those who work for mac ioter.
https://github.com/Samsung/ioter/tree/feature/support-darwin
https://github.ecodesamsung.com/THREAD/ioter/commits/feature/support-darwin
https://github.com/junyong-sim/openthread/tree/darwin

authors: junyong-sim sangsoolee

repo: Samsung/ioter


text:
API documentation update #1

JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu

LGTM

LGTM

authors: LaszloLango ktorpi zherczeg

repo: Samsung/jerryscript


text:
Add conversion API functions

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com

LGTM.
Deciding what should happen if an error object is an argument applies here as well.

LGTM

authors: LaszloLango dbatyai zherczeg


text:
Fix JMEM_HEAP_END_OF_LIST for pointers larger than 32 bits

For 64 bit pointers, 0xffffffff as end-of-list marker pointer does
not work, as the marker is expected to be greater than the start
address of the heap area (and also max 0xffffffff away), but on 64
bit systems, the heap can start on higher addresses, i.e., above
0x100000000. This patch ensures that the marker is set correctly on
all systems.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu

Interestingly, this issue only appeared on OSX and did not occur on x64/Linux. When running ./build/bin/jerry tests/jerry/parser-oom.js, jerry crashed with the following message and stack trace:
ICE: Assertion 'jmem_is_heap_pointer (current_p)' failed at jerry-core/jmem/jmem-heap.c(jmem_heap_alloc_block_internal):242.
Error: ERR_FAILED_INTERNAL_ASSERTION

#0  jerry_fatal (code=ERR_FAILED_INTERNAL_ASSERTION)
    at jerry-core/jrt/jrt-fatals.c:37
#1  0x0000000100001eae in jerry_assert_fail (
    assertion=0x1000d666d "jmem_is_heap_pointer (current_p)",
    file=0x1000ce9bf "jerry-core/jmem/jmem-heap.c", function=0x1000d662a "jmem_heap_alloc_block_internal", line=242)
    at jerry-core/jrt/jrt-fatals.c:86
#2  0x00000001000ba9f6 in jmem_heap_alloc_block_internal (size=49168)
    at jerry-core/jmem/jmem-heap.c:242
#3  0x00000001000942c7 in jmem_heap_gc_and_alloc_block (size=49168,
    ret_null_on_error=true)
    at jerry-core/jmem/jmem-heap.c:346
#4  0x000000010009ee4a in jmem_heap_alloc_block_null_on_error (size=49168)
    at jerry-core/jmem/jmem-heap.c:408
#5  parser_malloc (context_p=0x7fff5fbfec30, size=49168)
    at jerry-core/parser/js/js-parser-mem.c:42

After instrumenting the loop of the slow path of jmem_heap_alloc_block_internal with printfs, I got the following output:
end_of_list	= 0xffffffff
current_p	= 0x104f06278
current_p	= 0x104f13fc0
current_p	= 0x104f7a340
current_p	= 0x1ffffffff

Clearly, we wanted to put the EOL marker into current_p just didn't succeed: heap was on high addresses, EOL address was lower, when the offset of the EOL was calculated (with JMEM_HEAP_GET_OFFSET_FROM_ADDR), it was truncated to 32 bits, and when it was transformed back to address again (with JMEM_HEAP_GET_ADDR_FROM_OFFSET`), it became different.

LGTM

I don't think this is the right approach. I think we should change
JMEM_HEAP_GET_OFFSET_FROM_ADDR (JMEM_HEAP_END_OF_LIST)

to
JMEM_HEAP_END_OF_LIST

There is one case where a few line needs to be changed as well.

patch updated according to the review (all CI jobs are green, OS X included!)

I like this much better, LGTM.

authors: LaszloLango akosthekiss zherczeg


text:
Mimic the test-262 expected behaviour in string.replace

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu

@zherczeg, could you, please, add comment to implementation-defined part with details about current behaviour of the part?

Yes, explanation added.

Looks good to me

Looks good to me.

Landed in a751478a199ad30ff74b0163fbc435cc7b0cff34

authors: kkristof ruben-ayrapetyan zherczeg