sudo apt update && sudo apt upgrade
import java.time.LocalDate; | |
import static java.time.Month.APRIL; | |
import static java.time.Month.DECEMBER; | |
import static java.time.Month.JANUARY; | |
import static java.time.Month.MAY; | |
import static java.time.Month.NOVEMBER; | |
import static java.time.Month.OCTOBER; | |
import static java.time.Month.SEPTEMBER; | |
import java.time.MonthDay; | |
import java.time.Year; |
"""Entrypoint to invoke the FastAPI application service with.""" | |
from fastapi import FastAPI, status | |
from pydantic import BaseModel | |
import uvicorn | |
app = FastAPI() | |
class HealthCheck(BaseModel): |
import java.math.BigDecimal; | |
import java.math.RoundingMode; | |
import java.time.Duration; | |
import java.time.Instant; | |
public class CalcUtil { | |
private static final BigDecimal MULTIPLIER_NANO_TO_SECONDS = new BigDecimal(1.0E9D); | |
/** | |
* Calculate the elapsed time in seconds |
//usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS io.smallrye.reactive:smallrye-mutiny-vertx-web-client:1.1.0 | |
//DEPS io.smallrye.reactive:mutiny:0.7.0 | |
//DEPS org.slf4j:slf4j-nop:1.7.30 | |
package io.vertx.mutiny.quotes; | |
import io.smallrye.mutiny.Multi; | |
import io.smallrye.mutiny.Uni; |
import com.google.common.base.Defaults; | |
import com.google.common.collect.Sets; | |
import javax.annotation.Nonnull; | |
import java.beans.BeanInfo; | |
import java.beans.Introspector; | |
import java.beans.PropertyDescriptor; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.util.Set; |
o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?
Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch:
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j