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
var cachedToken = string.Empty; | |
var identityApi = RestService.For<IIdentityApi>("https://localhost:5001"); | |
var tweetbookApi = RestService.For<ITweetbookApi>("https://localhost:5001", new RefitSettings | |
{ | |
AuthorizationHeaderValueGetter = () => Task.FromResult(cachedToken) | |
}); | |
var registerResponse = await identityApi.RegisterAsync(new UserRegistrationRequest | |
{ |
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 interface IIdentityApi | |
{ | |
[Post("/api/v1/identity/register")] | |
Task<ApiResponse<AuthSuccessResponse>> RegisterAsync([Body] UserRegistrationRequest registrationRequest); | |
[Post("/api/v1/identity/login")] | |
Task<ApiResponse<AuthSuccessResponse>> LoginAsync([Body] UserLoginRequest loginRequest); | |
[Post("/api/v1/identity/refersh")] | |
Task<ApiResponse<AuthSuccessResponse>> RefreshAsync([Body] RefreshTokenRequest refreshRequest); |
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
[Post("/api/v1/identity/register")] | |
Task<ApiResponse<AuthSuccessResponse>> RegisterAsync([Body] UserRegistrationRequest registrationRequest); |
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
var response = await _tweetBookApi.LoginAsync(new LoginRequest("usrname", "password")) |
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
- [x] inverted dropout | |
- [x] goldilocks ideal rate // bullshit | |
- [x] shannons entropy measure // good one | |
- [x] harmonic mean | |
- [x] beta distribution | |
- [x] gamma function | |
- [x] bias correction of exponentially weighted average | |
- [x] covariate shifting computer vision | |
- [x] why use strided convolution | |
- [x] selu |
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
Nigger 18 | |
in 10038 | |
the 24574 | |
house 222 | |
"Yes" 2 | |
I 30610 | |
have 6830 | |
a 22865 | |
hard 469 | |
on 6489 |
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
class Textgen(Sequence): | |
def __init__(self, input_t, target_t, batch_size): | |
self.input_t, self.target_t = input_t, target_t | |
self.batch_size = batch_size | |
def __len__(self): | |
return math.floor(len(self.input_t) / self.batch_size) - 1 | |
def __getitem__(self, idx): |
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
def generator(): | |
i = 0 | |
encoder_input_data = np.zeros( | |
(batch_size, max_encoder_seq_length, num_encoder_tokens), | |
dtype='float32') | |
decoder_input_data = np.zeros( | |
(batch_size, max_decoder_seq_length, num_decoder_tokens), | |
dtype='float32') | |
decoder_target_data = np.zeros( | |
(batch_size, max_decoder_seq_length, num_decoder_tokens), |
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 TagResponseExample : IExamplesProvider<TagResponse> | |
{ | |
public TagResponse GetExamples() | |
{ | |
return new TagResponse | |
{ | |
Name = "new tag" | |
}; | |
} | |
} |
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 CreateTagRequestExample : IExamplesProvider<CreateTagRequest> | |
{ | |
public CreateTagRequest GetExamples() | |
{ | |
return new CreateTagRequest | |
{ | |
TagName = "new tag" | |
}; | |
} | |
} |