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
var n = 100000; | |
var result =0; // no of sub-game played | |
var record = 0; | |
function play(){ | |
for (i=0;i<n;i++){ | |
play3(); | |
record = record + result; | |
result = 0; | |
} |
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 | |
# set Autocomplete on | |
# use zsh auto completion instead | |
# echo "set completion-ignore-case On" >> ~/.inputrc | |
# install xcode command tool | |
## install | |
xcode-select --install | |
## check |
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 | |
import ( | |
"fmt" | |
"strings" | |
"sync" | |
"github.com/PuerkitoBio/goquery" | |
) |
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 auth is a handler wrapper for authentication | |
*/ | |
package auth | |
import ( | |
"encoding/base64" | |
"encoding/json" | |
"net/http" | |
"strings" |
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 jsonAPI | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
type MessageResponse struct { | |
Message string `json:"message"` |
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
var form = FormApp.openByUrl("paste_the_link_of_the_form_here") | |
var students = [{"classcode":"1A","classno":1,"name":"Apple"}, | |
{"classcode":"1A","classno":2,"name":"Ball"}, | |
{"classcode":"1A","classno":3,"name":"Cat"}, | |
{"classcode":"1A","classno":4,"name":"Dog"}, | |
{"classcode":"1A","classno":5,"name":"Egg"}, | |
{"classcode":"1A","classno":6,"name":"Fan"}, | |
{"classcode":"1A","classno":7,"name":"Goat"}, | |
{"classcode":"1A","classno":8,"name":"Hand"}, | |
{"classcode":"1A","classno":9,"name":"Indian"}, |
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
# https://www.waveshare.com/rpi-ir-cut-camera.htm | |
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setwarnings(False) | |
LDR_PIN = 11 | |
POWER_SUPPLY = 13 |
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/python3 | |
# -*- coding: utf-8 -*- | |
""" | |
ZetCode PyQt5 tutorial | |
This is a Tetris game clone. | |
Author: Jan Bodnar | |
Website: zetcode.com |
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 sys | |
import re | |
from math import log, floor | |
query = sys.argv[1] | |
# query = """ | |
# - [Riverbank | Software | PyQt | What is PyQt?](https://riverbankcomputing.com/software/pyqt/intro) | |
# - [![image](https://www.riverbankcomputing.com/@@/resources/logo.png)](https://riverbankcomputing.com/software/pyqt/intro) | |
# """ |
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
var app = Application.currentApplication() | |
app.includeStandardAdditions = true | |
files = app.chooseFile({ | |
withPrompt: 'Pick the files to process:', | |
multipleSelectionsAllowed: true | |
}) | |
delay(0.5) |
OlderNewer