#tools-and-devops

1 messages ยท Page 40 of 1

true vapor
#

With PyCharm, shift+tab deindents the current line no matter where you are, but tab requires you to be at the start of the line to increase the indent level

#

is there anything thats the actual opposite of shit+tab?

frank compass
#

I just highlight at least 1 character and tab works

random breach
#

not sure if available in pycharm too

true vapor
#

Normally thats common to all Jetbrains stuff

#

So thanks

empty star
random breach
#

this looks more like it does what you want

#

just trued the emacs tab, it's weird

#

tried*

true vapor
#

Is it not just an indent level shift?

#

hm

#

I'll just leave it as is for now

random breach
#

it cycles between 0-current tab depth

#

(emacs tab)

#

indent line or selection does the trick though

heavy knot
#

someone know how to solve this?

violet belfry
vivid cargo
#

I remember this one

#

In settings there is a field for managing space between chatacters

heavy knot
woven stag
#

Why are those packages getting installed on the default python path? The terminal is running on my new path as well as outside vscode like on this screenshot

#

On the second screenshot it just changes the installation path for whatever reason

#

It seems that setup.py is what's making it change the installation path but I have no clue how to change it

heavy knot
#

thanks ELA it worked

woven stag
#

I'm so confused, on powershell (outside vscode), pip is installing on the correct directory

woven stag
#

Ok, think I figured it out

restive spear
#

read in markdown tables to a dataframe? Anyone know a library that does that automatically?

livid schooner
#

using git and github, how can you have a file on your pc that's constant even if you pull a file with the same name?

#

specifically, i'm trying to have a file for api keys, with the one in the remote origin being a placeholder and the one on my pc being the one i'll actually use

lost rock
#

normally I do and recommend it like this:

  • have a stub, e.g. config-example.yml committed in your repo, which can be published and holds no secrets
  • require people using your software to copy/rename that file to e.g. config.yml and fill out the missing values (document in Readme).
  • have the actual config.yml with your secret values ignored by git by adding an entry for it to your repo's .gitignore file and commit that.
livid schooner
#

so essentially just avoid naming them the same

#

i wish there was a smarter way to do it

lost rock
#

I think there is, but I never dared to dive that deep into git yet ๐Ÿ˜…

livid schooner
#

i need to do this with several files too, cause i have json files that need to be clear in the remote

lost rock
thorny shell
#

simply don't commit the "secrets" file.

#

make sure your code emits a useful error when they inevitably run your program without having created one.

lost rock
#

but doing anything like that gets messy and confusing imo.

#

(what I linked)

thorny shell
#

and yes, add an entry for that file to the project's ".gitignore", so they don't accidentally commit it

#

if you're super lucky, github, or someone else, will notice if you accidentally commit secrets. But you can't count on that.

livid schooner
#

but i have to have that file in the remote for it to work, and if i pull, it's gonna overwrite the existing local version

lost rock
#

that's why I said you need to document what files people need to copy/rename and adapt with their own local secrets. or even write a small installer script asking for the values and doing that

#

you can "disable tracking" of some local files with git update-index --skip-worktree PATH_HERE, but that is only on your local machine, and everybody cloning your project won't have that.

#

a .gitignore and renaming/copying avoids that, as it's the same for everyone

livid schooner
#

i just need to make sure the local version isn't overwritten when pulling

#

that's all

lost rock
#

that works with the command I mentioned, which is described in the linked SO post too. But I can't think of a scenario where I would consider this a good solution, tbh.

livid schooner
#

i don't see why this scenario would be so unusual

topaz aspen
#

i asked in the main channel earlier and didn't get an answer, but i'm still curious (perhaps tools is more appropriate)

So - of those who use vscode - do you find that the python mode can quite regularly be problematic? Things such as code completion not working, or snippets not loading etc.

just wondering if this is something that others bump into really, no particular errors or reproducible stuff to post

thorny shell
#

I don't use it but I'd be a little surprised; Microsoft tend to have their s*** together when it comes to IDEs

livid schooner
#

i don't really have any problems with it

topaz aspen
#

hrm ok ๐Ÿค”

#

ive definitely had issues with the things i've mentioned, perhaps there's something clashing though

thorny shell
#

you might have a flaky plugin

topaz aspen
#

Ok just to check, i've run

git reset --hard < previous commit id >

and lost work.... i'm never seeing this again, am i?

thorny shell
#

well, you've lost anything that wasn't already committed, yes

#

but whatever commit you reset away from is still there, in the "reflog"

topaz aspen
#

yeah, well that was an extremely expensive lesson

topaz aspen
#

is it possible to have the splits different font sizes in vscode?

twin hull
#

nano is considered as easier than vim, but why it vim considered "superior" on the long term then?

delicate gorge
#

Because in vim you can do a million things(the majority of which you're probably not even thinking off) a lot faster than in nano

#

For example if you have code like

func("hello world this a string")

And you'd want to change the string, put your cursor aaaaanywhere inside it and type

ci" (shorthand for change inner ") and the stuff between the two "" gets deleted and you can retype it

#

And there are hundreds if not thoudands of shortcuts and ways to combine them

#

@twin hull

twin hull
#

ok thanks

tranquil epoch
#

another point about nano versus vi / vim: some (older) *nix distributions you may find (like in an enterprise environment) won't have nano (or even vim) loaded, so having a working knowledge of vi (or, shudder... emacs) might help

delicate gorge
#

Emacs won't be on machines that old either

#

Maybe some Emacs compatible minimal thing but not usual Emacs

twin hull
#

vim is more than 20 years old if I recall correctly, how can it be possible not to have it?

delicate gorge
#

Vi (the editor vim is largely based on) is from 76

#

However vim itself is from 91 so almost 30 years

twin hull
#

I hope there is no more productions servers that don't have it then!

delicate gorge
#

How can one not have it is simply that some minimal operating system installations don't bother shipping a full vim and instead give you a vi

#

Of course there are for reasons I just explained

twin hull
#

vim itself isn't already very light?

delicate gorge
#

But vi and vim share maaaaaany things

#

The average user will find little difference

#

Well vim itself looks very light but you can do a million things with it without plugins already

#

Has a file explorer can do remote editing via SSH can do syntax highlighting of course

#

Of cojrse it also has its vimscript

#

And if you built it with certain options support for python plugins support for a graphical version and what not

twin hull
#

I'll give it a try

#

As for now, I only faced it with git, and changed quickly to go back to sublime

#

I didn't understand anything and took more than 10 minutes and a search on the web just to exit

delicate gorge
#

That almost sounds like you're meming but if you say so...

just do a 'vimtutor' in the shell of your trust or a :help in vim itself and you'll be fine

urban elbow
#

I'm having some troubles with setting a new font in VSCode. I'm trying to set JetBrains Mono as my font but what I am doing doesn't seem to be working. It works fine changing to other fonts (i tried Arial and Verdana and it worked). I also double checked and the font is definitely in C:\Windows\Fonts. Do i need to restart my laptop before it will work?

urban elbow
#

Never mind, I just forgot to restart VSCode.

shell wasp
#

Quick question, I use selenium to test my employers website. Now we are planning to move to apps. I am looking for a solution to test on an adroid/ios app. Do you know of any good frameworks ?
If not what should I Google ??

frank compass
#

Don't know anything about apps, I googled android ios automated ui/ux testing and got a few links

rich elk
#

i was wondering if someone could help me with controlling the mouse and keyboard in pycharm, please @ me

heavy knot
#

@rich elk how

heavy knot
#

if you dont have vi or access to graphical

#

my statement still stands

#

there is always nano

#

;)

thorny shell
#

and my point is that, no, sometimes there isn't nano

#

hm, you know, I should actually check that

heavy knot
#

uhm

thorny shell
#

well Amazon Linux AMI release 2018.03 has nano ๐Ÿ™‚

#

so perhaps the boxes I use at work have it, too

dusty hill
#

Let the editor wars continue?

heavy knot
#

ive never heard of any linux distro or unix based machine not being included with nano

delicate gorge
#

did someone just ask for a linux distro without nano per default

thorny shell
#

@heavy knot honestly I'd never looked for it before

#

nor known anyone to use it ๐Ÿ™‚

heavy knot
#

@delicate gorge read ^

dusty hill
#

I just had to edit something down inside the guts of REPL.it. I was amazed that I got to a bash shell. But it had no editor available at that level and I had to use echo >

heavy knot
thorny shell
#

@dusty hill that's like old-school sysadmining.

heavy knot
#

damn

#

i feel for u fam

dusty hill
#

One of our guys for some reason had joe as the default editor and couldnt figure out how to exit ๐Ÿ™‚

delicate gorge
#

hm

thorny shell
#

of course

dusty hill
#

