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 'dart:async'; | |
import 'dart:developer'; | |
import 'dart:io'; | |
import 'dart:isolate'; | |
import 'package:common_dart/utils/processes.dart'; | |
import 'package:front_log/front_log.dart'; | |
import 'package:test/test.dart'; | |
import 'package:vm_service/vm_service.dart' hide Isolate, Log; | |
import 'package:vm_service/vm_service.dart' as vm_service; |
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 warnings | |
from collections import UserDict, defaultdict | |
from typing import Optional, Tuple, Any | |
import torch | |
from transformers import BeamScorer, BeamSearchScorer | |
from transformers.generation import BeamHypotheses | |
from ...utils.torch_utils import first_several_nonzero_indices |
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 'dart:async'; | |
import 'dart:math'; | |
import 'package:common_flutter/ui/services/navigator_ui_service.dart'; | |
import 'package:common_flutter/utils/colors.dart'; | |
import 'package:flutter/gestures.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:front_log/front_log.dart'; | |
class PopGestureWidget extends StatefulWidget { |
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
Compiling bug v0.1.0 (/Users/tom/temp/bug) | |
error[E0277]: the type `UnsafeCell<runtime::blocking::pool::Shared>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | |
--> src/main.rs:7:42 | |
| | |
7 | let _ = std::panic::catch_unwind(|| { | |
| _________________------------------------_^ | |
| | | | |
| | required by a bound introduced by this call | |
8 | | rt.spawn(my_background_op()); // FAIL TO COMPILE | |
9 | | tokio::spawn(my_background_op()); // OK |
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
use std::sync::{Arc, RwLock}; | |
// ----------------------------------------------------------------------------------------- | |
// Suppose we have such user code | |
pub struct One(String); | |
impl One { | |
fn f(&self) -> Two { | |
// users can put arbitrarily complex computation here |
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 gzip | |
import re | |
from pathlib import Path | |
from typing import List, Optional | |
import orjson | |
import typer | |
def merge_chrome_traces(interesting_paths: List[Path], output_path: Path, start_time_ms: int, end_time_ms: int): |
OlderNewer