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
#!python3 | |
from bs4 import BeautifulSoup | |
import requests | |
import sys | |
# Usage: | |
# $ python3 deck2csv.py <url> | |
def main(): | |
url = sys.argv[1] | |
res = requests.get(url) |
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
#define PAGE_OFFSET_MASK (~(~0UL << PAGE_SHIFT)) | |
unsigned long page_table_walk(unsigned long addr, struct mm_struct *mm_str) | |
{ | |
pgd_t *pgd; | |
p4d_t *p4d; | |
pud_t *pud; | |
pmd_t *pmd; | |
pte_t *pte; | |
unsigned long pfn, phys_page_addr, page_offset, phys_addr; |
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
#pragma kernel CSMain | |
Texture2D<float4> srcTex; | |
RWTexture2D<float4> dstTex; | |
[numthreads(32, 32, 1)] | |
void CSMain(uint3 id : SV_DispatchThreadID) { | |
float4 up = srcTex[id.xy + int2(0, 1)]; | |
float4 down = srcTex[id.xy + int2(0, -1)]; | |
float4 left = srcTex[id.xy + int2(-1, 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
using UnityEngine; | |
using UnityEngine.UI; | |
public class ImageProcesser : MonoBehaviour { | |
public ComputeShader shader; | |
public RawImage srcImg; | |
public RawImage dstImg; | |
void 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
#pragma kernel ShowData | |
StructuredBuffer<float> data; | |
RWTexture2D<float4> Result; | |
[numthreads(1024,1,1)] | |
void ShowData (uint id : SV_DispatchThreadID) | |
{ | |
for (int i = 0; i < 256; i++) { | |
uint2 idx = uint2(id, i); |
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
void Start () { | |
StartCoroutine (WaitWhileExperiment ()); | |
} | |
IEnumerator WaitWhileExperiment(){ | |
int a = 0; | |
yield return new WaitWhile (() => { | |
a++; | |
Debug.Log(a); | |
return a < 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
#include <iostream> | |
using namespace std; | |
int main(int argc, char const *argv[]){ | |
int a[] = {10, 13, 13, 15, 20, 25}; | |
int b[] = {6, 6, 8, 8, 11, 13}; | |
int n = 6, w = 21; | |
int i = n-1, j = 0; | |
int i2 = i, j2 = j; |
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 | |
# Example: | |
# ./sjis2utf8.sh sample8th/*.asm | |
for i in $@; do | |
echo $i | |
iconv -f SJIS -t UTF8 $i > tmp.sh | |
cp tmp.sh $i | |
rm tmp.sh |
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 requests | |
url = 'https://slack.com/api/' | |
token = 'Slack Bot API Token' | |
def postMessage(msg, channel): | |
arguments = { | |
'token': token, | |
'channel': channel, |
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
# -*- coding: utf-8 -*- | |
import requests | |
url = 'https://slack.com/api/' | |
token = 'Slack Bot API Token' | |
def upload(filename, image, channels, filetype='jpg'): | |
joind_channels = ','.join(channels) | |
arguments = { | |
'token': token, |
NewerOlder