View ViewModelClosable.swift
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 Foundation | |
import Combine | |
import SwiftUI | |
/// View Model closable protocol - conform to this protocol if your view model should emit close block to close the screen that uses this view model | |
public protocol ViewModelClosableProtocol { | |
var closeCancellable: AnyCancellable? { get set } | |
// when inheriting protocol, set @Published | |
// var shouldCloseView: Bool { get set } |
View get_feed_for_csv_path.py
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 backtrader as bt | |
from backtrader.feeds import GenericCSVData | |
class GenericCSV_Signal(GenericCSVData): | |
# Add a 'pe' line to the inherited ones from the base class | |
lines = ('autoencoder_signal',) | |
# auto encoder signal in GenericCSVData has index 8 ... |
View BasicTradeStats.py
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
####################################### | |
# Code: Rich O'Regan (London) Sep 2017 | |
####################################### | |
import math | |
import numpy as np | |
from backtrader import Analyzer | |
from backtrader.utils import AutoOrderedDict, AutoDict |
View TextAlert.swift
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
// | |
// ContentView.swift | |
// | |
// Created by Chris Eidhof on 20.04.20. | |
// Copyright © 2020 objc.io. All rights reserved. | |
// | |
// Updated by Anton Sokolchenko for Xcode 12 Beta 4 | |
import SwiftUI | |
import UIKit |
View gist:8227aca72ac65a7014a028fbdf069c4c
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
Workaround thumbnail images, metadata junk photos from apple photo library. | |
Tested on mac os mojave | |
You cannot move Masters out of the library using symlinks, BUT you can have symlinks INSIDE the .photolibrary? | |
What's the idea? We will have .photolibrary INSIDE .photolibrary | |
The folder structure |
View gist:336cd3d80a158479abc3086738470983
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
This overrides performance settings defined in site-packages/common/feature_switch_manager.py | |
Aren't default settings perfect? Default settings were not able to upload 200 000 files within 3 days. | |
There were some interruptions and the app had to re-verify everything from scratch. | |
Go to Contents/MacOS folder and execute | |
./Backup\ and\ Sync --max_batch_upload_files=300 --max_sha1_match_batch_size=500 --telemetry_enabled=0 --token_bucket_read_qps=30 --token_bucket_write_qps=20 --num_workers=10 | |
max_batch_upload_files = Maximum number of files to include in a batch upload. | |
max_sha1_match_batch_size = Maximum number of sha1 match requests in a batch. |
View pyboard.py
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
#!/usr/bin/env python | |
#from __future__ import print_function | |
""" | |
pyboard interface | |
This module provides the Pyboard class, used to communicate with and | |
control the pyboard over a serial USB connection. |
View Github repo size in mbytes
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
git count-objects -vH | grep 'size-pack' |
View 0_reuse_code.js
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder