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
package main | |
// dirty example to use go-orbitdb eventlog | |
import ( | |
"time" | |
"context" | |
"fmt" | |
"io" | |
"os" |
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
diff --git a/cpp/src/arrow/compute/kernels/row_encoder.cc b/cpp/src/arrow/compute/kernels/row_encoder.cc | |
index f553708cc..6a0862c0b 100644 | |
--- a/cpp/src/arrow/compute/kernels/row_encoder.cc | |
+++ b/cpp/src/arrow/compute/kernels/row_encoder.cc | |
@@ -63,13 +63,13 @@ Status KeyEncoder::DecodeNulls(MemoryPool* pool, int32_t length, uint8_t** encod | |
} | |
void BooleanKeyEncoder::AddLength(const ExecValue&, int64_t batch_length, | |
- int32_t* lengths) { | |
+ int64_t* lengths) { |
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
class wrapper_class: | |
def __init__(self, val, *args, **kwargs): | |
if callable(val): | |
self.val = val(*args,**kwargs) | |
else: | |
self.val = val | |
def __getattr__(self,*args, **kwargs): | |
return self.val.__getattribute__(*args, **kwargs) | |
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 python3 | |
# mmverify.py -- Proof verifier for the Metamath language | |
# Copyright (C) 2002 Raph Levien raph (at) acm (dot) org | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License | |
# To run the program, type | |
# $ python3 mmverify.py < set.mm 2> set.log | |
# and set.log will have the verification results. |
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
ft232h ftdi_usb_get_string doesnt work with libftdi if the manufacturer serial or product code in eeprom is not ascii | |
therefore the python swig binding ftdi1 usbget_strings doesnt work either | |
and the adafruit_gpio.FT232H | |
todo: | |
fix in libftdi | |
or reprogra ft232h eeprom |
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
def linear_list_remove(target, elems_to_remove): | |
''' careful, this is not always correct because hash collisions | |
removes list elements from list in O(1) ''' | |
mp = {} | |
for i in elems_to_remove: | |
mp[i] = 1 #remove linebreak | |
ret_list = [] | |
for i in target: |
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 tensorflow as tf | |
#import keras # works, but wants tf.contrib.eager.Variable for eager execution somewhere | |
from tensorflow import keras # <- errors on padding='causal' | |
import numpy as np | |
#tf.enable_eager_execution() # | |
data = np.random.random([1,1,256]) | |
leaky_relu = tf.nn.leaky_relu |
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
def atrous_conv1d(value, filters, rate, padding, name=None): | |
'''wrapper for tf.nn.convolution to atrous_conv1d | |
lets you choose the filters | |
usage: | |
b = tf.placeholder(shape=(None, 1, 4096,1), dtype=tf.float32) | |
atrous_conv1d(b, filters=tf.ones((1, 4096, 1)),rate=2, padding='VALID') | |
b = tf.placeholder(shape=(None, 4096), dtype=tf.float32) | |
atrous_conv1d(b, filters=tf.ones((1, 4096, 1)),rate=2, padding='VALID') | |
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 Html exposing(..) | |
main = | |
Html.program | |
{ init = init, | |
view = view, | |
update = update, | |
subscriptions = subscriptions | |
} |
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
#!/bin/bash | |
#delete all ipfs pins script | |
#dont forget chmod | |
a=`ipfs pin ls --type=recursive | awk '{print $1;}' ` | |
for pins in $a | |
do |
NewerOlder