forgot all those old school WordStar ctrl-k commands

thorny shell
#

I detect an old person

dusty hill
#

I have used "echo" and "copy con" on windows/dos

delicate gorge
#

well from the top of my head would be
all buildroot linuxes
nixos
prbly gentoo and derivatives
dunno about arch but maybe

dusty hill
#

it was an arch system that had joe, but I can't imagine why

heavy knot
#

the heavy ctrl + v "top of my head"

#

arch doesn't have joe last i recall

dusty hill
#

ctrl-k brough up the secondary menu

heavy knot
#

but arch does indeed have nano

dusty hill
#

I hate nano ๐Ÿ™‚ But I cn use it

heavy knot
#

but why

delicate gorge
#

also, as vi is actually specified in POSIX without any other editor having that status the only editor you can be aaaaabsolutely sure to find on POSIX compatible systems in 100% of the time is vi

dusty hill
#

but after coming from the M$ brothel I got very used to CUA/sAA editors, so the whole Scintilla world is pretty comfortable.. But I am very used to vim... love me some vimGolf anyone else play?

delicate gorge
#

@heavy knot question is does it have nano per default

heavy knot
#

for?

#

arch?

delicate gorge
#

for any linux distro

#

every distro apart from the embedded ones prbly have nano in their repos

#

the question is wether its there per default

hardy cedar
#

nano is not a required editor so it's not present on all distros

delicate gorge
#

exactly

dusty hill
#

If you are using *nix there is no good reason not to know how to use vi. But unless you are stuck on minimalized systems, there is no reason not to be able to use whatever you are comfortable with

delicate gorge
#

minimalized systems / any system you dont have root on

#

which if youre working in a professional environment are gonna be a lot

dusty hill
#

Emacs has Tramp, and Vim lets you open files remotely, so not sure if it matters, I can always use a comfortable editor on my machine, and if it is not installed on the remote system, then I can usually work across ssh with the on I choose. I may not have root/sudo on the AIX servers, but I certainly do on my notebook

#

I have been working in the professional environment for 30 years, and I have yet to not be able to use whatever editor I deemed necessary. Even when I still used Visual Slick Edit, I even got my bosses to pay my maintenance at some places.

thorny shell
#

didja use "brief"?

dusty hill
#

Brief, and Crisp.

#

playing with Eric now.. Not sure if I like it yet

#

didn't do it for me

#

Let's try Thonny

thorny shell
#

wow, I'd forgotten Crisp

#

BriefEdit I think it was called

#

Brief.
Boxer.
Short.
UnderWare.

I sense a theme

dusty hill
#

Crisp was a Brief clone. and Brief was awesome until Borland bought it and killed it

#

I did Qedit, that because TSE (The Semware Editor) also Bingo and a bunch of those others

thorny shell
#

these names are ringing very faint bells.

dusty hill
#

let's try spyder

#

that didn't do it for me

thorny shell
#

... although not with those two specific dudes

dusty hill
#

thankfully I was on a trunk to the mainframe so I was in terminal mode yterm if i remember correctly. We used XEdit

thorny shell
#

you may have just out-codgered me

dusty hill
#

I just ran scite. By default it understands python, and I ran my text mode version of conway's in it and it ran it in its terminal ... not bad for out of the box

#

When I got to Penn State they just recently got rid of punch cards

#

Hmmm Geany seems to know what to do with python right out of the box, runs conway's in a new terminal window. It thinks it should use PEP8 as a linter, but easikt enough was able to change it to flake8

thorny shell
#

I've never seen a punch card outside of a museum, but people younger than me actually used them

dusty hill
#

I remember when people made Christmas wreaths out of them

thorny shell
#

look! ASCII!

dusty hill
#

paper tape, or is it driver for jacquard loom?

thorny shell
#

one or the other ... can't quite remember which

#

the printers for those had a little bucket to collect the dots. Dumping that bucket on someone was fun

dusty hill
#

never used that but I have used both 5-1/4 and 3.5 floppy and microfloppy

thorny shell
#

pff, kid

dusty hill
#

my first computer had a cassette tape drive, and my first hard drive was a 69 Mb RLL drive

thorny shell
#

what! why you're just a shirt-tail youth

#

who let you in here? Don't you see the sign?

#

"You must be this tall to tell tall tales"

dusty hill
#

I went out to a developer conference and bought one of the GNU's Not Unix T-Shirts (unbleached cotton of course) while I was on the plane coming back, someone asked me if I was Richard Stallman ๐Ÿ™‚

#

He is 12 years older than me ๐Ÿ™‚ and Linus is 4 years younger than me ๐Ÿ™‚

#

My second job out of college in the very early 90's was for Compute! Magazine. Then my next one was Penthouse Magazine ๐Ÿ™‚ I have bylines in the former.. no so the latter.

#

Pictures are too small, is that a loupe?

thorny shell
#

it's supposed to be.

#

I'm on a watch discord, and forgot that my avatar is the same on every server

#

also it's on the wrong eye, but ... sigh

dusty hill
#

easy enough to flip the picture.

#

So you are hourologist?

thorny shell
#

nah, I'm a wanna-be amateur horologist

dusty hill
#

I have done some clock stuff, but preferred to do cameras, But not that silver photography is pretty much done, I don't worry about that much either

thorny shell
#

I have two old Nikon FE2s in my bedside drawer; I can't bear to get rid of them. Cash value 1/20th of 1ยข.

dusty hill
#

check with B& H they might be worth more than that. I have a VietNam era 3 lense set nikon that I had the meter modified to use normal batteries instead of mercury. Takes some nice pictures

#

I think F2 maybe

thorny shell
#

Oh I know how much they're worth.

dusty hill
#

๐Ÿ˜ฆ

#

I have some intersting 4x5s and a pile of Mamiya RB67 and maybe some 330 and 220s too

#

I only wish I could get a reasonable digital back for the RB's

thorny shell
#

I think (unless I sold it and then forgot) I have an old Speed Graphic ๐Ÿ™‚

#

I took approximately one photo with it, but it's a good 'un

dusty hill
#

I have a field version and a few of the ones that cock like a shotgun, rapid something

#

I think I have 2 or 3 of them

#

I have some boxes that I packed up nice and secure before I moved. I have lived here going on 6 years ๐Ÿ™‚

acoustic epoch
tawny temple
#

Don't think it's posible

#

You can manually set colours of some things to an extent

#

Mainly for the code editor

#

Doesn't seem possible to change the colour of the interface itself in that manner

random breach
#

@acoustic epoch

#

also this one

#

oh, looks like there are text mate version available on the repo too, so you could try converting those if those ports dont do the trick

acoustic epoch
#

@random breach Oh cool, so the second one is just a theme i can use in intellij?

#

or i should convert it using the 1st link

random breach
#

both of the themes from color-themes.com are apparently intellij compatible

#

text mate version of the theme available on the repo

#

in case the ones from color-themes.com dont work

acoustic epoch
#

so the .jar file is a plugin-like?

random breach
#

idk, im not sure how pycharm plugins work

#

but most likely, yes

acoustic epoch
#

same here

acoustic epoch
#

using the convertor?

#

@random breach

random breach
#

i believe so, yes

#

it says it can convert text mate themes to intellij themes

acoustic epoch
#

smh it requires python 2.7

acoustic epoch
#

This is my output in pycharm, while in vscode it shows the full error, anybody knows what the problem here?

random breach
#

go to the top right bit, click on that

#

select 'edit configuration'

#

then in the window that pops up scroll down and make sure that 'emulate terminal in output console' is checked

#

this typically happens because some libraries like qt do some weird things with stdout/stderr while pycharm also does some other weird things with stdout/stderr which make them incompatible.

#

@acoustic epoch

acoustic epoch
#

Ok ill try thanks!

#

Great

heavy knot
#

Hi! I am a newbie to Python and was wondering what programs I should use.
I am looking for an IDE for testing my scripts and a text editor to write out my scripts

#

Any suggestions will be helpful

lost rock
#

!resources has some recommendations

rancid schoonerBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

obtuse saddle
#

Hello! There are some suggestions in the sticky! For me, it's Pycharm, but other may have other preferences.

vivid cargo
#

I prefer vscode, a bit weaker than pycharm in terms of fetures and codechecking but extension market is huge

warm pollen
#

!tools is a specific page dedicated to IDEs and editors

rancid schoonerBOT
#
Tools

The Tools page on our website contains a couple of the most popular tools for programming in Python.

honest elm
#

How can i run easily code inside Sublime?
Ping me please

timid jolt
#

๐Ÿ™‚

coarse rapids
#

@timid jolt Please don't reply with LMGTFY links, it's rude

#

Instead you could provide one link, or ask the person what they've tried so far.

vivid cargo
#

