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 lark import Lark | |
l = Lark(''' | |
?start: elixir_item | json_value | xml | node | |
/////////////////////// | |
// JSON | |
?json_value: json_object | |
| json_array |
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 requests | |
from slackclient import SlackClient | |
DAYS = 1 | |
FTL_URL = "https://backend.thefoodtruckleague.com/events/?days=%s&name=" % DAYS | |
SLACK_TOKEN = "" | |
def post_food_trucks_for_the_day(): | |
sc = SlackClient(SLACK_TOKEN) |
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
var g = 7; | |
var p = [ | |
0.99999999999980993, | |
676.5203681218851, | |
-1259.1392167224028, | |
771.32342877765313, | |
-176.61502916214059, | |
12.507343278686905, | |
-0.13857109526572012, | |
9.9843695780195716e-6, |
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
CREATE FUNCTION levenshtein(s1 varchar, s2 varchar) RETURNS integer IMMUTABLE AS $$ | |
import numpy as np | |
# https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#Python | |
def levenshtein(source, target): | |
source = source or "" | |
target = target or "" | |
if len(source) < len(target): | |
return levenshtein(target, source) |
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 random | |
import numpy as np | |
from sacred import Experiment | |
ex = Experiment() | |
@ex.config | |
def config(): | |
n_sims = 1000 |
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
set nocompatible | |
filetype on "make sure it's on first, otherwise bad exit code | |
filetype off "Required for Vundle | |
" Using vundle | |
" Install with git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle | |
set rtp+=~/.vim/bundle/vundle | |
call vundle#begin() |
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
#!/usr/bin/env python | |
# !/usr/bin/env python | |
from __future__ import division, print_function | |
import random | |
import sys | |
from datetime import datetime | |
import numpy as np | |
import slackweb |
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 org.apache.spark.ml.Transformer | |
import org.apache.spark.ml.param.{ ParamMap, Param } | |
import org.apache.spark.ml.util.{ Identifiable, DefaultParamsWritable, DefaultParamsReadable } | |
import org.apache.spark.sql.functions.{ udf, col } | |
import org.apache.spark.sql.types.{ StructType, StructField, DoubleType } | |
import org.apache.spark.sql.{ Dataset, DataFrame } | |
object EditDistance extends DefaultParamsReadable[EditDistance] { | |
override def load(path: String): EditDistance = super.load(path) |
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
#!/usr/local/bin/python | |
# !/usr/bin/env python | |
from __future__ import division, print_function | |
import random | |
import sys | |
from datetime import datetime | |
import numpy as np | |
import slackweb |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.