#unix

1 messages Β· Page 34 of 1

obsidian light
#

sorry if to o many questions

torn snow
#

The package name is just "linux"

#

Okay so going to bet soon but basically you want to:

  • install the "linux" package
  • update your bootloader configs however you first set them up so that the latest kernel is an option
  • reboot into latest kernel
  • install linux-headers
  • install the rtlwifi-new package from before
obsidian light
#

Currently trying to update bootloader settings

#

its grub

obsidian light
#

I don't even think it's grub. I can't find what it is

obsidian light
#

Finally got it all working. Thanks so much @torn snow

oak shell
sage solar
#

Hmmmmm

#

Do i pay for this or instead continue to get paid for listening people tell me about this

vagrant fern
#

how linux works is insanely good

#

get it nix get it nix

sage solar
#

sadly

granite abyss
#

Does anyone know of a good screenshot tool that works well for ubuntu/kde neon? I need to be able to select an area to screenshot, and if I can upload to imgur with it, that's a plus

#

i get random grey blocks covering the image with shutter

#

Looks like kazam works but if anyone knows of one that lets you upload to imgur as well as select an area, I'm all ears

main olive
#

@granite abyss spectacle works great with KDE (I think it's a KDE tool?), allows you to select areas (as well as active windows etc) and upload directly to imgur

granite abyss
#

Hmm I don't think that one worked for me

#

Oh actually I can select a region

#

oo it automatically copies the direct img link hell yah

somber stirrup
#

Flameshot isn't bad

cold pagoda
#

I'm using flameshot as well, with Ubuntu/i3wm works well

somber stirrup
#

Xmonad is doing something funky with application focus so the keybinds are hit and miss for me

#

I think it's something to do with flameshot using a background daemon instead of the process used to launch it

granite abyss
#

ok ty lads!

robust cave
#

you guys with window managers tried maim? It's cool

spice relic
#

is unix is linux different...

#

and linux*

gilded basalt
#

Yes

#

Linux is a derivative of Unix

spice relic
#

Unix is an early Linux?

gilded basalt
#

It came before Linux

#

Unix has been around since the 60's

#

Linus Torvalds made Linux in the early 90's as what started as a personal project based on Minix, which was a variant of Unix designed for educational purposes

#

People thought it was interesting, so he threw it up on a FTP server for people to get it. A lot of people started using it and contributing fixes and code back to Linus.

#

It rapidly snowballed and is now the most widely used OS on the planet

spice relic
#

thanks for the history lesson!

somber stirrup
#

@robust cave looks promising, thanks!

blazing wolf
#

when should i be upgrading my linux distro? like ubuntu mate 19.04 and 19.10 are avilable and i am on 18.04.3 LTS

main olive
#

depends on what you're running

#

desktop pc? update away to 19.10

#

server? probably wanna hold off until the next lts (20.04)

blazing wolf
#

I am using a laptop

limpid sapphire
#

Get arch and you'll never ask yourself that question again πŸ˜„

uneven silo
#

yea, you'll just ask what might break this time

limpid sapphire
#

That's how you learn how to linux :p by breaking it, again and again

blazing wolf
#

i heard arch is nightmare? @limpid sapphire

#

for beginners

steel verge
#

I am not convinced that it solves my issue. What I need is to proxy any url of my choosing from http to https. Mostly streams. Is there a way to achieve that with Apache reverse proxy?

#

Without restarting the server, I might add

#

I can't seem to be able to wrap my head around it

#

Maybe I describe what I have in mind: Have a Virtual Host running on [::1]:80, which runs with SSLEngine On and the URI should look something like: https://[::1]:80/theother.example.com/stream.mp3, streaming the content to https from a non https source.

#

Or maybe someone knows a different solution, idk

main olive
#

nginx reverse proxy.

#

for streaming things, you should add the rule proxy_buffering off;

#

you'll want to extract the URI and pass that as a variable, so probably something like

location ~ ^/(.*) {
    proxy_buffering off;
    proxy_pass http://$1;
}
#

if i've got this right

#

(alongside your ssl-related rules of course)

steel verge
#

Thanks, but my whole project revolves around apache, switching to nginx before I really have to would require 2 days work at least

main olive
#

not too familiar with apache, sorry

#

but some googling tells me you cah achieve this with a mod_rewrite rule, something like this

RewriteRule ^/(.*) http://$1 [P,L]
#

@steel verge

#

no idea if this would work or if it's even valid syntax

#

this has some very serious security implications, though, and i hope you never allow public access to this

steel verge
#

Yep, that did the trick, combined with proxy_pass

#

thanks mate, you saved me lots of headache, I hate rewrite rules

#
<VirtualHost [fc00::1]:9999>
    SSLEngine On
    SSLCertificateFile /etc/letsencrypt/live/internal.tuxstash.de/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/internal.tuxstash.de/privkey.pem
    RewriteEngine On
    RewriteRule ^/(.*) http://$1 [P,L]
    ProxyPassReverse /  http://$1
    ErrorLog ${APACHE_LOG_DIR}/proxy.error.log
    CustomLog ${APACHE_LOG_DIR}/proxy.access.log combined
 </VirtualHost>```
#

When I now visit https://proxy.internal.tuxstash.de:9999/br-edge-100b-fra-dtag-cdn.sslcast.addradio.de/br/br3/live/mp3/56/stream.mp3, it properly plays the stream on https

#

Now Chrome can suck it πŸ˜„

#

Regarding security: I don't think it has that serious implications. It is a separate virtual host and nothing else is there. The rest of the system is still safe. I need to do it though, because German radio stations are too stupid to implement proper TLS and I need my app to continue to work with the new rules on Chrome @main olive

main olive
#

it has the same implications as any open proxy does, ie it can be abused by whomever to do evil things. Additionally, since this is a pretty iffy way of doing, it, you could do things like reverse proxying to localhost to access services running only on the loopback interface, which you probably definitely don't want

steel verge
#

Oh that. Yeah, I will have to find a way to wall that off and only allow domains I want to have there, but for now I got a working solution.

#

I can probably do that with a htaccess or something

royal marlin
#

@blazing wolf Arch is way way easier than gentoo :p

blazing wolf
#

hmm

royal marlin
#

"beginner" distros include debian, sometimes fedora, but mostly ubuntu

blazing wolf
#

yea im using ubuntu mate now, due to some issues im switching to open suse

#

i am going to try it out in the virtual box first

steel verge
#

Debian is really not a good desktop distribution

#

Depending on what you want the Linux Experience for, I'd go with Ubuntu for private and Fedora for professional experience

#

Reason being, that businesses mostly use RHEL and Fedora is as close to RHEL as it can go, save CentOS, which is not recommended for Desktop either

#

Fedora has the caveat of not having a lot of packages readily available and you need to install more sources to get newer packages

#

@blazing wolf

blazing wolf
#

So ur saying Fedora and Ubuntu?

#

What about open suse

steel verge
#

I personally don't like SuSE even though I am from Nuremberg

#

But, that is a personal preference

uneven silo
#

debian is fine for desktop

steel verge
#

I didn't say it does not work, I am just saying that Ubuntu offers the better experience and deep down, it is still a Debian πŸ˜„

#

I had severe hardware recognition issues with Manjaro though. Mint is on my shitlist for having hard coded DNS.

#

which can be disabled by stopping systemd-resolver, but the mere attempt is bs

uneven silo
#

mint is shit

#

manjaro is slightly less shit

steel verge
#

Yeah, but it refused to recognize my headset receiver as such and always tried to use it to connect to a WiFi

#

πŸ˜„

uneven silo
#

lmfao

steel verge
#

I mean, it is a WiFi Adapter, but it is not meant to be used as such. Mint at least connected my headset properly.

uneven silo
#

i'm tempted to try LFS, but at the same time, I don't want to lose my great arch setup

#

maybe I'll change when I get a new ssd

steel verge
#

install libvirt and run a VM

uneven silo
#

ohoh

#

how does that compare to virtual box?

main olive
#

it's a lot harder to set up but does a lot more

uneven silo
#

oh sweet

steel verge
#

eh, getting a simple vm running is really easy

uneven silo
#

will check out sometime this week

steel verge
#

I had more troubles with Hyper-V than virt-manager πŸ˜„

uneven silo
#

hyper-v yikes

#

virtualbox is less cranky than hyper-v

steel verge
#

try getting a usb port forwarded in hyper-v

#

welcome to hell

uneven silo
#

no thanks

main olive
#

passthrough is amazing via libvirt

#

love running games in my windows vm with full gpu acceleration

steel verge
#

I have been meaning to acquaint myself with IOMMU grouping, but didn't get around to it yet

uneven silo
#

@main olive thats what I want

#

what distro you run?

steel verge
#

It is possible, but be aware that passed through hardware is not available to the host anymore

#

so you either need 2 gpu or use the integrated for the host

main olive
#

arch, but it should be the same-ish setup across the board

uneven silo
#

hmmm

main olive
#

@steel verge i worked around this by using Looking Glass

uneven silo
#

do you have two gpus?

steel verge
#

Oh, there is a workaround now? Interesting

main olive
uneven silo
#

if I can just install arch/gentoo on my desktop when I upgrade and use a vm for games, I'd love that

steel verge
#

I am not sure how nice it plays with anti cheat though

main olive
#

haven't had any issues personally

#

only game that I can think of which I play that utilizes anti-cheat is Titanfall 2 though

steel verge
#

Titanfall 2 β™₯

#

One of my rare preorders

uneven silo
#

that good?

steel verge
#

Yeah

#

gotta run, work work work. bye

main olive
#

cya dude

uneven silo
#

seeya

gilded basalt
#

bye

main olive
#

ciao

sour trail
#

Anyone

#

Alive rn

#

I got stuck in tty mode

#

I wanna switch back to normal gui mode

#

How can I do that ?

uneven silo
#

try going to tty1

main olive
#

(or probably tty7 if Debian or derivative)

uneven silo
#

^^ I don't use Debian that much

sour trail
#

Ohh k

split pulsar
#

what's a good way to pass big number of arguments to script? I can't use env variables

#

doing ./script a b c d e f sounds bad?

main olive
#

I don't see why

#

loads of popular commands pass loads of arguments like that, something like

qemu param1 \
    param2 \
    param3 \
    param4
#

alternatively, consider passing a filename instead, where the params are stored (in a sensible format)

steel pewter
#

hi guys i am bit a noob on linux. Could you guys let me know how to close vs code from terminal (without using pkill electron)??
some other ways!!

#

using ubuntu 18.04*

warm wolf
#

killall code?

main olive
#

here's a oneliner which kills only code and leaves other electron processes intact

kill $(ps aux | grep "electron.*code.js" | head -n1 | awk '{print $2}')
oak shell
#

ps/grep GWchadMEGATHINK

#

please just use pgrep/pkill. It's made for that purpose exactly

main olive
#

pgrep does not exist on my system

oak shell
#

what system is that?

main olive
#

gentoo

oak shell
main olive
#

... in any case, there's nothing wrong with using my ps|grep for this if you don't have pgrep or pkill

#

of course, prefer the latter if you can, but he specifically said "without using pkill"

oak shell
#

"without using pkill electron" if we're gonna quote things

main olive
#

:l

oak shell
#

my response would be pkill -f code.js or so, depending on how the command line for vsc looks exactly

main olive
#

something like

/usr/lib/electron6/electron --no-sandbox /usr/lib/code/code.js
oak shell
#

and head -n1 is wrong, I think? You use that to filter out the grep process, I assume, but as ps is sorted by pid, this fails if your code process has a higher pid than grep, which happens once the pids overflow and start over.

#

would rather need a grep -v grep or so, I believe

#

which is one of the big problems with ps|grep

#

and it's not atomic

main olive
#
ps aux --sort=lstart

then

#

oh, hm, this doesn't take date into consideration

#

apparently

oak shell
#

complexity increases

main olive
#

screams in a posix-compliant manner

split pulsar
#

Is it possible to redirect all traffic from docker container (from 1 container, not all) through proxy without exposing env variables like HTTP_PROXY to that container?
It runs untrusted code

main olive
#

yes

#

you can set up a new virtual network adapter for the container to use

kind latch
#

Anyone has experince with viewvc and SVN authentication?

frank coral
#

Hey, I’d like to know how to clean up the working tree at /tmp/python-build.20191116213422.12827 I explained my situation more in details in #microcontrollers but I guess it’s more related to Unix.

sage solar
#

you delete it basically

#

@frank coral

spice relic
#

what exactly does the yum update command do?

#

nvm

#

yum install package_name
Used to install the latest version of a package or group of packages. If no package matches the specified package name(s), they are assumed to be a shell wildcard, and any matches are then installed.
yum update package_name
Used to update the specified packages to the latest available version. If no packages are specified, then yum will attempt to update all installed packages.

frank coral
#

Hello there,

I've a problem regarding the installation of the python module aiodns (I'm in a venv environnement in 3.7 using pyenv):

I installed it via pip and it looked fine:
Successfully installed aiodns-2.0.0
However when I try to use it in my project I get:
RuntimeError: Resolver requires aiodns library

πŸ€” So I tried to import it in shell, and here is the problem:
ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by /home/pi/D/my_venv/lib/python3.7/site-packages/pycares/_cares.cpython-37m-arm-linux-gnueabihf.so)

#

I did not delete the folder @sage solar before reinstalling python 3.7 with pyenv because it seemed to rewrite the folder, could it be the cause of the problem?

main olive
#

you probably just need to upgrade your distro's glibc

#

looks like CPython was built with 2.28, which is (maybe probably) newer than what you have

#

@frank coral what does ldd --version say

frank coral
#

ldd 2.24

#

the problem is here I think.

main olive
#

what distro are you running anyways?

warped nimbus
#

raspbian my guess

frank coral
#

(Debian GLIBS 2.24-11+deb9u4) 2.24 (raspbian)

main olive
#

well... there you have it

#

my suggestion? compile a newer glibc manually and point to it via LD_LIBRARY_PATH when running anything requiring pycares

#

maybe the unstable repos have a newer libc?

frank coral
#

that sounds like out of reach for me now ^^" Maybe downgrading aidons could works?

main olive
#

looks like it's an issue with pycares, which is a dependency of aiodns

frank coral
#

Yep, but downgrading aiodns will downgrade its dependencies requirement, doesn't it?

main olive
#

true

#

no harm in trying

frank coral
#

I do need to uninstall all its decencies as well before downgrading, no?

main olive
#

depends on whether it's listed as >=version or what, but I'd say yes just to be sure

frank coral
#

picards 2.4.0 still needs GLIBC_2.28

#

I'm slowly downgrading testing every combination...

#

@main olive I tried v 1.0.0 and it still needs GLIBC_2.28 but this version was released in 2015, is it normal? It looks to me that pycares is not well uninstalled

main olive
#

seeing as 2.28 wasn't even out in 2015, I wouldn't say so :p

frank coral
#

Well what I've done is fully removing aiodns from my code and it works...

main olive
#

just a thought - latest raspbian (buster) uses 2.28

#

tried upgrading?

frank coral
#

@main olive Maybe pycares in 3.7 needs it? Or uninstall pycares does not remove it completely

main olive
#

couldn't really say tbh, I'm not too familiar with pycares, sorry

frank coral
#

neither I am lol

#

But because it have C dependencies from what I've seen, pip may not remove it entirely

main olive
#

but yeah

#

I thoroughly suggest upgrading raspbian

frank coral
#

I think I'll need to, my current distrib' only support postrgesql 9...

main olive
#

πŸ‘ more the reason to

frank coral
#

and 3.7 will be supported natively

main olive
#

@frank coral let me know if you run into any issues while upgrading

frank coral
#

Ty I appreciate πŸ™‚

steel pewter
#

i installed python 3.6.8 and side by side got 3.7.5 too

#

and had python2 too
so yeah the new advances are cool too

zenith shale
#

Hello, folks. I'm looking for some script that can give me the full info about Linux machine. I need numbers of cores, ram, swap if any, hdd space (would be great to get model of hdd or to check if it's ssd or hdd), number of network interfaces, ip addresses, mac addresses.

uneven silo
#

any of the fetcher scripts should

#

or do you want it programmatically

#

although i dont know of any that give all of that info

main olive
#

@zenith shale sounds like a very easy script to write. Any reason you can't look up the commands to do those things and put them in a script yourself?

thorn prawn
main olive
#

@thorn prawn can you install... anything? does apt -y full-upgrade work

#

because I don't think python depends on nvidia stuff

#

in which case your installs a bit broken

steel pewter
#

hi guys i am new to python as well as linux and wanted to install scikit-learn for machine learning-
i am facing issue while installing scikit-learn:
python-version-3.8
pip-version-19
Issue:
Building wheel for scikit-learn (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/rishi/env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-29z5zpj/scikit-learn/setup.py'"'"'; file='"'"'/tmp/pip-install-29z5zpj/scikit-learn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-18pq3ort --python-tag cp38
what can be done to resolve it?

#

resolved the issue with upgrading the cython manually and then install sklearn

main olive
#

@steel pewter glad you solved your issue! Next time please use codeblocks for pasting code, makes it a lot more readable :)

#

!codeblock

shy yokeBOT
#

Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.

To do this, use the following method:

```python
print('Hello world!')
```

Note:
β€’ These are backticks, not quotes. Backticks can usually be found on the tilde key.
β€’ You can also use py as the language instead of python
β€’ The language must be on the first line next to the backticks with no space between them

This will result in the following:

print('Hello world!')
steel pewter
#

@main olive thanks buddy will keep in mind😁

blazing wolf
#

currently to install something using pip, i will have to use sudo, is there a way to change some settings and not use?

steel pewter
blazing wolf
#

yea i got that but generally for installing?

#

like i have to do sudo python3.8 -m pip install pipenv

#

but inside a pipenv, i dont have to use sudo

robust cave
#

are you installing it to use it user-wide or as a project dependency? @blazing wolf

blazing wolf
#

pipenv is for user-wide

#

not sure if im gonna need any tho

#

but in general how can i remove root user access for commands(specific commands)?

robust cave
#

just don't run those commands with sudo?

blazing wolf
#

it wont let me

robust cave
#

pass the --user flag to pip to do a user-local install, rather than a system-wide install

blazing wolf
#

okay

frank coral
#

Hey @main olive remember my compatibility problems? I did not change my distribution yet, but planning to do so. However I just thought about using Docker, could it be a solution?

main olive
#

definitely, yeah

tranquil steeple
#

Hello

#

I need help with only displaying the error message from a mkdir command

#

i only want it to display the error message as the output

#

mkdir -v /tmp /tmp/test

warm wolf
#

Then take off the verbose flag

tranquil steeple
#

its for an assignment and i have to use that command

#

i cant get it

#

i tried to pipe it into grep

#

but it still displays the whole line

warm wolf
#

Redirect 1>/dev/null? Bit silly though, why can't you just take off -v?

tranquil steeple
#

/dev/null is the black whole of the Linux filesystem. It discards whatever you write to it. Sometimes you only want to see the error messages or the successful output. Show just the error messages from mkdir -v /tmp /tmp/test.

#

i have to right the command that will do this

#

^^^^^

#

i thought it would be something like this

#

mkdir -v /tmp /tmp/test | grep " "

#

and put the error characters in the quotes

warm wolf
#

Yes that's exactly what I wrote, 1 is the stdout stream, if you redirect it to /dev/null you only get stderr outputted

tranquil steeple
#

mkdir -v /tmp /tmp/test | 1>/dev/null

#

?

warm wolf
#

No it's not a command, you don't pipe to it

tranquil steeple
#

it save the output to /dev/null

#

?

#

saves*

unkempt glen
#

Anyone able to help me out with a VIM issue? While working I will end up with a number of open buffers. I then decide I need to open another file and immediately hit Nerdtree. Once Nerdtree is open I realize that the file is already open in another buffer and so I immediately switch to that buffer to find that the Nerdtree is replaced with the buffer. What I would prefer is that Nerdtree closes and that my main buffer switches. Does that make sense?

warm wolf
tranquil steeple
#

ohhh

#

so i could do

#

mkdir -v /tmp /tmp/test 2>/dev/null

#

2 so its filters standard error

#

?

warm wolf
#

Filters out you mean

#

If so, yes

tranquil steeple
#

so i want 1 so the errors are the only thin left

#

?

warm wolf
#

Yes

#

You can try this yourself btw

tranquil steeple
#

the file contains no data with 1

#

with 2 it shows the error message

warm wolf
#

What do you mean, is that a question?

main olive
#

im trying to automate ftp using bash script but im having a error in the ftp command itself

#

@tranquil steeple you are redirecting stderr (numerical value of 2) to /dev/null

#

stdout, which is where standard output is usually put, has a numerical value of 1

#

I really don't understand why you can't just remove the -v flag

#
HOST=' ftp 10.1.1.1'
USER='name'
password='pass'
FILE='nmap.txt'

ftp $HOST <<END_SCRIPT
user $USER
$PASSWORD
pass 
put $FILE
get important.txt
bye
exit 0 ```
#

i get an error on the HOST part, it says command invalid

#

well, yeah

#

your command gets expanded to ftp ftp 10.1.1.1

#

does that seem correct to you

#

damn

#

thanks

#

:+1:

main olive
#

yeah me too

steel pewter
#

i am facing issue with the no module found if someone free who can guide me please reply

#

<@&267629731250176001>

outer reef
#

Is there an issue that needs moderation?

#

If not, then please don't ping everyone on the moderation staff

#

That role is only pingable so that users can let us know when there's something that needs resolved, not as a "get help now" button

steel pewter
#

Sorry..deeply sorry

outer reef
#

No worries, now you know. And I think you'll have to give more details about your question before anyone can really offer you any help

#

What module, what are you trying to do, etc.

#

!ask this embed offers a pretty good guideline on how to ask good questions

shy yokeBOT
#
ask

Asking good questions will yield a much higher chance of a quick response:

β€’ Don't ask to ask your question, just go ahead and tell us your problem.
β€’ Try to solve the problem on your own first, we're not going to write code for you.
β€’ Show us the code you've tried and any errors or unexpected results it's giving.
β€’ Keep your patience while we're helping you.

You can find a much more detailed explanation on our website.

steel pewter
#

I am new to python and linux and I use vscode for scripting--also i have set python3.8 as aliased to all the pther python versions i have
when the code i run in vscode with the environment set to python3.6 all the libraries get displayed and the code runs perfectly fine but when i try to run the script using python3.8 in terminal it throws the error no module found 'pandas'
i have checked the path for pip and the python-both are set to same but still confused of whats the reason behind this issue?
i am using pip virtual environment to install any package
from my look out i have no clue how to solve the issue?

wild kraken
#

anyone knows a solution to this

hearty sable
#

@wild kraken find a way to install libpython3.6

#

it's probably available in some repository

wild kraken
#

@hearty sable solved it by dumping debian and going over to arch

#

its too many dependencies tbh

hearty sable
#

wow that's uh

#

bit extreme

main olive
#

it's the right choice

#

:p

uneven silo
#

^^

#

The real purists use LFS, but Arch is acceptable

wild kraken
#

Hmm, now im into another issue

#

how does crontab work on arch

#

with cronie

main olive
wild kraken
#

@main olive read it but theres no information about how i input data

main olive
#

input data?

wild kraken
#

im getting error 127

#

using crontab -e

main olive
#

show log?

wild kraken
#

theres not much to show, one moment

main olive
#

do export EDITOR=nano

#

and try crontab -e again

#

it bails because by default, vi is set as the editor (which your system doesn't have for some reason) and crontab -e tries to execute the editor

#

worked? @wild kraken

wild kraken
#

@main olive 1 moment

main olive
#

whenever I try to ssh into another computer it keeps saying the connection was lost
does anyone know why?
Connection closed by [SERVER_IP].. by port 22
please help me

#

run your command with -vvvvvvvvv and send the log

#

!paste

shy yokeBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

main olive
#

use that

#

ok

#

exactly that amount?

#

of v

#

that should be enough

#

also I didn't do a command

#

the command to ssh in

#

I opened terminal

#

I went to shell

#

and clicked new remote connection

#

then tapped on the computer

#

do I have to do the command?

#

do ssh user@the-ip-you-want-to-ssh-into

#

ok then

#

for the password what do I put, mine or the other computer?

#

the remote user's password that you're trying to ssh into

#

ah ok

#

might have to do it tomorrow though

#

the other computer is being used right now

#

I'll notify you tomorrow if that's okay

#

I mean, ssh-ing in isn't going to disrupt any activites on the other machine

#

the person using the machine shouldn't even notice unless he's specifically looking for logs

#

it's not like rdp where it kicks the active session out

wild kraken
#

@main olive it worked great ^^

#

however having issues with asyncpg

main olive
#

pacman -S base-devel

wild kraken
#

whats that?

main olive
#

includes developer packages, ie packages for compiling shit

#

gcc is included, it's a c compiler

#

you'll probably need other things from that package group as well which is why i recommend installing the whole thing

wild kraken
#

ohhhh

#

what does gcc stand for?

main olive
#

GNU C Compiler

wild kraken
#

ah i see

main olive
#

GNU being the project which made/makes the software which most people refer to as the Linux OS

wild kraken
#

clear

#

woop

#

s

main olive
#

at least it wasn't your sudo password :p

wild kraken
#

yeah LUL

#

i see, theres alot to learn about the linux operative system, how long will it take to learn about it fluently

main olive
#

depends on what your target skill level is

#

not to toot my own horn, but i consider myself pretty adequately knowledgeable when it comes to linux, and i've been using it as my main operating system for 15 years

#

but it took me far, far less to get to the point where i felt comfortable using linux

wild kraken
#

i see, so you know most of it right now but you got comfortable with it much quicker

main olive
#

guess so

wild kraken
#

i see, i'm still quite new to it, however i really love how much easier it is compared to windows, i just need to remember the name

#

and i can download it on command

uneven silo
#

iirc gcc is actually the GNU Compiler Collection

wild kraken
#

instead of going trough sites and sites

uneven silo
#

it also includes Ada, Fortran, and maybe another compiler

#

@wild kraken software updates are much easier, ye?

wild kraken
#

yeah just a single command smciota

#

i'm still setting up the stuff i had in my debian

#

but i've come to yet another issue

#

but its netdata related

#

i mean

#

nginx

uneven silo
#

πŸ€” thats a new one

wild kraken
#

it complains at line 1

#

user www-data;

#

whats weird

#

how do i reboot nginx

uneven silo
#

systemctl restart <process>

#

works for any systemd process

#

nginx is one of those

wild kraken
#

now its getting weird

uneven silo
#

yea do the journalctl command to see what happened

wild kraken
#

im reading it trough

#

error: maximum authentication attempts exceeded for root

uneven silo
wild kraken
#

i havent generated an RSA key

#

for this client

#

but that cant be it can it?

main olive
#

is there a listing for www-data in /etc/passwd

#

alternatively, does sudo -u www-data /bin/sh work

#

if not, the www-data user is missing

#

you can either create the user or change the nginx conf to use another user, such as nobody

wild kraken
#

@main olive it was an error on my side

#

i had to change some stuff in nginx.conf

#

to work with my site

#

user www-data; was unnessesary for this version of nginx as it seems

main olive
#

it's not unnecessary, please don't blank it out

#

that will run nginx with root privs and it won't deescalate itself

#

which you very much don't want

#

set it to nobody nogroup

#

or just nobody

wild kraken
#

alrighty

worn apex
#

@wild kraken did you literally type "user@host"?

wild kraken
#

..y.. yes

worn apex
#

no wait the other part just says ...

#

wait you typed ... too

wild kraken
#

yes

worn apex
#

lol it wants the actual username and actual hostname, domain name, or ip address of the machine you're ssh-ing into

wild kraken
#

yeah i noticed ity

#

it*

steel verge
#

Hmm, I am a bit in a trepedation. This is not Python related, so if you want me to fuck off, just tell me. But I need to benchmark several nginX servers. Does anyone know a good tool? I have tried Locust.io, which is written in Python, but I am not sure I understand the usage correctly. What I need to know are two things: 1) how many users can concurrently visit the servers without it breaking down 2) which part of the system would benefit from an upgrade, either RAM or CPU. If I just send 100 users onto the server, half of the connections just fail. How do I use this tool correctly to get the sweet spot? If anyone has experience with it, I'd appreciate some advice.

