Skip to content

Instantly share code, notes, and snippets.

View atsukoba's full-sized avatar
😀
I am the walrus

Atsuya Kobayashi atsukoba

😀
I am the walrus
View GitHub Profile

C++初心者がC++を使って競技プログラミングするための備忘録のようなもの

この記事は、C++ (fork) Advent Calendar 2013の12日目の記事です。

はじめに

記事を書く人が居ないみたいなので、C++初心者ですが箸休め的な記事を書こうと思い立ち、いざ書き上げてみたら思いの外長くなりました。

この記事は、C++初心者な著者が、C++を用いて競技プログラミングをするために、調べたことや試した事などのまとめです。 記事中に誤り、問題点やご指摘、ご質問等ありましたら、@rigibunまでご連絡下さい(特にpush_bach)

githubのmarkdownを使いたかったことと、変更履歴が見られることからgistで書きました。

@nkt1546789
nkt1546789 / puwrapper.py
Last active April 12, 2019 20:16
A wrapper class for PU classification on Python (proposed by Elkan and Noto, 2008).
import numpy as np
from numpy import random
from sklearn import base
class PUWrapper(object):
def __init__(self,trad_clf,n_fold=5):
self._trad_clf=trad_clf
self._n_fold=n_fold
def fit(self,X,s):
@nkt1546789
nkt1546789 / puclassifier.py
Last active May 12, 2022 15:13
Learning Classifiers from positive and unlabeled data by sample weighting proposed by Elkan and Noto 2008.
import numpy as np
from sklearn.linear_model import SGDClassifier
from sklearn.cross_validation import StratifiedKFold
from sklearn.grid_search import GridSearchCV
class PUClassifier(object):
def __init__(self, trad_clf=None, n_folds=2):
self.trad_clf = trad_clf
self.n_folds = n_folds
@alexmacy
alexmacy / .block
Last active April 20, 2023 16:10
Web Audio Sampler v2
license: mit
@hurutoriya
hurutoriya / colab-mecab-ipadic-NEologd.ipynb
Created April 23, 2018 15:35
Google Colabratory で Mecab-ipadic-Neologd を使うまで。 日本語のNLPで最近の語句にも対応している必須の形態素解析に必要な Mecab-ipadic-NEologd
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexeygrigorev
alexeygrigorev / tqdm_pool.py
Created December 6, 2018 15:36
Track progress of ProcessPoolExecutor with tqdm
from glob import glob
import multiprocessing
from concurrent.futures import ProcessPoolExecutor
import cv2
from PIL import Image
import imagehash
from tqdm import tqdm
@balvisio
balvisio / mlflow_deployment_instructions.md
Last active January 29, 2024 17:30
Instructions to create a MLflow server in AWS

Types of MLflow Server Setups

There are multiple variants with respect to how the artifacts are handled: (Reference: https://mlflow.org/docs/latest/tracking.html#how-runs-and-artifacts-are-recorded)

a. In this scenario, for artifact logging, the MLflow client interacts with the remote Tracking Server and artifact storage host:

  • The MLflow client uses RestStore to send a REST request to fetch the artifact store URI location from the Tracking Server
  • The Tracking Server responds with an artifact store URI location (an S3 storage URI in this case)
  • The MLflow client creates an instance of an S3ArtifactRepository, connects to the remote AWS host using the boto client libraries, and uploads the artifacts to the S3 bucket URI location

Direct Access to Artifact Store

@Natooz
Natooz / test_chords_detection.py
Created March 13, 2023 15:28
Test chord detection methods
#!/usr/bin/python3 python
"""Test chord detection methods
"""
from dataclasses import dataclass
from typing import List, Tuple, Dict, cast
from copy import copy