This file contains hidden or 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 Program | |
{ | |
... | |
public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => | |
BlazorWebAssemblyHost.CreateDefaultBuilder() | |
.UseBlazorStartup<Startup>(); | |
} |
This file contains hidden or 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
@functions { | |
WeatherForecast[] forecasts; | |
protected override async Task OnInitAsync() | |
{ | |
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("sample-data/weather.json"); | |
} | |
class WeatherForecast | |
{ |
This file contains hidden or 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
@page "/fetchdata" | |
@inject HttpClient Http | |
<h1>Weather forecast</h1> | |
<p>This component demonstrates fetching data from the server.</p> | |
@if (forecasts == null) | |
{ | |
<p><em>Loading...</em></p> |
This file contains hidden or 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 Microsoft.AspNetCore.Components.Builder; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace HandsOn.WebAssemblyUsingBlazor | |
{ | |
public class Startup | |
{ | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
} |
This file contains hidden or 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 Microsoft.AspNetCore.Blazor.Hosting; | |
namespace HandsOn.WebAssemblyUsingBlazor | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
CreateHostBuilder(args).Build().Run(); | |
} |
This file contains hidden or 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
. | |
├── App.razor | |
├── HandsOn.WebAssemblyUsingBlazor.csproj | |
├── Pages | |
│ ├── Counter.razor | |
│ ├── FetchData.razor | |
│ ├── Index.razor | |
│ └── _Imports.razor | |
├── Program.cs | |
├── Shared |
This file contains hidden or 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; | |
using System.Runtime.CompilerServices; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore.Metadata.Builders; | |
using VinylStore.Catalog.Domain.Entities; | |
namespace VinylStore.Catalog.Infrastructure.SchemaDefinitions | |
{ | |
public class ItemEntitySchemaDefinition : IEntityTypeConfiguration<Item> | |
{ |
This file contains hidden or 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
let filteredLyrics = songLyrics |> Seq.filter(fun row -> row.Genre = "Hip-Hop" ) | |
tokenizeLyrics filteredLyrics | |
|> renderLineChartForWords |
This file contains hidden or 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
tokenizeLyrics songLyrics | |
|> renderLineChartForWords |
This file contains hidden or 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
let tokenizeLyrics (lyrics: seq<LyricsInput>) = | |
... | |
let transformedData = pipeline.Fit(data).Transform(data) | |
transformedData.GetColumn<string[]>(mlContext, "LyricsWithNoStopWords") | |
|> Seq.concat | |
|> Seq.toList |