Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
This file contains hidden or 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 <type_traits> | |
// Determine if `Instance` is instantiation of template | |
// e.g. static_assert(is_template<std::vector<int>>::value); | |
template<class Instance> struct is_template : std::false_type {}; | |
template<class ...TemplateArgs, template<class...> class Template> | |
struct is_template<Template<TemplateArgs...>> : std::true_type {}; | |
// Determine if `Instance` is instance of `Template` | |
// e.g. static_assert(is_instance_of_template<std::vector, std::vector<int>>::value); |
This file contains hidden or 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 <thrust/scan.h> | |
#include <thrust/device_vector.h> | |
#include <thrust/fill.h> | |
#include <vector> | |
#include <algorithm> | |
#include <cstdlib> | |
int main(int argc, char **argv) | |
{ | |
using T = double; |
This file contains hidden or 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
; ---------------------------------------------------------------------------------------------------------------------- | |
; Name ..........: TrayIcon library | |
; Description ...: Provide some useful functions to deal with Tray icons. | |
; AHK Version ...: AHK_L 1.1.13.01 x32/64 Unicode | |
; Original Author: Sean (http://goo.gl/dh0xIX) (http://www.autohotkey.com/forum/viewtopic.php?t=17314) | |
; Update Author .: Cyruz (http://ciroprincipe.info) (http://ahkscript.org/boards/viewtopic.php?f=6&t=1229) | |
; Mod Author ....: Fanatic Guru | |
; License .......: WTFPL - http://www.wtfpl.net/txt/copying/ | |
; Version Date...: 2014 - 01 - 16 | |
; Note ..........: Many people have updated Sean's original work including me but Cyruz's version seemed the most straight |
This file contains hidden or 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 collections | |
def dict_merge(dct, merge_dct): | |
""" Recursive dict merge. Inspired by :meth:``dict.update()``, instead of | |
updating only top-level keys, dict_merge recurses down into dicts nested | |
to an arbitrary depth, updating keys. The ``merge_dct`` is merged into | |
``dct``. | |
:param dct: dict onto which the merge is executed | |
:param merge_dct: dct merged into dct |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
This file contains hidden or 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 | |
/** | |
* Gmail経由でメール送信 | |
* 要Pear::Mail | |
* @param string $to 送信先 | |
* @param string $from 送信元 | |
* @param string $bcc BCC | |
* @param string $subj 件名 | |
* @param string $body メール本文 | |
* @return bool trueでメール送信完了 |
This file contains hidden or 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
#!/usr/bin/env bash | |
# memusg -- Measure memory usage of processes | |
# Usage: memusg COMMAND [ARGS]... | |
# | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2010-08-16 | |
############################################################################ | |
# Copyright 2010 Jaeho Shin. # | |
# # | |
# Licensed under the Apache License, Version 2.0 (the "License"); # |
This file contains hidden or 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 | |
include("Mail.php"); | |
//$headers['Reply-to'] = "$name <$email>"; | |
$headers['From'] = '[email protected]'; | |
$headers['Subject'] = "Test"; | |
$headers['Content-Type'] = "text/plain; charset=utf-8"; | |
$recipients = '[email protected]'; | |
$body = 'Something'; |
NewerOlder