This file contains hidden or 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
@MqttSubscriber | |
public class BttcConsumer { | |
private static final Logger LOG = LoggerFactory.getLogger(BttcConsumer.class); | |
private final BrainRepository brainRepository; | |
private final WebSocketBroadcaster broadcaster; | |
public BttcConsumer( | |
BrainRepository brainRepository, | |
WebSocketBroadcaster broadcaster) { | |
this.brainRepository = brainRepository; |
This file contains hidden or 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
mqtt: | |
client: | |
server-uri: ${MQTT_SERVER_URI} | |
client-id: bttc-client | |
user-name: ${MQTT_USERNAME} | |
password: ${MQTT_PASSWORD} |
This file contains hidden or 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
oraclecloud: | |
vault: | |
config: | |
enabled: true | |
vaults: | |
- ocid: ${VAULT_OCID} | |
compartment-ocid: ${VAULT_COMPARTMENT_OCID} | |
use-instance-principal: false | |
path-to-config: ~/.oci/config | |
profile: DEFAULT |
This file contains hidden or 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 | |
map, | |
"mode", | |
cast( avg(kills) as number(18,2)) as avgKills | |
from mv_game_details | |
group by map, "mode"; |
This file contains hidden or 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
@Repository | |
public interface GameRepository extends PageableRepository<Game, Long> {} |
This file contains hidden or 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 * | |
from summaryByRange('attention'); |
This file contains hidden or 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 | |
case | |
when avgMeditation >= 1 and avgMeditation <= 10 then '1-10' | |
when avgMeditation > 10 and avgMeditation <= 20 then '11-20' | |
when avgMeditation > 20 and avgMeditation <= 30 then '21-30' | |
when avgMeditation > 30 and avgMeditation <= 40 then '31-40' | |
when avgMeditation > 40 and avgMeditation <= 50 then '41-50' | |
when avgMeditation > 50 and avgMeditation <= 60 then '51-60' | |
when avgMeditation > 60 and avgMeditation <= 70 then '61-70' | |
when avgMeditation > 70 and avgMeditation <= 80 then '71-80' |
This file contains hidden or 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 materialized view mv_game_details | |
build immediate | |
refresh fast on commit | |
as | |
select | |
g.rowid as "rowid", | |
g.id as "id", | |
g.match.utcStartSeconds as utcStartSeconds, | |
g.match.utcEndSeconds as utcEndSeconds, | |
g.match.map as map, |
This file contains hidden or 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
@Entity | |
@AllArgsConstructor(access = AccessLevel.PACKAGE) | |
@NoArgsConstructor | |
@Data | |
@EqualsAndHashCode | |
public class Game { | |
@Id | |
@GeneratedValue(strategy= GenerationType.IDENTITY) | |
private Long id; | |
private String match; |
This file contains hidden or 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 | |
g.match.utcStartSeconds as matchStart, | |
g.match.utcEndSeconds as matchEnd, | |
g.match.playerStats.kills as kills, | |
g.match.playerStats.deaths as deaths | |
from game g | |
order by created_on desc; |