As of: March 2021
$ git push
Username for...
Password for...
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 2 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 52.51 MiB | 1.79 MiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
remote: warning: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: warning: See http://git.io/iEPt8g for more information.
remote: warning: File Aurélien Géron - Hands-On ML.pdf is 54.00 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
To https://github.com/...
d-0..e-b main -> main
Note that it is warning above and the file larger than 50 MB (of size 54 MB) did get stored.
Now the actual error that appears when we try a file above 100 MB
$ git push
Username for ...
Password for ...
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 2 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 496.30 MiB | 3.34 MiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: ee6354b20640d5e4827787bca87a59fa6daee92f16caf2847e096c5485dd612a
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File xyz.tgz is 510.11 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/${username}/${repo_name}.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/${username}/${repo_name}.git'
Pages
- Index of Lessons in Technology
- Index of Book Summaries
- Index of Book Lists And Downloads
- Index For Job Interviews Preparation
- Index of "Algorithms: Design and Analysis"
- Python Course (Index)
- Data Analytics Course (Index)
- Index of Machine Learning
- Postings Index
- Index of BITS WILP Exam Papers and Content
- Lessons in Investing
- Index of Math Lessons
- Downloads
- Index of Management Lessons
- Book Requests
- Index of English Lessons
- Index of Medicines
- Index of Quizzes (Educational)
Saturday, March 13, 2021
Issue with storing large files in GitHub
Friday, March 12, 2021
Facebook's MFA Settings
URL for Facebook settings: % Facebook Settings % FB Security Settings Facebook also provides a way to: "Check your important security settings" URL: https://www.facebook.com/privacy/review/?review_id=5 Note the "review_id" parameter above. This is like a random number (not sure right now). The basic information "Facebook" tells about the two-factor authentication: Add an extra layer of security to your account If you turn on two-factor authentication, we'll ask for a code if we see an attempted login from an unrecognised device or browser. Security tips: • You can set this up via SMS or an authentication app on more than one device • You can't reset your password with a phone number used for two-factor authentication. Make sure that you have at least one other up-to-date email address or phone number on your account. Secure your account with two-factor authentication Add extra security to your account each time you log in on a phone or computer we don't recognise. Extra protection: We'll ask for your password and then a login code any time we notice an unusual login. Choose a security method: We'll send a text message with a login code, or you can use a security app of your choice. Select a security method Whenever you log in from a phone or computer that we do not recognise, we'll ask for your password and a login code. Authentication app: Use an app such as Google Authenticator or Duo Mobile to generate verification codes for more protection. Text message (SMS): Use text messages (SMS) to receive verification codes. For your protection, phone numbers used for two-factor authentication can't be used to reset your password when two-factor authentication is on. Two-factor authentication is on Phn number: +91 ********** We'll send a verification code to this number if we notice an attempted login from a device or browser that we don't recognise. For added protection, this number can't be used to reset your password when two-factor authentication is on. Some screenshots Activate Text Messaging on FB FB Security Settings MFA (2FA) Authentication Form Reset your password via email Text Messaging Settings on FB Tags: Technology,Cyber Security,
Command 'git status'
1. "git status" to check if files need to be 'added'
$ git status
On branch main
Your branch is up to date with 'origin/main'.
Untracked files:
(use "git add [file]..." to include in what will be committed)
xyz_book.pdf
nothing added to commit but untracked files present (use "git add" to track)
$ git add -A
2. "git status" to tell if files need to be 'committed'.
$ git status
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged [file]..." to unstage)
new file: xyz_book.pdf
$ git commit -m "cmt"
[main d...0] cmt
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 xyz_book.pdf
3. "git status" to tell if files need to be 'pushed'.
$ git status
On branch main
Your branch is ahead of 'origin/main' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
4. Finally, the "git push"
$ git push
Username for...
Password for...
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 2 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 5.05 MiB | 54.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To ...
f...0 main -> main
$ git push
Username for 'https://github.com': ^C
$ uname -a
Linux master 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ uname
Linux
Note: On our system, it is not automatically saving the credentials.
Tags: Technology,GitHub,
Thursday, March 11, 2021
Sending emails using Python
Python packages to send emails This is not an exhaustive list and we are not covering any of these in detail. 1. smtplib 2. yagmail [Ref: stackoverflow] 3. From Google: 'googleapiclient', 'google_auth_oauthlib', 'google.auth.transport.requests' and (this is not from Google) email (as in from email.mime.text import MIMEText) Ref: developers.google.com 4. 'email' as in: from email.message import EmailMessage from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.parser import BytesParser, Parser from email.policy import default from email import encoders 5. win32com As in: import win32com.client as win32 outlook=win32.Dispatch('outlook.application')" 6. sendgrid Ref: realpython - - - 1. smtplib This webpage has a very clear and basic code snippet for sending an email: https://www.tutorialspoint.com/python/python_sending_email.htm With this package, you have to provide the server details as in this line of code: smtpObj = smtplib.SMTP('localhost') Or as in here: # creates SMTP session s = smtplib.SMTP('smtp.gmail.com', 587) # 587 is port. Or server = smtplib.SMTP('smtp.gmail.com:587') An Example def send_email_gmail(subject, message, destination): # First assemble the message msg = MIMEText(message, 'plain') msg['Subject'] = subject # Login and send the message port = 587 my_mail = 'my_mail@hotmail.com' my_password = 'my_password' with smtplib.SMTP('smtp-mail.outlook.com', port) as server: server.starttls() server.login(my_mail, my_password) server.sendmail(my_mail, destination, msg.as_string()) SENDING MAIL VIA SSL import smtplib, ssl from email.mime.text import MIMEText def send_email(subject, message, destination): # First assemble the message msg = MIMEText(message, 'plain') msg['Subject'] = subject # Login and send the message port = 465 my_mail = 'me@gmail.com' my_password = 'me' context = ssl.create_default_context() with smtplib.SMTP_SSL('smtp.gmail.com', port, context=context) as server: server.login(my_mail, my_password) server.sendmail(my_mail, destination, msg.as_string()) send_email('Test subject', 'This is the message', 'to_email@email.com') Ref: stackoverflow Reference URLs 1. docs.python.org 2. developers.google.com 3. stackoverflow Tags: Technology,Python,
Tuesday, March 9, 2021
YahooMail's MFA (Multifactor Authentication) Settings
Add two-step verification for extra security Enable two-step verification to require a code (in addition to your password) any time a login attempt is made from a new device or browser. We'll send you a text or call you with a new code that needs to be entered at sign in. The phone number we contact you with may be different each time. 1. Sign in and go to your Account security page. 2. Beside the "Two-step verification," click the Toggle button to turn it on Image of the toggle button set to the "On" position. 3. Enter your mobile number. 4. Click Send SMS or Call me to get a verification code. 5. Enter the verification code, then click Verify. 6. If you access Yahoo Mail in third-party apps, click Create app passwords or click Skip for now. 2-step verification using a security key The security key is a physical authentication device that can use Bluetooth or plug directly into your device’s USB or Lightning port. When enabled as a 2-step verification method, it can help prevent malicious sign-ins by giving you additional control over your account. How to sign in with a security key Step 1: You’ll need to verify with a password or code. Step 2: In addition, you’ll need to connect your security key to your device and tap on it to verify. Add at least 2 alternative contact methods to enable your security key When you add a backup contact method such as an alternative email address or mobile number, we can help you sign in if you forget your password or don't have access to your security key. Note: One issue is Yahoo lets you setup MFA either via 'Security Key' or 'via Phone'. Use Messenger to recover your account Note: 'Messenger' is the Facebook messenger application. MFA using Phone or Email Email address is the alternate email address set in Yahoo Security Settings. YahooMail lets you to sign in with Google Account Title: YahooMail's MFA (Multifactor Authentication) Settings Tags: Technology, Cyber Security
Sunday, March 7, 2021
AI and the disciplines it borrows ideas from
Disciplines From Which The Field of AI Borrows Ideas 2.1. Philosophy a. Can formal rules be used to draw valid conclusions? b. How does the mind arise from a physical brain? c. Where does knowledge come from? d. How does knowledge lead to action? 2.1.A. Concepts borrowed from “Philosophy” Rationalism: The mind operates, at least in part, according to logical rules, and to build physical systems that emulate some of those rules; it’s another to say that the mind itself is such a physical system. - Rene Descartes (1596–1650) Dualism: There is a part of the human mind (or soul or spirit) that is outside of nature, exempt from physical laws. Animals, on the other hand, did not possess this dual quality; they could be treated as machines. Materialism: The brain operates according to the laws of physics that constitute the mind. Free will is simply the way that the perception of available choices appears to the choosing entity. Empiricism: “Nothing is in the understanding, which was not first in the senses.” - John Locke (1632–1704) Induction: General rules are acquired by exposure to repeated associations between their elements. Confirmation Theory: Carnap and Carl Hempel (1905–1997) attempted to analyze the acquisition of knowledge from experience. 2.2. Mathematics • What are the formal rules to draw valid conclusions? • What can be computed? • How do we reason with uncertain information? 2.2.A. Concepts Borrowed From “Mathematics” # Algorithm: The important step after determining the importance of logic and computation was “to determine the limits of what could be done with logic and computation.” The first nontrivial algorithm is thought to be Euclid’s algorithm for computing greatest common divisors. (Note: An algorithm is a set of instructions designed to perform a specific task.) # Incompleteness Theorem: Incompleteness theorem showed that in any formal theory as strong as Peano arithmetic (the elementary theory of natural numbers), there are true statements that are undecidable in the sense that they have no proof within the theory. (Giuseppe Peano, 1858 – 1932) [Ref: 1, 2, 3] # Computable: This fundamental result (of Incompleteness Theorem) can also be interpreted as showing that some functions on the integers cannot be represented by an algorithm—that is, they cannot be computed. This motivated Alan Turing (1912–1954) to try to characterize exactly which functions are computable—capable of being computed. (For example, no machine can tell in general whether a given program will return an answer on a given input or run forever.) [Ref 4] # Tractability: Roughly speaking, a problem is called intractable if the time required to solve instances of the problem grows exponentially with the size of the instances. It is important because exponential growth means that even moderately large instances cannot be solved in any reasonable time. Therefore, one should strive to divide the overall problem of generating intelligent behavior into tractable subproblems rather than intractable ones. (Cobham, 1964; Edmonds, 1965). # NP-Completeness: How can one recognize an intractable problem? The theory of NP-completeness, pioneered by Steven Cook (1971) and Richard Karp (1972), provides a method. Cook and Karp showed the existence of large classes of canonical combinatorial search and reasoning problems that are NP-complete. Any problem class to which the class of NP-complete problems can be reduced is likely to be intractable. (See more in Ref 5) # Probability: Tell you how to deal with uncertain measurements and incomplete theories and underlies modern approaches to uncertain reasoning in AI systems. Peano's Axioms 1. Zero is a number. 2. If “a” is a number, the successor of “a” is a number. 3. zero is not the successor of a number. 4. Two numbers of which the successors are equal are themselves equal. 5. (induction axiom) If a set S of numbers contains zero and also the successor of every number in S, then every number is in S. Peano's axioms are the basis for the version of “number theory” known as “Peano arithmetic”. Ref 1 In layman's terms: Any axiomatic system which is capable of arithmetic is either incomplete or inconsistent. An incomplete system is the one in which there are theorems which may be true but cannot be proven. An inconsistent system, on the other hand, is the one in which there are contradictions. However, if we do not want contradictions, every axiomatic system which is capable of arithmetic must be incomplete. Moreover, a "stronger" result is due to Turing, who showed that the process of finding theorems that cannot be proven is undecidable. In general, a problem is undecidable if there exists no algorithm that, in finite time, will lead to a correct yes-or-no answer. In this case, the problem is undecidable because there is no algorithm that, in finite time, will tell you whether the theorem you want to prove can be proven. Note that the proof of Godel's Theorem is essentially a sophisticated Liar's Paradox, and the proof of Turing's Theorem uses Cantor's diagonal argument. Ref 2 Explanation of "incompleteness theorem": Choose Two: % Complete % Consistent % Non-trivial This is more of a wave in the direction of the meaning, but its what is generally remembered, knowing that I can look up the exact definition as required. Complete: A system is complete if anything that can be stated, can be proved (within the system). Consistent: A system is consistent if you can never prove a statement and its opposite. Non-trivial: A system is non-trivial is it can be used for arithmetic calculations. For example: First Order Logic (aka Propositional Logic), is trivial, this means it can be both complete and consistent. Ref 3 Computability Theory This means that we do not worry about time and space efficiency of the algorithms. We just wonder whether there exists an algorithm. Computability theory is interesting for its negative results, if there is no algorithm at all, there is definitely no practical algorithm that works for all instances. Ref 4 NP-Completeness An NP problem is an algorithmic problem such that if you have a case of the problem of size ‘n’, the number of steps needed to check the answer is smaller than the value of some polynomial in ‘n’. It doesn't mean one can find an answer in the polynomial number of steps, only check it. An NP-complete problem is an NP problem such that if one could find answers to that problem in polynomial number of steps, one could also find answers to all NP problems in polynomial number of steps. This makes NP-complete decision problems the hardest problems in NP (they are NP-hard). People spent lots of time looking for algorithms that finds answers to some NP-complete problem in polynomial number of steps, but have not found any. Because of this, if someone shows a problem to be NP-complete, it is not likely that there is an algorithm solving it in polynomial number of steps. Ref 5 2.3. Economics • How should we make decisions so as to maximize payoff? • How should we do this when others may not go along? • How should we do this when the payoff may be far in the future? 2.3.A Concepts Borrowed From “Economics” # Utility: Most people think of economics as being about money, but economists will say that they are really studying how people make choices that lead to preferred outcomes. When McDonald’s offers a hamburger for a dollar, they are asserting that they would prefer the dollar and hoping that customers will prefer the hamburger. The mathematical treatment of “preferred outcomes” or utility was first formalized by Leon Walras (pronounced “Valrasse”) (1834-1910) and was improved by Frank Ramsey (1931) and later by John von Neumann and Oskar Morgenstern in their book The Theory of Games and Economic Behavior (1944). # Decision Theory: Decision theory, which combines probability theory with utility theory, provides a formal and complete framework for decisions (economic or otherwise) made under uncertainty—that is, in cases where probabilistic descriptions appropriately capture the decision maker’s environment. This is suitable for “large” economies where each agent need pay no attention to the actions of other agents as individuals. For “small” economies, the situation is much more like a game: the actions of one player can significantly affect the utility of another (either positively or negatively). # Game Theory: For some games, a rational agent should adopt policies that are (or least appear to be) randomized. Unlike decision theory, game theory does not offer an unambiguous prescription for selecting actions. # Operations Research: For the most part, economists did not address the third question listed above, namely, how to make rational decisions when payoffs from actions are not immediate but instead result from several actions taken in sequence. This topic was pursued in the field of operations research, which emerged in World War II from efforts in Britain to optimize radar installations, and later found civilian applications in complex management decisions. # Satisficing: The pioneering AI researcher Herbert Simon (1916–2001) won the Nobel Prize in economics in 1978 for his early work showing that models based on satisficing—making decisions that are “good enough,” rather than laboriously calculating an optimal decision—gave a better description of actual human behavior (Simon, 1947). 2.4. Neuroscience # How do brains process information? 2.4.A. Concepts borrowed from Neuroscience # Neuroscience: Neuroscience is the study of the nervous system, particularly the brain. Although the exact way in which the brain enables thought is one of the great mysteries of science, the fact that it does enable thought has been appreciated for thousands of years because of the evidence that strong blows to the head can lead to mental incapacitation. # Neuron: 1873: Camillo Golgi (1843–1926) developed a staining technique allowing the observation of individual neurons in the brain. 1936-1938: Nicolas Rashevsky was the first to apply mathematical models to the study of the nervous system. # Singularity: Point in time at which computers reach a superhuman level of performance. 2.5. Psychology • How do humans and animals think and act? 2.5.A. Concepts Borrowed From “Psychology” # Behaviorism Behaviorism, also known as behavioral psychology, is a theory of learning based on the idea that all behaviors are acquired through conditioning. Conditioning occurs through interaction with the environment. Behaviorists believe that our responses to environmental stimuli shape our actions. # Cognitive Psychology Cognitive psychology the brain as an information-processing device. Cognitive psychology is the scientific study of the mind as an information processor. Cognitive psychologists try to build up cognitive models of the information processing that goes on inside people's minds, including perception, attention, language, memory, thinking, and consciousness. 2.6 Computer engineering • How can we build an efficient computer? For artificial intelligence to succeed, we need two things: intelligence and an artifact. The computer has been the artifact of choice. 2.7 Control theory and cybernetics • How can artifacts operate under their own control? 2.7.A. Concepts borrowed from “Control Theory” # Control Theory Control theory deals with the control of dynamical systems in engineered processes and machines. The objective is to develop a model or algorithm governing the application of system inputs to drive the system to a desired state, while minimizing any delay, overshoot, or steady-state error and ensuring a level of control stability; often with the aim to achieve a degree of optimality. Ref: 1. Dynamical System 2. Stability Theory 3. Optimal Control # Cybernetics Cybernetics is a transdisciplinary approach for exploring regulatory and purposive systems—their structures, constraints, and possibilities. The core concept of the discipline is circular causality or feedback—that is, where the outcomes of actions are taken as inputs for further action. Cybernetics is concerned with such processes however they are embodied, including in environmental, technological, biological, cognitive, and social systems, and in the context of practical activities such as designing, learning, managing, and conversation. # Homeostatic Ashby’s “Design for a Brain” (1948, 1952) elaborated on his idea that intelligence could be created by the use of homeostatic devices containing appropriate feedback loops to achieve stable adaptive behavior. Homeostasis is any self-regulating process by which an organism tends to maintain stability while adjusting to conditions that are best for its survival. If homeostasis is successful, life continues; if it's unsuccessful, it results in a disaster or death of the organism. # Objective Function The objective function is a means to maximize (or minimize) something. This something is a numeric value. In the real world it could be the cost of a project, a production quantity, profit value, or even materials saved from a streamlined process. With the objective function, you are trying to arrive at a target for output, profit, resource use, etc. 2.8. Linguistics • How does language relate to thought? 2.8.A. Concepts borrowed from “Linguists” Modern linguistics and AI were “born” at about the same time, and grew up together, intersecting in a hybrid field called “computational linguistics” or “natural language processing”. The problem of understanding language soon turned out to be considerably more complex than it seemed in 1957. Understanding language requires an understanding of the subject matter and context, not just an understanding of the structure of sentences. This might seem obvious, but it was not widely appreciated until the 1960s. Much of the early work in knowledge representation (the study of how to put knowledge into a form that a computer can reason with) was tied to language and informed by research in linguistics, which was connected in turn to decades of work on the philosophical analysis of language. Title: AI and the disciplines it borrows ideas from Tags: Artificial Intelligence,Technology,Machine Learning,Deep Learning,
Friday, March 5, 2021
Microsoft Outlook's MFA Setup
Go to the Security basics page and sign in with your Microsoft account. https://account.microsoft.com/security Link to detailed "security settings": 1. security settings - proofs 2. security settings - manage 3. security settings - additional Article 1: Turn two-step verification on or off [Dated: March 5, 2021] 1. Go to the Security basics page and sign in with your Microsoft account. 2. Select More security options. 3. Under Two-step verification, choose Set up two-step verification to turn it on, or choose Turn off two-step verification to turn it off. 4. Follow the instructions. 5. Note: As part of setting up this account, you’ll be given a QR code to scan with your device; this is one way we ensure you are in physical possession of the device you are installing the Authenticator app to. Article 2: Set up two-step verification [Dated: March 5, 2021] Two-step verification adds an extra layer of protection to your account. After you've turned it on, we'll ask you to enter an additional security code when you sign in. We'll provide this security code only to you. In the following steps, we'll help you: 1. Make sure you have up-to-date security info where you can receive security codes. 2. Set up an authenticator app if you have a smartphone. (With an authenticator app, you can get security codes even if your phone isn't connected to a cellular network.) 3. Print or write down your recovery code. 4. Create app passwords for apps and devices (such as Xbox 360, Windows Phone 8 (or earlier), or mail apps on your other devices) that don't support two-step verification codes. Some screenshots 1: Verification of phone number by providing last four digits 2: Microsoft provides a smart phone app to let you sign in without the password. 3: Second way to identify your identity Note: You can't reuse an already provided mail ID or phone number because that would not provide an additional way to identify you. It provides three options that you can use: Authenticator App, Mail ID, Phone Number. 4: Two ways to identify the identity (via text or mail) Tags: Technology,Cyber Security,
Thursday, March 4, 2021
Google's Security Features for Google Account Users
You can view your Google Account's Security Settings at the URL: https://myaccount.google.com/security 1: Automatically delete web and app history 2: Automatically delete location history 3: Automatically delete YouTube history 4: Inactive Account Manager 5: Review settings for face grouping 6: Review your ad settings 7: Recent Security Activity: It does not show the location such as Chandigarh or Mohali by default and only shows the country. 8: Info on 2-Step Verification Multi-factor authentication is known as '2-Step Verification' on Google. 9: Google Notification, Security Key, Text Message, Voice Call 10: 2-Step Verification Backup Option 11: 2-Step Verification Settings Summary 12: Additional Backup and Optional Sign-in Steps SAVE YOUR BACKUP CODES: Keep these backup codes somewhere safe but accessible. 13: Device Activity URL: https://myaccount.google.com/device-activity 14: Devices where signed in and signed out 15: 6 Point Security Check-up 16: Concurrent Session Details Retrieved From GMail 17: You would get the location of your city in the Google App in your phone when the 2-Step Notification would come. 18: 2-Step Verfication When Phone is Offline 19: Sign-in using Google's offline security code Dated: March 5, 2021 Tags: Technology,Cyber Security,
Wednesday, March 3, 2021
List of Books on Surveillance (Mar 2021)
1. The Age of Surveillance Capitalism Book by Shoshana Zuboff 4 October 2018 2. Surveillance Tradecraft: The Professional's Guide ... Book by Peter Jenkins 3. Surveillance Valley: The Secret Military History of the Internet Book by Yasha Levine 6 February 2018 4. No Place to Hide: Edward Snowden, the NSA, and the U.S. Surveillance State Book by Glenn Greenwald 13 May 2014 5. Permanent Record Book by Edward Snowden 17 September 2019 6. We Have Been Harmonized: Life in China's Surveillance State Book by Kai Strittmatter 15 October 2018 7. Dark Mirror: Edward Snowden and the American Surveillance State Book by Barton Gellman May 2020 8. Surveillance Countermeasures: A Serious Guide To ... March 1994 Genre: True crime 9. The Watchers: The Rise of America's Surveillance State Book by Shane Harris 22 February 2010 10. Theorizing Surveillance Originally published: 2006 Editor: David Lyon 11. Little Brother Novel by Cory Doctorow 29 April 2008 12. Data and Goliath: The Hidden Battles to Collect Your Data and Control Your World Book by Bruce Schneier March 2015 13. Advanced Surveillance: The Complete Manual of ... Book by Peter Jenkins 14. Surveillance Studies: An Overview Book by David Lyon 30 July 2007 15. Discipline and Punish Book by Michel Foucault 1975 Subjects: Prisons; Prison discipline; Punishment 16. Surveillance: A Concept of the Art Book by Eddie Cruz 23 March 2017 17. Cypherpunks Book by Julian Assange November 2012 18. Digital Video Surveillance and Security Book by Tony Caputo December 2009 Genre: Dissertation 19. Surveillance Detection: The Art of Prevention Book by Laura Clark and William E. Algaier February 2007 20. Surveillance Zone: The Hidden World of Corporate ... Book by Ami Toben 21 May 2017 21. Reset: Reclaiming the Internet for Civil Society Book by Ronald Deibert 29 September 2020 22. Captivating Technology: Race, Carceral Technoscience, and Liberatory Imagination in Everyday Life Book 7 June 2019 Editor: Ruha Benjamin 23. Dark Matters: On the Surveillance of Blackness Book by Simone Browne 7 September 2015 24. Surveillance Novel by Jonathan Raban Originally published: 2006 25. Shadow Government: Surveillance, Secret Wars, and a Global Security State in a Single-Superpower World Book by Tom Engelhardt Originally published: 2014 26. Under Surveillance: Being Watched in Modern America Book by Randolph Lewis Originally published: November 2017 27. Everyday Surveillance Book by William G Staples Originally published: 15 November 2000 Genre: Dissertation 28. Undercover: Police Surveillance in America Book by Gary T. Marx Originally published: 1988 29. Surveillance, Privacy and Security: Citizens’ Perspectives Originally published: 2017 Editors: Rocco Bellanova, Johann Čas, Walter Peissl, Michael Friedewald, J. Peter Burgess 30. The Circle Novel by Dave Eggers Originally published: 8 October 2013 Author: Dave Eggers Adaptations: The Circle (2017) Publisher: Alfred A. Knopf Original language: English Genres: Novel, Science Fiction, Thriller, Dystopian Fiction 31. Surveillance Countermeasures: The Professional's Guide to Countering Hostile Surveillance Threats Book by Aden C. Magee Originally published: 13 June 2019 Author: Aden C. Magee 32. The Snowden Files Book by Luke Harding Originally published: 2014 Author: Luke Harding Adaptations: Snowden (2016) Publisher: Vintage Books ISBN: 9780804173520 Genres: Biography, True crime 33. The Shadow Factory Book by James Bamford Originally published: 1 January 2008 Author: James Bamford Publisher: Doubleday Genres: Biography, Autobiography, True crime Subjects: September 11 attacks, War on terror 34. Surveillance Society Book by David Lyon Originally published: February 2001 Author: David Lyon Editor: David Lyon 35. Fundamentals of Physical Surveillance: A Guide for Uniformed and Plainclothes Personnel Book by Raymond P Siljander Originally published: 1977 Author: Raymond P Siljander 36. Surveillance, Privacy and Public Space Originally published: 2018 Editors: Bryce Clayton Newell, Tjerk Timan, Bert-Jaap Koops 37. Electronic Surveillance Devices Book by Paul Brookes Originally published: 1996 Author: Paul Brookes People also search for: The Illustrated History of Hugar Models, MORE 38. CCTV Surveillance: Video Practices and Technology Book by Herman Kruegle Originally published: November 1994 Author: Herman Kruegle 39. Surveillance and Space Book by Francisco Klauser Originally published: 5 December 2016 Author: Francisco Klauser 40. The Ethics of Surveillance: An Introduction Book by Kevin Macnish Originally published: 27 July 2017 Author: Kevin Macnish 41. Routledge Handbook of Surveillance Studies Originally published: 2012 Editors: David Lyon, Kirstie Ball, Kevin Haggerty 42. Spying with maps Book by Mark Monmonier Originally published: 15 November 2002 Author: Mark Monmonier 43. Snowden Book by Ted Rall Originally published: 2015 Author: Ted Rall Illustrator: Ted Rall Genres: Comics, Graphic novel, Biography, True crime, Non-fiction comics 44. I Am No One Novel by Patrick Flanery Originally published: 4 February 2016 Author: Patrick Flanery Genres: Mystery, Thriller, Suspense, Political fiction 45. They're Watching Book by Gregg Hurwitz Originally published: 2009 Author: Gregg Hurwitz Genres: Thriller, Suspense, Mystery, Psychological Fiction 46. Windows Into the Soul: Surveillance and Society in an Age of High Technology Book by Gary T. Marx Originally published: 31 May 2016 Author: Gary T. Marx 47. Surveillance Studies: A Reader Originally published: 2018 Editors: David Murakami Wood, Torin Monahan 48. The Official CIA Manual of Trickery and Deception Book by Harold Keith Melton and Robert Wallace Originally published: 2009 Authors: Robert Wallace, Harold Keith Melton Genre: Reference work 49. Surveillance and Democracy Originally published: 2010 Editors: Minas Samatas, Kevin Haggerty 50. The Surveillance Web Book by Michael McCahill Originally published: May 2002 Author: Michael McCahill 51. Surveillance as Social Sorting: Privacy, Risk and Automated Discrimination Originally published: 24 October 2002 Editor: David Lyon Google Search String: surveillance books Tags: List of Books,Technology,Cyber Security,
Wednesday, February 24, 2021
Python 2, python 3, base64, string and bytes
CONVERTING BACK AND FORTH BETWEEN STRING AND BYTES: >>> s = 'hello' >>> s.encode() b'hello' >>> b = s.encode() >>> b.decode() 'hello' >>> --- --- --- $ conda create --name py2 python=2 (base) ~/Desktop$ conda activate py2 By default, 'python' command runs Python 3. (py2) ~/Desktop$ python Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> exit() (py2) ~/Desktop$ python2 Python 2.7.18 |Anaconda, Inc.| (default, Apr 23 2020, 22:42:48) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import requests Traceback (most recent call last): File "[stdin]", line 1, in [module] ImportError: No module named requests >>> --- --- --- (py2) ~/Desktop$ pip install requests DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting requests Using cached https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl Collecting chardet<5,>=3.0.2 Using cached https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl Collecting urllib3<1.27,>=1.21.1 Using cached https://files.pythonhosted.org/packages/23/fc/8a49991f7905261f9ca9df5aa9b58363c3c821ce3e7f671895442b7100f2/urllib3-1.26.3-py2.py3-none-any.whl Collecting idna<3,>=2.5 Using cached https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl Requirement already satisfied: certifi>=2017.4.17 in /home/administrator/anaconda3/envs/py2/lib/python2.7/site-packages (from requests) (2020.6.20) Installing collected packages: chardet, urllib3, idna, requests Successfully installed chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.3 --- --- --- With Python 2 (py2) ~/Desktop$ python2 Python 2.7.18 |Anaconda, Inc.| (default, Apr 23 2020, 22:42:48) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> from base64 import b64encode as b >>> b('hello') 'aGVsbG8=' >>> --- --- --- With Python 3 (py2) ~/Desktop$ python Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from base64 import b64encode as b >>> b('hello') Traceback (most recent call last): File "[stdin]", line 1, in [module] File "/usr/lib/python3.8/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) TypeError: a bytes-like object is required, not 'str' >>> b('hello'.encode()) b'aGVsbG8=' >>> b('hello'.encode()).decode() 'aGVsbG8=' >>> --- --- ---Tags: Technology,Python,
Tuesday, February 23, 2021
HTTP Error Codes and REST APIs
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes: 1. Informational responses (100–199) 2. Successful responses (200–299) 3. Redirects (300–399) 4. Client errors (400–499) 5. Server errors (500–599) If you receive a response that is not in this list, it is a non-standard response, possibly custom to the server's software. Ref: developer.mozilla.org All HTTP response status codes are separated into five classes or categories. The first digit of the status code defines the class of response, while the last two digits do not have any classifying or categorization role. There are five classes defined by the standard: 1xx informational response – the request was received, continuing process 2xx successful – the request was successfully received, understood, and accepted 3xx redirection – further action needs to be taken in order to complete the request 4xx client error – the request contains bad syntax or cannot be fulfilled 5xx server error – the server failed to fulfil an apparently valid request Ref: en.wikipedia.org Some common error codes one must know: 401 Unauthorized Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. 403 Forbidden The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401, the client's identity is known to the server. 405 Method Not Allowed The request method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code. 415 Unsupported Media Type The media format of the requested data is not supported by the server, so the server is rejecting the request.Tags: Technology,Web Development,Web Scraping,RESTful API Response Codes (used by Amazon Drive API)
The HTTP Status Codes used by the RESTful Amazon Drive API. HTTP Status Code --- Description 200 OK --- Successful. 201 Created --- Created. Status code '201' is important for REST APIs that are performing some action such as raising a ticket or logging something. 400 Bad Request --- Bad input parameter. Error message should indicate which one and why. 401 Unauthorized --- The client passed in the invalid Auth token. Client should refresh the token and then try again. 403 Forbidden --- * Customer doesn’t exist. * Application not registered. * Application try to access to properties not belong to an App. * Application try to trash/purge root node. * Application try to update contentProperties. * Operation is blocked (for third-party apps). * Customer account over quota. 404 Not Found --- Resource not found. 405 Method Not Allowed --- The resource doesn't support the specified HTTP verb. 409 Conflict --- Conflict. 411 Length Required --- The Content-Length header was not specified. 412 Precondition Failed --- Precondition failed. 429 Too Many Requests --- Too many request for rate limiting. 500 Internal Server Error --- Servers are not working as expected. The request is probably valid but needs to be requested again later. 503 Service Unavailable --- Service Unavailable. Ref: developer.amazon.com (Dated: 24 Feb 2021) Additional Notes In Europe, the NotFound project, created by multiple European organizations including Missing Children Europe and Child Focus, encourages site operators to add a snippet of code to serve customized 404 error pages which provide data about missing children. Ref: HTTP 404
Revoking a GitHub session
To revoke existing sessins on GitHub, go to URL: https://github.com/settings/security There you will see your sessions at the bottom of the page as shown below: Click on "See More". On the right, you can see the "Revoke Session" button that you can use to revoke this session.Tags: Technology,GitHub,Cyber Security,
Subscribe to:
Comments (Atom)








































