Search is not available for this dataset
repo_id stringlengths 12 110 | file_path stringlengths 24 164 | content stringlengths 3 89.3M | __index_level_0__ int64 0 0 |
|---|---|---|---|
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/breadcrumbs/breadcrumbs.stories.tsx | import { ComponentMeta } from "@storybook/react";
import Breadcrumbs, { BreadcrumbItem } from "design-system/components/breadcrumbs";
export default {
title: "Components/Breadcrumbs",
component: Breadcrumbs,
parameters: {
design: {
type: "figma",
url: "https://www.figma.com/file/tLrz5T82EKYMnqgvn... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/media/index.tsx | import React from "react";
import MuiAvatar from "@mui/material/Avatar";
export type MediaProps = {
variant?: "square" | "circle" | "portrait" | "landscape";
size?: 16 | 24 | 32 | 48 | 64 | 96 | 144 | 180;
src?: string;
fallbackIcon?: React.ReactNode;
};
const Media = ({ variant = "square", size = 16, src, f... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/media/media.stories.tsx | import { ComponentMeta, ComponentStory } from "@storybook/react";
import Media, { MediaProps } from "design-system/components/media";
import * as Icons from "design-system/icons";
import { SvgIcon } from "..";
export default {
title: "Components/Media",
component: Media,
parameters: {
design: {
type: ... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/switch/switch.stories.tsx | import { ComponentMeta, ComponentStory } from "@storybook/react";
import Switch, { SwitchProps } from ".";
export default {
title: "Components/Switch",
component: Switch,
parameters: {
design: {
type: "figma",
url: "https://www.figma.com/file/tLrz5T82EKYMnqgvnk1Ldo/UILibrary?node-id=57007%3A7670... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/switch/index.tsx | import React, { ChangeEvent } from "react";
import MuiSwitch, { SwitchProps as MuiSwitchProps } from "@mui/material/Switch";
import { useTheme } from "@mui/material/styles";
import { InfoIconWithHelpTooltip, Stack, Typography } from "..";
type ColorProp = string | ((theme: any) => string);
export type SwitchProps =... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/text-field/constants.ts | export const BORDER_COLOR = "rgba(0,0,0,0.26)";
| 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/text-field/index.tsx | import React, { ChangeEventHandler, ReactNode, useEffect } from "react";
import { CircularProgress, InputProps } from "@mui/material";
import MuiOutlinedInput, { OutlinedInputProps as MuiOutlinedInputProps } from "@mui/material/OutlinedInput";
import { useTheme } from "@mui/material/styles";
import { Box, Stack } fro... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/text-field/NumberInputButtons.tsx | import { Button } from "@mui/material";
import { Stack } from "..";
import { ArrowDropDownOutlined, ArrowDropUpOutlined } from "../../icons";
import { BORDER_COLOR } from "./constants";
type NumberInputButtonsProps = {
onIncreaseClick: () => void;
onDecreaseClick: () => void;
};
export default function NumberInp... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/text-field/text-field.stories.tsx | import { ComponentMeta, ComponentStory } from "@storybook/react";
import TextField, { TextFieldProps } from "design-system/components/text-field";
import * as Icons from "design-system/icons";
import { SvgIcon } from "..";
export default {
title: "Components/TextField",
component: TextField,
parameters: {
d... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/tabs/tabs.stories.tsx | import { ComponentMeta, ComponentStory } from "@storybook/react";
import Tabs, { TabItem, TabsProps } from "design-system/components/tabs";
export default {
title: "Components/Tabs",
component: Tabs,
parameters: {
design: {
type: "figma",
url: "https://www.figma.com/file/tLrz5T82EKYMnqgvnk1Ldo/UI... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/tabs/index.tsx | import { MouseEventHandler, ReactNode, useEffect, useState } from "react";
import { TabContext } from "@mui/lab";
import { BoxProps, Tab as MuiTab, TabProps as MuiTabProps, Tabs as MuiTabs } from "@mui/material";
import { useTheme } from "@mui/material/styles";
import { useLocation, useNavigate } from "react-router-do... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/tabs/index.spec.tsx | import { mount } from "@cypress/react";
import { PrerenderableTabPanel } from ".";
describe("PrerenderableTabPanel", () => {
/**
* Having "display: none" or "visibility: hidden" or having size smaller than 4px in any dimension
* disables a lot of web preloading features. We want to avoid this for our prerende... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/button/index.tsx | import { MouseEventHandler, ReactNode } from "react";
import { ArrowDropDownRounded } from "@mui/icons-material";
import { Button as MuiButton, ButtonProps as MuiButtonProps } from "@mui/material";
import { useTheme } from "@mui/material/styles";
import { useNavigate } from "react-router-dom";
import { Box, CircularP... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/button/button.stories.tsx | import { ComponentMeta, ComponentStory } from "@storybook/react";
import Button, { ButtonProps } from "design-system/components/button";
import * as Icons from "design-system/icons";
import { SvgIcon } from "..";
export default {
title: "Components/Button",
component: Button,
parameters: {
design: {
t... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/select/index.tsx | import React, { ReactNode, useEffect, useState } from "react";
import { Typography } from "@mui/material";
import MuiTextField, { TextFieldProps as MuiTextFieldProps } from "@mui/material/TextField";
import { useTheme } from "@mui/material/styles";
import { Box, MenuItem, Stack } from "../";
import { CheckCircle, Dan... | 0 |
public_repos/lightning-ui/src/design-system/components | public_repos/lightning-ui/src/design-system/components/select/select.stories.tsx | import { ComponentMeta, ComponentStory } from "@storybook/react";
import Select, { SelectProps } from "design-system/components/select";
import * as Icons from "design-system/icons";
import { LockRounded, SupervisorAccountRounded } from "design-system/icons";
import { SvgIcon } from "..";
export default {
title: "C... | 0 |
public_repos/lightning-ui/src/design-system | public_repos/lightning-ui/src/design-system/stories/Introduction.stories.mdx | import { Meta } from "@storybook/addon-docs";
import Code from "./assets/code-brackets.svg";
import Colors from "./assets/colors.svg";
import Comments from "./assets/comments.svg";
import Direction from "./assets/direction.svg";
import Flow from "./assets/flow.svg";
import Plugin from "./assets/plugin.svg";
import Rep... | 0 |
public_repos/lightning-ui/src/design-system/stories | public_repos/lightning-ui/src/design-system/stories/assets/colors.svg | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/colors</title><g id="illustration/colors" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><circle id="Oval" cx="23.763" cy="16.192" r="13.271" fi... | 0 |
public_repos/lightning-ui/src/design-system/stories | public_repos/lightning-ui/src/design-system/stories/assets/stackalt.svg | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/stackalt</title><g id="illustration/stackalt" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#FFAE00" d="M23.862... | 0 |
public_repos/lightning-ui/src/design-system/stories | public_repos/lightning-ui/src/design-system/stories/assets/code-brackets.svg | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/code-brackets</title><g id="illustration/code-brackets" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#87E6E5" ... | 0 |
public_repos/lightning-ui/src/design-system/stories | public_repos/lightning-ui/src/design-system/stories/assets/plugin.svg | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/plugin</title><g id="illustration/plugin" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#79C9FC" d="M26,15.3994... | 0 |
public_repos/lightning-ui/src/design-system/stories | public_repos/lightning-ui/src/design-system/stories/assets/direction.svg | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/direction</title><g id="illustration/direction" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#FFD476" d="M23.4... | 0 |
public_repos/lightning-ui/src/design-system/stories | public_repos/lightning-ui/src/design-system/stories/assets/repo.svg | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/repo</title><g id="illustration/repo" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Rectangle-62-Copy" fill="#B7F0EF" d="M27.2217723,... | 0 |
public_repos/lightning-ui/src/design-system/stories | public_repos/lightning-ui/src/design-system/stories/assets/flow.svg | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/flow</title><g id="illustration/flow" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#79C9FC" fill-rule="nonzero... | 0 |
public_repos/lightning-ui/src/design-system/stories | public_repos/lightning-ui/src/design-system/stories/assets/comments.svg | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/comments</title><g id="illustration/comments" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Path" fill="#96D07C" d="M2.52730803,17.91... | 0 |
public_repos/lightning-ui/src/design-system/stories | public_repos/lightning-ui/src/design-system/stories/assets/empty-list.svg | <svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_67930_31816)">
<path d="M49.1691 27.3101H28.7891V30.3401H49.1691V27.3101Z" fill="url(#paint0_linear_67930_31816)"/>
<path d="M19.5896 32.9098C19.9296 32.9998 20.2696 33.0398 20.6096 33.0398C22.4896 3... | 0 |
public_repos/lightning-ui | public_repos/lightning-ui/cypress/tsconfig.json | {
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
},
"include": ["**/*.ts"]
}
| 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/support/commands.js | // ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***************************... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/support/index.js | // ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// au... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/integration/app-view.spec.ts | const stateEndpoint = "http://localhost:7501/api/v1/state";
describe("Lightning App View", () => {
describe("app with no UI components", () => {
beforeEach(() => {
cy.intercept("GET", stateEndpoint, { fixture: "lightning/app-state-no-routes.json" }).as("getLightningState");
});
it("fetches the app... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/fixtures/app-state--single-tab-layout.json | {
"vars": {
"_layout": [
{
"name": null,
"content": "root.c1.c11"
}
]
},
"calls": {},
"flows": {
"c2": {
"vars": {
"_layout": [
{
"name": "My Dashboard",
"content": "root.c2.c21"
},
{
"name": ... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/fixtures/app-state--no-layout.json | {
"vars": {
"counter": 0
},
"calls": {},
"flows": {
"slack": {
"vars": {},
"calls": {},
"flows": {},
"works": {},
"changes": {},
"storage": {
"shared_access": {},
"root": "/home/alec/work/PyTorchLightning/lightning/storage/1234/slack",
"transfe... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/fixtures/app-state--running--no-layout.json | {
"vars": {
"counter": 0
},
"calls": {},
"flows": {
"slack": {
"vars": {},
"calls": {},
"flows": {},
"works": {},
"changes": {},
"storage": {
"shared_access": {},
"root": "/home/alec/work/PyTorchLightning/lightning/storage/1234/slack",
"transfe... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/fixtures/app-spec--simple-layout.json | [
{
"affiliation": ["root"],
"cls_name": "Root",
"module": "__main__",
"docstring": "Initialize self. See help(type(self)) for accurate signature.",
"hardware": null
},
{
"affiliation": ["root", "c1"],
"cls_name": "C1",
"module": "__main__",
"docstring": "Initialize self. See... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/fixtures/app-state--running--simple-layout.json | {
"vars": {
"_layout": [
{
"name": "My Dashboard",
"content": "root.c1.c11"
},
{
"name": "Tab_2",
"content": "root.c2"
},
{
"name": "Logs & Metrics",
"content": "https://lightning.ai",
"target": "https://lightning.ai"
}
... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/fixtures/app-state--simple-layout.json | {
"vars": {
"_layout": [
{
"name": "My Dashboard",
"content": "root.c1.c11"
},
{
"name": "Tab_2",
"content": "root.c2"
},
{
"name": "Logs & Metrics",
"content": "https://lightning.ai",
"target": "https://lightning.ai"
}
... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/fixtures/app-state--stopping--no-layout.json | {
"vars": {
"counter": 0
},
"calls": {},
"flows": {
"slack": {
"vars": {},
"calls": {},
"flows": {},
"works": {},
"changes": {},
"storage": {
"shared_access": {},
"root": "/home/alec/work/PyTorchLightning/lightning/storage/1234/slack",
"transfe... | 0 |
public_repos/lightning-ui/cypress | public_repos/lightning-ui/cypress/plugins/index.js | const cracoConfig = require("../../craco.config.js");
const devServer = require("@cypress/react/plugins/craco");
module.exports = (on, config) => {
devServer(on, config, cracoConfig);
return config;
};
| 0 |
public_repos/lightning-ui | public_repos/lightning-ui/public/index.html | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>Lightning.ai</title>
<meta name="description" content="Lightning.ai" />
<link rel="icon" type="image/svg+xml" href="%PUBLIC_URL%/static/f... | 0 |
public_repos/lightning-ui/public | public_repos/lightning-ui/public/static/lightningState.js | (function () {
const channel = new MessageChannel();
// We use document.referrer to get parent container's url
window.parent.postMessage("Establish communication", document.referrer, [channel.port2]);
class LightningState {
static subscribe(componentHandler) {
channel.port1.onmessage = message => {
... | 0 |
public_repos/lightning-ui/public | public_repos/lightning-ui/public/static/robots.txt | # https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
| 0 |
public_repos/lightning-ui/public | public_repos/lightning-ui/public/static/manifest.json | {
"short_name": "Lightning.ai",
"name": "Lightning.ai",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/svg+xml"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
| 0 |
public_repos/lightning-ui | public_repos/lightning-ui/.storybook/preview.js | import React from "react";
// Required to get theme propagated in storybook see https://github.com/mui/material-ui/issues/24282#issuecomment-952211989
import { ThemeProvider as EmotionThemeProvider } from "emotion-theming";
import { BrowserRouter } from "react-router-dom";
import SnackbarProvider from "../src/design-... | 0 |
public_repos/lightning-ui | public_repos/lightning-ui/.storybook/main.js | module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/preset-create-react-app",
"storybook-addon-designs",
],
framework: "@storybook/reac... | 0 |
public_repos/lightning-ui | public_repos/lightning-ui/.storybook/preview-head.html | <style>
@import url("/style.css");
</style>
| 0 |
public_repos/lightning-ui | public_repos/lightning-ui/.husky/pre-commit.sh | #!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
| 0 |
public_repos | public_repos/dl-fundamentals/README.md | # Deep Learning Fundamentals: Code Materials and Exercises
*This repository contains code materials & exercises for Deep Learning Fundamentals course by [Sebastian Raschka](https://sebastianraschka.com) and [Lightning AI](https://lightning.ai).*
- Link to the course website: https://lightning.ai/pages/courses... | 0 |
public_repos/dl-fundamentals | public_repos/dl-fundamentals/unit01-ml-intro/README.md | Coming soon!
| 0 |
public_repos/dl-fundamentals/unit01-ml-intro | public_repos/dl-fundamentals/unit01-ml-intro/1.6-perceptron-in-python/perceptron-part2.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro | public_repos/dl-fundamentals/unit01-ml-intro/1.6-perceptron-in-python/perceptron_toydata-truncated.txt | x1 x2 label
0.77 -1.14 0
-0.33 1.44 0
0.91 -3.07 0
-0.37 -1.91 0
-0.63 -1.53 0
0.39 -1.99 0
-0.49 -2.74 0
-0.68 -1.52 0
-0.10 -3.43 0
-0.05 -1.95 0
3.88 0.65 1
0.73 2.97 1
0.83 3.94 1
1.59 1.25 1
1.14 3.91 1
1.73 2.80 1
1.31 1.85 1
1.56 3.85 1
1.23 2.54 1
1.33 2.03 1
| 0 |
public_repos/dl-fundamentals/unit01-ml-intro | public_repos/dl-fundamentals/unit01-ml-intro/1.6-perceptron-in-python/perceptron-part1.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro | public_repos/dl-fundamentals/unit01-ml-intro/1.6-perceptron-in-python/perceptron-part3.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/1.6-perceptron-in-python | public_repos/dl-fundamentals/unit01-ml-intro/1.6-perceptron-in-python/images/perceptron-part2.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/1.6-perceptron-in-python | public_repos/dl-fundamentals/unit01-ml-intro/1.6-perceptron-in-python/images/perceptron-part3.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises/solutions | public_repos/dl-fundamentals/unit01-ml-intro/exercises/solutions/unit01_excercise_3/solution_ex3_learning-rate.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises/solutions | public_repos/dl-fundamentals/unit01-ml-intro/exercises/solutions/unit01_excercise_1/solution_ex1_early-stop.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises/solutions | public_repos/dl-fundamentals/unit01-ml-intro/exercises/solutions/unit01_excercise_2/solution_ex2_random-weights.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises | public_repos/dl-fundamentals/unit01-ml-intro/exercises/2_random-weights/perceptron_toydata-truncated.txt | x1 x2 label
0.77 -1.14 0
-0.33 1.44 0
0.91 -3.07 0
-0.37 -1.91 0
-0.63 -1.53 0
0.39 -1.99 0
-0.49 -2.74 0
-0.68 -1.52 0
-0.10 -3.43 0
-0.05 -1.95 0
3.88 0.65 1
0.73 2.97 1
0.83 3.94 1
1.59 1.25 1
1.14 3.91 1
1.73 2.80 1
1.31 1.85 1
1.56 3.85 1
1.23 2.54 1
1.33 2.03 1
| 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises | public_repos/dl-fundamentals/unit01-ml-intro/exercises/2_random-weights/README.md | # EXERCISES
## Exercise 2: Initialize the model parameters with small random numbers instead of 0's
Modify the Perceptron class in Section 4 such that it initializes the weights and bias unit using small random numbers (detailed instructions are provided in the notebook). Then observe how it affects the training perf... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises | public_repos/dl-fundamentals/unit01-ml-intro/exercises/2_random-weights/exercise_2_random-weights.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises | public_repos/dl-fundamentals/unit01-ml-intro/exercises/3_learning-rate/exercise_3_learning-rate.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises | public_repos/dl-fundamentals/unit01-ml-intro/exercises/3_learning-rate/perceptron_toydata-truncated.txt | x1 x2 label
0.77 -1.14 0
-0.33 1.44 0
0.91 -3.07 0
-0.37 -1.91 0
-0.63 -1.53 0
0.39 -1.99 0
-0.49 -2.74 0
-0.68 -1.52 0
-0.10 -3.43 0
-0.05 -1.95 0
3.88 0.65 1
0.73 2.97 1
0.83 3.94 1
1.59 1.25 1
1.14 3.91 1
1.73 2.80 1
1.31 1.85 1
1.56 3.85 1
1.23 2.54 1
1.33 2.03 1
| 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises | public_repos/dl-fundamentals/unit01-ml-intro/exercises/3_learning-rate/README.md | # EXERCISES
## Exercise 3: Use a learning rate for updating the weights and bias unit
Modify the `Perceptron` class using a so-called *learning rate* for updating the weights and bias unit. The learning rate is a setting for adjusting the magnitude of the weight and bias unit updates. Changing the learning rate can a... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises | public_repos/dl-fundamentals/unit01-ml-intro/exercises/1_early-stop/perceptron_toydata-truncated.txt | x1 x2 label
0.77 -1.14 0
-0.33 1.44 0
0.91 -3.07 0
-0.37 -1.91 0
-0.63 -1.53 0
0.39 -1.99 0
-0.49 -2.74 0
-0.68 -1.52 0
-0.10 -3.43 0
-0.05 -1.95 0
3.88 0.65 1
0.73 2.97 1
0.83 3.94 1
1.59 1.25 1
1.14 3.91 1
1.73 2.80 1
1.31 1.85 1
1.56 3.85 1
1.23 2.54 1
1.33 2.03 1
| 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises | public_repos/dl-fundamentals/unit01-ml-intro/exercises/1_early-stop/README.md | # EXERCISES
## Exercise 1: Add early-stopping to make the Perceptron more efficient.
In its original implementation, the perceptron completes the number of epochs specified via the `epochs` argument:
```python
def train(model, all_x, all_y, epochs):
...
```
However, this can result in executing too many unneces... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro/exercises | public_repos/dl-fundamentals/unit01-ml-intro/exercises/1_early-stop/exercise_1_early-stop.ipynb | # !conda install numpy pandas matplotlib --yes# !conda install watermark%load_ext watermark
%watermark -v -p numpy,pandas,matplotlibimport pandas as pd
df = pd.read_csv("perceptron_toydata-truncated.txt", sep="\t")
dfX_train = df[["x1", "x2"]].values
y_train = df["label"].valuesX_trainX_train.shapey_trainy_train.shape... | 0 |
public_repos/dl-fundamentals/unit01-ml-intro | public_repos/dl-fundamentals/unit01-ml-intro/python-setup-guide/README.md | # Python Setup Guide
There are several different ways you can install Python and set up your computing environment. Here, I am illustrating my personal preference.
(I am using computers running macOS, but this workflow is similar for Linux machines and may work for other operating systems as well.)
## 1. Downlo... | 0 |
public_repos/dl-fundamentals | public_repos/dl-fundamentals/errata/README.md | There are currently no known issues :)
| 0 |
public_repos/dl-fundamentals/errata | public_repos/dl-fundamentals/errata/old_errata/README.md | # Old Errata (Already Addressed)
## Unit 1.4
**Video 3**
The minus sign is flipped in unit 1.4 video 3. It should be -1.14 instead of 1.14. [[See discussion](https://github.com/Lightning-AI/dl-fundamentals/discussions/10#discussion-4672374)]
**Video 4**
Flip x1, x2 3:19 onwards, see [#22](https://github.com/Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.6-transfer-learning/shared_utilities.py | import lightning as L
import matplotlib.pyplot as plt
import pandas as pd
import torch
import torch.nn.functional as F
import torchmetrics
from torch.utils.data import DataLoader
from torch.utils.data.dataset import random_split
from torchvision import datasets, transforms
class LightningModel(L.LightningModule):
... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.6-transfer-learning/7.6-part-3-resnet18-transfer-finetune-all.ipynb | %load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.6-transfer-learning/7.6-part-3-resnet18-baseline.ipynb | %load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.6-transfer-learning/7.6-part-3-resnet18-transfer-last-layer-only.ipynb | %load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.7-self-supervised/7.7-part-5-resnet18-baseline.ipynb | %load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.7-self-supervised/7.7-part-5-resnet18-finetune.ipynb | %load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.7-self-supervised/7.7-part-4-SimCLR.ipynb | %load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.5-data-aug/shared_utilities.py | import lightning as L
import matplotlib.pyplot as plt
import pandas as pd
import torch
import torch.nn.functional as F
import torchmetrics
from torch.utils.data import DataLoader
from torch.utils.data.dataset import random_split
from torchvision import datasets, transforms
class LightningModel(L.LightningModule):
... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.5-data-aug/7.5-part-3-resnet18-augmented.ipynb | %load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.5-data-aug/7.5-part-2-resnet18-augmented-viz.ipynb | %load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.5-data-aug/7.5-part-3-resnet18-baseline.ipynb | %load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import Li... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision/exercises | public_repos/dl-fundamentals/unit07-computer-vision/exercises/solution/training.py | import lightning as L
from lightning.pytorch.loggers import CSVLogger
import torch
import torchvision
from local_utilities import LightningModel, TinyImageNetDataModule, plot_csv_logger, get_model_list
def train_model(resnet_type, augmentation):
model_name = f"tiny-imagenet-{resnet_type}-{augmentation}"
print(... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision/exercises | public_repos/dl-fundamentals/unit07-computer-vision/exercises/solution/README.md | # Solution - Tiny ImageNet
## Code
* `local_utilities.py`: contains the DataModule for Tiny ImageNet and other utility functions. It assumes Tiny ImageNet dataset has been downloaded and put in the './tiny-imagenet-200' directory.
* `training.py`: the main python code that trains the models.
* `tiny-imagenet-resnet.ip... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision/exercises | public_repos/dl-fundamentals/unit07-computer-vision/exercises/solution/local_utilities.py | import lightning as L
import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
import torch
import torch.nn.functional as F
import torchmetrics
from PIL import Image
from torch.utils.data import Dataset, DataLoader
from torch.utils.data.dataset import random_split
from torchvision import transfo... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision/exercises | public_repos/dl-fundamentals/unit07-computer-vision/exercises/solution/tiny-imagenet-resnet.ipynb | from local_utilities import get_model_list
get_model_list()import matplotlib.pyplot as plt
import numpy as np
import torch
import torchvision
from local_utilities import LightningModel, TinyImageNetDataModule
dm = TinyImageNetDataModule(height_width=(224, 224), batch_size=64, num_workers=0)
dm.prepare_data()
dm.setup(... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision/exercises | public_repos/dl-fundamentals/unit07-computer-vision/exercises/exercise-1-imagenet/local_dataset_utilities.py | import os
import sys
import tarfile
import time
import numpy as np
import pandas as pd
from packaging import version
from torch.utils.data import Dataset
from tqdm import tqdm
import urllib
def reporthook(count, block_size, total_size):
global start_time
if count == 0:
start_time = time.time()
... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision/exercises | public_repos/dl-fundamentals/unit07-computer-vision/exercises/exercise-1-imagenet/README.md | # Exercise 1: ImageNet Classification
In this exercise, we are going to train a classifier on the the ImageNet dataset. In particular, we will be using the Large Scale Visual Recognition Challenge (ILSVRC) 2012 image classification dataset of ImageNet, which is one of the most widely used subsets.
First, you ne... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision/exercises | public_repos/dl-fundamentals/unit07-computer-vision/exercises/exercise-1-imagenet/local_utilities.py | import lightning as L
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import torch
import torch.nn.functional as F
import torchmetrics
class LightningModel(L.LightningModule):
def __init__(self, model, learning_rate):
super().__init__()
self.learning_rate = learning_rate
... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.4-cnn-training/7.4-part-1-mlp.ipynb | %load_ext watermark
%watermark -p torch,lightning --condaimport lightning as L
import torch
import torchvision
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import LightningModel, MnistDataMod... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.4-cnn-training/7.4-part-5-resnet-torchhub.ipynb | import torch
entrypoints = torch.hub.list('pytorch/vision', force_reload=True)
for e in entrypoints:
print(e)pytorch_model = torch.hub.load("pytorch/vision", "resnet18", weights=None)%load_ext watermark
%watermark -p torch,lightning,torchvisionimport lightning as L
import torch
import torchvision
import torch.nn a... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.4-cnn-training/7.4-part-2-cnn.ipynb | %load_ext watermark
%watermark -p torch,lightning --condaimport lightning as L
import torch
import torchvision
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import LightningModel, MnistDataMod... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.4-cnn-training/shared_utilities.py | import lightning as L
import matplotlib.pyplot as plt
import pandas as pd
import torch
import torch.nn.functional as F
import torchmetrics
from torch.utils.data import DataLoader
from torch.utils.data.dataset import random_split
from torchvision import datasets, transforms
class LightningModel(L.LightningModule):
... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.4-cnn-training/7.4-part-4-resnet-scratch.ipynb | %load_ext watermark
%watermark -p torch,lightningimport lightning as L
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchmetrics
from lightning.pytorch.loggers import CSVLogger
import matplotlib.pyplot as plt
import numpy as np
from shared_utilities import LightningModel... | 0 |
public_repos/dl-fundamentals/unit07-computer-vision | public_repos/dl-fundamentals/unit07-computer-vision/7.4-cnn-training/7.4-part-3-inspect-cifar10.ipynb | %load_ext watermark
%watermark -v -p numpy,pandas,matplotlib,torch,torchvision,lightning --condaimport lightning as L
from shared_utilities import Cifar10DataModule
L.pytorch.seed_everything(123)
dm = Cifar10DataModule(batch_size=64)
dm.prepare_data()
dm.setup()import numpy as np
import matplotlib.pyplot as plt
impor... | 0 |
public_repos/dl-fundamentals | public_repos/dl-fundamentals/unit02-pytorch-tensors/README.md | Coming soon!
| 0 |
public_repos/dl-fundamentals/unit02-pytorch-tensors | public_repos/dl-fundamentals/unit02-pytorch-tensors/2.3-using-tensors/top10-tensor-commands.ipynb | import torch
m = torch.tensor([[1., 2., 3.],
[4., 5., 6.]])
print(v)print(m)print(m.shape)print(m)print(m.ndim)print(len(m.shape))print(m)print(m.dtype)other_m = torch.tensor([[1, 2, 3],
[4, 5, 6]])
print(other_m)print(other_m.dtype)import numpy as np
np_ary = np.array([1., ... | 0 |
public_repos/dl-fundamentals/unit02-pytorch-tensors | public_repos/dl-fundamentals/unit02-pytorch-tensors/2.4-linalg/2.4-linalg-part1.ipynb | b = 0.
x = [1.2, 2.2]
w = [3.3, 4.3]
output = b
for x_j, w_j in zip(x, w):
output += x_j * w_j
print(output)import torch
b = torch.tensor([0.])
x = torch.tensor([1.2, 2.2])
w = torch.tensor([3.3, 4.3])
x.dot(w) + bdef plain_python(x, w, b):
output = b
for x_j, w_j in zip(x, w):
output += x_j... | 0 |
public_repos/dl-fundamentals/unit02-pytorch-tensors | public_repos/dl-fundamentals/unit02-pytorch-tensors/2.4-linalg/2.4-linalg-part4.ipynb | import torcha = torch.tensor([1.1, 2.1, 3.1, 4.1])
b = torch.tensor([5.4, 5.5, 5.6, 5.7])
a + bA = torch.tensor([[1.1, 2.1, 3.1, 4.1],
[1.2, 2.2, 3.2, 4.2]])
b = torch.tensor([5.4, 5.5, 5.6, 5.7])
A + b | 0 |
public_repos/dl-fundamentals/unit02-pytorch-tensors | public_repos/dl-fundamentals/unit02-pytorch-tensors/2.4-linalg/2.4-linalg-part3.ipynb | import torch
X = torch.rand(100, 10)
W = torch.rand(50, 10)
R = torch.matmul(X, W.T)R.shape | 0 |
public_repos/dl-fundamentals/unit02-pytorch-tensors | public_repos/dl-fundamentals/unit02-pytorch-tensors/2.4-linalg/2.4-linalg-part2.ipynb | b = 0.
X = [[1.2, 2.2],
[4.4, 5.5]]
w = [3.3, 4.3]
outputs = []
for x in X:
output = b
for x_j, w_j in zip(x, w):
output += x_j * w_j
outputs.append(output)
outputsimport torch
b = torch.tensor([0.])
X = torch.tensor(
[[1.2, 2.2],
[4.4, 5.5]]
)
w = torch.tensor([3.3, 4.3])
X.m... | 0 |
public_repos/dl-fundamentals/unit02-pytorch-tensors | public_repos/dl-fundamentals/unit02-pytorch-tensors/2.5-debugging/2.5-debugging.ipynb | import random
random.seed(123)
b = 0.
X = [[random.random() for _ in range(1000)] # 500 rows
for i in range(500)]
w = [random.random() for _ in range(1000)]
X[10][10] = 'a'def my_func(X, w, b):
outputs = []
for x in X:
output = b
for x_j, w_j in zip(x, w):
output += x_j * w_... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.