#tools-and-devops
1 messages · Page 47 of 1
i wasnt paying attention when i signed up
since their services are for a year
and i didnt notice the 750 hour cap
i just signed up
and lost my 750 hours like that haha
new account?
yeah it was a new account
never got a bit of use out of it though
i thought it would be cool to use azure because im big into .net framework
and ive dabbled a little with asp.net
thought maybe there could be reasons why it would be really easier to integrate into their platform but never really followed up on it
Eew c#
Could be worse tbh
its by far the best enterprise lang
It could be whitespacd
agreed lol
It could be whitespacd
yikes plz no
C# is amazing
you do not want that
its by far the best enterprise lang
@thin crescent the problem is you can miss type a variable and completely fuck up your computer
lol
Hmmm
thats not even remotely true @cunning falcon
who told you that
no part of that statement is correct
Uhh
thought he was talking about it not compiling
no worries haha
i mean if u mistype a type it just wont compile
roslyn will be like nuh huh back up son
hm so then i have a super obscure question
@thin crescent have you ever used microsoft office interop
?
nope thank god
i tried to avoid it but then i found that i was reinventing the wheel
i was using openxml and literally parsing and working with the xml from the word and excel documents
it seems impossible to find anybody with a ton of knowledge on office interop
cant find examples for what i am trying to do or anything haha
lotta domain knowledge on that one
the people that do that arent going to be your discord or stackvoerflow types
true
its gonna be the rando buisness people that fucked into programming through necessity
you think so?
the basic use cases for the library is easy for me, but what i am trying to do seems like something nobody else really does
and it's weird because it seems like it should be something that is straightforward to seek
i guess i wonder why microsoft doesnt have better documentation
usually they are amazing
but for com, it's not looking like it
or better yet
all of the variables and methods are documented, but the descriptions of some of the methods are way too vague and there arent any useful examples
but here's a question that maybe you can answer:
for a bunch of arguments, it takes an object type as a parameter when the method so obviously is looking for a very specific data type... why do they take a generic object as an object as a parameter.. why not something like a string?
ill find an example
What
Object
Required Object. The string you want Microsoft Excel to search for.
This might not be the example that I'm looking for, because I can't recall if there is the option to pass a Range object OR a string to What, but I am 80% sure that it only takes a string
But this is similar to the type of case I'm talking about
umm if i had to guess its cuz it will cast the object to what it needs
So basically you're saying it makes it more generic and maybe there are other types that it will just extract the string from?
For example if it were an int but an object, it would just cast it to a string?
Makes sense
Sure, seems like a good guess
But lol
so this is one of the factors that makes the documentation a lot less useful without actual examples
thanks ill get it a shot
@thin crescent question. Would there be a way to, like, just put my bot project onto github, then make a script in repl that loads the bot without it actually showing the script that would host the bot? Like, hide the script somehow.
Idk
The repl will more then likely just close long running processes
U can try running it and see how long it lasts
I mean u can’t hide it lol
It’s running on their servers
I mean u aren’t gonna find something that will allow you to host for free indefinitely
Oof
It costs money to host stuff
Also, do u like editing photos
Bc i found a website that is literally free photoshop lol
Nice
If u wanna tell ppl about the website because they dont have photoshop the website is photopea
K ima go
im curious, I don't know which type of AWS to use. I am trying to delpoy a dashboard.
I was looking at AWS Glue
@sand thistle a dashboard website correct?
Yes @civic walrus
You could use an EC2 instance
or an elastic beanstalk instance
elastic beanstalk sets up most of the things itself
@heavy knot
hello
ok so
are you on the dashboard?
this
um
where are you rn
idk
go there
ah ye I was tghere
Now what?
@heavy knot
im hereee
now what does I do
you should see this
Should I press launch a virtual machine
oh
yea
lemme send u a ss
cuz you dont have one yet
the top left?
as long as you havent launched one yet, then ye
Ah ye
quick start
should I pick a random server/
uh as far as i know, discord's api servers are in NYC
so
east/central uS
im confuddled
"Step 1: Choose an Amazon Machine Image (AMI)"
ss
it's been a while
what do I choose
one that free tier eligible
im using amazon linux
ight then
do I proceed and "launch"?
yup
Keypairs?
was dat
public/private key
um
idk what that is
you keep the private key (thats your "password")
you can tell anyone the public key
so I download it right
basically when you log onto the vps, you'll send your private key("password") and if it resolves to match your public then it lets you in
ye
downloa
also
unless you feel comfortable using ssh in a terminal (it's not so bad)
ok
"Your instances are now launching"
now what>?
just wait
also get putty if you want
otherwise, check to see if ssh -v works in cmd
naw
also make sure your key is somewhere easy to find
alr then get putty
key is easy to find
alr
so grab putty, and lmk when you do that
it has something about usage:ssh in cmd
OH
what
so you dont need putty if you dont want do
yay
have you ever ssh'ed?
nope idk what i'm doing 
ssh user@my.ip.here -i path/to/private/key.key
lmk when your vps has launched
get yourself to this page
ssh user@my.ip.here -i path/to/private/key.key
I change that to my details and do that in cmd?
yup
Should I take my vpn off?
Will I need to redo this when my ip changes?
eh you shold be fine
no, my.ip.here is the vps ip
oh
I don't think I have that yet
also my name says dont dm
That was ages ago lol
sorry
ok so where are you in the aws
So from the photo u sent
ur ip would begin with 3.15?
ye
dont hack me 
wait is that possible>
?
??
xD not with a partial ip
But can I get hacked with an ip?
well i mean
I've clicked on hella grabify links

i mean you can get ddosed hypothetically but eh
yeye that happens
but that's it?
ig
unless you have a vulnerable computer
anyway
where are you in aws rn
I change that to my details and do that in cmd?
doing that I think
but
you need to go to the page here to get your vps's ip
that link should get you there
ye I am
or redirect there
ok
so you see the ip then right
llink from launch instance right?
wait no
services > ec2
it's at the bottom of the page
in desc
right
the one that says Public IPv4
Also my file doesn't end in .key is that ok?
mhm got that ip
and yea its fine
so put that in cmd>
yup
um
hm?
it's saying it's too public
oh
and it'srefusing to connect?
saying permission denied now
file explorer, find your key, right click, proprties
security
edit
and remove everything except your acct
my acct
it;s like a load of string
-----END RSA PRIVATE KEY----- remove that?
huh
no
dont open the key
oh
How come?
right click, properties, security, edit, remove everything except your acce
cuz you dont need to open the key?
right click, properties, security, edit, remove everything except your acce
what is acce?
my windows acc?
acct
ye
it should end up looking like this
damit that'll be complicated
not really, just click remove on anything thats not your personal acct
I don't have f.a to my pc :|
Ima kid so i'll have to wait a while
sorry ):
huh?
fa?
@heavy knot 
i haven't got admin perms
ah
well
hm
OH
i forgot that was a thing
ok so
connect
once you connect, do sudo passwd yourusername
and set a password
And I don't need to do they key thingy?
yea we'll set it to be keyless
once you add a password lmk
what do I name it
huh
no just keep the default username
can i name it anything
click connect
wait
actually
yea
name it whatever
ight it launched
it failed but said wait a minute or two if it failed
ah oki
so then sudo passwd the_username_you_used
in cmd?
no
in the thing that launched
this
mine still won't load
close it
click connect
use the default username
I have
hm
odd
give it a bit then
hm
the instance is up right?
correct
retry ig
:(
you could try restarting the instance
K
WOOHOO
:3
It's blank tho
not crashing
give it a sec
so then
sudo passwd the_username_you_used
@heavy knot
once it loads
damit
i'm an idiot
huh
idk what i did but it stopped
wh
?
the vps?
seems to work again
it's so dodgy tho
well lmk once the console is up ;p
I'm at a black screen
ss?
Damit it won#'t work
if it's this, just give it a bit
naw it crashed
ima term it and remake it
reboot*?
nah terminate
ah
well
once you get your password changed lmk
this is what you'll ultimately be doing
IT BREAKS EVERY TIME AAAAAAA
wym "breaks"
Just crashes
if its being slow give it a min
the vps?
idk
i might leave it if it keeps breaking
well you say "it crashes" is kinda vague
The photo I sent earlier
hm.
can you send me a ss of your key's security settings?
i see no reason why you wouldnt be able to take ownership of it
idk what u mean
these
I thought we were doing it without??
well if it keeps crashing we're gonna need them once
you either need to webconsole or the keys
just once
cuz you need to log on to enable password auth
We managed to sort the key thing out but had another problem
hm?
so.. you made it so no other perms besides you were in it?
and you had full control?
you should be able to ssh in then
I did but it still won't work
wym "wont work"
Permission denied (publickey).
Says that
hm
even tho we did it
are you sure you have the private key
^^ ?
Indeed
hm
do you also have the public key/
public?
where's dat
ye
go to key pairs
make sure it's a PEM
ppk or pem?
also make sure the username on the key matches theuser you're logging in with
pem
ight then
acttually.
the key id bit the public bit?
you dont need th public
just download the private
and ssh user@1.2.3.4 -i path/to/key
make sure user is the name of the key
I rename key to user?
no
that column
user in the ssh command is the Name
It won't work :(
Thanks for ur help but I'm losing braincells over this
ima probs take a break idk
well.. what's it saying?
oh.
Permission denied (publickey).
does the username match the Name on the keypairs?
check them all
k
yh it does
try doing ssh ec2-user@asdasdasdas -i path/to/key
if tht doesnt work, i'm at a loss until you can get into the web console
cuz "Permission denied (publickey)." means you have the username /key wrong
AAAAA I GIVE UP
;-;
It's been like 3 hours
I'm sorry
There's no way
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-password-login/ well bookmark this
wait-
do you still have your vpn on?
Nope
oh
Have I been blacklisted from glitch.com
idk
It works on mobile
but not on pc
never mind just not on chrome
broken aaaaaaaaa
hm
@heavy knot Just like to thank you for giving up your time to try help me, really appreciate that there are people nice enough to give away that much of their time for free :)
sorry about all the problems, I'm geniunely confused on what's going on
hey no problem ;3
@heavy knot
Do this:
- Open Windows PowerShell
- Navigate to the directory where your AWS key is located it should be a
your_name.pemfile - Type this on Powershell and replace everything with your own data:
ssh -i your_name.pem ubuntu@add_your_ipv4_ip_here - Press Enter
- You are logged in now
If its not ubuntu change it to w/e the type is
i use ubuntu
My IP!???
the vps's ip.
ah
I did it in cmd?
doesnt matter,
they both work.
ah
@civic walrus u know how I can turn my py into an exe btew
or just hide it when it opens
Wait, if you can't connect to it then you need to open the ssh port to public
also, u can use a python to exe wrapper like Nuitka or Py2Exe
Wait, if you can't connect to it then you need to open the ssh port to public
@civic walrus no. it was permission denied.
well
rip
u cant do anything about it
@heavy knot did u solve the chatclient problem?
no
ok
I am thinking of creating a security related apps, but I need some ideas. Can anyone recommend me one?
What could be causing this error:
❯ pipenv install --dev
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
patched/piptools/repositories/pypi.py", line 282, in _get_file_hash
for chunk in iter(lambda: fp.read(8096), b""):
File "/usr/lib/python3/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 282, in <lambda>
for chunk in iter(lambda: fp.read(8096), b""):
File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/_vendor/requests/packages/urllib3/response.py", line 314, in read
data = self._fp.read(amt)
File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/_vendor/cachecontrol/filewrapper.py", line 60, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 454, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 498, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2607)
is it something on pypi's side?
my pipfile looks like this:
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
scikit-learn = "==0.21.3"
pandas = "==0.25.2"
matplotlib = "==3.1.1"
# dask-ml = "*"
[dev-packages]
notebook = "==6.0.0"
nbdime = "*"
[requires]
python_version = "3.8"
How do you force your gitlab docker runner to pull base image? 🤔
Here's a list of orchestration tools http://www.devopsbookmarks.com/orchestration+python
Discover the latest devops tools and frameworks
Or frameworks you can use for building your own custom orchestration tools
@shrewd ibex maybe this helps you
There's a bunch of things you can have a look at
that is a pretty awesome link. bookmarked. thanks @heavy knot
I just dug it up on Google ☺️
I'm glad to be helpful though.
I can't really program much, but I can Google solutions 😅
I've been using Google for a while, that teaches you some tricks 😉
Also, wasted way to many hours on programming and hacking as a teen xD
But that's a story for off topic channels
haha. most definitely. learning to Google is a good skill to have.
i dont know if this should go in this channel but does any one know a good starting platfrom or website to learn python if not thats fine
!resources @ashen comet
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
so guys am i gonna have all my money taken away if i use bird bot to buy a switch lol i dont know if this is safe the code is open source so i guess thats good but i need a switch so any advice on wether or not i should use this?
5. Do not provide or request help on projects that may break laws, breach terms of services, be considered malicious/inappropriate or be for graded coursework/exams.
has anyone here set up RabbitMQ with TLS on windows?
server
having trouble setting it up... went through the guide on the RabbitMQ website, but can't connect to it
like RabbitMQ server?
@wooden ibex r/beetlejuicing
lmao
(ur username is relevant to the topic at hand)
🙂
never did the server on Windows
how about on ubuntu?
I remember finding it difficult to setup even on linux
idk that was ages ago
I ended up switching to AWS's hosted solution
I think I'm failing on the tls certs
are they self-signed?
yeah
then you just need the client to add them to the trust store
yea, with price of Messaging systems in the cloud, running on premise is meh
unfortunately, they don't want any cloud components
rip
they dont want linux either, no on site support for them
so stuck with bare metal and windows
is this website?
well, when COVID thing dies down, get some help updating your resume
no, just for the consumer to connect with tls
yea, I got nothing, if it's all on premise, I wouldn't worry about TLS
it everything was on premise :S
I wouldn't recommend skipping tls
I mean, we are in massive unrecommended territory now 😄
true lol
just imagine if the client asks you about security
and your response is
"well everything is local so we didn't use security"
you'd rather be able to name stuff that they don't understand 😄
"We make use of TLS 2 using public key crypto and a XXX-bit key to ensure data integrity across transport"
imagine worrying about security with TLS and ignoring on premise lack of patching
^^^ that's entirely true tho
or docker or any other tool
dang rabbitmq has had quite a few vulns per year
Pivotal Software Rabbitmq security vulnerabilities, exploits, metasploit modules, vulnerability statistics and list of versions
it's also more, cloud messaging systems are SOOOOOOOO cheap
I mean if a company is resisting cloud change, nothing you can do
like the cost of setting up RabbitMQ will far outweigh Azure Servicebus or Google Pub/Sub
Hmm, no vulnerabilities for 2019?
my initial thoughts was to use cloudampq
yeah that is the guide I followed
some issues with the guide
but mostly good
Cloudampq seems like rip off
o
Azure Servicebus/GCP PubSub are like .05c per million operations
the docs for troubleshooting is good too: https://rabbitmq.docs.pivotal.io/35/rabbit-web-docs/troubleshooting-ssl.html
locally I can get it to work with s_client and s_server
it's trusted cert issue I'm sure
Is AWS SMS one the save level as Azure and GCP in pricing?
o yeah typo
well, I digress
thanks for all your input
will keep plugging away at it..
wonder if there is a rabbitmq discord
Need help with VS Code
hey i need something to make syntax highlighting better with sql commands in python file
check this out
the first one is vs code and the second one is sublime
Anyone know of a good hex editor plugin for pycharm (or a hex editor in general), the most downloaded one is missing a few things I'd like
I'd like to know too
One feature I really wanted was the ability to label certain blocks of bytes
This sort of does that, but you need to write a declarative spec for the format, which is not convenient. It also doesn't let you edit https://ide.kaitai.io/#
hello
i wanna learn more about docker, devops, etc...which books would you recommend?
Is there a way to run a jupyter notebook that is behind a walled garden but on my system? Code is executed locally, but it's in a vendor box.
I want to be able to run the notebook and return its results to my pipeline, but AFAIK I can only run the code via their box.
Learning at-least the basics of vim, so far so good, just wondering if there's a way to adjust the font-size. I read that it's based on the terminal, but curious if there's a way to override it.
@wide thicket Not sure how much you already know about dockers, but if you're fairly new like me then I recommend the "Play with Docker Classroom". It's a good guide, supplemented with the occasional youtube video if you're interested in a particular topic. After the first few lessons and then learning about docker-compose, I was able to move my Django/Postgres/Redis project into a docker.
Learn docker through online trainings in training.play-with-docker.com
Hello! Can someone clarify one thing for me? Let's suppose I have python project which is consisted of some folders and a bunch of files, I mean not just 1 file "main.py". I noticed that I have some dependency problems with default anaconda environment so I created a new environment and it works fine. But I am going to upload my code to a server via docker. So, here's the question: if I am planning to deploy via docker then can I entirely skip conda environment configurations? Because as far as I understand it, I can install all the libraries via docker directly and no need a package manager at all. Am I right?
Basically your dockerfile should be (in fake syntax):
from python
set workdir
copy requirements.txt
pip install requirements.txt
copy rest of code
expose ports you want
set your command to run (flask blah blah, or whatever)
@covert kindle thank you. i'll have a look. i am very new
hum hi everyone
i dont expect someone to answer me because i dont answer to help channels because i suck in python BUT
i got problem
idk why when i start any codes it say me pydev console
and i cant test my code
i don't understand btut its probably something for advanced developers or somethingg
i dont know how to get out
i already tested close and re-open but nothing to do...
please help
I have set up a virtual Ubuntu 16.04 machine at paperspace.com. In Pycharm I have set up a remote interpreter at this machine and it seems that Pycharm finds it and lists the installed packages co...
@heavy knot googling gave me this https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000749030-How-to-stop-interactive-console-running
@tranquil creek thank you! So, basically, I use Anaconda and, I mean, Anaconda itself won't be installed inside of a docker container, right? Cause it seems like an overkill to me
Hello... I have a web-app for data visualisation i'd like to deploy in my network via my own windows servers. Can anyone source me some good resources on how to do such thing? Thanks in advance.
@spark narwhal It will depend on your frontend webserver.If you really want to use IIS your need to use something like wfastcgi (it's on PyPI and good starting point for google searches) which presents a fastcgi API; to the webserver, but generates wsgi requests for the python app. I've gotta go now; sorry to reply and leave. , but I'm in UTC+1; and v. sleepy.
@blissful jackal the idea is for it to be an intranet webapp. its a simple dash app for data visualization in the company. Im no worried about performance at this point, so I really dont think i need fastcgi. That being said got any documentation on the configuration? Thanks in advance.
@lost aurora thx !!!!!!!! im gonna see
I have a static HTML/CSS site in Pycharm. Refreshing it in Chrome causes this.
Copying the auth URL of http://localhost:63342/cybersaur.io/site/img/favicons/site.webmanifest?_ijt=635cvt5oeiohcvje577rfi0hem just brings me to a meaningless JSON page
I can still see the HTML page, it's just annoying to have that dialogue on every refresh
is there a simple fix?
Guys
I'm using VSC for my coding currently, but is there something else I can use that's not too difficult to get setup? (So not sublime-text or similar stuff)
Should I switch to Spyder?
@ me if anyone has an answer pls
pycharm is legit
@heavy knot Okay, so just clarification: you want it installed to your regular Python and not to Anaconda, correct?
I may have gotten confused initially
yes you are currect
okay cool
correct
sorry i type fast which means spelling errors
First things first, what OS are you on?
mac
Hmm, okay. In the terminal, type in python3. That should open the REPL. What version and what not does it tell you it opened
Python 3.7.6 (default, Jan 8 2020, 13:42:34)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
okay cool
I remember on Windows it was an absolute bear to deal with Anaconda, and I ended up just removing it. Looking to see if you can use another library/program called pyenv to more easily manage all this
yeah im trying to remove conda but nothing works
Okay, this might actually work, I'm not 100% sure, though. I don't have a Mac I can test it on, so make sure you double check and understand what it's doing before following it.
But I THINK that can be helpful
okay thanks so much I appreciate your help.
Only thank me if it works
alright
My paranoia knows no bounds
guaize, halp!
i messed up. in several ways in fact.
for starters i set the wrong file mode for a log, having it append instead of truncating.
secondly i actually staged and commited that log file.
and third, i made several commit since then.
now i deleted the log, but since i'm several commits ahead of remote, when i try to push github is like "nope, can't let you upload a file the size of your mom"
how do i fix this?
make a new branch based off the commit before your screw up, cherry pick commits you want to keep from the new work
or reset to that old commit and manually redo your new commits minus your mistakes
Im a beginner so i hope the question fits in this channel: In what format i need to compile my programm to share it with my friends that dont have python installed?
What are you expecting them to be able to do with it? If it's simple enough and doesn't require the filesystem, I'd recommend just sharing it with https://repl.it @whole grove
simple programms like a self programmed "calculator" or something like that. Isnt there a way to compile it into an exe file so they can execute it an give input via cmd. Sorry if these question sound dumb. I just started with coding
okay thanks... gonna inform myself about the tool
okay, so im including the Python.h header and im having one problem
when i run it on a computer without one of the libraries it breaks
so how can i include the library
you're talking about building either python itself, or a C extension, yes?
Is there a pycharm discord?
My project file's directory needs to be changed
Im on my :C drive, but I want to move it to my : D drive
I have to go soon, so pinging me ( @heavy knot ) would be best, or DM
@heavy knot Then just move it to the D drive yourself. What's the problem?
When you open PyCharm, you need to open the project by browsing to it in the D drive
I did
Also check your run configuration in PyCharm to make sure the paths point to the new location of the project
Where is that?
Hey, my cmd isnt letting me run pip for python libraries. me and some other guys confirmed i had the right version of pip and python installed, and tried changing the system variables. We couldn't find "PATH" but did find "Path" which we promptly added python.exe and the Scripts folder to, to no avail. Any ideas?
^ i'm having the same issue
How does your path env var look like now?
yeah, mine looks like this:
assume there is a pip.exe in the Scripts dir EvESpirit? 3.4 is a bit old so I'm not sure if it has the same structure
sorry, this:
@finite fulcrum you might be correct, actually, i'll change it to 3.8 and see what gives
Who the fuq installed 2.7 on my machine what
thats why it didnt work
That looks alright to me Muhday, make sure the scripts dir has everything you'd expect then if it doesn't work restart the terminal/pc
oh well
and check the system path for other paths that could be conflicting with the user env var
is it ok that i have "Path", not "PATH?
how can i use selenium on wsl pls halp:(
can someone help me setup the atom ide
How do i get my heroku logs on mobile?
Hi all, I'm looking for some help/clarification on how to properly use Git in combination with VScode and github. I'm struggling to wrap my head around taking a repo from Github and going through the necessary steps to submit changes to be made. I've installed git, connected it through VSCode to Github, and made changes to the code that I wish to contribute. However, I think I missed something with cloning vs branching...not sure though. Please @ mention me if responding, much appreciated 🙂 (sorry whoever I accidentally pinged. It didn't highlight until entering message...)
would anyone be willing to build a static python for me
ive literally tried for so long
and i cant get it to work
ill even throw in like 5 bucks if u anyone can help
What's a static python?
Anyway, do you know if it's possible to create "template" using Sublime?
I would like, when I tape in the command line subl my_file.py that this file already contains a structure that I use in all my files
@deep estuary how can I sign in vscode?
what do you mean sign in
@twin hull best I can say would be https://www.freecodecamp.org/news/a-guide-to-preserving-your-wrists-with-sublime-text-snippets-7541662a53f2/
by Jimmy Zhang
A Guide to Sublime Text Snippets
Photo by Chris Peeters from Pexels
https://www.pexels.com/photo/speed-racing-speedway-racing-car-12801/I recently
switched jobs, which involves a lot of acclimation: new coworkers to befriend,
new terms to learn, a new developm...
@cloud geyser maybe this?
click that user thing bottom left
I clicked but it says You are not signed in to any accounts.
I dont know how to sign
@deep estuary
Thanks joe, I was looking in snippet as well but for now haven't found how to trigger it by file creation
env variable looks promising though
Another way to do that would be to dig into the subl command options to see if it's possible to directly write into a file with it, and then create a bash alias/function
What error?
hmm that is odd
veeeeeeery odd
not sure about that one, if it does repeat try get in touch with support
its repeat 4-5 times lol
Im refreshing page and creating account
I tryed to login but it errors again
@deep estuary okok github broken
ccan try to open an account?
ahh
@deep estuary
what OS is that?
with finder and the app store?
oh ok, I don't really see the point but
waitwait
Wrong question
lol
Can I download macOS to not mac computers? @deep estuary. Like macOS to Sony Vaio
you cannot no
😦
sad
mac computers are a bit expensive
for me
what is diffrence beetween about vscode and vscode insiders?
what is diffrence beetween bout vscode and vs?
I am working on CNN currently. how i can get no of training samples in one variable and no. of testing samples in second variable? now i am getting this way Found 807 images belonging to 23 classes. Found 164 images belonging to 23 classes. how i can save it like "train_samples" = 807 and "test_samples" = 164 etc this way? i need these variables in cnn algorithm
@amber ruin #data-science-and-ml
I have a static HTML site on an s3 bucket. It's set up almost correctly, but I have a very weird problem.
If I go to www.my-domain.com I get the index page, but the links in it just point to nothing. If I go to https://s3.eu-west-2.amazonaws.com/www.my-domain.com/index the links all work fine. On all other pages, the links work correctly
and by not work, I mean the HREFs in the browser just point to an empty string
if I curl https://www.my-domain.com, all the hrefs appear normally - just not in the browser
I honestly have no ideas as to what to even investigate. It seems like a browsery cacheing issue, but I can't think of what would cause it.
can I download windows shell to ubuntu?
you can download Powershell
powershell 6 specifically
what is the name of font that cmd using ( windows)
Powershell 7 is current Powershell core version
https://discordapp.com/channels/267624335836053506/463035462760792066/727134678527639592 If you know how to fix, please tell
Hi guys, I have a python program which uses, tor(Linux CLI) to connect to the internet. How can I use that with the docker, also I am very new to docker
Hey guys! How do you read this cpu usage from the docker module container.stats() output: {'cpu_usage': {'total_usage': 929689562563 ?
what is diffrence beetween about vscode and vscode insiders?
@cloud geyser insiders get new features first, but they are in beta
@burnt tundra this is where i meant to be
h
honestly i'm too lazy to set up the plugin properly 
well i just downloaded this one - no setup needed
really? :o
ahh, i'm a few updates behind
o
haven't bothered
xD
hi so im new to visual studio code and i was wondering if i could change the colours of the different syntax cause i didnt like the default ones
@cloud geyser go to File -> Preferences -> Settings, then select text editor scroll down to font and there should be a button saying Edit in settings.json
thx i ll check this out
Trying to use pipenv for the first time. I've read up on the basics but whenever I try to install anything using pipenv, I get this ValueError:
ValueError: Not a valid python path: 'D:/Anaconda/python.exe'
I had Anaconda installed for a bit in the past but I uninstalled it quite some time ago. Any reason why I would be getting this error? (If anyone has any info please DM or ping me)
I am using pyppeteer (puppeteer port to python) within a docker container to take a screenshot, but when i run my app within the container, I don't see the screenshot.png saved anywhere? I believe it is being saved within the docker container's directory, does anyone know how I can mount a volume to the host's directory, and would I do that within my app code or the dockerfile? Thank you!
@gray stream neither, you have to do it when you start the container
the Dockerfile defines how the image is built, not how it gets run
diablowalks, you would do it in docker run
however, if you use docker-compose, you can define it there
why is pycharm not accepting its own template
empty docstring
async def trash_reaction(msg: discord.Message, bot: commands.Bot, ctx: commands.Context):
"""
Puts a "trash can" on a message, so the calling user can delete it
:param msg: the :class:`discord.Message` the reaction is added on
:param bot: the :class:`discord.ext.commands.Bot`
:param ctx: the :class:`discord.ext.commands.Context`
:return:
"""
the docstring in the 1st pic
if i put a newline after the description it whines about a loose punctuation mark, but does fix the issue
Heya, my pipenv management has been super slow lately, any pointers on how to fix such a thing?
Even uninstalling a package with no dependencies with pipenv takes upwards of 2 minutes.
I’m using a lot of alpha packages since my project is still a WiP.
#!/usr/bin/env python3
import subprocess
import collections
import re
import operator
import csv
def error_csv():
errors = {}
with open("syslog.log", "r") as file:
for line in file.readlines():
val = re.search(r"ERROR ([\w ']*)", line)
if val:
val = val.group(1)[:-1]
if val == None:
continue
if val not in errors:
errors[val] = 1
else:
errors[val] = errors.get(val)+1
sorted_errors = collections.orderedDict(sorted(errors.items(), key=operator.itemgetter(1), reverse=True))
with open("error_message.csv", "w") as f:
writer = csv.DictWriter(f, fieldnames=["Error", "Count"])
writer.writeheader()
[f.write("{0}, {1}\n".format(key,value)) for key,value in sorted_errors.items()]
return sorted_errors
def user_csv():
userData = {}
with open("syslog.log", "r") as file:
for line in file.readlines():
val=line[line.find("(")+1:line.find(")")]
if val not in userData:
userData[val] = [0]*2
if line.find("ERROR"):
errVal = userData.get(val)[1]+1
if line.find("INFO"):
infVal = userData.get(val)[0]+1
userData[val] = [infVal, errVal]
sorted_userData = collections.OrderedDict(sorted(userData.items(), key=operator.itemgetter(0)))
with open("user_statistics.csv", "w") as f:
[f.write("{0}, {1}\n".format(key,value)) for key,value in sorted_userData.items()]
return sorted_userData
What changes let the script create those two files "error_message.csv" & "user_statistics.csv" ?
Hello! :)
I have an issue
Turns out flake8 ignores my setup.cfg file
I'm in Windows, I run flake8.exe in my powershell terminal and despite the fact I have excluded the folder .env, it still checks it out
How can I fix this issue?
Thank you SO much beforehand! :)
Nevermind, turns out that in reality my .env was named env XD
Thank you very much anyways! :)
what text editor should i go for i cant decide between sublime and vs i just want the fastest and best
lets play spot why i am a moron
Anybody here who has a good grasp on Kubernetes?
How is having an NGINX reverse proxy running in front of a Kubernetes cluster different from using an NGINX Ingress controller?
hey vscode and pipenv friends, how can you get your python environment to use pipenv but still use black and flake8 from the global install? Like, I don't need every package I publish to include these lol
@solid frost you can install black and flake8 using pipenv install --dev, which will tell Pipenv that it is a development dependency
IIRC VSCode should already deal with black and flake8 without you having to install them manually each time, no?
they're available as part of the standard config but once i selected a pipenv interpreter vscode started asking to install them
pipenv install --dev is a nice easy fix for right now but i suspect that there's a more permanent fix like pointing to a virtual environments folder that differs from globally accessible packages for use across vscode
What i'm lacking in pure knowledge i'm substituting with raw enthusiasm. Cheers for the advice kosayoda.
@solid frost what you could try is this:
mmm?
- Make a virtualenv using pipenv anywhere you want (like
~/code/envs) - Run
pipenv install black - Run
pipenv run which black - Copy the path
- Go to VSCode settings and set
python.formatting.blackPathto the path you copied
it should theoretically stop bugging you to install black when you have a new working environment
lol cheers
And if that works, then doing the same thing with flake8 would work too (use the same virtualenv)
Hi guys, is anyone using Pylance (VSCode) within a remote docker container? I seem to be having issues with missing imports being flagged up despite the code still being functional:
Did you just pip install?
Vim or no vim?
yeah, just pip install. not vim - vscode in windows
i have a question about github. Im new so dont judge. I pushed a change to the README.md file and its displaying weirdly on the website
like there are no spaces where there are supposed to be
its displaying like this just learning how to use git how are you doing ok cool whats up b df
when in the file i have written it as just learning how to use git how are you doing ok cool whats up b df
if someone could explain why this is happening that would be nice
README.md uses mark down syntax
you can use something like https://markdownlivepreview.com/ to see what it will look like
This is the Markdown editor with live preview. enjoy.
if you want a new line, you can put two spaces at the end of the first line
or use two new lines
just <-----TWO SPACES HERE
learning
or
just
learning
Anyone know how to fix <class 'AttributeError'>: 'AssignAttr' object has no attribute 'name'pylint(astroid-error)?
I haven't used pylint but is that a pylint error or from the code?
so what should NOT go on PyPI? My lab has a core package that us and a handful of collaborators use and I am thinking of moving it there to let them pip install without cloning from github, but don't want to bloat PyPI with something about 20 people will use
Hello - I am using pylint but finding two issues with it. Are there recommended alternatives to pylint that specifically handle these issues better?
- Doesn't seem to recursively process all files in my project's root directory
- Returns non-zero for warnings, which requires OS-shell specific handling to ignore during CI
@blazing magnet 20 people is probably more than a whole lot of packages on PyPI
You can pip install from github if you were doing it manually fwiw, but if you look at the quality and utility of some packages on pypi then you can see that it's not a problem
Alright, thanks. I have been pip installing from GitHub but so e of the people using this are less familiar with code so getting it going as easy as possible is important.
Thanks for the feedback all. I feel encouraged to out it up on PyPI
Just don't take a fairly common word that someone might want to use for an actual library 
That's a good point. I'll prefix it with the acronym for the lab
Does anybody have some recommendations for anything where I can really quickly test code without needing to save the file?
https://www.repl.it is really nice, I was just wondering if there were others (maybe that could be downloaded?)
Can run in the interactive console, ipython and the like make it easier
Yeah, ipython is really nice.
Currently, I'm struggling to get python modules to properly work with Visual Studio Intelisense. While Intelisense seems to be working for some parts of numpy, many are unavailable.
I was more looking for it to give me completion for its methods https://numpy.org/doc/1.18/reference/random/generator.html
What is supposed to show up there?
.standard_normal() for eg
What happens if you do ctrl+space?
It comes up with the <No Completions> like the screen shot says
so for certain things I get the doc like numpy.random but it's missing for numpy.random.randn()
It's not just numpy torch also has this problem
If you do a backspace, and then the . again does it show it that time?
nah, same again
If I right click on say default_rng() and click go to definition, it can't find it
https://discord.gg/J8B9us may be able to help a bit more.
but I can run them alright
They have a #vscode channel
right ty ill take a look. although im not using vscode.
Well thanks for the help I'll try my luck there.
no problem, sorry I couldn't help to much. Someone else probably knows more than me
Yea, I'm quite new to python so it's a little daunting to have these kinds of problems just in setup. But I'll figure it out.
Can someone help me with this problem. I'm not familiar with what a python environment is. I've received this error
Message=
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.7 from "C:\Users\djod\anaconda3\python.exe"
* The NumPy version is: "1.18.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: DLL load failed: The specified module could not be found.
Source=C:\Users\djod\source\repos\Pytorch\Pytorch\run.py
StackTrace:
File "C:\Users\djod\source\repos\Pytorch\Pytorch\run.py", line 2, in <module>
from keras.datasets import mnist
The guide tells me to activate my conda environment using
conda activate
running this command doesn't appear to do anything, and running the code again, same problem
A virtual environment is a self-contained directory tree, like a "sandbox" in which you can contain specific Python installations/packages. It can be helpful if you have different applications which demand different (sometimes conflicting) requirements. For example, I have Python 3.7 in one environment on my machine, and Python 2.7 in another.
It looks like you are using Anaconda 3. To list all virtual environments on your system, enter this into your Anaconda command prompt: conda info --envs. (don't include the period)
You should see a list of environments with a * next to the active. If you only have the default, it will be called 'base'. What environment are you in?
(Sometimes it's easier to just destroy and recreate the environment. That may be bad practice, but hey.) Otherwise, I found this page that recommends you re-install numpy.
https://github.com/numpy/numpy/issues/15244
Using Pyinstaller to create executable, Get Importing the numpy c-extensions failed. Reproducing code example: F:\PCS\Documents\Python>type numpytest.py # -- coding: utf-8 -- import numpy ...
^ Note I always like to work inside a virtual environment, as opposed to base. That way if you mess something up, there's an easy fix. I was told this is especially true on Unix systems (Mac)
if anyone has experience with vscode i would like to know if you could get the python console in vscode
and how to use the output window
Does anyone use Sublime Text here? if so i could use your help with trying to get a linter setting applied to my Sublime Text
So i had two projects open in pycharm (same window) and I accidentally marked the root of one as excluded (i meant to mark it as sources root). how do I undo this? It's completely disappeared from project view and I cant reopen and attach it? (@ me)
@heavy knot can you try to delete the .idea folder in your project root?
how do you guys share models across AI applications?
Does one need to know Kubernetes or Ansible in order to understand monitoring tools like Grafana and Prometheus?
no, though prometheus hooks into a lot of the metrics that kubernetes produces. but you don't necessarily need both
Ansible is largely unrelated (though might happen to be used in the same CI/CD stack)
@blissful sluice thanks for helping me
i don't know if this is a good place to ask about development
but im building a flask app
idk what "tech stack" that fits into
python backend stack. you're using python/flask, other parts of the stack might include other backend technologies:
- gunicorn
- some database thing? sqlalchemy with flask-sqlalchemy integration?
- maybe some Docker?
- maybe a task queue like Celery?
dare we say maybe even some graphql with Grahene?
if you're extending the stack up the frontend, that's kind of up to you - anything that'll talk to an HTTP backend. could be vue.js, could be React native, could be plain old HTML with Tailwind, could be Boost, could be an android app
is that what you're asking?
im not sure how to google this question, but how would i turn my python folder into a linux package?
like I have this quickScripts folder
that im planning on having a bunch of scripts that i would use
how would i make it a linux package so i can jst do something like
quickScripts <scriptName>
So is there a good linux emulator online where I can learn DevOps, because my pc does not have enough RAM for Kubernetes, Prometheus.. etc?
Like AWS?
But is there some other solution except AWS or other cloud services for my problem?
Get better hardware
lol
It's either run it on your own computer or on someone elses
I was thinking of using the linux environment online
they have nice RAM
@simple trellis so in AWS you have to ssh into the ubuntu machine?
Lightsail and ec2 yeah
Servers don't usually have guis anyways
what OS are you using? windows 10 has WSL, which provides a nice environment, though some RAM is needed
kubernetes doesn't take up that much RAM either
I mean, running it 'online' is someone elses computer 🤔
Where should I save my logfiles? In the Project folder? Some user folder? I've read alot about what to log, and how but I cannot find any definitive answer to: Where is the best place to save my log files
on *nix systems, usually /var/log
but that's for services
your other options involve centralized logging, such as logstash and stackdriver
we're sort of moving today towards just using stdout as logging, and having the environment (often docker/containers) capture those to be shipped off to cetnralised logging
it's possible to log to specified file when starting a process or service, although not the best practice
Logstash is going to be my way forward I think but I also think that I'll need a buffer logfile before shipping them to Logstash. Since I'll use this solution for multiple projects I try to find a location that is fitted to be a standard and thats why I try to find a "best solution" for this location. Maybe I overthink this and should just write it somewhere. stdout catched by docker/containers sounds interesting, gonna look into that! Thanks for your Help
yeah, logging to stdout, and then having docker/whatever ship that via its log driver is one way to go, but bear in mind that docker/whatever also has to keep its own logs somewher, though it can usually deal with that in a built-in way that you don't have to worry about
for example...here's the log driver list for docker from their docs:
though it looks like the gelf driver still logs to file, so I'm assuming it's expecting logstash on the host to be ready to pick up that file
since I work on google a lot, I'm using gcplogs which doesn't save it locally, and fires it off to google's stackdriver logging host without me configuring where to save it locally
uuuuh interesting! Thanks for the extensive info! Gonna look into that 😃
my bad, didn't mean to cut off the conversation, had thought it was done
yep! I highly recommend getting used to docker in general, it's very convenient for a lot of things
It is! I'm at the "Getting my Feet wet" Phase with docker and looking into Podman as well. Containers are the future
my bad, didn't mean to cut off the conversation, had thought it was done
@blazing magnet No Problem. I think my Problem is solved for now! I would say feel free to repost your question so it's easier to pick up 🙂
I put it in a help channel since I probably should have put it there to start, tbh I'm still not certain what should go in help channels vs dedicated channels
@blissful sluice alright don't yell at me, but I have only 4 GB RAM.
Do I have to use VM with AWS? (because I can't use VM)
dunno, though 4GB is enough to run some docker images
I know this because I have a small machine with 2GB running Jenkins, though it's not running anything else
okay what about AWS?
are you ready to pay for it?
uh 1 yr free tier
I think you're only going to get a tiny instance with that which has even less RAM
dunno how much kubernetes time you get either
okay what about GCP?
GCP will give you $300 free credit on signup
But it will require Credit Card
yes
most require it
Digital ocean also has a hosted kubernetes service (it's new)
also requires credit card
but would GCP free tier help make me learn Ansible, Prometheus, Kubernetes,.. etc better than AWS free tier?
in my opinion (and not everyone agrees), but Coogle's GKE is easier to use than amazon's
you can learn Ansible without any of that. I use Ansible as a way to maintain my personal environment installation, I have a repo whith ansible playbooks on it related to just setting up my machine
I use Ansible for deploying projects to servers, again nothing to do with kubernetes
Prometheus too, you can run prometheus outside kubernetes, and log a few different things. you don't have to look at metrics created by kubernetes
so it is mainly kubernetes that one needs good RAM?
yeah, but even 4GB may be enough