#off-topic-lounge-text
1 messages Β· Page 9 of 1
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
I don't grant streaming privileges until a user has been voice-verified.
@sick pagoda
I don't have any __init__.py files
I am just importing the function from a specific module
the one you are importing is in the same directory level on the file that you run
what in the blazes
test
````
// Ill try to convert this simple IA to python as my first job learning this language
@opalmist
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#define LOG_TITLE "simpleIA.log"
void vTraceMsg(char *szMsg){
FILE *pfLog;
if ( (pfLog=fopen(LOG_TITLE, "a+")) == NULL )
return;
fprintf(pfLog, "%s", szMsg);
fclose(pfLog);
}
int main()
{
struct timeval current_time;
char szMsg[256];
// Define the learning rate and the number of iterations
double learning_rate = 0.01;
int num_iterations = 1000;
// Define the training data as arrays of inputs and outputs
double inputs[] = {1, 2, 3, 4, 5};
double inputs2[] = {10, 20, 30, 40, 50};
double outputs[] = {2, 4, 6, 8, 10};
double outputs2[] = {100, 200, 300, 400, 500};
// gettimeofday(¤t_time, NULL);
// srand(current_time.tv_usec);
// Initialize the weights and bias to random values
double w = rand() / (double) RAND_MAX;
double b = rand() / (double) RAND_MAX;
sprintf(szMsg, "Initial Bias w: %.24f\n", w);
vTraceMsg(szMsg);
sprintf(szMsg, "Initial Bias b: %.24f\n", b);
vTraceMsg(szMsg);
// Iterate over the training data and update the weights and bias
for (int i = 0; i < num_iterations; i++)
{
vTraceMsg("~~~~~~~~~~~~~~~~~~~~~\n");
sprintf(szMsg,"\tIteration [%d]\n", i);
vTraceMsg(szMsg);
for (int j = 0; j < 5; j++)
{
// Calculate the predicted output given the input and current weights and bias
double prediction = w * inputs[j] + b;
// Calculate the error between the predicted and actual output
double error = prediction - outputs[j];
sprintf(szMsg, "prediction: %.24f\n", prediction);
vTraceMsg(szMsg);
sprintf(szMsg, "error = prediction - outputs[%d];\n", j);
vTraceMsg(szMsg);
sprintf(szMsg, "%.24f = %.24f - %.24f;\n", error, prediction, outputs[j]);
vTraceMsg(szMsg);
// Update the weights and bias based on the error and learning rate
w = w - learning_rate * error * inputs[j];
b = b - learning_rate * error;
vTraceMsg("\n\tNew Updated Bias:\n");
sprintf(szMsg, "w = %.24f, b= %.24f;\n", w, b);
vTraceMsg(szMsg);
}
vTraceMsg("~~~~~~~~~~~~~~~~~~~~~\n");
}
// Print the final weights and bias
printf("Final weights: %.24f\n", w);
printf("Final bias: %.24f\n", b);
vTraceMsg("~~~~~~~~~~~NEW INPUTS:~~~~~~~~~~\n");
for (int j = 0; j < 5; j++)
{
// Calculate the predicted output given the input and current weights and bias
double prediction = w * inputs2[j] + b;
double error = prediction - outputs2[j];
w = w - learning_rate * error * inputs[j];
b = b - learning_rate * error;
sprintf(szMsg, "NEW prediction: %.24f\n", prediction);
vTraceMsg(szMsg);
vTraceMsg("\n\tNew Updated Bias:\n");
sprintf(szMsg, "w = %.24f, b= %.24f;\n", w, b);
vTraceMsg(szMsg);
}
vTraceMsg("~~~~~~~~~~~END NEW INPUTS~~~~~~~~~~\n");
return 0;
}
@night lily
around like.. a lot of time, but I code everything as Im coidng C
now I want to use every lang as it should be
like if a python guy see my codes would go .. WOW you waste a lot
kkkkkkkkkk
Thx!
for the tips
import datetime,time
import sys
LOG_TITLE="simpleIA.log"
def trace_msg(message):
f = open(LOG_TITLE, "ab")
datetm = dttmm.strftime(β%d/%m/%Y %H:%Mβ)
f.write(datetm + ": " + message)
if __name__ == '__main__':
### Parametros - ##
# $ python simpleIA.py learning_rate iteration_ctr
#
#
#
if len(sys.argv) < 3 :
print("Argumentos insuficientes")
sys.exit()
learning_rate = sys.argv[1]
iteration_ctr= sys.argv[2]
trace_msg(learning_rate + " " + iteration_ctr+ " ")
print(success)
ufff
it took me long
did we have a compiler or interprter here?
do we *
@night lily
no problem
ill run it on my shel
thx anyway
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!live
!live
could sombody tomorrow evening help me finish my game im kinda slow at learning coding and i need to be with a final starter game at monday
if i want to continue learning where i learn
its in pygame
!code
Adjust time if minutes exceed 59
if current_time % 100 >= 60:
current_time = (current_time // 100 + 1) * 100 + (current_time % 100 - 60)
thanks
I tried this and built a controller but ngl the game is not really done lol
be warned if u are gonna play
I mean u can mine and buy ships but most the endpoints are not made yet
good practice to display different things tho
if u wanna display the map or all ur ships make a page you can control the actions from
I hella wish there were more fleshed out apis like this though
its like https://schemaverse.com/ but they're pretty cool how they give u a handle on the data
this game kinda died years ago tho
!voice π
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
As to streaming, ask a moderator level user or above if you see them around on voice chat.
It's given out on a temporary, discretionary basis for a limited period of time.
Both restrictions are in place for good reasons. While regrettably (though surmountably) restricted, it effectively eliminates far greater negatives.
That is to say, the voice trolls who balk at the barrier to their instant gratification and those who would stream pornography in an all ages, public server where you ought be able to expect that not to happen.
It does appear, however, that you may have either met or soon will all of the requirements for unmuting. π
So see the verification channel and go from there and you'll be set. π
I typically grant them on an as needed basis at first. If one of the mods+ are in the VC at the time you want it, just give us a shout
We'll grant it if we're available
ok
well i wanted to stream my coding to https://discord.com/channels/267624335836053506/764232549840846858
i dont have voice perms because im just under the 3 day mark
but ill be muted anyway
(by myself not bc im a troublemaker dw)
What kind of code you working on? And I know, plenty of folks hang out muted
That part doesn't bother me
well its sort of a setup ui for a console modding method
there arent any others ive seen, so im probably the first to work on something like it
Oh wait, is this the one you had a help thread open for yesterday?
yes
yes
Uhhhhhh, for your sake, I would encourage you to not be using a modded Discord client (or browser plugin that modifies it)
It does, but it's against their ToS to use something different. They don't really actively hunt for people who are, but I wouldn't broadcast it
If that makes sense
There's a reason I'm telling you rather than bringing the hammer down
I prefer to let people fix stuff. Willy nilly banning is just poor form
exactly
!stream 1125447822540537866
β @native raft can now stream until <t:1695307465:f>.
insert excitement noises
@native raft https://www.retroreversing.com/WiiUFileFormats
thanks man
afk
WE UP π₯π₯π₯π₯π₯
ah
there is a time limit
nvm afk again
:(
WE UP π₯π₯π₯π₯π₯
afk again
ok im back
Give me a bit
That tracks
found it
!stream 1125447822540537866
β @native raft can now stream until <t:1695309649:f>.
!stream 310809255387070468
β @rocky plank can now stream until <t:1695309723:f>.
oh wait that's your hemlock

i didn't know that there was an emoiji created
hemlock
π¦ llama emoji, but doesn't look like that lol
!d pathlib.PurePath.stem
The final path component, without its suffix:
>>> PurePosixPath('my/library.tar.gz').stem
'library.tar'
>>> PurePosixPath('my/library.tar').stem
'library'
>>> PurePosixPath('my/library').stem
'library'
I saw someone asking the question but don't remember where is the discussion.
To list all files in a folder without subfolders, usepathlib.Path.iterdir() , it returns iterator object, use it to iterate each entry, which provides the method is_file()
hello @buoyant kestrel
I'm not really available to do that right now
thats ok
@primal bison What's your avatar?
I just pulled off the internet lol.
No deep meaning behind it.
Is it a rabbit?
It's cute.
people.
Hey guys
me when i dig down
real :(
what is @rocky plank coding
you can't see because screenshare rights
oooohhhhhhhh
hi
i
Hey
Hey
Hey
can anyone give me access so i share my screen
i want to do live coding on django source code
@buoyant kestrel
!stream 440959117717274624
β @median mantle can now stream until <t:1695673955:f>.
Hi, affiternom
β @median mantle can now stream until <t:1695674433:f>.
π
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
It's theraputic I guess π
Yeah honestly
π
hi
@vocal obsidian
this is like the only discord server I know that wants more than 10 messages sent just to use vcs
this is dumb af
like why?
its dumb
hi
π Looking for a study buddy to dive into Machine Learning with!
β° Ideal if you're in or around my timezone (UTC +2).
π§ Should have some familiarity with:
RNN (Recurrent Neural Networks)
LSTM (Long Short-Term Memory)
π² Regression Trees
Feel free to reach out if you're interested!
LINUX MINT ON MAC π₯π₯π₯π₯π₯π₯π₯π₯π₯π₯ (in other words, taking down corprate greed one step at a time)
Any body?
heey guys
hey mods actively watching this channel if there are any can i stream
Probally
(i need perms to stream)
hello
how are you all doing
can i ask u all for help in css and html
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
.main{
width: 100%;
height: 100vh;
background : url('../image/image.png')center center;
background-size: cover;
}
.overlay{
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
}```
this doesn't wrk
the overlay function does not work
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css/custom.css">
</head>
<body>
<div class="main">
<div class="overlay"></div>
</div>
<script src="js/app.js"></script>
</body>
</html>
this is the html document
@brazen wave@chilly spear@placid elm@bitter jackal
can anyone of you guys help
@random forge
yup ?
can you help
you haven't stated the problem tho
what is the problem ?
what is your question?
the overlay doesn't work
have you tried z-index to place that layer above all the other ones?
you will also need to give it some transparency (and I believe your 0.7 in the alpha channel is meant for that)
the share screen doesn't work T-T
βWalk the killer's path.β βI seek only the strongest.β βCatch their trail.β βComfort breeds weakness.β βA true hunter never rests.β βThe scent of prey.β β ...
@bitter jackal is your krisp noise suppression on
that is true
i spent twice on the chair
than the table
OMG he can stream !!!!!!!!!!!!!
for x in board:
for y in x:
@frigid glade
Can you increse the text size @fresh zodiac
for x in board:
for y in x:
@fresh zodiac
Bye @fresh zodiac
hi
hey
ooh live coding text
Smart Series
Given an integer N, find the maximum sum that you can get from the following series: 12 - 23 + 34 - 45 .... K*(K+1), where K<=N.
Input Format
The first line of input contains T - number of test cases. Its followed by T lines, each contains a single integer N.
Output Format
For each test case, print the result, separated by newline.
Constraints:-
30 points
1 <= T <= 100
1 <= N <= 100
70 points
1 <= T <= 105
1 <= N <= 109
Example
Input
2
3
5
Output
8
18
CODE LINK:-
https://www.ideone.com/9Tr4qG
VERDICT:-TLE
FOR LARGE SIZE CASES IE FOR 70 POINTS CONSTRAINTS
Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages.
Help me with this question
can anyone help me learn python im will start learning nos
cazzo ragazzi voi non ci crederete
quello stronzo di burgher
vabbè vado a cagasmerdare
hello
a
py'''
py```
@xTrace(1000)
def x1vCompress(v, s):
return [x for x,s in zip(v, s) if s]
#tmin:0.02470 0.02953
@xTrace(1000)
def x2vCompress(v, s):
return [a for x, a in enumerate(v) if s[x]]
#tmin:0.02537 0.03060
py```
@xTrace(1000)
def x3vCompress(v, s):
return [v[x] for x, a in enumerate(s) if a]
#tmin:0.02535 tmeans 0.02981
Hi
```py
code
```
(py after ``` not before)
I think this version of markdown treats whatever before ``` as if it was on the previous line
i know i just relly never use this often π
it's slightly different to how into-html markdown deals with newlines when there are multiple empty lines
I was just showing what im working on π
@west pilot i worked with it
sorry @exotic crater i can't speak
i need a voice-verification
hello
sup
data = [1,2,3,-2,5,0,7]
def selection_sort(list):
n = len(list)
for i in range (n):
for j in range(1, n):
if list[i] > list[j]:
list[i], list[j] = list[j], list[i]
return list
a = selection_sort(data)
print (a)
!e
data = [1,2,3,-2,5,0,7]
def selection_sort(list):
n = len(list)
for i in range (n):
for j in range(1, n):
if list[i] > list[j]:
list[i], list[j] = list[j], list[i]
return list
a = selection_sort(data)
print (a)
@chrome zealot :white_check_mark: Your 3.12 eval job has completed with return code 0.
[-2, 7, 5, 3, 2, 1, 0]
code
!e
data = [1,2,3,-2,5,0,7]
def selection_sort(list):
n = len(list)
for i in range (n):
for j in range(n):
if list[i] > list[j]:
list[i], list[j] = list[j], list[i]
return list
a = selection_sort(data)
print (a)
@chrome zealot :white_check_mark: Your 3.12 eval job has completed with return code 0.
[7, 5, 3, 2, 1, 0, -2]
!e
data = [1,2,3,-2,5,0,7]
def selection_sort(list):
n = len(list)
for i in range (n):
for j in range(n):
if list[i] > list[j]:
list[i], list[j] = list[j], list[i]
print (list)
return list
a = selection_sort(data)
print (a)
@chrome zealot :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | [-2, 2, 3, 1, 5, 0, 7]
002 | [2, -2, 3, 1, 5, 0, 7]
003 | [3, -2, 2, 1, 5, 0, 7]
004 | [3, 2, -2, 1, 5, 0, 7]
005 | [3, 2, 1, -2, 5, 0, 7]
006 | [5, 2, 1, -2, 3, 0, 7]
007 | [5, 3, 1, -2, 2, 0, 7]
008 | [5, 3, 2, -2, 1, 0, 7]
009 | [5, 3, 2, 1, -2, 0, 7]
010 | [5, 3, 2, 1, 0, -2, 7]
011 | [7, 3, 2, 1, 0, -2, 5]
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/NL3QXX2J7KEIDV6UOMQIRFUWCQ
Have you guys ever work with tensorflow
@buoyant heath :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | import tkinter as tk
004 | File "/lang/python/default/lib/python3.12/tkinter/__init__.py", line 38, in <module>
005 | import _tkinter # If this fails your Python may not be configured for Tk
006 | ^^^^^^^^^^^^^^^
007 | ImportError: libtk8.6.so: cannot open shared object file: No such file or directory
:incoming_envelope: :ok_hand: applied timeout to @buoyant heath until <t:1696905547:f> (10 minutes) (reason: newlines spam - sent 131 newlines).
The <@&831776746206265384> have been alerted for review.
I haven't and this is not very active channel to ask questions
You may ask here #python-discussion
https://youtu.be/K3dhCJmWHn8?si=HIzQ1suT-Buqkyqe
Live coding in VueJs
Live coding valutnog konvertera u VueJs-u
https://youtu.be/99l_j_wpf10?si=CFitns3aDqOQg8yK
Live coding in Flask
Live coding in Python/Flask + HTML in Croatian
Live coding u Pythonu i HTML-u na hrvatskom jeziku
hiiii
hi
hey
!e
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.
Currently only 3.12 version is supported.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
!code
!code
!code
!e print('Hello, World!')
!code
print("Hello world!")
Hello world!
In this video I'll show how to implement a few simple, but useful functions in our flask webapp. The video is a bit laggy, so I will also provide source code link: https://github.com/AntonioLabinjan/IceCream/tree/master
hey
print("did this work!")
Pfp brother
how do i get a group of numbers to roung up to the nearest 10?
because i think i did it wrong
Nice π
test
:incoming_envelope: :ok_hand: applied timeout to @royal forge until <t:1697812064:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
print("poop!")
File "/usr/local/lib/python3.9/site-packages/thrift/protocol/TCompactProtocol.py", line 305, in __readUByte
result, = unpack('!B', self.trans.readAll(1))
File "/usr/local/lib/python3.9/site-packages/thrift/transport/TTransport.py", line 66, in readAll
raise EOFError()
EOFError
I don't undestand this error
could you guy please suggest me?
happens when your standard input ends unexpectedly when calling input()
print('i love tacos')
code
from pyboy import PyBoy
def start_game(num_games):
pylist_pyboy=[]
count = 0
for pylist_pyboy in range(num_games):
pylist_pyboy[num_games] = PyBoy("Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb")
print(pylist_pyboy)
while True:
while count < num_games:
pylist_pyboy[count].tick()
count += 1
count = 0
if __name__ == '__main__':
start_game(1)
Traceback (most recent call last):
File "C:\Users\plunk\Desktop\codedeck\pygame-codedeck\ai\main.py", line 17, in <module>
start_game(1)
File "C:\Users\plunk\Desktop\codedeck\pygame-codedeck\ai\main.py", line 7, in start_game
pylist_pyboy[num_games] = PyBoy("Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb")
~~~~~~~~~~~~^^^^^^^^^^^
TypeError: 'int' object does not support item assignment
from pyboy import PyBoy
def start_game(num_games):
pylist_pyboy=[]
count = 0
for i in range(num_games):
pylist_pyboy[num_games] = PyBoy("Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb")
print(i)
while True:
while count < num_games:
pylist_pyboy[count].tick()
count += 1
count = 0
if __name__ == '__main__':
start_game(1)
name shadowing
for i in range(num_games):
pylist_pyboy[i] = PyBoy("Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb")
print(i)
while True:
where?
while True:
while count < num_games:
pylist_pyboy[count].tick()
count += 1
count = 0
does tick wait on the inside?
also, why not use for
why not
for emulator in pylist_pyboy:
emulator.tick()
avoid indexxingg whenever possible
this won't actually work, I think
it should be append instead
things = [thing for _ in range(how_many)]
from pyboy import PyBoy
def start_game(num_games):
count = 0
pylist_pyboy = [0]
for _ in range(len(pylist_pyboy)):
pylist_pyboy [_] = PyBoy("Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb")
while True:
while count < num_games:
pylist_pyboy[count].tick()
count += 1
count = 0
if __name__ == '__main__':
start_game(1)
tomorrow we will vc in the afk channel
never use [_]
lol what is that
_ is for discarding the value
!e
def start_game(num_games):
count = 0
pylist_pyboy = [0]
for _ in range(len(pylist_pyboy)):
pylist_pyboy [_] = "example"
start_game(2)
@dull anvil :warning: Your 3.12 eval job has completed with return code 0.
[No output]
and num_games is fully ignored there, btw
if it wasn't:
!e
def start_game(num_games):
count = 0
pylist_pyboy = [0]
for _ in range(num_games):
pylist_pyboy [_] = "example"
start_game(2)
@dull anvil :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 7, in <module>
003 | start_game(2)
004 | File "/home/main.py", line 5, in start_game
005 | pylist_pyboy [_] = "example"
006 | ~~~~~~~~~~~~~^^^
007 | IndexError: list assignment index out of range
!e
def start_game(num_games):
count = 0
pylist_pyboy = []
for _ in range(num_games):
pylist_pyboy.append("example")
print(pylist_pyboy)
start_game(2)
@dull anvil :white_check_mark: Your 3.12 eval job has completed with return code 0.
['example', 'example']
and this is one of correct ways
def run_n_instances_of_game(game:str, n: int):
games = [PyBoy(game) for _ in range(n)]
while True:
for game in games:
game.tick()
!e
def start_game(num_games):
count = 0
pylist_pyboy = ["example" for _ in range(num_games)]
print(pylist_pyboy)
start_game(2)
@dull anvil :white_check_mark: Your 3.12 eval job has completed with return code 0.
['example', 'example']
He's afk at the moment @keen knoll
Went to get some water
What did you want to ask?
where hemlock
not here
:(
weekends
its sunday though
Yeah he's not on Discord at the weekend.
:(
Sorry, I was a bit distracted. Could you repeat?
@keen knoll First start with a assembler which will turn assembly code into machine code.
Then you could write a compiled programming language which gets compiled into assembly then into machine code.
or bytecode instead of assembler language
@keen knoll
I had made a 8085 emulator and a assembler for it
https://github.com/xAspirus/8085_emu/blob/main/assembler is a very basic 2-pass assembler but does the job
but that's harder to debug at first
bytecode is the same as a real cpu instruction set
what are you discussing?
just that bytecode is emulated through software instead of having a hardware implementation
gamingbuddhist
π
not necessarily
LLVM bytecode, for example
Errrrm, I don't know π
perhaps they just forget to lock them
or JVM/CLR/etc.
You'd have to ask Hem.
this then gets compiled to machine code
and this sometimes gets compiled (JITted usually)
Yeah we decided to stick with dedicated separate text channels for the other voice channels for the time-being. I'm not sure why the built-in #764232549840846858 text channel is unlocked.
associated are only easier to use when there is a stream
Β―_(γ)_/Β―
!stream 752512860004810772
β @inner schooner can now stream until <t:1697993020:f>.
@empty night What do you want to code? π
!stream 1053732836693258391
β @keen knoll can now stream until <t:1697993078:f>.
Not sure if it was you asking sorry.
Mints? π€
You mean how do you extend a list?
@fresh zodiac What was it you were asking sorry?
Oh right. So presumably you're trying to access an index which is beyond the end of the list.
You'd need to add elements to the end of the list if you want it to be longer.
a=[]
What values do you want to add to the list?
from pyboy import PyBoy
def start_game(num_games):
count = 0
pylist_pyboy = []
for _ in range(num_games):
num_games = _
pylist_pyboy[_] = num_games
for _ in range(len(pylist_pyboy)):
pylist_pyboy [_] = PyBoy("Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb")
while True:
while count <= num_games:
pylist_pyboy[count].tick()
if len(pylist_pyboy) >1:
count += 1
count = 0
if __name__ == '__main__':
start_game(2)
Ask me. I love writing regexes π
Can you give a couple of examples of input and output @inner schooner ?
*Product making*
<b>Product making</b>
markdown?
Ah right. What kind flavour of regular expressions does VSCode use again?
why not use a markdown libray
Right. Something like [*]([^*]+)[*] for the match pattern.
Then something like <b>\1<\b> for the replacement pattern.
You might need to escape the < in the replacement pattern, I'm not sure.
Try it and see. But maybe do the replacements one-by-one and check that they look correct.
([^*]+)
Yes, I believe you substitute a group into the replacement with \1.
That will substitute in the first group.
\1
literally anything (well not really)
Something useful, or just coding for fun?
Ah right π€
!e
import re
markdown_b_tag = re.compile(r"\*([^ ][^*]*[^ ]?)\*")
print(markdown_b_tag.sub(r"<b>\1</b>", "*Something* *Hello* *World* One * Two * Three"))
@inner schooner
@primal bison :white_check_mark: Your 3.12 eval job has completed with return code 0.
<b>Something</b> <b>Hello</b> <b>World</b> One * Two * Three
Erm, my pattern is a bit wrong I think π
useful and fun
Oh sorry it's Pycharm. Thought it was VSCode.
Erm, I'll check the manual...
Ah, so in Pycharm it's like $1 rather than \1.
how about recursive descent
@inner schooner
In the replacement pattern, that is.
<b>$1<\b>
π
Don't do "replace all" though, as there may be some false matches.
recursive desent markdown parser in my programming language
Are you using version control @inner schooner?
Make sure to commit your code before making any significant changes such as this.
That will allow you to revert the code if something goes wrong.
?
can i stream tetris?
making Tetris?
I dunno, I only really think code and code related things should happen in "live coding"
yeah
wait how does tetris work
well like
no how do i theoretically code it
ooo
?arch_type=$(uname -m)
!stream 710856373675491381
β @empty night can now stream until <t:1697995509:f>.
cool
!stream 360284932469293056
β @fresh zodiac can now stream until <t:1697995527:f>.
I just want to stream notepad that says "Because I can"
Β―_(γ)_/Β―
isn't it double * for bold?
in tg yes
but in telegram no
so
i'm creating a telegram bot
hm
so
in parse-mode * is a bold
italic is _
The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.
To learn how to createβ¦
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
what could i code
int someNum;
boolean condition = false;
Scanner kb = new Scanner(System.in);
while (condition == false) {
System.out.println("Enter a positive integer");
someNum = kb.nextInt();
try {
if (someNum < 0) {
throw new Exception("number is not positive");
}
condition = true;
} catch (InputMismatchException e) {
System.out.println("incorrect type");
} catch (Exception b) {
System.out.println(b.getMessage());
}
}
return someNum;
}```
tetris
isn't there something like this?
while (!condition)
you could write a wrapper iterator class and not use while loops at all
i didnt understand the problem
!condition
someNum = kb.nextInt(); should likely be inside try
also, shove return inside the loop
java -cp /tmp/PqsF633NL8 Main
Enter a positive integer
3
3
public static int getGoodInt(){
Scanner kb = new Scanner(System.in);
while (true) {
System.out.println("Enter a positive integer");
int someNum = kb.nextInt();
try {
if (someNum < 0) {
throw new Exception("number is not positive");
}
return someNum;
} catch (InputMismatchException e) {
System.out.println("incorrect type");
} catch (Exception b) {
System.out.println(b.getMessage());
}
}
}
no need for a flag
while (condition) {
or any other complexx logic
boolean condition = true;
@fresh arch
the difference is that rust nicely explains whats the problem here
loop {
break 100;
}
yea rust is really nice
every single time I would prefer this over do-while
you could do this in rust
let sum_num = loop {
break 100;
};
which is super nice
thats not a issue with java
this also makes someNum local to an iteration
!condition
def get_good_int() -> int:
while True:
try:
some_num = int(input("enter a positive integer\n"))
if some_num < 0:
raise ValueError("not positive")
return some_num
except Exception as e:
print(e)
this is python, python doesnt care about safety
I just translated Java code to make it look simpler
0 Pyright errors
i can do this in C++ too
@dull anvil :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 2, in <module>
003 | print(x)
004 | ^
005 | NameError: name 'x' is not defined
this code will not panic at runtime but pyright still complains
def foo() -> int:
sum_num: int # You can do this
condition = False
while not condition:
sum_num = 100
condition = True
return sum_num
foo()
yeah, because that's the right thing to do for it
and a hint at "this code is logically wrong regardless of whether it works"
does not silence Pyright
(but might silence PyCharm, I guess?)
PyCharm generally is less caring
while True/while (true) is very much a correct way to retry-get a value
as shown by Rust's loop+break value;
there are two compilers in case of Java
the part that complains isn't JIT
clang doesnt warn me for some reason
#include <stdbool.h>
int foo(void) {
int sum_num;
bool condition = false;
while (!condition) {
sum_num = 100;
condition = true;
}
return sum_num;
}
int main(void) {
foo();
}
no warnings
the problem is that you have a invariant which is true at runtime but which is not possible for the compiler to guaranty to be true
PyCharm's language server sometimes does branch analysis too, I think
like, very minimal
(I might be misremembering and I don't care enough about PyCharm to check)
invariant, depending on interpretation, is either covariant and contravariant or neither
in this example,
sum_num will always be initialized
but the compiler doesn't know this
list of integers is not a list of objects
because it's mutable
an example of invariance
so the thing is something like this is possible for a compiler to analyze
but it would be too much work
and other times its impossible to do because of the halting problem
its C
!e
list0: list[int] = [0,1,2]
list1: list[object] = list0 # error
list1.append("test")
print(list0)
@dull anvil :white_check_mark: Your 3.12 eval job has completed with return code 0.
[0, 1, 2, 'test']
"there is always a fix to halting problem: timeout"
most programming languages coerce values into booleans
so for example in python
if "": is considered as false because its a empty string
while
if "" is False: would fail
yea like rust won't do it
many Java derivatives and very type strict languages don't
idk about something like SmallTalk
so if your variable is a boolean type then always prefer if a over if a == true and if !a over if a == false
so if your language does have boolean coercing
!!value will convert value into a boolean
in python
not not a should be the same as bool(a)
I think, it is always the same because not a is implemented as not bool(a)
```py
"test"
```
class test{
public static int getGoodInt(){
int someNum;
boolean condition = false;
Scanner kb = new Scanner(System.in);
do{
System.out.println("Enter a positive integer");
someNum = kb.nextInt();
kb.nextLine();
try {
if (someNum < 0) {
throw new Exception("number is not positive");
}
condition = true;
} catch (InputMismatchException e) {
System.out.println("incorrect type");
} catch (Exception b) {
System.out.println(b.getMessage());
}
} while (condition == false);
return someNum;
}
}
first, you should not start code on first line
second, missing language
it's never tabs
public static int getGoodInt(){
int someNum;
boolean condition = false;
Scanner kb = new Scanner(System.in);
do{
System.out.println("Enter a positive integer");
someNum = kb.nextInt();
kb.nextLine();
try {
if (someNum < 0) {
throw new Exception("number is not positive");
}
condition = true;
} catch (InputMismatchException e) {
System.out.println("incorrect type");
} catch (Exception b) {
System.out.println(b.getMessage());
}
} while (condition == false);
return someNum;
}
@fresh arch right click this message, press "copy text", see what the source is
and there is no way to override __not__
only __bool__ and __len__ affect it
class test{
public static int getGoodInt(){
int someNum;
boolean condition = false;
Scanner kb = new Scanner(System.in);
do{
System.out.println("Enter a positive integer");
someNum = kb.nextInt();
kb.nextLine();
try {
if (someNum < 0) {
throw new Exception("number is not positive");
}
condition = true;
} catch (InputMismatchException e) {
System.out.println("incorrect type");
} catch (Exception b) {
System.out.println(b.getMessage());
}
} while (condition == false);
return someNum;
}
}```
still overcomplicated
conditionexistssomeNumdefined at function scope
this compiles
public static int getGoodInt(){
Scanner kb = new Scanner(System.in);
while (true) {
System.out.println("Enter a positive integer");
int someNum = kb.nextInt();
try {
if (someNum < 0) {
throw new Exception("number is not positive");
}
return someNum;
} catch (InputMismatchException e) {
System.out.println("incorrect type");
} catch (Exception b) {
System.out.println(b.getMessage());
}
}
}
tested on jdk-16.0.1
btw, just like original code, this doesn't check for non-int input
it just errors
while (true) never finishes and Java understands it
it even errors when you put something after
while (true) is interpreted in Java like loop in Rust
difference being that in Rust you must explicitly declare it as loop to get the special treatment
Sorry, is this java sub channel?
#1166024854378655825 can someone look into that
Yo what's going on voice chat
missing #! likely
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
I like the more minimal tone, but then again I have ADHD and can be easily distracted.
i remade the classic memz trojan in python
but its fully harmless
i even checked myself
hi
!voiceverify
...
Β» faq
Β» floats
Β» foo
Β» for-else
Β» fstring
Β» fstrings
Β» functions-are-objects
Β» global
Β» guilds
Β» identity
Β» if-name-main
Β» in-place
Β» indent
Β» inline
Β» intents
I want to update my excel cell with nifty spot price using python? could some one help me to get it done?
tags = ["faq", "floats", "foo", "for-else", "fstring", "fstrings", "functions-are-objects", "global", "guilds", "identity", "if-name-main", "in-place", "indent", "inline", "intents"]
async def main():
from banner import banner
print(Colorate.Horizontal(Colors.red_to_yellow, banner.strip()))
can someone help me with this? bc i try to put orange not yellow but it give me an error that says AttributeError: type object 'Colors' has no attribute 'red_to_orange'
!code
Hi! You can ask your question at #1035199133436354600 btw don't forget to publish whole code so it will be easier fot other understand your error and help
oh yeah sorry
Np
@torpid mantle why I am mut
!voice π
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Hi
I feel like I'm 23 and look 23 @opaque tusk
Lol
Hello
How are doing.
can't ya just gimme voice verify i promise I'll be niceeeeeeeee ||/j|| @unborn sorrel
@wary token that was a screenshot from a cp video
There is an ILLEGAL photo that is floating around that if you send it on Discord, YOU WILL GET BANNED. Doesn't matter if it's in DMs or in a Discord server.
This is not some bogus hoax or clickbait garbage, you will get banned. To try to figure out what's going on, I sent the image in an empty Discord server. I tested this on an alt account (an...
Itβs not about being nice. You have to fulfil the criteria.
says the voice verified
π₯±
!stream 225719271026589698
β @summer tendon can now stream until <t:1699285148:f>.
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
I got a meeting - will be back in abit π«‘
worked on this today https://replit.com/@amboworld/Amazon-search?v=1 gna add more features (check desc on repl to see) im gna make it a search utility so it can be intergrated into other projects that use amazon (that dont want to pay for the api lol)
Amazon search results web scraper by amboworld :)
-UK version of amazon (for now)
-Fetches URL, Title, Price of scraped products
Will add:
-Cover image URL scraping
-Support for amazons from differnent countries
-proxy rotation
-multi threading (speed up searching dramatically)
-multi page results
-CLI arguments
-output formats (json etc)
-writ...
!rule 9 @wicked scroll
woops, wrong chat
Hey
Hey can someone help me with something
l1 = [2,2]
l2 = [1,1]
temp1 = []
temp2 = []
for i in l1:
temp1.append(str(i))
for elem in l2:
temp2.append(str(elem))
strlist1 = temp1[::-1]
strlist2 = temp2[::-1]
string1 = ""
string2= ""
for j in strlist1:
string1 = string1+j
for elem2 in strlist2:
string2 = string2+elem2
num1 = int(string1)
num2 = int(string2)
answerint = num1*num2
temp3 = str(answerint)
list1= []
for k in temp3:
list1.append(k)
print(list1[::-1])
This code works on vs but doesnt work on leetcode. In leetcode it displayes this error please help.
leetcode uses a linked list, not list
How can i fix this error?
have you seen how ListNode is defined?
No.
you're solving this, right?
https://leetcode.com/problems/add-two-numbers/
Yeah
reset the code, there will be a comment at the top
starting with # Definition for singly-linked list.
each node in a list has a value it stores and (optionally) a pointer to the next node
just like in the example they provide
ListNode(2, ListNode(4, ListNode(3)))
ListNode(5, ListNode(6, ListNode(4)))
ListNode(7, ListNode(0, ListNode(8)))
Alright... It says it cant be iterated and i dont see a solution without iterating the list
you can write your own iterator
Hmm can you give an example?
!e
def example(n):
while n:
yield n
n -= 1
for x in example(3):
print(x)
@dull anvil :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 3
002 | 2
003 | 1
Well. This complicates everything lmao
making this work with linked lists is relatively easy
the harder part is to then construct a linked list from elements
!e
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.
Currently only 3.12 version is supported.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
!e 3.12 print("Hello, world")
@crystal pilot :white_check_mark: Your 3.12 eval job has completed with return code 0.
Hello, world
ooh
!pep 582
hmmm yes time to code
no strem perms
:(
!stream
!live
where instructions
!screensharing
Π― ΡΠ°Ρ Π±ΡΠ΄Ρ ΡΠΊΠ°ΡΠΈΠ²Π°ΡΡ Π²Π΅ΡΡ ΠΈΠ½ΡΠ΅ΡΠ½Π΅Ρ.
hello everyone
Please where can I post a question about django and urlconf regular expression?
If I want to catch from the url: http://localhost:8000/dummy/search/?search=mystring everything after "dummy/" using re_path what is the regular expression that I should put to do so?
hey was going to do some coding in fortran could I have streaming perms
Few people know but Fortran is the best language, and it's actually in-demand.
!e 3.12
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.
Currently only 3.12 version is supported.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
!eval 3.12 <import math
def add(x, y):
return x + y
def subtract(x, y):
return x - y
def multiply(x, y):
return x * y
def divide(x, y):
if y != 0:
return x / y
else:
return "Cannot divide by zero"
def exponentiate(x, y):
return x ** y
def square_root(x):
return math.sqrt(x)
def calculator():
# Get user input
num1 = float(input("Enter first number: "))
operator = input("Enter operator (+, -, *, /, **, sqrt): ")
if operator in ('+', '-', '*', '/'):
num2 = float(input("Enter second number: "))
else:
num2 = None
# Perform calculation based on the operator
if operator == "+":
result = add(num1, num2)
elif operator == "-":
result = subtract(num1, num2)
elif operator == "*":
result = multiply(num1, num2)
elif operator == "/":
result = divide(num1, num2)
elif operator == "**":
result = exponentiate(num1, num2)
elif operator == "sqrt":
result = square_root(num1)
else:
result = "Invalid operator"
# Display the result
print(f"Result: {result}")
Run the calculator
calculator()
@primal bison :x: Your 3.12 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | <import math
003 | ^
004 | SyntaxError: invalid syntax
!eval 3.12
import math
def add(x, y):
return x + y
def subtract(x, y):
return x - y
def multiply(x, y):
return x * y
def divide(x, y):
if y != 0:
return x / y
else:
return "Cannot divide by zero"
def exponentiate(x, y):
return x ** y
def square_root(x):
return math.sqrt(x)
def calculator():
# Get user input
num1 = float(input("Enter first number: "))
operator = input("Enter operator (+, -, *, /, **, sqrt): ")
if operator in ('+', '-', '*', '/'):
num2 = float(input("Enter second number: "))
else:
num2 = None
# Perform calculation based on the operator
if operator == "+":
result = add(num1, num2)
elif operator == "-":
result = subtract(num1, num2)
elif operator == "*":
result = multiply(num1, num2)
elif operator == "/":
result = divide(num1, num2)
elif operator == "**":
result = exponentiate(num1, num2)
elif operator == "sqrt":
result = square_root(num1)
else:
result = "Invalid operator"
# Display the result
print(f"Result: {result}")
# Run the calculator
calculator()
@primal bison :x: Your 3.12 eval job has completed with return code 1.
:warning: Note: input is not supported by the bot :warning:
001 | Enter first number: Traceback (most recent call last):
002 | File "/home/main.py", line 54, in <module>
003 | calculator()
004 | File "/home/main.py", line 26, in calculator
005 | num1 = float(input("Enter first number: "))
006 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
007 | EOFError: EOF when reading a line
hey - how to check installed version for specific python library or tool like:
- nes-py
- tensorflow
- gym-super-mario-bros
ask in #1035199133436354600
who dared ping me
lol I did but i attached all my code in a 7z and python don't like that
I've seen this code in a stupid youtube shorts video
MemberJoinMonitoring:
creation_time All commands related to the Creation time trigger.
βNo Category:
help Shows this message
Type $help command for more info on a command.
You can also type $help category for more info on a category.
least confusing way of storing data
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.
Currently only 3.12 version is supported.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
d
no . lol
Some of the classes in collections.abc have mixin methods.
Basically, methods for free.
What is the hard disk for?
Is it... upside down?
It's a HARD disk!
In the middle of voice chat text channel?
Ah.. I see.
Can't be ignored.
Hi boni
Makes sense. Not really supposed to be used actively.
Can you help me
Though, yea. I've wondered what it now looks like.
Mm.This is so weird though. A UI framework within Discord.
Do you have a testing ground for this?
Just resting.
Been a lo----ng week.
Does talking through it verbally help you think?
!vmute 1162403198745706648
:incoming_envelope: :ok_hand: applied voice mute to @primal bison permanently.
You did. You woke up my need to correct you behavior
damn it sorry
im sorry i will try not to do it again :<
im like thierd af NOTHING I CAN do
the server is dead af
ok ok
i will not do it again sorry
ok?
:<
damn you ENGLISH
I think the move here is to proceed to the next step in the list
bargaining ?
or ?
and wtf is even that mean ?
oh nvm
ohhh
yooo
then thanks :>
Perhaps you were looking at this chart instead
thats great then you shut me off
π
i can hear
but not speak
ok
ty btw sorry i have bad behavor @buoyant kestrel
Wow...
ok nvm if i was even activating my mic on
they all was saying my notebooks fan was killing thyere ears
@buoyant kestrel but can i share sometimes screen ?
i mean like i do gaming
i mean for fun
might i share my screen
just the screen
Nah
I just took away one permission, why would I give you a different one right away
its fun not something not right THO
well cos im saying that cos the mic was not right but the screen sharing is okay
just chilling
its good
:>
pls ?
The begging makes it even less likely you'll get it in the future
but why ?
how does the system work like this ? BRUH
π€
ah
pls i want to just to share screen for chilling that is also good for the server :>
they can come here and watch me gaming and chilling
@buoyant kestrel ?
π¦
im sorry what i did
if you would forgive me i will not do again sorry
bye.
sorry

Any early returns from inside the after callback?
def callback():
print("Time for printf debuggin!")
return
after(200, callback) # Won't reschedule
def update_button():
ttk.Label(frame1, text=f"${load_portfolio()['equity']}").grid(column=1, row=2)
ttk.Label(frame1, text=f"${load_portfolio()['withdrawable_amount']}").grid(column=1, row=3)
ttk.Label(frame1, text=f"${get_current_price('BTC')['ask_price']}").grid(column=3, row=1)
ttk.Label(frame1, text=f"${get_current_price('DOGE')['ask_price']}").grid(column=3, row=4)
root.mainloop()
recursive_update()
def recursive_update():
root.after(200, update_button())

May be try this: https://stackoverflow.com/a/25753719
update_button() returns None
So root.after(200, update_button()) becomes root.after(200, None).
from functools import partial
def update_labels(l1,l2,l3):
...
root.after(200,partial(update_labels,a,b,c))
``` Is what hem was getting at previously btw
We don't get extra for OTs π’
Surprised you didn't get blocked with the constant polling.
hello
selection = ""
while not selection:
print("do something")
selection = input("enter to continue or anything else when finished.")
Hey! Why don't we have permission to speak in the Python meetings you set up? We can only listen. Or maybe that's just happening to me? π€ Let me know what's up!
$help
MemberJoinMonitoring:
creation_time All commands related to the Creation time trigger.
βNo Category:
help Shows this message
Type $help command for more info on a command.
You can also type $help category for more info on a category.
$creation_time
$[creation_time|crt]
All commands related to the Creation time trigger.
creation_time
@buoyant kestrel join vc1?
Can't at the moment
wow
aa
@mellow solar here ^^
@mellow solar
Goal
now
for rivi in range(10):
for sarake in range(10):
naytto.blit(robo, (50 + 50 * sarake, 100 + 50 * rivi))
for rivi in range(10):
for sarake in range(10):
naytto.blit(robo, (50 + (rivi * 10) + 50 * sarake, 100 + 50 * rivi))
the only change i made was adding the (rivi*10) to the X coordinate in order to induce an increasing displacement for every row
@young pulsar you worked so much you broke your leg twice?
rivi = row, sarake = column
import pygame
pygame.init()
naytto = pygame.display.set_mode((640, 480))
robo = pygame.image.load("robo.png")
naytto.fill((0, 0, 0))
for rivi in range(10):
for sarake in range(10):
naytto.blit(robo, (30 + (rivi * 20) + 30 * sarake, 60 + 30 * rivi))
pygame.display.flip()
while True:
for tapahtuma in pygame.event.get():
if tapahtuma.type == pygame.QUIT:
exit()
120 + (rivi * 30) + 30
What is an example of something you cannot do?
What about in terms of proficiency?
ill make any script as long as it isnt used for harmful purposes
What are you bad at?
ive mastered python
probably making games
thats my only problem
im still learning that
Sounds like a project. I wish you good fortune in the endeavour.
btw its not that i cant delete bootstrap or harm pcs i dont want to cuz if i run it on my pc im dead
Destruction is simple.
boutta send u one in ur dms
No, you aren't.
it will make ur memory to 100% if u check task manager
yes
i am
use it for any malicious content
and uhhhhhh
act like i didnt give it to you
It needn't be an act at this point.
proof?
Can't stop that which hasn't begun.
well just stop talking to me
Very well. I wish you a restful sleep.
Streaming permissions are given to "Voice Verified" roled users upon request to an already-present voice-regular moderator-level user or above at their discretion. You are asking them to monitor your stream.
If you see Mr. Hemlock, Mindful Dev, Alex, Griff or Luna in voice chat, just ask them. π
nice
Permissions (to begin your stream) are usually temporary.
hello there
hi
guys any no about gsoc
idk, i suppose you just apply and pass or fail
Tf
how can i share my screen in the live coding channel ?
Screen sharing permissions are granted on a temporary basis by voice-regular, moderator-level-and-above users at their discretion. Usually, the appropriate time to request permissions is when they're in voice chat.
oh, thanks!
The people to look out for currently are Mr. Hemlock, Mindful Dev, Alex and Luna.
can anyone help me with my project ?
euribor
hello i have a problem
file_path = "C:\Users\koltu\Desktop\SIKERTEN\Project"
extend = "\"
file_merge = file_path + extend
its the code
i want to share it with my friend
it works on me fine but when he tries to install he cant run it cuz of path
how can i make it work?
Heres the problem I'm trying to solve with code. Let's say we run the code 10 times, we want A, B, and C to be different every time but within their constraints and we want the numbers to ALWAYS add up to 15. What is this type of problem called? And from a math perspective how would you go about solving it?
I understand there's a limited number of combinations here and you could iterate through the numbers to find all the possible combinations then choose from those combinations at random, is that the best way to do this? How would you write that out on paper?
so i guess we cant store data between runs of the code but i'd try to use time some how to find one bc time is always unike and if a b and c can be floats there are infinite versions so id do something like:
import time
s=time.time()
while True:
s-=1
if s<7 and not locals('a'):
a=s
elif s>3:
b=s
else:
c=15-(a+b)
break
print(a,b,c)
Codes taking a longgg time to run for me, if i were to scale this up where there are thousands of solutions idk if this would be the best method? What do you think
i didnt think of how to do that but time.time gives a huge numbers so this would take long u need to somehow remove most of s with something first like %10 just i dont know if that works on floats
so u could try to replace s=time.time() with s=time.time()%10
u could also multiply s by some number if u run the code rarly like by 10 if u run it multyiple times in 10s but not so many times in 1s
I thought about it later id do something more like
import time
s=time.time()/(10**20)#with 10**20 it might fail in 10**20s
a=7-s
b=3+s
c=15-(a+b)
print(a,b,c,a+b+c)
hey good people can someone help me
catto
I am on it bro
Hey which coc extension would you prefer for python code interpreter in nvim
hi
hey

