#tools-and-devops
1 messages ยท Page 40 of 1
I just highlight at least 1 character and tab works
How can I have 2 projects on the side bar where project.1 stands?
@true vapor https://stackoverflow.com/a/33329152/10444096
this looks more like it does what you want
just trued the emacs tab, it's weird
tried*
it cycles between 0-current tab depth
(emacs tab)
indent line or selection does the trick though
Change your font to something that exists on the computer
I remember this one
In settings there is a field for managing space between chatacters
no
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
thanks ELA it worked
I'm so confused, on powershell (outside vscode), pip is installing on the correct directory
Ok, think I figured it out
read in markdown tables to a dataframe? Anyone know a library that does that automatically?
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
normally I do and recommend it like this:
- have a stub, e.g.
config-example.ymlcommitted 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.ymland fill out the missing values (document in Readme). - have the actual
config.ymlwith your secret values ignored by git by adding an entry for it to your repo's.gitignorefile and commit that.
so essentially just avoid naming them the same
i wish there was a smarter way to do it
I think there is, but I never dared to dive that deep into git yet ๐
i need to do this with several files too, cause i have json files that need to be clear in the remote
something like this maybe? https://stackoverflow.com/q/936249/4464570
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.
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.
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
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
i just need to make sure the local version isn't overwritten when pulling
that's all
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.
i don't see why this scenario would be so unusual
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
I don't use it but I'd be a little surprised; Microsoft tend to have their s*** together when it comes to IDEs
i don't really have any problems with it
hrm ok ๐ค
ive definitely had issues with the things i've mentioned, perhaps there's something clashing though
you might have a flaky plugin
Ok just to check, i've run
git reset --hard < previous commit id >
and lost work.... i'm never seeing this again, am i?
well, you've lost anything that wasn't already committed, yes
but whatever commit you reset away from is still there, in the "reflog"
yeah, well that was an extremely expensive lesson
is it possible to have the splits different font sizes in vscode?
nano is considered as easier than vim, but why it vim considered "superior" on the long term then?
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
ok thanks
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
Emacs won't be on machines that old either
Maybe some Emacs compatible minimal thing but not usual Emacs
vim is more than 20 years old if I recall correctly, how can it be possible not to have it?
Vi (the editor vim is largely based on) is from 76
However vim itself is from 91 so almost 30 years
I hope there is no more productions servers that don't have it then!
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
vim itself isn't already very light?
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
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
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
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?
Arial works fine
Never mind, I just forgot to restart VSCode.
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 ??
Don't know anything about apps, I googled android ios automated ui/ux testing and got a few links
i was wondering if someone could help me with controlling the mouse and keyboard in pycharm, please @ me
@rich elk how
if you dont have vi or access to graphical
my statement still stands
there is always nano
;)
and my point is that, no, sometimes there isn't nano
hm, you know, I should actually check that
uhm
well Amazon Linux AMI release 2018.03 has nano ๐
so perhaps the boxes I use at work have it, too
Let the editor wars continue?
ive never heard of any linux distro or unix based machine not being included with nano
did someone just ask for a linux distro without nano per default
@heavy knot honestly I'd never looked for it before
nor known anyone to use it ๐
@delicate gorge read ^
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 >
or for previous conversation check #help-coconut @delicate gorge
@dusty hill that's like old-school sysadmining.
One of our guys for some reason had joe as the default editor and couldnt figure out how to exit ๐
hm
of course
forgot all those old school WordStar ctrl-k commands
I detect an old person
I have used "echo" and "copy con" on windows/dos
well from the top of my head would be
all buildroot linuxes
nixos
prbly gentoo and derivatives
dunno about arch but maybe
it was an arch system that had joe, but I can't imagine why
ctrl-k brough up the secondary menu
but arch does indeed have nano
I hate nano ๐ But I cn use it
but why
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
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?
@heavy knot question is does it have nano per default
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
nano is not a required editor so it's not present on all distros
exactly
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
minimalized systems / any system you dont have root on
which if youre working in a professional environment are gonna be a lot
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.
didja use "brief"?
Brief, and Crisp.
playing with Eric now.. Not sure if I like it yet
didn't do it for me
Let's try Thonny
wow, I'd forgotten Crisp
BriefEdit I think it was called
Brief.
Boxer.
Short.
UnderWare.
I sense a theme
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
these names are ringing very faint bells.
thankfully I was on a trunk to the mainframe so I was in terminal mode yterm if i remember correctly. We used XEdit
you may have just out-codgered me
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
I've never seen a punch card outside of a museum, but people younger than me actually used them
I remember when people made Christmas wreaths out of them
paper tape, or is it driver for jacquard loom?
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
never used that but I have used both 5-1/4 and 3.5 floppy and microfloppy
pff, kid
my first computer had a cassette tape drive, and my first hard drive was a 69 Mb RLL drive
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"
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?
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
nah, I'm a wanna-be amateur horologist
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
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ยข.
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
Oh I know how much they're worth.
๐ฆ
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
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
I have a field version and a few of the ones that cock like a shotgun, rapid something
Hey, there's this:
https://www.indiegogo.com/projects/i-m-back-low-cost-medium-format-digital-back#/
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 ๐
Hello guys, anybody knows how can I apply a theme that is not a plugin to pycharm? Like this one https://github.com/jamiewilson/predawn
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
if you can find some way to convert it to a vsc/text mate theme then you can use one of these tools to convert it to an intellij theme:
https://github.com/tobiastimm/code-theme-converter
https://github.com/JetBrains/colorSchemeTool
oo, looks like theyve got an intellij port here:
http://color-themes.com/?view=theme&id=563a1a8f80b4acf11273aed5
@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
@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
both of the themes from color-themes.com are apparently intellij compatible
there's also this https://github.com/jamiewilson/predawn/blob/master/predawn.tmTheme
text mate version of the theme available on the repo
which you can then use https://github.com/JetBrains/colorSchemeTool to convert
in case the ones from color-themes.com dont work
so the .jar file is a plugin-like?
same here
importing the settings just messed it up, how can i use https://github.com/jamiewilson/predawn/blob/master/predawn.tmTheme to add this theme?
using the convertor?
@random breach
smh it requires python 2.7
This is my output in pycharm, while in vscode it shows the full error, anybody knows what the problem here?
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
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

