• Breaking News

    Wednesday, September 2, 2020

    "Automate the Boring Stuff with Python" online course is free to sign up for the next few days with code SEP2020FREE learn programming

    "Automate the Boring Stuff with Python" online course is free to sign up for the next few days with code SEP2020FREE learn programming


    "Automate the Boring Stuff with Python" online course is free to sign up for the next few days with code SEP2020FREE

    Posted: 01 Sep 2020 10:11 AM PDT

    https://inventwithpython.com/automateudemy (This link will automatically redirect you to the latest discount code.)

    You can also click this link or manually enter the code: SEP2020FREE

    https://www.udemy.com/course/automate/?couponCode=SEP2020FREE

    This promo code works until September 4th (I can't extend it past that). Sometimes it takes an hour or so for the code to become active just after I create it, so if it doesn't work, go ahead and try again a while later. I'll change it to SEP2020FREE2 on the 4th.

    Udemy has changed their coupon policies, and I'm now only allowed to make 3 coupon codes each month with several restrictions. Hence why each code only lasts 3 days. I won't be able to make codes after this period, but I will be making free codes next month. Meanwhile, the first 15 of the course's 50 videos are free on YouTube.

    You can also purchase the course at a discount using my code SEP2020FREE or clicking https://inventwithpython.com/automateudemy to redirect to the latest discount code. I have to manually renew this each month (until I get that automation script done). And the cheapest I can offer the course is about $16 to $18. (Meanwhile, this lets Udemy undercut my discount by offering it for $12, and I don't get the credit for those referral signups. Blerg.)

    Frequently Asked Questions: (read this before posting questions)

    • This course is for beginners and assumes no previous programming experience, but the second half is useful for experienced programmers who want to learn about various third-party Python modules.
    • If you don't have time to take the course now, that's fine. Signing up gives you lifetime access so you can work on it at your own pace.
    • This Udemy course covers roughly the same content as the 1st edition book (the book has a little bit more, but all the basics are covered in the online course), which you can read for free online at https://inventwithpython.com
    • The 2nd edition of Automate the Boring Stuff with Python is free online: https://automatetheboringstuff.com/2e/
    • I do plan on updating the Udemy course for the second edition, but it'll take a while because I have other book projects I'm working on. Expect that update to happen in late-2020. If you sign up for this Udemy course, you'll get the updated content automatically once I finish it. It won't be a separate course.
    • It's totally fine to start on the first edition and then read the second edition later. I'll be writing a blog post to guide first edition readers to the parts of the second edition they should read.
    • I wrote a blog post to cover what's new in the second edition
    • You're not too old to learn to code. You don't need to be "good at math" to be good at coding.
    • Signing up is the first step. Actually finishing the course is the next. :) There are several ways to get/stay motivated. I suggest getting a "gym buddy" to learn with.
    submitted by /u/AlSweigart
    [link] [comments]

    Got my programming first job, $40/hr, 12 years self trained.

    Posted: 01 Sep 2020 02:49 PM PDT

    Disclaimer had a Chem Engineering degree and 8 years Design Engineering experience. However, I've been told by hiring managers "Engineers are not Programmers" and vice versa.

    Job is Python programmer doing task automation. It was a 40k per year pay cut, but hey it's Corona, and the experience is worth it.

    So far the job seems very doable. My past experience has been Python, Android, web, react native, more Python, embedded C++. Occasionally for 12 years.

    I guess we will find out if changing professions will be worth it, or if I can find a hybrid like embedded. Thoughts/questions

    submitted by /u/icandoMATHs
    [link] [comments]

    Why are my server's HTTP headers backwards?

    Posted: 01 Sep 2020 10:30 PM PDT

    Here is my Spring server's HTTP response for a basic localhost:8080 request:

    1. Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    2. Connection: keep-alive
    3. Content-Language: en-GB
    4. Content-Length: 306
    5. Content-Type: text/html;charset=UTF-8
    6. Date: Wed, 02 Sep 2020 05:26:30 GMT
    7. Expires: 0
    8. Keep-Alive: timeout=60
    9. Pragma: no-cache
    10. Vary: Origin
    11. Vary: Access-Control-Request-Method
    12. Vary: Access-Control-Request-Headers
    13. X-Content-Type-Options: nosniff
    14. X-Frame-Options: DENY
    15. X-XSS-Protection: 1; mode=block

    What the hell is that Vary:? And why is something that should be a key like "Access-Control-Request-Method" is the value? To my best knowledge, that is a key for a header with its OWN value. Why my response has a key in the key, and a key in the value?

    submitted by /u/BigBootyBear
    [link] [comments]

    Why am I having so much trouble coding literately anything?

    Posted: 01 Sep 2020 09:40 PM PDT

    I'm honestly at my point and just want to quit. I want to learn to properly program, and have for a while but I'm just having so much trouble. It seems like one thing after another is against me and nothing is in my favor.

    To start, I have no idea where to start, I've been told tons of languages, what they are best at, and why I should use them. But, I did some of my own research and I can't get any solid information. One place says this about this language, this place says the opposite, it's so confusing.

    Secondly, even if I have settled on a language to learn I can hardly find any helpful help. There's tons of guides out there and I've been directed all around the web, but every guide just seems like me copying and pasting it in. Some don't explain at all and just skip right to the next step without telling me how everything works. Then when I think I understand most of the material I open up a blank workspace and I can't make anything. I put some content in, I get errors, and I give up. I'm stuck in this cycle and I'm honestly sick of it.

    Lastly, I can't find any motivation. I have all these simple ideas that I want to build, so I look up some guides to put them together piece by piece, and It's just the same copy and paste. You would think having a scope of what you want to do would give you some motivation would help but it really doesn't. Knowing that I know little to nothing and only have code written by other people, and that I'll probably never be able to write anything nearly as good, it's very draining.

    If you have any tips at all or anything to say please say it, I would like to hear from you. I just wish I could do something for once. Thank you for reading this, and I truly hope you have a good rest of your day.

    submitted by /u/Stormy_Styx
    [link] [comments]

    Few Questions about Pythons

    Posted: 02 Sep 2020 12:47 AM PDT

    I've decided to take the plunge to learn Python. Previously I have learnt C in Borland C++ and some arduino programming. I would like to start simple by making a hello world, compile it to an .exe as a proof of concept then moving on to modifying machine learning programs like waifu2x.

    My questions are:

    1. Should I go the traditional IDE (Pycharm/Spyder) first or should I go to kaggle notebook in the beginning? I like clean/ not messy environment but then I guess notepad/wordpad doesn't really cut it these days.
    2. How does kaggle Free GPU works machine learning? They provide K80s GPU but how about the rest of the system spec?
    3. Continuing with kaggle cloud computing, let's say I create a python app for machine learning, can I just upload the project and it will be like a virtual workspace ala VMware?
    4. In Python, what library/module do I need to access another program. E.g if I have "ASpecialOldbutUseful.exe" that is running in my computer, how to do I gain access to that program and automate it like openpyxl for excel?
    5. How's Python pathway going to be? Android seems to be going Kotlin and webdev seems to like Javascripts, so Python for Data Science then?

    Thank you so much beforehand!

    submitted by /u/neobanana8
    [link] [comments]

    Someone help me learn how to code!

    Posted: 02 Sep 2020 12:45 AM PDT

    Hello Everyone! I need help. I want to learn how to code for a videogame I want to make! But the engine I'm using is Godot and I do not know how to code so its pretty much useless. Please guys, lend a hand?

    submitted by /u/Kido_The_Wolf
    [link] [comments]

    Media Queries changing on their own

    Posted: 02 Sep 2020 12:12 AM PDT

    hey guys if i edit a media query with max-width 380 from div named border, my other media query with the max-width 480 changes without me editing it, could anyone help? i want the the thing to fill the page

    https://codesandbox.io/s/quirky-ride-wg186?file=%2Fsrc%2FStyled.js

    submitted by /u/Stopjoshk
    [link] [comments]

    System design resources

    Posted: 01 Sep 2020 08:25 PM PDT

    What are some good resources to learn and do system design interview prep. I'm aiming for SWE, but they do ask some system design.

    submitted by /u/darkWhiteBoi
    [link] [comments]

    Python packaging: How do i package data files when using python poetry for a python-based crossplatform project?

    Posted: 01 Sep 2020 11:58 PM PDT

    I want to make a script that the user calls to generate a new profile directory.

    $ myapp --create-profile ./folder

    Then the app is then started like so

    $ myapp --profile ./folder

    The profile directory must be populated with some data files. More specifically configuration text files, and basically works similarly to a Firefox profile. I also want to use it to store the cache, and the output of the application. The script also must call python code to generate some of the contents.

    How do i implement this in a crossplatform way? Can i package this with python poetry? Or should i look into general application packaging, for example, Linux package managers? Where in my project git tree do i include the configuration files?

    There is also a python script within the profile directory that is imported by myapp as a "plugin" and that the user can edit. How do i handle this import from the user-specified profile directory?

    submitted by /u/DerBoeseGolfTDI
    [link] [comments]

    Should I encrypt passwords stored in a database?

    Posted: 01 Sep 2020 11:57 PM PDT

    Hi, I'm kind of new to making systems, but I'm using Java and mysql at the moment and I have a table in my database that stores usernames and passwords. Currently I just store the password as is, for example if the password is "bigboy" it just stores the password as "bigboy". Should I do something to make this more secure? Is there some sort of encryption method in Java that encrypts password? I don't know how to do it yet any help? What is the industry standard to store passwords in the database? Thanks

    submitted by /u/hoy83
    [link] [comments]

    Learn C#?

    Posted: 01 Sep 2020 07:52 AM PDT

    I really want to learn C# for Unity, since I would really like to learn how to make video games. However I don't know WHERE to learn C#. If anyone knows, it would be super helpful. If it's like a Udemy-Khan Academy type course that would be great.

    submitted by /u/Sir_Sytham
    [link] [comments]

    Building a server for mirroring logs?

    Posted: 01 Sep 2020 11:23 PM PDT

    My API server has its own logs in text format automatically generated by the API framework and I want to make a visual dashboard to check logs.

    I was trying to set a dedicated server with database and log parser and then pulling log files from API server by periodically executing scp or whatever. The size of log files are not large - just a few kilobytes so transferring those files from here to there wouldn't take much resource, but it seems like a stupid way... I guess there's a tool, framework, or at least a better way to construct logging system for this purpose. Anyone has insight? Thank you in advance!

    submitted by /u/SuperNeutral1
    [link] [comments]

    Can anyone Help me understanding how this work.

    Posted: 01 Sep 2020 11:02 PM PDT

    Hi everyone I'm new to the world of raspberry pi. My background is with JS and React. I wanted to start a simple raspberry pi project that would be easy. I can a cross this project made by (Jscd) (url to code) https://github.com/jscd/Boyfriend-Alert

    I was wondering if someone could help me understand where exactly do I point it to my home server. I understand how the rest of the code works, I just can't figure out exactly where I would put my home server so that when I visit the url it runs the code.

    (Jscd) stated " I put the url to my home server as an apple browser home shortcut" I understand what's happening but I don't see where the url is. He has the word "key" in the code is it like in JS where you hide your key in a git ignore file and access it from there, so in sense the key is the raspberry Pi's up address?

    submitted by /u/BlackAcee3
    [link] [comments]

    What is an IDE?

    Posted: 01 Sep 2020 10:54 PM PDT

    An IDE seems to be able to do so many thing at the same time. Would it make it a compiler, debugger, and a text editor, etc? All of these things?

    submitted by /u/Hot_Economy6024
    [link] [comments]

    How to get past walls with no help in school?

    Posted: 01 Sep 2020 10:47 PM PDT

    I'm learning Python on the side and have had good luck with personal projects. I'm taking a college Java course and am having a real bad time. Professor isn't being much help and is pretty annoyed with me since he doesn't handhold the last 10% of the coding process after providing 90% of the code. Even confirming my idea for the direction of where I'd take the assignment is met with "Clearly you haven't read the instructions on page __, __ and ___ enough!"

    It's making me feel like I'm a special ed student when I know I can code well, but am hitting a wall because I have no idea where to go. If anyone more experienced in Java would care to help I'd really appreciate it. Apparently other students have been having little issue completing the assignment so I must be missing something?

    submitted by /u/theme57
    [link] [comments]

    JSON to powershell

    Posted: 01 Sep 2020 06:58 PM PDT

    Guys, I have been told:

    "In your POST body you're not passing friends as an array,"

    Actual JSON:

    {"friends":[{"friendId":"abc1234-456Yes-repeat"}],"wowMorefriends":{"morefriendsId":{"hmmmMoreFriendsId":"09876tyuhtre-repeated"}},"callMe":0,"param":{}}

    PowershellCode:

    $Data = @{

    friends = @{"friendId" = "abc1234-456Yes-repeat"}

    wowMorefriends = @(

    @{

    "morefriendsId" = @{"hmmmMoreFriendsId" = "09876tyuhtre-repeated"}

    "callMe" = 0

    "param" = {}

    }

    )

    }

    $JsData = $Data | ConvertTo-Json -Compress

    $JsData

    Invoke-WebRequest -Method Post -Uri "
    https://App1.Callingmyfriends.com/api/callactions/run" -Body $JsData -ContentType 'application/json' -WebSession $cookieSession -Headers $requestHeaders -UseBasicParsing

    Am I doing something wrong?

    submitted by /u/ChiTech121
    [link] [comments]

    Turning the function into a variable does not allow me to call any of its functions. Node.js, spectron.js

    Posted: 01 Sep 2020 10:28 PM PDT

    Sorry if the title is not clear but I will go into detail. Im creating an automation tool for an electron app using spectron. Spectron is built on top of webdriverio (version 4 from what i discovered). I am calling $ function to get an input element using the xpath of the app and then trying to set a value to that (value of imei variable).

    When I call the function like thisapp.client.$("xpath").setValue(value);It works fine but if I change things up and set a variable to app.client.$("xpath")

    let element = await app.client.$("xpath")

    element.setValue(value)

    That will throw an error saying setValue is not a function and I am not sure why that it isnt a function... I dont know what changes when its set to a variable.

    let element= app.client.$('//*[@id="root"]/div/div/div[2]/div[2]/div/div/div/div[6]/div/div[1]/div/div[2]/form/div/input'); //this works app.client.$('//*[@id="root"]/div/div/div[2]/div[2]/div/div/div/div[6]/div/div[1]/div/div[2]/form/div/input').setValue(imei) // setValueis not function error element.setValue(imei); 

    I tried searching stackoverflow, google, spectron docs and wedriverio docs but cant find anything explaining why this happens

    EDIT: I did a console log test and got the same thing for the variable version and non variable version console.log("example") console.log(element) console.log("not varibale") console.log(app.client.$('//*[@id="root"]/div/div/div[2]/div[2]/div/div/div/div[6]/div/div[1]/div/div[2]/form/div/input')) OUTPUT example { sessionId: '211ae95b3392eda26297e96968ddd72f', status: 0, value: { ELEMENT: '0.5312667141127014-49', 'element-6066-11e4-a52e-4f735466cecf': '0.5312667141127014-49' }, selector: '//[@id="root"]/div/div/div[2]/div[2]/div/div/div/div[6]/div/div[1]/div/div[2]/form/div/input' } not varibale { sessionId: '211ae95b3392eda26297e96968ddd72f', status: 0, value: { ELEMENT: '0.5312667141127014-49', 'element-6066-11e4-a52e-4f735466cecf': '0.5312667141127014-49' }, selector: '//[@id="root"]/div/div/div[2]/div[2]/div/div/div/div[6]/div/div[1]/div/div[2]/form/div/input' } 

    submitted by /u/perez630
    [link] [comments]

    Creating an employee wage system but not sure on what language to use

    Posted: 01 Sep 2020 10:22 PM PDT

    Hello,

    I am fairly new to programming and want to get better (like everyone) and have decided I want to create an application which companies can use to make paying employees and working out tax and everything very easy to do. All the wage systems where I am from are very complicated to use and require a tonne of set up.

    The concept for this would be something that looks a bit like quickbooks in design but focused on wages rather than invoicing.

    I am however unsure as to what language would be the ideal one to use. At first I want to make it a web based application and then further down the line create a desktop application.

    So if someone could let me know what language would be the ideal choice for something like this.

    submitted by /u/Past-Account-1003
    [link] [comments]

    Alright, I keep getting this error when trying to run some test cases: > ValueError: invalid literal for int() with base 10: ''

    Posted: 01 Sep 2020 10:15 PM PDT

    > file: Traceback (most recent call last):

    > File "population.py", line 29, in <module>

    > totalPop = int(totalPop) + int(cityPop)

    > ValueError: invalid literal for int() with base 10: ''

    (that's the full error I get from an auto-grader. The thing is when I run the offending test case in my computer, I don't get the error. )

    I did some research and I found that this error usually comes up when you try to pass a string representation of an int to anything but an int or you try to pass a string representation of a float to an int. But none of the test cases contain any floats at all, and I make sure that I convert strings to int, so I don't understand why it is crashing.

    # Desc.: Reads a user specified file, reads the state/territory name, 

    and performs calculations with read information

    inputs file

    fileName = input("file: ") fileContents = open(fileName.strip()) i = 0 x = 0 totalPop = 0 cityName = "" cityPop = "" cityNameList = [] cityPopList = []

    defines counters, strings, and the lists

    These two for loops go through each line, char by char,

    and assigns the char to the proper string

    and then from the proper string, to the proper list

    for contents in fileContents: for char in contents: if (char >= 'A' and char <='Z') or (char >= 'a' and char <= 'z'): cityName = cityName + char elif (char >= '0' and char <= '9'): cityPop = cityPop + char cityNameList.append(cityName) cityPopList.append(cityPop) # appending the list totalPop = int(totalPop) + int(cityPop) cityName = "" cityPop = "" # clearing the strings, as well as tallying the total poplation i += 1 print(cityNameList, cityPopList)

    for city in cityNameList: print("State/Territory: ",city) print("Population: ", cityPopList[x]) print("\n") x += 1 print ("# of States/Territories: ", i) print ("Total Population: ", totalPop) fileContents.close()

    submitted by /u/Can_0f_Beans
    [link] [comments]

    Which option will help me get an internship while in school for CS bachelor degree in SE?

    Posted: 01 Sep 2020 09:54 PM PDT

    Option 1: Get the AWS cert developer

    Option 2: Build side projects using the language we are learning, in this case C++

    Option 3: Focus on school

    Option 4: Start learning mobile app development on my own time outside of school

    Option 5: Start learning front end dev like HTML, CSS and JS

    Option 6: Learn a language like Java while in school learning C++

    submitted by /u/DragonCode2020
    [link] [comments]

    How does changing the name of a variable, class, or project count as refactoring?

    Posted: 01 Sep 2020 09:51 PM PDT

    Typically refactoring is some sort of change that keeps the same high level functionality, but how would changing the name of the project or a specific class count as refactoring? That seems like a major change that may not keep the same functionality from a high level.

    submitted by /u/CrazyLock6
    [link] [comments]

    【c++】【opencv】how to fit a gaussian mixture model into circle for wrapped normal distribution?

    Posted: 01 Sep 2020 09:33 PM PDT

    Hi,

    The raw data contains more than one sample gaussian models in there.

    called the

    opencv::ml::trainEM(input, likelihoodoutput, optional, optional); 

    likelihoodoutput is the result?

    even so, it lays on a straight line x axis, but it should be a circular axis?

    1. how to implement whole thing together, to get a wrapped gaussian mixture model?
    2. or apply the result from above into circular axis?

    thanks a ton

    submitted by /u/boydbuilding
    [link] [comments]

    How is it possible to have the main method inside the class where its containing the definition of the instance being called inside the main (Java)?

    Posted: 01 Sep 2020 09:29 PM PDT

    Typically, I write the class definition and then make a separate class to write the definition of the main method to make my class instance and call its methods. However, I have seen that it is possible to have the main method inside the class itself that the main method is calling an instance of. How is that possible? I thought we could not create an instance of a class within the class itself, that just does not make sense.

    Here is my example below: How is it possible to have a Test instance within the class definition itself?

    import java.util.*; public class Test{ public int tester() { return 5; } public static void main(String args[]) { Test x = new Test(); x.tester(); } } 
    submitted by /u/yobowiji
    [link] [comments]

    Learning C

    Posted: 01 Sep 2020 05:14 AM PDT

    Hello. I'm an Information Science Engineering student in India. I just started with the 3rd semester, which is when we actually get into the IT part.

    I was never too thorough with C programming before and the 2nd semester introduction to C programming was disrupted due to the lockdown.

    I have a good idea of the fundamentals (variables, operators, loops) but all of the upcoming concepts like data structures will be carried out in C and the college is telling us it is the single most basic programming language.

    So, kindly suggest any online courses or videos which will help students in my position to strengthen our C skills. Thanks!

    submitted by /u/Bittudash
    [link] [comments]

    No comments:

    Post a Comment