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 nvidia/cuda:9.2-cudnn7-devel-ubuntu18.04 | |
ENV NVIDIA_VISIBLE_DEVICES all | |
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility | |
ENV DEBIAN_FRONTEND noninteractive | |
# Install | |
RUN apt-get -qq update | |
RUN apt-get install -y cmake g++ |
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 | |
# -*- coding: UTF-8 -*- | |
# Roughly based on: http://stackoverflow.com/questions/11443302/compiling-numpy-with-openblas-integration | |
from __future__ import print_function | |
import numpy as np | |
from time import time |
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 numpy as np | |
from pandas.tseries.offsets import * | |
from collections import defaultdict | |
import statsmodels.api as sm | |
result_coefficient = defaultdict(lambda: defaultdict(dict)) | |
result_tvalues = defaultdict(lambda: defaultdict(dict)) | |
for x, intraday_data in dataset.items(): | |
intraday_data = intraday_data.set_index('time') | |
days = intraday_data.resample('B').count().volume | |
for day in days.index: |
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
cdef db_node_result_t db_node_run_sync(db_req_t *req) nogil: | |
cdef: | |
db_node_t *self = req.node | |
db_tick_t *tick = req.tick | |
self.enter_behavior(self, tick) | |
if db_is_node_open_from_req(req): | |
self.open_behavior(self, tick) |
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
### Forward declarations | |
ctypedef struct db_node_t | |
ctypedef struct db_tick_t | |
ctypedef struct db_tree_t | |
### Function definitions for behaviors and ticks | |
ctypedef void* (*db_node_behavior_cb)(db_node_t *self, db_tick_t *tick) nogil | |
ctypedef db_node_result_t (*db_node_tick_cb)(db_node_t *self, db_tick_t *tick) nogil | |
ctypedef struct db_tick_t: |
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 webpack = require('webpack') | |
var merge = require('webpack-merge') | |
var baseConfig = require('./webpack.base.conf') | |
var HtmlWebpackPlugin = require('html-webpack-plugin') | |
// add hot-reload related code to entry chunks | |
Object.keys(baseConfig.entry).forEach(function (name) { | |
baseConfig.entry[name] = ['./build/dev-client'].concat(baseConfig.entry[name]) | |
}) |
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 webpack = require('webpack') | |
var merge = require('webpack-merge') | |
var baseConfig = require('./webpack.base.conf') | |
var cssLoaders = require('./css-loaders') | |
var ExtractTextPlugin = require('extract-text-webpack-plugin') | |
var HtmlWebpackPlugin = require('html-webpack-plugin') | |
// whether to generate source map for production files. | |
// disabling this can speed up the build. | |
var SOURCE_MAP = true |
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
<template lang="jade"> | |
.wrapper | |
section.parallax-background(:style="parallaxStyle", :id="parallaxId") | |
.parallax-content(v-if="pcontent != 0") | |
slot | |
.scroll-down(v-if="pscrolldown != 0") | |
</template> | |
<script> | |
require('jeet') |
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 urllib2 | |
import pandas as pd | |
import json | |
dataframe = pd.DataFrame({'words': ['test', 'fornication']}) | |
dataframe.index = dataframe['words'] | |
def get_definition(word): | |
response = urllib2.urlopen('http://dictionaryapi.net/api/definition/' + word) | |
js = json.loads(response.read())[0] |