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
version: '3' | |
services: | |
opensearch: | |
image: opensearchproject/opensearch:latest | |
container_name: opensearch | |
environment: | |
- discovery.type=single-node | |
- node.name=opensearch | |
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" |
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
const mermaidDefinition = ` | |
architecture-beta | |
group api(logos:aws-vpc)[VPC] | |
service server(logos:aws-api-gateway)[Server] in api | |
service search(logos:aws-open-search)[OpenSearch] in api | |
service lambda(logos:aws-lambda)[Lambda] in api | |
service disk(logos:aws-s3)[Storage] in api |
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
use std::{collections::HashMap, vec}; | |
type Table = HashMap<String, Vec<String>>; | |
fn show(table: &Table) { | |
for (artist, works) in table { | |
println!("works by {}:", artist); | |
for work in works { | |
println!(" {}", work); | |
} | |
} |
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
# 実行されたコード | |
import pkgutil | |
# List all available modules | |
available_modules = [module.name for module in pkgutil.iter_modules()] | |
available_modules |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
struct MakingRegularGraph { | |
int n; | |
vector<int> x, y, deg; | |
set<int> rest; | |
set<pair<int, int>> edge; | |
void dfs(vector<int> &ans) { | |
if (rest.size() == 0) { | |
return ; | |
} else if (rest.size() == 1) { |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include "heap.h" | |
Heap *initHeap(int maxSize) { | |
Heap *h = malloc(sizeof(Heap)); | |
if (h == NULL) { | |
return NULL; |
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
#include <stdio.h> | |
#include <limits.h> | |
unsigned int getbits(unsigned int x, int p, int n); | |
unsigned int setbits(unsigned int x, int p, int n, unsigned int y); | |
void print_bits(unsigned int x); | |
int main() { | |
print_bits(setbits((1 << 5) - 1, 3, 3, 10)); // x = 11111, y = 1010 => 10101 |
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
#include <bits/stdc++.h> | |
using namespace std; | |
typedef long long int ll; | |
#define FOR(i,s,x) for(int i=s;i<(int)(x);i++) | |
#define REP(i,x) FOR(i,0,x) | |
#define ALL(c) c.begin(), c.end() | |
#define UNIQUE(c) sort(ALL(c)), c.erase(unique(ALL(c)), c.end()) | |
const int INF = INT_MAX; |
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
#include <bits/stdc++.h> | |
using namespace std; | |
#define FOR(i,s,x) for(int i=s;i<(int)(x);i++) | |
#define REP(i,x) FOR(i,0,x) | |
struct DisjointSet { | |
vector<int> parent, rank; | |
DisjointSet(int N) { |
NewerOlder