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
Sun Nov 20 14:40:09 2022 whisper.prof | |
5912402 function calls (5549784 primitive calls) in 709.208 seconds | |
Ordered by: cumulative time | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
1983/1 0.038 0.000 709.211 709.211 {built-in method builtins.exec} | |
1 0.086 0.086 709.195 709.195 prof_whisper.py:1(<module>) | |
1 0.024 0.024 673.748 673.748 transcribe.py:19(transcribe) |
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
combinations = set() | |
for x in range(1, 37): | |
for y in range(1, 37): | |
for z in range(1, 37): | |
if x * y * z == 36: | |
sisters = [x, y, z] | |
sisters.sort(reverse=True) | |
sisters = tuple(sisters) | |
if sisters not in combinations: |
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
pub enum Foo { | |
A, | |
B, | |
} | |
impl Foo { | |
pub fn variants() -> impl Iterator<Item = Foo> { | |
array::IntoIter::new([Self::A, Self::B]) | |
} | |
} |
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
/* | |
MIT License | |
Copyright (c) 2021 Takanori Ishikawa | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
/* | |
MIT License | |
Copyright (c) 2021 Takanori Ishikawa | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
print('Hello, World!') |
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
defmodule MapHelpers do | |
@doc """ | |
Checks if `map1`'s entries are all contained in `map2`. | |
## Options | |
- `:recursive` - Recursively checks if a value is map (Default: `false`) | |
## Examples |
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
kubectl get pod | awk '{ print $1 }' | grep '^gateway-' | head -1 | xargs -o -I {} kubectl exec -it {} -- /bin/bash |
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
# The helper functions for the test module. To make it possible to import | |
# this helper module in the test module, define this module outside the context that uses it. | |
defmodule MyTest.Helpers do | |
@spec fake_params(Enumrable.t()) :: map | |
def fake_params(override \\ %{}) do | |
%{ | |
country: "jp", | |
phone_number: Faker.phone_number(), | |
locale: "ja", | |
company: "My Company", |
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
# https://elixirforum.com/t/passing-in-options-maps-vs-keyword-lists/1963 | |
@doc """ | |
do foo operation | |
## Options | |
- `:option1` - option 1 | |
- `:option2` - option 2 | |
""" |
NewerOlder