ワンライナー(lambda無し)
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
|
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
module Draw | |
import GLFW | |
using ModernGL | |
using CUDA | |
using CUDA: cuGraphicsGLRegisterBuffer, | |
CUgraphicsResource, | |
cuGraphicsMapResources, | |
CUdeviceptr, |
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
module HelloTriangle | |
export App, run | |
using VulkanCore.LibVulkan | |
import GLFW | |
const GLFW_CLIENT_API = 0x00022001 | |
const GLFW_NO_API = 0 | |
const GLFW_FALSE = 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
module Lexrank | |
using LinearAlgebra | |
using PyCall | |
fugashi = pyimport("fugashi") | |
const LemmaINDEX = 8 | |
function Summarize(document::T where T<:AbstractString; threshold=0.3) | |
splited_document = Tuple( |
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
from objc_util import * | |
from objc_util import parse_types | |
import ctypes | |
import editor | |
import time | |
method_exchangeImplementations=c.method_exchangeImplementations | |
method_exchangeImplementations.restype=None | |
method_exchangeImplementations.argtypes=[c_void_p,c_void_p] |
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
from objc_util import create_objc_class, ObjCInstance, NSObject | |
from textwrap import dedent | |
def objci_new_setattr(self, name, value): | |
if name in ('ptr', 'weakrefs', '_cached_methods', '_as_parameter_'): | |
self.__dict__[name] = value | |
return | |
try: | |
setter_method = getattr(self, 'set%s%s_' % (name[0].upper(), name[1:])) | |
setter_method(value) |
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
from objc_util import * | |
from ctypes import * | |
from pathlib import Path | |
import ui | |
IOMobileFramebufferOpen = c.IOMobileFramebufferOpen | |
IOMobileFramebufferOpen.argtypes = [c_void_p]*4 | |
mach_task_self = c.mach_task_self |
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
print([next(_ for _ in ((0for _return, _args in iter({'_return':[None], 'args':[]}.values,None)if _args.append((yield _return[0])) or (([[0 for f,*_ in (_args,)for _return[0] in(f()(f,5)[0],)]] and _args.clear()) if _args else None)),) if [next(_)]).send(functools.partial(next,(type('funcsource',tuple(),next(namespace for namespace in ({'_return': ['return']},)for _func in (next(_ for _ in ((0for count, _args in iter({'argcount':2+2, 'args':[]}.values,None)if _args.append((yield (1 if (_args and _args[-1] is namespace['_return']) else 0))) or (([[0 for self, _, f,n in (_args,)for __ in (self._return.clear(),)if self._return.append(1 if n ==1 else f()(f,n-1)[0]*n)]] and _args.clear()) if len(_args)>=count else None)),) if [next(_)]).send,)for namespace['__call__'] in (functools.partialmethod(max,namespace.get('_return'),key = _func),)))() for i in iter(int,1)))) for functools in (__import__('functools'),)][0]) |
NewerOlder