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 boto3 | |
import os | |
from concurrent.futures import ThreadPoolExecutor | |
# Global variables | |
S3_BUCKET_NAME = 'yyyyy' | |
S3_PREFIX = 'xxxxl' | |
LOCAL_DOWNLOAD_DIRECTORY = './dest' | |
NUM_THREADS = 100 |
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 {AsyncCache} from 'utils-decorators'; | |
import * as redis from 'redis'; | |
import {RedisClient} from 'redis'; | |
import {promisify} from 'util'; | |
import * as config from 'config'; | |
export class RedisCache<D> implements AsyncCache<D> { | |
delete: (key: string) => Promise<void>; | |
private readonly client: RedisClient; |
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 MapView { | |
@throttle(1000); | |
logEvent(evwnts: AppEvent): void { | |
// some code | |
} | |
} |
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 Dashboard { | |
@refreshable({ | |
func: getCountroies, | |
intervalMs: 1000 * 60 * 60 | |
}) | |
countries: Countrie[]; | |
} | |
function getCountroies(e: Error): Promise<Countrie[]> { |
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 DataProvider { | |
@onError({ | |
func: handleError | |
}) | |
getData(params: QueryParams): Promise<Data> { | |
// some code | |
} | |
} | |
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 User { | |
@readonly | |
id = 12345; | |
} |
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 DataProvider { | |
@memoizeAsync(1000 * 60 * 60) | |
getData(params: QueryParams): Promise<Data> { | |
// some code | |
} | |
} |
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 Fibonacci { | |
@memoize(10000) | |
fibo(n: number): number { | |
//some code | |
} | |
} |
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 EmailSender { | |
@delay(1000); | |
sendEmail(email: Email): Promise<void> { | |
// some code | |
} | |
} |
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 MapView { | |
@debounce(100); | |
onScroll(): void { | |
// some code | |
} | |
} |
NewerOlder