@honest elm corey achafer made a video explaining how he set up his whole sublime 3 editor
in there he explained how he runs python inside it

#

there's the video, although i think sublime can't accpet keyboard input in python execution

#

eivl, our admin, uses sublime and has way more knowledge than me. You might want to talk to him

timid jolt
#

@coarse rapids I found it funny that the first link returned on his exact question provided a solution. I will refrain from doing that again here. Thank you for the feedback.

bleak barn
#

how can I export as an exe file in pycharm?

tawny temple
#

Look into pyinstaller

bleak barn
#

for some reason I don't have pip

dusty hill
#

Anyone know hot to run coverage without getting it to test the coverage outside your project ?

honest elm
#

@civic hound

civic hound
#

yes

honest elm
#

Okay so first thing is how can i run code inside Sublime

civic hound
#

sublime has a built in python build system

honest elm
#

And what does that mean?

#

Ahhaha

civic hound
#

Tools -> Build

#

it might not work the way you want, but you can start there

honest elm
#

And why mybe doesn't work as i whant?

#

What do u mean?

#

@civic hound

#

Well and second thing was how can i install a linter for python on Sublime like pylint

civic hound
#

i use flake8 for that

#

well.. i do not know what your needs are for running python code with sublime.

#

for me personally I need an REPL so i can work on debuging within sublime

#

some wants a repl just because they want to capure input() from the user

#

if you just want to run the code, then the normal one will work fine

honest elm
#

What does REPL mean?

civic hound
#

!repl

rancid schoonerBOT
#

Read-Eval-Print Loop

A REPL is an interactive language shell environment. It first reads one or more expressions entered by the user, evaluates it, yields the result, and prints it out to the user. It will then loop back to the read step.

To use python's REPL, execute the interpreter with no arguments. This will drop you into the interactive interpreter shell, print out some relevant information, and then prompt you with the primary prompt >>>. At this point it is waiting for your input.

Firstly you can start typing in some valid python expressions, pressing <return> to either bring you to the eval step, or prompting you with the secondary prompt ... (or no prompt at all depending on your environment), meaning your expression isn't yet terminated and it's waiting for more input. This is useful for code that requires multiple lines like loops, functions, and classes. If you reach the secondary prompt in a clause that can have an arbitrary amount of expressions, you can terminate it by pressing <return> on a blank line. In other words, for the last expression you write in the clause, <return> must be pressed twice in a row.

Alternatively, you can make use of the builtin help() function. help(thing) to get help on some thing object, or help() to start an interactive help session. This mode is extremely powerful, read the instructions when first entering the session to learn how to use it.

Lastly you can run your code with the -i flag to execute your code normally, but be dropped into the REPL once execution is finished, giving you access to all your global variables/functions in the REPL.

To exit either a help session, or normal REPL prompt, you must send an EOF signal to the prompt. In *nix systems, this is done with ctrl + D, and in windows systems it is ctrl + Z. You can also exit the normal REPL prompt with the dedicated functions exit() or quit().

civic hound
#

read this tag for this info ๐Ÿ˜‰

#

me using a REPL is down to how i write code. some just use python -i my_file.py in the terminal

#

i on the other hand like that to be inside my editor, just so i do not have to Tab to my terminal

honest elm
#

What does the -i do?

civic hound
#

did you read the tag i posted above?

honest elm
#

Not all

civic hound
#

then you should, your question is answered there

#

i would just copy paste it from there, it is so well written, i could not explain it any better you see

honest elm
#

Ah okay

soft trench
#

(on the 5th para)

honest elm
#

Yes yes

civic hound
#

our admin fisk is the one that has written this.. ๐Ÿ˜„

honest elm
#

But i didn't understand at all waht an REPL is

#

Is somethimg u install?

civic hound
#

have you ever run python from the terminal?

#

and nothing more?

soft trench
#

no, have you had experinece with a command line env/shell/terminal?

honest elm
#

Yes

#

@civic hound

soft trench
#

(ditto)

civic hound
#

then thats the repl

honest elm
#

Just run script from cmd?

civic hound
#

you can run code from inside the repl yes

#

you have to type it all though

honest elm
#

But lets rewind

#

Can i run inside Sublime?

#

If yes how if no okay

civic hound
#

yes, thats what i do, i do not use the default build system

#

its a package called SublimeREPL

honest elm
#

And how do i install that package?

civic hound
#

sublime has a package manager

#

you have to use that to install it

#

if you have not used that before you have to run a first time setup

#

are you on windows?

honest elm
#

I am Windows yes

#

But now i don't have my pc here

civic hound
#

CTRL SHIFT P

honest elm
#

Ah okay like other programs

#

Like vs vode and so

#

Okay

civic hound
#

yes, vscode got this from sublime i think.. if sublime was the first ๐Ÿ˜„

honest elm
#

Aha

#

And the linter?

civic hound
#

flake8

honest elm
#

Same?

civic hound
#

once you have the package manager you activate it and write install package

#

then flake8

honest elm
#

Ctrl shift p?

civic hound
#

you have to have flake8 installed on your computer to make the sublime version work

#

yes, everything inside sublime is run using CTRL SHIFT P

honest elm
#

There is no pylint?

civic hound
#

yes, you can insttall that

#

but you should not install both. it will mess with you ๐Ÿ˜„

#

chose the one you want

honest elm
#

Ho is better?

civic hound
#

i do not know. i have only used flake8

honest elm
#

And what is the diferencie

#

Ahhaha

soft trench
#

pylint is good too

civic hound
#

i think black is the new cool kid in town, but ill just stick with flake8

soft trench
#

black adds "extra" new lines, makes it more legible

honest elm
#

And when i habe SublimeREPL installed how do i run the script from Sublime?

civic hound
#

CTRL SHIF P -> run current file

#

i have made a shortcut key for this though. its a bit hard to explain more in details

honest elm
#

But wasn't that for serching packages?

civic hound
#

you can run any command from CTRL SHIF P

honest elm
#

Aha

civic hound
#

installing packages, runing script, chaning theme,

honest elm
#

But i must type then

#

I mean i must type the file name or directory etc

civic hound
#

you get a menu you can use with your mouse

#

no, it will run the current active file

honest elm
#

Aha

#

And what is that u told of the shortcut

#

?

civic hound
#

i run the current file with Ctrl + B

honest elm
#

If i am not wrong to config keys u must look on a super long file witha ll configs

civic hound
#

this is my sublime

#

hmm.. i have some internet issues, not able to upload a screenshot

honest elm
#

Retry

civic hound
#

sublime uses configure files yes, they tend to be a bit long because people like to have many options

#

ill just switch to mobile, hold on

honest elm
#

And do you remeber were was approximately the line to change the key to run the code?

civic hound
#

oh its not that easy. its a lot of configurations and customization

honest elm
#

But is only one key no?

civic hound
#

are you infront of your computer and have installed SublimeREPL?

honest elm
#

Nope

#

I'm on bed

civic hound
#

then there is no way for me to explain it

honest elm
#

Okay

#

I will talk u again tomorrow

civic hound
#

sure thing

honest elm
#

I'm passing out

#

Xd

#

2 morning here

#

Bie

civic hound
#

yes later ๐Ÿ˜„

bleak barn
#

what happened?

#

(all the interpreters are invalid)

ivory wagon
#

I tried using pycharm but I really can't get into it

trim schooner
#

Hi all,
I am looking at learning Django.
At home I am using Windows because of playing a game.

Would you suggest running something like a Ubuntu VM in virtual box?

Or is it ok to run directly on my WIndows install using Python virtual env. ( I had a quick read I think this allow me to run django without messing any other project)

Would I run postgres on my local Windows or should that be a separate VM or same VM as Django?

and finnaly anyone been using something DOOM Emacs for pythong work? I am very intersted in using this over pycharm although I know this is a massive learning curve also i feel its worth it

dusty hill
#

good morning y'all

honest elm
#

@civic hound

#

I' here

#

So

#

Explaint me step my stem what do i must to to install the linter on sublime

#

Because i installed 2ยก3 linters and doesn't work

#

The only thing it happens is that it gets yelow when somethin is wrong

#

And allso now how can i unstall the linters i have installed

crimson stump
#

why are git hooks written in ruby so much
literally never came across ruby until i started looking at hook scripts
i am a newbie but still

vivid cargo
#

git hooks are written written with ruby because github api is written in ruby

#

i forgot which version or api

crimson stump
#

ah okay

#

but writing in python isnt a problem right

#

thanks @vivid cargo

tawny temple
#

They can be in any language

#

I believe it simply respects the shebang used

crimson stump
#

yep okay cool

#

thx @tawny temple

civic hound
#

@honest elm Im away on a business trip, could not answer. we can talk about this at a later time. ๐Ÿ˜„

