scope
: the scope for which this fixture is shared, one of “function” (default), “class”, “module”, “session”.params
: an optional list of parameters which will cause multiple invocations of the fixture function and all of the tests using it.autouse
: if True, the fixture func is activated for all tests that can see it. If False (the default) then an explicit reference is needed to activate the fixture.ids
: list of string ids each corresponding to the params so that they are part of the test id. If no ids are provided they will be generated automatically from the 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
if __name__ == "__main__": | |
stock_watcher = Observable() | |
american_observer = AmericanStockMarket() | |
stock_watcher.register(american_observer) | |
stock_watcher.publish('KLSE Market Update', price='+0.5') |
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
class MyTask(luigi.Task): | |
def complete(self): | |
def _get_last(outputs): | |
last = 0.0 | |
for item in outputs: | |
if not item.exists(): | |
continue | |
current = os.path.getmtime(item.path) | |
if current > last: | |
last = current |
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
{ | |
"vars": { | |
"@gray-base": "#fff", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#7bcc3a", |
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 two1.lib.bitcoin as bitcoin | |
from two1.lib.wallet import Wallet | |
wallet = Wallet() | |
# Collect public keys | |
p1_pubkey = wallet.get_payout_public_key() | |
p2_pubkey = wallet.get_change_public_key() | |
# Build multisig redeem script |
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
def player_1(start_date=None, miss_output=False, miss_plot=False, sleep=False, sleep_time=1, plot=False, output=True, hold_max=1000, withdraw_max=500, withdraw_min=10): | |
user_key, day_info, amount, invested, profit, loss, game_active = bitcoin_game(start_date=start_date) | |
#print(user_key) | |
prev_predict = day_info[-1] | |
miss_colors = ['g'] | |
while game_active == False: | |
#print(day_info[-1]) | |
if day_info[-1] == 2: #equilavent of 100 i.e. good odds | |
#print('first option') | |
if invested < 100: #invest 100 |
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
from transitions import Machine | |
class Payments(models.Model): | |
STATES = { | |
'started': 'Started', | |
'captured': 'Captured', | |
'completed': 'Completed', | |
} |
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 | |
import json | |
import luigi | |
import pandas as pd | |
from mysolr import Solr | |
from bs4 import BeautifulSoup | |
class InputText(luigi.ExternalTask): |
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 luigi | |
class ATask(luigi.Task): | |
def output(self): | |
return luigi.LocalTarget("atask_output.txt") | |
def run(self): | |
with self.output().open("w") as outfile: | |
outfile.write("Test") |
QuickAlerts is a Chrome Extension for Tradingview.
It's features include:
- Batch import/export of an ever-growing number of alert types
- Sort alerts alphabetically
OlderNewer