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
version: '3' | |
services: | |
jupyter: | |
image: jupyter/scipy-notebook:latest | |
ports: | |
- "8888:8888" | |
- "4040:4040" | |
volumes: | |
- .:/home/jovyan | |
environment: |
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
package com.serverless; | |
import java.util.Collections; | |
import java.util.Map; | |
import org.apache.log4j.Logger; | |
import com.amazonaws.services.lambda.runtime.Context; | |
import com.amazonaws.services.lambda.runtime.RequestHandler; |
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 collections import Counter | |
with open("test.txt") as f: | |
txt = f.read() | |
start = txt.find("------") + 7 | |
line_items = txt[start:].split("\n") | |
items = [x for x in line_items if x.startswith("-")] |
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 argparse | |
import os | |
import csv | |
from collections import namedtuple | |
apple_card_header = "Transaction Date,Clearing Date,Description,Merchant,Category,Type,Amount (USD)".split(",") | |
def apple_card_transform(row): | |
outflow = row[6] if row[5] == "Purchase" else None | |
inflow = row[6][1:] if row[5] == "Payment" else None |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Defaults / Configuration options for homebridge | |
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others) | |
HOMEBRIDGE_OPTS=-U /var/lib/homebridge | |
# If you uncomment the following line, homebridge will log more | |
# You can display this via systemd's journalctl: journalctl -f -u homebridge | |
# DEBUG=* |
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
<div class="questions-main-panel__list questions-main-panel__list--no-top-border" in-viewport=""><!----><div class="stretch-y ng-star-inserted"><!----><admin-event-questions-item class="ng-star-inserted"><div class="eq-item stretch-x"><div class="eq-item__header flex items-center flex-between"><div class="flex items-center"><!----><!----><admin-user-avatar class="eq-item__header-avatar ng-star-inserted"><div class="l-mr1 stretch-y stretch-x"><div class="flex flex-center flex-x-center stretch-y"><!----><!----><div class="ng-star-inserted"><svg-icon class="icon-size20 block"><g><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"></path></svg></g></svg-icon></div><!----></div></div></admin-user-avatar><div><div class="eq-item-header__text">Anonymous</div><div class="eq-item-header__sub-text"><!----><span class="eq-item-header__score ng-star-inserted">2<svg-icon class="icon-size12 f-medi |
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
<div class="questions-main-panel__list questions-main-panel__list--no-top-border" in-viewport=""><!----><div class="stretch-y ng-star-inserted"><!----><admin-event-questions-item class="ng-star-inserted"><div class="eq-item stretch-x"><div class="eq-item__header flex items-center flex-between"><div class="flex items-center"><!----><!----><admin-user-avatar class="eq-item__header-avatar ng-star-inserted"><div class="l-mr1 stretch-y stretch-x"><div class="flex flex-center flex-x-center stretch-y"><!----><!----><div class="ng-star-inserted"><svg-icon class="icon-size20 block"><g><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"></path></svg></g></svg-icon></div><!----></div></div></admin-user-avatar><div><div class="eq-item-header__text">Anonymous</div><div class="eq-item-header__sub-text"><!----><span class="eq-item-header__score ng-star-inserted">2<svg-icon class="icon-size12 f-medi |
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
(ns clojure-kata.prime) | |
(defn divisible [x y] (zero? (mod x y))) | |
(defn is-prime | |
([primes-before n] (not-any? (partial divisible n) primes-before))) | |
(defn next-prime | |
([primes-before n] (first (filter (partial is-prime primes-before) (iterate inc n))))) |
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 python:3.7 | |
WORKDIR /usr/src | |
RUN pip install scikit-learn==0.20.0 pandas==0.23.4 | |
COPY learn.py ./ | |
COPY run.sh ./ | |
CMD ["./run.sh"] |