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
import re | |
from datetime import timedelta | |
regex = re.compile(r'((?P<hours>\d+?)h)? ((?P<minutes>\d+?)m)? ((?P<seconds>\d+?)s)?') | |
regex2 = re.compile(r'((?P<minutes>\d+?)m)? ((?P<seconds>\d+?)s)?') | |
def parse_time(time_str): | |
parts = regex.match(time_str) | |
if not parts: | |
parts = regex2.match(time_str) | |
parts = parts.groupdict() | |
time_params = {} |
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
1 1CR | |
2 ABY | |
3 AC | |
4 ACH | |
5 ADN | |
6 AEON | |
7 AERO | |
8 AIR | |
9 APH |
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
// --- USAGE --- | |
import { InjectConnection } from '@nestjs/typeorm'; | |
//... | |
@Injectable() | |
export class Service { | |
constructor( | |
@InjectConnection() | |
private connection: Connection, | |
//... | |
const prime = await this.repo |
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
<div class="rounded-md bg-green-50 p-4"> | |
<div class="flex"> | |
<div class="flex-shrink-0"> | |
<svg class="h-5 w-5 text-green-400" x-description="Heroicon name: check-circle" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"> | |
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path> | |
</svg> | |
</div> | |
<div class="ml-3"> | |
<h3 class="text-sm leading-5 font-medium text-green-800"> | |
Prospect accepted comment |