×

- Doodstream: S1056

Share This f l Translate this page

- Doodstream: S1056

nbrs = NearestNeighbors(n_neighbors=3, algorithm='brute', metric='euclidean').fit(video_features) distances, indices = nbrs.kneighbors(query_features)

from flask import Flask, jsonify from sklearn.neighbors import NearestNeighbors import numpy as np S1056 - DoodStream

# Return recommended video IDs return jsonify(indices[0].tolist()) nbrs = NearestNeighbors(n_neighbors=3

app = Flask(__name__)

if __name__ == '__main__': app.run(debug=True) This example would need significant expansion and integration with a real database and user interaction system but illustrates a basic approach to developing a feature for DoodStream like S1056. S1056 - DoodStream

@app.route('/recommend', methods=['GET']) def recommend(): # Assume user provides a video ID and we fetch its features video_id = 0 # Example video ID query_features = video_features[video_id].reshape(1, -1)

About the Author

Elaine Chiew is a fiction writer and visual arts researcher. She is a two-time winner of The Bridport Prize, amidst other prizes and shortlistings. Her debut short story collection, The Heartsick Diaspora, will be coming out with Myriad Editions (U.K.). She is also the compiler and editor of Cooked Up: Food Fiction From Around the World (New Internationalist, 2015), and has had numerous stories in anthologies and journals. She also writes flash fiction (named Wigleaf Top 50 twice, along other honours). In October 2017, she was the Writer in Residence at Singapore’s premier School of the Arts. She received an M.A. in Asian Art Histories from Goldsmiths, University of London in 2017. In addition to writing freelance on Asian visual arts for magazines like ArtReview Asia, she also blogs about contemporary Asian writers at AsianBooksBlog and the visual arts on her blog, Invisible Flâneuse.

About the Artist

Fanny Cammaert is a digital artist living in Belgium. She adopted the stage name Lizzie Stardust as a member of the electro group Velvet Underwear. Since recording and touring with that group, she began working in visual media. Drawing on the kilim weaving that is part of her Ukrainian heritage, her art explores the interplay of digital patterns and electronic glitches. Thematically, her work brings digital infinity into connection with human emotions.

This story appeared in Issue Sixty-Three of SmokeLong Quarterly.
SmokeLong Quarterly Issue Sixty-Three
ornament

Support SmokeLong Quarterly

Your donation helps writers, editors, reviewers, workshop leaders, and artists get paid for their work. If you’re enjoying what you read here, please consider donating to SmokeLong Quarterly today. We also give a portion of what we earn to the organizations on our "We Support" page.

  • S1056 - DoodStream
  • S1056 - DoodStream
  • S1056 - DoodStream
  • S1056 - DoodStream

Book Now!

SmokeLong Fitness – The Year-round Community Workshop of SmokeLong

S1056 - DoodStreamIn September 2022 SmokeLong launched a workshop environment/community christened SmokeLong Fitness. This community workshop is happening right now on our dedicated workshop site. If you choose to join us, you will work in a small group of around 15-20 participants to give and receive feedback on flash narratives—one new writing task each week.