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
#include <iostream> | |
#include <regex> | |
using namespace std; | |
int alphabet[26]; | |
void tokenized(int a, int c) { | |
alphabet[a - 1] += c; | |
} |
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
#!/bin/bash | |
############################################ | |
# Initialization Script for Amazon Linux 2 | |
############################################ | |
# Run "sudo yum update" to apply all updates. | |
sudo yum update -y | |
# Set the Timezone to KST |
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
; ~/.config/nvtop/interface.ini | |
; Please do not edit this file. | |
; The file is automatically generated and modified by nvtop by pressing F12. | |
; If you wish to modify an option, use nvtop's setup window (F2) and follow up by saving the preference (F12). | |
[GeneralOption] | |
UseColor = true | |
UpdateInterval = 1000 | |
ShowInfoMessages = true | |
[HeaderOption] |
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
$ curl -X PUT http://XXX.XXX.XXX.XXX:XXXX/ \ | |
-H 'Content-Type: application/json' \ | |
-d '{"prompt": "this movie was sucks!"}' | jq |
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
CONTAINER_ID=$(docker ps --format '{{.Names}}') | |
docker exec $CONTAINER_ID /usr/sbin/service ssh start |
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
#include <iostream> | |
#include <math.h> | |
#include <stdio.h> | |
// Kernel function to add the elements of two arrays | |
__global__ | |
void add(int n, float *x, float *y) { | |
int index = blockIdx.x * blockDim.x + threadIdx.x; | |
int stride = blockDim.x * gridDim.x; | |
for (int i = index; i < n; i += stride) |
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 { serve } from "https://deno.land/std@0.95.0/http/server.ts"; | |
const s = serve({ port: 8000 }); | |
console.log("http://localhost:8000/"); | |
for await (const req of s) { | |
req.respond({ body: "Hello World\n" }); | |
} |
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
// References: https://cloud.google.com/vision/docs/detecting-faces#vision_face_detection_gcs-drest | |
package main | |
import ( | |
vision "cloud.google.com/go/vision/apiv1" | |
"fmt" | |
"golang.org/x/net/context" | |
"google.golang.org/api/option" | |
pb "google.golang.org/genproto/googleapis/cloud/vision/v1" | |
"io" |
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 google.auth | |
from google.cloud import bigquery | |
from google.cloud import bigquery_storage_v1beta1 | |
# Explicitly create a credentials object. This allows you to use the same | |
# credentials for both the BigQuery and BigQuery Storage clients, avoiding | |
# unnecessary API calls to fetch duplicate authentication tokens. | |
def bigquery_auth(project_id: str = 'edith-xxx') -> None: | |
logging.info('[AUTH] Create a credentials.') |
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 ubuntu:18.04 | |
# Install dependencies | |
RUN apt-get update && \ | |
apt-get -y install apache2 | |
# Install apache and write hello world message | |
RUN echo 'Hello World!' > /var/www/html/index.html | |
# Configure apache |
NewerOlder