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
sudo -u postgres psql postgres | |
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'DB NAME' AND pid <> pg_backend_pid(); |
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 matplotlib | |
from matplotlib.ticker import FuncFormatter | |
from mpl_toolkits.mplot3d import Axes3D | |
import matplotlib.gridspec as gridspec | |
import matplotlib.patches as mpatches | |
import matplotlib.lines as mlines | |
import matplotlib.pyplot as plt, mpld3 | |
try: | |
from notebooks.styles import colors |
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 { DecimalPipe } from "@angular/common"; | |
import { Pipe, PipeTransform } from "@angular/core"; | |
@Pipe({name: "currency"}) | |
export class CurrencyPipe implements PipeTransform { | |
private assetFormats = { | |
"USD": "1.2-2", | |
"BTC": "1.6-6" | |
}; |
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 { Injectable } from "@angular/core"; | |
import { Observable } from "rxjs/Observable"; | |
import { environment } from "../../environments/environment"; | |
import { Router } from "@angular/router"; | |
import { HttpClient } from "@angular/common/http"; | |
import { catchError } from "rxjs/operators"; | |
import "rxjs/add/observable/throw"; | |
import { AuthDataStorage } from "../../common/auth-data.storage"; | |
export const TOKEN_STORAGE_KEY = "token"; |
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 { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef } from "@angular/core"; | |
import { Subject } from "rxjs/Subject"; | |
import { filter, takeUntil } from "rxjs/operators"; | |
import { MatTableDataSource } from "@angular/material"; | |
import { ElementsApiService } from "../../../common/services/elements-api.service"; | |
import { OrderService } from "../../../common/services/orders.service"; | |
import { OrderDto } from "../../shared/models/order-dto"; | |
import { OrderStatus } from "../../../common/enums/order-status"; | |
import { TransactionRouter } from "../../shared/transaction-router"; |
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
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 |