Não use UUID
como PK nas tabelas do seu banco de dados.
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
#library import | |
import duckdb | |
import configparser | |
from duckdb.experimental.spark.sql import SparkSession as session | |
from duckdb.experimental.spark.sql.functions import col, when, lit | |
#read configs from secrets file | |
config = configparser.ConfigParser() | |
config.read('duck_db_demo/secrets.ini') | |
user = config['POSTGRES']['USER'] |
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
defmodule MyAppyWeb.TaskTestLive.Index do | |
use MyAppWeb, :live_view | |
require Logger | |
@impl true | |
def mount(_params, _session, socket) do | |
# Trap exits to catch when a Task is forcibly cancelled. | |
Process.flag(:trap_exit, true) | |
socket = |
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 { Prisma, PrismaClient } from '@prisma/client'; | |
import { exec } from 'child_process'; | |
import * as util from 'util'; | |
const execPromisify = util.promisify(exec); | |
const prisma = new PrismaClient(); | |
const tables = Prisma.dmmf.datamodel.models | |
.map((model) => model.dbName) | |
.filter((table) => table); |
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
#! Aaaaaaaaaaa this is JS!!! | |
// https://github.com/tc39/proposal-hashbang | |
// This file is mixing all new syntaxes in the proposal in one file without considering syntax conflict or correct runtime semantics | |
// Enjoy!!! | |
// Created at Nov 23, 2018 | |
for await(const x of (new A // https://github.com/tc39/proposal-pipeline-operator | |
|> do { // https://github.com/tc39/proposal-do-expressions | |
case(?) { // https://github.com/tc39/proposal-pattern-matching | |
when {val}: class { |
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 controllers.graphql | |
import com.google.inject.{Inject, Singleton} | |
import keycloak.{GraphQLAction, Upload, VerifiedToken} | |
import models.graphql.GraphQL | |
import models.graphql.error.{AuthenticationException, ContentException, NotFoundByIDException, PermissionException} | |
import models.graphql.schemas.context.SangriaContext | |
import play.api.libs.json.{JsObject, JsString, Json} | |
import play.api.mvc.{AbstractController, Action, AnyContent, ControllerComponents, Request, Result} | |
import sangria.marshalling.playJson._ |
Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
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
/* | |
* MIT License | |
* | |
* Copyright (c) 2023-2024 Fabio Lima | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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 _ from 'lodash'; | |
/** | |
* Deep diff between two objects - i.e. an object with the new value of new & changed fields. | |
* Removed fields will be set as undefined on the result. | |
* Only plain objects will be deeply compared (@see _.isPlainObject) | |
* | |
* Inspired by: https://gist.github.com/Yimiprod/7ee176597fef230d1451#gistcomment-2565071 | |
* This fork: https://gist.github.com/TeNNoX/5125ab5770ba287012316dd62231b764/ | |
* |
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
name: CI | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: |
NewerOlder