This file contains hidden or 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 operator | |
| from langgraph.graph import StateGraph, START, END | |
| from langgraph.types import Send | |
| from typing import Annotated, TypedDict | |
| import openai | |
| class State(TypedDict): | |
| topics: list[str] | |
| queries: Annotated[list[str], operator.add] |
This file contains hidden or 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 json | |
| class Network(nn.Module): | |
| def __init__(self, image_width, image_height): | |
| super().__init__() | |
| self.image_width = image_width | |
| self.image_height = image_height | |
| self.conv1 = nn.Conv2d(3, 32, 3) | |
| self.conv2 = nn.Conv2d(32, 16, 3) |
This file contains hidden or 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 json | |
| def evaluate_models(models_to_evaluate): | |
| data_dir = polit_path | |
| image_datasets = {x: datasets.ImageFolder(os.path.join(data_dir, x), | |
| data_transforms[x]) | |
| for x in ['train', 'val']} | |
| dataloaders = {x: torch.utils.data.DataLoader(image_datasets[x], batch_size=16, | |
| shuffle=True, num_workers=4) | |
| for x in ['train', 'val']} |
This file contains hidden or 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
| { | |
| "ADS": { | |
| "transformOptions": { | |
| "transformers": [ | |
| { | |
| "transformerType": "ParserTransformer", | |
| "input": { | |
| "typeName": "FileParserTransformerInput", | |
| "order": 0, | |
| "fileParsers": [ |
This file contains hidden or 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 React, { Component } from 'react'; | |
| import { connect } from 'react-redux'; | |
| import { Button } from 'reactstrap'; | |
| import styled from 'styled-components'; | |
| import cloneDeep from 'lodash.clonedeep' | |
| import { withBus } from 'react-bus'; | |
| import { extractDeepValue } from '../../utils'; | |
| import { | |
| FETCH_COLLECTION | |
| } from '../../actions'; |
This file contains hidden or 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
| function fetchFiles(path) { | |
| return new Promise(function(resolve, reject) { | |
| // Fetch started. Listing all files from the user specific directory. | |
| ftp.ls(path, function(err, res) { | |
| if(err || res.length === 0) return reject(); | |
| // Close the ftp connection | |
| ftp.destroy(); | |
| // Iterating files list | |
| async.mapSeries(res, function(file, callback) { | |
| let buffer = false; |
This file contains hidden or 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 djongo import models | |
| from django import forms | |
| userStatusEnum = ( | |
| ('pending', 'pending'), | |
| ('active', 'active'), | |
| ('removed', 'removed'), | |
| ) | |
| userTypeEnum = ( | |
| ('buyer', 'buyer'), |