Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.
Avoid being a link dump. Try to provide only valuable well tuned information.
Neural network links before starting with transformers.
Smith, | |
Johnson, | |
Williams, | |
Brown, | |
Jones, | |
Garcia, | |
Miller, | |
Davis, | |
Rodriguez, | |
Martinez, |
class OpsIPInfoAdmin(admin.ModelAdmin): | |
def get_readonly_fields(self, request, obj=None): | |
# make all fields readonly | |
readonly_fields = list( | |
set([field.name for field in self.opts.local_fields] + | |
[field.name for field in self.opts.local_many_to_many]))) | |
if 'is_submitted' in readonly_fields: | |
readonly_fields.remove('is_submitted') |
import com.google.gson.Gson | |
import okhttp3.Interceptor | |
import okhttp3.Response | |
import okhttp3.ResponseBody | |
import org.json.JSONException | |
/** | |
* Logout Interceptor. | |
* Here i extend the BaseActivity to navigate user to another screen. i need runOnUIThread to execute navigateToLogin() method. |
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { | |
@Override | |
public void onScrollStateChanged(RecyclerView recyclerView, int newState) { | |
super.onScrollStateChanged(recyclerView, newState); | |
int firstCompletelyVisibleItemPosition = ((LinearLayoutManager) recyclerView.getLayoutManager()) | |
.findFirstCompletelyVisibleItemPosition(); | |
boolean isVideo = recyclerView.getAdapter() | |
.getItemViewType(firstCompletelyVisibleItemPosition) == TYPE_MOVIE; |
public class AddHeaderInterceptor implements Interceptor { | |
@Override | |
public Response intercept(Chain chain) throws IOException { | |
Request.Builder builder = chain.request().newBuilder(); | |
builder.addHeader("Authorization", "headerContent"); | |
return chain.proceed(builder.build()); | |
} | |
} |
get uri from filechooser picker
content://com.android.providers.downloads.documents/document/2303
con getRealPath(context,uri) se obtiene la ruta absoluta
file:///storage/emulated/0/Download/google-play-badge.png
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
def render_to_response(self, context, **response_kwargs): | |
from django.conf import settings | |
STATIC_URL = settings.STATIC_URL | |
if 'http' not in STATIC_URL: | |
# wkhtmltopdf requires full uri to load css | |
from urlparse import urlparse | |
parsed = urlparse(self.request.META.get('HTTP_REFERER')) | |
parsed = '{uri.scheme}://{uri.netloc}'.format(uri=parsed) | |
context["STATIC_URL"] = "{}{}".format(parsed, settings.STATIC_URL) |
-- Get Max ID from table | |
SELECT MAX(id) FROM table; | |
-- Get Next ID from table | |
SELECT nextval('table_id_seq'); | |
-- Set Next ID Value to MAX ID | |
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |