Skip to content

Instantly share code, notes, and snippets.

Avatar

shibacow shibacow

View GitHub Profile
@shibacow
shibacow / main.py
Last active Oct 9, 2018
Ambient data logging system that send data to using micropython + bme280 via https://ambidata.io/ ref https://github.com/AmbientDataInc/ESP32SamplePrograms
View main.py
from machine import I2C, Pin,deepsleep
import utime
# from m5stack import lcd
# see bme280,ambient lib from https://github.com/AmbientDataInc/ESP32SamplePrograms/tree/master/Micropython
import bme280
import ambient
ssid = 'your_ssid'
password = 'your_wifi_password '
@shibacow
shibacow / calc_sim.py
Created Dec 10, 2017
pysparkで類似文章を求めてみた
View calc_sim.py
import sys,os
from pyspark.sql import SQLContext, Row
import pyspark.sql.functions as func
import logging
from pyspark import SparkContext
logger = logging.getLogger('py4j')
from optparse import OptionParser
parser = OptionParser()
@shibacow
shibacow / .env
Last active Nov 26, 2017
Cloud pubsub検証用コード
View .env
TOPIC='[TOPIC_NAME]'
GOOGLE_CLOUD_PROJECT='[PROJECT_ID]'
SUBSCRIBE='[SUBSCRIBER_NAME]'
MONGO_DB='MONGO_DB_NAME'
JSON_KEY='PATH_TO_JSON_KEY'
View HPL.dat
root@****:~/prog/hpl-2.0_FERMI_v15/bin/CUDA# more HPL.dat
HPLinpack benchmark input file
Innovative Computing Laboratory, University of Tennessee
HPL.out output file name (if any)
7 device out (6=stdout,7=stderr,file)
1 # of problems sizes (N)
65536 73728 60000 40000 50000 60000 39007 39000 20960 364160 359424 276480 138240 115200 23040 354432 236160 95040 9600 20737
16129 16128 Ns
3 # of NBs
2048 1536 1024 512 384 640 768 896 960 1024 1152 1280 384 640 960 768 640 256 960 512 768 1152 NBs
View test.sql
select strftime_utc_usec(upload_time,"%Y-%m") as umonth,
count(1)
FROM [nicodata.video]
GROUP BY umonth
order by umonth;
View comment.json
[{"mode": "NULLABLE",
"name": "video_id",
"type": "STRING"},
{"mode": "NULLABLE",
"name": "date",
"type": "TIMESTAMP"},
{"mode": "NULLABLE",
"name": "content",
"type": "STRING"},
{"mode": "NULLABLE",
@shibacow
shibacow / fetch_law.py
Created Sep 13, 2017
e-Gov法令検索 http://elaws.e-gov.go.jp/download/lawdownload.html から法令データの一括ダウンロードを行う。10秒のインターバルをしている
View fetch_law.py
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import requests
from pyquery import PyQuery as pq
from datetime import datetime
import re
import os
import shutil
import time
@shibacow
shibacow / aws_ec2_price.py
Created Jun 19, 2017
get aws ec2 spot instance price
View aws_ec2_price.py
#!/usr/bin/env python
# -coding:utf-8 -*-
import requests
import re
import json
from pprint import pprint
import subprocess
import sys
import os
from datetime import datetime
View HedlessSample.java
/**
*
*/
package hello_world;
import java.awt.Color;
import java.io.File;
import java.io.IOException;
import org.gephi.appearance.api.AppearanceController;
import org.gephi.appearance.api.AppearanceModel;
@shibacow
shibacow / HeadlessSimple.java
Last active Feb 14, 2017
gephi-toolkit-sample
View HeadlessSimple.java
/**
*
*/
package hello_world;
import java.awt.Color;
import java.io.File;
import java.io.IOException;
import org.gephi.appearance.api.AppearanceController;
import org.gephi.appearance.api.AppearanceModel;
You can’t perform that action at this time.