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
import pandas as pd | |
import numpy as np | |
df = pd.DataFrame({'user_id':[1,1,1,2,2,2],'module_id':[1,2,3,1,1,2]}) | |
print(df) | |
print(df.groupby('user_id', as_index=False).sum()) | |
print(df.groupby('user_id', as_index=False).nunique()) |
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
Startup.cs | |
var responseText = new ExceptionResponse(statusCode, ex).ToString(); | |
await context.Response.WriteAsync(responseText); | |
responseText is set to: | |
"{\"ExceptionType\":\"SecurityTokenExpiredException\",\"Message\":\"IDX10223: Lifetime validation failed. The token is expired.\\nValidTo: '07\\/23\\/2016 02:03:48'\\nCurrent time: '07\\/28\\/2016 14:20:17'.\",\"StackTrace\":\" at Blah.Startup.<>c.<Configure>b__6_1(AuthenticationFailedContext context) in D:\\\\Users\\\\me\\\\Source\\\\Repos\\\\ServerSideCode\\\\Blah\\\\Startup.cs:line 118\\r\\n at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.<HandleAuthenticateAsync>d__1.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.<Initia |
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; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Configuration; | |
using ThingaMeASPy8s.Settings; | |
using ThingaMeASPy8s.Exceptions; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.IdentityModel.Tokens; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.ApplicationInsights.AspNetCore; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ItemGroup Label="ProjectConfigurations"> | |
<ProjectConfiguration Include="Debug|Win32"> | |
<Configuration>Debug</Configuration> | |
<Platform>Win32</Platform> | |
</ProjectConfiguration> | |
<ProjectConfiguration Include="Profile|ARM"> | |
<Configuration>Profile</Configuration> | |
<Platform>ARM</Platform> |