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.
class Messaging(object): | |
def __init__(self, user, sender, receiver, message): | |
self.user = user | |
self.sender = sender | |
self.receiver = receiver | |
self.message = message | |
def send(self): | |
required_points = self.get_required_points() | |
if required_points > self.user.points: |
# API Reference¶ | |
The WebFaction [XML-RPC](http://en.wikipedia.org/wiki/XML-RPC) API provides | |
methods to make many account tasks scriptable. This documentation is a | |
complete reference to all of the possible API methods. | |
Please note that XML-RPC parameters are positional (order matters), and many | |
parameters are required. Parameters may only be omitted if omitted parameters | |
have default values and follow all other parameters to which you have supplied | |
a value. |
import os | |
import sys | |
import shutil | |
pkgname = sys.argv[1] | |
venv = sys.argv[2] | |
pyversion = '%s.%s' % (sys.version_info[0], sys.version_info[1]) | |
try: | |
pkgobj = __import__(pkgname) |
from django.contrib import admin | |
from mysite.models import Survey, Question, Choice | |
class QuestionInline(admin.TabularInline): | |
model = Question | |
show_change_link = True | |
class ChoiceInline(admin.TabularInline): | |
model = Choice |
""" | |
Bottle (and also Flask) seem to favor global request object that when called within | |
a request function handler, will return request data that specific to the current request. | |
This is convenience since it free you from having to pass request object from function to | |
function as you would have in Django. Maybe I'm too used with Django approach but having request | |
object explicitly passed to your function allow me to correctly think how to structure my app. | |
It's not just one time when designing a solution, I come to dead end because I try to access request | |
data not from request context. It easy to fall into that because the request object available in the | |
global namespace. |
""" | |
Copyright 2017 k4ml@twitter.com. | |
Permission to use, copy, modify, and/or distribute this software | |
for any purpose with or without fee is hereby granted, provided | |
that the above copyright notice and this permission notice appear in all copies. | |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE |
// https://tutorialedge.net/golang/reading-console-input-golang/ | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strings" | |
) |
last updated: 4/5/2011
note that this stuff is always a moving target, much of this has been cribbed and combined from various blog posts. Much of the information was out of date from those, and if it is more than a couple months after the last updated date above, consider some of this likely to now be out of date.
local tg_token = 'your token' | |
if request.query['admin_command'] == 'setURL' and request.query['pass'] == 'xxx' then | |
local response = http.request { | |
url = 'https://api.telegram.org/bot' .. tg_token .. '/setWebhook', | |
params = { | |
url='https://demo-xxxx.webscript.io/script' | |
}, | |
method='post', | |
} |