Skip to content

Instantly share code, notes, and snippets.

JVBERi0xLjYNJeLjz9MNCjEzIDAgb2JqDTw8L0xpbmVhcml6ZWQgMS9MIDc3ODMwL08gMTUvRSA3
MzEzOS9OIDEvVCA3NzUxOS9IIFsgNDcxIDE5N10+Pg1lbmRvYmoNICAgICAgICAgICAgICAgICAg
DQoyNCAwIG9iag08PC9EZWNvZGVQYXJtczw8L0NvbHVtbnMgNC9QcmVkaWN0b3IgMTI+Pi9GaWx0
ZXIvRmxhdGVEZWNvZGUvSURbPEU0NzBDNzk0RjlGQ0RENDMxRTgwNzcxNkJBNzBGOTU0PjxDNkQ2
RUFDRjBCNkM0MzRGOTFEMEJDRENEMDJDNzUwMT5dL0luZGV4WzEzIDIwXS9JbmZvIDEyIDAgUi9M
ZW5ndGggNjgvUHJldiA3NzUyMC9Sb290IDE0IDAgUi9TaXplIDMzL1R5cGUvWFJlZi9XWzEgMiAx
XT4+c3RyZWFtDQpo3mJiZBBgYGJg6gESDLFAgnE/iJgKIs6DxOqABAsHkLjxD0iwHwKJtQMJiW4G
JkaGhSAuAyNu4j/joV8AAQYADyULAg0KZW5kc3RyZWFtDWVuZG9iag1zdGFydHhyZWYNCjANCiUl
RU9GDQogICAgICAgIA0KMzIgMCBvYmoNPDwvRmlsdGVyL0ZsYXRlRGVjb2RlL0kgMTI3L0xlbmd0
aCAxMDUvTyA4NS9TIDQxL1YgMTAxPj5zdHJlYW0NCmjeYmBg4GRgYDJhYGBglNrFgAqYgZiFgeMB
@nowox
nowox / test.html
Created January 7, 2019 19:00
Ajax Get
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="">
<head>
<title>Nestor</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="theme-color" content="#ffffff">
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import os
import socket
import subprocess
import sys
import json
import xml.etree.ElementTree as ET
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
WARNING:libopenzwave:Can't find options.xml in ../openzwave/config
DEBUG:openzwave:Create network object.
DEBUG:openzwave:Use sqlite version : ('3.16.2',)
INFO:openzwave:Start Openzwave network.
------------------------------------------------------------
Waiting for driver :
------------------------------------------------------------
.DEBUG:libopenzwave:notif_callback : new notification
DEBUG:libopenzwave:notif_callback : Notification type : 18, nodeId : 1
DEBUG:libopenzwave:notif_callback : call callback context
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /cygdrive/c/Users/Ycr/Home/bin/arm-none-eabi-gcc
Build flags:
Id flags:
The output was:
1
c:/program files (x86)/gnu tools arm embedded/5.4 2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status
0 ~/test $ git init
Initialized empty Git repository in /cygdrive/c/Users/Ycr/Home/test/.git/
0 ~/test $ cat .git/config
[core]
ignorecase = true
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
~ $ cd test
~/test $ git init
git clone --depth=1 --no-checkout ../sub sub
git submodule add ../sub sub
git submodule absorbgitdirs
# note there is no "submodule.sub.sparsecheckout" key
git -C sub config core.sparseCheckout true
echo bar >>.git/modules/sub/info/sparse-checkout
git submodule update subInitialized empty Git repository in /cygdrive/c/Users/Ycr/Home/ppp/test/.git/
~/test $ # I did not find a way to add submodule in 1 step without checking out
In [297]: d = {0: {'foo': {'a': 12.68, 'b': 54.44, 'c': 83.98},
...: 'bar': {'a': 11.73, 'b': 53.34, 'c': 82.93}},
...: 2: {'foo': {'a': 11.12, 'b': 57.99, 'c': 81.05},
...: 'bar': {'a': 10.05, 'b': 56.12, 'c': 80.01}},
...: 1: {'foo': {'a': 13.41, 'b': 54.32, 'c': 82.74},
...: 'bar': {'a': 12.77, 'b': 53.15, 'c': 82.01}}}
In [298]: ds = (pd.DataFrame.from_dict(d, orient='index')
...: .stack().apply(pd.Series)
...: .rename_axis(['experiment', 'setup']))
@nowox
nowox / gist:1d0165221ac17a6de071f51c5428b599
Last active March 28, 2017 14:49
Example with Pandas
In [119]: d = {
...: 'test1': {
...: 0: {'a': {'min': 1, 'mid': 12, 'max': 13},
...: 'b': {'min': 2, 'mid': 22, 'max': 23}},
...: 3: {'a': {'min': 3, 'mid': 32, 'max': 33},
...: 'b': {'min': 4, 'mid': 42, 'max': 43}},
...: 8: {'a': {'min': 5, 'mid': 52, 'max': 53},
...: 'b': {'min': 6, 'mid': 62, 'max': 63}},
...: },
...: 'test2': {