#

im normally active in the help channels when im online, so there is a good place to look for me ๐Ÿ˜„

fervent juniper
honest elm
#

I intslled the Monokai color theme on VSCode, but the problem is that the color of the library constants still white

#

Is the only thing that still the same

#

I whant this:

#

But i have this

#

If does someone know how to fix that please ping me.

normal topaz
#

hello, i had a problem regarding imports and VSCode

#

i have a file for discord bot, in which i built most of it on my desktop

#

when i decided to work on it on my laptop, i had many import errors

#

and i downloaded all the modules through pip

#

so i cannot test anything within the VSCodes terminal

#

if i launch the code from cmd, it works

hybrid lagoon
#

is your vscode using the same interpreter?

normal topaz
#

@hybrid lagoon wait you just fixed my problem LOL

#

thank you so much!

#

definitely wrong interpreter

hybrid lagoon
#

good to hear

ivory barn
#

Guys, can we set PyCharm's virtual environment so that it runs React? ๐Ÿ˜„

true vapor
#

You can with pycharm Pro

thin pendant
#

Please ping me if someone knows the answer ๐Ÿ™‚

thin pendant
honest elm
#

I intslled the Monokai color theme on VSCode, but the problem is that the color of the library constants still white
Is the only thing that still the same

#

I whant this:

#

But i have this:

#

please @civic hound If you have idea...

#

Ping me plase

jaunty owl
#

Is the Intel Celeron 4205U 2-core / 4 thread?

honest elm
#

@jaunty owl

violet belfry
#

@honest elm let's not use passive aggressive links

#

Instead try conversing with people like they're humans

honest elm
#

Sorry

#

Hahaha

violet belfry
#

It's not funny

honest elm
#

I did it because someone did the same with me

#

yesterday

#

@jaunty owl You'r info:

thin pendant
#

But yeah why people ask questions that can be googled within 5 seconds ?Also wrong channel, this isn't hardware channel .

violet belfry
#

Because google results often lead to pages of garbage

#

If it bothers you, you can just not type anything

civic hound
#

@honest elm i have never used vscode before, so not sure how much assistance i can be to you

honest elm
#

@civic hound Then can u ping some admin that u know that uses VSCode

#

???

civic hound
#

no ofc not. we do not randomly ping people here

thin pendant
#

Hey maybe someone knows how to debug Sublime Text plugins when developing ? I want to be able to use pdb

civic hound
#

what version of python are you using @thin pendant ?

thin pendant
#

3.6

#

I asked more precisely on unix

#

But maybe there is easier way to do it ;>

civic hound
#

yes. its to use 3.7+

#

๐Ÿ˜‰

thin pendant
#

How ?

#

I mean would that work ?

civic hound
#

lets to one thing at the time

#

๐Ÿ˜„

#

you need a REPL to use pdb

#

there is a package im using called SublimeREPL

#

running the code using that, will let you interface with the pdb

thin pendant
#

Hmmm, ok. But I don't want to only debug my code. I need to debug sublime python engine.

#

Currently using Show Console to do it.

#

But I need to print because there is no input

#

I am developing some plugins

civic hound
#

I have not written anything for sublime itself

thin pendant
#

This is closest I got to answer

#

Unfortunately it's not use for me ๐Ÿ˜ฆ

civic hound
#

what in sublime do you want to debug?

thin pendant
#

I am extending this plugin

#

With my own things.

#

I know I can print my way through and probably get there, but I am stubborn ๐Ÿ˜„

#

Also I want to do more things in future

#

Looks promising

civic hound
#

remote access to the debuger?

thin pendant
#

Yes! It works !

#

Amazing thing

honest elm
#

@civic hound But u know someone ho ises vscode?

topaz aspen
#

Is continuous integration an alternative to makefiles? I was under the impression that they played nicely, rather than competed. I don't know / use either though
https://softwareengineering.stackexchange.com/questions/234574/what-is-the-benefit-of-continuous-integration-over-make

tawny temple
#

No, you could very well invoke make in your CI

#

CI is meant to run on a server and be automatically triggered

#

and it can do whatever you want, be it run tests or whatever

topaz aspen
#

@tawny temple hrm - so if i use pytest locally, i would also use them on the server? Or only on the server? Or, is one typically testing for something different on the server vs locally

tawny temple
#

It's the same

topaz aspen
#

so CI rules out having to bother with local testing, it's a replacement for it

#

( is that a fair comment? )

tawny temple
#

I'm not sure. I think it's more of an insurance policy but I suppose you could just rely on it for testing if you can't be bothered to run locally.

violet belfry
#

You should still test locally

tawny temple
#

Ideally you should strive to not commit broken code to beign with

#

so you should test it

topaz aspen
#

i don't get why we have both though

#

seems redundant, isn't that what we're trying to avoid most of the time?

violet belfry
#

If you push something and CI fails, what do you do?

#

You either get an extra commit or have to force push a change

#

Neither of which are good options

topaz aspen
#

i mean - if my tests are poor enough locally why would they be good enough remotely?

violet belfry
#

What does that have to do with what I asked?

topaz aspen
#

If you push something and CI fails, what do you do?

i wouldn't be able to if my local tests had caught it?

violet belfry
#

Aren't you arguing for not testing locally?

topaz aspen
#

i'm arguing for one or the other

tawny temple
#

There's nothing that forces you to test locally before pushing

topaz aspen
#

either write decent ones locally, or have decent ones in CI, having both is confusing to me atm

#

i thought that's what git hooks and stuff were for?

tawny temple
#

CI enforces tests, which can't be enforced locally for every developer

violet belfry
#

You can't reject a push

#

Well, you can if you control the git server

#

A git hook is still testing locally

topaz aspen
#

@tawny temple fair enough - seems that just having CI would be best then

timid jolt
#

I want fast feedback, so I test locally. I (we) want certainty about what is pushed through to production, so I (we) test in my (our) pipeline.

topaz aspen
#

@timid jolt are the tests mirrored?

mystic parrot
#

is there a way to run selenium on windows apps through python?

timid jolt
#

@topaz aspen unittests I run locally and often, they are fast. Integration tests and stuff like mutation testing might take longer, so I just make sure these run in my pipeline. But I could run them locally if I wanted to. It's all about tradeoffs. But I really, really like the fast feedback of those unit tests.

woven stag
#

So, vscode keeps showing this about a repository that I don't have anymore. How do I get rid of it?

warm pollen
#

Delete the .git folder

woven stag
#

I did

warm pollen
#

It is hidden by default on windows

woven stag
#

It was on a folder I was using earlier

#

Unless it got copied somehow but I don't think so

warm pollen
#

And on a top level folder?

woven stag
#

Does git creates top level folders with git init?

#

I used the bash without admin privileges so I would assume it doesn't

woven stag
#

Ok, nvm, figured

topaz aspen
#

@timid jolt thanks... I'm trying to understand the workflow, I've neglected it for a while

true vapor
#

I'm following this Docker tutorial almost exactly (the only change is that I've removed maintainer from the dockerfile because it gives an error), and it just won't run.

I'm like 90% sure I'm being dumb in some way, but I can't see it. Could someone have a quick look at the tutorial and tell me if there's any chance its wrong?

https://runnable.com/docker/python/dockerize-your-flask-application

tawny temple
#

Do you get any errors?

#

The dockerfile looks fine at a glance

#

You could use an updated base image with ubuntu 18.04. Not relevant to the issue though

true vapor
#

I didn't get any errors. I just changed the name to something else and it ran. 0 clue why it worked now but not then

honest elm
#

Please someone ho knows a lot about vscode and code color packs

#

ping me

somber dirge
#

does anyone know how to give the file explorer in vscode root access on a linux vm i am sshing into?

mint kiln
#

Hello, quick question,

I recently downloaded pycharm, and I started using jupyter notebook. I want to edit/create notebooks in pycharm which I can do now, but I am wondering if it is possible to have how a jupyter notebook looks like in pycharm?

ivory knoll
warm pollen
#

@honest wren you need to add the .gitignore to your repo, using git add like with other files

#

@ivory knoll doesn't it already run 3.x?

ivory knoll
#

it runs python, not python3

warm pollen
#

I mean, even if it says python, doesn't it run 3.x, have you tested it?

ivory knoll
#

nvm figured it out in settings

trim schooner
#

oo so I found what is Jupyter notebook shortly followed by Jupyter Labs.

Chaching!!! Where have you been all this time!!!!!

heavy knot
#

Need some help with Pycharm, currently running ver 2019.3 Community edition installed via snap on linux. Basically, after a while if i launch a project pycharm will open in two windows as shown here. How can I stop/revert it back to one window? There's absolutely nothing of use in the empty window and closing it closes the entire application.

