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
SET search_path = _global, pg_catalog; | |
CREATE OR REPLACE FUNCTION drop_all () | |
RETURNS VOID AS | |
$$ | |
DECLARE rec RECORD; | |
BEGIN | |
-- Get all the schemas | |
FOR rec IN | |
select distinct schemaname |
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
#Generate failsafe HTML | |
-U clean package integration-test -P sandbox surefire-report:failsafe-report-only |
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
SELECT equipment_attribute_id, max(value) as value, time_bucket('8 hour', created) AS created | |
FROM conatus.measurement | |
WHERE ( created >= (SELECT CURRENT_DATE - interval '1 month' ) AND equipment_attribute_id IN ( 89, 120, 108, 123, 122, 125, 124, 113, 1, 121, 168 ) AND value != 'NaN') | |
group by 3, equipment_attribute_id | |
ORDER BY 3 |
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
playerOne = "" | |
playerTwo = "" | |
def choosePlayer( player ): | |
var = raw_input("Player "+ player +": choose X or O: ").upper() | |
while (var != 'X' and var != 'O'): | |
var = raw_input("Player "+ player +": choose X or O: ").upper() | |
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
CREATE TABLESPACE bullion_tablespace | |
DATAFILE 'db2.dbf' | |
SIZE 40M ONLINE; | |
CREATE USER bullion IDENTIFIED BY bullion; | |
GRANT CONNECT, RESOURCE, DBA TO bullion; | |
GRANT UNLIMITED TABLESPACE TO bullion; |
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 InstagramAPI import InstagramAPI | |
import json | |
import datetime | |
import os, errno | |
import requests | |
import logging | |
import logging.handlers | |
import os | |
import sched, time | |
import sys |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: greetings-app | |
labels: | |
app: greetings-app | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: |
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
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: greetings-service | |
spec: | |
selector: | |
app: greetings-app | |
ports: | |
- port: 8888 |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: greetings-app | |
labels: | |
app: greetings-app | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: |
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
@Test | |
public void rateLimiterTest() { | |
MockResponse mockResponse = new MockResponse() | |
.setResponseCode(200) | |
.addHeader("Content-Type", "application/json;charset=utf-8"); | |
//Resilience4J configuration for RateLimiter | |
//Defining that only one request can happend in 100ms window | |
RateLimiterConfig config = RateLimiterConfig.custom() |
OlderNewer