Skip to content

Instantly share code, notes, and snippets.

View yuryu's full-sized avatar

Emma Haruka Iwao yuryu

View GitHub Profile
@yuryu
yuryu / bigquery-per-github-repo.sql
Last active July 5, 2020 03:35
BQ Joshi Public datasets sample queries
SELECT repo_name, SUM(ARRAY_LENGTH(REGEXP_EXTRACT_ALL(content, r"(?i)bigquery"))) AS count
FROM bigquery-public-data.github_repos.contents
JOIN bigquery-public-data.github_repos.files
ON contents.id = files.id
GROUP BY repo_name
ORDER BY count DESC
LIMIT 100
$source = '.\Album\'
$destination = '.\Switch\'
Get-ChildItem $source -PipelineVariable year |
ForEach-Object { Get-ChildItem $year.Fullname -PipelineVariable month |
Where-Object { $month.PSIsContainer -eq $true } |
ForEach-Object {
$dest = Join-Path $destination "$year-$month"
New-Item -Path $dest -ItemType 'directory' -Force;
Get-ChildItem $month.FullName -Recurse |
@yuryu
yuryu / README.md
Last active August 7, 2019 06:03
GTUG Girls Bazel 事前準備

下記の事前準備を行っておくと当日スムーズです。わからないことがあれば当日一緒に解決しましょう!

Mac

Mac の方は Xcode をインストールしていなければインストールしましょう。(特にダウンロードに時間がかかるので、最低限ダウンロードはしておいていただけると助かります!)

ダウンロード: https://developer.apple.com/download/release/

インストールしたら、コマンドラインユーティリティを有効にします。下記のコマンドをターミナルで実行します。

@yuryu
yuryu / rtl.rb
Created September 19, 2017 01:37
#!/usr/bin/ruby
p 'العَرَبِيَّة'
العَرَبِيَّة = 1 + 2 + 3
p العَرَبِيَّة
class ArabicClass
def initialize
@متغير = 0
end
@yuryu
yuryu / Dockerfile
Created February 11, 2015 23:24
Dockerfile apache example
FROM registry.access.redhat.com/rhel
RUN yum -y install httpd
ADD index.html /var/www/html/index.html
EXPOSE 80
CMD ["/usr/sbin/httpd", "-DFOREGROUND"]
@yuryu
yuryu / kuji.cc
Created January 23, 2015 05:42
Kuji program
#include <iostream>
#include <algorithm>
#include <random>
#include <vector>
#include <fstream>
#include <set>
#include <unordered_set>
#include <string>
#include <ctime>
#include <cstdio>
@yuryu
yuryu / apache.json
Created January 17, 2015 04:52
kubernetes sample json
{
"id": "fedoraapache",
"kind": "Pod",
"apiVersion": "v1beta1",
"desiredState": {
"manifest": {
"version": "v1beta1",
"id": "fedoraapache",
"containers": [{
"name": "fedoraapache",
CPU-Z TXT Report
-------------------------------------------------------------------------
Binaries
-------------------------------------------------------------------------
CPU-Z version 1.70.0.x64
Processors
-------------------------------------------------------------------------
@yuryu
yuryu / gs10.c
Last active August 29, 2015 14:02
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
unsigned int gs10;
pid_t pid, pid10;
FILE *fp;
char buf[256];
@yuryu
yuryu / paiza-ec-campaign.cpp
Last active December 30, 2015 03:09
噂の https://paiza.jp/poh/ec-campaign をやってみた
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <functional>
const int MAX_N = 500000;
const int MAX_D = 300;
std::vector<int> read_sorted(const int n)