#unix
1 messages Β· Page 20 of 1
in exchange for your help, i'll help you with physics π
@sage solar That would be 10 niggerian dollars dear kindly sir
you need 9 more
π΅π΅π΅π΅π΅π΅π΅π΅π΅
thank you
in order to group changes to work you need to kill every process at your name, like in the mafia. So you need to relog
yessss
it says "user nix already exists
and when i enter groups it doesnt say anything about iraf
cat /etc/group
then there's no group
it is m8
the group exists and i added myself to it with sudo useradd -G iraf nix but i didnt add myself
But thanks again for spending so much time and effort to help me, I really appriciate it
Those programs need root to work, because in the middle of 2.6 they changed stuff in core utils
or some bullshit I don't remember
@long vault You're welcome Casper, you can pay me back discovering some goodies with the program
that image was only the test image provided by iraf
oh, then test the program first
I'll get to take some juicy pictures myself with our telescope
but it works, right?
seems like it
iraf aswell
I can help you to use the last one
its made/used by grumpy old astrophyicists
hey strachi
do these programs do anything special
iraf is inside the xterm
like anything super complicated?
w8 just close everything?
no
just a new one
close ds9 and iraf
tar xvfp *ubu*17*
sudo mv ds9 /usr/bin/
once you do that
reopen ds9 and iraf
you should have the latest stable version
@sage solar Both are tools for dealing with astronomical objects at a pixel level
would that be hard to build
I think is Casper's brain that does the heavy lifting
I don't have the necessary iq for that
this is the most horrible piece of popular software i have ever seen
it is
I get an error inside iraf now 
haha
and judging from what we installed its all csh and tcl code
ok
@long vault is iraf supposed to be connected to the telescope?
somebody better tell me what programming lang has .x as file ending
@sage solar "The .x file extension was introduced with DirectX 2.0 to contain files of the X file format; and DirectX 6.0 introduced methods that enable reading from and writing to .x files.[1] "
directx 2006
....................................................................................................................
no I dont think so, the telescope makes an image with a CCD camera and we use iraf and ds9 to display it
@sage solar oh man, iraf does the heavy lifting
also don't tell any1 we have a computer program that points the telescope
we actually don't have to do anything
you need this XImtool
casper what does iraf actually do
@long vault Check the pdf
tell me
does it mention it?
one question at a time please
@sage solar I think iraf takes the image and basically reinterpetates the pixels
so it can be "sequencied"
That's what I understood
o_O
no, I mean, it's machine learning but for old people
opening the source code.....
this explains what iraf is
this looks really really bad for "source code"
nuke it
I see you're a man of culture as well, we need more people using visual studio code
what is midas?
^
did you even read the introduction casper?
people either use MIDAS or IRAF
but it says it outdated
it is less outdated than IRAF
midas is not outdated
i meant imtoll
yeah I know midas because it's used in the observatories here
then we updated something and now it doesnt work anymore
@long vault Sounds like your observatory needs a handosme IT guy like me
Give me a sec and I will help you with the XImtool problem
I accept the sum of all their pays / 2
these programs are made for 80s hardware
after I couldnt get the wifi fixed on my laptop after 3 weeks of trying I stepped inside and they fixed it within a minute
@sage solar I told you
thats the whole reason for iraf
it uses low mem so there is more mem left over for the actually image display stuff
@long vault Close all the terminals
sudo apt-get install -y ia32-libs
this must be rewritten to something more modern, somebody must be working on a rewrite in the oss world....
[sudo] password for casper:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32ncurses5 lib32z1
E: Package 'ia32-libs' has no installation candidate
casper@casper-GL553VD:~$
sudo apt-get install -y ximtool xgterm
hm
ssstrachii
there is a github project working on iraf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ximtool
E: Unable to locate package xgterm
casper@casper-GL553VD:~$
last update 24 days ago
@long vault apt-cache search ximtool
https://iraf-community.github.io/ @long vault if you ever have to mess with this again use this
not the official iraf
people actually care about this
Please aware the IRAF is 35 years old legacy code and institutional support for IRAF and its usage is going away quickly. It is recommended to search alternative solutions, for example in the Astropy community, and not to start new projects using IRAF. See this article in the STScI newsletter for rationale and recommendations.
casper@casper-GL553VD:~$
$currentyear - 35
doesnt return anything
@long vault ok
i know some of these words....
Hi! For those who don't know (probably the most) iraf is a software used by astronomers to reduce and process data (actually it has many more uses but this is the one I use most...). So probably, if you came across this by accident, you probably don't need a program that does...
I'm following this lol
check the date
PID=`pidof ds9`
if [ ! $PID ]; then
ds9 &
fi
pushd ~/iraf > /dev/null
xgterm -iconic -geometry 80x24 -sb -title "IRAF" -bg "black" -fg "green" -e "ecl" &
popd > /dev/null```
lol
2008 
This is the deffinition of bloated
but how can I go back to where it was working again?
ok laddies and gentlemen
I found out how they have it working
The new .iso file is in:
http://www.astro.uson.mx/favilac/downloads/ubuntu-iraf/iso/IRAF_Ubuntu.iso
@long vault http://www.stsci.edu/news/newsletters/pagecontent/institute-newsletters/volume-35---issue-03/removing-the-institutes-dependence-on-iraf-you-can-do-it-too.html make your prof read this, no matter how much he refuses make him read this
they ship an ubuntu distro with it installed
God I hate american spanish
Let me see if I can found the last one
Nix I don't think you've ever met a physicist, they are the most stuborn people there are
if they use something that "works" they won't use anything else untill it doesnt work anymore
IF IT WORKS, IT WORKS
CHANGE IT
no need to change it
This mexican observatory switched to the european software
They are not shipping the updates anymore
did the mexicans like it?
It doesn't seem to be a matter of choice for them lol
but we got it working earlier, how can i go back?
@long vault what do you mean?
ill check again
I was searching the ximtool stuff that says on your pdf you need
but not on the internet
we can try to revert back np
casper, the NASA is making the software they are proposing as an alternative to iraf (which was surprise made by NASA)
ctrl + f
they have to know whats good
512
First verify that an XImtool or SAOimage process is
but we're gonna try to revert it
so close the terminals
open a new one
https://iraf.net/forum/viewtopic.php?showtopic=1469830&fromblock=yes
(i couldnt agree more)
wget http://ds9.si.edu/archive/linux64/ds9.linux64.7.2.tar.gz
tar xvfp ds9*
sudo ds9 /usr/bin/
sudo -K
xterm```
@long vault
just copy and paste
PS: I'm not working with IRAF anymore, since I left academy for a programming job, but I really wanted to use my knowledge of both areas to help astronomers.
oh dear, the programmer bubble is here
academics leaving for a codemonkey job
tar: ds9.ubuntu17.7.6.tar.gz: Not found in archive
tar: Exiting with failure status due to previous errors
casper@casper-GL553VD:~$
tar: ds9.ubuntu17.7.6.tar.gz: Not found in archive
u wut
ok
wget http://ds9.si.edu/archive/linux64/ds9.linux64.7.2.tar.gz
tar xvfp ds9*.gz
sudo ds9 /usr/bin/
sudo -K
xterm```
try this
it also gave an error on the next one when opening ds9
"- I'm disagree that Rust is a niche product, by all means. The Firefox's core is written in Rust and Mozilla is strongly supporting it (https://research.mozilla.org/rust/). There's an OS being written in Rust (https://www.redox-os.org/) and a search in Github by Rust returns >30k repositories (which per se don't mean so much).
- Also, Python is a language that is starting to feel it's age: People use it a lot, but new languages succeed where it failed in terms of compilation, usability and memory control. For example, Rust and Go languages do not give the cue to programmers make mistakes with pointers, what helps A LOT for bug prevention."
@sage solar
yes ive seen that strachi
Casper, you need to do it step by step
i woud also write it in rust
I did
close the terminals, ds9 and the rest
open a new one
type:
sudo su
enter your pass
type:
cd
quick question, where do you actually get your FITS files from
do you have to run another program do generate them or are they rust the files you get from your big camera formely known as telescope
CCD part
ds9: cannot open `ds9' (No such file or directory)
root@casper-GL553VD:/tmp/trash#
/usr/bin/ds9: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.9, stripped
root@casper-GL553VD:/tmp/trash#
ok
yes but my question is does IRAF turn the result of the telescope into a FITS file or is it already a FITS file when IRAF gets it
open a new terminal, do the xterm thing do the iraf thing
open another one, do the xterm thing, open the ds9
@sage solar I think ds9 controls iraf
ds9 translates the image to iraf, and iraf modifies the image, and ds9 reinterprets it back to the user
its just a question of file formats
bloated 1993 edition
does the telescope provide you the FITS file or not
and now test the image display again?
i want to know which effort i would take on myself
@long vault yes
@sage solar https://www.spacetelescope.org/projects/fits_liberator/ π€
Seems to be working again
@sage solar there's your answer, last one
@long vault Test everything you can
I don't want you to be stucked in a old version
no that is not my answer
lol read it
it is
the telescope HAS to have that format
it's something similar to raw
It's not a dumb lens
is that's what you're asking
my question is
when i take an image with a telescope and take the file from the telescope
is it a PNG/JPG/whatever OR a FITS file
FITS
good
it doesnt understand z1 now
@long vault I think that's because the iraf version you're using doesn't support it
I don't know what z1 is
Ok, listen, we started at 9 pm. This is what I would advice you to do
Go to the professor and tell him that he didn't gave you the installation instructions, you tried for 5 hours with the help of a friend of yours and you got it workingish, somethings don't work
but isn;t there an easy way to go back to the version I had where everything worked
?
@long vault You're already there
I reverted you to @sage solar ds9
Iraf was always the same
Literally no
I don't have the vocabulary
fix it
I mean that depends on the concept you're trying to get across?
you might want to say
I'm assuming you're not trying to say that the guy has a mental illness, so
"if he refuses"
When somebody starts to act emotional when presented by a logical statement
No, ofc no
or "if he disagrees with you"
bisk 2.0
actually not knowing how to not insult people instead of insulting them by accident
yeah
its not a mental illness
thats trisonomie 21
No, no
Let's say that if he gets emotional, you just don't need to deal with it
here is an idea
That's what I was trying to say
But he shouldn't expect you to make the work of a whole computer department
pst joseph has an idea
goddamnit guys, bleeping my radar
(dont say the r word every time you do they get an alert because there is a list of bad words)
I'm sorry guys
we don't ban words because we don't believe in that kind of censorship
If I were here to insult everybody I would not spend 5h helping someone
but we keep an eye on potentially troublesome phrases
and it is something to worry about, trust me :P
@long vault Well, back to the topic
yeah, I mean, I don't want to use that word, but
I was reading the official docs and I think he gave you the instructions all wrong
close all the terminals and don't open xterm again
thats what i did
Yeah, RIGHT?
considering this thing was made for 8 mb computers i am surprised it can actually processed images
but why would my prof tell us to work from the xterm if it works in the normal terminal aswell?
You said it yourself, they're stubborn, meaning they do as they're told by their profs
You're using 1993 software
@sage solar are you really rewriting iraf?
Check ds9
damn phycisists
The problem is ds9
i mean if IRAF actually just provides all of the features you see in the GUI it should not be that hard
All the problems are related to ds9 since 2h and a half ago
display *
display * is the coms to ds9
and it's ds9 doing the excepts
that's why it's working when we replace it
wait so ds9 is the gui?
no, it's not a gui
ds9 is not a gui for this program
this is what debian provides as image for ds9
but thanks again guys, its working (for now) so i'm heading off
its 1 am and im tired
Cool you get it working
if ds9 is not the GUI what is the GUI then
yeah, we share the same timezone, the three of us
there's no gui, ds9 is it's own gui
iraf is the slave program
so gn guys
yes
the engine, sort to speak, ds9 is the client, but not the gui exactly, ds9 generates it's own output based on top of the calc provided by iraf
I think at least
@long vault gn!
π«
I don't think they're unbloating it
GNU actually supports ds9
even the rewrite
it should be good
So you're telling me that supercomputers are running this beautiful thing with 32b libraries lol
no
IRAF is for processing htese images
it doesn look like it support MPI either
so unlikely that this isused on supercomputers
running stuff without MPI on supercomputers is kinda pointless
thats a remote server
not s supercomputer
supercomputers are dozens of servers
wait, does it run in only 1 thread?
that is not the problem
you have to write code specifically for super computers to actually make it use all the features
all the RAM and cores
accross multiple machines
Oh, so they're not like "a big computer"?
But they cannot abstract an os?
and then people use special libraries to make usage of all the resources every single computer provides
so supercomputer=cluster?
yes
owo?
this is for example how the supercomputer ive been to a few months ago looks like
its just lots and lots of computers
that's a pic for ants
then take this pic
it has over 19 k cpus and more around 340 tb of RAM iirc
and it does run linux
some suse shit
the mod brigade is coming for you
is it?
I don't know
i dont think it is
Yeah, I'm reading this, and you're right
So what's the name of BIG COMPUTERS?
where I can install my gentoo on
So what does the HCL has?
the HCL?
sounds similar, see
no hadron collider L....
well, I'm glad he has his planet finder working
Hey nix, let's go to an offtopic channel
@torn jewel just running through some commands to make sure they work
okay
I tried installing pipenv and it broke instantly, so maybe it's best to start with the built-in virtual environment support that comes with python
alright
wait there is actually something wrong with my raspbian. super ironic but there you go!
oh, here we go, it's preinstalled and called pyvenv
okay
sorry my SD card is ridiculously slow
Take your time
so to set up your virtual environment just type, as the pi user, pyvenv weather, where weather is the name of the directory you want your virtual environment to live in
then do source weather/bin/activate to activate the virtual environment
your prompt will change to show that you are now in a sheltered python development environment
now when you type python or python3 or pip or any other command that invokes python, all the changes will only take place in that environment
to drop back to the regular system, just type deactivate
thats cool
that's pretty much all there is to the basics
I think you should use venv instead of pyvenv
you may be right but I couldn't find it preinstalled on raspbian
And maybe this is opinion but I prefer to do (instead of deactivate) bash source folder/bin/activate ... exit
@torn jewel the reason we're saying venvs are good is that you can have multiple venvs, all with their own set of packages, and all with even different versions of the packages and the python interpreter itself
it seriously reduces conflicts between system python and multiple projects
yay, glad
i guess its just bad to run pip as root...
recommend against it
well then im done with doin that
what you do have the option of doing, on debian based systems, is instead of pip installing something, check if there is an apt package for it
those are often outdated though
it won't show up in your pip list, so don't do it if you are developing for multiple systems, but if you just quickly need a package, especially one that doesn't install easily or properly through pip, this is safe to do
depending on what you need, this may or may not be a problem
so with this will there not be any installed packages
with the virtual environment you mean?
I'm not 100% on the implementation of it but I believe it actually links in quite a bit of stuff from the system python
alright thank you all so much for your help
n.p.
So im having another issue now, im not sure if its because of the vert environment or not installing the module as root but its kicking back a permission error when im trying to access a usb printer https://pastebin.com/RnwRg3MS
You might need to add the pi user to a certain group
ugh, or edit udev rules, blech
I think that neither the virtual environment or installing the module as root has anything to do with this - the problem is the user who is running the code, that being pi
not having permission to access a device
huh
like here's a link of someone solving a similar issue https://github.com/braiden/python-ant-downloader/issues/30#issuecomment-7119938
okay thank you
the vendor and product ids are probably these ones from your error p = Usb(0x0416, 0x5011)
i rebooted the whole pi
rip
ya, rip
bad sectors I think
fun
got any devices under /dev called usbsomething?
dont think so
I plugged a USB printer into mine and got /dev/usb/lp0 created
pi@raspberrypi:~ $ ls -l /dev/usb
total 0
crw-rw---- 1 root lp 180, 0 Nov 25 19:50 lp0```
I recall adding the `pi` user to the `lp` group when I set up CUPS, have you done anything similar?
lusb is not a command
lsusb gives me this
Bus 001 Device 005: ID 0416:5011 Winbond Electronics Corp. Virtual Com Port
Bus 001 Device 004: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I don't see any printers there
Yeah i know
Mine is actually a USB to parallel adapter for an old HP LaserJet 2100, so I have Bus 001 Device 006: ID 047e:1001 Agere Systems, Inc. (Lucent) USS720 Parallel Port
which is device /dev/usb/lp0
its Bus 001 Device 005: ID 0416:5011 Winbond Electronics Corp. Virtual Com Port
if you unplug it and plug it back in, and run dmesg | tail, does it show you the device name under /dev?
and does ls /dev/usb show anything?
nope
π€
well it creates /dev/usb on the fly if something needs to exist under there, that just means it's somewhere else
I'm afraid I don't know how to approach this
especially not from python
Okay thank you for all your help
sorry π¦
its all good ill deal with it another day
ok im in trouble, i managed to make grub boot into debian after trying to install debian for the seventh time, now my system seems broken
sudo and update-grub arent found
and there's no unicode support
login to su then apt install sudo
@chrome stag I found out why I need to open iraf in an xterm and not in a normal terminal, some of the features only work inside an xterm for some reason
so its not because phycisits are stuborn (they still are though)
π«
Glad you got it working @long vault
Are you watching the lander's stream?
About to separate
Can't get any work done thursday and friday so I have to everything now π¦
So I'm too busy to watch anything
:(
kinda off topic for the server, but does anyone know of a way in systemd to restart the sound subsystem? getting real bad static and i have no idea why
im assuming ur using debian based linux
i'm using fedora but that should work fine
hmmm, don't have an alsa executable
can kill it with alsactl though
ok cool
oh maybe alsactl has nothing to do with actually killing alsa lmao
the pulse command worked though
hmmmm, any chance you know how to get rid of audio pops?
what kind of pops
when nothing is playing there are just loud popping and clicking noises in my headphones
the also docs say it's because of sound modules powering up and down but this issue just started
can't say i've experienced that
oh it looks like maybe a power saving thing?
i did have to do some tweaking to get noise out of my microphone though
echo 'N' | sudo tee /sys/module/snd_hda_intel/parameters/power_save_controller seems to have fixed it. anyway, thanks for the help guys :3
oof, guess not :/
echo '0' | sudo tee /sys/module/snd_hda_intel/parameters/power_save did fix it though lmao
Just GNU/Linux Thingsβ’
Does anyone else feel like the main obstacle to people calling it "GNU" instead of "Linux" is that pronouncing "guh-nu" sounds silly?
No I don't feel like that and pronouncing GNU like I'd pronounce it in my native language isn't really an obstacle for me (and should really not be for the majority of people)
hi
I have a cp command that copies files from one dir to another..
how do I make it copy the whole dir to the other?
You can copy a directory and all of its contents with the -r flag. cp -r folder destination
Or if you want to copy all files within a folder, I believe you'd call cp folder/* destination
hmm it says unknown command line flagt
Could you copy paste what you tried and what it responded with?
I ran a help for list of commands.. this is what is available in my version
copy source ... dest (See cp)
copytodir source ... dest (See cp)
cp [-a] [{-f | -resume}] [-R] [-m mode] source ... dest
Right, try -R with uppercase.
can't copy more than one file to a location that is not a directory.
but I just made this dir.. with mkdir o.o
Might need a slash at the end of the destination.
can i move my /boot/efi partition without screwing anything up?
when i say move, i mean relocate it on disk. i've got some free space i wanna move and the efi partition is in the way
despite gparted yelling at me, the answer was in fact yes
maybe that's just an efi thing?
yeah iirc with gpt and efi, the boot process doesnt need the whole set of boot files in any particular place on the disk, it just needs the right partition type
that's what i thought, good to know for sure now though
when making a program for linux, where should i put the necessary modules packed with my app
in ~/.local/share?
Guys I need help with a sed X)
i have this line in a file
<ComputerInformation Name="" Group="Linux" />
I wanna replace Name="" with Name=$host
send help π’
sed s/ComputerInformation Name="" Group="Linux"/ComputerInformation Name="$host" Group="Linux"/?
i wanna make a bash function/alias that creates a directory and then changes to it. obviously this is just mkdir -p <dirname> && !$, but the issue is getting it to work properly. aliases don't take arguments like $0 etc., and a function runs within a subshell so the cd command doesnt change the pwd. any hacks?
using a function works for me
huh, must've been the alias i made during testing screwing things up, it works for me too
anyone? Im not aware of sed and stuff.. but was told it was easier with shell commands than py
ok i got it
how do I use grep output while is a bunch of paths as input to sed ?
got it working in python notebook.. not sure how to do it from shell
are you trying to rename directories, or change a string in ever file in a directory and subdirectory?
I'm here
is there a way to use a per-application hosts file? i want my web browser to be able to access a domain but blackhole it for everything else
I've been drinking too much dumb bitch juice, anyone wanna help out a bit with sh?
I ended up figuring it out 
π Ahoj
I'm currently setting up an ZFS backup/restore for my side project and do have off topic question:
I do have 1 internal disk with ZFS and 1 external disk for backup.
Should I unite them in 1 zpool mirror raid 1 ? external disk will be attached once a week, so zpool will be most of the time in degraded state. But probably with working functionality and automatic error correction.
Or should I create separate zpool on external drive, maintain 2 separate zpools and use zfs send to external?
Not sure which correct option to choose.
@arctic olive I would say that the second zpool would be your best option. You can still do snapshots on the internal pool, then send everything to the second external zpool when it is connected.
100% make them separate and sync them on connect yourself
no reason to spend all day with zfs complaining that your degraded your pool
@arctic olive Will the external drive ever have changes made directly to it, or is it for backing up the internal drive?
I'm probably the worst type of python noob there is. A c/c++/perl, trying to convert to python.
It hurts my brain!!
How do you guys deal with he "pyhon2/3, pip 2/3" issues and keep them straight?
Not sure I understand what the issue is. Do you mean having 2 and 3 in the system at the same time?
yeah..
Not an issue.. just expressing frustration trying to re arrange my brain to think in terms of python.
Oh I see. That may not be easy.
Although once you stretch it to wrap around the new concept - it works much better and you have a whole new universe to explore and pull problem solving ideas from. =]
Thanks in advance for all the questions I'm sure I'll be tossing in here. perl I do a good bit of "os level scripting", and I'm going to work on migrating them to python. If I'm going to learn a language.. use it at least.
resources is an unknown tag name. Please check the spelling and try again.
Not sure which is the correct one.
That's the url anyways.
@carmine flame I plan to use 1 partition of external drive as backup of internal drive. Sort of read only. I have no intent to make changes to the data on that backup partition.
However there might be other partitions with other filesystems like ext4, ntfs on external drive, for other purposes.
yes, I guess separate zpool would be much easier option to maintain @grave jolt . Or maybe even just ext4 partition on external to which I send backups with rsync from zfs.
I have not tried to work with degraded zpool before π , but one of the reasons that make me consider such option is that ZFS provide automatic self healing and auto error correction during scrub when we have mirrored disk in pool , redundancy. An separate zpool & single internal disk will not be redundant, e.g. without self healing ability and auto error correction by ZFS. found people with similar cases
https://superuser.com/questions/1245067/zfs-backup-with-rotating-offline-drives
https://serverfault.com/questions/641136/is-it-possible-to-detach-and-reattach-a-zfs-disk-without-requiring-a-full-resilv
I am currently in the process of setting up a decent home NAS. The main concern is integrity of the data and I therefore decided on using ZFS as a filesystem. Unfortunately this does put some
@arctic olive yeah a single disk doesnt really benefit much from things like zfs outside of snapshots and crc based error correction. But constantly breaking and re-silvering is a good way to cause your drives to die sooner.
On top of that, redundancy via raid like systems is mostly for uptime, not integrity. Backups are the proper way to deal with that. A simple rsync job will be plenty as long as you verify that you can recover the data from it.
Using more standard tools will also make it easier to recover if something goes wrong. ext4 and rsync are well understood. ZFS knowledge on the level needed to recover from a mistake is a lot less common.
also crc error correction loses a lot of its protection when you dont have things like ECC memory. if an error occurs before the data gets to the filesystem zfs, btrfs and ext4 will all write that error right to the drive no problem
making backups the best option
I also use the snapshot features of file systems like btrfs and zfs regularly, which allows faster recovery from user errors but doesnt protect from drive failure or malicious data destruction
Your link seems to indicate that it can do a delta update which is nice, but there are tools designed for that, such as zfs send.
good point, right
hiiii
consider you have to files and you want to pass them as argument to a shell command
how to do this?
inside python script or inside bash/shell script?
to files, to <x> files, two files?
Am I able to install a package that I manually downloaded, instead of being retrieved via sudo apt-get?
I have a wireless dongle that I'm using now with Windows, and discovered a wireless card in my house that will probably work with Linux, given I have a certain driver package. However, I won't have internet access once I swap over.
dpkg -i package.deb @knotty leaf also why not just use ethernet?
Can't get a cable run to my computer.
oh yeah, that is famous curse of all unixes
there are "offline" types of packages like AppImage, static binaries, tar balls, Snaps(?)
but they ship mostly desktop GUI apps
and when you have to install something like driver, or command line utility with ton of deps - you fucked π€
because you have to manually resolve all dependencies, download them and install in right order.
or dig your hands on to other solutions
like hosting an offline repo via filesystem
or somthing else
Every package in every distro I've seen can be downloaded and manually installed let it be rpm deb snap etc
If it's a WiFi driver it's very likely just a kernel module
I've seen drivers with Perl packages dependencies π€‘
tmux is lit
docker is lit-er
how would i switch between hosting a ap and connecting to a network as a client
@jagged orbit what do you mean "hosting a ap"
would that be better in #web-development ?
@jagged orbit you'd just shutdown the ap software and use something like the spa supplicant to connect to an ap?
Or am I understanding the question wrong?
yeah its not that easy saddly
i cant reconnect to the wifi after that
but imma try something else now
- wpa supplicant
- wifi-menu cli OR nmtui
- tmux is complex while GNU screen is much simpler, accomplishing same task. and tiling WM like i3 is even better.
NetworkManager has a really nice interface for that sort of thing
I've only used nmcli, but I assume you get the same functionality from nmtui
@arctic olive I use ZFS a lot, I really don't think it's a good idea to just resilver the disks and yank them
suggest doing a snapshot and zfs send to the new drives
@arctic olive also, you don't need to backup all the data every time. You can just do incremental snapshots.
So um
@main olive
Idk if I should do this
Since it would be a pain in the ass
Well
Maybe it wont with other distros
Manjaro does suck dick to install
And people told me u literally chose the hardest distro
arch?
What arch
Um
I mean
manajro
Yes
is not the hardest
It is?
why is it
Well fuck, why would i know
While we do not really have a swearing policy, can you tone it down just a bit, Purrey?
Is this exccexive?
I mean sure
But that's odd
So yeah
Trying out new distros
is fun
if you like linux
I did enjoy my 1 month with manjari
Manjaro*
Did you come from windows?
Yep
Whole new experience isnt it
True
It's been my whole life using windows
Feels good to try something new
My whole linux experience as apython developer
improved when I discovered i3
zsh and all of that highly customizable stuff
What's that
tiling windows manager
Never heard dof it
Of*
Ok new deal
If I didn't find my problem in Google in 30 mins
Then I will download a Linux distro
BUT PLEASE,
One that doesn't make my pc look like a tablet ffs
you can change that
Oki
your environment deskptop its called
Well I couldn't find it in manjaro
Anyways
I still have windows byw
Btw*
So I won't delete it by anymeans
I've never used manjaro so I could be wrong but you should be able to change your desktop env. anytime
in any linux distro
Aha
100% you can
bye,manjaro
desktop environment can be completely scrapped in favor of a basic window manager
people
person
if somebody knew that i am connected to the wifi wirelessly and thati am downloading a file
in bittorrent
by "guessing"
is normal?
because i got freaked out and blocked him
Depends on what information you gave them, I guess
does android count as unix?
it runs linux but normally you dont use anything unix related. it has its own api and behavior
unless you have a unixy userspace i wouldnt generally refer to something as a unix environment
like if you only use command line its basically linux, which is a subset of unix
It does count as embedded (u)*nix environment
there are plenty of weird unix environments that serve specific purposes
android does use bionic instead of standard glibc , so it contributes to the raise of weirdness bar
and it targets arm, instead of mainstream x86. there are x86 builds but they are rare.
i figured because i can use bash and apt-get programs so im basically using it as linux
that is nice! β€
sadly however i'm not aware of framework, or standart, to develop an application once, and compile/ship/package it to multiple unix target platforms (like for example Solaris, FreeBSD, Android... etc)
wouldn't that be nice thing to have
i was under the impression pyinstaller code compiled for linux worked on all standard implementatios of linux?
anybody have an idea on how to compile https://github.com/jalan/pdftotext for windows? I tried manually cloning the poppler repo and putting the files in the same dir but the installation invariably fails because it can't find those lib files.
If modify the #includes at the beggining of the file from <poppler/cpp/poppler-document.h> to "poppler/cpp/poppler-document.h" etc it works
I got it to a point by modifying the setup.py's includes
but now I'm getting a different error
Did you see this: http://blog.alivate.com.au/poppler-windows/ ?
anyone know a method to kill one specific python file via command line (Ubuntu)
something like pkill -f /path/to/script.py?
make sure your pattern matches the right process only first with pgrep -af /path/to/script.py
does the thing you want to kill get listed there with pgrep?
yeah
Well, maybe the process isn't responding to the termination signal any more
you can forcefully kill it by sending the KILL signal instead
should be like pgrep -KILL -f /path/to/script.py
pi@raspberrypi:~ $ pgrep -KILL -f /home/pi/Desktop/AlarmClock/alarmclock.py
pgrep: invalid option -- 'K'
It's pkill instead of pgrep π
i assumed that
but yeah, you're welcome π
ty
yet another question because Im bad, And cant find it on the internet.
I know there are ways of opening a shell script on startup, But thats always in the background.
Is there any way to make the shell visible when it opens as it opens other needed py scripts, That I would like to be able to see the print output in console
You could configure it in your startup applications as something like gnome-terminal -x /path/to/script.py
then it would run it in a gnome-terminal window whenever you do a graphical login to your user account
huh cool. ty
Running a module from command line vs python is adding an extra argv and breaking my argparse, is there some way around this? Using $ python -m scripts.test works fine, but doing $ ./scripts/test.py where test.py contains #!/usr/bin/env python -m scripts.test adds the second argument of './scripts/test.py' which then breaks argparse
Make your shebang just #!/usr/bin/env python -m maybe?
then the system would try to execute #!/usr/bin/env python -m ./scripts/test.py
not sure if that works, probably not π€
That gives me an error Realitive module names not supported
Well, if you have relative imports, you should really decide on whether you want your script to either be launched as module or as script file. Supporting both is either impossible or at least nontrivial.
What you could do easily to work around this is to keep it for running as module with python -m and write a little additional shell script which you can execute directly that runs your Python script as module
#!/bin/bash
/usr/bin/env python -m "$(dirname "$0")"/test.py
Btw, sure you want python and not python3?
Anyway, that for example would execute the python interpreter and let it run the file test.py from the same directory as the shell script itself as module
Hey that more or less worked, although I had to do
`#!/bin/bash
/usr/bin/env python -m "$(basename $(dirname "$0"))".test`
It seems like there should be an easier way to get the directory name
Ooh, makes sense.
My fault.
but possibly you should even do "$(basename "$(dirname "$(realpath "$0")")")".test
otherwise it could break if you call it relatively from inside your project folder
I think
Is there a way to have a scheduled sudo reboot ? Please ping back
@pine mica Make a cron job.
Also, please don't ask people to "ping you back"
Unless you want me to mention you in every message that's intended for you, which I'm happy to do...
@pine mica https://www.digitalocean.com/community/tutorials/how-to-use-cron-to-automate-tasks-on-a-vps
thanks
np
on newer distributions systemd timers are also a great alternative to cron
I wonder if Lennart will come up soon with nice systemd alternative for my wife, or organ at least, so I can reproduce
wifed
@warm sentinel Still wanting help with your RPI python upgrade problem?
yes please :D
I usually just build from source, takes time though
How to install Python 3.7 from sources on Ubuntu 18.04, Windows Subsystem for Linux or Debian 9 Stretch
@manic nimbus sorry, our bot didn't like that invite being posted.
but in this case, I'll just post it for you since it's fairly relevant.
and you can post your message again minus the invite
Oh thanks. Didn't mean to disrupt. Next time I will check out rules better.
naw, don't worry, you did nothing wrong. the relevant rule is "don't advertise" but this isn't super pertinent in your case.
it might be worth considering whitelisting that server imo
I'll bring it up with staff
what about approaching them for a partnership
Does anyone have an idea what is going on here?
bash-4.4# file ./pypy3
./pypy3: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=f70c4a095072d5282103130c32cf482c91be5641, stripped
bash-4.4# ./pypy3
bash: ./pypy3: No such file or directory
Trying to run pypy3 just gives me an error saying that the file doesn't exist. ls shows it and bash even autocompleted the name when I attempted to run it
The directory is in /usr/local/bin
bash: /usr/local/bin/pypy3: No such file or directory
interesting
yea π¦
It is in a docker container. Hence the root user
OS is alpine:edge
/usr/local/bin/pypy3```
:[
confoosing
Why you no run?
/usr/local/bin/pypy3: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=f70c4a095072d5282103130c32cf482c91be5641, stripped```
bash: /usr/local/bin/pypy3: No such file or directory```
god damn it
sh: pypy3: not found
/ # /usr/local/bin/pypy3
sh: /usr/local/bin/pypy3: not found
yea
lets google linux denying existance of files
I was just thinking about that when I was talking about bash
that is very possible
It should be x86-64amd. It would have been really nice if that was the error they reported
is the docker one 64 bit (can a docker one even be non 64 bit if the host is 64 bit?)
Ah
\
# this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
# amd64
amd64) pypyArch='linux64'; sha256='4cfffa292b9ef34bb6ba39cdbaa196c5c5cbbc5aa3faaa157cf45d7e34027048' ;; \
# arm32v5
armel) pypyArch='linux-armel'; sha256='6a6888a55192f58594838b8b3d2e7daaad43d3bf4293afab3dd8987d0bbd1124' ;; \
# i386
i386) pypyArch='linux32'; sha256='b04eeee5160e6cb5f8962de80f077ea1dc7be34e77d74bf075519c23603f5ff9' ;; \
*) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding PyPy $PYPY_VERSION binary release"; exit 1 ;; \
esac; \
\
wget -O pypy.tar.bz2 "https://bitbucket.org/pypy/pypy/downloads/pypy3-v${PYPY_VERSION}-${pypyArch}.tar.bz2"; \
echo "$sha256 *pypy.tar.bz2" | sha256sum -c; \
tar -xjC /usr/local --strip-components=1 -f pypy.tar.bz2; \
find /usr/local/lib-python -depth -type d -a \( -name test -o -name tests \) -exec rm -rf '{}' +;```
zsh gets furious about that actually
in zsh you would get an exec error wrong file format
This is the "line" used to get and install pypy3 into docker
I am no wizard with bash.
musl-linux-amd64 should be the architecture
Yup, and it got echo '4cfffa292b9ef34bb6ba39cdbaa196c5c5cbbc5aa3faaa157cf45d7e34027048 *pypy.tar.bz2' based on the echo while building.
Yea, I am a bit confused, I have the right architecture. All the *.so files are the correct architecture as well.
So the host machine is x86-64amd, the docker container is also x86-64amd. The file is also x86-64amd. Β―_(γ)_/Β―
execve("/usr/local/bin/pypy3", ["pypy3"], 0x7ffe2d545eb0 /* 9 vars */) = -1 ENOENT (No such file or directory)
writev(2, [{iov_base="strace: exec: No such file or di"..., iov_len=40}, {iov_base=NULL, iov_len=0}], 2strace: exec: No such file or directory
) = 40
getpid() = 11
exit_group(1) = ?
+++ exited with 1 +++```
/lib64/ld-linux-x86-64.so.2 apparently doesn't exist in this architecture? So I am building for ubuntu:latest instead. Something a bit more used.
yeah, Alpine uses a slimmed down libc iirc. not everything will work.
the JVM is a notable example. I think there's an alpine-jvm container in response.
Oh hello Unknown
Yea. I switched over to ubuntu:latest everything appears to be working fine. Not worth the headache to continue to use alpine. Just to save a couple of megabytes.
my attitude on alpine exactly
@errant lava but mah precious efficiency :p
People can be penny wise pound foolish when it comes to system efficiency sometimes
At the end of the day what is most important is what lets you add value to your customer sooner and more reliably
I see
Does someone know if Its possible To use U2F or password instead of the combination of both ?
it kinda depends on your setup but you can prob configure something in the pam config file to do that
just be aware that if you mess up the pam config files you cant log in lol
I know that, i also thought about tracking pas using the sufficient flag
I Will try this out tomorrow
(pamtest command is there To avoid dumb situations)
@foggy raft Another way to run multiple programs on the same terminal is to use screen, that way each one gets its own virtual terminal and they stay running after you log out.
I had read that
I was just asking to see if there was another option
Ctrl + A to quit the screen, I think?
Ctrl+A makes the next character you type a screen command
Ctrl A + Ctrl D
Disconnects from the screen
But keeps it running
Ctrl + C closes it
Ctrl A then :quit works as well
screen -x returns brings you back to the screen
Oh sorry, I didn't say this before, but that's really helped me
Although I'm using Ctrl + A for quitting and screen -r for returning
And Ctrl A + num or Ctrl A + " for moving around
π
hey, sorry to replicate this question in several channels of this discord but can't decide which one is more indicated, anybody savvy on macOS installs and making coexist homebrew and anaconda ? There is one brew formula i want to install (MTG/essentia) and it fails. I have installed homebrew python and anaconda python, python which points to anaconda. I think the problem is there, since the essentia formula installs a python version. How to make coexist anaconda, and homebrew recipes which need python ?
What's the question?
ok so i was messing with some of my .zshrc file... and somehow i changed something that is now giving me this error
zsh_internet_signal:3: permission denied: airport
the setting basically shows my wifi connection speed on my prompt
it all started once i put this into my command line
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport\n
before i did that it was fine
Can you run /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport directly?
I'm trying to install Python 3.7 using pyenv on a fresh Raspbian (stretch) system, but it fails, saying it can't import _ctype. Any ideas?
$ pyenv install 3.7.2
Downloading Python-3.7.2.tar.xz...
-> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
Installing Python-3.7.2...
BUILD FAILED (Raspbian 9.6 using python-build 20180424)
Inspect or clean up the working tree at /tmp/python-build.20190113022900.3951
Results logged to /tmp/python-build.20190113022900.3951.log
Last 10 log lines:
File "/tmp/tmpukimoc30/pip-18.1-py2.py3-none-any.whl/pip/_internal/commands/__init__.py", line 6, in <module>
File "/tmp/tmpukimoc30/pip-18.1-py2.py3-none-any.whl/pip/_internal/commands/completion.py", line 6, in <module>
File "/tmp/tmpukimoc30/pip-18.1-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 18, in <module>
File "/tmp/tmpukimoc30/pip-18.1-py2.py3-none-any.whl/pip/_internal/download.py", line 38, in <module>
File "/tmp/tmpukimoc30/pip-18.1-py2.py3-none-any.whl/pip/_internal/utils/glibc.py", line 3, in <module>
File "/tmp/python-build.20190113022900.3951/Python-3.7.2/Lib/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
Makefile:1130: recipe for target 'install' failed
make: *** [install] Error 1
hmm, apparently I need libffi-dev installed... trying again now https://github.com/pyenv/pyenv/issues/1183
I'm building on Raspbian, but this could apply to all Linux distro. Original issue: https://bugs.python.org/issue31652 They bundled libffi prior to 3.7, now they removed it from Linux build. Ma...
anyone here that may be able to help with more of a general osx related question
waitt nevermint asked here already
If a host only has one version of python installed then does each virtualenv use that version of python?
Yes. The virtual environment can only work with Python versions you have installed. That said, there are some tools to help you with that. I think pyenv and pipenv work well together, from what I've heard.
pyenv installs/manages python versions and pipenv is a wrapper around pip and virtualenv
@cold pagoda I have to work with the version my company uses :( I originally wrote script in 3.7 but only 2.7.x is used
So Iβm trying to rewrite it correctly this time
Multiple virtualenv can be active at same time right, itβs unique per directory?
What do you mean by that?
As long as you run the files with the interpreter they belong to, so the one of their own virtual env, it should be fine.
may I ask if a unix user could run a script for me? more informations on #user-interfaces
i just built opus from source to be used with my discord.py bot
how do i check that is correctly installed?
(asking here because is only going to be used with discord.py and python)
write a little voice channel based code which plays audio or something and then join the channel to see if it gets correctly played?
@sage solar that is what i want to do, but if i'm not wrong you need to load opus manually if the system is not windows
