- Ubuntu 14.04, 16.04, or 16.10
- Open up terminal
- Install core deps:
sudo apt-get install clang libicu-dev git
@After | |
public void teaddown() { | |
setting.clear(); | |
resetSingleton(ErgoSettings.class, "sInstance"); | |
} | |
public static void resetSingleton(Class clazz, String fieldName) { | |
Field instance; | |
try { |
open ~/.zshrc |
$ cd ~ # home directory で作業 | |
$ sudo apt-get install clang libicu-dev libcurl4 | |
$ wget https://swift.org/builds/swift-4.2-release/ubuntu1804/swift-4.2-RELEASE/swift-4.2-RELEASE-ubuntu18.04.tar.gz | |
$ tar xvpf swift-4.2-RELEASE-ubuntu18.04.tar.gz | |
$ export PATH=~/swift-4.2-RELEASE-ubuntu18.04/usr/bin:$PATH |
enum Shortcuts: String { | |
case refreshList = "com.vialyx.MVD.refresh_list" | |
var identifier: String { | |
return rawValue | |
} | |
var title: String { | |
switch self { | |
case .refreshList: |
import Foundation | |
import Combine | |
enum APIError: Error, LocalizedError { | |
case unknown, apiError(reason: String) | |
var errorDescription: String? { | |
switch self { | |
case .unknown: | |
return "Unknown error" |
import Foundation | |
extension URL { | |
/// Initialize with a static string. | |
/// | |
/// If the `URL` cannot be formed with the string (for example, if the string contains characters that are illegal in a URL, or is an empty string), a precondition failure will trigger at runtime. | |
init(staticString: StaticString) { | |
guard let url = Self.init(string: String(describing: staticString)) else { | |
preconditionFailure("'\(staticString)' does not represent a legal URL") | |
} |
// | |
// Vibration.swift | |
// | |
// Created by Yannick Stephan on 2020-11-21. | |
// | |
import UIKit | |
import AudioToolbox | |
enum VibrationService { |
extension AnyPublisher where Failure: Error { | |
struct Subscriber { | |
fileprivate let send: (Output) -> Void | |
fileprivate let complete: (Subscribers.Completion<Failure>) -> Void | |
func send(_ value: Output) { self.send(value) } | |
func send(completion: Subscribers.Completion<Failure>) { self.complete(completion) } | |
} | |
init(_ closure: (Subscriber) -> AnyCancellable) { |
import gc | |
import os | |
import sys | |
import psutil | |
import threading | |
import argparse | |
import transformers | |
import datasets | |
import numpy as np | |
import torch |