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 math | |
# Constants | |
SUN_RADIUS = 696340000 # meters | |
SUN_POWER = 3.828e26 # watts | |
DYSON_SPHERE_THICKNESS = 1 # meter | |
DYSON_SPHERE_STANDOFF = 5 # meters | |
METAL_DENSITY = 7874 # kg/m^3 (assuming iron) | |
NUCLEAR_PLANT_POWER = 1000e6 # watts (1000 MW, typical large nuclear plant) | |
NUCLEAR_PLANT_MASS = 200000000 # kg (estimated mass of a nuclear power plant) |
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
(test_env) zby@zby-Z4:~/llm/litellm$ pip install -e . | |
Obtaining file:///home/zby/llm/litellm | |
Installing build dependencies ... done | |
Checking if build backend supports build_editable ... done | |
Getting requirements to build editable ... done | |
Preparing editable metadata (pyproject.toml) ... done | |
Collecting importlib-metadata>=6.8.0 | |
Downloading importlib_metadata-8.2.0-py3-none-any.whl (25 kB) | |
Collecting openai>=1.40.0 | |
Downloading openai-1.40.3-py3-none-any.whl (360 kB) |
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
The answer to the question:" | |
How is transparency defined in the AI Act and what transparency requirements apply to low-risk Ai systems? | |
" is: | |
Transparency in the EU AI Act is not explicitly defined as a single concept. Instead, it is addressed through various obligations for providers and deployers of AI systems to ensure that users and affected individuals are informed about the nature and capabilities of the AI systems they interact with. | |
For AI systems that are not classified as high-risk (which could be considered lower-risk), the key transparency requirements include: | |
1. Informing users of AI interaction: Providers must ensure that AI systems intended to interact directly with natural persons inform people they are interacting with an AI system, unless it's obvious. |
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 requests | |
import json | |
from string import Template | |
#question = input("Enter your question: ") | |
question = "What was the first major battle in the Ukrainian War?" | |
# load the api key from a file | |
with open("config.json", "r") as f: |
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
# tested on Ubuntu 20.04 and 21.04 | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y dist-upgrade | |
# UNZIP INSTALLATION | |
sudo apt-get -y install unzip | |
# PYTHON 3 INSTALLATION |
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
(ns login-app.ex) | |
(use 'ring.middleware.session | |
'ring.util.response) | |
(defn handl [{session :session uri :uri headers :headers}] | |
(let [body | |
(str | |
"<html><body>" | |
session "<br>\n" |
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
$ cat src/login_app/core.clj | |
(ns login-app.core) | |
(defn handler [request] | |
{:status 200 | |
:headers {"Content-Type" "text/html"} | |
:body "Hello World"}) | |
[ snip ] |
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
sub frobnicate { | |
my( $self, $data ) = @_; | |
... | |
$self->twiddle( $data ); | |
... | |
} | |
sub twiddle { | |
my( $self, $data ) = @_; | |
... |
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
while ( my $data = $self->next ) { | |
my $featues = Text::FeatureCount->new->analyze($data->{content}); |
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
sub frobnicate { | |
#... | |
my $dbh = MyApp->dbh; | |
#... | |
} | |
# or | |
sub frobnicate { | |
#... |
NewerOlder