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 __future__ import absolute_import | |
import io | |
import os | |
import json | |
import sys | |
import re | |
# Imports the Google Cloud client library | |
from google.cloud import vision | |
#function for googlevision | |
def getFuckingKeywords(file_path, fileName,dirName): |
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 { Module } from '@nestjs/common'; | |
import { AppController } from './app.controller'; | |
import { AppService } from './app.service'; | |
import { TypeOrmModule } from '@nestjs/typeorm'; | |
import { join } from 'path'; | |
import { LightSaberModule } from './light-saber/lightsaber.module'; | |
import { USERNAME, PW, DB } from './secrets'; | |
@Module({ | |
imports: [ | |
TypeOrmModule.forRoot({ |
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
{ | |
"name": "star-wars-backend", | |
"version": "0.0.1", | |
"description": "", | |
"author": "Nils Weiser", | |
"license": "MIT", | |
"main": "dist/main.js", | |
"scripts": { | |
"prepare": "npm run build", | |
"pretest": "npm run build", |
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 { NestFactory } from '@nestjs/core'; | |
import { AppModule } from './app.module'; | |
const HOST = '0.0.0.0'; | |
const PORT = Number(process.env.PORT) || 8080; | |
async function bootstrap() { | |
const app = await NestFactory.create(AppModule); | |
// app.enableCors(); | |
await app.listen(PORT, HOST).then(() => { | |
// tslint:disable-next-line:no-console |
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 { Injectable } from '@nestjs/common'; | |
import { Lightsaber } from './lightsaber.entity'; | |
import { Repository, DeleteResult } from 'typeorm'; | |
import { InjectRepository } from '@nestjs/typeorm'; | |
@Injectable() | |
export class LightsaberService { | |
constructor( | |
@InjectRepository(Lightsaber) | |
private lightsaberRepository: Repository<Lightsaber>, |
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 { Controller, Get, Post, Body, Param, Put, Delete } from '@nestjs/common'; | |
import { LightsaberService } from './lightsaber.service'; | |
import { Lightsaber } from './lightsaber.entity'; | |
@Controller('light-saber') | |
export class LightsaberController { | |
constructor(private lightsaberService: LightsaberService) { } | |
@Get() | |
getAll() { | |
return this.lightsaberService.getAll(); |
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 { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'; | |
@Entity() | |
export class Lightsaber { | |
@PrimaryGeneratedColumn() | |
id: number; | |
@Column() | |
name: string; | |
@Column() | |
color: string; |
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 { Module } from '@nestjs/common'; | |
import { LightsaberController } from './lightsaber.controller'; | |
import { LightsaberService } from './lightsaber.service'; | |
import { Lightsaber } from './lightsaber.entity'; | |
import { TypeOrmModule } from '@nestjs/typeorm'; | |
@Module({ | |
controllers: [LightsaberController], | |
providers: [LightsaberService], | |
imports: [ |
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
package ch.codify.springbootgae.movie; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.*; | |
import java.util.List; | |
import java.util.Optional; |
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
package ch.codify.springbootgae.movie; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
import javax.persistence.*; | |
@Data | |
@AllArgsConstructor |
OlderNewer