#

Current config: 2 nginX with PHP-fpm, MariaDB, running a CMS, 1 Load Balancer with haProxy, both webservers firewalled off, only way to get to them is to visit the load balancer which is using round robin for balancing. So, pretty standard. 3 Dell RX470 Servers

#
#!/usr/bin/env python3
from locust import HttpLocust, TaskSet, Locust, task

class MyTaskSet(TaskSet):    

    def MyTaskSet(self):
        print("Executing Stress Test")
    
    @task(2)
    def index(self):
        self.client.get("/")
    
    @task(1)
    def article(self):
        self.client.get("/?p=11")

class MyLocust(HttpLocust):
    task_set = MyTaskSet
    min_wait = 1000
    max_wait = 2000

My current locust config

split grotto
#

k so

#

ihave

#

!paste

shy yokeBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

split grotto
#

i keep getting

#

i double checked everything i dont see any problem

#

😭

#

ive spent so much time on this

#

as you can probably tell by those 304 lines

uneven silo
#

line 254

#

health1 isn't in scope there

#

you start a block at line 150 and assign health1 inside that block

#

as soon as that block ends at line 254, health1 isn't in scope anymore and is unbound

#

giving you that error

split grotto
#

o

#

@uneven silo

#

it isnt

stray pulsar
#

