This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Wealth Dynamics: Married vs Single with Random Shocks | |
This simulation explores the dynamics of wealth accumulation for married couples and single individuals over a 100-year time period. It incorporates random financial shocks that can negatively impact wealth. The model parameters include: | |
Mean return for investment (0.08) | |
Fixed volatility factor (0.15) | |
Probability of a shock occurring in a given time step (0.05) | |
Magnitude of wealth reduction due to shock (0.2) | |
Additive contributions from individual A and individual B (both set to 5000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Assembly Parse, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | |
// C:\Users\marti\.nuget\packages\parse\2.0.0\lib\netstandard2.0\Parse.dll | |
#endregion | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Parse | |
{ | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Assembly Parse, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | |
// C:\Users\marti\.nuget\packages\parse\2.0.0\lib\netstandard2.0\Parse.dll | |
#endregion | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@foreach (var batch in Model.List.Batch(4)) | |
{ | |
<div class="row"> // Bootstrap.css row | |
@foreach (var item in batch) | |
{ | |
<div class="col-lg-3">item.ObjectId</div> // Bootstrap.css column, i.e. col-lg-3 is 4 columns at screen resolution 'large' | |
} | |
</div> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
namespace YeetClub.WebPlatform.Application.Utilities | |
{ | |
public static class BatchList | |
{ | |
public static IEnumerable<IEnumerable<TSource>> Batch<TSource>( | |
this IEnumerable<TSource> source, int size) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IndexModel : PageModel | |
{ | |
public void OnGet() | |
{ | |
Task<int> task = GetYeetsAsync(); | |
} | |
private async Task<int> GetYeetsAsync() | |
{ | |
var query = ParseObject.GetQuery("Yeet"); |