everything everywhere
commit
d066861e31
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"legacyEditor": false,
|
||||
"livePreview": true,
|
||||
"fileSortOrder": "byCreatedTimeReverse",
|
||||
"promptDelete": false,
|
||||
"alwaysUpdateLinks": true
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"baseFontSize": 14
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
"obsidian-jupyter"
|
||||
]
|
|
@ -0,0 +1,14 @@
|
|||
[
|
||||
"file-explorer",
|
||||
"global-search",
|
||||
"switcher",
|
||||
"graph",
|
||||
"backlink",
|
||||
"page-preview",
|
||||
"note-composer",
|
||||
"command-palette",
|
||||
"editor-status",
|
||||
"markdown-importer",
|
||||
"word-count",
|
||||
"file-recovery"
|
||||
]
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"collapse-filter": true,
|
||||
"search": "",
|
||||
"showTags": false,
|
||||
"showAttachments": true,
|
||||
"hideUnresolved": false,
|
||||
"showOrphans": true,
|
||||
"collapse-color-groups": true,
|
||||
"colorGroups": [
|
||||
{
|
||||
"query": "",
|
||||
"color": {
|
||||
"a": 1,
|
||||
"rgb": 14701138
|
||||
}
|
||||
}
|
||||
],
|
||||
"collapse-display": true,
|
||||
"showArrow": true,
|
||||
"textFadeMultiplier": 1.3,
|
||||
"nodeSizeMultiplier": 1.61030790441176,
|
||||
"lineSizeMultiplier": 2.34958639705882,
|
||||
"collapse-forces": true,
|
||||
"centerStrength": 0.520772058823529,
|
||||
"repelStrength": 10,
|
||||
"linkStrength": 1,
|
||||
"linkDistance": 250,
|
||||
"scale": 0.9238331697563902,
|
||||
"close": false
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"author": "Till Hoffmann",
|
||||
"authorUrl": "https://github.com/tillahoffmann/obsidian-jupyter",
|
||||
"description": "This plugin allows code blocks to be executed as Jupyter notebooks.",
|
||||
"id": "obsidian-jupyter",
|
||||
"isDesktopOnly": true,
|
||||
"minAppVersion": "0.9.12",
|
||||
"name": "Jupyter plugin",
|
||||
"version": "0.8.1"
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
import argparse
|
||||
import sys
|
||||
from jupyter_client import KernelManager
|
||||
import nbformat
|
||||
from nbconvert import HTMLExporter
|
||||
from nbclient import NotebookClient
|
||||
from nbclient.exceptions import CellExecutionError
|
||||
import json
|
||||
import logging
|
||||
|
||||
|
||||
# Parse input arguments.
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('document_id')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Set up a logger that writes to stderr.
|
||||
logging.basicConfig(level='INFO')
|
||||
logger = logging.getLogger('obsidian-jupyter')
|
||||
logger.info('started server for document %s', args.document_id)
|
||||
|
||||
# Create a notebook and kernel.
|
||||
cell = nbformat.v4.new_code_cell()
|
||||
nb = nbformat.v4.new_notebook(cells=[cell])
|
||||
km = KernelManager()
|
||||
client = NotebookClient(nb, km)
|
||||
|
||||
try:
|
||||
# Respond to each request.
|
||||
for request in sys.stdin:
|
||||
# Load the request and generate a response with matching id.
|
||||
logger.info('received request: %s', request)
|
||||
request = json.loads(request)
|
||||
request_body = request['body']
|
||||
response = {
|
||||
'id': request['id'],
|
||||
}
|
||||
# Execute a cell.
|
||||
if request_body['command'] == 'execute':
|
||||
cell['source'] = request_body['source']
|
||||
try:
|
||||
nb = client.execute(nb)
|
||||
except CellExecutionError as ex:
|
||||
logger.info('cell failed to execute: %s', ex)
|
||||
html_exporter = HTMLExporter(template_name='basic')
|
||||
(response_body, resources) = html_exporter.from_notebook_node(nb)
|
||||
elif request_body['command'] == 'restart_kernel':
|
||||
km.restart_kernel()
|
||||
response_body = ''
|
||||
else:
|
||||
logger.error('unrecognised command: %s', request_body['command'])
|
||||
response_body = ''
|
||||
|
||||
# Pass the response back.
|
||||
response['body'] = response_body
|
||||
response = json.dumps(response)
|
||||
sys.stdout.write(response + '\n')
|
||||
logger.info('sent response: %s', response)
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
finally:
|
||||
# Clean up the kernel.
|
||||
if km.is_alive:
|
||||
logger.info('shutting down kernel...')
|
||||
km.shutdown_kernel()
|
||||
|
||||
logger.info('exiting...')
|
|
@ -0,0 +1,12 @@
|
|||
/* hide the output prompts of jupyter cells*/
|
||||
.obsidian-jupyter .prompt, .obsidian-jupyter .input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wideSettingsElement textarea, .wideSettingsElement input {
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
.setupScriptTextArea textarea {
|
||||
font-family: monospace;
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
"main": {
|
||||
"id": "275e54d6a308c5c2",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "5cdbcbcb75d4bb36",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "Computers/Mac OS X/BBEdit/BBEdit.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
},
|
||||
"left": {
|
||||
"id": "1c0293fe9409c18e",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "daa89a86d8216c5f",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "fad8001c0a9fdae3",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-explorer",
|
||||
"state": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "5110ddb142633b7e",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": true,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 136.5
|
||||
},
|
||||
"right": {
|
||||
"id": "9ad61fddd9987fc8",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "38f407691664dcad",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "719f427ad52bb2e6",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"file": "Computers/Mac OS X/BBEdit/BBEdit.md",
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": true,
|
||||
"unlinkedCollapsed": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300,
|
||||
"collapsed": true
|
||||
},
|
||||
"active": "fad8001c0a9fdae3",
|
||||
"lastOpenFiles": [
|
||||
"Computers/Mac OS X/BBEdit/List of language modules.md",
|
||||
"Computers/Mac OS X/BBEdit/plist.md",
|
||||
"Computers/Mac OS X/BBEdit/CLM.md",
|
||||
"Computers/Mac OS X/BBEdit/XML.md",
|
||||
"Computers/Mac OS X/BBEdit/Example CLM.md",
|
||||
"Computers/Quantum Realm/Technologies/Intro to Quantum Technologies.md",
|
||||
"Computers/Quantum Realm/Welcome to Quantum 101.md",
|
||||
"Computers/Quantum Realm/Mechanics & Math/Intro to Mechanics & Math.md",
|
||||
"Computers/Quantum Realm/Mechanics & Math/Quantum Formalism.md",
|
||||
"Computers/Quantum Realm/Algorithms/VOQC.md"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# Current Occupations
|
||||
Occupation is a good alternate word for jobs because these are certainly occupying my time at the moment rather heavily. Full-time at being a struggling human being though.
|
||||
|
||||
---
|
||||
|
||||
Obviously this gets edited with time & as life goes, but right now I am:
|
||||
|
||||
- President of Quantum Computing Club, Quantum Research Group at NYIT
|
||||
- Apparently I am [NYC NASA ](https://2022.spaceappschallenge.org/locations/new-york/)local lead for the global Space Apps hackathon
|
||||
- Director-at-Large of [Hack Manhattan ](https://hackmanhattan.com/)
|
|
@ -0,0 +1,23 @@
|
|||
# Quantum Research Group
|
||||
|
||||
Set up back in 2019-2020, I have to go back to making sure everything is all well with the club before school starts up again. You started it and you are President. Be responsible so that this stays a thriving organization for others at the very least.
|
||||
|
||||
---
|
||||
|
||||
## Information:
|
||||
- https://www.theqrg.org : currently inactive. And why? This is something that Justin already sent you the front end code for so it should be just a matter of paying for the dreamhost website and having it running. Get this up in the next week or so.
|
||||
|
||||
For now though, there is the public [Notion](https://www.notion.so/shwethajayaraj/The-Quantum-Research-Group-7150bc7f5d7e4ba384212a9816ce928b) page.
|
||||
|
||||
## Social Media
|
||||
Though we are a bit weak on our activity, at the very least we have a presence or rather an existence at best on several of the major social media platforms. Perhaps these deserve obsidian pages of their own at some point to better expand upon the details and distribution of information upon.
|
||||
|
||||
- [Instagram](https://www.instagram.com/theqrg/)
|
||||
- NYIT [instagram](https://www.instagram.com/nyitquantum/)
|
||||
- [Facebook](https://www.facebook.com/theqrg)
|
||||
- [Twitter](https://twitter.com/theqrg)
|
||||
- Youtube
|
||||
- NYIT hub
|
||||
- Discord
|
||||
- Eventually I think it will be important to be on LinkedIn similar to [BSU](https://www.linkedin.com/groups/14111563/)
|
||||
- Mailchimp
|
|
@ -0,0 +1,27 @@
|
|||
# The Quantum Research Group
|
||||
|
||||
Originating from the Innovation Labs at New York Institute of Technology, a group of 4 qc-interested engineering & comp sci students sit down to found NYIT's very first quantum computing club in 2019.
|
||||
|
||||
Desiring to expand their knowledge beyond the institution, The Quantum Research Group is a collective of students, professors, researchers, & industry experts across all disciplines in NYIT & New York City using an interdisciplinary lens to tackle the future's biggest & most exciting problems. This isn't just a computer science/engineering group, this is a group that needs everyone.
|
||||
|
||||
And, indeed, everyone will need quantum computers. :)
|
||||
|
||||
Come check us out!
|
||||
|
||||
[NYC'S Research Collective for Quantum Computing](https://theqrg.org)
|
||||
|
||||
Read more here at [Quantum Papers](The%20Quantum%20Research%20Group%207150bc7f5d7e4ba384212a9816ce928b/Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1.md) :
|
||||
|
||||
Want to learn more > get to googling! Or read through our attempt to collect nearly every possible QC related resource searched by our very own corgie Queen.
|
||||
|
||||
Who's our mascot? : A corgi named Queen - a gender non-binary pup.
|
||||
|
||||
|
||||
|
||||
![The%20Quantum%20Research%20Group%207150bc7f5d7e4ba384212a9816ce928b/Untitled.png](Untitled.png)
|
||||
|
||||
### Check out what’s coming up for NYIT Quantum Computing Club ~
|
||||
|
||||
[Quantum Calendar (general) ](The%20Quantum%20Research%20Group%207150bc7f5d7e4ba384212a9816ce928b/Quantum%20Calendar%20(general)%209bcc9aec5f54408fa840a090fb6a1bf6.csv)
|
||||
|
||||
[Quantum Papers](The%20Quantum%20Research%20Group%207150bc7f5d7e4ba384212a9816ce928b/Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1.md)
|
|
@ -0,0 +1,2 @@
|
|||
Name,Date,Property,Property 1,Property 2,Tags
|
||||
SGA Senate Meetings,"February 11, 2022",,,,
|
|
|
@ -0,0 +1,3 @@
|
|||
# SGA Senate Meetings
|
||||
|
||||
Date: February 11, 2022
|
|
@ -0,0 +1,30 @@
|
|||
# Quantum Papers
|
||||
|
||||
By Shwetha Jayaraj
|
||||
|
||||
![Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/7ohP4GDMGPrVKxNbijdYKdEFPk8EPgGeuMyZkPMZq1FL4wBRzD1xeYFiqQLTyUQNR5Fs2fwZYw8seUnx9UhiZzSoWLXCNHcywUUm.gif](7ohP4GDMGPrVKxNbijdYKdEFPk8EPgGeuMyZkPMZq1FL4wBRzD1xeYFiqQLTyUQNR5Fs2fwZYw8seUnx9UhiZzSoWLXCNHcywUUm.gif)
|
||||
|
||||
> "We are in the universe and the universe is in us." - Neil Degrasse Tyson
|
||||
>
|
||||
|
||||
On the quest to learning more about the universe and improving humanity through scientific knowledge, I'll be accumulating notes and research on quantum computing here. I'll try to cover an ongoing knowledge base of quantum development, a history of what has already transpired to lead us to the exciting times in scientific discovery we have now, as well as the trials of quantum computing we have ahead.
|
||||
|
||||
Coming from a computer science background, I will ultimately be interested in programming applications effectively using quantum computation methods to optimize a plethora of issues in our society. This is truly an exciting area of research that I am beyond passionate to continue learning for! Let's get started:
|
||||
|
||||
[D-Wave's 2019 Recap](Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/D-Wave's%202019%20Recap%20a1fe36f9d3bc4ee6b2044e51b78e7e32.md)
|
||||
|
||||
[Menten AI](Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/Menten%20AI%206efaacbaea83459fafe1254649b82b1f.md)
|
||||
|
||||
[Quantum Error Correction - Notes](Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/Quantum%20Error%20Correction%20-%20Notes%20cd0549f4d3424fbd8df4eda4dd196e5c.md)
|
||||
|
||||
[Demonstrating Superposition ](Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/Demonstrating%20Superposition%2072b6d49984f3441aad128915b7349e32.md)
|
||||
|
||||
[Q-CTRL Tutorial ](Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/Q-CTRL%20Tutorial%20cb0c1e016ea849e281b2878cb7401dca.md)
|
||||
|
||||
[QPU Teleportation ](Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/QPU%20Teleportation%203fc3984bc42342c2a8c650b75452ab56.md)
|
||||
|
||||
[Learning Qiskit ](Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/Learning%20Qiskit%20a6cf9a98cc344279b607fe28a6c08e45.md)
|
||||
|
||||
[QURECA](Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/QURECA%20ddd35e9bdd2843bbacb547fbb90ec6c3.md)
|
||||
|
||||
[Quantum Qonvos. ](Quantum%20Papers%20dd45743c44324ec08c4becbe0f0611f1/Quantum%20Qonvos%20dc00c53b7a774b8cb216c2bdd4986d5f.md)
|
|
@ -0,0 +1,56 @@
|
|||
# D-Wave's 2019 Recap
|
||||
|
||||
D-Wave is one of the first quantum computing companies based in Canada to actively work on developing a quantum processing chip for future computation applications. In May 2019, they hosted a webinar that summarized their quantum developments up until that point. I've summarized some of their main takeaway points below.
|
||||
|
||||
![D-Wave's%202019%20Recap%20a1fe36f9d3bc4ee6b2044e51b78e7e32/ec2d906e-472e-41fe-b7fe-4c5dc257ae50-1552335402254.png](D-Wave's%202019%20Recap%20a1fe36f9d3bc4ee6b2044e51b78e7e32/ec2d906e-472e-41fe-b7fe-4c5dc257ae50-1552335402254.png)
|
||||
|
||||
## Simulating Physics with a Computer
|
||||
|
||||
So what is a **qubit**?
|
||||
|
||||
A qubit is not a physical thing in nature but rather a mathematical model. Essentially, anything that vibrates in nature acts as a harmonic oscillator function, or behaves as a wave. /include wave image here. A system with two energy levels is a qubit and their system of simulating these qubits is by creating a **superconducting** loop with two currents on either side. There's also the method for **trapped ion** chips to emulate qubit system as well that are being worked on.
|
||||
|
||||
There are even interesting developments to explore qubit systems through mapping topological matter which is done by braiding patterns of particles as they move though space & time.
|
||||
|
||||
Essentially, creating the physical qubit system is an engineering choice. This can be analagous to the classical computer being built through vacuum tubes. The qubit itself is a mathematical model of a simulated wave with two energy levels.
|
||||
|
||||
## Standard Model of Quantum Computing
|
||||
|
||||
Gate/Circuit Model
|
||||
|
||||
How do you read a circuit model?
|
||||
|
||||
- horizontal lines in the circuit model = the amount of qubits in the system
|
||||
- A system composed of multiple qubits thus explodes exponentially
|
||||
- if you have n qu bits —> vectors of 2^n
|
||||
|
||||
$$
|
||||
n qubits = 2^n vectors
|
||||
$$
|
||||
|
||||
Hence, the wave function of a nine qubits system would mean
|
||||
|
||||
$$
|
||||
2^9 = 512
|
||||
$$
|
||||
|
||||
Hence, each gate acts on this wav function as a unitary matrix of size 512 x 512. Next, these measurements projects the vector onto a subspace. In the end, 1 final vector is outputted and some measurements will be made on this.
|
||||
|
||||
Peter Shor made the discovery that factoring integers can be combines quickly with the Quantum Fourier Transform (QFT)
|
||||
|
||||
You can factor quickly and efficiently using Shor's Algorithm now! However, quantum theory was still abstract back in 1994 but theoretically, since modern computers use the difficulty of factoring for its encryption foundation, a key mathematical concept was introduced.
|
||||
|
||||
Quantum Computing now being researched heavily. However:
|
||||
|
||||
**Problem:** The waves & noise associated with quantum measurements
|
||||
|
||||
The *coherence property* of waves is leading many researchers into having issues with its stability.
|
||||
|
||||
Explanation: At it's highest or lowest points when two waves come together and interfere with each other, one of two things occur:
|
||||
|
||||
1. constructive interference: two interacting waves enforce each other
|
||||
2. destructive interference: two interacting waves destroy each other
|
||||
|
||||
In Shor's algorithm, this is still considered as numbers are accounted for to enforce or destroy. However, even still the issue of *noise* is still apparent in the waves.
|
||||
|
||||
Explanation: the analogy of an actual ocean wave can be considered. When several waves crash into each other, there will be many ripples. Hence if you add more ripples to waves, it is possible to swamp the waves entirely.
|
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
|
@ -0,0 +1,19 @@
|
|||
# Demonstrating Superposition
|
||||
|
||||
***Superposition**: A* fundamental principle of quantum mechanics. It states that, much like waves in classical physics, any two quantum states can be added together and the result will be another valid quantum state.
|
||||
|
||||
**The below diagram would be how a quantum computer solves a maze:**
|
||||
|
||||
![https://miro.medium.com/max/1400/1*2sGsPcxJ4yt_njulA6s9Hw.gif](https://miro.medium.com/max/1400/1*2sGsPcxJ4yt_njulA6s9Hw.gif)
|
||||
|
||||
**vs. its classical computer counterpart:**
|
||||
|
||||
![https://miro.medium.com/max/1400/1*hEaCmvyVfLhX0ETjM7Z7aQ.gif](https://miro.medium.com/max/1400/1*hEaCmvyVfLhX0ETjM7Z7aQ.gif)
|
||||
|
||||
# **How does this work?**
|
||||
|
||||
This machine works based on the presence or absence of the clicks caused by the rotation of these mechanical levers. Although we have moved on from mechanical levers to digital bits, the same concept still governs all our computing efforts. The concept of **qubit** can easily be explained by saying that it can be 0 and 1 at the same time. But in the mechanical case, having a click and having no click at the same time, seems like an absurd case to make. This is the reason why even researchers working on Quantum Technology are not able to fully visualize it’s power and capabilities.
|
||||
|
||||
However, let us try to make some sense of the situation here. In any way, computing power directly correlates to the number of computational states which exists at the same time. Let’s take the example of navigating a maze. When considering that a quantum particle is going through this maze, remember that a quantum particle has the unique property of being at 2 places at the same time due to the principle of quantum superposition. So when a quantum particle encounters various paths to take within the maze, it can decide to take all of those paths at the same time using superposition.
|
||||
|
||||
If you think about it, this process closely resembles the paradigm of parallel computing. Due to quantum *superposition*, the quantum particle is able to navigate the maze in exponentially less time than the classical bit.
|
|
@ -0,0 +1,55 @@
|
|||
# Learning Qiskit
|
||||
|
||||
Sample Code & Getting Started
|
||||
|
||||
Step 1: Open up terminal and check for python 3.7+ or install python by following instructions.
|
||||
|
||||
```python
|
||||
#check which version of python you have
|
||||
python -V
|
||||
```
|
||||
|
||||
Step 2: Then install anaconda
|
||||
|
||||
```python
|
||||
brew cask install anaconda
|
||||
```
|
||||
|
||||
(you can check if it has finished installing by running "jupyter notebook" in the terminal)
|
||||
|
||||
Visit [here](https://medium.com/ayuth/install-anaconda-on-macos-with-homebrew-c94437d63a37)(MacOS) or [here](https://medium.com/@GalarnykMichael/install-python-on-mac-anaconda-ccd9f2014072)(Linux & Windows) if you are running into any issues.
|
||||
|
||||
Step 3:
|
||||
|
||||
**Topics:**
|
||||
|
||||
Visualization:
|
||||
|
||||
All visualizations found [here](https://nbviewer.jupyter.org/github/qutip/qutip-notebooks/blob/master/examples/visualization-exposition.ipynb)
|
||||
|
||||
```python
|
||||
%matplotlib inline
|
||||
import matplotlib,pyplot as plt
|
||||
import numpy as np
|
||||
from qutip import *
|
||||
|
||||
//Hinton
|
||||
rho = rand_dm(5)
|
||||
hinto(rho);
|
||||
|
||||
//Sphereplot
|
||||
theta = np.linspace(0, np.pi, 90)
|
||||
phi = np.linspace(0, 2 * np.pi, 60)
|
||||
sphereplot(theta, phi, orbital(theta, phi, basis(3, 0)));
|
||||
|
||||
//Matrix_histogram
|
||||
matrix_histogram(rho.full().real);
|
||||
matrix_histogram_complex(rho.full());
|
||||
|
||||
b = Bloch()
|
||||
b.add_vectors(expect(H.unit(), e_ops))
|
||||
b.add_points(result.expect, meth='1')
|
||||
b.make_sphere()
|
||||
```
|
||||
|
||||
Here's a list of all languages that are available for quantum programming:
|
|
@ -0,0 +1,30 @@
|
|||
# Menten AI
|
||||
|
||||
AI & Quantum-Powered Protein Design: Using D-Wave's Quantum Leap Application
|
||||
|
||||
2 Presentations:
|
||||
|
||||
1. Hans Melo
|
||||
2. Hassein
|
||||
|
||||
Proteins are little machine that can form chemical reactions in the form of enzymes.
|
||||
|
||||
There is a huge interest from the chemical and commercial industries to create better enzymes with commerical benefit.
|
||||
|
||||
![Menten%20AI%206efaacbaea83459fafe1254649b82b1f/Screen_Shot_2020-04-30_at_1.05.24_PM.png](Menten%20AI%206efaacbaea83459fafe1254649b82b1f/Screen_Shot_2020-04-30_at_1.05.24_PM.png)
|
||||
|
||||
# Current Protein Design is Limited
|
||||
|
||||
Most protein that occur naturally through evolution is a very small field to explore. However, directed evolution in enzymes allows us to go a bit outside the field of nature.
|
||||
|
||||
![Menten%20AI%206efaacbaea83459fafe1254649b82b1f/Screen_Shot_2020-04-30_at_1.07.59_PM.png](Menten%20AI%206efaacbaea83459fafe1254649b82b1f/Screen_Shot_2020-04-30_at_1.07.59_PM.png)
|
||||
|
||||
Menten AI argues that somewhere in that grey space is the future of vaccines, the future of medicine, and other helpful health. That is what can be done with computational methods that currently exist as well future methods related to quantum engineering. It is only within the last 5-10 years that designing proteins on the computer could even be possible. Of all the proteins that were tested, it is only a small fraction of these that were ever successful. For the most part, he claims that this is a very ineffective and wasteful process.
|
||||
|
||||
Menten plans on not only screening proteins but also creating new proteins. Developed a number of methods using quantum computing and machine learning.
|
||||
|
||||
Used Quantum Approaches - Quantum Annealing for optimization
|
||||
|
||||
The Core problem in protein design:
|
||||
|
||||
![Menten%20AI%206efaacbaea83459fafe1254649b82b1f/Screen_Shot_2020-04-30_at_1.13.16_PM.png](Menten%20AI%206efaacbaea83459fafe1254649b82b1f/Screen_Shot_2020-04-30_at_1.13.16_PM.png)
|
Binary file not shown.
After Width: | Height: | Size: 418 KiB |
Binary file not shown.
After Width: | Height: | Size: 255 KiB |
Binary file not shown.
After Width: | Height: | Size: 562 KiB |
|
@ -0,0 +1,11 @@
|
|||
# Q-CTRL Tutorial
|
||||
|
||||
DISCLAIMER: A few prerequsites before reading:
|
||||
|
||||
- Some Terminal knowledge
|
||||
- Python & jupyter notebook manipulation
|
||||
- Passion for quantum computing!
|
||||
|
||||
# A quick & easy way to get started on Q-CTRL to stabilize those pesky computations!
|
||||
|
||||
OK so this tutorial is about Q-CTRL not about installing python, anaconda, or how to use the terminal. If you need further assistance with those topics, check out these links here! :-)
|
|
@ -0,0 +1 @@
|
|||
# QPU Teleportation
|
|
@ -0,0 +1,11 @@
|
|||
# QURECA
|
||||
|
||||
[http://www.vad1.com/](http://www.vad1.com/)
|
||||
|
||||
QKD
|
||||
|
||||
[https://www.edx.org/course/quantum-cryptography](https://www.edx.org/course/quantum-cryptography)
|
||||
|
||||
[https://www.ida.org/research-and-publications/publications/all/o/ov/overview-of-the-status-of-quantum-science-and-technology-and-recommendations-for-the-dod](https://www.ida.org/research-and-publications/publications/all/o/ov/overview-of-the-status-of-quantum-science-and-technology-and-recommendations-for-the-dod)
|
||||
|
||||
[https://docs.microsoft.com/en-us/quantum/tutorials/quantum-random-number-generator?tabs=tabid-qsharp](https://docs.microsoft.com/en-us/quantum/tutorials/quantum-random-number-generator?tabs=tabid-qsharp)
|
|
@ -0,0 +1,132 @@
|
|||
# Quantum Error Correction - Notes
|
||||
|
||||
A 3-level quantum system viewed as a graph. These off-diagonal elements represent how much simultaneous reality exists between each system.
|
||||
|
||||
Have some input state and then some error/interaction happens to it that changes the state and error has happened to it and changed the whole system. Ideally, we would like to go back to the same state we started with.
|
||||
|
||||
Normally in a quantum computer there are qubits. There is usually an input system. Once the operations occur in a quantum computer
|
||||
|
||||
Ancilla qubits provide reduncancy for the computational basis, tell us which error occurred.
|
||||
|
||||
Qubit —> superposition —> simulataneous reality —> it doesn't have to be 50/50 though and it can different ratios of positions.
|
||||
|
||||
Another degree of freedom is also possible called **phase** so the angle around the sphere.
|
||||
|
||||
The waves represent up or down.
|
||||
|
||||
Quantum mechanice —> probability waves underlie everything.
|
||||
|
||||
Superposition is due to the fact that everything is made of a wave. Since upness/downness is one degree of freedom. The relative phase is another degree. That's why the whole sphere is a qubit which is just a 2-level quantum system but is an infinite number of possible states.
|
||||
|
||||
However a 3 level system is represented on surface of 8 dimensional hypersphere. It is possible to get complicated very quickly.
|
||||
|
||||
Quantum mechanics is a much richer strcuture than we are used to in our classical thinking world.
|
||||
|
||||
It can be that if we focus too much on a system that is bigger than q ubit and try to treat it as bigger than a qubit, it may lose its pure-state identity a bit and can act like multiple different quantum states. Imagine there is a weighted sum of these and thus
|
||||
|
||||
Quantum mixed state: weighted sum will cause the net point to not be on the surface of the sphere and then cause it to be on the interior.
|
||||
|
||||
we lose some usefulness of the quantum state then.
|
||||
|
||||
We have these ancilla qubits and we first do a unitary encoding operation entangles the ancillas with input state to cause redundancy so that when an error occurs we can register it.
|
||||
|
||||
We may have errors happening locally, if things were happening on qubit only that is the simplest error
|
||||
|
||||
That can only be happened as an error on everything.
|
||||
|
||||
In these error correction schemes, they oversimplify it so that these error corrections don't exactly work.
|
||||
|
||||
Then, after recovery, there would be the computational unitary. This is the item that is the computation of the quantum computer. But after that there may be another layer of errors that happen, then another layer of recovery, and then computation.
|
||||
|
||||
Then theoretically at the end, there were would be a unitary decoding operation
|
||||
|
||||
What you would get back is the recovered input state which is exactly the same it was before the errors happened .
|
||||
|
||||
Error channels are assumed to be local (they were thinking very classically when they made this - they had to think from what they were familiar with - will only focus on local errors in the beginning)
|
||||
|
||||
Recovery operations includes projective measurements which causes destruction thus requiring more ancillas.
|
||||
|
||||
A given code only works ofr a particular family of error channels.
|
||||
|
||||
Simplest error channel : bit-flip operators —> flip a qubit that is up to the down state
|
||||
|
||||
To some extent though it is a ruined or damaged state.
|
||||
|
||||
**Encode via basis redundancy** —> People couldn't get their minds out of classical thinking though
|
||||
|
||||
If superposition it will flip up to down and down to up
|
||||
|
||||
Indent
|
||||
|
||||
Square roots of probabilities directly determine what the probabilities of each outcome are.
|
||||
|
||||
Entangled —> since none of the a or b can be factored out it is provably generally entangled.
|
||||
|
||||
We want is an encoding that uses entanglement that uses some redundancy into the basis (still a simultaneous reality - not possible in a classical computer) and so we use the ancilla system described before.
|
||||
|
||||
How to encode:
|
||||
|
||||
1. Initial state and ancillas. —> we distribute the ancillas in into the initial state. The ancillas have their own states in this state and thus no entanglement.
|
||||
2. Apply encoding unitary
|
||||
|
||||
Review:
|
||||
|
||||
Make simple assumptions: Only local error channels on each qubit, only one qubit get a particular error at a time.
|
||||
|
||||
Identify orthogonal projectors that can distinguish the possible joint-system errors ( List our allowed errors — the ones we assume are the only things that happen) : the simplest is when nothing happens (identity), circle with the x is the tensor product is that is separates the subspaces where each qubit lives.
|
||||
|
||||
Then list effects on encoded state: Notice that all corrupted results are orthogonal
|
||||
|
||||
Have some experience working with kets (represent quantum outcomes)
|
||||
|
||||
To understand if it is perpendicular —> which anytime 2 different basis elements in one qubit that are different — > this will cause 0 when they are interacting in some way
|
||||
|
||||
In quantum mechanics —> perpendicular means outcomes that are mutually exclusive —> in fact in space they are at right angles
|
||||
|
||||
A single state can be in a superposition of perpendicular outcomes (like alive & dead: two most mutually exclusive things we can think of)
|
||||
|
||||
Create subspace identities for these corrupted outcomes
|
||||
|
||||
Call these projectors or subspace projects —> for the original state, take the outcome and make a pure projector of it.
|
||||
|
||||
this is an operator
|
||||
|
||||
Similar to identity like having an identity for 8 level matrix.
|
||||
|
||||
1 in the first position
|
||||
|
||||
Each is a subspace identity for the corrupted states
|
||||
|
||||
We take the identities and we enact them on the corrupted state
|
||||
|
||||
Only the corrupted state then survives.
|
||||
|
||||
The effect of projectors on corrupted results is often destructive
|
||||
|
||||
Measurements are destructive to superposition (and that is what we are trying to protect)
|
||||
|
||||
Thus we need measurement ancillas.
|
||||
|
||||
Thus, design a projective measurement that is nondestructive on the main encoded system.
|
||||
|
||||
1. Couple to measurement ancilla —> another operation called the measurement unitary which changes the ancillas in some way that changes them so that we make them unique and basically indentify the error.
|
||||
2. Possible measurements of ancilla —> when you have unique tags that are perpendicular and now we have something that we can measure and don't care what happens to this tag - the attached superposition will now survive in each form in order to protect it.
|
||||
3. Plan corrections based on measurement ancilla results - Then use measurement ancilla with whatever tag you got, apply a new operation that reverses that error - ideally it is the inverse operation of the error - though it is possible in this case but not always true -
|
||||
4. Make corrections (feed-forward measurements to variable recovery operator) - you have thus reversed the error - all are the same original encoding state.
|
||||
|
||||
Recovery Complete!
|
||||
|
||||
Caveats:
|
||||
|
||||
1. Is ancilla-assisted, need MN measurement ancillas for M logical qubits encoded with N
|
||||
2. Measurement ancillas are assumed to be error-free -
|
||||
|
||||
Starts to remind us of refrigerator - start to refrigerate something we need to refrigerate that , another problem we encounter when we try to cool things down to absolute zero
|
||||
|
||||
1. Allowed errors are assumed invertible, otherwise recovery couldn't be done
|
||||
2. Only local error channels assumed
|
||||
3. Assumed only one error at a time - when trying to do more complicated things —> gets more complex because of the complexity possible that the error correction mechanism might have errors . Part of the reason we cool things down so much is that when we do that we can reduce those errors as much as possible. That is why we have these advanced refrigerators playing an important part in quantum computation. We are still in the vacuum tube days of quantum computing. The vacuum tube used to burn up, could not operate for long without replacing vacuum tubes. The transistors were a quantum leap forward. Revolutionized and made modern computers possible. What we need is something analagous of the transistor. Quantum error correction is bigger than quantum error correction — adapted it to a communications system. Coupled ideas of teleportation with quantum error correction to achieve powerful communication abilities.
|
||||
4. An idea is not limited to the area for which it is intended. That might break you into a whole dimension of possibilities. Any ideas can turn out to be gold mines later.
|
||||
5. Ideas had an wrote down paid off. Don't discard the value of your own thinking.
|
||||
6. Maximally entangled states for n quantum states
|
||||
7.
|
|
@ -0,0 +1,7 @@
|
|||
# Quantum Qonvos.
|
||||
|
||||
*Quantum computing applies to everything that can be optimized.*
|
||||
|
||||
Shway - So what can be optimized?
|
||||
|
||||
Bo - What can't be optimized?
|
|
@ -0,0 +1,29 @@
|
|||
# Welcome to the AI
|
||||
|
||||
Ah the world of artiifical intelligence. The electricity that powers all the tech tools of tomorrow including Windtelligent's!
|
||||
|
||||
General ML things should be found in the larger vault I believe or even [here](obsidian://open?vault=Coding%20Tips&file=Python%2FProjects%2FMachine%20Learning%2FML%20Management), but I'm sure the shorter version will have relevance here as well. The extended if-then statement with some numbers at best. The start to decision making upon cell splitting. Add any fun links you'd like here.
|
||||
|
||||
---
|
||||
|
||||
## In Review
|
||||
|
||||
The 5 algorithms currently in review are:
|
||||
|
||||
- Linear Regression
|
||||
|
||||
- k-Nearest Neighbors
|
||||
|
||||
- Decision Tree
|
||||
|
||||
- Support Vector Machines
|
||||
|
||||
- Multi-Layer Perceptron
|
||||
|
||||
These are 5 algorithms that you can try on your regression problem as a starting point. A standard machine learning wind problem will be used to demonstrate each algorithm.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Cross-Validation Review
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
# First Quarter Notebook
|
||||
|
||||
### April Events
|
||||
- We won 3rd place in the hackathon!
|
||||
- incorporated officially as Windtelligent AI LLC
|
||||
|
||||
|
||||
### May Events
|
||||
|
||||
|
||||
### June Events
|
||||
|
||||
|
||||
### July Events
|
||||
|
||||
|
||||
### August Events
|
||||
|
||||
|
||||
---
|
||||
# Windtelligent Q1
|
||||
- created a private repository
|
||||
- created a shared private drive
|
||||
- created a baseline model & 2 demos
|
||||
- emails and social media created
|
||||
|
||||
---
|
||||
|
||||
# More Tools
|
||||
|
||||
### ML Papers:
|
||||
- Ax - [Bandit Optimization ](https://ax.dev/docs/banditopt.html)
|
||||
- 2019 -[Deep Uncertainty Quantification](http://urban-computing.com/pdf/kdd19-BinWang.pdf) with NWP
|
||||
- 2020 -[ WeatherBench](https://arxiv.org/abs/2002.00469) - benchmark for data driven weather forecasting
|
||||
- 2019 - [Visual Wind Speed Prediction](https://paperswithcode.com/paper/seeing-the-wind-visual-wind-speed-prediction#code) RCNN
|
||||
- 2020 - cubed sphere for [quicker](https://arxiv.org/abs/2003.11927) ensembling
|
||||
- 2021 - Multi-station [forecasting](https://arxiv.org/pdf/2009.11239.pdf) RCNN
|
||||
- [Tutorial](https://castlelab.princeton.edu/html/Presentations/Powell_UnifiedFrameworkforOUU_InformsTutorial_Nov132016.pdf) of Unified Framework Optimization under Uncertainy- 2016
|
||||
-
|
||||
|
||||
|
||||
### Referenced Githubs:
|
||||
- [NGBoost](https://github.com/stanfordmlgroup/ngboost) for probabilistic prediction
|
||||
- [Deep ensemble](https://github.com/bond005/yandex-shifts-weather) for weather shifts
|
||||
- SpaceApps [Meteomatics](https://github.com/spaceappsnyc/UnicodeUnicorns2019/blob/master/MeteoMatics_API_Python_Calls.py) API Calls
|
||||
- Deep Learning with [DUQ](https://github.com/BruceBinBoxing/Deep_Learning_Weather_Forecasting)
|
||||
- The [RESNet](https://github.com/luoye2333/ResNetLSTM) LSTM
|
||||
- [UAV](https://github.com/weg-re/uav-analysis) Analysis
|
||||
- Scikit [helper](https://github.com/sipposip/keras-tensorflow-scikit-utilities/blob/master/periodic_padding_keras_example.py) functions
|
||||
- Deep CNN of [GCM](https://github.com/sipposip/simple-gcm-deep-learning)
|
||||
- Deep learning models for [global weather prediction](https://github.com/jweyn/DLWP-CS) on a cubed sphere
|
||||
- Multi-station [RCNN](https://github.com/IsmailAlaouiAbdellaoui/weather-forecasting-explainable-recurrent-convolutional-NN)
|
||||
- [Streamlit]([https://github.com/streamlit/streamlit](https://github.com/streamlit/streamlit)) for demo
|
||||
- Download HRRR model data through [Herbie](https://github.com/blaylockbk/Herbie)
|
||||
|
||||
### Business tools
|
||||
- [pitch deck](https://slidebean.com/template-category/startups) templates
|
||||
- YC [freebies](https://www.notion.so/ycsus/eb459f79a61e40919b03165581a66680?v=210c4c5a5cc54579986dff74d9d52eb7&p=bc542889ac09432989d22631e025f692&pm=s)
|
||||
-
|
|
@ -0,0 +1,36 @@
|
|||
# What are the different data models ?
|
||||
|
||||
These would be our potential competitors or companions! We hope to work with them in the goal of bettering wind knowledge.
|
||||
|
||||
We are currently comparing against the HRRR & ECMWF models
|
||||
|
||||
The goal is to give you the most accurate forecast data available. A single forecast model will never be the most accurate in all situations, so by having access to the world’s top forecast models you can be assured to get the best possible forecast, to give you greater confidence in your decision-making.
|
||||
|
||||
PredictWind has been the market leader for accurate forecasts in the recreational market since 2008. Using the CSIRO CCAM model with 450 high-resolution domains around the world, PredictWind covers most popular recreational marine users in the world.
|
||||
|
||||
---
|
||||
|
||||
**PWG:** Stands for the PredictWind proprietary weather model that uses the [NCEP](http://www.nco.ncep.noaa.gov/pmb/products/gfs/) global initial conditions, processed through the CSIRO CCAM model to generate the PWG forecast.
|
||||
|
||||
**PWE:** Stands for the PredictWind proprietary weather model that uses the [ECMWF](http://www.ecmwf.int/en/about/who-we-are) global initial conditions, processed through the CSIRO CCAM model to generate the PWE forecast.
|
||||
|
||||
Using the ECMWF and NCEP initial conditions (which are comparable to a 'photographic' snapshot that contains the current state of the Earth's atmosphere) enable us to run our own worldwide weather models, and we are the only private company in the world that has this proprietary technology.
|
||||
|
||||
**GFS:** Stands for Global Forecast System from [NCEP](http://www.nco.ncep.noaa.gov/pmb/products/gfs/). This is used by most other weather websites/apps. We now display the GFS-FV3 model when you see the GFS label in PredictWind. It’s the first significant upgrade to GFS in about 40 years. Unlike the previous GFS model, GFS-FV3 is able to simulate vertical movements such as updrafts, a key component of severe weather, at very high resolution. So far, tests suggest that the FV3 model has more accurate five-day forecasts, as well as better predictions of hurricane tracks and intensification. Although the new FV3 core has shown improvements over GFS it remains ranked 3rd for accuracy behind ECMWF(1st) and UKMO(2nd).
|
||||
|
||||
**ECMWF:** Stands for European Center for Medium-Range Weather Forecasts and is highly regarded by Meteorologists and top Navigators around the world. The ECMWF High RES model consistently rates as the top global weather model from a national weather service with the highest rating scores. In March 2016 ECMWF increased the resolution of their model to a record-breaking 9 km resolution, which is currently the highest resolution global model available. ECMWF data has a very high acquisition cost, and this is why the data is not widely used by many weather websites, and has been traditionally used only by top yacht racing teams and meteorologists.
|
||||
|
||||
**SPIRE:** Is a truly innovative company with the largest nanosatellite network in space. Spire uses a unique technique of measuring the earth’s atmosphere with 3x more [radio occultation](https://share.predictwind.com/yAulreQb) data than any other commercial entity. This gives an advantage in forecast accuracy for remote locations. The Spire model is #1 for wind speed and direction accuracy using data from offshore weather buoys. It is #2 behind the ECMWF for land-based weather stations.
|
||||
You can learn more about Spire by watching this [video](https://www.youtube.com/watch?v=5kpw5WeR5V4).
|
||||
|
||||
**UKMO:** Otherwise known as the “Unified Model” by the UK Meteorological Office has a long reputation as a market leader in forecast modelling. UKMO has very similar accuracy to the ECMWF model offshore, and is slightly behind the ECMWF & Spire models for the land based weather stations.
|
||||
|
||||
**HRRR:** Stands for High-Resolution Rapid Refresh and is an NOAA real-time 3-km resolution, hourly updated, cloud-resolving, convection-allowing atmospheric model, initialized by 3 km grids with 3 km radar assimilation. Radar data is assimilated in the HRRR every 15 min over a 1-h period adding further detail to that provided by the hourly data assimilation from the 13 km radar-enhanced Rapid Refresh. To learn more see the [video](https://www.youtube.com/watch?v=tIPHkPeW7CA).
|
||||
|
||||
**NAM:** Stands for North American Mesoscale Forecast System and is one of NOAA’s major weather models, which in this case covers most of North America. NAM is a mesoscale model, which means that the numerical analysis is able to model land, and other features, at a higher resolution than in a global model, leading to improved forecast accuracy.
|
||||
|
||||
**AROME:** Is a small scale numerical prediction model, operational at Meteo-France since December 2008. It was designed to improve short-range forecasts of severe events such as intense Mediterranean precipitations (Cévenole events), severe storms, fog, urban heat during heat waves. This model is highly regarded by top racing navigators and beats the ECMWF forecast.
|
||||
|
||||
----------------
|
||||
|
||||
Comparing the PWG/PWE forecasts allows you to gauge the confidence level in the forecast, and adding the GFS/ECMWF/ SPIRE & UKMO forecasts take your confidence to a new level. Generally the unique PredictWind model, and its higher resolution will be more accurate, but with all 9 forecasts you can have greater confidence in your forecast to make the best decision.
|
|
@ -0,0 +1,17 @@
|
|||
# High Rapid Refresh Rate
|
||||
|
||||
This is the model currently used in North America and the USA standard for weather forecasting
|
||||
|
||||
[More on HRRR](https://www.cpc.ncep.noaa.gov/products/analysis_monitoring/enso_update/sstanim.shtml) at the climate prediction center via National Weather service.
|
||||
|
||||
**![](https://lh5.googleusercontent.com/rBCKNSPJEtuocSt9Ur6yO9NUoRLp7OeCUhldgFKy95K0r0D3erqxHf-MbFm1NE9nMDynFyA8I5fej_NI6RzlEwn1id8jzkKxbMq7nXSWvy4JE7KFs1hN4MbQjHFnVZklQMQVIF2kruIf2BQZbWBmLg)**
|
||||
- uses HRRR ensemble (HRRRE) prediction v3 currently
|
||||
- This data is publicly available [here](https://console.cloud.google.com/marketplace/product/noaa-public/hrrr?project=python-232920&pli=1) as well.
|
||||
- via Google Cloud console, engage [quickstart](https://cloud.google.com/storage/docs/access-public-data?hl=en_US)
|
||||
- real-time 3-km resolution
|
||||
- hourly-updated
|
||||
- assimilated every 15 min
|
||||
- as far back as 2014
|
||||
- available via GRIB2 files
|
||||
- further [toolkits](https://www.ncdc.noaa.gov/wct/)
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# Papers we are basing it off of
|
||||
|
||||
We are basing it off of very recent papers in which ML models have been used for higher forecasting power.
|
||||
|
||||
- [Short-term wind speed prediction](https://drive.google.com/file/d/1RdGwLX0m2LwVay2DOmdZomcTeUCL_f80/view?usp=sharing) using Extended Kalman Filter and ML
|
||||
- [Research](https://drive.google.com/file/d/1RdGwLX0m2LwVay2DOmdZomcTeUCL_f80/view?usp=sharing) on short-term wind speed
|
||||
- Real-time Forecasting [Framework](https://drive.google.com/file/d/1RdGwLX0m2LwVay2DOmdZomcTeUCL_f80/view?usp=sharing) using Deep Learning
|
||||
- [codebase](https://github.com/BruceBinBoxing/Deep_Learning_Weather_Forecasting) for their paper
|
||||
- [Geophysical Constraints ](https://drive.google.com/file/d/1RdGwLX0m2LwVay2DOmdZomcTeUCL_f80/view?usp=sharing)worldwide
|
||||
- Accelerating [Weather Prediction](https://drive.google.com/file/d/1dhRQFjIBVEHJBsnloHD4NX02Y8-9HYQJ/view?usp=sharing) using Near-Memory Reconfigurable Fabric
|
||||
- [ Feasibility of soft computing](https://drive.google.com/file/d/1-JaR0f5HSKwnqwMbyGkFXwFFf3tp3cKa/view?usp=sharing) for estimating long-term monthly mean wind speed
|
||||
- Visual Wind Speed prediction [ using CNN & RNN](https://arxiv.org/pdf/1905.13290v3.pdf)
|
||||
- For Wind Energy res-=ource quantification, air pollution monitoring, and weather forecasting
|
||||
- Short-term wind speed prediction to [correct numerical weather forecasting ](https://www.sciencedirect.com/science/article/abs/pii/S0306261922002264)
|
||||
- Specifically, the values of the mean absolute error (MAE), the mean absolute percentage error (MAPE), and the root mean square error (RMSE) are 0.1042 m/s, 4.63% and 0.1309 m/s after correction, decreased by 94.13%, 91.75% and 93.93%, respectively, compared to those without correction.
|
||||
|
||||
|
||||
### Further Reading
|
||||
- *Heaven's Breath: A Natural History of the Wind* by Lyall Watson
|
||||
|
||||
|
||||
---
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
# Windtelligent Wishlist
|
||||
|
||||
It'd be nice to see these things to get a better ML representation of what exactly we are doing under the hood. How our model compares to other wind forecast models and more. This will certainly be a growing bucket list so make sure to knock it off as you go along. And celebrate the victories!
|
||||
|
||||
---
|
||||
|
||||
|
||||
## On the AI itself.
|
||||
- our github
|
||||
- our [reference papers ](obsidian://open?vault=Coding%20Tips&file=Careers%2FCurrent%20Occupations%2FWindtelligent%2FIntelligence%2FReferenced%20Papers)
|
||||
- our [benchmarks](https://github.com/pangeo-data/WeatherBench)
|
||||
- our demos
|
||||
- on different wind features
|
||||
- the[ daily 'do](https://drive.google.com/drive/folders/1bxiS58CH4kyUA0lmB4_JWYp2l1bwO2cm?usp=sharing) journal
|
||||
- being better with Python and continuing to learn
|
||||
- eventually incorporating quantum technology in there as well QML
|
||||
|
||||
## On Quantum...
|
||||
- Rigetti [enhancing](https://www.globenewswire.com/news-release/2021/12/01/2344216/0/en/Rigetti-Enhances-Predictive-Weather-Modeling-with-Quantum-Machine-Learning.html) predictive weather
|
||||
- IBM Quantum [partnering](https://www.cnet.com/tech/tech-industry/ibm-unveils-weather-forecasting-system-commercial-quantum-computing-at-ces/) with weather
|
||||
- Potentials for [major improvements](https://1qbit.com/blog/quantum-computing/forecasting-the-weather-using-quantum-computers/) on current numerical methods and predictions of meterological conditions
|
||||
|
||||
## On Deployable Product
|
||||
- [FastAPI](https://pythonawesome.com/fastapi-skeleton-app-to-serve-machine-learning-models-production-ready/) with Python on ML apps
|
||||
- Timeline
|
||||
|
||||
## On the website and our marketing presence
|
||||
- our [website](https://www.windtelligent.ai/)
|
||||
- airbenders and our story
|
||||
- potential other websites
|
||||
- our twitter
|
||||
- other social medias
|
||||
- other climate companies
|
|
@ -0,0 +1,11 @@
|
|||
# About Windtelligent AI
|
||||
|
||||
Currently, I am the Chief Technology Officer (CTO) of a wind speed prediction company. Cool! But there is so much to it so there's a lot to apply to it. Primarily it is a large collections of to-do's and projects that are python-related.
|
||||
|
||||
---
|
||||
|
||||
It may be worth it to continue keeping the collection of [folders](https://drive.google.com/drive/folders/1EUG5KNLwkm4lnwofyf4tRIw3_mwzZb5W?usp=sharing) that I have building the company and to further delve into the growing [github](https://github.com/katerspotaters/HackHouse_Wind/pull/30) repository which I have still yet to make changes or contribute to....
|
||||
|
||||
Anyways, here is the website for Windtelligent and here is the the list of things that is still on the bucket list left to do with our product. One feature at a time rememember.
|
||||
|
||||
---
|
|
@ -0,0 +1,8 @@
|
|||
# Academic Tutor
|
||||
|
||||
This is probably due to me still having Academic Computing at NYIT as my current position still which is false but this message was sent by Melissa Mayer at Success Academy via Linkedin
|
||||
|
||||
---
|
||||
### Offer At Success Academy!
|
||||
|
||||
Hi Shwetha Hope all is well and happy Monday! I am reaching out because your background and experience as an academic tutor falls in line with a few key roles we are filling here. I’d love to speak with you to chat more about these roles within our schools- can you hop on a quick call? If so, you can sign up for a time with me here: [https://calendly.com/melissa-mayer-1/15-minute-zoom-call?utm_medium=mmayer](https://calendly.com/melissa-mayer-1/15-minute-zoom-call?utm_medium=mmayer) Please also be sure to "Accept" or "Decline" this message. Thanks! Melissa Melissa Mayer Senior Human Resources Recruiter at Success Academy Charter Schools
|
|
@ -0,0 +1,61 @@
|
|||
|
||||
## Hi Shwetha,
|
||||
|
||||
Thank you for your interest in Amazon's Software Development Engineer (SDE) opportunities! We would like to invite you to complete our online assessment, the first step of our recruitment process. Your time investment for the online assessment should take about 2 hours. To progress in the recruitment process, please complete the assessment within 7 days of receiving this email.
|
||||
|
||||
At Amazon, we hire the best minds in technology to innovate and build on behalf of our customers. The intense focus we have on our customers is the reason we are one of the world's most beloved brands – customer obsession is part of our company DNA. Amazonians chart their own path by owning their development, their career, and their future. What unites Amazonians across teams and geographies is that we are all striving to delight our customers and make their lives easier. The scope and scale of our mission drives us to seek diverse perspectives, be resourceful, and navigate through ambiguity. By working together on behalf of our customers, we are building the future one innovative product, service, and idea at a time.
|
||||
|
||||
To begin the assessment, please read the instructions and follow the link below.
|
||||
|
||||
Overview
|
||||
|
||||
We encourage you to complete all sections of the assessment in one session. Once the 105-minute Coding Challenge timer starts, it doesn’t stop – even if you exit. If you need to take a break, the best time to do it is after the Coding Challenge. You don’t need to exit the assessment to take a quick break between sections. If you do exit out of the assessment, your work will be saved. When you return, you will start from where you left off. Remember, you must complete all 2 sections below before we can consider you for a Software Development Engineer role.
|
||||
|
||||
1. Coding Challenge: this timed section takes 105 minutes; work through 2 coding problems and explain your approach.
|
||||
|
||||
2. Amazon Work Style Survey: typically takes 7 minutes; answer questions about how you approach work in general
|
||||
|
||||
|
||||
Once you’ve completed the assessment, you’ll see a confirmation screen verifying that all your responses have been received. Then, you’ll complete a 1 minute Feedback Survey.
|
||||
|
||||
|
||||
|
||||
What about trying out a demo first?
|
||||
|
||||
[The Coding Assessment Demo](https://9n3bwgl2.r.us-west-2.awstrack.me/L0/https:%2F%2Fwww.hackerrank.com%2Ftest%2F63ek10mhil5%2F60d306ab105867d80fca544041154273/1/0201000016mcm5bi-k23sldu7-kcbm-3ua7-lh5q-2s71nrs6o5g0-000000/sUbs8C3fZGODwpLQGMTBnDc_auY=276) is optional to help you get familiar with the platform before starting the actual assessment. You can use it as part of your preparation.
|
||||
|
||||
Instructions (please read before you begin):
|
||||
|
||||
- Do not click the Start My Assessment link below until you're ready to start and complete the assessment.
|
||||
|
||||
- Set aside at least 2 hours in a quiet location where you can focus.
|
||||
|
||||
- Make sure your internet connection is stable.
|
||||
|
||||
- Use the latest version of Google Chrome, Firefox or Safari.
|
||||
|
||||
- Respond to the acknowledgement that you'll complete the assessment without external assistance or resources.
|
||||
|
||||
|
||||
During the coding challenge:
|
||||
|
||||
- You may choose from the following languages: C, C++, C#, Go, Java, JavaScript, Kotlin, Objective C, Python, Ruby, Scala, or Swift.
|
||||
|
||||
- Find supported compiler versions [here](https://9n3bwgl2.r.us-west-2.awstrack.me/L0/https:%2F%2Fwww.hackerrank.com%2Ftests%2Finfo%2Ffaq/1/0201000016mcm5bi-k23sldu7-kcbm-3ua7-lh5q-2s71nrs6o5g0-000000/HBHkV2VNBBOgLcTxtrBDy8WTDzI=276).
|
||||
|
||||
- Manage your time effectively by checking the on-screen timer regularly.
|
||||
|
||||
- Complete the entire assessment in one sitting - the coding challenge timer can't be paused once you have started.
|
||||
|
||||
|
||||
We value the people we hire and appreciate your interest in Amazon! Please email your recruiter if you have further questions.
|
||||
|
||||
Ready to go?
|
||||
|
||||
|
||||
|
||||
Assessment Link: [https://9n3bwgl2.r.us-west-2.awstrack.me/L0/https:%2F%2Fassessments.amazon.jobs%2F%3Fauth=3jYr9JOLzX4npyxXWVTayRQXiJc3680IlAcweMTS_Bc%23%2Fassessment%2FHire_0c60a08f-3fe5-459f-84ac-01d20d6c6753/1/0201000016mcm5bi-k23sldu7-kcbm-3ua7-lh5q-2s71nrs6o5g0-000000/FOmm5JH7BTZsouvnLbYaCw1Ypjg=276](https://9n3bwgl2.r.us-west-2.awstrack.me/L0/https:%2F%2Fassessments.amazon.jobs%2F%3Fauth=3jYr9JOLzX4npyxXWVTayRQXiJc3680IlAcweMTS_Bc%23%2Fassessment%2FHire_0c60a08f-3fe5-459f-84ac-01d20d6c6753/1/0201000016mcm5bi-k23sldu7-kcbm-3ua7-lh5q-2s71nrs6o5g0-000000/FOmm5JH7BTZsouvnLbYaCw1Ypjg=276)
|
||||
|
||||
|
||||
|
||||
**
|
|
@ -0,0 +1,53 @@
|
|||
## To do the online coding assessment:
|
||||
|
||||
it may be helpful to watch these videos as well.
|
||||
-[ first tip:](obsidian://open?vault=Coding%20Tips&file=Tip%201.) don't panic
|
||||
- very easy to get overwhelmed by big wall of text and make sure to read entire problem and all cases before writing the code
|
||||
- write down notes and keywords
|
||||
- [second tip](obsidian://open?vault=Coding%20Tips&file=Tip%202): don't worry about writing bad code at first
|
||||
- they know it will take iterations
|
||||
- you can always submit multiple times!
|
||||
- run the stub code first and see if there are any sample test cases
|
||||
- [third tip:](obsidian://open?vault=Coding%20Tips&file=Tip%203) submit your own test cases
|
||||
- generating your own test cases shows that you are understanding the question fully before coding
|
||||
- [fourth tip:](obsidian://open?vault=Coding%20Tips&file=Tip%204) use language reference materials
|
||||
- important when you forget how to list comprehension in python
|
||||
- you are always free to look up docs
|
||||
- [fifth tip](obsidian://open?vault=Coding%20Tips&file=Tip%205): do the easy questions first!!
|
||||
- you won't feel as stressed out
|
||||
- [sixth tip](obsidian://open?vault=Coding%20Tips&file=Tip%206): start doing the easiest solution first even if it is not the most optimized solution, at least having that answer at all maybe
|
||||
-[ seventh tip:](obsidian://open?vault=Coding%20Tips&file=Tip%207) TAKE the sample test!!
|
||||
|
||||
|
||||
---
|
||||
## Techniques while coding:
|
||||
|
||||
What you should be focusing on is the techniques and approaches. A lot of times, these techniques can be applied in other problems as well.
|
||||
|
||||
Some important techniques to focus on:
|
||||
|
||||
- rabbit and tortoise 2 pointer approach
|
||||
- level order traversal using a queue
|
||||
- backtracking
|
||||
- drawing a recursion tree
|
||||
|
||||
---
|
||||
|
||||
|
||||
### Signs that you are not ready for a programming job.
|
||||
|
||||
1. You are not able to code in front of other people
|
||||
a. if you are not able to code on the spot, work with other people work in software development
|
||||
b. also just record yoursef while coding
|
||||
2. You should be able to explain how data flows through that application on a high level
|
||||
3. You don't have any substantial portfolio projects
|
||||
- companies are going to want to see that you are able
|
||||
4. Unable to debug applications.
|
||||
- being a programmer means you are constantly going to fix
|
||||
5. Not doing any coding challenges.
|
||||
- have to get good at coding under pressure on platforms like hackerrank or leetcode.
|
||||
|
||||
---
|
||||
|
||||
[Amazon common topics](https://www.educative.io/blog/crack-amazon-coding-interview-questions#questions)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
## Don't Panic
|
||||
Write down any & all notes + keywords you may need here:
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
## Write down all the bad code you can.
|
||||
without worrying about if it is optimized or not:
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
## Submit Your Own Test Cases
|
||||
Try out all your own test cases:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
and also run the sample tests they give you.
|
|
@ -0,0 +1,8 @@
|
|||
## Use Language Reference Materials
|
||||
|
||||
If using Python, include any docs, references, or shortcuts you may need as a syntax cheat sheet here:
|
||||
|
||||
|
||||
Links for python references and methods & [tutorials](https://realtoughcandy.io/courses/1755860/lectures/40270341)
|
||||
|
||||
A lot of references can also be found [here](https://pythonawesome.com/a-python-markdown-parser-that-syntax-plugins-and-high-speed/)
|
|
@ -0,0 +1,2 @@
|
|||
## Do the easy questions first.
|
||||
Rank in terms of difficulty:
|
|
@ -0,0 +1,2 @@
|
|||
## Start doing the easiest solution first
|
||||
Even if it's not the optimized or right solution, know that this is the easiest way and that you at least have some process thought of for that
|
|
@ -0,0 +1,2 @@
|
|||
## TAKE the Sample Test!
|
||||
Gives a good estimate of how the real one may go! Get yourself used to the environment and time constraints:
|
|
@ -0,0 +1,119 @@
|
|||
|
||||
**Basic steps for an algorithm:**
|
||||
|
||||
input → instructions → execution → output → termination
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
[These](https://www.jjinux.com/2022/08/python-my-favorite-python-tricks-for.html) are more leetCode tips and tricks for [python](obsidian://open?vault=Coding%20Tips&file=Python%2FWelcome%20to%20Python):
|
||||
1. Using help()
|
||||
2. Using enumerate()
|
||||
3. Using items()
|
||||
4. Using [] vs. get()
|
||||
5. Range() is smarter than you think
|
||||
6. Print(f'') debugging
|
||||
7. For else
|
||||
8. Using a list as a stack
|
||||
9. sort() vs. sorted()
|
||||
10. Using deque
|
||||
11. Set and fronzenset
|
||||
12. Using a stack instead of recusion
|
||||
13. Using yield from
|
||||
14. Pre-intialize your list
|
||||
15. collections.Counter()
|
||||
16. Using defaultdict()
|
||||
17. Using heapq
|
||||
18. Use biset for binary search
|
||||
19. Using namedtuple and dataclasses
|
||||
20. Using closures
|
||||
21. Using match statement
|
||||
22. Using OrderedDict
|
||||
23. Using @functools.cache
|
||||
24. Debugging ListNodes
|
||||
25. Saving memory with the array module
|
||||
26. Using an exception for the success case rather than the error case
|
||||
27. Using VSCode, etc.
|
||||
|
||||
---
|
||||
|
||||
|
||||
[This youtube](https://www.youtube.com/watch?v=KLlXCFG5TnA&list=PLot-Xpze53ldVwtstag2TL4HQhAnC8ATf) series offers great explanations of how to do each kind of problem!
|
||||
Amazon follows a similar pattern for testing, and the questions may change according to what position you’re interested in. For a software engineer, you’ll have a coding round of three to four questions, varying from easy to medium difficulty. Then you’ll undergo an aptitude and psychometric round.
|
||||
|
||||
Amazon’s online coding assessment includes these topics:
|
||||
|
||||
- Number theory
|
||||
|
||||
- Greedy algorithm
|
||||
|
||||
- Binary search
|
||||
|
||||
- Dynamic programming
|
||||
|
||||
- Divide and conquer
|
||||
|
||||
- Hash tables, maps, trees
|
||||
|
||||
- Graph algorithm
|
||||
|
||||
|
||||
### Tips And Tricks To Help You Prepare
|
||||
|
||||
It helps candidates to have a strong skill set in data structure and algorithms. Although not required, Amazon offers support in multiple languages, so being bilingual might make you stand out from the crowd.
|
||||
|
||||
There are many ways to apply to Amazon, whether on campus, via referral, or through a coding contest. Practice all the important topics previously listed in LeetCode (more about LeetCode is explained below). Try to complete 30 to 40 questions from each topic to make sure you have a broad range of knowledge and are prepared for anything.
|
||||
|
||||
The questions for this assessment can be difficult. But if you dedicate three to four months in advance, you’ll optimize your coding skills. With the right preparation, the test will be easier. Be familiar with coding platforms, practice on popular sites, and also check questions from previous interviews.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Preparation strategy Amazon Online Coding Test
|
||||
|
||||
Do practise all the important topics given before and also strategy practising from Leetcode. Ideally, there is no number but you can try practising 30-40 questions from each topic and it will be enough for most of the hiring challenges.
|
||||
|
||||
|
||||
|
||||
### Five Things that Amazon Is Measuring Using the Online Coding Test
|
||||
|
||||
- Problem Statement Retention: can you read a coding problem and understand what it’s asking?
|
||||
|
||||
- Coding Ability: can you understand the problem, figure out an efficient solution, and then translate the solution into an accurate code?
|
||||
|
||||
- Data Structure Application: can you take a problem and apply an appropriate data structure to solve the problem in the simplest way? Do you know when to use a list/map/set/etc.?
|
||||
|
||||
- Runtime Complexity: can you go over your own code and assess what runtime complexity and major issues it might have?
|
||||
|
||||
- Simplification: can you create a simple solution to a complicated problem, in a way that most people would understand?
|
||||
|
||||
|
||||
### Two Things That Amazon Is NOT Testing On This Online Coding Round
|
||||
|
||||
1. Deep Knowledge of a Specific Language: you can code in any language that you feel comfortable with and Amazon won’t be testing your expertise in specific languages.
|
||||
|
||||
2. Purposefully Confusing or Tricky Questions: the coding problems are straightforward and are not intended to trick you in any way.
|
||||
|
||||
|
||||
Amazon is interested in your demonstration of problem-solving, writing correct code, applying patterns, data structures and algorithms, and optimizing for algorithmic performance on the tests.
|
||||
|
||||
*Note: As of 2022, Amazon removed the coding approach questionnaire and debugging questions parts.
|
||||
|
||||
|
||||
|
||||
### How to Prepare for the Amazon Coding Assessment?
|
||||
|
||||
When preparing for the online coding test, focus on these four areas:
|
||||
|
||||
- Algorithms: Basic Searching, Basic Sorting, Tree Traversal, Graph Traversal.
|
||||
|
||||
- Data Structures: Heaps, linked lists, arrays, trees (especially binary trees), hash tables, stacks, and recursion.
|
||||
|
||||
- Fundamentals: Go back and re-educate yourself on all data structures and data structure algorithms. Understand all time and space complexity. Make sure you even get into more unique things, like hashmaps, b+trees (and variants), and caches (and associated algorithms).
|
||||
|
||||
|
||||
Understand high-scale architecture: Go look at how other big sites are structured
|
|
@ -0,0 +1,99 @@
|
|||
Robot problem (most frequently asked)
|
||||
|
||||
**Remember:** think of each problem when you are coding them like a story. You have to explain to yourself where you are in the story and if it helps to write it down then please do that as well. You will have to create and author the story as you go of course. Retell it in the way that it makes most sense for you.
|
||||
|
||||
##### Revisiting the [Robot ](https://colab.research.google.com/drive/1N6CVDK8RDLCw51gS-qTRMVTM2LUAoUSd)Problem
|
||||
Think about the way you would first tackle this problem and use the 6 tips to quickly devise the answer.
|
||||
|
||||
Find a way to retell this problem as quickly as you can - a robot is at the origin of a coordinate map (0,0
|
||||
Y axis
|
||||
N+1
|
||||
X Axis W -1 R(0,0) E +2
|
||||
S -1
|
||||
|
||||
Instructions:
|
||||
G: go straight 1
|
||||
L: turn anti-clockwise 90 degrees
|
||||
R: turn clockwise 90 degrees
|
||||
|
||||
Robot performs the instructions in order and keeps looping those same instructions.
|
||||
Return true iff there is a circle s.t. iff the robot can never leave the circle
|
||||
(return true if the robot is iterating the same way in circle instruction set and doesnt not stop following circle instructions)
|
||||
^ that would be the base case.
|
||||
|
||||
circle equation: x^2 + y^2 = r^2
|
||||
|
||||
given a point (h, k) that the robot is now in
|
||||
update the circle equation.
|
||||
circle equation gets updated: (x-h)^2 +(y-k)^2 = r^2
|
||||
|
||||
how to check if there is a circle: if coordinates x, y, h, k, r are any of the coordinates.
|
||||
|
||||
an example input may be: "GGLGG"
|
||||
true --> check for circle
|
||||
example: GG
|
||||
false --> not for cicle
|
||||
|
||||
GL --> true
|
||||
W --> true
|
||||
|
||||
for the (0,0) case
|
||||
x^2 + y^2 = r^2
|
||||
if x
|
||||
|
||||
c = [i,k]
|
||||
|
||||
input = []
|
||||
for r in input[i,k]
|
||||
if "G":
|
||||
c[1] = +2
|
||||
if L:
|
||||
c[0] = -1
|
||||
if R:
|
||||
c[0] = +1
|
||||
if r = 0
|
||||
return true
|
||||
else
|
||||
continue.
|
||||
|
||||
----
|
||||
Solution: You were on the right track but have to practice with syntax more.
|
||||
a directions array needs to be intiialized with:
|
||||
```
|
||||
directions = [(0,1),(1,0)(0,-1)(-1,0)]
|
||||
```
|
||||
|
||||
each time G, L, or R called the direction and then x,y coordiante as well as d is also updated
|
||||
but first make sure to set them to 0.
|
||||
```
|
||||
x = 0
|
||||
y = 0
|
||||
d = 0
|
||||
```
|
||||
|
||||
your for loop was pretty much spot on but here is the appropriate syntax for that in python.
|
||||
|
||||
```
|
||||
for instruction in instructions:
|
||||
if instruction == 'G':
|
||||
x += direction[d][0]
|
||||
y += directions[d][1]
|
||||
//the base case is north, G
|
||||
|
||||
if instruction == 'L':
|
||||
d = (d+3) % 4
|
||||
|
||||
else:
|
||||
d = (d+1) %4
|
||||
|
||||
//this makes sense. you will only be calling a reference to any of the directions if you are actually going forward one of the four coordinates aka the G. otherwise you are simily just updating d.
|
||||
|
||||
return (x,y) == (0,0) or d > 0
|
||||
|
||||
```
|
||||
This will mean that ultimately the coordinate will return to (x,y) or that the direction will continue being greater than
|
||||
the syntax for it to return a boolean is by giving it this kind of definition
|
||||
```
|
||||
def isRobotBounded(self, instructions:str) -> bool:
|
||||
```
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,101 @@
|
|||
So let's go over the thought process for solving tricky coding interview questions. I often find it's not enough to just be able to solve the problem; you really need to vocalize your thought process. This shows that you're a strong communicator and that you didn't just get lucky solving this one particular problem.
|
||||
|
||||
The question we'll work through is the following: return a new sorted merged list from K sorted lists, each with size N. Before we move on any further, you should take some time to think about the solution!
|
||||
|
||||
1. First, go through an example. This buys time, makes sure you understand the problem, and lets you gain some intuition for the problem. For example, if we had [[10, 15, 30], [12, 15, 20], [17, 20, 32]], the result should be [10, 12, 15, 15, 17, 20, 20, 30, 32].
|
||||
|
||||
2. Next, give any solution you can think of (even if it's brute force). It seems obvious that if we just flattened the lists and sorted it, we would get the answer we want. The time complexity for that would be O(KN log KN), since we have K * N total elements.
|
||||
|
||||
3. The third step is to think of pseudocode—a high-level solution for the problem. This is where we explore different solutions. The things we are looking for are better space/time complexities but also the difficulty of the implementation. You should be able to finish the solution in 30 minutes. Here, we can see that we only need to look at K elements in each of the lists to find the smallest element initially. Heaps are great for finding the smallest element. Let's say the smallest element is E. Once we get E, we know we're interested in only the next element of the list that held E. Then we'd extract out the second smallest element and etc. The time complexity for this would be O(KN log K), since we remove and append to the heap K * N times.
|
||||
|
||||
4. Initialize the heap. In Python this this is just a list. We need K tuples. One for the index for which list among the list of lists the element lives; one for the element index which is where the element lives; and the value of the element. Since we want the key of the heap to be based on the value of the element, we should put that first in the tuple.
|
||||
|
||||
5. While the heap is not empty we need to:
|
||||
|
||||
|
||||
- Extract the minimum element from the heap: (value, list index, element index)
|
||||
|
||||
- If the element index is not at the last index, add the next tuple in the list index.
|
||||
|
||||
|
||||
4. Write the actual code. Ideally, at this point, it should be clear how the code should look like. Here's one example:
|
||||
|
||||
```jupyter
|
||||
def merge(lists):
|
||||
|
||||
merged_list = []
|
||||
|
||||
|
||||
|
||||
heap = [(lst[0], i, 0) for i, lst in enumerate(lists) if lst]
|
||||
|
||||
heapq.heapify(heap)
|
||||
|
||||
|
||||
|
||||
while heap:
|
||||
|
||||
val, list_ind, element_ind = heapq.heappop(heap)
|
||||
|
||||
|
||||
|
||||
merged_list.append(val)
|
||||
|
||||
|
||||
|
||||
if element_ind + 1 < len(lists[list_ind]):
|
||||
|
||||
next_tuple = (lists[list_ind][element_ind + 1],
|
||||
|
||||
list_ind,
|
||||
|
||||
element_ind + 1)
|
||||
|
||||
heapq.heappush(heap, next_tuple)
|
||||
|
||||
return merged_list
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
5. Think of test cases and run them through your interviewer. This shows that you're willing to test your code and ensure it's robust. I like to think of happy cases and edge cases. Our original example would be a happy case. Edge cases might be.
|
||||
|
||||
|
||||
- lists is [].
|
||||
|
||||
- lists only contains empty lists: [[], [], []].
|
||||
|
||||
- lists contains empty lists and non-empty lists: [[], [1], [1,2]].
|
||||
|
||||
- lists contains one list with one element: [[1]].
|
||||
|
||||
- lists contains lists of varying size: [[1], [1, 3, 5], [1, 10, 20, 30, 40]].
|
||||
|
||||
|
||||
7. Finally, the interviewer should ask some follow-up questions. One common question is: what other solutions are there? There's actually another relatively simple solution that would use a divide-and-conquer strategy. We could recursively merge each half of the lists and then combine the two lists. This would have the same asymptotic complexities but would require more "real" memory and time.
|
||||
|
||||
|
||||
Doing all these steps will definitely help you crystallize your thought process, grasp the problem better, and show that you are a strong communicator and help you land that job offer!
|
||||
|
||||
|
||||
|
||||
And companies like Google, hire developers based on the same skills. So if you’re a coding enthusiast hunting for that dream job, the Google Coding Challenge is just the thing for you.
|
||||
|
||||
Here are some of the best methods and techniques to practice for Google coding challenges:
|
||||
|
||||
- Practice coding problems every day for at least a month leading up to the challenge.
|
||||
|
||||
- Get comfortable with the platforms used for these challenges.
|
||||
|
||||
- Pick an object-oriented programming language. You must be able to code algorithms in Python, C++, or Java.
|
||||
|
||||
- Use platforms like Leetcode, TopCoder, and CodeChef to expose yourself to a wide range of programming problems.
|
||||
|
||||
|
||||
Still not sure where to start?
|
||||
|
||||
Here’s a comprehensive guide about [Google Coding Challenge and how it could land you your next dream job: Read Now](https://d1khqf04.na1.hubspotlinks.com/Ctc/GF+113/d1KhQf04/VVv7Hx8XF4zBW89cr8l8nHcHWW8hW1h34KP4h2N4FBQMt3hwqkV1-WJV7CgCYGW81ZQWP2l16flW4RMHYs2YXTx4N5GJKzTxvdNrW8kW3rh5WpLJMW36FxxL1pTf2KW9lLhH-96yht2W2JYyfm1099FpW6BznN92wswLyW8lFJMv3xdXNYVcNKQ-3ZRfPVW8jqx5t76Tz4cW2jTHpM4nM_--N829J14w5_P3N836ZZ5N_CH3F4bzpMZC8RbW3CF5W62NdbzyW7_T5M51fJZGhW5Hd4Fn63_KnLW50LCrc2RFcYmW9kt5fF5ns-_YW7hxdxR8DQ8h1Vqc1SR5rm-qrW4DJdZf7jvPLlW8H52QL7vWb8WW9gYppp6Wp4HTW3_8c692WqP1v32mL1)
|
||||
|
||||
Happy Coding!
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"K Closest Points to Origin(973).ipynb","provenance":[],"authorship_tag":"ABX9TyPPXwejMq9b9je8LJjGDe8j"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# 973. K Closest Points to Origin\n","Medium\n","5755\n","212\n","Add to List\n","Share\n","Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane and an integer k, return the k closest points to the origin (0, 0).\n","The distance between two points on the X-Y plane is the Euclidean distance (i.e., √(x1 - x2)2 + (y1 - y2)2).\n","You may return the answer in any order. The answer is guaranteed to be unique (except for the order that it is in).\n"," \n","Example 1:\n","\n","Input: points = [[1,3],[-2,2]], k = 1\n","Output: [[-2,2]]\n","Explanation:\n","The distance between (1, 3) and the origin is sqrt(10).\n","The distance between (-2, 2) and the origin is sqrt(8).\n","Since sqrt(8) < sqrt(10), (-2, 2) is closer to the origin.\n","We only want the closest k = 1 points from the origin, so the answer is just [[-2,2]].\n","\n","Example 2:\n","Input: points = [[3,3],[5,-1],[-2,4]], k = 2\n","Output: [[3,3],[-2,4]]\n","Explanation: The answer [[-2,4],[3,3]] would also be accepted.\n","\n"," \n","Constraints:\n","1 <= k <= points.length <= 104\n","-104 < xi, yi < 104\n"],"metadata":{"id":"x-sKjh1g1iNk"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"x8F1f23v1g8y"},"outputs":[],"source":["# https://developers.google.com/maps/documentation/javascript/reference/marker"]}]}
|
|
@ -0,0 +1 @@
|
|||
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"LRU Cache(146).ipynb","provenance":[],"authorship_tag":"ABX9TyOsmw23tcD/vN9IF7r+SVvQ"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["#Problem 146.: LRU Cache \n","\n","Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.\n","Implement the LRUCache class:\n","LRUCache(int capacity)Initialize the LRU cache with positive size capacity.\n","int get(int key) Return the value of the key if the key exists, otherwise return -1.\n","void put(int key, int value) Update the value of the key if the key exists. Otherwise, add the key-value pair to the cache. If the number of keys exceeds the capacity from this operation, evict the least recently used key.\n","The functions get and put must each run in O(1) average time complexity.\n"," \n","Example 1:\n","Input\n","[\"LRUCache\", \"put\", \"put\", \"get\", \"put\", \"get\", \"put\", \"get\", \"get\", \"get\"]\n","[[2], [1, 1], [2, 2], [1], [3, 3], [2], [4, 4], [1], [3], [4]]\n","Output\n","[null, null, null, 1, null, -1, null, -1, 3, 4]\n","\n","Explanation\n","LRUCache lRUCache = new LRUCache(2);\n","lRUCache.put(1, 1); // cache is {1=1}\n","lRUCache.put(2, 2); // cache is {1=1, 2=2}\n","lRUCache.get(1); // return 1\n","lRUCache.put(3, 3); // LRU key was 2, evicts key 2, cache is {1=1, 3=3}\n","lRUCache.get(2); // returns -1 (not found)\n","lRUCache.put(4, 4); // LRU key was 1, evicts key 1, cache is {4=4, 3=3}\n","lRUCache.get(1); // return -1 (not found)\n","lRUCache.get(3); // return 3\n","lRUCache.get(4); // return 4\n","\n"," \n","Constraints:\n","1 <= capacity <= 3000\n","0 <= key <= 104\n","0 <= value <= 105\n","At most 2 * 105 calls will be made to get and put.\n"],"metadata":{"id":"_crI8_Sa9Zcp"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"juGQYQmA9PNr"},"outputs":[],"source":[""]}]}
|
|
@ -0,0 +1 @@
|
|||
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Maximum Units on a Truck(1710).ipynb","provenance":[],"authorship_tag":"ABX9TyMPa7aHf8gizP2bmfNeQt6/"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# 1710. Maximum Units on a Truck\n","Easy\n","\n","You are assigned to put some amount of boxes onto one truck. You are given a 2D array boxTypes, where boxTypes[i] = [numberOfBoxesi, numberOfUnitsPerBoxi]:\n","numberOfBoxesi is the number of boxes of type i.\n","numberOfUnitsPerBoxi is the number of units in each box of the type i.\n","You are also given an integer truckSize, which is the maximumnumber of boxes that can be put on the truck. You can choose any boxes to put on the truck as long as the number of boxes does not exceed truckSize.\n","Return the maximum total number of units that can be put on the truck.\n"," \n","Example 1:\n","Input: boxTypes = [[1,3],[2,2],[3,1]], truckSize = 4\n","Output: 8\n","Explanation: There are:\n","- 1 box of the first type that contains 3 units.\n","- 2 boxes of the second type that contain 2 units each.\n","- 3 boxes of the third type that contain 1 unit each.\n","You can take all the boxes of the first and second types, and one box of the third type.\n","The total number of units will be = (1 * 3) + (2 * 2) + (1 * 1) = 8.\n","\n","Example 2:\n","Input: boxTypes = [[5,10],[2,5],[4,7],[3,9]], truckSize = 10\n","Output: 91\n","\n"," \n","Constraints:\n","1 <= boxTypes.length <= 1000\n","1 <= numberOfBoxesi, numberOfUnitsPerBoxi <= 1000\n","1 <= truckSize <= 106\n"],"metadata":{"id":"p9Gx6G8X_G0Q"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"UOjK-p2dXAkF"},"outputs":[],"source":["class Solution:\n"," def maximumUnits(self, B: List[List[int]], T: int) -> int:\n"," B.sort(key=lambda x: x[1], reverse=True)\n"," ans = 0\n"," for b,n in B:\n"," boxes = min(b, T)\n"," ans += boxes * n\n"," T -= boxes\n"," if T == 0: return ans\n"," return ans\n","\n"," "]},{"cell_type":"code","source":[""],"metadata":{"id":"w_e4D3vcVO8M"},"execution_count":null,"outputs":[]}]}
|
|
@ -0,0 +1 @@
|
|||
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Merge Intervals(56).ipynb","provenance":[],"authorship_tag":"ABX9TyPLNkDlxD68AxVO2CjjAmsW"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# 56. Merge Intervals\n","Medium\n","\n","Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.\n"," \n","Example 1:\n","Input: intervals = [[1,3],[2,6],[8,10],[15,18]]\n","Output: [[1,6],[8,10],[15,18]]\n","Explanation: Since intervals [1,3] and [2,6] overlap, merge them into [1,6].\n","\n","Example 2:\n","Input: intervals = [[1,4],[4,5]]\n","Output: [[1,5]]\n","Explanation: Intervals [1,4] and [4,5] are considered overlapping.\n","\n"," \n","Constraints:\n","1 <= intervals.length <= 104\n","intervals[i].length == 2\n","0 <= starti <= endi <= 104\n"],"metadata":{"id":"RVkPngGz960v"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"UGH7xlpb95bU"},"outputs":[],"source":[""]}]}
|
|
@ -0,0 +1 @@
|
|||
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Number of Provinces (547).ipynb","provenance":[],"authorship_tag":"ABX9TyPu1aY+cOeg5Poif8p8a8gH"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# Problem 547. Number of Provinces\n","\n","There are n cities. Some of them are connected, while some are not. If city ais connected directly with city b, and city b is connected directly with city c, then city a is connected indirectly with city c.\n","A province is a group of directly or indirectly connected cities and no other cities outside of the group.\n","You are given an n x n matrix isConnected where isConnected[i][j] = 1 if the ith city and the jth city are directly connected, and isConnected[i][j] = 0 otherwise.\n","Return the total number of provinces.\n"," \n","Example 1:\n","\n","Input: isConnected = [[1,1,0],[1,1,0],[0,0,1]]\n","Output: 2\n","\n","Example 2:\n","\n","Input: isConnected = [[1,0,0],[0,1,0],[0,0,1]]\n","Output: 3\n","\n"," \n","Constraints:\n","1 <= n <= 200\n","n == isConnected.length\n","n == isConnected[i].length\n","isConnected[i][j] is 1 or 0.\n","isConnected[i][i] == 1\n","isConnected[i][j] == isConnected[j][i]\n"],"metadata":{"id":"_1UGGadq9wNI"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"xNWavXK-9pml"},"outputs":[],"source":[""]}]}
|
|
@ -0,0 +1 @@
|
|||
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Robot in a circle (1041).ipynb","provenance":[],"mount_file_id":"1N6CVDK8RDLCw51gS-qTRMVTM2LUAoUSd","authorship_tag":"ABX9TyMfx0mRceDnoVgQg541ZY3a"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# 1041. Robot in a Circle\n","\n","On an infinite plane, a robot initially stands at (0, 0) and faces north. Note that:\n","The north direction is the positive direction of the y-axis.\n","The south direction is the negative direction of the y-axis.\n","The east direction is the positive direction of the x-axis.\n","The west direction is the negative direction of the x-axis.\n","The robot can receive one of three instructions:\n","\"G\": go straight 1 unit.\n","\"L\": turn 90 degrees to the left (i.e., anti-clockwise direction).\n","\"R\": turn 90 degrees to the right (i.e., clockwise direction).\n","The robot performs the instructionsgiven in order, and repeats them forever.\n","Return true if and only if there exists a circle in the plane such that the robot never leaves the circle.\n"," \n","Example 1:\n","Input: instructions = \"GGLLGG\"\n","Output: true\n","Explanation: The robot is initially at (0, 0) facing the north direction.\n","\"G\": move one step. Position: (0, 1). Direction: North.\n","\"G\": move one step. Position: (0, 2). Direction: North.\n","\"L\": turn 90 degrees anti-clockwise. Position: (0, 2). Direction: West.\n","\"L\": turn 90 degrees anti-clockwise. Position: (0, 2). Direction: South.\n","\"G\": move one step. Position: (0, 1). Direction: South.\n","\"G\": move one step. Position: (0, 0). Direction: South.\n","Repeating the instructions, the robot goes into the cycle: (0, 0) --> (0, 1) --> (0, 2) --> (0, 1) --> (0, 0).\n","Based on that, we return true.\n","\n","Example 2:\n","Input: instructions = \"GG\"\n","Output: false\n","Explanation: The robot is initially at (0, 0) facing the north direction.\n","\"G\": move one step. Position: (0, 1). Direction: North.\n","\"G\": move one step. Position: (0, 2). Direction: North.\n","Repeating the instructions, keeps advancing in the north direction and does not go into cycles.\n","Based on that, we return false.\n","\n","Example 3:\n","Input: instructions = \"GL\"\n","Output: true\n","Explanation: The robot is initially at (0, 0) facing the north direction.\n","\"G\": move one step. Position: (0, 1). Direction: North.\n","\"L\": turn 90 degrees anti-clockwise. Position: (0, 1). Direction: West.\n","\"G\": move one step. Position: (-1, 1). Direction: West.\n","\"L\": turn 90 degrees anti-clockwise. Position: (-1, 1). Direction: South.\n","\"G\": move one step. Position: (-1, 0). Direction: South.\n","\"L\": turn 90 degrees anti-clockwise. Position: (-1, 0). Direction: East.\n","\"G\": move one step. Position: (0, 0). Direction: East.\n","\"L\": turn 90 degrees anti-clockwise. Position: (0, 0). Direction: North.\n","Repeating the instructions, the robot goes into the cycle: (0, 0) --> (0, 1) --> (-1, 1) --> (-1, 0) --> (0, 0).\n","Based on that, we return true.\n","\n"," \n","Constraints:\n","1 <= instructions.length <= 100\n","instructions[i] is 'G', 'L'\n"],"metadata":{"id":"XiAC8FSd7ezE"}},{"cell_type":"code","execution_count":5,"metadata":{"id":"s3jO-ovb7K4m","executionInfo":{"status":"ok","timestamp":1656786251777,"user_tz":240,"elapsed":219,"user":{"displayName":"Shwetha Jayaraj","userId":"01455478857425759475"}}},"outputs":[],"source":["class Solution:\n"," def isRobotBounded(self, instructions: str) -> bool:\n"," x = 0\n"," y = 0\n"," d = 0\n"," directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]\n","\n"," for instruction in instructions:\n"," if instruction == 'G':\n"," x += directions[d][0]\n"," y += directions[d][1]\n"," elif instruction == 'L':\n"," d = (d + 3) % 4\n"," else:\n"," d = (d + 1) % 4\n","\n"," return (x, y) == (0, 0) or d > 0\n"]}]}
|
|
@ -0,0 +1 @@
|
|||
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"RunLengthEncoding.ipynb","provenance":[],"authorship_tag":"ABX9TyPUnEszduwA02MLOUSNCrqj"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# Problem statement: Run-length encoding is a fast and simple method of encoding strings. The basic idea is to represent repeated successive characters as a single count and character. For example, the string \"AAAABBBCCDAA\" would be encoded as \"4A3B2C1D2A\".\n","Implement run-length encoding and decoding. You can assume the string to be encoded have no digits and consists solely of alphabetic characters. You can assume the string to be decoded is valid"],"metadata":{"id":"8CyZfl83RfPm"}},{"cell_type":"code","execution_count":34,"metadata":{"id":"4C8nYe_TRZFa","executionInfo":{"status":"ok","timestamp":1657480478655,"user_tz":240,"elapsed":206,"user":{"displayName":"Shwetha Jayaraj","userId":"01455478857425759475"}}},"outputs":[],"source":["def runlength(x):\n"," \n"," encoded = []\n"," count_lc=[i+1 for l in x]\n","\n"," for letter in enumerate(x, start=0):\n"," if letter == letter + 1: \n"," count_lc \n","\n"," print(count_lc + letter)\n"]},{"cell_type":"code","source":["runlength(\"AAALLLLNNN\")"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":294},"id":"Q3igp4nGU6oC","executionInfo":{"status":"error","timestamp":1657480487155,"user_tz":240,"elapsed":288,"user":{"displayName":"Shwetha Jayaraj","userId":"01455478857425759475"}},"outputId":"85f71018-5fc8-4b99-8fcb-66750db8ab4d"},"execution_count":35,"outputs":[{"output_type":"error","ename":"TypeError","evalue":"ignored","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)","\u001b[0;32m<ipython-input-35-610396e24660>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mrunlength\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"AAALLLLNNN\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m","\u001b[0;32m<ipython-input-34-7b576001af01>\u001b[0m in \u001b[0;36mrunlength\u001b[0;34m(x)\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mcount_lc\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;36m1\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mletter\u001b[0m \u001b[0;32min\u001b[0m \u001b[0menumerate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstart\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcount_lc\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mletter\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m","\u001b[0;31mTypeError\u001b[0m: can only concatenate list (not \"tuple\") to list"]}]},{"cell_type":"code","source":[""],"metadata":{"id":"WDQ_jbQ4fGUT"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def solve(self, n):\n"," n = 5\n"," n = len(lst)\n"," lst = [i for i in len(range())]\n"," for i in range(lst):\n"," print(sum(i))"],"metadata":{"id":"r1d7p9i5jkiX","executionInfo":{"status":"ok","timestamp":1657514543697,"user_tz":240,"elapsed":162,"user":{"displayName":"Shwetha Jayaraj","userId":"01455478857425759475"}}},"execution_count":19,"outputs":[]},{"cell_type":"code","source":["last = \n","lst = [i +2 for in range(1,)]"],"metadata":{"id":"3m0HPpRgn4p4"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["length = n #the amount of items in array\n","list = a"],"metadata":{"id":"Zvycj7-MwnIk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[""],"metadata":{"id":"ghbZRMzWj0Is"},"execution_count":null,"outputs":[]}]}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue