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
f := fake.NewSimpleClientset(objects...) | |
f.PrependReactor( | |
"patch", | |
"deployments", | |
func(action clienttesting.Action) (handled bool, ret runtime.Object, err error) { | |
pa := action.(clienttesting.PatchAction) | |
if pa.GetPatchType() == types.ApplyPatchType { | |
// Apply patches are supposed to upsert, but fake client fails if the object doesn't exist, | |
// if an apply patch occurs for a deployment that doesn't yet exist, create it. | |
// However, we already hold the fakeclient lock, so we can't use the front door. |
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
# export KUBE_SCHEDULER_CONFIG_PATH=~/go_project/kube-scheduler-simulator/extender-policy.yaml | |
apiVersion: kubescheduler.config.k8s.io/v1beta2 | |
kind: KubeSchedulerConfiguration | |
leaderElection: | |
leaderElect: false | |
profiles: | |
- schedulerName: default-scheduler | |
extenders: | |
- urlPrefix: "http://localhost:8080/scheduler/" | |
filterVerb: "predicates/always_true" |
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 | |
name=$1 | |
gzip -cd $name > out | |
./selector.sh out |
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
result = [] | |
File.open("q2.txt","r") do |f| | |
bytes = f.readline.split(" ") | |
LEN = 16 | |
# key = "6059204266803763" | |
key ="0"*32 | |
if key.length !=32 | |
p "長さが違うよ" | |
return |
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
result = [] | |
File.open("q.txt","r") do |f| | |
bytes = f.readline.split(" ") | |
LEN = 16 | |
# key = "6059204266803763" | |
key ="0"*16 | |
if key.length !=16 | |
p "長さが違うよ" | |
return |
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
#include <Uefi.h> | |
#include <Library/UefiLib.h> | |
#include <Library/UefiBootServicesTableLib.h> | |
#include <Library/PrintLib.h> | |
#include <Library/BaseMemoryLib.h> | |
#include <Library/MemoryAllocationLib.h> | |
#include <Protocol/LoadedImage.h> | |
#include <Protocol/SimpleFileSystem.h> | |
#include "Memory_map.h" | |
//省略.. |
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
<?php | |
if (empty($_POST['ext']) || empty($_POST['name'])) { | |
// Missing parameter(s) | |
header("HTTP/1.1 404 Not Found"); | |
print("404 Not Found"); | |
exit; | |
} else { | |
$ext = strtolower($_POST['ext']); // Extension | |
$name = strtolower($_POST['name']); // Filename | |
} |
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
require 'sinatra' | |
require 'securerandom' | |
require 'fileutils' | |
set :environment, :production | |
before do | |
if Dir.exists?("workdir") | |
du = `du -s workdir`.split[0].to_i | |
if du * 512 >= 1024 * 1024 * 10 |
NewerOlder