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
# # index.js | |
# var hello = require('./hello.coffee') | |
# console.log(hello()); | |
assert = require 'power-assert' | |
exec = require('child_process').exec | |
cmd = 'node index.js' |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Self Camera</title> | |
</head> | |
<body> | |
<video id="myVideo" width="400" height="300" autoplay="1" ></video> | |
<script type="text/javascript"> | |
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || window.navigator.mozGetUserMedia; |
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
//練習問題:最初と最後の文字が同じアルファベットであるランダムな5文字の文字列を1000回出力。 | |
new scala.util.Random( | |
new java.security.SecureRandom() | |
).alphanumeric | |
.grouped(5) | |
.withFilter { g5 => g5.head==g5.last && g5.head.toString >= "A" } | |
.take(10) | |
.foreach { vg5 => println(vg5.mkString) } |
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
public final class CASEPerson$ extends scala.runtime.AbstractFunction1<java.lang.String, CASEPerson> implements scala.Serializable { | |
public static final CASEPerson$ MODULE$; | |
public static {}; | |
public final java.lang.String toString(); | |
public CASEPerson apply(java.lang.String); | |
public scala.Option<java.lang.String> unapply(CASEPerson); | |
public java.lang.Object apply(java.lang.Object); | |
} |
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
public class CASEPerson implements scala.Product,scala.Serializable { | |
public static scala.Option<java.lang.String> unapply(CASEPerson); | |
public static <A> scala.Function1<java.lang.String, A> andThen(scala.Function1<CASEPerson, A>); | |
public static <A> scala.Function1<A, CASEPerson> compose(scala.Function1<A, java.lang.String>); | |
public java.lang.String name(); | |
public CASEPerson apply(java.lang.String); | |
public CASEPerson apply(); | |
public CASEPerson copy(java.lang.String); | |
public java.lang.String copy$default$1(); | |
public java.lang.String productPrefix(); |
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
function isInt(n) { | |
return n % 1 === 0; | |
} | |
var i, j; | |
var count = 0; | |
var uniq_d = {} | |
for (i = 1000; i >= 3; i--) { |
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
#!/usr/bin/env python | |
#encoding: utf-8 | |
#__author__ = 'actor2019' | |
import csv | |
import cStringIO | |
import itertools | |
# with open('test.csv', 'rb') as csvfile: | |
# spamreader = csv.reader(csvfile, delimiter=',', quotechar='|') |
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
# possible duplicate form entries | |
# step2: if have multiple matches, continue ========== well-done 11k->7k | |
from ngram import NGram | |
for e in iter(jp.find({'pt':0})): | |
e_keys=e.get('forms',{}).keys() | |
if e.get('senses_ja') or e.get('senses'): |
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
# # todo: remove entries marked with 'unknownFromNgram1' but `jp` have other entries matching their titles | |
for e in iter(jp.find({'pt': "unknownFromNgram1"})): | |
res= list(jp.find({'title':e['title']})) | |
if len(res)>1: | |
print e['title'],e['_id'] | |
if e.get('forms') or e.get('senses') or e.get('senses_ja'): | |
print u'mnf' | |
jp.remove( | |
{'_id':e['_id']} |
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
#!/usr/bin/env python | |
#encoding: utf-8 | |
from _dataCleanning import plCleaning | |
from _utilities import calCriteriaFromDC | |
def ruleGeneration(argWrapper, orDescriptors=None, dec=0): | |
if not orDescriptors: orDescriptors = [] | |
dataWrapper=argWrapper |