This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# update all packages unprompted | |
conda update --all -y | |
# list packages that can be updated | |
conda search --outdated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from micrograd.engine import Value | |
# Create a managed scalar value | |
x = Value(-4.0) | |
z = 2 * x + 2 + x # z = -10 | |
q = z.relu() + z * x # q = 40 | |
h = (z * z).relu() # h = 100 | |
y = h + q + q * x # y = -20 | |
# Compute gradients w.r.t. input values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from micrograd.nn import Neuron, Layer, MLP | |
model = MLP(2, [16, 16, 1]) # 2-layer neural network | |
for k in range(100): | |
# forward | |
total_loss, acc = loss() | |
# backward | |
model.zero_grad() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface User { | |
mail: string; | |
password: string; | |
nickName: string; | |
} | |
class UserService { | |
users: Array<User> = [ | |
{ mail: "[email protected]", password: "test", nickName: "test" }, | |
{ mail: "[email protected]", password: "admin", nickName: "admin" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Year = "1A" | "2A" | "3A"; | |
export interface Module { | |
id: string; | |
name: string; | |
description: string; | |
teacher: string; | |
year: Year; | |
imageUrl: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bitmap bmp; | |
Random rd = new Random(); | |
double xc1 = 200; | |
double yc1 = 200; | |
double rayon1 = 150; | |
double sigma1 = 5.0; | |
double xc2 = 350; | |
double yc2 = 220; | |
double rayon2 = 150; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Todo { | |
task: string; | |
completed: boolean; | |
} | |
class TodoService { | |
private todos: Array<Todo> = []; | |
// Return all todos asynchronously. Returns a Promise | |
getAll(): Promise<Array<Todo>> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AsyncStorage from "@react-native-async-storage/async-storage"; | |
export interface Todo { | |
task: string; | |
completed: boolean; | |
} | |
class TodoService { | |
// Return all todos asynchronously. Returns a Promise | |
async getAll(): Promise<Array<Todo>> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.DependencyInjection; | |
using MvcUniversity.Models; | |
namespace MvcUniversity.Data | |
{ | |
public static class SeedData | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.DependencyInjection; | |
using MvcUniversity.Models; | |
namespace MvcUniversity.Data | |
{ | |
public static class SeedData |