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
package org.example; | |
import java.io.IOException; | |
import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
import org.apache.lucene.document.Document; | |
import org.apache.lucene.document.Field; | |
import org.apache.lucene.document.StringField; | |
import org.apache.lucene.document.TextField; | |
import org.apache.lucene.index.DirectoryReader; | |
import org.apache.lucene.index.IndexWriter; |
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 streamlit as st | |
from elasticsearch import Elasticsearch | |
def main(): | |
st.title("Streamlit ES Viewer") | |
with st.form("my_form", clear_on_submit=False): | |
keyword = st.text_input("keyword", "Python") | |
title_weight = st.number_input( | |
label="title weight", value=1.0, min_value=0.0, max_value=5.0, step=0.1 |
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 javax.annotation.Nullable; | |
public class Employee { | |
private String firstName; | |
private String lastName; | |
private Integer age; | |
public Employee(String firstName, String lastName, Integer age){ | |
this.firstName = firstName; | |
this.lastName = lastName; |
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
--- | |
title: "distance_graph" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
library(ggplot2) | |
``` |
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 <bits/stdc++.h> | |
#define REP(i, x) REPI(i, 0, x) | |
#define REPI(i,a,b) for(int i=int(a);i<int(b);++i) | |
#define ALL(x) (x).begin(), (x).end() | |
typedef long long ll; | |
using namespace std; | |
int main() { |
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 | |
BASE_DIR="/path/to/imagenet/train" | |
ALL_DIRS=`ls $BASE_DIR | grep -v .tar | grep -v .sh` | |
total_size=0 | |
total_count=0 | |
for dir in $ALL_DIRS | |
do | |
target_dir="${BASE_DIR}/${dir}" |
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 argparse | |
import onnx | |
import numpy as np | |
from onnx import numpy_helper | |
from PIL import Image | |
def relu(x: np.ndarray) -> np.ndarray: | |
return np.maximum(x, 0) |
I have tried the quickstart of https://github.com/blue-oil/blueoil/tree/master/dlk .
venv ❯ PYTHONPATH=python/dlk python python/dlk/scripts/generate_project.py --help
Options:
-i, --input_path PATH protobuf path which you want to convert to C
codes
-o, --output_path TEXT output path which you want to export any
generated files
NewerOlder