@split grotto you are not actually listening to him properly

#

your health1 variable is assigned inside the if self.broadcast == True block

split grotto
#

o

main olive
#

i also fail to see how this is related to unix, even moreso seeing as you're loading files from a windows machine in your code :p

split pulsar
#

Here's part of my script: ```sh
#!/bin/sh

timeout --preserve-status --k=1s "$TIMEOUT" sh <<EOT || exit_code=$?
run_user_code() {
$@
}

run_user_code
EOT``` why $@ commands error when they try to read stdin? If I put $@ before timeout block, it can access stdin

oak shell
#

why are you putting stuff inside that shell and function anyway and not directly?

#

also you should always quote "$@", otherwise the individual arguments will be subject to word-splitting again.

split pulsar
#

real script has a few more opreations, I excluded them, but this example still reproduces problem for me

#

"$@" breaks everything, it tries to run several things as one command ("python main.py" not found)

oak shell
#

well, sh <<EOT is a here-document. You pipe the contents before EOT into the stdin of sh.

#

hm?

split pulsar
#

how I could rewrite this? move this block of code to function?

oak shell
#

have you tried with bash instead of sh? Maybe sh understands $@ differently...

split pulsar
#

I don't have bash in some containers. This script should be able to run everywhere. I run it in docker

#

I think "$@" works outside of this timeout block, but I need it inside

oak shell
#

sorry, I'm confused. Guess I'm missing whatever is wrong too. πŸ€” I'm mostly used to bash anyway.

steel verge
#

Put the content of $@ into a variable, then access it later

split pulsar
#

will it fix stdin problem?

frank coral
#

Hey, do you have an idea of how much space is needed to install and run an image using docker? I think it’s about 2Gbm, am I right?

steel verge
#

Well, it will save whatever was passed to the script, not sure what stdin issue you mean. But calling another command clears the content of $@

split pulsar
#

it seems like $@ gets evaluated and replaced before I call another command

oak shell
#

how much space is needed to install and run an image using docker?
depends on your image. Some are few MB, others a couple GB. There is no general answer.

frank coral
#

Well docker itself is pretty heavy, isn’t it?

oak shell
#

The $@ in your script should get evaluated in your main script, because it's in the here-doc. So it gets the args passed to your script file, I believe.

split pulsar
#

maybe I could pipe my string script from the other side? xargs or something

#

without <<

oak shell
#

the docker daemon itself is not too heavy. Couple hundred MB all together. But downloading containers, their cache, volumes and logs can quickly grow large.

frank coral
#

I think I’m going to start from a ubuntu image, because debian is quite conservative, but it’s a lot more heavier

uneven silo
#

what

oak shell
#

I am not sure what or why you are asking. If you want to build lightweight containers, you should start from light and container-optimized base images like Alpine, or even better use from scratch or truly minimal base images that only contain the runtime needed for your project (e.g. a JRE) if necessary.

frank coral
#

Ty

#

To be clear, I’ve 600mb left on my disk (Sd card), and I’d like to know how much space does take docker + an image with some very basics tools (such as postgresql, python...), to buy a SD card with enough space.

oak shell
#

very basics tools (such as postgresql, python...)
that's not basic at all. Also storage is cheap these days, don't save on that if you buy one anyway.

frank coral
#

Well by basic I meant that they don’t really take a lot of space. Ty

oak shell
#

I meant the same.

frank coral
#

Wow, 32Gb about 6$, space is a lot more cheaper than 5 years ago or so (last time I checked)

oak shell
#

yeah, don't go lower than that. Better double or more and have some reserve. Also gives you more space per dollar.

frank coral
#

64Gb seems to be the best space/price ratio, but it’s no more related to Unix. Have a nice day

worn apex
#

@split pulsar in a standard conforming shell, "$@" [and "${array[@]} for array variables] is an exception, it still gets split as long as the values were separate arguments in the first place

#

only "$*" will turn them into a single string

split pulsar
#

sh: 5: python exec_input: not found

#

this happens after adding quotes

#

python exec_input is my command in $@

worn apex
#

@frank coral 64 GB you have to start thinking about compatibility, not every device/software supports SDXC/exFAT, and 32GB is the largest for SDHC

#

@split pulsar how did you run the script?

split pulsar
#

it's docker entrypoint

worn apex
#

i am asking how you passed "python exec_input" to the script

#

the question is really whether that had quotes around it going in

split pulsar
#

it is argument to docker run

worn apex
#

i.e. sh foo.sh python exec_input or sh foo.sh "python exec_input"

#

ok what is tyhe full docker run command then

split pulsar
#
ENTRYPOINT ["run_entrypoint.sh"]
CMD ["python", "exec_input"]```
worn apex
#