trim schooner
#

probbably a setting in preferences somewhere

keen breach
#

Anyone here with experience with Nuitka??

#

I'm trying to compile two python files and two wav files into an executable, but i have no idea what to type in the console. I have installed everything and it is ready.

#

I really need some help!!๐Ÿ˜…

analog kettle
#

Can you configure pycharm to kill the script you're running if it exceeds a certain memory threshold?

ivory knoll
heavy knot
#

hello i need help pls

#

so i successfully established a connection btw mysql and python and now when i was running my mysql queries on pycharm to actually run it on mysql
and i was able to create table from pycharm into my mysql

#

but i was not able to insert the values into the table
help me!!!

twin hull
#

I would like to get started with vim, having a few things to do. How to enable python syntax? I think it's in my .vimrc file?

#

and autocompletion?

twin hull
#

also, how to use code key combination on Mac?

#

Control-c (redo) doesn't seems to work

#

I'm also searching for a colortheme close to sublime

#

please ping me if you know, I'm a bit lost under the huge number of package

warm pollen
#

@twin hull you'd need some plugins, plus a plug-in manager, because as a good developer, you're too lazy to manually install them :D

twin hull
#

@warm pollen Yep I know that but I would like some help on which plugin/package manager to take, since there is a lot of them ๐Ÿ˜‰

warm pollen
#

Aha okay, I could give you my setup, but it highly messed up, I don't really suggest you to copy it :D

#

@pure pulsar is a vim user iirc, maybe he have some better advices

pure pulsar
#

i am

#

i'm still using vundle on my vim config, but i think vimplug is more modern, i just didn't make the switch, it's not a very important decision anyway, they kind of all do the same thing

#

for color themes i have been using the base16 collection for quite some time now, there is a lot of choices in there, and you can configure both your terminal and vim to use the same, and switch between them easily enough, so it's worth setting up imho

#

(using base16-chalk at the moment)

#

i don't think ctrl-c should redo, it should cancel the current operation, if anything

#

you might be thinking about ctrl-r no?

#

