I hereby claim:
- I am piraka9011 on github.
- I am anas9011 (https://keybase.io/anas9011) on keybase.
- I have a public key ASBLGr_u2a5g4MlUaPfS835crKpGOAQENQLV0UlsVqjYcQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).
Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.
Switch to the master branch and make sure you are up to date:
I hereby claim:
To claim this, I am signing this object:
import os | |
import wave | |
if __name__ == '__main__': | |
directory = '/Users/allabana/tarteel_ws/tarteel-recordings/media' | |
(_, _, filenames) = next(os.walk(directory)) | |
bad_files = [] | |
for filename in filenames: | |
wave_filename = os.path.join(directory, filename) | |
try: |
"""This is a full example of a trace sampler that filters transactions for: | |
1. Django views/routes/urls (whatever you want to call them) | |
2. Celery tasks | |
Generally, you would put this in your `settings.py` file, but you can put format it as needed for your project of course. | |
We are assuming you use `django-environ` for secrets management. | |
""" | |
import environ | |
import sentry_sdk |
from torch.quantization import quantize_dynamic | |
from torch.utils.mobile_optimizer import optimize_for_mobile | |
from nemo.collections.asr.models import EncDecCTCModelBPE | |
# from nemo.collections.asr.parts.preprocessing import FilterbankFeatures | |
from omegaconf import OmegaConf | |
import torch | |
import torchaudio | |
import math | |
import random |
import boto3 | |
from tqdm import tqdm | |
# Estimate from the S3 console | |
NUM_OBJECTS = 17292115 | |
def list_objects_parallel(bucket, prefix): | |
objects = [] | |
pbar = tqdm(total=NUM_OBJECTS) |
def start_or_create_ec2_instance(self, instance_id=None, region_name="us-west-2", **kwargs): | |
session = boto3.session.Session(region_name=region_name) | |
ssm = session.client("ssm") | |
# Default to open SSH security groups | |
sg_id_region_map = { | |
"us-west-2": "sg-xxxx", | |
"us-east-1": "sg-xxxx", | |
} | |
# Default to public subnets | |
subnet_id_region_map = { |
// See https://vercel.com/docs/workflow-collaboration/comments/specialized-usage#using-a-content-security-policy | |
const VERCEL_BASE_CSP = 'https://vercel.live/ https://vercel.com https://*.vercel.com' | |
const VERCEL_CSP_DEFAULT_SRC = `${VERCEL_BASE_CSP} wss://*.pusher.com`; | |
const VERCEL_CSP_IMG_SRC = `${VERCEL_BASE_CSP} https://sockjs-mt1.pusher.com/`; | |
const GOOGLE_FONTS_BASE_CSP = 'https://*.gstatic.com'; | |
const ContentSecurityPolicy = ` | |
default-src 'self' *.mixpanel.com *.stripe.com *.sentry.io ${VERCEL_CSP_DEFAULT_SRC} ${GOOGLE_FONTS_BASE_CSP}; | |
style-src 'self' 'unsafe-inline'; | |
script-src 'self' '${process.env.VERCEL_ENV === "preview" ? 'unsafe-inline' : 'unsafe-eval'}' *.mixpanel.com *.stripe.com ${VERCEL_BASE_CSP}; | |
img-src 'self' ${VERCEL_CSP_IMG_SRC} data: blob:; |
from typing import Any, Optional | |
from urllib.parse import urlparse, urlunparse | |
from xml.etree import ElementTree | |
from botocore.auth import S3SigV4Auth | |
from botocore.awsrequest import AWSRequest | |
from botocore.credentials import Credentials | |
from django.conf import settings | |
from requests import Response, request |