wait

#

oh, duh

#

the problem is you're using a subshell with <<EOT

split pulsar
#

I haven't found a way to not use it. I can't just call function defined above

worn apex
#

yeah but there's a way to do it, hold on

split pulsar
#

I'm currently trying to use sh timeout ... sh -c " ... " but I get weird errors

#

at this point I'm considering moving entrypoint logic into application

worn apex
#

ok i found the right way to do it

#
#!/bin/sh

timeout --preserve-status --k=1s "$TIMEOUT" sh -s "$@" <<'EOT' || exit_code=$?
  run_user_code() {
    "$@"
  }

  run_user_code
EOT
#

though honestly I don't get why you need to do all that instead of just

#
timeout --preserve-status --k=1s "$TIMEOUT" -- "$@" || exit_code=$?```
split pulsar
worn apex
#

i.e. why does this need to run in a subshell and have a function at all

#

oh

#

ok well yeah

#

you probably need to export COMPILE_COMMAND too for this approach

#

i gtg, be back later

#

wait nevermind, it's already coming in the environment

#

anyway, the basic approach of sh -s "$@" (or sh -s -- "$@") and using <<'EOT' instead of <<EOT is the important part, variable expansion needs to happen inside the subshell

split pulsar
#

but will it fix stdin?

#

echo "$@" produces empty string inside this timeout block

worn apex
#

what does your script look like

#

and I have no idea what you mean by fix stdin

split pulsar
#

I posted full script. All I changed was using -s "$@" <<'EOT' and adding quotes around $@
my initial problem was that any code inside timeout block can't access stdin

worn apex
#

are you sure docker passes stdin to the script at all?

#

what happens if you run the script directly

split pulsar
#

yes, commands work outside of this block, I'll try to run it manually now

#

the same happens when I run it manually

#

"$@" is empty

#

this is probably because I use it in function. it has no args and $@ gets overriden

#

without quotes it gets evaluated before function starts

#

I'll just move timeout to application. This is not worth it

main olive
#

@split pulsar haven't really read any messages after your script but

#

$@ in a function takes params passed to the function, not the script

#

if you want to pass stdin to the function within the script, call the function with run_user_code $@

#

actually, no, you can't pass stdin like that at all

#

need to read from filestream 0

#

ie <&0

worn apex
#

lol i can't believe i didn't realize that

#

incidentally i figured out the stdin problem

#

<&0 won't work either, incidentally

#

I think this will work, your problem is that the <<EOT overrides stdin.

script='set -e
run_user_code() {
    $COMPILE_COMMAND
    "$@"
}
if [ -z "$MERGE_OUTPUT" ]; then
    run_user_code
else
    run_user_code 2>&1
fi'

timeout --preserve-status --k=1s "$TIMEOUT" sh -c "$script" x "$@"
exit_code=$?```
#

