text stringlengths 7 35.3M | id stringlengths 11 185 | metadata dict | __index_level_0__ int64 0 2.14k |
|---|---|---|---|
import os
from distutils.version import LooseVersion
import pkg_resources
from mlagents.torch_utils import cpu_utils
from mlagents.trainers.settings import TorchSettings
from mlagents_envs.logging_util import get_logger
logger = get_logger(__name__)
def assert_torch_installed():
# Check that torch version 1.6.... | ml-agents/ml-agents/mlagents/torch_utils/torch.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/torch_utils/torch.py",
"repo_id": "ml-agents",
"token_count": 678
} | 2,047 |
import argparse
from typing import Optional, List
from mlagents.trainers.learn import run_cli
from mlagents.trainers.settings import RunOptions
from mlagents.trainers.cli_utils import load_config
from mlagents.plugins.trainer_type import register_trainer_plugins
def parse_command_line(argv: Optional[List[str]] = Non... | ml-agents/ml-agents/mlagents/trainers/run_experiment.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/run_experiment.py",
"repo_id": "ml-agents",
"token_count": 345
} | 2,048 |
import numpy as np
from mlagents.trainers.buffer import (
AgentBuffer,
AgentBufferField,
BufferKey,
ObservationKeyPrefix,
RewardSignalKeyPrefix,
)
from mlagents.trainers.trajectory import ObsUtil
def assert_array(a, b):
assert a.shape == b.shape
la = list(a.flatten())
lb = list(b.flatt... | ml-agents/ml-agents/mlagents/trainers/tests/test_buffer.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/tests/test_buffer.py",
"repo_id": "ml-agents",
"token_count": 4013
} | 2,049 |
from unittest.mock import patch
import pytest
from mlagents.trainers.agent_processor import AgentManagerQueue
from mlagents.trainers.behavior_id_utils import BehaviorIdentifiers
from mlagents.trainers.environment_parameter_manager import EnvironmentParameterManager
from mlagents.trainers.settings import RunOptions
fr... | ml-agents/ml-agents/mlagents/trainers/tests/test_trainers.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/tests/test_trainers.py",
"repo_id": "ml-agents",
"token_count": 2597
} | 2,050 |
from mlagents.torch_utils import torch
from unittest import mock
import pytest
from mlagents.trainers.torch_entities.encoders import (
VectorInput,
Normalizer,
SmallVisualEncoder,
FullyConnectedVisualEncoder,
SimpleVisualEncoder,
ResNetVisualEncoder,
NatureVisualEncoder,
)
# This test wil... | ml-agents/ml-agents/mlagents/trainers/tests/torch_entities/test_encoders.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/tests/torch_entities/test_encoders.py",
"repo_id": "ml-agents",
"token_count": 1615
} | 2,051 |
import numpy as np
from typing import Dict
from mlagents.torch_utils import torch
from mlagents.trainers.buffer import AgentBuffer
from mlagents.trainers.torch_entities.components.reward_providers.base_reward_provider import (
BaseRewardProvider,
)
from mlagents.trainers.settings import RNDSettings
from mlagents_... | ml-agents/ml-agents/mlagents/trainers/torch_entities/components/reward_providers/rnd_reward_provider.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/torch_entities/components/reward_providers/rnd_reward_provider.py",
"repo_id": "ml-agents",
"token_count": 1217
} | 2,052 |
# # Unity ML-Agents Toolkit
# ## ML-Agent Learning
"""Launches trainers for each External Brains in a Unity Environment."""
import os
import threading
from typing import Dict, Set, List
from collections import defaultdict
import numpy as np
from mlagents_envs.logging_util import get_logger
from mlagents.trainers.env... | ml-agents/ml-agents/mlagents/trainers/trainer_controller.py/0 | {
"file_path": "ml-agents/ml-agents/mlagents/trainers/trainer_controller.py",
"repo_id": "ml-agents",
"token_count": 5014
} | 2,053 |
import argparse
from mlagents_envs.environment import UnityEnvironment
from mlagents_envs.side_channel.engine_configuration_channel import (
EngineConfigurationChannel,
)
def test_run_environment(env_name):
"""
Run the low-level API test using the specified environment
:param env_name: Name of the Un... | ml-agents/ml-agents/tests/yamato/scripts/run_llapi.py/0 | {
"file_path": "ml-agents/ml-agents/tests/yamato/scripts/run_llapi.py",
"repo_id": "ml-agents",
"token_count": 1719
} | 2,054 |
syntax = "proto3";
option csharp_namespace = "Unity.MLAgents.CommunicatorObjects";
package communicator_objects;
message EngineConfigurationProto {
int32 width = 1;
int32 height = 2;
int32 quality_level = 3;
float time_scale = 4;
int32 target_frame_rate = 5;
bool show_monitor = 6;
}
| ml-agents/protobuf-definitions/proto/mlagents_envs/communicator_objects/engine_configuration.proto/0 | {
"file_path": "ml-agents/protobuf-definitions/proto/mlagents_envs/communicator_objects/engine_configuration.proto",
"repo_id": "ml-agents",
"token_count": 115
} | 2,055 |
fileFormatVersion: 2
guid: 6e1b2e17cce240d4c8ff5457ac996e0d
timeCreated: 1451443249
licenseType: Pro
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 1
settings:
CPU: ARMv7
Any:
enabled: 0
settings: {}
... | xLua/Assets/Plugins/Android/libs/armeabi-v7a/libxlua.so.meta/0 | {
"file_path": "xLua/Assets/Plugins/Android/libs/armeabi-v7a/libxlua.so.meta",
"repo_id": "xLua",
"token_count": 200
} | 2,056 |
extern "C" {
#include "../../../WebGLPlugins/lapi.c"
#include "../../../WebGLPlugins/lauxlib.c"
#include "../../../WebGLPlugins/lbaselib.c"
#include "../../../WebGLPlugins/lbitlib.c"
#include "../../../WebGLPlugins/lcode.c"
#include "../../../WebGLPlugins/lcorolib.c"
#include "../../../WebGLPlugins/lctype.c"
#include "... | xLua/Assets/Plugins/WebGL/xlua_webgl.cpp/0 | {
"file_path": "xLua/Assets/Plugins/WebGL/xlua_webgl.cpp",
"repo_id": "xLua",
"token_count": 641
} | 2,057 |
fileFormatVersion: 2
guid: 1055830ddb882704fa71275ed9b2a78d
timeCreated: 1488352111
licenseType: Pro
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 0
settings:
CPU: AnyCPU
Any:
enabled: 0
settings: {}
... | xLua/Assets/Plugins/x86_64/libxlua.so.meta/0 | {
"file_path": "xLua/Assets/Plugins/x86_64/libxlua.so.meta",
"repo_id": "xLua",
"token_count": 698
} | 2,058 |
fileFormatVersion: 2
guid: 13b04a36211388b45849c1fb7dd7b956
timeCreated: 1463554448
licenseType: Pro
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
| xLua/Assets/XLua/Examples/06_Coroutine/Resources/coruntine_test.lua.txt.meta/0 | {
"file_path": "xLua/Assets/XLua/Examples/06_Coroutine/Resources/coruntine_test.lua.txt.meta",
"repo_id": "xLua",
"token_count": 70
} | 2,059 |
fileFormatVersion: 2
guid: 40d0922483b73c8408f163088c9adc26
TextScriptImporter:
userData:
| xLua/Assets/XLua/Examples/07_AsyncTest/Resources/async_test.lua.txt.meta/0 | {
"file_path": "xLua/Assets/XLua/Examples/07_AsyncTest/Resources/async_test.lua.txt.meta",
"repo_id": "xLua",
"token_count": 41
} | 2,060 |
using UnityEngine;
using System.Collections;
using XLua;
using System.IO;
namespace XLuaTest
{
public class SignatureLoaderTest : MonoBehaviour
{
public static string PUBLIC_KEY = "BgIAAACkAABSU0ExAAQAAAEAAQBVDDC5QJ+0uSCJA+EysIC9JBzIsd6wcXa+FuTGXcsJuwyUkabwIiT2+QEjP454RwfSQP8s4VZE1m4npeVD2aDnY4W6ZNJe+... | xLua/Assets/XLua/Examples/10_SignatureLoader/SignatureLoaderTest.cs/0 | {
"file_path": "xLua/Assets/XLua/Examples/10_SignatureLoader/SignatureLoaderTest.cs",
"repo_id": "xLua",
"token_count": 968
} | 2,061 |
fileFormatVersion: 2
guid: c9d3a7e24d889a7418ad19a390178f88
timeCreated: 1489370693
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
| xLua/Assets/XLua/Examples/10_SignatureLoader/signatured1.lua.meta/0 | {
"file_path": "xLua/Assets/XLua/Examples/10_SignatureLoader/signatured1.lua.meta",
"repo_id": "xLua",
"token_count": 72
} | 2,062 |
fileFormatVersion: 2
guid: 266e4ca9a64f701449b0468b9a4f1d32
folderAsset: yes
timeCreated: 1531790107
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
| xLua/Assets/XLua/Examples/13_BuildFromCLI/Editor.meta/0 | {
"file_path": "xLua/Assets/XLua/Examples/13_BuildFromCLI/Editor.meta",
"repo_id": "xLua",
"token_count": 84
} | 2,063 |
fileFormatVersion: 2
guid: e0924e56a40ddb34e9b004c2056288fa
folderAsset: yes
timeCreated: 1463477791
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
| xLua/Assets/XLua/Resources/xlua.meta/0 | {
"file_path": "xLua/Assets/XLua/Resources/xlua.meta",
"repo_id": "xLua",
"token_count": 76
} | 2,064 |
using UnityEngine;
using System.Collections.Generic;
using XLua;
using System.IO;
using System.Text;
using System.Linq;
using CSObjectWrapEditor;
public class LinkXmlGen : ScriptableObject
{
public TextAsset Template;
public static IEnumerable<CustomGenTask> GetTasks(LuaEnv lua_env, UserConfig user_cfg)
... | xLua/Assets/XLua/Src/Editor/LinkXmlGen/LinkXmlGen.cs/0 | {
"file_path": "xLua/Assets/XLua/Src/Editor/LinkXmlGen/LinkXmlGen.cs",
"repo_id": "xLua",
"token_count": 479
} | 2,065 |
fileFormatVersion: 2
guid: ae16c73aad9a21a44aef65decb7e4928
timeCreated: 1481620508
licenseType: Pro
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
| xLua/Assets/XLua/Src/Editor/Template/LuaEnumWrap.tpl.txt.meta/0 | {
"file_path": "xLua/Assets/XLua/Src/Editor/Template/LuaEnumWrap.tpl.txt.meta",
"repo_id": "xLua",
"token_count": 73
} | 2,066 |
fileFormatVersion: 2
guid: 4898604144dd928468ddca1af81d58ae
timeCreated: 1501232546
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences:
- LuaClassWrap: {fileID: 4900000, guid: 8503038eabbabe44dac0f5f749d4411a, type: 3}
- LuaClassWrapGCM: {fileID: 4900000, guid: 2bd79d95fd859724283926ad8fa4df3... | xLua/Assets/XLua/Src/Editor/TemplateRef.cs.meta/0 | {
"file_path": "xLua/Assets/XLua/Src/Editor/TemplateRef.cs.meta",
"repo_id": "xLua",
"token_count": 601
} | 2,067 |
fileFormatVersion: 2
guid: 5dfa9c69dddc18849bd3c1dfc4ac42de
timeCreated: 1489222429
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
| xLua/Assets/XLua/Src/SignatureLoader.cs.meta/0 | {
"file_path": "xLua/Assets/XLua/Src/SignatureLoader.cs.meta",
"repo_id": "xLua",
"token_count": 102
} | 2,068 |
fileFormatVersion: 2
guid: 74a487ac941ce7b478428f413acc20f6
folderAsset: yes
timeCreated: 1455708477
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
| xLua/Assets/XLua/Tutorial/LoadLuaScript.meta/0 | {
"file_path": "xLua/Assets/XLua/Tutorial/LoadLuaScript.meta",
"repo_id": "xLua",
"token_count": 74
} | 2,069 |
using System;
using System.Linq;
using System.Reflection;
using CSObjectWrapEditor;
using System.IO;
using System.Collections.Generic;
namespace XLua
{
public class XLuaGenerate
{
public static void Useage()
{
Console.WriteLine("XLuaGenerate assmbly_path");
}
public... | xLua/General/Src/XLuaGenerate.cs/0 | {
"file_path": "xLua/General/Src/XLuaGenerate.cs",
"repo_id": "xLua",
"token_count": 2183
} | 2,070 |
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft... | xLua/General/vs2013/XLuaUnitTest.csproj/0 | {
"file_path": "xLua/General/vs2013/XLuaUnitTest.csproj",
"repo_id": "xLua",
"token_count": 1573
} | 2,071 |
require("ltest.init")
function islua53() return not not math.type end
-- for test case
CMyTestCaseCSCallLua = TestCase:new()
function CMyTestCaseCSCallLua:new(oo)
local o = oo or {}
o.count = 1
setmetatable(o, self)
self.__index = self
return o
end
function CMyTestCaseCSCallLua.SetUpTestCase(... | xLua/Test/UnitTest/StreamingAssets/csCallLua.lua/0 | {
"file_path": "xLua/Test/UnitTest/StreamingAssets/csCallLua.lua",
"repo_id": "xLua",
"token_count": 8399
} | 2,072 |
fileFormatVersion: 2
guid: fa1392032a89cd8489d1e9d150190b68
timeCreated: 1483528414
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
| xLua/Test/UnitTest/StreamingAssets/luaTdrTest.lua.meta/0 | {
"file_path": "xLua/Test/UnitTest/StreamingAssets/luaTdrTest.lua.meta",
"repo_id": "xLua",
"token_count": 70
} | 2,073 |
#if !XLUA_GENERAL
using UnityEngine;
#endif
using System.Collections;
using System.Collections.Generic;
using XLua;
using System;
public class TestCSCallLua
#if !XLUA_GENERAL
: MonoBehaviour
#endif
{
// Use this for initialization
void Start()
{
TCForTestCSCallLua testSuite = new TCForTestCSCallLua(... | xLua/Test/UnitTest/xLuaTest/CSharpCallLua/TestCSCallLua.cs/0 | {
"file_path": "xLua/Test/UnitTest/xLuaTest/CSharpCallLua/TestCSCallLua.cs",
"repo_id": "xLua",
"token_count": 1457
} | 2,074 |
<?xml version="1.0" ?>
<metalib name="net" >
<macro name="MAX_NAME_LEN" value="128" />
<macro name="MAX_PASS_LEN" value="32" />
<struct name="CmdLogin" version="1" id="1" >
<entry name="name" type="string" id="1" defaultvalue="腾讯" size="MAX_NAME_LEN" sizeinfo="smalluint" />
<entry name="pass... | xLua/Test/UnitTest/xLuaTest/Resources/non_tlv_net_msg_type.xml/0 | {
"file_path": "xLua/Test/UnitTest/xLuaTest/Resources/non_tlv_net_msg_type.xml",
"repo_id": "xLua",
"token_count": 2292
} | 2,075 |
/*
** $Id: lauxlib.c,v 1.289 2016/12/20 18:37:00 roberto Exp $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
#define lauxlib_c
#define LUA_LIB
#include "lprefix.h"
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
** This f... | xLua/WebGLPlugins/lauxlib.c/0 | {
"file_path": "xLua/WebGLPlugins/lauxlib.c",
"repo_id": "xLua",
"token_count": 12919
} | 2,076 |
/*
** $Id: lfunc.h,v 2.15 2015/01/13 15:49:11 roberto Exp $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
#ifndef lfunc_h
#define lfunc_h
#include "lobject.h"
#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
cast(int, sizeof(TValue... | xLua/WebGLPlugins/lfunc.h/0 | {
"file_path": "xLua/WebGLPlugins/lfunc.h",
"repo_id": "xLua",
"token_count": 690
} | 2,077 |
# This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake
# files which are included with CMake 2.8.4
# It has been altered for iOS development
# Options:
#
# IOS_PLATFORM = OS (default) or SIMULATOR
# This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platfo... | xLua/build/cmake/iOS.cmake/0 | {
"file_path": "xLua/build/cmake/iOS.cmake",
"repo_id": "xLua",
"token_count": 3838
} | 2,078 |
<!-- $Id: luac.man,v 1.28 2006/01/06 16:03:34 lhf Exp $ -->
<HTML>
<HEAD>
<TITLE>LUAC man page</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="lua.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>NAME</H2>
luac - Lua compiler
<H2>SYNOPSIS</H2>
<B>luac</B>
[
<I>options</I>
] [
<I>filenames</I>
]
<H2>DESCRIPTION</H2>
<B... | xLua/build/lua-5.1.5/doc/luac.html/0 | {
"file_path": "xLua/build/lua-5.1.5/doc/luac.html",
"repo_id": "xLua",
"token_count": 1250
} | 2,079 |
/*
** $Id: lapi.h,v 2.2.1.1 2007/12/27 13:02:25 roberto Exp $
** Auxiliary functions from Lua API
** See Copyright Notice in lua.h
*/
#ifndef lapi_h
#define lapi_h
#include "lobject.h"
LUAI_FUNC void luaA_pushobject (lua_State *L, const TValue *o);
#endif
| xLua/build/lua-5.1.5/src/lapi.h/0 | {
"file_path": "xLua/build/lua-5.1.5/src/lapi.h",
"repo_id": "xLua",
"token_count": 113
} | 2,080 |
/*
** $Id: linit.c,v 1.14.1.1 2007/12/27 13:02:25 roberto Exp $
** Initialization of libraries for lua.c
** See Copyright Notice in lua.h
*/
#define linit_c
#define LUA_LIB
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
static const luaL_Reg lualibs[] = {
{"", luaopen_base},
{LUA_LOADLIBNAME, luaop... | xLua/build/lua-5.1.5/src/linit.c/0 | {
"file_path": "xLua/build/lua-5.1.5/src/linit.c",
"repo_id": "xLua",
"token_count": 358
} | 2,081 |
/*
** $Id: lstate.c,v 2.36.1.2 2008/01/03 15:20:39 roberto Exp $
** Global State
** See Copyright Notice in lua.h
*/
#include <stddef.h>
#define lstate_c
#define LUA_CORE
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "llex.h"
#include "lmem.h"
#include "lstate.h... | xLua/build/lua-5.1.5/src/lstate.c/0 | {
"file_path": "xLua/build/lua-5.1.5/src/lstate.c",
"repo_id": "xLua",
"token_count": 2550
} | 2,082 |
/*
** $Id: lundump.h,v 1.37.1.1 2007/12/27 13:02:25 roberto Exp $
** load precompiled Lua chunks
** See Copyright Notice in lua.h
*/
#ifndef lundump_h
#define lundump_h
#include "lobject.h"
#include "lzio.h"
/* load one chunk; from lundump.c */
LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const... | xLua/build/lua-5.1.5/src/lundump.h/0 | {
"file_path": "xLua/build/lua-5.1.5/src/lundump.h",
"repo_id": "xLua",
"token_count": 349
} | 2,083 |
/*
** $Id: lbaselib.c,v 1.313 2016/04/11 19:18:40 roberto Exp $
** Basic library
** See Copyright Notice in lua.h
*/
#define lbaselib_c
#define LUA_LIB
#include "lprefix.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
sta... | xLua/build/lua-5.3.3/src/lbaselib.c/0 | {
"file_path": "xLua/build/lua-5.3.3/src/lbaselib.c",
"repo_id": "xLua",
"token_count": 5922
} | 2,084 |
/*
** $Id: lgc.h,v 2.91 2015/12/21 13:02:14 roberto Exp $
** Garbage Collector
** See Copyright Notice in lua.h
*/
#ifndef lgc_h
#define lgc_h
#include "lobject.h"
#include "lstate.h"
/*
** Collectable objects may have one of three colors: white, which
** means the object is not marked; gray, which means the
** obj... | xLua/build/lua-5.3.3/src/lgc.h/0 | {
"file_path": "xLua/build/lua-5.3.3/src/lgc.h",
"repo_id": "xLua",
"token_count": 1862
} | 2,085 |
/*
** $Id: lparser.c,v 2.153 2016/05/13 19:10:16 roberto Exp $
** Lua Parser
** See Copyright Notice in lua.h
*/
#define lparser_c
#define LUA_CORE
#include "lprefix.h"
#include <string.h>
#include "lua.h"
#include "lcode.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "llex.h"
#include "lmem.... | xLua/build/lua-5.3.3/src/lparser.c/0 | {
"file_path": "xLua/build/lua-5.3.3/src/lparser.c",
"repo_id": "xLua",
"token_count": 19981
} | 2,086 |
/*
** $Id: lcode.c,v 2.112 2016/12/22 13:08:50 roberto Exp $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
#define lcode_c
#define LUA_CORE
#include "lprefix.h"
#include <math.h>
#include <stdlib.h>
#include "lua.h"
#include "lcode.h"
#include "ldebug.h"
#include "ldo.h"
#include "lgc.h"
#include ... | xLua/build/lua-5.3.4/src/lcode.c/0 | {
"file_path": "xLua/build/lua-5.3.4/src/lcode.c",
"repo_id": "xLua",
"token_count": 14576
} | 2,087 |
/*
** $Id: liolib.c,v 2.151 2016/12/20 18:37:00 roberto Exp $
** Standard I/O (and system) library
** See Copyright Notice in lua.h
*/
#define liolib_c
#define LUA_LIB
#include "lprefix.h"
#include <ctype.h>
#include <errno.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include ... | xLua/build/lua-5.3.4/src/liolib.c/0 | {
"file_path": "xLua/build/lua-5.3.4/src/liolib.c",
"repo_id": "xLua",
"token_count": 8645
} | 2,088 |
/*
** $Id: lstate.c,v 2.133 2015/11/13 12:16:51 roberto Exp $
** Global State
** See Copyright Notice in lua.h
*/
#define lstate_c
#define LUA_CORE
#include "lprefix.h"
#include <stddef.h>
#include <string.h>
#include "lua.h"
#include "lapi.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.... | xLua/build/lua-5.3.4/src/lstate.c/0 | {
"file_path": "xLua/build/lua-5.3.4/src/lstate.c",
"repo_id": "xLua",
"token_count": 3630
} | 2,089 |
/*
** $Id: lundump.c,v 2.44 2015/11/02 16:09:30 roberto Exp $
** load precompiled Lua chunks
** See Copyright Notice in lua.h
*/
#define lundump_c
#define LUA_CORE
#include "lprefix.h"
#include <string.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lmem.h"
#include "lobject.... | xLua/build/lua-5.3.4/src/lundump.c/0 | {
"file_path": "xLua/build/lua-5.3.4/src/lundump.c",
"repo_id": "xLua",
"token_count": 2762
} | 2,090 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Lua 5.3 Reference Manual</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="lua.css">
<LINK REL="stylesheet" TYPE="text/css" HREF="manual.css">
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
... | xLua/build/lua-5.3.5/doc/manual.html/0 | {
"file_path": "xLua/build/lua-5.3.5/doc/manual.html",
"repo_id": "xLua",
"token_count": 114787
} | 2,091 |
/*
** $Id: ldebug.c,v 2.121.1.2 2017/07/10 17:21:50 roberto Exp $
** Debug Interface
** See Copyright Notice in lua.h
*/
#define ldebug_c
#define LUA_CORE
#include "lprefix.h"
#include <stdarg.h>
#include <stddef.h>
#include <string.h>
#include "lua.h"
#include "lapi.h"
#include "lcode.h"
#include "ldebug.h"
#inc... | xLua/build/lua-5.3.5/src/ldebug.c/0 | {
"file_path": "xLua/build/lua-5.3.5/src/ldebug.c",
"repo_id": "xLua",
"token_count": 9038
} | 2,092 |
/*
** $Id: lmem.h,v 1.43.1.1 2017/04/19 17:20:42 roberto Exp $
** Interface to Memory Manager
** See Copyright Notice in lua.h
*/
#ifndef lmem_h
#define lmem_h
#include <stddef.h>
#include "llimits.h"
#include "lua.h"
/*
** This macro reallocs a vector 'b' from 'on' to 'n' elements, where
** each element has size... | xLua/build/lua-5.3.5/src/lmem.h/0 | {
"file_path": "xLua/build/lua-5.3.5/src/lmem.h",
"repo_id": "xLua",
"token_count": 1112
} | 2,093 |
/*
** $Id: ltable.h,v 2.23.1.2 2018/05/24 19:39:05 roberto Exp $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
#ifndef ltable_h
#define ltable_h
#include "lobject.h"
#define gnode(t,i) (&(t)->node[i])
#define gval(n) (&(n)->i_val)
#define gnext(n) ((n)->i_key.nk.next)
/* 'const' to avoid wrong writing... | xLua/build/lua-5.3.5/src/ltable.h/0 | {
"file_path": "xLua/build/lua-5.3.5/src/ltable.h",
"repo_id": "xLua",
"token_count": 932
} | 2,094 |
/*
** $Id: lzio.h,v 1.31.1.1 2017/04/19 17:20:42 roberto Exp $
** Buffered streams
** See Copyright Notice in lua.h
*/
#ifndef lzio_h
#define lzio_h
#include "lua.h"
#include "lmem.h"
#define EOZ (-1) /* end of stream */
typedef struct Zio ZIO;
#define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_f... | xLua/build/lua-5.3.5/src/lzio.h/0 | {
"file_path": "xLua/build/lua-5.3.5/src/lzio.h",
"repo_id": "xLua",
"token_count": 663
} | 2,095 |
/*
** $Id: lauxlib.c $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
#define lauxlib_c
#define LUA_LIB
#include "lprefix.h"
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
** This file uses only the official API of Lua.
*... | xLua/build/lua-5.4.1/src/lauxlib.c/0 | {
"file_path": "xLua/build/lua-5.4.1/src/lauxlib.c",
"repo_id": "xLua",
"token_count": 12983
} | 2,096 |
/*
** $Id: lgc.c $
** Garbage Collector
** See Copyright Notice in lua.h
*/
#define lgc_c
#define LUA_CORE
#include "lprefix.h"
#include <stdio.h>
#include <string.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h... | xLua/build/lua-5.4.1/src/lgc.c/0 | {
"file_path": "xLua/build/lua-5.4.1/src/lgc.c",
"repo_id": "xLua",
"token_count": 20709
} | 2,097 |
/*
** $Id: lopnames.h $
** Opcode names
** See Copyright Notice in lua.h
*/
#if !defined(lopnames_h)
#define lopnames_h
#include <stddef.h>
/* ORDER OP */
static const char *const opnames[] = {
"MOVE",
"LOADI",
"LOADF",
"LOADK",
"LOADKX",
"LOADFALSE",
"LFALSESKIP",
"LOADTRUE",
"LOADNIL",
"GETUP... | xLua/build/lua-5.4.1/src/lopnames.h/0 | {
"file_path": "xLua/build/lua-5.4.1/src/lopnames.h",
"repo_id": "xLua",
"token_count": 631
} | 2,098 |
===============================================================================
LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/
Copyright (C) 2005-2016 Mike Pall. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentati... | xLua/build/luajit-2.1.0b2/COPYRIGHT/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/COPYRIGHT",
"repo_id": "xLua",
"token_count": 717
} | 2,099 |
------------------------------------------------------------------------------
-- DynASM x86/x64 module.
--
-- Copyright (C) 2005-2016 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
local x64 = x64
-- Module i... | xLua/build/luajit-2.1.0b2/dynasm/dasm_x86.lua/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/dynasm/dasm_x86.lua",
"repo_id": "xLua",
"token_count": 34748
} | 2,100 |
/* This is a heavily customized and minimized copy of Lua 5.1.5. */
/* It's only used to build LuaJIT. It does NOT have all standard functions! */
/******************************************************************************
* Copyright (C) 1994-2012 Lua.org, PUC-Rio. All rights reserved.
*
* Permission is hereby gr... | xLua/build/luajit-2.1.0b2/src/host/minilua.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/host/minilua.c",
"repo_id": "xLua",
"token_count": 85658
} | 2,101 |
/*
** Bit manipulation library.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#define lib_bit_c
#define LUA_LIB
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#include "lj_obj.h"
#include "lj_err.h"
#include "lj_buf.h"
#include "lj_strscan.h"
#include "lj_strfmt.h"
#if LJ_HASFF... | xLua/build/luajit-2.1.0b2/src/lib_bit.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lib_bit.c",
"repo_id": "xLua",
"token_count": 2230
} | 2,102 |
/*
** IR assembler (SSA IR -> machine code).
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#define lj_asm_c
#define LUA_CORE
#include "lj_obj.h"
#if LJ_HASJIT
#include "lj_gc.h"
#include "lj_str.h"
#include "lj_tab.h"
#include "lj_frame.h"
#if LJ_HASFFI
#include "lj_ctype.h"
#endif
#incl... | xLua/build/luajit-2.1.0b2/src/lj_asm.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lj_asm.c",
"repo_id": "xLua",
"token_count": 31215
} | 2,103 |
/*
** FFI C call handling.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_CCALL_H
#define _LJ_CCALL_H
#include "lj_obj.h"
#include "lj_ctype.h"
#if LJ_HASFFI
/* -- C calling conventions ----------------------------------------------- */
#if LJ_TARGET_X86ORX64
#if LJ_TARGET_X... | xLua/build/luajit-2.1.0b2/src/lj_ccall.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lj_ccall.h",
"repo_id": "xLua",
"token_count": 1981
} | 2,104 |
/*
** C type management.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_CTYPE_H
#define _LJ_CTYPE_H
#include "lj_obj.h"
#include "lj_gc.h"
#if LJ_HASFFI
/* -- C type definitions -------------------------------------------------- */
/* C type numbers. Highest 4 bits of C type ... | xLua/build/luajit-2.1.0b2/src/lj_ctype.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lj_ctype.h",
"repo_id": "xLua",
"token_count": 7738
} | 2,105 |
/*
** Stack frames.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_FRAME_H
#define _LJ_FRAME_H
#include "lj_obj.h"
#include "lj_bc.h"
/* -- Lua stack frame ----------------------------------------------------- */
/* Frame type markers in LSB of PC (4-byte aligned) or delta (8-... | xLua/build/luajit-2.1.0b2/src/lj_frame.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lj_frame.h",
"repo_id": "xLua",
"token_count": 4169
} | 2,106 |
/*
** Load and dump code.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#include <errno.h>
#include <stdio.h>
#define lj_load_c
#define LUA_CORE
#include "lua.h"
#include "lauxlib.h"
#include "lj_obj.h"
#include "lj_gc.h"
#include "lj_err.h"
#include "lj_buf.h"
#include "lj_func.h"
#incl... | xLua/build/luajit-2.1.0b2/src/lj_load.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lj_load.c",
"repo_id": "xLua",
"token_count": 1802
} | 2,107 |
/*
** Low-overhead profiling.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#define lj_profile_c
#define LUA_CORE
#include "lj_obj.h"
#if LJ_HASPROFILE
#include "lj_buf.h"
#include "lj_frame.h"
#include "lj_debug.h"
#include "lj_dispatch.h"
#if LJ_HASJIT
#include "lj_jit.h"
#include "lj_... | xLua/build/luajit-2.1.0b2/src/lj_profile.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lj_profile.c",
"repo_id": "xLua",
"token_count": 3764
} | 2,108 |
/*
** Table handling.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_TAB_H
#define _LJ_TAB_H
#include "lj_obj.h"
/* Hash constants. Tuned using a brute force search. */
#define HASH_BIAS (-0x04c11db7)
#define HASH_ROT1 14
#define HASH_ROT2 5
#define HASH_ROT3 13
/* Scramble th... | xLua/build/luajit-2.1.0b2/src/lj_tab.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/lj_tab.h",
"repo_id": "xLua",
"token_count": 1248
} | 2,109 |
/*
** LuaJIT core and libraries amalgamation.
** Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
*/
/*
+--------------------------------------------------------------------------+
| WARNING: Compiling the amalgamation needs a lot of virtual memory |
| (around 300 MB with GCC 4.x)! If you don... | xLua/build/luajit-2.1.0b2/src/ljamalg.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/ljamalg.c",
"repo_id": "xLua",
"token_count": 1041
} | 2,110 |
|// Low-level VM code for x64 CPUs in LJ_GC64 mode.
|// Bytecode interpreter, fast functions and helper functions.
|// Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
|
|.arch x64
|.section code_op, code_sub
|
|.actionlist build_actionlist
|.globals GLOB_
|.globalnames globnames
|.externnames extnam... | xLua/build/luajit-2.1.0b2/src/vm_x64.dasc/0 | {
"file_path": "xLua/build/luajit-2.1.0b2/src/vm_x64.dasc",
"repo_id": "xLua",
"token_count": 66241
} | 2,111 |
<!DOCTYPE html>
<html>
<head>
<title>FFI Semantics</title>
<meta charset="utf-8">
<meta name="Copyright" content="Copyright (C) 2005-2021">
<meta name="Language" content="en">
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
<link rel="stylesheet" type="text/css" href="bluequad-print.css" medi... | xLua/build/luajit-2.1.0b3/doc/ext_ffi_semantics.html/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/doc/ext_ffi_semantics.html",
"repo_id": "xLua",
"token_count": 17709
} | 2,112 |
------------------------------------------------------------------------------
-- DynASM ARM64 module.
--
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local _... | xLua/build/luajit-2.1.0b3/dynasm/dasm_arm64.lua/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/dynasm/dasm_arm64.lua",
"repo_id": "xLua",
"token_count": 15833
} | 2,113 |
##############################################################################
# LuaJIT Makefile. Requires GNU Make.
#
# Please read doc/install.html before changing any variables!
#
# Suitable for POSIX platforms (Linux, *BSD, OSX etc.).
# Also works with MinGW and Cygwin on Windows.
# Please check msvcbuild.bat for b... | xLua/build/luajit-2.1.0b3/src/Makefile/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/Makefile",
"repo_id": "xLua",
"token_count": 10041
} | 2,114 |
----------------------------------------------------------------------------
-- LuaJIT module to save/list bytecode.
--
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
-------------------------------------------------------------------------... | xLua/build/luajit-2.1.0b3/src/jit/bcsave.lua/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/jit/bcsave.lua",
"repo_id": "xLua",
"token_count": 8227
} | 2,115 |
----------------------------------------------------------------------------
-- LuaJIT profiler zones.
--
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------
--
-- This... | xLua/build/luajit-2.1.0b3/src/jit/zone.lua/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/jit/zone.lua",
"repo_id": "xLua",
"token_count": 323
} | 2,116 |
# Valgrind suppression file for LuaJIT 2.0.
{
Optimized string compare
Memcheck:Addr4
fun:lj_str_cmp
}
{
Optimized string compare
Memcheck:Addr1
fun:lj_str_cmp
}
{
Optimized string compare
Memcheck:Addr4
fun:lj_str_new
}
{
Optimized string compare
Memcheck:Addr1
fun:lj_str_new
}
{
... | xLua/build/luajit-2.1.0b3/src/lj.supp/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj.supp",
"repo_id": "xLua",
"token_count": 253
} | 2,117 |
/*
** Bytecode reader.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#define lj_bcread_c
#define LUA_CORE
#include "lj_obj.h"
#include "lj_gc.h"
#include "lj_err.h"
#include "lj_buf.h"
#include "lj_str.h"
#include "lj_tab.h"
#include "lj_bc.h"
#if LJ_HASFFI
#include "lj_ctype.h"
#include "... | xLua/build/luajit-2.1.0b3/src/lj_bcread.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_bcread.c",
"repo_id": "xLua",
"token_count": 6138
} | 2,118 |
/*
** FFI C library loader.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#include "lj_obj.h"
#if LJ_HASFFI
#include "lj_gc.h"
#include "lj_err.h"
#include "lj_tab.h"
#include "lj_str.h"
#include "lj_udata.h"
#include "lj_ctype.h"
#include "lj_cconv.h"
#include "lj_cdata.h"
#include "lj_c... | xLua/build/luajit-2.1.0b3/src/lj_clib.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_clib.c",
"repo_id": "xLua",
"token_count": 5180
} | 2,119 |
/*
** PPC instruction emitter.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
/* -- Emit basic instructions --------------------------------------------- */
static void emit_tab(ASMState *as, PPCIns pi, Reg rt, Reg ra, Reg rb)
{
*--as->mcp = pi | PPCF_T(rt) | PPCF_A(ra) | PPCF_B(rb);
}
#... | xLua/build/luajit-2.1.0b3/src/lj_emit_ppc.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_emit_ppc.h",
"repo_id": "xLua",
"token_count": 3435
} | 2,120 |
/*
** SSA IR (Intermediate Representation) format.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_IR_H
#define _LJ_IR_H
#include "lj_obj.h"
/* -- IR instructions ----------------------------------------------------- */
/* IR instruction definition. Order matters, see below. OR... | xLua/build/luajit-2.1.0b3/src/lj_ir.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_ir.h",
"repo_id": "xLua",
"token_count": 9625
} | 2,121 |
/*
** FOLD: Constant Folding, Algebraic Simplifications and Reassociation.
** ABCelim: Array Bounds Check Elimination.
** CSE: Common-Subexpression Elimination.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#define lj_opt_fold_c
#define LUA_CORE
#include <math.h>
#include "lj_obj.h"
#if ... | xLua/build/luajit-2.1.0b3/src/lj_opt_fold.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_opt_fold.c",
"repo_id": "xLua",
"token_count": 35060
} | 2,122 |
/*
** Snapshot handling.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#define lj_snap_c
#define LUA_CORE
#include "lj_obj.h"
#if LJ_HASJIT
#include "lj_gc.h"
#include "lj_tab.h"
#include "lj_state.h"
#include "lj_frame.h"
#include "lj_bc.h"
#include "lj_ir.h"
#include "lj_jit.h"
#includ... | xLua/build/luajit-2.1.0b3/src/lj_snap.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_snap.c",
"repo_id": "xLua",
"token_count": 15557
} | 2,123 |
/*
** Definitions for MIPS CPUs.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_TARGET_MIPS_H
#define _LJ_TARGET_MIPS_H
/* -- Registers IDs ------------------------------------------------------- */
#define GPRDEF(_) \
_(R0) _(R1) _(R2) _(R3) _(R4) _(R5) _(R6) _(R7) \
_(R8)... | xLua/build/luajit-2.1.0b3/src/lj_target_mips.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_target_mips.h",
"repo_id": "xLua",
"token_count": 5795
} | 2,124 |
/*
** Configuration header.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef luaconf_h
#define luaconf_h
#ifndef WINVER
#define WINVER 0x0501
#endif
#include <limits.h>
#include <stddef.h>
/* Default path for loading Lua and C modules with require(). */
#if defined(_WIN32)
/*
** In W... | xLua/build/luajit-2.1.0b3/src/luaconf.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/luaconf.h",
"repo_id": "xLua",
"token_count": 1919
} | 2,125 |
.PHONY: default test benchmark clean
default:
@echo "make target include: test bechmark clean"
test:
$(MAKE) -C test test
benchmark:
$(MAKE) -C test benchmark
clean:
$(MAKE) -C test clean
| xLua/build/luajit-2.1.0b3/src/x64/Makefile/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/x64/Makefile",
"repo_id": "xLua",
"token_count": 74
} | 2,126 |
#ifndef AUXILIAR_H
#define AUXILIAR_H
/*=========================================================================*\
* Auxiliar routines for class hierarchy manipulation
* LuaSocket toolkit (but completely independent of other LuaSocket modules)
*
* A LuaSocket class is a name associated with Lua metatables. A LuaSocket... | xLua/build/luasocket/auxiliar.h/0 | {
"file_path": "xLua/build/luasocket/auxiliar.h",
"repo_id": "xLua",
"token_count": 648
} | 2,127 |
#ifndef OPTIONS_H
#define OPTIONS_H
/*=========================================================================*\
* Common option interface
* LuaSocket toolkit
*
* This module provides a common interface to socket options, used mainly by
* modules UDP and TCP.
\*=======================================================... | xLua/build/luasocket/options.h/0 | {
"file_path": "xLua/build/luasocket/options.h",
"repo_id": "xLua",
"token_count": 947
} | 2,128 |
#ifndef WSOCKET_H
#define WSOCKET_H
/*=========================================================================*\
* Socket compatibilization module for Win32
* LuaSocket toolkit
\*=========================================================================*/
/*=============================================================... | xLua/build/luasocket/wsocket.h/0 | {
"file_path": "xLua/build/luasocket/wsocket.h",
"repo_id": "xLua",
"token_count": 267
} | 2,129 |
mkdir -p build_osx && cd build_osx
cmake -GXcode ../
cd ..
cmake --build build_osx --config Release
mkdir -p plugin_lua53/Plugins/xlua.bundle/Contents/MacOS/
cp build_osx/Release/xlua.bundle/Contents/MacOS/xlua plugin_lua53/Plugins/xlua.bundle/Contents/MacOS/xlua
| xLua/build/make_osx_lua53.sh/0 | {
"file_path": "xLua/build/make_osx_lua53.sh",
"repo_id": "xLua",
"token_count": 106
} | 2,130 |
mkdir build_uwp & pushd build_uwp
cmake -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
IF %ERRORLEVEL% NEQ 0 cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
popd
cmake --build build_uwp --config Release
md plugin_lua53\Plugins\... | xLua/build/vs2015/make_uwp.bat/0 | {
"file_path": "xLua/build/vs2015/make_uwp.bat",
"repo_id": "xLua",
"token_count": 501
} | 2,131 |
---
title: FAQ
type: guide
order: 3
---
## FAQ
### xLua发布包怎么用?
xLua目前以zip包形式发布,在工程目录下解压即可。
### xLua可以放别的目录吗?
可以,但生成代码目录需要配置一下(默认放`Assets\XLua\Gen`目录),具体可以看《XLua的配置.doc》的GenPath配置介绍。
### lua源码只能以txt后缀?
什么后缀都可以。
如果你想以`TextAsset`打包到安装包(比如放到`Resources`目录),Unity不认`lua`后缀,这是Unity的规则。
如果你不打包到安装包,就没有后缀的限制:比如自行下载到某个目录(... | xLua/docs/source/src/v1/guide/faq.md/0 | {
"file_path": "xLua/docs/source/src/v1/guide/faq.md",
"repo_id": "xLua",
"token_count": 6694
} | 2,132 |
@import "_settings"
body,footer,header, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, form, fieldset, legend, button, input, textarea, th, td
margin 0
padding 0
text-align center
-webkit-text-size-adjust none
color: $main-color
body,button, input, select, textarea, ol,p, blockquote, dl... | xLua/docs/source/themes/catlib/source/css/_common.styl/0 | {
"file_path": "xLua/docs/source/themes/catlib/source/css/_common.styl",
"repo_id": "xLua",
"token_count": 531
} | 2,133 |
/*
(C) 2019 David Lettier
lettier.com
*/
#version 150
uniform sampler2D colorTexture;
uniform vec2 parameters;
out vec4 fragColor;
void main() {
vec2 texSize = textureSize(colorTexture, 0).xy;
vec2 texCoord = gl_FragCoord.xy / texSize;
fragColor = texture(colorTexture, texCoord);
int size = int(para... | 3d-game-shaders-for-beginners/demonstration/shaders/fragment/box-blur.frag/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/fragment/box-blur.frag",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 377
} | 0 |
/*
(C) 2019 David Lettier
lettier.com
*/
#version 150
#define MAX_SHININESS 127.75
uniform struct
{ vec3 specular
; float shininess
;
} p3d_Material;
out vec4 fragColor;
void main() {
fragColor =
vec4
( p3d_Material.specular
, clamp(p3d_Material.shininess / MAX_SHININESS, 0.0, 1.0)
... | 3d-game-shaders-for-beginners/demonstration/shaders/fragment/material-specular.frag/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/fragment/material-specular.frag",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 149
} | 1 |
/*
(C) 2019 David Lettier
lettier.com
*/
#version 150
#define NUMBER_OF_LIGHTS 4
uniform mat4 p3d_ModelViewMatrix;
uniform mat4 p3d_ProjectionMatrix;
uniform mat3 p3d_NormalMatrix;
uniform struct p3d_LightSourceParameters
{ vec4 color
; vec4 ambient
; vec4 diffuse
; vec4 specular
; vec4 position
... | 3d-game-shaders-for-beginners/demonstration/shaders/vertex/base.vert/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/vertex/base.vert",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 606
} | 2 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="Interested in adding textures, lighting, shadows, normal maps, glowi... | 3d-game-shaders-for-beginners/docs/depth-of-field.html/0 | {
"file_path": "3d-game-shaders-for-beginners/docs/depth-of-field.html",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 5159
} | 3 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="Interested in adding textures, lighting, shadows, normal maps, glowi... | 3d-game-shaders-for-beginners/docs/pixelization.html/0 | {
"file_path": "3d-game-shaders-for-beginners/docs/pixelization.html",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 3924
} | 4 |
[:arrow_backward:](setup.md)
[:arrow_double_up:](../README.md)
[:arrow_up_small:](#)
[:arrow_down_small:](#copyright)
[:arrow_forward:](running-the-demo.md)
# 3D Game Shaders For Beginners
## Building The Demo
<p align="center">
<img src="https://i.imgur.com/PQcDnIu.gif" alt="Building The Demo" title="Building The D... | 3d-game-shaders-for-beginners/sections/building-the-demo.md/0 | {
"file_path": "3d-game-shaders-for-beginners/sections/building-the-demo.md",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 1450
} | 5 |
[:arrow_backward:](cel-shading.md)
[:arrow_double_up:](../README.md)
[:arrow_up_small:](#)
[:arrow_down_small:](#copyright)
[:arrow_forward:](deferred-rendering.md)
# 3D Game Shaders For Beginners
## Normal Mapping
<p align="center">
<img src="https://i.imgur.com/M4eHo9I.gif" alt="Normal Mapping" title="Normal Mappi... | 3d-game-shaders-for-beginners/sections/normal-mapping.md/0 | {
"file_path": "3d-game-shaders-for-beginners/sections/normal-mapping.md",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 1808
} | 6 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef air_VehicleSimApiBase_hpp
#define air_VehicleSimApiBase_hpp
#include "common/CommonStructs.hpp"
#include "common/UpdatableObject.hpp"
#include "common/ImageCaptureBase.hpp"
#include "physics/Kinematics.hpp"
#includ... | AirSim/AirLib/include/api/VehicleSimApiBase.hpp/0 | {
"file_path": "AirSim/AirLib/include/api/VehicleSimApiBase.hpp",
"repo_id": "AirSim",
"token_count": 1070
} | 7 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef common_utils_LogFileWriter_hpp
#define common_utils_LogFileWriter_hpp
#include <iostream>
#include <fstream>
#include "common/Common.hpp"
namespace msr
{
namespace airlib
{
class LogFileWriter
{
publi... | AirSim/AirLib/include/common/LogFileWriter.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/LogFileWriter.hpp",
"repo_id": "AirSim",
"token_count": 1004
} | 8 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef common_utils_FileSystem_hpp
#define common_utils_FileSystem_hpp
#include <codecvt>
#include <fstream>
#include <string>
#include "Utils.hpp"
// This defines a default folder name for all the files created by AirLi... | AirSim/AirLib/include/common/common_utils/FileSystem.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/common_utils/FileSystem.hpp",
"repo_id": "AirSim",
"token_count": 3049
} | 9 |
/*********************************************************
*
* Copyright (C) 2014 by Vitaliy Vitsentiy
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licens... | AirSim/AirLib/include/common/common_utils/ctpl_stl.h/0 | {
"file_path": "AirSim/AirLib/include/common/common_utils/ctpl_stl.h",
"repo_id": "AirSim",
"token_count": 4896
} | 10 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef air_CubeGeoFence_hpp
#define air_CubeGeoFence_hpp
#include "common/Common.hpp"
namespace msr
{
namespace airlib
{
class CubeGeoFence : public IGeoFence
{
private:
Vector3r point_min_, point_ma... | AirSim/AirLib/include/safety/CubeGeoFence.hpp/0 | {
"file_path": "AirSim/AirLib/include/safety/CubeGeoFence.hpp",
"repo_id": "AirSim",
"token_count": 1114
} | 11 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef msr_airlib_GpsSimpleParams_hpp
#define msr_airlib_GpsSimpleParams_hpp
#include "common/Common.hpp"
namespace msr
{
namespace airlib
{
struct GpsSimpleParams
{
real_T eph_time_constant = 0.9f, epv_... | AirSim/AirLib/include/sensors/gps/GpsSimpleParams.hpp/0 | {
"file_path": "AirSim/AirLib/include/sensors/gps/GpsSimpleParams.hpp",
"repo_id": "AirSim",
"token_count": 773
} | 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.