Skip to content

Instantly share code, notes, and snippets.

View NISH1001's full-sized avatar
💭
Staring into the abyss...

Nish NISH1001

💭
Staring into the abyss...
View GitHub Profile
@aparrish
aparrish / index.md
Last active December 2, 2021 13:26
Writing Poetry with Procedure: A Workshop

Writing Poetry with Procedure: A Workshop

Led by Allison Parrish

Description

Practitioners in the field of procedural writing have been using rules, procedures and computer programs to create innovative literary work since the invention of the digital computer. Far from the bland imitation evoked by the phrase "computer-generated poetry," these techniques facilitate the creation of work with aesthetic and emotional affordances sometimes difficult to achieve through conventional compositional techniques: serendipitous beauty, precisely imitative satire, vertiginous wonder at the infinite. In this workshop, participants will learn about the history of computer-generated writing and sample a range of off-the-shelf, freely-available tools on the web to create their own—without writing any actual lines of code. No previous programming experience is required.

Outline

@danijar
danijar / blog_tensorflow_sequence_classification.py
Last active December 24, 2021 03:53
TensorFlow Sequence Classification
# Example for my blog post at:
# https://danijar.com/introduction-to-recurrent-networks-in-tensorflow/
import functools
import sets
import tensorflow as tf
def lazy_property(function):
attribute = '_' + function.__name__
@rauchg
rauchg / README.md
Last active December 30, 2025 06:51
require-from-twitter
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active January 29, 2026 17:42
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@mitallast
mitallast / console output
Last active October 16, 2019 11:50
Example Naive Bayes Classifier with Apache Spark Pipeline
+--------+--------------------+-----+--------------------+--------------------+--------------------+--------------------+----------+
|category| text|label| words| features| rawPrediction| probability|prediction|
+--------+--------------------+-----+--------------------+--------------------+--------------------+--------------------+----------+
| 3001|Плойки и наборы V...| 24.0|[плойки, и, набор...|(10000,[326,796,1...|[-174.67716870697...|[6.63481663197049...| 24.0|
| 833|"Чехол-обложка дл...| 1.0|["чехол-обложка, ...|(10000,[514,986,1...|[-379.37151502387...|[5.32678001676623...| 1.0|
| 833|"Чехол-обложка дл...| 1.0|["чехол-обложка, ...|(10000,[514,986,1...|[-379.84825219376...|[2.15785456821554...| 1.0|
| 833|"Чехол-обложка дл...| 1.0|["чехол-обложка, ...|(10000,[290,514,9...|[-395.42735009477...|[6.44323423370500...| 1.0|
| 833|"Чехол-обложка дл...| 1.0|["чехол-обложка, ...|(10000,[290,514,9...|[-396.10251348
@sfujiwara
sfujiwara / cg.py
Created December 31, 2015 19:47
conjugate gradient method implemented with python
# -*- coding: utf-8 -*-
import numpy as np
from scipy.sparse.linalg import cg
import tensorflow as tf
import time
def conjugate_grad(A, b, x=None):
"""
@arturmkrtchyan
arturmkrtchyan / get_job_status.sh
Last active October 22, 2024 05:45
Apache Spark Hidden REST API
curl http://spark-cluster-ip:6066/v1/submissions/status/driver-20151008145126-0000
@ahmetalsan
ahmetalsan / cosine.py
Last active May 29, 2024 23:44
python cosine similarity algorithm between two strings
import re
import math
from collections import Counter
def get_cosine(vec1, vec2):
intersection = set(vec1.keys()) & set(vec2.keys())
numerator = sum([vec1[x] * vec2[x] for x in intersection])
sum1 = sum([vec1[x]**2 for x in vec1.keys()])
@yusugomori
yusugomori / Dropout.py
Last active March 13, 2023 05:46
Dropout Neural Networks (with ReLU)
# -*- coding: utf-8 -*-
import sys
import numpy
numpy.seterr(all='ignore')
'''