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
FROM dhcf:debian AS markdownworker | |
WORKDIR /worker/markdown | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
python3-venv bash \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Copy the requirements file into the container |
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 os | |
import time | |
import shutil | |
import itertools | |
# Define folder paths | |
folder_path = "/home/spinningca-t/workers/listener/new/" | |
moved_folder_path = "/home/spinningca-t/workers/listener/done/" | |
unsupported_folder_path = "/home/spinningca-t/workers/listener/unsupported/" |
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
#!/bin/bash | |
# Exit on error | |
set -e | |
command -v docker >/dev/null 2>&1 || { echo "Docker is not installed. Aborting." >&2; exit 1; } | |
command -v docker-compose >/dev/null 2>&1 || { echo "Docker Compose is not installed. Aborting." >&2; exit 1; } | |
VERSION=${VERSION:-"1.0.0"} # Use environment variable if set, otherwise default | |
DOCKER_REGISTRY=${DOCKER_REGISTRY:-""} # Leave empty for local use |
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
app: | |
image: node:23-bookworm | |
container_name: nodeapp-with-openapi2 | |
build: | |
context: . | |
dockerfile: Dockerfile.node | |
ports: | |
- "9002:9002" | |
volumes: | |
- .:/usr/src/app |
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
// This is your Prisma schema file, | |
// learn more about it in the docs: https://pris.ly/d/prisma-schema | |
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? | |
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init | |
generator client { | |
provider = "prisma-client-js" | |
} |
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 time | |
import pandas as pd | |
import requests | |
# Constants | |
API_URL = "https://nominatim.openstreetmap.org/search" | |
HEADERS = {"User-Agent": "MyPythonApp/1.0 ([email protected])"} | |
CSV_FILE = "neighbourdata.csv" | |
MAX_ROWS_TO_PROCESS = 70000 | |
API_DELAY = 1 # Delay in seconds to avoid hitting API rate limits |
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
=> [internal] load build definition from Dockerfile 0.1s | |
=> => transferring dockerfile: 1.52kB 0.0s | |
=> [internal] load metadata for docker.io/amd64/alpine:3.21.2 0.5s | |
=> [internal] load .dockerignore 0.1s | |
=> => transferring context: 2B 0.0s | |
=> [internal] load build context 0.2s | |
=> => transferring context: 33.73kB 0.0s | |
=> [osbase 1/14] FROM docker.io/amd64/alpine:3.21.2@sha256:b7adcabf8c8320af2f49b10a 0.1s | |
=> => resolve docker.io/amd64/alpine:3.21.2@sha256:b7adcabf8c8320af2f49b10a8ba9336f2 0.1s | |
=> CACHED [nodethin 2/7] RUN mkdir -p /app 0.0s |
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 xml.etree.ElementTree as ET | |
osm_file = 'outputfile2.osm' | |
root = tree.getroot() | |
target_relation_id = '18765511' | |
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
app.post('/api/register', async (req, res) => { | |
const { email, name, password, userType } = req.body; | |
// Check if all required fields are present | |
if (!email || !name || !password || !userType) { | |
return res.status(400).json({ success: false, message: "All fields are required" }); | |
} | |
// Check if the email is already registered | |
const existingUser = await prisma.user.findUnique({ |
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
// Models below is not certain can be changed with times. | |
// I migrated that models right now. If it changes some content in api may change. | |
// If this case happens. That won't be issue to update apis. | |
// User Model | |
model User { | |
id Int @id @default(autoincrement()) | |
Email String @unique | |
Name String | |
Password String | |
UserType String |
NewerOlder