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
# LICENSE: MIT | |
# Copyright (c) 2024 Takanori Ishikawa | |
import asyncio | |
import base64 | |
import json | |
import os | |
import sys | |
from pprint import pprint | |
from typing import Annotated, Any, Literal, Optional, Union |
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
import json | |
import os | |
from pprint import pprint | |
from typing import Any | |
import websocket | |
from dotenv import load_dotenv | |
from websocket import WebSocket | |
load_dotenv() |
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
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 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
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 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
pub enum Foo { | |
A, | |
B, | |
} | |
impl Foo { | |
pub fn variants() -> impl Iterator<Item = Foo> { | |
array::IntoIter::new([Self::A, Self::B]) | |
} | |
} |
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
/* | |
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 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
/* | |
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 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
print('Hello, World!') |
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
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 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
kubectl get pod | awk '{ print $1 }' | grep '^gateway-' | head -1 | xargs -o -I {} kubectl exec -it {} -- /bin/bash |
NewerOlder