!resources has some recommendations
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Hello! There are some suggestions in the sticky! For me, it's Pycharm, but other may have other preferences.
I prefer vscode, a bit weaker than pycharm in terms of fetures and codechecking but extension market is huge
!tools is a specific page dedicated to IDEs and editors
The Tools page on our website contains a couple of the most popular tools for programming in Python.
How can i run easily code inside Sublime?
Ping me please
@honest elm something like this? https://lmgtfy.com/?q=How+can+i+run+easily+code+inside+Sublime%3F
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
๐
@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.
@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
In this Python Tutorial, we will be setting up a development environment in Sublime Text 3. We will walk through how to install Sublime Text, install Package Control, install Packages, and much more. Let's get started.
GitHub Sublime Settings - https://github.com/CoreyMSchaf...
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
@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.
how can I export as an exe file in pycharm?
Look into pyinstaller
for some reason I don't have pip
Anyone know hot to run coverage without getting it to test the coverage outside your project ?
@civic hound
yes
Okay so first thing is how can i run code inside Sublime
sublime has a built in python build system
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
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
What does REPL mean?
!repl
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().
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
What does the -i do?
did you read the tag i posted above?
Not all
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
Ah okay
(on the 5th para)
Yes yes
our admin fisk is the one that has written this.. ๐
no, have you had experinece with a command line env/shell/terminal?
(ditto)
then thats the repl
Just run script from cmd?
yes, thats what i do, i do not use the default build system
its a package called SublimeREPL
And how do i install that package?
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?
CTRL SHIFT P
yes, vscode got this from sublime i think.. if sublime was the first ๐
flake8
Same?
once you have the package manager you activate it and write install package
then flake8
Ctrl shift p?
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
There is no pylint?
yes, you can insttall that
but you should not install both. it will mess with you ๐
chose the one you want
Ho is better?
i do not know. i have only used flake8
pylint is good too
i think black is the new cool kid in town, but ill just stick with flake8
black adds "extra" new lines, makes it more legible
And when i habe SublimeREPL installed how do i run the script from Sublime?
CTRL SHIF P -> run current file
i have made a shortcut key for this though. its a bit hard to explain more in details
But wasn't that for serching packages?
you can run any command from CTRL SHIF P
Aha
installing packages, runing script, chaning theme,
i run the current file with Ctrl + B
If i am not wrong to config keys u must look on a super long file witha ll configs
this is my sublime
hmm.. i have some internet issues, not able to upload a screenshot
Retry
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
And do you remeber were was approximately the line to change the key to run the code?
oh its not that easy. its a lot of configurations and customization
But is only one key no?
are you infront of your computer and have installed SublimeREPL?
then there is no way for me to explain it
sure thing
I tried using pycharm but I really can't get into it
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
good morning y'all
@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
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
git hooks are written written with ruby because github api is written in ruby
i forgot which version or api
@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 ๐
bruh
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.
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
is your vscode using the same interpreter?
@hybrid lagoon wait you just fixed my problem LOL
thank you so much!
definitely wrong interpreter
good to hear
Guys, can we set PyCharm's virtual environment so that it runs React? ๐
You can with pycharm Pro
Someone aware how can I acheive this ??
In Sublime text I already have github integration with Sublime Merge but I am missing one option. I would like to be able to select line of code in Sublime and Copy Git Permalink so that I can reference it externally with my team.
Link like this > https://github.com/psf/requests/blob/a9906536ee971872e5031a0138d63fb4ea481511/requests/exceptions.py#L12
Please ping me if someone knows the answer ๐
Above problem solved with https://packagecontrol.io/packages/Open in Git Repository
You can also edit package code to your needs. It's in Python โค๏ธ
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
Is the Intel Celeron 4205U 2-core / 4 thread?
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
@jaunty owl
@honest elm let's not use passive aggressive links
Instead try conversing with people like they're humans
It's not funny
I did it because someone did the same with me
yesterday
@jaunty owl You'r info:
Intelยฎ Celeronยฎ Processor 4205U (2M Cache, 1.80 GHz) guรญa rรกpida de referencia que incluye especificaciones, funciones, precios, compatibilidades, documentaciรณn de diseรฑo, cรณdigos de pedidos, cรณdigos de especificaciรณn y mucho mรกs.
But yeah why people ask questions that can be googled within 5 seconds ?Also wrong channel, this isn't hardware channel .
Because google results often lead to pages of garbage
If it bothers you, you can just not type anything
@honest elm i have never used vscode before, so not sure how much assistance i can be to you
no ofc not. we do not randomly ping people here
Hey maybe someone knows how to debug Sublime Text plugins when developing ? I want to be able to use pdb
what version of python are you using @thin pendant ?
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
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
I have not written anything for sublime itself
This is closest I got to answer
Unfortunately it's not use for me ๐ฆ
what in sublime do you want to debug?
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
I think I found something that might help me > https://pypi.org/project/rpdb/0.1.1/
Looks promising
remote access to the debuger?
@civic hound But u know someone ho ises vscode?
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
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
@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
It's the same
so CI rules out having to bother with local testing, it's a replacement for it
( is that a fair comment? )
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.
You should still test locally
Ideally you should strive to not commit broken code to beign with
so you should test it
i don't get why we have both though
seems redundant, isn't that what we're trying to avoid most of the time?
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
i mean - if my tests are poor enough locally why would they be good enough remotely?
What does that have to do with what I asked?
If you push something and CI fails, what do you do?
i wouldn't be able to if my local tests had caught it?
Aren't you arguing for not testing locally?
i'm arguing for one or the other
There's nothing that forces you to test locally before pushing
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?
CI enforces tests, which can't be enforced locally for every developer
You can't reject a push
Well, you can if you control the git server
A git hook is still testing locally
@tawny temple fair enough - seems that just having CI would be best then
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.
@timid jolt are the tests mirrored?
is there a way to run selenium on windows apps through python?
@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.
So, vscode keeps showing this about a repository that I don't have anymore. How do I get rid of it?
Delete the .git folder
I did
It is hidden by default on windows
It was on a folder I was using earlier
Unless it got copied somehow but I don't think so
And on a top level folder?
Does git creates top level folders with git init?
I used the bash without admin privileges so I would assume it doesn't
Ok, nvm, figured
@timid jolt thanks... I'm trying to understand the workflow, I've neglected it for a while
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
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
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
does anyone know how to give the file explorer in vscode root access on a linux vm i am sshing into?
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?
hey guys, since noone replied to this ^ and it has been a long time:
How to change interpreter from python to python3 in vscode coderunner
@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?
it runs python, not python3
I mean, even if it says python, doesn't it run 3.x, have you tested it?
nvm figured it out in settings
oo so I found what is Jupyter notebook shortly followed by Jupyter Labs.
Chaching!!! Where have you been all this time!!!!!
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.
probbably a setting in preferences somewhere
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!!๐
Can you configure pycharm to kill the script you're running if it exceeds a certain memory threshold?
guys, how to change the original run function from the first one to the second? vscode
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!!!
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?
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
@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
@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 ๐
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
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)
CTRL + C move the process to background if you are in the default mode, doesn't it?
Maybe not on Mac though
ctrl-z
Ah yes
ctrl-c is kind of like escape, but not exactly
C is keyboard interrupt
ok, first I'm looking for a package manager (if there is some), and a python-completion plugin (I think)
color themes also need to be installed, am I correct?
I'll try it, as for now it's all white and very tiring
it's koehler sorry
is A.L.E good for python? https://github.com/dense-analysis/ale#usage-completion
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
up to you honestly
which git history do you think will be least confusing?
I think I've done both
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
I suspect it doesn't much matter.
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.
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
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
is there in platform where i can show case my python programs to the world
why not put it up on Git(hub|lab) etc and post in #303934982764625920
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?
Better Touch Tools:
https://folivora.ai/
XtendTouchPortable Monitor
https:/...
Hi! Is there a way to do breakpoint debugging for ipython
@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
@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?
@distant sun no this is just a file change in editor
IIRC I needed this https://pypi.org/project/rope/
it should be working with the language server
but even with rope installed, it does not work
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?
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>
if it asks for an encryption key, you probably entered :X not :x
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
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
hey guys, i've deleteed a file in my pcharm but it won't delete in github after a commit.
Are you pushing the commit to the remote?
git push after git commit
how would i splice the second arg as a string?
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
does anybody know what i need to change to show all my venvs as interpreters in vscode?
@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
how do i pass local variables after ! in functions?
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
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
ahhh ok
I use jetbrains IDEs when working on a project and VSCode when working on a file
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
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
@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.
@final ibex someone else helped me out but i'll keep that in mind. thanks
are there any subtleties to using Makefile's one should be aware of?
I'm just wondering whether there are any common pitfalls
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.
@final ibex no C code - using it for building datasets up
so it's all python, shell, and R
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.
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
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.
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 ๐คฆ
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.
they'll want to faceplant the desk, but their hair will be intact
๐ค
thanks soyboy
lol, gd luck.
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)
anyone used doit ?
https://pydoit.org/
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
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?
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
@final burrow Thanks, i managed to solve it somehow (i have no idea how lol)
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
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?
I always used makefiles to compile librairies, that's my only experience with it. I don't know about maven
Isn't maven for java?
supposedly it can be used for anything, but it's mostly Java (and other JRE languages)
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.
@random breach 2019.3.2 and have ipython
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?
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
did it work
haven't coded much yet and don't know how to reproduce it apart from it being the first console instance, but will try
Does anyone know how to show Unicode Emojis colored in PyCharm (or in consoles at all) on Windows?
hey was wondering if someone could help me w git rebase and squash ?
What about them?
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?
@stable cloak yes, if you edit the Python run configuration template
Does the template not affect it for all future projects as well?
I don't think so. I think it's project specific.
I'll give that a shake then, thanks
Yeah, I think you're right, since the template also points to your current venv
Cheers
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
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?
How can i unattach pycharm windows?
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
hey
can somebody tell me how to use snippets in vim?
i don't know how to install plugins im so confused
so??
You want to install a vim plug-in?
You probably want to install a plug-in manager first
@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
open the project view on the left, find the project and delete it there
think that should do what you want
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
Seems like i'm only making it worse. Downloaded homebrew and can't seem to uninstall it.
@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
True
it shows the same in PyCharm
i changed from utf-8 to utf-16 then it messed up like that
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?
You can name the folder whatever you want
Alright thx
@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
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.
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
rewritebranch?
Just want to know the good practice
honestly it depends on who uses that repo, and what their expectations are
if it's just you -- go wild
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
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
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
@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
@heavy knot This is probably a more appropriate channel. Have you set a custom theme for pycharm?
Yes, I have.
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
๐ฆ
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.
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
I will install VSCode and check it out.
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
@heavy knot oh. Ty for info, i will check.
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 ah... yeah i was hoping for some kind of hook / prompt that would warn me or something.
there should be a git linter ๐ค
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.
wouldn't it save a lot of gumpf in git as well though ?
gumpf?
nonsense / useless info
really, fair enough, i will have a look - does the order of add and rm matter
"git rm" and "git add" don't create commits; instead they fiddle with the index
the index is what goes into the commit
hm, haven't spent enough time getting the innards
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
currently trying to work my way through a project tho... i should really commit as i go ๐ฉ
hell yes
don't be afraid to commit. Those are undoable, too, as long as you haven't published them
i've got in the habit of using git add -p
dunno what -p does
ah, I do the equivalent in my gui
but i have convinced myself i can just do the lot later now, and it's a bit of a ball ache
which gui?
heh
vscode doesn't have it
it's called "magit", and it's so awesome that I voluntarily pay money to the author (it's open source)
the git porcalene thingy
well, the catch is: it's emacs ๐
yeah i used magit for a bit
lol - it came with spacemacs ๐
huh
the author was cool - he did a sponsored thing where he just took some time off and worked on issues or something lol
well it's the best UI for anything I've ever seen.
I think he's doing it full-time now.
great
I pay (a very small part of) his salary.
i bought him a drink lol
no i just meant in donation
I think he's German if I had to guess
that phrasing made it seem way more personal than intended
you used the beer-as-a-service protocol
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
yeah i'm trash with emacs, i need vim keys
it's good to know the CLI, since it's always there
yea... seems alright... though it can be kinda opaque i guess
aliases make some stuff a bit more bearable
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?
I use them in complement, i use viamagit for index management, and fugitive for blame, diff and other stuff
you just use different keybindings to call them
they are both frontends to git anyway, it's the one retaining all the state
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
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
@warm pollen what?
@heavy knot you either use RDS or the container. That's a choice you have to make - where you run the database.
And i suppose you now have database clients which you want to point to RDS?
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
i get this so I think everything is ok with postgre image
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
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
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:
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
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
I think "url" should be pointing to RDS, it was previously pointing to the db container
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
I strongly suggest if it's going to production you actually hire a consultant.
๐ฆ
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)
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
Read all relevant official docs and make sure you understand all of it. VPC, RDS. Whatever you use to run your containers on (ECS?)
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
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
Yeah I already set up RDS, that is great then but I have to have ECS anyway
beaucase I have trained rasa ML model
For the app yes, not for additional postgres
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
I don't understand where ec2 comes instance appeared now. You didn't mention it before. I'm struggling to understand the situation
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: {}}
It will take us years to unwind the situation over this chat here. I think your best shot is to hire a professional. Sorry
๐
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
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
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
I guess I would configure whatever needs the database with the RDS endpoint
and i too dont undestand how does docker compose actually help me at all
Docker compose is for demo purposes. Forget it. It's instead of Terraform or CloudFormation
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
Yep, sort of
Thank you very much for your time! ๐
Welcome!
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?
In what case git reflog would be used?
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?
autru ca sudo -s
Git log operates branch wise iir
C
I don't think that should be happening?
But I'm not a git master mind
Git dev mind then? ๐
is there a way to reference the project directory when setting the script path in a run configuration?
in PyCharm
like this
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
@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
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
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