@split pulsar

#

i might do this instead, to simplify the inner script as much as possible ```sh
if [ -n "$MERGE_OUTPUT" ]; then
exec 2>&1
fi

script='$COMPILE_COMMAND; "$@"'
timeout --preserve-status --k=1s "$TIMEOUT" sh -e -c "$script" x "$@"
exit_code=$?

split pulsar
#

now there is a weird problem, stdin goes into stdout if not consumed, all \n are \r\n now

#

anyway I'm rewriting this in python

split pulsar
#

oh, these are fixed, it was caused by --tty docker flag

#

@worn apex thanks! this part of code was a headache for a few days if not weeks for me

granite pumice
#

kskskskskskskskskssksksksksksks

frank coral
#

?

main olive
#

πŸ€”

wild kraken
#

i have a really weird question

#

is it possible to run pgadmin4 on ARM linux

#

and where do i begin from the source code

#

alternatively can i run pgadmin4 remotely

main olive
#

I thought pgadmin4 ran in the browser

#

... in which case setting it up remotely should be very easy

wild kraken
#

@main olive indeed it does

wild kraken
#

how do i access postgresql from a local ip

#

it gives me error connection refused

main olive
#

from a local ip

#

you mean postgres running on your local machine, from your local machine?

#

should just be able to connect to localhost

wild kraken
#

@main olive i mean eg. 192.168.0.3

#

to 192.168.0.21

sage solar
#

....you connect to 192.168.0.21

#

that is assuming that the postgres db on .21 is running on 192.168.0.2 / 0.0.0.0 and not 127.0.0.1 / localhost

main olive
#

^ you need to expose it to the correct interface

#

by default, it's only exposed to localhost iirc

native sluice
#

Hi

stone pier
#

can you do ls to see if the directory is listed there?

native sluice
#

Hmmm no I don’t see it in ls

stone pier
#

what do you get when you do pwd?

native sluice
#

/

stone pier
#

you're in the root directory, do cd by itself

#

then do pwd again

native sluice
#

Now it’s in home/myusername

stone pier
#

excellent, now try cd Downloads

native sluice
#

Not working

stone pier
#

how about ls again, what do you see in your home directory?

native sluice
#

Nothing

#

Rn

stone pier
#

hmm

#

that's odd

#

what distro is this?

native sluice
#

distro?

#

I’m on a google cloud instance

stone pier
#

sorry, what distrobution of linux is this

native sluice
#

Lemme check

stone pier
#

ubuntu, arch, debian, etc

native sluice
#

Oh yeh Ubuntu

stone pier
#

is it a server version of ubuntu? or desktop version?

#

if you happen to know that

native sluice
#

It’s a server

stone pier
#

gotcha, can you do lsb_release -a?

native sluice
#

Lemme try

stone pier
#

it's possible that the server version doesn't include a Downloads directory by default

native sluice
#

Error no arguments are permitted

#

Oh sorry

#

Typed it wrong

#

It says

stone pier
#

lol

native sluice
#

No LSB modules are available and the it said some info

stone pier
#

yea that warning is fine, i get that too

native sluice
#

Ok

stone pier
#

the info is what i care about

native sluice
#

Shall I show you everything under it

#

Ok

stone pier
#

it doesn't say anything after the LTS part for Description?

native sluice
#

Nope

stone pier
#

ok cool, let me google something, and while i do that, can you just tell me why you're trying to navigate to that directory?

native sluice
#

Erm yes I’m trying to get golem setup with it

#

It’s a thing that uses your CPU power to do stuff and you get money for it

stone pier
#

oh, doesn't really have anything to do with python development then

#

did you download some install file and can't find it?

native sluice
#

No I need to install it first

stone pier
#

what do you expect to be in the Downloads directory?

native sluice
#

It says I need to be in the downloads directory to start the downloads

stone pier
#

can you link me to where it says that?

native sluice
#

YouTube

#

Wait lemme link the vid

stone pier
#

k

native sluice
#

I started doing it in the normal dir but it would not work so I YouTubed the issue and got this

https://youtu.be/OPpB3C15S4A

#

The issue he got at the start is what I got

stone pier
#

can i get a timestamp?

native sluice
#

Yh gimme a second

sterile dragon
#

2:40ish by the looks of it

native sluice
#

2:19

stone pier
#

ah ok, so it's as i expected

native sluice
#

That’s the error for the thing I got then he said I need to go into downloads dir which did not work

stone pier
#

yea, it doesn't matter what directory you do it in, you just need to be in the same directory as the install.sh file in order to run that specific command

#

otherwise you can provide the full path

#

all they're doing is making the file executable, and then executing it

#

do you have that install.sh file downloaded somewhere? like did you download that file?

native sluice
#

No, do I need to install that first

stone pier
#

you need to download the file so it's stored on your server. After that, you would make the file executable, and then run it in order to install

#

are there are instructions for downloading the file itself?

native sluice
#

No

#

It provides an installation script

stone pier
#

around 1:26 in the video you see them downloading the file in a browser

#

i assume you're using a headless server, so you need to use a command to do it

#

you can copy the URL he clicks to download it, and do wget <url> replacing <url> with the one you copied

#

that would download the file

native sluice
#

Oh

#

That’s why it’s giving the error

#

Thank you

stone pier
#

no problem

native sluice
#

Ah

stone pier
#

for future reference, i would avoid coming to this server for help of this nature, as it has nothing to do with python. Even though this is the unix channel, it's still predicated on the idea that you're doing something python related

main olive
#

hello! I have been thinking about switching from windows 7 to some Linux OS ,maybe Mint - my question is as follows:
See..I host a discord bot on my laptop - do not ask my why and tell me other solutions - what are the differences between python on linux and on windows 7? I want to have my bot 24/7 online. I am asking this question because I want to have offline time as less as possible with knowing the pros and cons.

#

I have been installing linxes and oss before so I know to do that part.

#

Please ping me.

outer reef
#

@main olive The differences between the two regarding Python code are minimal.

#

The only huge differences you'll find are going to be if you're opening files from your code, as your file paths are going to be different as are how you call them

#

Which could be mitigated if you use something like pathlib

#

Only other big thing that stands out in my mind is remembering to do python3 instead of just python, as calling python in either Linux or Mac will open up Python 2

#

Since they come with both

main olive
#

I see

#

Thank you

#

Linux probably has much better security than this windows 7 that refuses to update for months

outer reef
#

Well considering Windows 7 is going to reach its sunset at the beginning of the new year, yeah

#

I'd say so

main olive
#

Great!

#

But considering my security did not update for like 2 months,probably massively better πŸ˜‚

outer reef
#

Yeeeaaaahhhhh, couldn't hurt. Although if you want to make it last a bit longer, you should be able to troubleshoot the windows update thing

#

As in it actually has a troubleshooter program that lets you fix it

main olive
#

I am switching to Linux permanent tomorrow

#

I know how to get latest win10 beta or something,but I like Linux more

#

I know it is not related to Python,but Mr. Helmock said why not:
Is there anything to do when creating a permanent Linux OS? Like I saw some people doing some area something while making a partition for Linux..I hope someone knows what I am talking about! :)

#

Ping me

quaint mirage
#

tbh if you're using one of the main distros with a nice installer there's really not much you need to do

#

if you are manually installing it and setting the advanced options by hand there are bits and pieces you'd perhaps want to do

#

seperate partition for tmp / home perhaps

#

swap partition

#

that type of thing @main olive

#

again, most of this is done automatically in a lot of linux distros

main olive
#

I have been thinking about Mint perhaps,and yes,I meant on swap partition !

#

Thanks again,now I know at least what to look for

#

@quaint mirage

quaint mirage
#

swap partitions aren't always needed, i don't use one

#

(on my work PC)

main olive
#

I have a 500gb drive

#

I see

quaint mirage
#

it's basically like a page file for windows

main olive
#

ssd

#

A page file?

quaint mirage
#

if your run out of RAM it starts storing that excess information on the hard drive

main olive
#

the swap partition?

quaint mirage
#

yup

main olive
#

DAAAAEMN

quaint mirage
#

pagefile is the windows version

main olive
#

sow how much is recommended? I have heard double the ram,right?so 16gb for me

quaint mirage
#

that sounds about right

main olive
#

Thank you! I will switch to it tomorrow

quaint mirage
#

with 8gb of RAM i can't see your swap being used too much either

#

also, you can create / destroy / mount / flush swap whenever you want on Linux

main olive
#

oh

#

I see

#

1 more question

quaint mirage
#

it's not an install time process

main olive
#

When I am doing a OS switch - I do it in this order: using a software minitool partition wizard I make a new partition

#

then I reboot,select the usb and put the OS on that new partition

quaint mirage
#

are you completely uninstalling windows?

main olive
#

Yeah,why not? I will be storing my files on a usb

quaint mirage
#

okay so yeah. backup your files somewhere and triple check to make sure they're backed up and then check some more that you got everything

#

then just full format the SSD and start from scratch

#

the linux installer should give you the option to remove all partitions

#

then just create a new partition

main olive
#

Or to be secure I could do my thing and copy-paste and then format,right?

quaint mirage
#

i mean yeah, as long as you don't accidentally break your new partition during the linux install

#

or remove it, rather

main olive
#

I double check

#

Thank you,anyways,have a nice day! πŸ™‚

quaint mirage
#

no problem

celest spire
#

does anyone know how to copy and paste code between terminal windows using tmux and vim?

#

say I'm editing one file in vim on one pane and want to copy and paste some code from that pane to another pane I have open. I can't figure out how to do that.

verbal kernel
#

hey guys need help with executing a bash .sh file on Rasbian
I'm getting an message: permission denied
then I ran: chmod +x install.sh
but it still didn't work, then I tried right click on permission and then execute permission: everyone but it doesn't change for some reason.
so how can I run it?

tall coyote
#

it doesn't run either if you do sh <file>?

#

what does stat <file> output?

verbal kernel
#

ok gonna try

#

it's doing something, loading commands, that seems good

tall coyote
#

well, it's technically because you have permission to run sh

verbal kernel
#

yh now it kinda crashed my vnc but I think it works

main olive
#
/home/dom
    - domalert
        - domalert (2nd)
            -venv
            - domALERTV5
                -all the files
#

I need to take the 2nd domalert out of the first domalert and put it in the home directory

#

how can i do that?

split pulsar
#
mv ~/domalert ~/domalert-temp
mv ~/domalert-temp/domalert ~
rmdir ~/domalert-temp```
main olive
#

thx

#

where should i be though?

#

in the home directory

#

or the first domalert directory

red raven
#

I am trying to run: git diff upstream/master -u -- "*.py" | flake8 --diff to test to see if it my changes pass the PEP test. I pushed my changes to a branch called fstring changes but no matter what I change my upstream branch to (master or fstring-changes) it says bad revision

warped nimbus
#

Options like -u need to come before the first commit is specified

red raven
#

in the commit message youre saying?

#

like my commit would be -u fixed xxxx

warped nimbus
#

I mean git diff -u upstream/master ......

split pulsar
#

@main olive ~ means home directory (alias to $HOME), you can run these from anywhere

main olive
#

Got it

#

Thx

red raven
#

git diff -u upstream/fstring-change -- "*.py" | flake8 --diff still doesnt work

#

if you look here

#

they have -u after

warped nimbus
#

I guess it doesn't matter

#

What does git remote -v show?

red raven
warped nimbus
#

You don't have a remote named upstream hence it fails

#

Presumably you forked pandas so the upstream would be https://github.com/pandas-dev/pandas.git

#

Can be added with git remote add upstream https://github.com/pandas-dev/pandas.git

red raven
#

like so?

warped nimbus
#

Yes, sorry. That is correct

#

Though you used the ssh remote url which may give you issues if you didnt set up ssh credentials for git

#

You could use the https url if you have issues with it

rapid hazel
#

anybody knows if it's bad to use an older version of the Linux kernel after you've used a newer one

main olive
#

it's not

#

as long as you have the proper kmods

#

userland and kernelland are entirely separate

#

you could theoretically even swap out the kernel entirely for something that's not linux (like Hurd) as long as it provides an API that uses the same standard

proper bison
#

Is it possible to make crontab wait with running my python scripts until it has a internet connection? i want to prevent some of my scripts from running when they dont have internet as they will crash and not run

#

My power keeps cutting out rn, the pi boots up before internet comes back so python scripts wont run properly.
Please @ me if you know as well, my power is most likely going to cut out again

main olive
#

where is locat trash on vps? *unbutu 16.04

sage solar
#

@proper bison you could just....add error handling to your script

proper bison
#

@sage solar yeah but do i just try: except: a request or something to check if i have a connection?

sage solar
#

whatever floats your boat Β―_(ツ)_/Β―

#

comes down to the same

main olive
#

@proper bison don't use cron, use systemd

#

it specifically lets units wait until connection is achieved

#

even more specifically, you need the following values in your systemd unit file:

After=network-online.target
Wants=network-online.target
proper bison
#

Cron seems so much simpler though πŸ€·β€β™‚οΈ any good reads to understand what i need with systemd?

main olive
#

except, obviously, changing the Wants and adding the After

still nacelle
#

hello guys when i try to run this code i got error

import numpy as np

q_table = np.zeros((8,8,8,8,8,8,8,8,8,8,8,8,4))
print(q_table[1,1,7,3,1,1,7,3,1,1,7,3])
q_table = np.zeros((8 8 8 8 8 8 8 8 8 8 8 8 4)) MemoryError: Unable to allocate array with shape (8 8 8 8 8 8 8 8 8 8 8 8 4) and data type float64

my system is ubuntu when i google it people say that something related to my kernel doesh anybody has any idea abot that?

sage solar
#

I mean youre telling your thing to allocate memory the size of 8 * 8 * 8 * 8 * 8 * 8 * 8 * 8 * 8 * 8 * 8 * 8 * 4 * 64 bits thats aroudn 2200 gigabyte of memory i severly doubt youve got so much in your PC

#

@still nacelle

still nacelle
#

ok

#

@ how is it possible to make 9 dimentional array ?

#

sorry 13 dimentional

#

the same size

sage solar
#

that is exactly what youre trying to do right now

#

and im telling you your machine cant handle this

#

i mean

#

if youre doing q learning on an environment this complex

#

i doubt youre gonna get even close to being able to train whatever youre building to the point where its gonna do something beyond random without some massive massive massive increase in computing power

#

what exactly are you trying to do?

still nacelle
#

pursuit-evasion game in reinforcement learning multi-object

sage solar
#

well then im telling you reduce your action space

#

massively

#

extremly masssively

still nacelle
#

well actually my action space that 4

#

my state space is quite large actually

sage solar
#

then youre gonna have to decrease that

#

massively

still nacelle
#

btw i have an another question i am working in 9 dimentional array

#
q_table = np.zeros((8,8,8,8,8,8,8,8,4))
print(q_table[1,2,2,31,1,1,1,1])    ## first print
print(q_table((1),(2),(2),(1),(1),(1),(1),(1)))       ## second print

my code smilar to this actually it works in my code if i use first frint style the code really slow but if i use second print style the code super fast

sage solar
#

that first print shouldnt even work

#

and the second one far far less

still nacelle
#

actually if i try the first one work second one does not work if i try this part of code

sage solar
#

if you copy past ethe aboev piece of code its gonna fail

#

idk what you are executing but not this

main olive
#

does anyone know how I can load my LOIC.exe file using mono? I need help

#

I need help setting up

sage solar
#

that does again sound pretty illegal or at least possibly illegal to me

main olive
#

LOIC It self isn't illegal

sage solar
#

yes

#

"possibly illegal"

main olive
#

don't know where you got that notion from

sage solar
#

havent we talked about this before

main olive
#

can u help me?

#

it's not illegal

sage solar
#

did you read the server rules when you got here?

main olive
#

yes not helping with illegal

sage solar
#

!rule 5

shy yokeBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, be considered malicious/inappropriate or be for graded coursework/exams.

sage solar
#

the rule states may

main olive
#

I just said that

sage solar
#

may break laws

#

not break laws

#

may break laws

main olive
#

but it's not illegal at all?

#

not may

sage solar
#

and we dont know your intuitions so you may be breaking laws with this information -> we wont help you

main olive
#

I'm not trying to go to jail lmao

#

I just need help loading the .exe file

sage solar
#

Performing denial of service attacks against a service you dont own is illegal and no matter how often you tell us you wont how can we be sure you wont?

#

give me a reason we can be sure you wont and ill help you

main olive
#

I'm a child

sage solar
#

so?

main olive
#

I'm on my school computer

#

they can see everything I do

#

I wouldn't want to get in trouble

#

trust me nobody at my school does

sage solar
#

cool and what exactly would be stopping a not child at a not school computer prevent from saying just this?

main olive
#

do you want to see my classes?

sage solar
#

no

main olive
#

then?

#

I will try to prove

sage solar
#

I just want you to understand that you are not getting help with stuff that is potentially illegal even if you promise that youre not gonna do illegal stuff

main olive
#

so you're not going to help me?

sage solar
#

no

main olive
#

then?

sage solar
#

and according to rule 5 you shouldnt even be asking this quesiton here

still nacelle
#

