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
| from cython.parallel import prange | |
| import numpy as np | |
| cimport numpy as np | |
| def calculate_z(int maxiter, double complex[:] zs, double complex[:] cs): | |
| """ Calculate output list using jullia update rules.""" | |
| cdef unsigned int i, length | |
| cdef double complex z, c | |
| cdef int[:] output = np.empty(len(zs), dtype=np.int32) | |
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 pyproj | |
| import cv2 | |
| import numpy as np | |
| import csv | |
| EPSG5174 = pyproj.Proj("+proj=tmerc +lat_0=38 +lon_0=127.0028902777778 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +towgs84=-115.80,474.99,674.11,1.16,-2.31,-1.63,6.43 +units=m +no_defs") | |
| EPSG5179 = pyproj.Proj("+proj=tmerc +lat_0=38 +lon_0=127.5 +k=0.9996 +x_0=1000000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs") # UTMK | |
| EPSG5186 = pyproj.Proj("+proj=tmerc +lat_0=38 +lon_0=127 +k=1 +x_0=200000 +y_0=600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs") | |
| fromarray = [] |
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
| const rx = require('rx') | |
| let s = new rx.Observable.from([1,2,3,4,5,6,7,8,9]) | |
| let ss = s.controlled() | |
| ss.subscribe((x) => { | |
| console.log("Pull "+x) | |
| setTimeout(() => process(1, x), 100) | |
| }) |
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
| package main | |
| /* | |
| #cgo LDFLAGS: -lproj | |
| #include <string.h> | |
| #include <proj_api.h> | |
| */ | |
| import "C" | |
| import ( | |
| "fmt" |
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
| def withinRangeSearch(aList, key, kpick=lambda x:x[0], vpick=lambda x:x[1]): | |
| left = 0 | |
| right = len(aList) - 1 | |
| if key < kpick(aList[left]): | |
| return vpick(aList[left]) or left | |
| if key >= kpick(aList[right]): | |
| return vpick(aList[right]) or right |
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
| #-*- coding: utf-8 -*- | |
| import subprocess | |
| if __name__ == '__main__': | |
| ps = subprocess.Popen(['nodejs','ps2.js'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) | |
| out = ps.communicate(input='http://www.daum.net'.encode())[0] | |
| print(out.decode('utf-8')) |
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
| package com.example; | |
| import android.media.MediaPlayer; | |
| import android.media.AudioManager; | |
| import java.io.IOException; | |
| public class AndroidSound { | |
| private static AndroidSound instance = null; | |
| private static MediaPlayer mediaPlayer = null; |
NewerOlder