• Breaking News

    Saturday, January 13, 2018

    Learn How To Create A Twitter Bot With Python learn programming

    Learn How To Create A Twitter Bot With Python learn programming


    Learn How To Create A Twitter Bot With Python

    Posted: 12 Jan 2018 07:44 PM PST

    Can i earn small amounts of money after learning python?

    Posted: 12 Jan 2018 07:37 AM PST

    So I am a student from India and I am learning python from automate the boring stuff with python and codecademy I really need some money and I was just wondering if i could earn some money as a beginner from python. I am not talking about much money even 25$ a week would be enough.

    submitted by /u/13aman
    [link] [comments]

    Javascript - Most commonly used methods for Arrays, Strings & Objects. Video Walkthrough and Examples.

    Posted: 12 Jan 2018 04:37 PM PST

    I'm working on a Javascript series on Youtube. I've listed the most common methods / properties for Arrays, Strings and Objects. I feel that just by understanding how to use these methods will help you feel a lot more confident with your Javascript skills. By all means these are not all of the methods and properties these data types has to offer, but I find them to be the most commonly used methods.

    I created a video of me explaining everything here video link below is what I cover

    Common Methods and Properties in Javascript

    Array Properties * Array.length: Returns the length of the array

    var arr = [1,2,3]; arr.length // 3 Array Methods 

    Methods that Mutate the array.

    • pop: removes the last element from an array and returns that element value.
    • push: adds one or more elements to the end of an array and returns the new length of the array.
    • shift: removes the first element from an array and returns that element.
    • unshift: adds one or more elements to the front of an array and returns the new length of the array.
    • splice: adds and/or removes elements from an array.
    • reverse: reverse the order of the elements of an array in place.
    • sort: 'sorts the elements of an array in place and returns the array'

    example:

    var arr = [1, 2, 3, 4, 5] console.log(arr.pop()) // 5 console.log(arr) // [1, 2, 3, 4] console.log(arr.push(10)) // 5 console.log(arr) // [1, 2, 3, 4, 10] console.log(arr.shift()) // 1 console.log(arr) // [2, 3, 4, 10] console.log(arr.unshift(8)) // 5 console.log(arr) // [8, 2, 3, 4, 10] var newArr = arr.splice(0,4); console.log(arr) // 10 console.log(newArr) // [8, 2, 3, 4] console.log(newArr.reverse()) // [4, 3, 2, 8] console.log(newArr.sort()) //[2, 3, 4, 8] 

    Methods that accesses and returns some representation of the array.

    • concat: Returns a new array with the combination of this array and other array / values.
    • includes: returns a true if the value is in the array and false if not.
    • indexOf: returns the first index of an element within the array. If not found returns -1
    • lastIndexOf: returns the last index of an element within the array. If not found returns -1
    • join: joins all elements of an array into a string
    • slice: extracts a section of an array and returns a new array
    • toString: returns a array as a string

    example:

    var arr = [1,2,3] var arr2 = [4,5,6] console.log(arr) // [1, 2, 3] console.log(arr2) // [4, 5, 6] console.log(arr.concat(arr2)) // [1, 2, 3, 4, 5, 6] console.log(arr.includes(1)) // true console.log(arr2.includes(1)) // false console.log(arr.indexOf(3)) // 2 console.log(arr2.indexOf(3)) // -1 console.log(arr.join('-')) // '1-2-3' console.log(arr.slice(1, 3)) // [2, 3] console.log(arr) // [1, 2, 3] console.log(arr.toString()) // '1,2,3' 

    Methods that iterate through the array

    • every: Returns true if every element in an array satisfies the provided testing function
    • some: Returns true if at least one of the element in an array satisfies the provided testing function
    • filter: Creates a new array with all of the elements of this array that satisfies the filtering function
    • find: Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
    • findIndex: returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found
    • forEach: calls the function for each element in the array. does not return
    • map: creates a new array with the results of the calling of the provided function on every element
    • reduce: Apply a function against an accumulation of each value of the array from right to left

    example:

    var names = ['Elijah', 'Chimi', 'Mike'] console.log(names.every((e) => {return e.includes('i')})) // true console.log(names.every((e) => {return e.includes('j')})) // false console.log(names.some((e) => {return e.includes('j')})) // true var filterNames = names.filter((e) => {return e.length > 4}) console.log(filterNames) // ['Elijah', 'Chimi'] console.log(filterNames.find((e) => {return e === 'Elijah'})) // Elijah console.log(filterNames) // Notice none destructive for find console.log(filterNames.findIndex((e) => {return e === 'Elijah'})) // 0 filterNames.forEach((e) => { console.log(e) // prints Elijah then Chimi }) var mapArr = filterNames.map((e) => {return e.toUpperCase()}) console.log(mapArr) // ['ELIJAH', 'CHIMI'] var nums = [1,2,3] console.log(nums.reduce((a, b) => {return a + b})) // 6 

    String Properties

    • String.length: Returns the length of the String

    example:

    var str = 'hello'; str.length // 5 

    String Methods

    • charAt: returns the character (exactly one UTF-16 code unit) at the specified index.
    • charCodeAt: Returns a number that is the UTF-16 code unit value at the given index.
    • concat: returns the combination of two strings
    • includes: determines whether one string may be found within another string
    • indexOf: returns the index of the first occurrence of the specified value, or -1 if not found
    • lastIndexOf: returns the index of the last occurrence of the specified value, or -1 if not found
    • slice: extracts a section of a string and returns a new string
    • substring: returns the characters in a string between two indexes into the string
    • substr: returns the characters in a string from start to a length

      // node valide code but you should look at these differences

    example:

    String.slice( begin [, end ] ) String.substring( from [, to ] ) String.substr( start [, length ] ) 
    • split: splits a string into an array of strings
    • toLowerCase: returns the string as lower case
    • toUpperCase: returns the string as Upper Case
    • toString: converts a object type to string
    • trim: removes whitespaces from beginning and end of the string
    • var firstName = 'Elijah';
    • var lastName = 'Kim';

    example:

    console.log(firstName.charAt(3)) // j console.log(firstName.charCodeAt(3)) // 106 var fullName = firstName.concat(' ', lastName); console.log(fullName) // Elijah Kim console.log(fullName.includes('E')) // true console.log(fullName.indexOf('i')) // 2 console.log(fullName.lastIndexOf('i')) // 8 console.log(fullName.slice(0,6)) // Elijah console.log(fullName.substring(1, 3)) // li console.log(fullName.substr(1, 3)) // lij console.log(fullName) // Elijah Kim console.log(fullName.split(' ')) // [ 'Elijah', 'Kim' ] console.log(fullName.toLowerCase()) // elijah kim console.log(fullName.toUpperCase()) // ELIJAH KIM var arrSentence = ['hello', 'world'] console.log(arrSentence.toString()) // hello,world var whiteSpaceSentance = ' hello '; console.log(whiteSpaceSentance) // hello console.log(whiteSpaceSentance.trim()) // hello 

    Object methods

    • Object.values: returns an array of a given object's own enumerable values.
    • Object.keys: returns an array containing the names of all of the given object's own enumerable properties.

    example:

    var obj = { name: 'John', age: 29, job: 'SWE' } console.log(Object.values(obj)) //['John', 29, 'SWE'] console.log(Object.keys(obj)) //['name', 'age', 'job'] 
    submitted by /u/soulencoded
    [link] [comments]

    Learning system design for larger companies (experienced pros with systems architecture, need help!)

    Posted: 12 Jan 2018 02:44 PM PST

    I'm a programmer at a web dev company, and am preparing to interview for big tech companies. While I'm getting down the algorithm parts of the programming questions down pat, and still grinding on those algorithm puzzles, I don't feel as ready for answering questions on system design.

    I guess I'm trying to figure out how to catch up on domain knowledge for system design when I don't do it day-to-day in my current job. My company has an established product so I rarely have to build low level things from scratch. Many of the components are abstracted away, for example, for data storage we use MySQL and already have pre-made procedures for CRUD data operations. I mostly know how to interact with databases and APIs.

    What I don't do is work in large systems where thousands of read/write operations per second are crucial to make the entire machine run smoothly. And need to move petabytes of data each day, or more. This is stuff that is being asked in some large tech interviews such as Google or Facebook, though, even for people who only have 2 years of experience. I think that is bonkers. They're already expecting people only 2 years out of college to know their shit about scalable systems! The only systems I've coded for are Content Management Systems like WordPress, LMAO. I'm a long way from Kansas for building things that run "at scale".

    So what is the best approach to learn how to design large scale systems? I just won't get the opportunity to do much of this in my current job. Is there a "start here" guide to getting to do projects based on large scalability? Where is a sample "babby's first large scale distributed system" when you need one?

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

    Been scratching my at this for over 2 hours now, can someone help me fix my code?

    Posted: 12 Jan 2018 08:18 PM PST

    When I run the code, query 2 isn't working. Doesn't do the stuff inside if statement despite conditionals being correct... am I skipping over something??

    The code I'm dealing with is below..

    words = ["my", "kingdom", "for", "a", "fox", "rose", "is", "the", "quick", "brown", "jumps", "over", "lazy", "dog"] doc1 = [1,1,1,1,1,0,0,0,0,0,0,0,0,0] doc2 = [0,0,0,1,0,1,1,0,0,0,0,0,0,0] doc3 = [0,0,0,0,1,0,0,1,1,1,1,1,1,1] doc1_matrix = {} for i in range(len(words)): doc1_matrix[words[i]] = doc1[i] doc2_matrix = {} for i in range(len(words)): doc2_matrix[words[i]] = doc2[i] doc3_matrix = {} for i in range(len(words)): doc3_matrix[words[i]] = doc3[i] print doc1_matrix print doc2_matrix print doc3_matrix def query1(): if doc1_matrix.get('fox') == '1' and doc1_matrix.get('rose') == '1': print '1' elif doc2_matrix.get('fox') == '1' and doc2_matrix.get('rose') == '1': print '2' elif doc3_matrix.get('fox') == '1' and doc3_matrix.get('rose') == '1': print '3' else: print 'no results found' def query2(): if doc1_matrix.get('fox') == '1' or doc1_matrix.get('rose') == '1': print '1' elif doc2_matrix.get('fox') == '1' or doc2_matrix.get('rose') == '1': print '2' elif doc3_matrix.get('fox') == '1' or doc3_matrix.get('rose') == '1': print '3' else: print 'no results found' query1() query2() #query3() 
    submitted by /u/EphikPhail
    [link] [comments]

    Need help writing a review for Turing Award Article by John Backus on functional vs Von Nuemann (traditional) style of programming.

    Posted: 13 Jan 2018 12:01 AM PST

    Our prof gave us two projects: (a) Writing a review for Turing Awards and (b) Working on one language from any(traditional) programming paradigm every month and contributing to some github project in your chosen language.

    So far our team has decided to work on Ocaml,Scala,Prolog and Rust.

    So we had a good discussion with the prof about functional programming the other day and I was very intrigued by how unconventional it seems. Eventually I ended up writing a review for John Backus's Turing Award article called : "Can programming be liberated from the Von Neumann style?: a functional style and its algebra of programs." PDF

    I'm not very sure about the key point of the article as it deepens into algebra but I get most of the basics regarding the drawbacks of Von Nuemann style of programming and how functional programming is better.

    I just want to make sure I don't miss out on something beautiful (in this article) because of my lack of knowledge in this new paradigm. So here are the things I have to write in the review:

    (i) A summary of the Turing award article

    (ii) What is the work that happened after that till now, identify major research papers, articles, projects and connect them

    (iii) What do you think are four or five future directions of the work?

    tl;dr Writing a review on John Backus' Turing Award article. Hope I don't miss out anything. How has functional programming evolved over time and where do you see it go in the future?

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

    Enrolled in Codeacademy Pro Intensive "Build Websites From Scratch" beginning 1/16/18 - seeking cohorts or anyone else interested and or curious

    Posted: 12 Jan 2018 11:49 PM PST

    Hi /r/learnprogramming, I'm taking one of these fairly new Codeacademy "Intensives" and wanted to reach out and see if anyone here is doing the same. 10 weeks spanning HTML, CSS, dev tools/Github, Design, and a capstone built using JS. I'm also planning on updating a blog dedicated to the course as means to reflect/cement concepts/provide insight to anyone curious in the curriculum (warning: it won't be very exciting I'm afraid, rather just hopefully something of value to other extreme beginners like myself who are willing to take the plunge on something like this! I'll share with those curious). So please, do let me know if any of you out there have any thoughts to share about this (maybe if you've done the previous ones) or wish to witness the process with which I cannot guarantee an outcome of :)

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

    Need help with scaffolding

    Posted: 12 Jan 2018 11:24 PM PST

    Hello, i'm actually doing a Certificate of Higher Education on programming, but the main problem is we are doing development of multiplatform applications(Java,vbnet and android), and recently started a internship in a company, the main problem is that there i'm doing nothing of the degree and i need help with scaffolding with yeoman and maven archetype. What do i need to know? and where to start?

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

    Finished Codecademy's Python course. Could use some direction.

    Posted: 12 Jan 2018 03:33 PM PST

    Important stuff first: I have no degree, but I do have a crapton of math through Cal 3 completed at university. To self-taught devs, what did your path to employment look like? If you took a free course somewhere like Codecademy, where did you go from there?

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

    Would people be interesting in doing 1099 contracting as self-taught developers? [Details inside]

    Posted: 12 Jan 2018 10:58 PM PST

    I'm trying to gauge interest.

    I do software contracting for a living and sometimes I need help, but realistically I can only find a contractor for a rate near equal to mine. So, this is a net-loss from my end. However, many times in my past I've recruited, cultivated, and trained others in jobs at a sufficient rate to get them productive. Usually these people would be CS college students that I knew who were smart and motivated to learn.

    So my question is, are there individuals out there that would be interested in working with someone like me working on a real project? Your pay ultimately would come out of mine and I'd ensure that the final product is up-to-spec to the client's guidelines. You'd

    1.) learn the platform/code base 2.) help me on given tasks 3.) have your code be reviewed by me.

    Ideally, if I were todo this over reddit I'd give you some sort of base-line test to prove you can code. From there I'd interview you over the phone and if everything works out, I'd help you learn the platform. Once your comfortable, I'd assign you work!

    So /r/learnprogramming are there people out there who would be interested in such an opportunity? I have no idea when I would begin this, but I've been kicking the idea around for some time now.

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

    Is there a program that creates a mouse script operating on conditional?

    Posted: 12 Jan 2018 10:47 PM PST

    A game that I'm playing is a bit complicated and a simple mouse script will not work indefinitely.

    Is there a program that will read my android emulator screen and operates when a condition is met? (For example: when a certain screen pops up, the program will...)

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

    Please lead me in the correct direction. What what I learn for my end objective?

    Posted: 12 Jan 2018 10:33 PM PST

    Hey all!

    So - I have an end goal. Basically creating an application that feels like an OS within the Windows Environment. Kind of like a Kiosk would almost.

    Essentially, my end goal would have an intro screen - directly connect to existing source/GUI applications. I want to create my own screens/menus for access to these emulators.

    Just wondering what I should learn - for the easiest progression to that path. It looks like most of these are C++ already when checking existing source code. But I'm just curious at what would be best to create that type of application.

    Look at Lakka.tv - that is a Linux Distro that exists that serves a similar function to what I want to do. However, I just want a Windows based application to achieve this.

    VSC, Python.. Unity - what would be the best route for this?

    I'm a fast learner. I just want to learn the correct thing for my end goal.

    Thanks!

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

    Best way to store a dictionary of phrases?

    Posted: 12 Jan 2018 10:08 PM PST

    Hey Guys,

    I have a list of phrases (around 20,000 phrases right now but it might go up to approx 100k phrases). Each phrase maps to a certain paragraph. So, I'm currently trying to figure out what the best way of storing these phrases is. I want to be able to easily do look ups and eventually I want to do some type of fuzzy matching for these phrases. I was wondering what kind of data structure would be best for this? I was thinking a trie but I'm a bit confused about how that would work since these are phrases and not just words. So, if I have the phrase A Fat Cat, I'd like that to see that phrase if I look up Fat, Cat or A. Thanks guys!

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

    Need help scraping website using python

    Posted: 12 Jan 2018 09:37 PM PST

    ! python3

    mcall.py - A program the scrapes morning call and prints its

    news headlines

    from bs4 import BeautifulSoup import requests from lxml import html

    Send request to get the web page

    response = requests.get('http://www.mcall.com/news/local/bethlehem/')

    Check if the request succeeded (response code 200)

    if (response.status_code == 200):

    #creates BeautifulSoup object with the html from website soup = BeautifulSoup(response.text, "lxml") for title in soup.find_all('li', {'class': "trb_outfit_group_list_item"}): t = title.string if t is not None: print(t) 

    All that is above is code. I looked up formatting rules but I cannot figure out how to make all of the source code formatted.

    As you can see I am attempting to print all of the headlines from the morning call website of my town. Unfortunately, nothing is printing. I am fairly certain that nothing is happening because the path I am passing to soup.find_all() in the for loop is incorrect.

    I have a program that can actually print the headlines from the New York Times website, but that is because I have the correct html path. I apologize in advanced for my rudimentary understanding of the libraries.

    Would anyone be able to help me? I think all I need to do is find the correct path for the news headlines on the website within its html code, but I cannot figure out how. I am sure the BeautifulSoup api could be used, but I do not quite know how.

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

    Where to go next in neural nets after reading "Make Your Own Neural Network" by Tariq Rashid?

    Posted: 12 Jan 2018 09:19 PM PST

    The book really helped me in introducing me to the basics of neural networks, but what should I do now? Are there any other books that you guys would recommend, or should I just jump into trying to do stuff with NNs?

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

    To learn JavaScript first or to finish CS50 first?

    Posted: 12 Jan 2018 09:06 AM PST

    I stumbled upon CS50 in the middle of me learning the basics of JavaScript. Now, I am solving problems on C as part of CS50. I am worried that this might be bad for me because it seems that I am code-switching a little too much.

    Should I focus on learning JavaScript first? Or should I finish CS50 first to have a theoretical foundation of how programming works? Or, well, attempt to learn JavaScript while learning with CS50?

    Thanks in advance.

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

    Text-based online course platforms?

    Posted: 12 Jan 2018 10:51 AM PST

    Basically, I hate lecture-based classes. I don't like sitting through visual/audial instructions (in person or online) and having to go through multiple intellectual layers that convert what he is saying into something that I've learned. If I have text in front of me, it's a far more direct connection to my brain.

    Most of the lecture-based classes in college are about memorizing trivia knowledge and fairly simple problem solving algorithms for a given domain through lots of repetition. I can do this on my own more completely and more quickly than any instructor in a class setting could help me do. Labs are different though; labs create projects, which is a different process than merely problem-solving. You can run into many more problems than you could in the courses on theory. It helps having classmates and instructors that can answer questions. It pushes you past sticking points and saves time overall.

    What I want are programming courses (which are labs) which aren't taught using the lecture structure that colleges use mostly to teach theory. I can certainly piecemeal things together by finding blog posts, tutorials, open source projects, and various textbooks designed to guide you through certain projects. The issue is that these can be hard to find, incomplete, and outdated, and there's still no backing to them if I have questions or can't get past something (unless I seek that out independently, which again, takes time and can be incomplete). That's where an online course platform and an instructor would be great.

    Does something like this exist?

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

    When a documentation says (const Color &color), does it mean the hexadecimal code?

    Posted: 12 Jan 2018 08:34 PM PST

    the #ff0000 code for example. Or does it mean a different way? I have high suspicions that it means "red" or "green". Saw it on https://libcinder.org/docs/classcinder_1_1_text_layout.html void clear (const Color &color) Also further down it says (Font &Font) what do I use there?

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

    Troubleshooting Python GUI Code

    Posted: 12 Jan 2018 08:31 PM PST

    I have been a python programmer for 2 weeks. I am currently working on a GUI Program and when I have a button clicked it opens another script file but it wont. Here is the source code so far.

    import tkinter as tk

    from tkinter import ttk

    win = tk.Tk()

    win.title("Python GUI")

    aLabel = ttk.Label(win, text="A Label")

    aLabel.grid(column=0, row=0)

    def clickMe():

    action.configure(text="** I have been Clicked! **") aLabel.configure(background='red') aLabel.configure(text='How Dare you!') action.configure(import(1.py)) #Problom Here on this line! 

    action = ttk.Button(win, text="Click Me if you dare.", command=clickMe)

    action.grid(column=1, row=0)

    win.mainloop()

    If anyone knows how to make the file be imported fix this let me know. THX

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

    C# books for noob (project oriented)

    Posted: 12 Jan 2018 12:55 PM PST

    Hey guys, I'm pretty new to programming I've just done a bit of Python on code academy, a bit of reading, and some courses on Lynda. In my city it seems C# is the most popular language so i figured I'd start there.

    Could you recommend a beginner book thats project oriented? I like most learn better by doing. I was about to pull the trigger on C# Players Guide, but thought I would check in here first.

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

    Will the code have to be different for multiple platforms?

    Posted: 12 Jan 2018 08:12 PM PST

    Same app, same function, same output, purpose, blah blah blah. Only difference is the platform. If I were to make an app for OS X, would that same code work on iOS or Windows?

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

    Bootstrap

    Posted: 12 Jan 2018 08:00 PM PST

    Does anyone have any good resources for learning Bootstrap? I'm looking for Books on the subject but also any video tutorials will be good too. Thanks in advance.

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

    Java: What is the purpose of calling a function/static function?

    Posted: 12 Jan 2018 07:30 PM PST

    I'm currently learning java right now, and in this video at 3:56 she says she is going to make the function static so she can call it, what exactly is the purpose of calling a function? wouldn't the program still run successfully?

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

    Questions Regarding Next Steps in my Career - no current coding experience

    Posted: 12 Jan 2018 07:24 PM PST

    I currently work in the nonprofit industry doing client database management. This involves setting up a web-based SaaS database that is built and managed by a separate company. We buy the software and I configure and manage the database forms, fields, users, and security settings to fit our organization's needs. It is also paired with SAP BusinessObjects WebI and I build queries and reports daily.

    I have an MBA with an emphasis in Information Systems Management but NO computer science, programming, or coding education/experience. I want to do more in my career, it's kind of plateaued and I'm not sure if learning a coding language will help me or what coding language I want to learn. I am not committed to working in nonprofit my whole career, but right now my skill-set doesn't really let me expand beyond that. I am considered highly tech-savvy at most low-tech nonprofits, but not at most other private corporations or startups.

    I apologize if this doesn't fit this sub, but I couldn't find another active sub that would be more appropriate. I read the FAQs and guidelines and it seems that my question may be okay. Thanks!

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

    No comments:

    Post a Comment