@ ty nix it looks my code working and it is quite fast now because my reward always increase after some time of training

main olive
#

fine, how do I load a .exe file using mono?

sage solar
#

well if that wouldve been your question int he beginning yes I wouldve helped you but youre obviously up to the LOIC stuff so no

still nacelle
#

@main olive wtf u are everywhere did u ask this question in all programing discord groups

main olive
#

not all

#

ok whatever

still nacelle
#

i just saw u in sentdex

sage solar
#

I mean you're also always asking question about possibly illegal stuff in #cybersecurity i wonder when you will understand there is no help for you with this here

main olive
#

Ok this is not illegal how do I use wine?

#

it's just a windows emulator

#

nothing wrong with that

sage solar
#

again you are using it for a possibly illegal purpose so no

#

no help

trail gust
#

Hi ! Can anyone help me to fix my tesseract install on ubuntu please ? I tried everything but i'm really stuck still :/

sharp shell
#

!warn 501950248831418369 As per rule 5 which you definitely know about by now, we absolutely will not assist with tools that are very easily able to be used for malicious purposes. Your intent does not matter, it's the clear ease of being able to be that is.

shy yokeBOT
#

:incoming_envelope: :ok_hand: applied warning to @main olive.

sharp shell
#

@sage solar you might want to ping mods if it runs on like this in future, just to avoid the lengthy argument

#

@trail gust you'll probably get better luck by putting a description of your issue here so people can look into it as soon as they see your question

#

things like what you're trying to do, what it's doing instead and any error outputs if there's some

main olive
#

@trail gust what's broken with it

trail gust
#

I just wanted to be sure before saying it, but i thinks after 3 more hours, i finnalt fixed it :)

#

The problem was the version of tesseract i installed from ppa was different than the one i installed for training tools by cmake

main olive
#

Oh damn

trail gust
#

It was then trying to find the libtesseract. So for the version 5 and my tesseract was 4.0.1

main olive
#

Yeah that's gonna cause some issues

trail gust
#

And i couln't remove it cause it was installes by cmake, and i lost the sources

#

I finally deleted the lib files (from the cmake instructions) and reinstalled everything and recompiled tesseract and the tools

#

Just a side question : is there a channel suited to ask for a specific software? I'm tryinf to find something but couldn't yet and i'm wondering if it exist or not xD

main olive
trail gust
#

Thanks you!

uncut sparrow
#

anyone know what the purpose of the subdirectories outputted by the following commands into #bot-commands are:

#

!eval
import os
filelist=[]
for path, dirs, files in os.walk('./'):
filelist.append(path)
for f in files:
filelist.append(f)
depthcount=[x.count('/') for x in filelist]
a=depthcount
m=max(a)
print([filelist[i] for i, j in enumerate(a) if j == m])

shy yokeBOT
#

Sorry, but you may only use this command within #bot-commands.

oak shell
#

/sys/devices/ is a folder on the virtual sys file system which holds file-like interfaces to all the hardware devices the kernel can interact with

uncut sparrow
#

what's virtio?

#

virtual environment?

#

ah nevermind

#

I think that's it...

#

the string 'virtio' was in the folder names of my code output

oak shell
#

that probably means the system is running in a vm using virtio interfaces

uncut sparrow
#

thx, was just curious

main olive
#

I have reinstalled Ubuntu 3 times today.. I could not get Python 3.8 to working.. now I can not get PyCharm interpeter to work!! Please help me,I will be spending my whole life trying to fix this

#

Building wheel for aiohttp failed: [Errno 13] Permission denied: '/home/loner/.cache/pip/wheels/f2/8b' Could not build wheels for aiohttp which use PEP 517 and cannot be installed directly
This is the error I can not fix

#

People online were talking about python setup.py wheel or something?? It says there is no such file as setup.py

#

I had no problems 1st time I installed Ubuntu,why the actual fuck can I not get that lucky again?

#

Please help me

oak shell
#

seems like you ran sudo pip install ... at some time, or messed up ownership in another way

#

with pip, always use sudo -H

#

to fix ownership and give it back to your user instead of probably root, run sudo chown -R $USER: ~/.cache/pip

#

after that try your installation again

#

@main olive

main olive
#

chown command destroyed my 1st ubuntu OS

#

😳

oak shell
#

well, you must not change owners of system files

main olive
#

I did that to /usr folder

oak shell
#

as long as it's inside your home directory (~) it is safe to make yourself the owner.

main olive
#

and it costed me unable to use sudo

#

I see

oak shell
#

yeah chown on /usr kills it

main olive
#

🀣

oak shell
#

gotta be careful not to typo there πŸ™‚

main olive
#

nope,still not fixed,let me take a photo for you

#

there

main olive
#

It's my turn.. πŸ˜’

#

πŸ˜‚

main olive
#

I DID IT LOL
I had to run it as root - Pycharm

#

Good luck!! πŸ˜„ I love Ubuntu

oak shell
#

I had to run it as root - Pycharm
god, no

#

don't run things as root arbitrarily

#

especially gui applications and such are not meant to run as root

#

not to mention the security aspect, that is exactly what is breaking correct ownership of files and leading to permission issues in the first place

#

Maybe sudo chown -R $USER: ~ to set ownership of all files in your home folder back to you, and then no more sudo for things that aren't supposed to run as root

#

uhm.. did you forget an import pytesseract or something?

#

dunno that library, but that error doesn't seem os-specific

#

you need the tesseract-ocr package installed on your system, but you don't have to set that variable because the default will be just tesseract and should work fine

#

you can try which tesseract in your shell to find the full path, but it should not be required to set that, if you can invoke tesseract directly on the shell (which means it's on PATH).

#

that depends on how you imported it

#

gah, please stop using all these star imports. that hurts

#

but there is no import pytesseract anywhere to see?

#

you clutter your global namespace with tons of names that are not used, and which might even overwrite each other

#

no need to apologize, such things happen to all of us.

#

if you have terribly long package names, you can do import pytesseract as tess for example

#

or you can explicitly import only the parts you want from a package, like from concurrent.futures import ThreadPoolExecutor

main olive
#

@quaint mulch no,sorry..I did use that module/library you mentioned,but I do not remember if it was on Linux and I did not have any problems.

#

@oak shell what do you mean?

#

I did that to the project folder

#

did not worked

#

I ran as sudo - everything works

#

PyCharm

oak shell
#

running pycharm as root is terrible

#

if things don't work as your user, that means you screwed up permissions or ownership somewhere - probably by having run things as root before that should not

#

do sudo chown -R $USER: ~, then start PyCharm normally as user, without sudo. What exactly happens then?

main olive
#

I have told you πŸ™‚ But now when you are interested..I will again tell you

#

So basically when I open pycharm - I have to import modules(for example discord.py) and When I do so it says that

#

I have reinstalled Ubuntu 3 times today and every time I could not get it working

#

Sooooo no,I do not think I did screw anything up..yet

oak shell
#

how do you install modules? and to what interpreter?

main olive
#

What interpeter? python3.8, but it does not work - error linked in the link.

oak shell
#

because PyCharm can not install modules if you selected the system interpreter directly, instead of creating a virtualenv/pipenv/whatever

main olive
#

virtualenv WHAT?

#

I have never heard of that

oak shell
#

settings -> project -> project interpreter

main olive
#

I install modules like so: sudo -H pip3 install discord.py

#

Oh

oak shell
#

okay, that works

main olive
#

Not working

#

I was messing with that too

#

with virtualenv

oak shell
#

but that has nothing to do with pycharm then if you install manually using sudo -H pip?

main olive
#

but NO ANSWER online

#

I guess

#

I mean I linked my problems describing in more detail,so please take a look at that.

oak shell
#

or you have Python2 or any other interpreter as default for your project in PyCharm, instead of the one you installed packages for?

main olive
#

I have tried a lot of things

#

It says that I may not have the correct pip evrsion

#

version*