A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.
python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
| window.scrollTo(0, 0) | |
| var bodyRect = document.body.getBoundingClientRect(); | |
| var items = Array.prototype.slice.call( | |
| document.querySelectorAll('*') | |
| ).map(function(element) { | |
| var rect=element.getBoundingClientRect(); | |
| return { | |
| element: element, | |
| include: (element.tagName === "BUTTON" || element.tagName === "A" || (element.onclick != null) || window.getComputedStyle(element).cursor == "pointer"), |
| import os | |
| import torch | |
| import psutil | |
| import datasets | |
| import glob | |
| from transformers import ( | |
| AutoTokenizer, LlamaConfig, LlamaForCausalLM, Trainer, TrainingArguments, | |
| DataCollatorForLanguageModeling | |
| ) |
| # train_grpo.py | |
| # | |
| # See https://github.com/willccbb/verifiers for ongoing developments | |
| # | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer |
| import random | |
| class TreapNode(object): | |
| def __init__(self, key, data): | |
| self.key = key | |
| self.ran = random.random() | |
| self.size = 1 | |
| self.cnt = 1 | |
| self.data = data | |
| self.left = None |
| ''' | |
| Non-parametric computation of entropy and mutual-information | |
| Adapted by G Varoquaux for code created by R Brette, itself | |
| from several papers (see in the code). | |
| This code is maintained at https://github.com/mutualinfo/mutual_info | |
| Please download the latest code there, to have improvements and | |
| bug fixes. |
A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.
python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
| view icons: https://fontawesomeicons.com/ | |
| {"name":"Font Awesome v5.0.1", "icons":[ | |
| "fab fa-500px", | |
| "fab fa-accessible-icon", | |
| "fab fa-accusoft", | |
| "fas fa-address-book", "far fa-address-book", | |
| "fas fa-address-card", "far fa-address-card", | |
| "fas fa-adjust", | |
| "fab fa-adn", |
| <script type="text/javascript"> | |
| window.MathJax = { | |
| jax: ["input/TeX", "output/CommonHTML"], | |
| extensions: ["tex2jax.js"], | |
| TeX: { | |
| equationNumbers: { autoNumber: "AMS" }, | |
| extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"] | |
| }, | |
| /* The MathJax API provides us with the ability to register | |
| callbacks on signals broadcast during its startup sequence. |
| #include "var.h" | |
| #include <stdio.h> | |
| #define hello1(s) hello2(s, "default string") | |
| void hello2(const char *s, const char* s2) { | |
| printf("hello2 %s and %s\n", s, s2); | |
| } | |
| #define hello(...) xglue(hello, PP_NARG(__VA_ARGS__))(__VA_ARGS__) |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #ifdef _MSC_VER | |
| #include <intrin.h> /* for rdtscp and clflush */ | |
| #pragma optimize("gt",on) | |
| #else | |
| #include <x86intrin.h> /* for rdtscp and clflush */ | |
| #endif |