Skip to content

Instantly share code, notes, and snippets.

View zygm0nt's full-sized avatar
🥑
AFK

Marcin Cylke zygm0nt

🥑
AFK
View GitHub Profile
@zygm0nt
zygm0nt / Lens.java
Created April 4, 2021 19:17 — forked from mathieuancelin/Lens.java
Lenses with Java 8
package bar.foo.lenses;
import java.util.function.BiFunction;
import java.util.function.Function;
public class Lens<A, B> {
private final Function<A, B> getter;
private final BiFunction<A, B, A> setter;

This is a big list of alternative shells! (As opposed to the common POSIX-ish shells like bash and zsh)

Some of them are more like languages, and some are more interactive. Some are active and some are dormant. They are written in many different languages.

This wiki page is EDITABLE. If you know of another significant or interesting shell, please add a link. If it's a DSL embedded in another language (like Python), add it to [[Internal DSLs for Shell]].

Related: [[ExternalResources]]

Active Alternative Shell Languages

@zygm0nt
zygm0nt / how_to_run.md
Last active May 4, 2024 21:13
Schotter_Georg-Nees - rectangles

Run with BBC Basic. Eg. with brandy emulator.

brandy -lo schotter
[JavaScript Error: "Error: Only 0 translators present in cache. Resetting
at Object.init (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/translators.js:87:20)
at Object.update (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/translators.js:256:41)
at _handleResponse (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:178:23)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:162:4"]
[JavaScript Error: "Error: Code could not be retrieved for ecddda2e-4fc6-4aea-9f17-ef3b56d7377a
at _haveCode (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:101:20)
at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/repo.js:89:6"]
scala> case class Category(
| path: String,
| id: String,
| name: Option[String] = None
| )
defined class Category
scala> case class BaseItem(id: ItemId,
| userId: Option[String],
| category: Option[Category],
class X:
def read_all_sessions(self):
all_sessions = []
for file_path in tqdm(
iterable=[os.path.join(self.input()[0].path, f_name) for f_name in
os.listdir(self.input()[0].path)],
mininterval=1.0, desc='Loading sessions'):
with gzip.open(file_path) as stream:
for l in stream:
@zygm0nt
zygm0nt / repackage.scala
Created January 26, 2018 10:37
repartition small files on hdfs
import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.spark.sql.SparkSession
object App {
def lsFiles(path: String, ss: SparkSession) = {
FileSystem.get(ss.sparkContext.hadoopConfiguration).listStatus(new Path(path)).toSeq.map {
_.getPath.toString
}
@zygm0nt
zygm0nt / cytoscape-facade.scala
Created November 6, 2017 08:11
cytoscape-facade.scala
import org.scalajs.dom.html.{Div, Element}
import scala.scalajs.js
import scala.scalajs.js.annotation.JSName
package object graph {
@js.native
@JSName("cytoscape")
object CytoscapeStatic extends js.Object {
@zygm0nt
zygm0nt / RecsysTutorial.ipynb
Created September 1, 2017 10:04
ALS + XGBoost tutorial
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zygm0nt
zygm0nt / CirceSupport.scala
Created August 3, 2017 22:42 — forked from mattroberts297/CirceSupport.scala
Akka HTTP Circe Custom Marshaller and Unmarshaller
import io.circe._
import io.circe.parser._
import io.circe.syntax._
import akka.http.scaladsl.marshalling.{Marshaller, ToEntityMarshaller}
import akka.http.scaladsl.model.{ContentTypeRange, HttpEntity}
import akka.http.scaladsl.model.MediaTypes.`application/json`
import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller}
import scala.concurrent.Future