Skip to content

Instantly share code, notes, and snippets.

  
  // Make a 10 point question and set feedback on it
  var item = FormApp.getActiveForm().addCheckboxItem();
  item.setTitle("What flavors are in neapolitan ice cream?");
  item.setPoints(10);
  
  // chocolate, vanilla, and strawberry are the correct answers
  item.setChoices([
 item.createChoice("chocolate", true),
function setUpTrigger(){
ScriptApp.newTrigger('submit').forForm('Your Google Form ID').onFormSubmit().create();
}
function submit(event) {
var itemResponses = event.response.getItemResponses();
var order = '';
var firstName = '';
var lastName = '';
Array.from(document.querySelectorAll('div table table td[width="570"] table:nth-child(11)')[0]
    .querySelector('tr table')
    .querySelectorAll('tr')).filter((e, idx) => {
    return idx != 0
}).map((e) => {
    return e.querySelector('td:nth-child(8)').textContent
        .replace('(--)', '')
        .replace(',', '')
 .replace("--", "0")
=LOWER(
CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))&
CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))&
CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))&
CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))&
CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))&
CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))&
CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))&
CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))&
@nrm176
nrm176 / hannari-python-11.md
Created August 12, 2020 15:51
hannari-python-11

https://www.kaggle.com/nerimplo111/lesson-pork/

df_2 = pd.read_sql("SELECT Year||month year_month, Country, Value total from ym_2018_2020 WHERE hs6 IN ('281111') AND Year >= 2019 ORDER BY ym DESC" ,conn)
plt.rcParams['figure.figsize']=(20,10)
sns.barplot(x="year_month", y="total", 
            data=df_2[ (df_2['Country'] == 103) ].groupby('year_month').sum().reset_index()).set_title('韓国へのエッチングガス輸出金額')
部門 社名 所在地 規模 製品・サービスの名称 連続受賞
機械・加工 ミクロン精密株式会社 ⼭形県 中⼩企業 ⼼なし研削盤(センタレスグラインダ)
機械・加工 レオン⾃動機株式会社 栃⽊県 中堅企業 包あん機(ある素材Aを異なる別な素材Bで包みこむ作業を⾃動でおこなう機械)
機械・加工 関東精機株式会社 群⾺県 中⼩企業 オイルマチック(⼯作機械向け油温⾃動調整機)
機械・加工 株式会社フコク 埼⽟県 中堅企業 新⾞装着⽤ワイパーブレードラバー(四輪⾞新⾞に取付けガラス⾯を拭くワイパーのゴム部分)
機械・加工 NITTOKU株式会社 埼⽟県 中堅企業 精密FAライン設備 Y
機械・加工 株式会社industria 埼⽟県 中⼩企業 FILSTAR(エレメントレスフィルター ⾃動⾞⽣産プロセス等に貢献する⽔の再利⽤装置システム)
機械・加工 株式会社ジャムコ 東京都 ⼤企業 ⼤型航空機・旅客機⽤ギャレー(厨房設備)、ラバトリー(化粧室)などの内装品
機械・加工 ユニオンツール株式会社 東京都 ⼤企業 プリント配線板⽤超硬ドリル(電気製品等の基板の⽳あけに使⽤)
機械・加工 ナブテスコ株式会社 東京都 ⼤企業 産業⽤ロボットの関節などに使⽤される精密減速機
Array.from(document.querySelectorAll('div#header_v tr')).map((e) => {
    return Array.from(e.querySelectorAll('td')).map((e) => {
        return e.textContent
    })
}).filter((e, idx) => {
    return e.length === 4
}).filter((e) => {
    return e[1].length === 7 && e[2] != ""
}).map((e) => {
@nrm176
nrm176 / hs6.md
Last active July 27, 2020 08:49
Array.from(document.querySelectorAll('div#header_v tr')).map((e) => {
    return Array.from(e.querySelectorAll('td')).map((e) => {
        return e.textContent
    })
}).filter((e, idx) => {
    return e.length === 4
}).filter((e) => {
    return e[1].length === 7 && e[2] === ""
}).map((e) => {
@nrm176
nrm176 / hs4.md
Last active July 27, 2020 08:37
Array.from(document.querySelectorAll('div#header_v tr')).map((e) => {
    return Array.from(e.querySelectorAll('td')).map((e) => {
        return e.textContent
    })
}).filter((e, idx) => {
    return e.length === 4
}).filter((e) => {
    return e[1].length === 5
}).map((e) => {