(i don't suggest you copy my setup either, but it's on github.com/tshirtman/.vim if you are looking for inspiration or specific technical things, but a lot in my settings certainly don't make sense to other people)

warm pollen
#

CTRL + C move the process to background if you are in the default mode, doesn't it?

#

Maybe not on Mac though

pure pulsar
#

ctrl-z

warm pollen
#

Ah yes

pure pulsar
#

ctrl-c is kind of like escape, but not exactly

warm pollen
#

C is keyboard interrupt

twin hull
#

ok, first I'm looking for a package manager (if there is some), and a python-completion plugin (I think)

warm pollen
#

I use vim plug, and I'm quite happy about it tbh

#

It does the job just fine

twin hull
#

color themes also need to be installed, am I correct?

pure pulsar
#

well, there are some basic ones, but yes

#

koeler is not bad in the basic ones imho

twin hull
#

I'll try it, as for now it's all white and very tiring

pure pulsar
#

it's koehler sorry

twin hull
#

ty

#

so vim-plug is the first step to go?

warm pollen
#

Yep

#

First thing you should install

#

Since you'll use it to install other plugins

twin hull
finite fulcrum
#

when doing a rewrite of the base of my program, should I create a clean branch or base it on master? Considering I'll probably recycle a good amount of code from it but move it around or change some of the structure

thorny shell
#

up to you honestly

#

which git history do you think will be least confusing?

#

I think I've done both

finite fulcrum
#

the master rn is not the best since it was my first project so there's also that. But I know that at least the main file will pretty much be a straight copy excluding some renames

thorny shell
#

I suspect it doesn't much matter.

tawny temple
#

I agree. It's your preference. Personally I would not create orphan branches - if I wanted the history to diverge I'd rather create a new repository.

finite fulcrum
#

When going with the basing off of master, how should the commits be stage when I'm replacing the logic behind an entire class?
Delete it whole and then gradually build up, or leave the static elements and replace around that

thorny shell
#

again up to you

#

ideally, you'd make it so that each commit "works"

#

i.e. each commit is a fairly small change that leaves the project in a good state

#

but that's often hard to do, and isn't terribly important if you're just poking around on your own

heavy knot
#

is there in platform where i can show case my python programs to the world

smoky grail
brisk rock
#

I would like to develop python in neovim
using coc-python
and some linter
I tried pylint and flake8 already but their startup times in the editor were super slow
anyone have suggestions for how I can get a linter to start up super fast in vim?

distant sun
#

Hi! Is there a way to do breakpoint debugging for ipython

topaz aspen
#

@distant sun breakpoint(), this question would be suitable for #python-discussion though ( i think...)

#

I'm wondering if - in vscode - there's a way to view changes that have been made to a file. It will pop up warning me about closing a tab but i'm not sure whether or not i should care about closing it. I don't want to not save on the off chance I've done something useful, i don't want to save as i might have deleted stuff by mistake

distant sun
#

@topaz aspen Yeah I saw that, I tried it but it didn't work like how I had envisioned it

#

I'm just glad that they introduced this feature in 3.7 when the previous methods were so hacky

#

@topaz aspen Wouldn't you be using git for that?

topaz aspen
#

@distant sun no this is just a file change in editor

kind chasm
#

Does anyone know how to set up refactoring for python in vs code?

tawny temple
kind chasm
#

it should be working with the language server

#

but even with rope installed, it does not work

mental mason
#

Im not sure where to ask about systemd so pls tell mr the correct channel, im trying to set up systemd for my python bot and seems like it gives me exit code 1

#

What does exit code 1 FAILURE mean?

warm pollen
#

Something failed :D

#

What does sudo systemctl status <servicename> give you?

finite lichen
#

it means that the command you specified in the unit file failed and returned an error

#

to view the logs of that unit use journalctl -u <unit>

true vapor
#

esc --> :wq

#

I think

#

although I am the opposite of a vi wizard

pure pulsar
#

if it asks for an encryption key, you probably entered :X not :x

finite fulcrum
#

switch to it

#

in the cli it's git branch <branch> for just creating it, but you'll see git checkout -b <branch> more because that creates it (the -b) and then switches

rare ginkgo
#

Hello guys, do you guys have any idea why some of pdf files I downloaded with scrapy is corrupted? It only download 35kb for each file which is very strange. Any help is very appreciated

heavy knot
#

hey guys, i've deleteed a file in my pcharm but it won't delete in github after a commit.

true vapor
#

Are you pushing the commit to the remote?

vivid cargo
#

git push after git commit

fading tiger
#

this is what it gives out

#

but i actually want it to remove the first 13 characters of the second argument

#

or how would i have an absolute path going from the home folder?

#

vimscript btw

terse flicker
#

does anybody know what i need to change to show all my venvs as interpreters in vscode?

heavy knot
#

@true vapor @vivid cargo i'm not quite sure what you guys are saying. After I commit the project to my github, the folder "Data" still appears despite beind deleted in my pycharm. https://github.com/tscheer100/MLBStats

fading tiger
#

vimscript

#

okay so you apparently use execute to easily pass in variables

function! s:SaveAndPush(filepath)
    w
    let sourcepath = expand('%:p')
    let goalpath = l:sourcepath[13:]
    execute '!sh ~/.config/nvim/codepush_one.sh "' . l:sourcepath . '" "' . l:goalpath . '"'
endfunction

wheat spear
#

VS Code or Pycharm?

#

and why

forest bay
#

PyCharm if you're primarily working with Python, it has a lot of features like deep type analysis, code inspections, powerful built-in Python debugger, pytest integration, and not to mention hotkeys specific to Python

#

@wheat spear

wheat spear
#

ahhh ok

frank compass
#

I use jetbrains IDEs when working on a project and VSCode when working on a file

blazing otter
#

hello

#

i want to use heroku

#

and i need a text editor

#

so I used atom

#

idle and pycharm work fine

#

but atom says no python found

#

please hel[p

charred vortex
#

Module Browser

true vapor
#

I'm not sure exactly what the module browser there is doing. But with Pycharm you can see your installed packages

#

something like file-->settings-->project-->project interpreter

final ibex
#

@heavy knot Did you do a git rm <name_of_folder> and commit that? deleting a file/folder isn't enough to get removed from your repo.

heavy knot
#

@final ibex someone else helped me out but i'll keep that in mind. thanks

topaz aspen
#

are there any subtleties to using Makefile's one should be aware of?
I'm just wondering whether there are any common pitfalls

final ibex
#

What are you using it for?
If your just defining some functions to do an install or test for your python project you probably don't need to worry. If you're compiling c code you probably have a lot more to think about when deciding what flags to pass.

topaz aspen
#

@final ibex no C code - using it for building datasets up

#

so it's all python, shell, and R

final ibex
#

If you're just using it as a place to store some set up commands that could basically have been put in to a script then as long as your commands make sense and if they connect to a service (like a db) they are up; you should be fine.

topaz aspen
#

cool, just wondering if there were any common sort of mistakes or whatnot that could be carried out through ignorance

#

but yeah - what you say is what's being done basically

final ibex
#

I'm no expert but the way I see most people use it in the python world is essentially an alias but leveraging make which loads of people are already familiar with.

topaz aspen
#

basically it - i might have make data1 and that'll be a series of scripts

#

i have been writing scripts with 00_, 01_ prefixes (tidy R style)

#

but it's actually kinda annoying, and pretty fragile

#

having things in a make file is (imo) a better way to document the order that things are meant to be executed in

#

i ended up having to write scripts that would change all the numbers and stuff lol, it's like some kinda interview question ๐Ÿคฆ

final ibex
#

Yeah, sounds like it makes sense, ultimatly your in charge and as long as it works and hopefully doesn't make someone want to pull their hair out to read, you're good.

topaz aspen
#

they'll want to faceplant the desk, but their hair will be intact

#

๐Ÿค

#

thanks soyboy

final ibex
#

lol, gd luck.

topaz aspen
#

Oh - one thing i was wondering was how to have a make rule for a file with multiple outputs

#

seems like it falls over there

#

makefile :

.PHONY: setup

OUTPUT_1 = output_dir/script_1_output.txt

# If make is ran with no other arguemnts (so just 'make' at the terminal) then
# it will run the first recipie that it finds, having help as the first recipie
# is therefore quite useful.
help:
    @echo "setup1:"
    @echo "    run script 1 (creates output example 1) - similarly for setup2, setup3"
    @echo "setup:"
    @echo "    run all setup scripts, creating all output files"
    @echo "clean:"
    @echo "    clean all generated scripts and output files"
    @echo "init:"
    @echo "    run setup.sh to create the three scripts for output"

################################################################################

SCRIPT_DIR = scripts_dir
OUTPUT_DIR = output_dir

################################################################################

SCRIPT1 = script_1.sh
SCRIPT1_OUTPUT = script_1_output.txt

setup1: $(OUTPUT_DIR)/$(SCRIPT1_OUTPUT)

output_dir/script_1_output.txt: $(SCRIPT_DIR)/$(SCRIPT1)
    zsh $(SCRIPT_DIR)/$(SCRIPT1)

################################################################################

SCRIPT2 = script_2.sh
SCRIPT2_OUTPUT = script_2_output.txt

setup2: $(OUTPUT_DIR)/$(SCRIPT2_OUTPUT)

$(OUTPUT_DIR)/$(SCRIPT2_OUTPUT): $(SCRIPT_DIR)/$(SCRIPT2)
    zsh $(SCRIPT_DIR)/$(SCRIPT2)

################################################################################

SCRIPT3 = script_3.sh
SCRIPT3_OUTPUT = script_3_output.txt script_3_another_output.txt

setup3: $(OUTPUT_DIR)/$(SCRIPT3_OUTPUT)

$(OUTPUT_DIR)/$(SCRIPT3_OUTPUT): $(SCRIPT_DIR)/$(SCRIPT3)
    zsh $(SCRIPT_DIR)/$(SCRIPT3)

################################################################################

setup: setup1 setup2 setup3
    @echo "setup all files"

init:
    zsh ./setup.sh

clean:
    rm -rf scripts_dir
    rm -rf output_dir
#

setup script

mkdir -p scripts_dir
mkdir -p output_dir

################################################################################

script_1="
sleep 1
echo \"one one one\" > ./output_dir/script_1_output.txt
"

script_2="
sleep 1
echo \"two two two\" > ./output_dir/script_2_output.txt
"

script_3="
sleep 1
echo \"create script 3 output 1\"
echo \"three three three\" > ./output_dir/script_3_output.txt
echo \"create script 3 output 2\"
echo \"another (3) another (3)\" > ./output_dir/script_3_another_output.txt
"

################################################################################

echo $script_1 >> scripts_dir/script_1.sh
echo $script_2 >> scripts_dir/script_2.sh
echo $script_3 >> scripts_dir/script_3.sh
#

here's a self contained example - note script 3 will output two things

#

the rule that we have for script 3 is

SCRIPT3 = script_3.sh
SCRIPT3_OUTPUT = script_3_output.txt script_3_another_output.txt

setup3: $(OUTPUT_DIR)/$(SCRIPT3_OUTPUT)

$(OUTPUT_DIR)/$(SCRIPT3_OUTPUT): $(SCRIPT_DIR)/$(SCRIPT3)
    zsh $(SCRIPT_DIR)/$(SCRIPT3)
#

but this will be called every time, whereas the rules for script 1 and script 2 will only be called when the data is older than the script (as expected)

topaz aspen
vivid cargo
#

hmm, this can come in very handy

#

thanks a lot for sharing pleased_lemon

acoustic epoch
#

Hello guys, ive been facing an issue - when i commit something (even at my repos) the commit messages are looking like -

#

I am working with pycharm most of the time

pure pulsar
#

hm, do you have your mail defined in the git config also known by github? and if you use multiple tools to manage git, do they all use the same email identity?

final burrow
#

Guys, I tried using VS Code but it does some black magic with my working directory.
If I modify a file, using VS Code, the file is modified in the interface but when I use a terminal, the file is not modified. It only truly modifies file when I commit the changes to git. it's very bothersome because I want to try changes before committing... I searched settings but did not find any relevant item. Any idea ? I use gitLens which might be the culprit.

#

@acoustic epoch You used different emails between the time you created the commit and the moment you rebased or amended your commit. @pure pulsar had the good idea.
Check your git settings:

git config user.email
git config --global user.email

And check PyCharm:
Settings > Version Control > Github

acoustic epoch
#

@final burrow Thanks, i managed to solve it somehow (i have no idea how lol)

finite fulcrum
#

Anyone know what could be going wrong with my REPL console in pycharm? After I updated it hands up on the first launch needing to be shut down through the process.
it has 2 REPL Communication and 2 Close Console communication background tasks running when the console freezes. Happened across all my pycharm projects so not linked to a version of python

random breach
#

which version of pycharm

#

and do you have jupyter/ipython installed?

sharp flare
#

Hi all just a quick question to get a feeling for it. What do you use for build automation in your projects. Not talking cicd tool but build tool (think make or maven)? What's your experience with your tool?

twin hull
#

I always used makefiles to compile librairies, that's my only experience with it. I don't know about maven

vivid cargo
#

Isn't maven for java?

graceful bay
#

supposedly it can be used for anything, but it's mostly Java (and other JRE languages)

pure pulsar
#

I've used makefile a lot too, because it's easy to get started with, the synthax can be sometime confusing, especially if you want to do non trivial things in a portable way, so in this case i prefer to write python scripts and call them from the Makefile.

finite fulcrum
#

@random breach 2019.3.2 and have ipython

random breach
#

try it with a fresh venv/install without ipython @finite fulcrum

#

or try uninstalling then reinstalling ipython in the current one

#

could be it's malformed or incompatible somehow?

finite fulcrum
#

shouldn't be the install is pretty fresh, and it only happens in pycharm for the first time. If I stop it the next launch never froze... will try without ipython if it persists without that too but not the option I was hoping for

random breach
#

did it work

finite fulcrum
#

haven't coded much yet and don't know how to reproduce it apart from it being the first console instance, but will try

olive warren
#

Does anyone know how to show Unicode Emojis colored in PyCharm (or in consoles at all) on Windows?

woven stirrup
#

hey was wondering if someone could help me w git rebase and squash ?

tawny temple
#

What about them?

stable cloak
#

Hmm. So I know you can create a .env file for when you use pipenv, but if I set the environmental variable within a PyCharm configuration, it only seems to apply to one script rather than the whole project. Is there a way to define it for the whole project or would I have to add that individually for each script I need it on?

tawny temple
#

@stable cloak yes, if you edit the Python run configuration template

stable cloak
#

Does the template not affect it for all future projects as well?

tawny temple
#

I don't think so. I think it's project specific.

stable cloak
#

I'll give that a shake then, thanks

#

Yeah, I think you're right, since the template also points to your current venv

#

Cheers

lime crow
#

i made a basic cpu benchmarking tool that tells you how long it takes for your computer to run calculations in millions of cycles and makes a text log of it and appends it

empty star
#

Hey, I made a discord bot with Pycharm and Notepad++. But I wanted to give Vscode a try, I have a few commands that have need files to work, all files are in the same category but somehow Vscode doesn't recognize them. How do I fix this?

acoustic epoch
#

How can i unattach pycharm windows?

finite fulcrum
#

separating the tabs?

#

you can drag them over outside for bringing them out of the window into a new one if that's what you want

fierce fable
#

hey

#

can somebody tell me how to use snippets in vim?

#

i don't know how to install plugins im so confused

fierce fable
#

so??

warm pollen
#

You want to install a vim plug-in?

#

You probably want to install a plug-in manager first

acoustic epoch
#

@finite fulcrum No, i have 2 attached windows, as you open a new window there is attach option, i clicked on that and now i cannot seperate it

finite fulcrum
#

open the project view on the left, find the project and delete it there

#

think that should do what you want

acoustic epoch
#

On the menu bar?

#

I don't see it

#

Oh, got it

#

thanks

craggy parrot
#

I'm having problems setting up ST3 to use Python 3 on mac for a few days now and i'm on the verge on quitting. Can someone help me

craggy parrot
#

Seems like i'm only making it worse. Downloaded homebrew and can't seem to uninstall it.

finite fulcrum
#

@random breach console just froze without ipython, and took whole pycharm with it

#

I think it's somehow related to leaving pycharm open without doing anything with it

thorny shell
split otter
#

I messed up my script in PyCharm, how can i get my script back, if possible?

tawny temple
#

Does it still show normally in PyCharm?

#

It looks like a text encoding issue

zenith skiff
#

True

split otter
#

it shows the same in PyCharm

#

i changed from utf-8 to utf-16 then it messed up like that

mental mason
#

I wanted to have 2 same git repo on my vps but with different name, can u clone a repo into different name?

#

Or do u have to manually change it?

violet belfry
#

You can name the folder whatever you want

mental mason
#

Alright thx

heavy knot
#

@split otter was the original fine name with space?
And if you have pycharm you should have local history of that file or you can see external changes to that

still vault
#

Anyone knows how i can solve my problem?
PyCharm don't save my fold state in project.
When i switch branches, files or anything else and then come back to project, everything is expanded and i should again manually collapse it.

mental mason
#

Kinda unrelated to python i guess but say u have made quite lot of bad commits, is it better to

  • redo that repo and made good commits
  • continue
    Or
  • maybe make some kind of rewrite branch?
#

Just want to know the good practice

thorny shell
#

honestly it depends on who uses that repo, and what their expectations are

#

if it's just you -- go wild

mental mason
#

It is just me but i think its not rlly a good practice to remove the whole repo just because most of the old commits are bad?

#

Maybe better off with making a reqrite branch which starts from 0

tawny temple
#

For a public repo (as in, other people actually use it), it's good practice to preserve the history.

#

If it's still public but it's really just for you, then you can rebase or whatever.

#

It's whatever you prefer at that point

mental mason
#

I think im just gonna have a rewrite branch, since ppl have starred it too (github) and i dont rlly want to delete the repo just cuz of bad commits

heavy knot
#

@still vault make sure you have access right to the config files and project files in that directory, like if you use root to create the project but use a user to modify the code

true vapor
#

@heavy knot This is probably a more appropriate channel. Have you set a custom theme for pycharm?

heavy knot
#

Yes, I have.

true vapor
#

Thats probably the issue. I've had issues with custom themes for pycharm before. I'd suggest either reverting to the default theme, finding a different theme, or playing around in the settings page as described in the page I linked ages ago

heavy knot
#

๐Ÿ˜ฆ

#

Do you know if anyone of the popular Python editor like Atom and Sublime can run .py?

#

So I can use one of those instead of PyCharm.

true vapor
#

They pretty much all can. But I don't have experience with any of them to guide you through it.

#

VSCode, Atom, and Sublime Text are probably the three next most popular editors/ides

heavy knot
#

I will install VSCode and check it out.

vivid cargo
#

this is official microsoft documentation, i used it to configure my vscode for flask debugging and running, but you can set it up for regular python files too

still vault
#

@heavy knot oh. Ty for info, i will check.

topaz aspen
#

is it possible to prevent usage of rm on a file that's tracked by git?

For example - I just renamed some files and instead of using git mv I just renamed them, which means I then have all the D stuff in git, which I've then run git rm on... but I should have just used git mv from the start. I'm wondering whether there's any way to catch this kind of thing.

thorny shell
#

not that I know of

#

just run "git status" a lot

topaz aspen
#

@thorny shell ah... yeah i was hoping for some kind of hook / prompt that would warn me or something.

#

there should be a git linter ๐Ÿค”

thorny shell
#

I do what you did all the time

#

I rename 'em, then I go back and "git add" and "git rm"

#

it's not that burdensome

#

although I confess: I use the most awesome git GUI ever. It makes that sort of thing super easy.

topaz aspen
#

not sure - sounds what you do is similar

#

but you should have done git mv no?

thorny shell
#

well, it'd have saved a step, sure

#

but other than that, there's no difference

topaz aspen
#

wouldn't it save a lot of gumpf in git as well though ?

thorny shell
#

gumpf?

topaz aspen
#

nonsense / useless info

thorny shell
#

the resulting commits are indistinguishable

#

try it and see

topaz aspen
#

really, fair enough, i will have a look - does the order of add and rm matter

thorny shell
#

"git rm" and "git add" don't create commits; instead they fiddle with the index

#

the index is what goes into the commit

topaz aspen
#

hm, haven't spent enough time getting the innards

thorny shell
#

but the index itself doesn't keep any history, so you can futz around with it as much as you like, and when you commit, there's no trace of that futzing; only of the final state

topaz aspen
#

currently trying to work my way through a project tho... i should really commit as i go ๐Ÿ˜ฉ

thorny shell
#

hell yes

#

don't be afraid to commit. Those are undoable, too, as long as you haven't published them

topaz aspen
#

i've got in the habit of using git add -p

thorny shell
#

dunno what -p does

topaz aspen
#

patch

#

it's nice

thorny shell
#

ah, I do the equivalent in my gui

topaz aspen
#

but i have convinced myself i can just do the lot later now, and it's a bit of a ball ache

#

which gui?

thorny shell
#

heh

topaz aspen
#

vscode doesn't have it

thorny shell
#

it's called "magit", and it's so awesome that I voluntarily pay money to the author (it's open source)

topaz aspen
#

i just use the shell

#

oh yeah

#

emacs

thorny shell
#

so I imagine you want to know "what's the catch"?

#

omg you've heard of it

topaz aspen
#

the git porcalene thingy

thorny shell
#

well, the catch is: it's emacs ๐Ÿ™‚

topaz aspen
#

yeah i used magit for a bit

thorny shell
#

!!!

#

there's like 12 of us on the planet

topaz aspen
#

lol - it came with spacemacs ๐Ÿ˜„

thorny shell
#

huh

topaz aspen
#

the author was cool - he did a sponsored thing where he just took some time off and worked on issues or something lol

thorny shell
#

well it's the best UI for anything I've ever seen.

#

I think he's doing it full-time now.

topaz aspen
#

great

thorny shell
#

I pay (a very small part of) his salary.

topaz aspen
#

i bought him a drink lol

thorny shell
#

aw

#

in .eu somewhere?

topaz aspen
#

no i just meant in donation

thorny shell
#

I think he's German if I had to guess

topaz aspen
#

that phrasing made it seem way more personal than intended

thorny shell
#

you used the beer-as-a-service protocol

topaz aspen
#

maybe I should try it - iv'e heard people use git fugative or something for vim

#

never bothered with that though

#

and vscode was kinda naff, so i just thought sod it i'll use the cli

thorny shell
#

if you were already comfortable with emacs I'd strongly recommend it.

#

but only if.

topaz aspen
#

yeah i'm trash with emacs, i need vim keys

thorny shell
#

it's good to know the CLI, since it's always there

topaz aspen
#

yea... seems alright... though it can be kinda opaque i guess

#

aliases make some stuff a bit more bearable

pure pulsar
#

I use fugitive, but also merginal and vimagit

#

@topaz aspen

topaz aspen
#

vimagit
@pure pulsar hm - from the looks of it it seems as though this would be an alternative to fugitive rather than a complement, don't they cover the same ground?

pure pulsar
#

I use them in complement, i use viamagit for index management, and fugitive for blame, diff and other stuff

topaz aspen
#

they don't clash at all then?

#

or have you tweaked things a lot

pure pulsar
#

you just use different keybindings to call them

#

they are both frontends to git anyway, it's the one retaining all the state

acoustic epoch
#

Hello there guys

#

I cannot seem a way to delete a row with my mysql database with pycharm

#

I click on the row and delete it but nothing happens or the option is disabled

#

Oh wait, i just had to submit i think

frank compass
#

Yea

#

Delete then submit

heavy knot
#

Hi, I have my database on AWS RDS and it has its endpoint, how do I connect it with my docker-compose file?

db:
container_name: postgres
image: postgres:latest
networks: ['rasa-network']
ports:
- "5432:5432"
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=pw
- POSTGRES_DB=postgres
volumes:
- ./postgres-data:/var/lib/postgresql/data

fierce fable
#

@warm pollen what?

regal ferry
#

@heavy knot you either use RDS or the container. That's a choice you have to make - where you run the database.

heavy knot
#

I ran it on RDS already

#

i have my instance id there

#

endpoint* @regal ferry

regal ferry
#

And i suppose you now have database clients which you want to point to RDS?

heavy knot
#

I'm ussing rasa chatbot stack so I want everytime a person chats to be able to store it into my postgresql db

#

this is my docker compose file:

db:
container_name: postgres
image: postgres:latest
networks: ['rasa-network']
ports:
- "5432:5432"
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=pw
- POSTGRES_DB=postgres
volumes:
- ./postgres-data:/var/lib/postgresql/data

#

i'm failing to understand how to connect this properly

#

for example when i ssh into my coonsole in aws and i run docker-compose up

#

any my rasa seems to be ok but when i go to localhost:5005 i'm confused since there is no txt file that usually appears when I'm running locally

#

@regal ferry

regal ferry
#

I really struggle to understand why you are having two databases. One in container, which is defined in the compose file and another one which is RDS. @heavy knot

heavy knot
#

I'm not sure too

#

because in tutorial with deploying rasa

#

they state we need to have it

#

By default, all conversations are saved in memory. This means that all conversations are lost as soon as you restart the Rasa server. If you want to persist your conversations, you can use a different Tracker Store.

Using PostgreSQL as Tracker Store
Start by adding PostgreSQL to your docker-compose file:

regal ferry
#

I see. That document says to use container with the database. If you decided to use RDS, remove the postgres container from compose file.

#

Configure RDS endpoint in the endpoints yaml

heavy knot
#

I have to use RDS if I want to go to produciton

#

In endpoints should I use:

#

tracker_store:
type: SQL
dialect: "postgresql"
url: "db"
port: 5432
#url: postgres
#login_db: postgres
db: postgres
username: postgres
password: pw

#

tracker stores like before or?

#

because this url: db is connect to my dockerc-ompose where db is stated

regal ferry
#

I think "url" should be pointing to RDS, it was previously pointing to the db container

heavy knot
#

yes

#

but why do they even say to point to db container if i want to go to production?

#

and this article is about production, that is why i'm confused

regal ferry
#

I strongly suggest if it's going to production you actually hire a consultant.

heavy knot
#

๐Ÿ˜ฆ

regal ferry
#

Db container was for demo purposes. You could theoretically use it for production. I would not recommend.

#

I just see that your grasp on what's going on is not production ready so to speak. I think that it's in your best interest that someone more experienced does that.

#

... or shows and guides you

#

... and that's not me if you were wondering (no time)

heavy knot
#

I understand

#

do you have any advice if I want to learn myself

#

is there any good blog about deploying on aws and production

#

or something

regal ferry
#

Read all relevant official docs and make sure you understand all of it. VPC, RDS. Whatever you use to run your containers on (ECS?)

heavy knot
#

I run ECS

#

with my docker image

#

and made a task

#

but in my head it isn't all clear with this docker part and connecting it into production

#

for example my image that I get on ECS

#

should it have this docker part of postgre or not

regal ferry
#

Then that part requires investigation and docs reading .

#

You have to be clear on things before you go to production

#

You are choosing between running docker for postgres or using RDS? Use RDS

heavy knot
#

Yeah I already set up RDS, that is great then but I have to have ECS anyway

#

beaucase I have trained rasa ML model

regal ferry
#

For the app yes, not for additional postgres

heavy knot
#

Ok, but for example when I connect my image with ECS, should I connect my ECS instance with my domain, or should I have a ec2 instance too?

#

and connect that ec2 instance

regal ferry
#

I don't understand where ec2 comes instance appeared now. You didn't mention it before. I'm struggling to understand the situation

heavy knot
#

In general my situation is like this

#

I have a chat box that hasa front/backend

#

and that connects to rasa model when it needs to get response

#

and saves conversations into postgresql

#

and i have db deployed in RDS

#

what would you say architecturaly what do I need to have

#

to make this work

#

this is my docker compose file currently:

version: '3.7'

services:

  react:
    container_name: react-app
    build: 
      context: ./conf/react
    networks: ['rasa-network']
    ports: 
      - "80:80"

  rasa:
    container_name: rasa
    image: rasa/rasa:latest-full
    networks: ['rasa-network']
    ports:
      - "5005:5005"
    volumes:
      - "./rasa-app-data/:/app/"
    command:
      - run
      - -m
      - models
      - --enable-api
      - --cors
      - "*"
      - --endpoints
      - endpoints.yml


  action_server:
    container_name:  rasa-action
    image: rasa/rasa-sdk:latest
    networks: ['rasa-network']
    ports:
      - "5055:5055"
    volumes:
      - "./rasa-app-data/actions:/app/actions"

  db:
    container_name: postgres
    image: postgres
    networks: ['rasa-network']
    ports: 
      - "5432:5432"
    restart: always
    environment:
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=${POSTGRES_DB}
      - POSTGRES_USER=${POSTGRES_USER}
    volumes:
      - ./postgres-data:/var/lib/postgresql/data

networks: {rasa-network: {}}

regal ferry
#

It will take us years to unwind the situation over this chat here. I think your best shot is to hire a professional. Sorry

heavy knot
#

๐Ÿ˜‚

#

I really fully explained it now

#

can you say what do you think atleast

#

how would you do it

#

on info you got now and this docker compose file

regal ferry
#

You explained does not equal I understood it :)

How docker compose fits ECS? What ec2 instance is doing in the mix? And so on... Nope, it will not work here

heavy knot
#

You can forget ec2

#

i've built my docker image from docker compose

#

using docker build

#

actually i build my image through Dockerfile

#

that is what is my problem here

#

why do i even have this docker compose

#

i just followed instrucions on that part

regal ferry
#

I guess I would configure whatever needs the database with the RDS endpoint

heavy knot
#

and i too dont undestand how does docker compose actually help me at all

regal ferry
#

Docker compose is for demo purposes. Forget it. It's instead of Terraform or CloudFormation

heavy knot
#

Oh okay

#

so docker compose is basically like localhost aws?

#

and now i do everything on aws that i did on docker compose part by part

#

like postgresql putting on rds

regal ferry
#

Yep, sort of

heavy knot
#

Thank you very much for your time! ๐Ÿ™‚

regal ferry
#

Welcome!

real atlas
#

Ask if I am creating a tool in Python and it is already created and I compile it but I will add licenses as it would be so that only 1 user to whom I gave the license and the tool can use it if the user passes it to another does not work alone to which I pass it?

mental mason
#

In what case git reflog would be used?

kind chasm
#

When you are removing a sensitive file with eg. bfg

#

as one example

mental mason
#

Alright

#

How do u delete commits of a deleted branch? I deleted a branch without merging it and that causes the commits to still appear in the log

#

How do i remove them?

fierce fable
#

autru ca sudo -s

delicate gorge
#

Git log operates branch wise iir

#

C

#

I don't think that should be happening?

#

But I'm not a git master mind

regal ferry
#

Git dev mind then? ๐Ÿ˜

charred vortex
#

is there a way to reference the project directory when setting the script path in a run configuration?

#

in PyCharm

#

like this

mental mason
#

I read some info and it does mention that if u delete a branch without merging it with other branch, the commit stays since u only delete the pointer

true vapor
#

@civic hound About beginners starting with Thonny vs Pycharm

I'm not entirely sure how true the point about beginners not ignoring visual clues is, but I guess it is true for a fairly large subset of people. The advantage of starting with Pycharm is that as you start wanting to use the more advanced things, they're there for you and ready to use; plus if you ever switch, you don't have to relearn all the shortcuts you used as a beginner

civic hound
#

so anyone, including beginners and experts, have a limit to what they can store in their memory at any given time

#

the number of things you can remember we cant argue about, but if you go by the experts min and max lets say 5-9 things

#

this goes for anything really. not just code, but any visual input

#

so if a user see 3 different buttons on the screen, they have used 3 spots of their mental available capacity

#

if they have to keep track of those three buttons while they read code, they have only room at worst to store 2 peaces of information in the code

#

so once the user are familiar with the three buttons, they can ignore them and use the full capacity for the code

#

now, this is the main problem of pycharm for a beginner

#

it is visually very verbose

true vapor
#

I can definitely see that its a problem, but I'm not sure I can see the extent of the problem fully. It seems to me like the best choice is going to be dependant on the learner. Although I do agree that you're not going to have problems starting with Thonny, but you might have problems starting with pycharm