Skip to content

Instantly share code, notes, and snippets.

View ntakouris's full-sized avatar
🤖
Building robots

Theodoros Ntakouris ntakouris

🤖
Building robots
View GitHub Profile
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
{
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);
[Post("/api/v1/identity/register")]
Task<ApiResponse<AuthSuccessResponse>> RegisterAsync([Body] UserRegistrationRequest registrationRequest);
var response = await _tweetBookApi.LoginAsync(new LoginRequest("usrname", "password"))
- [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
Nigger 18
in 10038
the 24574
house 222
"Yes" 2
I 30610
have 6830
a 22865
hard 469
on 6489
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):
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),
public class TagResponseExample : IExamplesProvider<TagResponse>
{
public TagResponse GetExamples()
{
return new TagResponse
{
Name = "new tag"
};
}
}
public class CreateTagRequestExample : IExamplesProvider<CreateTagRequest>
{
public CreateTagRequest GetExamples()
{
return new CreateTagRequest
{
TagName = "new tag"
};
}
}