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
actor Flag { | |
var value = false | |
func free() { | |
value = false | |
} | |
func check() -> Bool { | |
if value == false { | |
value = true | |
return false |
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
class A: | |
def __init__(self, name): | |
self.name = name | |
def doit(self): | |
print(self.name + " doit by class A") | |
def dodo(self): | |
self.doit() |
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
def hoge(**kwargs): | |
print(a) | |
print(kwargs) | |
a = 10 | |
arg = {} | |
arg['a'] = 20 | |
hoge(**arg) |
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
// 接線の傾き | |
fn get_a(x:&f32) -> f32 { | |
return 3.0 * x * x + 2.0 * x + 2.0; | |
} | |
// 接線の切片 | |
fn get_b(x:&f32, n: &f32) -> f32 { | |
return x * x * x + x * x + 2.0 * x + (3.0 - n) - x * get_a(x); | |
} |
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
// | |
// ContentView.swift | |
// testswiftui | |
// | |
// Created by sonson on 2020/08/07. | |
// | |
import SwiftUI | |
import UIKit |
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 numpy as np | |
x_init = 1 | |
x = x_init | |
q = 0.6 | |
x_history = [x] | |
data_stream = [0, 1, 1, 1, 0, 0, 0, 1] |
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
proxy eth0 { | |
router no | |
timeout 500 | |
autowire yes | |
keepalive yes | |
retries 3 | |
ttl 30000 | |
rule ::/0 { | |
iface switch0.10 | |
} |
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/vbash | |
# copy to this file into | |
# /config/scripts/post-config.d | |
/ndppd/local/sbin/ndppd.initscript start |
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/sh | |
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing. | |
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then | |
set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script | |
fi | |
### BEGIN INIT INFO | |
# Provides: ndppd | |
# Required-Start: $remote_fs $syslog $network | |
# Required-Stop: $remote_fs $syslog $network |
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
{ | |
"configurations": [ | |
{ | |
"name": "Mac", | |
"includePath": [ | |
"${workspaceFolder}/**", | |
"/usr/local/opt/llvm/include/" | |
], | |
"defines": [], | |
"macFrameworkPath": [ |