text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: tests/gtest-1.8.0/include/gtest/gtest_prod.h
// Copyright 2006, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/gtest_prod.h", "license": "bsd", "size": 2515} |
### File: tests/gtest-1.8.0/include/gtest/internal/custom/gtest-port.h
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source c... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/custom/gtest-port.h", "license": "bsd", "size": 3298} |
### File: tests/gtest-1.8.0/include/gtest/internal/custom/gtest-printers.h
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of sour... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/custom/gtest-printers.h", "license": "bsd", "size": 2099} |
### File: tests/gtest-1.8.0/include/gtest/internal/custom/gtest.h
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code m... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/custom/gtest.h", "license": "bsd", "size": 2192} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-death-test-internal.h
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-death-test-internal.h", "license": "bsd", "size": 11180} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-filepath.h
// Copyright 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-filepath.h", "license": "bsd", "size": 9558} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-internal.h
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-internal.h", "license": "bsd", "size": 48537} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-linked_ptr.h
// Copyright 2003 Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source cod... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-linked_ptr.h", "license": "bsd", "size": 8424} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-param-util-generated.h.pump
$$ -*- mode: c++; -*-
$var n = 50 $$ Maximum length of Values arguments we want to support.
$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
// Copyright 2008 Google Inc.
// All Rights Reserved.
//
// Red... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-param-util-generated.h.pump", "license": "bsd", "size": 8901} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-param-util.h
// Copyright 2008 Google Inc.
// All Rights Reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source cod... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-param-util.h", "license": "bsd", "size": 27669} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-port-arch.h
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source cod... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-port-arch.h", "license": "bsd", "size": 3711} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-port.h
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code mus... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-port.h", "license": "bsd", "size": 94986} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-string.h
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code m... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-string.h", "license": "bsd", "size": 6895} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-tuple.h.pump
$$ -*- mode: c++; -*-
$var n = 10 $$ Maximum number of tuple fields we want to support.
$$ This meta comment fixes auto-indentation in Emacs. }}
// Copyright 2009 Google Inc.
// All Rights Reserved.
//
// Redistribution and use in source and binary ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-tuple.h.pump", "license": "bsd", "size": 9620} |
### File: tests/gtest-1.8.0/include/gtest/internal/gtest-type-util.h.pump
$$ -*- mode: c++; -*-
$var n = 50 $$ Maximum length of type lists we want to support.
// Copyright 2008 Google Inc.
// All Rights Reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted p... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/include/gtest/internal/gtest-type-util.h.pump", "license": "bsd", "size": 9317} |
### File: tests/gtest-1.8.0/src/gtest-all.cc
// Copyright 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest-all.cc", "license": "bsd", "size": 2161} |
### File: tests/gtest-1.8.0/src/gtest-death-test.cc
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest-death-test.cc", "license": "bsd", "size": 51140} |
### File: tests/gtest-1.8.0/src/gtest-filepath.cc
// Copyright 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest-filepath.cc", "license": "bsd", "size": 14507} |
### File: tests/gtest-1.8.0/src/gtest-internal-inl.h
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain th... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest-internal-inl.h", "license": "bsd", "size": 45140} |
### File: tests/gtest-1.8.0/src/gtest-port.cc
// Copyright 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest-port.cc", "license": "bsd", "size": 42855} |
### File: tests/gtest-1.8.0/src/gtest-printers.cc
// Copyright 2007, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest-printers.cc", "license": "bsd", "size": 15193} |
### File: tests/gtest-1.8.0/src/gtest-test-part.cc
// Copyright 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest-test-part.cc", "license": "bsd", "size": 3819} |
### File: tests/gtest-1.8.0/src/gtest-typed-test.cc
// Copyright 2008 Google Inc.
// All Rights Reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest-typed-test.cc", "license": "bsd", "size": 3961} |
### File: tests/gtest-1.8.0/src/gtest.cc
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copy... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest.cc", "license": "bsd", "size": 212917} |
### File: tests/gtest-1.8.0/src/gtest_main.cc
// Copyright 2006, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/gtest-1.8.0/src/gtest_main.cc", "license": "bsd", "size": 1767} |
### File: tests/test_main.cpp
/***********************************************************************
* Software License Agreement (BSD License)
*
* Copyright 2011-2016 Jose Luis Blanco (joseluisblancoc@gmail.com).
* All rights reserved.
*
* THE BSD LICENSE
*
* Redistribution and use in source and binary for... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/nanoflann", "path": "tests/test_main.cpp", "license": "bsd", "size": 14634} |
### File: centralized/cbs/a_star.py
"""
AStar search
author: Ashwin Bose (@atb033)
"""
class AStar():
def __init__(self, env):
self.agent_dict = env.agent_dict
self.admissible_heuristic = env.admissible_heuristic
self.is_at_goal = env.is_at_goal
self.get_neighbors = env.get_neigh... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/cbs/a_star.py", "license": "mit", "size": 2048} |
### File: centralized/cbs/cbs.py
"""
Python implementation of Conflict-based search
author: Ashwin Bose (@atb033)
"""
import sys
sys.path.insert(0, '../')
import argparse
import yaml
from math import fabs
from itertools import combinations
from copy import deepcopy
from cbs.a_star import AStar
class Location(objec... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/cbs/cbs.py", "license": "mit", "size": 12188} |
### File: centralized/scheduling/minimize.py
import sys
sys.path.insert(0, '../')
import yaml
import argparse
from scheduling.tpg import Vertex, TemporalPlanGraph
from scheduling.stn import SimpleTemporalNetwork
from cbs.cbs import Location
from scipy.optimize import linprog
class OptimizationClass:
def __init__... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/scheduling/minimize.py", "license": "mit", "size": 3830} |
### File: centralized/scheduling/stn.py
"""
Simple temporal network
author: Ashwin Bose (@atb033)
"""
import sys
sys.path.insert(0, '../')
import yaml
import argparse
from scheduling.tpg import Vertex, TemporalPlanGraph
from cbs.cbs import Location
class Edge:
"""
creating stn edge from tpg edge
"""... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/scheduling/stn.py", "license": "mit", "size": 2372} |
### File: centralized/scheduling/tpg.py
"""
Construction of Temporal Plan Graph (TPG)
author: Ashwin Bose (@atb033)
"""
import sys
sys.path.insert(0, '../')
import yaml
import argparse
from cbs.cbs import Location
class Vertex:
def __init__(self, agent, location, time):
self.agent = agent
self.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/scheduling/tpg.py", "license": "mit", "size": 6494} |
### File: centralized/sipp/graph_generation.py
"""
Graph generation for sipp
author: Ashwin Bose (@atb033)
See the article: 10.1109/ICRA.2011.5980306
"""
import argparse
import yaml
from bisect import bisect
class State(object):
def __init__(self, position=(-1,-1), t=0, interval=(0,float('inf'))):
se... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/sipp/graph_generation.py", "license": "mit", "size": 4276} |
### File: centralized/sipp/multi_sipp.py
"""
Extension of SIPP to multi-robot scenarios
author: Ashwin Bose (@atb033)
See the article: 10.1109/ICRA.2011.5980306
"""
import argparse
import yaml
from math import fabs
from graph_generation import SippGraph, State
from sipp import SippPlanner
def main():
parser =... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/sipp/multi_sipp.py", "license": "mit", "size": 1237} |
### File: centralized/sipp/sipp.py
"""
SIPP implementation
author: Ashwin Bose (@atb033)
See the article: DOI: 10.1109/ICRA.2011.5980306
"""
import argparse
import yaml
from math import fabs
from graph_generation import SippGraph, State
class SippPlanner(SippGraph):
def __init__(self, map, agent_id):
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/sipp/sipp.py", "license": "mit", "size": 4538} |
### File: centralized/sipp/visualize_sipp.py
#!/usr/bin/env python3
import yaml
import matplotlib
# matplotlib.use("Agg")
from matplotlib.patches import Circle, Rectangle, Arrow
from matplotlib.collections import PatchCollection
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import animation
import ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/sipp/visualize_sipp.py", "license": "mit", "size": 6253} |
### File: centralized/visualize.py
#!/usr/bin/env python3
import yaml
import matplotlib
# matplotlib.use("Agg")
from matplotlib.patches import Circle, Rectangle, Arrow
from matplotlib.collections import PatchCollection
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import animation
import matplotlib... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "centralized/visualize.py", "license": "mit", "size": 5537} |
### File: decentralized/decentralized.py
import velocity_obstacle.velocity_obstacle as velocity_obstacle
import nmpc.nmpc as nmpc
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"-m", "--mode", help="mode of obstacle avoidance; options: velocity_obstac... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "decentralized/decentralized.py", "license": "mit", "size": 682} |
### File: decentralized/nmpc/nmpc.py
"""
Collision avoidance using Nonlinear Model-Predictive Control
author: Ashwin Bose (atb033@github.com)
"""
from utils.multi_robot_plot import plot_robot_and_obstacles
from utils.create_obstacles import create_obstacles
import numpy as np
from scipy.optimize import minimize, Boun... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "decentralized/nmpc/nmpc.py", "license": "mit", "size": 4105} |
### File: decentralized/utils/control.py
import numpy as np
def compute_desired_velocity(current_pos, goal_pos, robot_radius, vmax):
disp_vec = (goal_pos - current_pos)[:2]
norm = np.linalg.norm(disp_vec)
if norm < robot_radius / 5:
return np.zeros(2)
disp_vec = disp_vec / norm
np.shape(dis... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "decentralized/utils/control.py", "license": "mit", "size": 343} |
### File: decentralized/utils/create_obstacles.py
import numpy as np
def create_obstacles(sim_time, num_timesteps):
# Obstacle 1
v = -2
p0 = np.array([5, 12])
obst = create_robot(p0, v, np.pi/2, sim_time,
num_timesteps).reshape(4, num_timesteps, 1)
obstacles = obst
# Obs... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "decentralized/utils/create_obstacles.py", "license": "mit", "size": 1478} |
### File: decentralized/utils/multi_robot_plot.py
"""
Plotting tool for 2D multi-robot system
author: Ashwin Bose (@atb033)
"""
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib.patches import Circle
import numpy as np
def plot_robot_and_obstacles(robot, obstacles, robot_radiu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "decentralized/utils/multi_robot_plot.py", "license": "mit", "size": 2217} |
### File: decentralized/velocity_obstacle/velocity_obstacle.py
"""
Collision avoidance using Velocity-obstacle method
author: Ashwin Bose (atb033@github.com)
"""
from utils.multi_robot_plot import plot_robot_and_obstacles
from utils.create_obstacles import create_obstacles
from utils.control import compute_desired_ve... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/multi_agent_path_planning", "path": "decentralized/velocity_obstacle/velocity_obstacle.py", "license": "mit", "size": 3874} |
### File: contrib/geo2nginx.pl
#!/usr/bin/perl -w
# (c) Andrei Nigmatulin, 2005
#
# this script provided "as is", without any warranties. use it at your own risk.
#
# special thanx to Andrew Sitnikov for perl port
#
# this script converts CSV geoip database (free download at http://www.maxmind.com/app/geoip_co... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Perl", "repo_name": "minhanghuang/nginx", "path": "contrib/geo2nginx.pl", "license": "bsd", "size": 1272} |
### File: contrib/unicode2nginx/unicode-to-nginx.pl
#!/usr/bin/perl -w
# Convert unicode mappings to nginx configuration file format.
# You may find useful mappings in various places, including
# unicode.org official site:
#
# http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT
# http://www.unico... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Perl", "repo_name": "minhanghuang/nginx", "path": "contrib/unicode2nginx/unicode-to-nginx.pl", "license": "bsd", "size": 1090} |
### File: contrib/vim/ftdetect/nginx.vim
au BufRead,BufNewFile *.nginx set ft=nginx
au BufRead,BufNewFile */etc/nginx/* set ft=nginx
au BufRead,BufNewFile */usr/local/nginx/conf/* set ft=nginx
au BufRead,BufNewFile nginx.conf set ft=nginx
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vim Script", "repo_name": "minhanghuang/nginx", "path": "contrib/vim/ftdetect/nginx.vim", "license": "bsd", "size": 198} |
### File: contrib/vim/ftplugin/nginx.vim
setlocal commentstring=#\ %s
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vim Script", "repo_name": "minhanghuang/nginx", "path": "contrib/vim/ftplugin/nginx.vim", "license": "bsd", "size": 29} |
### File: contrib/vim/indent/nginx.vim
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=
" cindent actually works for nginx' simple file structure
setlocal cindent
" Just make sure that the comments are not reset as defs would be.
setlocal cinkeys-=0#
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vim Script", "repo_name": "minhanghuang/nginx", "path": "contrib/vim/indent/nginx.vim", "license": "bsd", "size": 250} |
### File: contrib/vim/syntax/nginx.vim
" Vim syntax file
" Language: nginx.conf
if exists("b:current_syntax")
finish
end
let s:save_cpo = &cpo
set cpo&vim
" general syntax
if has("patch-7.4.1142")
" except control characters, ";", "{", and "}"
syn iskeyword 33-58,60-122,124,126-255
endif
syn match ngxNam... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Vim Script", "repo_name": "minhanghuang/nginx", "path": "contrib/vim/syntax/nginx.vim", "license": "bsd", "size": 113543} |
### File: docs/GNUmakefile
VER= $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
| sed -e 's/^.*"\(.*\)".*/\1/')
NGINX= nginx-$(VER)
TEMP= tmp
XSLS?= xslscript.pl
all: changes
changes: $(TEMP)/$(NGINX)/CHANGES.ru \
$(TEMP)/$(NGINX)/CHANGES
$(TEMP)/$(NGINX)/CHANGES.ru: docs/dtd/changes.dtd \
d... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "minhanghuang/nginx", "path": "docs/GNUmakefile", "license": "bsd", "size": 958} |
### File: docs/html/50x.html
<!DOCTYPE html>
<html>
<head>
<title>Error</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>An error occurred.</h1>
<p>Sorry, the page you are looking for is currently unavai... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/nginx", "path": "docs/html/50x.html", "license": "bsd", "size": 497} |
### File: docs/html/index.html
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "HTML", "repo_name": "minhanghuang/nginx", "path": "docs/html/index.html", "license": "bsd", "size": 615} |
### File: docs/man/nginx.8
.\"
.\" Copyright (C) 2010, 2019 Sergey A. Osokin
.\" Copyright (C) Nginx, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of sou... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Roff Manpage", "repo_name": "minhanghuang/nginx", "path": "docs/man/nginx.8", "license": "bsd", "size": 5480} |
### File: docs/xslt/changes.xslt
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<xsl:param select="'en'" name="lang"/>
<xsl:param select="'../xml/change_log_conf.xml'" name="configuration"/>
<xsl:variable select="docu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "XSLT", "repo_name": "minhanghuang/nginx", "path": "docs/xslt/changes.xslt", "license": "bsd", "size": 5400} |
### File: misc/GNUmakefile
VER = $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
| sed -e 's/^.*"\(.*\)".*/\1/')
NGINX = nginx-$(VER)
TEMP = tmp
CC = cl
OBJS = objs.msvc8
OPENSSL = openssl-3.0.14
ZLIB = zlib-1.3.1
PCRE = pcre2-10.39
release: export
mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGI... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "minhanghuang/nginx", "path": "misc/GNUmakefile", "license": "bsd", "size": 4123} |
### File: src/core/nginx.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <nginx.h>
static void ngx_show_version_info(void);
static ngx_int_t ngx_add_inherited_sockets(ngx_cycle_t *cycle);
static void ngx_cleanup_environment(void *data);
stat... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/nginx.c", "license": "bsd", "size": 40686} |
### File: src/core/nginx.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGINX_H_INCLUDED_
#define _NGINX_H_INCLUDED_
#define nginx_version 1027002
#define NGINX_VERSION "1.27.2"
#define NGINX_VER "nginx/" NGINX_VERSION
#ifdef NGX_BUILD
#define NGINX_VER_BUILD NGI... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/nginx.h", "license": "bsd", "size": 476} |
### File: src/core/ngx_array.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
ngx_array_t *
ngx_array_create(ngx_pool_t *p, ngx_uint_t n, size_t size)
{
ngx_array_t *a;
a = ngx_palloc(p, sizeof(ngx_array_t));
if (a == NULL) {
retu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_array.c", "license": "bsd", "size": 2694} |
### File: src/core/ngx_array.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_ARRAY_H_INCLUDED_
#define _NGX_ARRAY_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
typedef struct {
void *elts;
ngx_uint_t nelts;
size_t size;
ngx_uint_t nallo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_array.h", "license": "bsd", "size": 1069} |
### File: src/core/ngx_bpf.c
/*
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#define NGX_BPF_LOGBUF_SIZE (16 * 1024)
static ngx_inline int
ngx_bpf(enum bpf_cmd cmd, union bpf_attr *attr, unsigned int size)
{
return syscall(__NR_bpf, cmd, attr, size);
}
void
ngx_bpf_program... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_bpf.c", "license": "bsd", "size": 3039} |
### File: src/core/ngx_bpf.h
/*
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_BPF_H_INCLUDED_
#define _NGX_BPF_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#include <linux/bpf.h>
typedef struct {
char *name;
int offset;
} ngx_bpf_reloc_t;
typedef struct {
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_bpf.h", "license": "bsd", "size": 1032} |
### File: src/core/ngx_buf.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
ngx_buf_t *
ngx_create_temp_buf(ngx_pool_t *pool, size_t size)
{
ngx_buf_t *b;
b = ngx_calloc_buf(pool);
if (b == NULL) {
return NULL;
}
b->start... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_buf.c", "license": "bsd", "size": 5490} |
### File: src/core/ngx_buf.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_BUF_H_INCLUDED_
#define _NGX_BUF_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
typedef void * ngx_buf_tag_t;
typedef struct ngx_buf_s ngx_buf_t;
struct ngx_buf_s {
u_char ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_buf.h", "license": "bsd", "size": 4880} |
### File: src/core/ngx_conf_file.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#define NGX_CONF_BUFFER 4096
static ngx_int_t ngx_conf_add_dump(ngx_conf_t *cf, ngx_str_t *filename);
static ngx_int_t ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last);... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_conf_file.c", "license": "bsd", "size": 34400} |
### File: src/core/ngx_conf_file.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_CONF_FILE_H_INCLUDED_
#define _NGX_CONF_FILE_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
/*
* AAAA number of arguments
* FF command flags
* TT command type... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_conf_file.h", "license": "bsd", "size": 10320} |
### File: src/core/ngx_config.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_CONFIG_H_INCLUDED_
#define _NGX_CONFIG_H_INCLUDED_
#include <ngx_auto_headers.h>
#if defined __DragonFly__ && !defined __FreeBSD__
#define __FreeBSD__ 4
#define __FreeBSD_version 480101
#endif
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_config.h", "license": "bsd", "size": 2777} |
### File: src/core/ngx_connection.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
ngx_os_io_t ngx_io;
static void ngx_drain_connections(ngx_cycle_t *cycle);
ngx_listening_t *
ngx_create_listening(ngx_conf_t *cf, struct soc... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_connection.c", "license": "bsd", "size": 44252} |
### File: src/core/ngx_connection.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_CONNECTION_H_INCLUDED_
#define _NGX_CONNECTION_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
typedef struct ngx_listening_s ngx_listening_t;
struct ngx_listening_s {
ngx_socket_t ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_connection.h", "license": "bsd", "size": 6426} |
### File: src/core/ngx_core.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_CORE_H_INCLUDED_
#define _NGX_CORE_H_INCLUDED_
#include <ngx_config.h>
typedef struct ngx_module_s ngx_module_t;
typedef struct ngx_conf_s ngx_conf_t;
typedef struct ngx_cycle_s ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_core.h", "license": "bsd", "size": 3126} |
### File: src/core/ngx_cpuinfo.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#if (( __i386__ || __amd64__ ) && ( __GNUC__ || __INTEL_COMPILER ))
static ngx_inline void ngx_cpuid(uint32_t i, uint32_t *buf);
#if ( __i386__ )
static ngx_inline vo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_cpuinfo.c", "license": "bsd", "size": 2423} |
### File: src/core/ngx_crc.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_CRC_H_INCLUDED_
#define _NGX_CRC_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
/* 32-bit crc16 */
static ngx_inline uint32_t
ngx_crc(u_char *data, size_t len)
{
uint32_t sum;
for (sum... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_crc.h", "license": "bsd", "size": 616} |
### File: src/core/ngx_crc32.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
/*
* The code and lookup tables are based on the algorithm
* described at http://www.w3.org/TR/PNG/
*
* The 256 element lookup table takes 1024 bytes, and it may be comp... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_crc32.c", "license": "bsd", "size": 4927} |
### File: src/core/ngx_crc32.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_CRC32_H_INCLUDED_
#define _NGX_CRC32_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
extern uint32_t *ngx_crc32_table_short;
extern uint32_t ngx_crc32_table256[];
static ngx_inline uint32_t... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_crc32.h", "license": "bsd", "size": 1359} |
### File: src/core/ngx_crypt.c
/*
* Copyright (C) Maxim Dounin
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_crypt.h>
#include <ngx_md5.h>
#include <ngx_sha1.h>
#if (NGX_CRYPT)
static ngx_int_t ngx_crypt_apr1(ngx_pool_t *pool, u_char *key, u_char *salt,
u_char **encrypted);
static ngx_int_t... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_crypt.c", "license": "bsd", "size": 6777} |
### File: src/core/ngx_crypt.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_CRYPT_H_INCLUDED_
#define _NGX_CRYPT_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
ngx_int_t ngx_crypt(ngx_pool_t *pool, u_char *key, u_char *salt,
u_char **encrypted);
#endif /* _NGX_CR... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_crypt.h", "license": "bsd", "size": 308} |
### File: src/core/ngx_cycle.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
static void ngx_destroy_cycle_pools(ngx_conf_t *conf);
static ngx_int_t ngx_init_zone_pool(ngx_cycle_t *cycle,
ngx_shm_zone_t *shm_zone);
static n... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_cycle.c", "license": "bsd", "size": 38105} |
### File: src/core/ngx_cycle.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_CYCLE_H_INCLUDED_
#define _NGX_CYCLE_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#ifndef NGX_CYCLE_POOL_SIZE
#define NGX_CYCLE_POOL_SIZE NGX_DEFAULT_POOL_SIZE
#endif
#define NGX_DEBUG_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_cycle.h", "license": "bsd", "size": 4320} |
### File: src/core/ngx_file.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
static ngx_int_t ngx_test_full_name(ngx_str_t *name);
static ngx_atomic_t temp_number = 0;
ngx_atomic_t *ngx_temp_number = &temp_number;
ngx_atomic_int_t ngx... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_file.c", "license": "bsd", "size": 27105} |
### File: src/core/ngx_file.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_FILE_H_INCLUDED_
#define _NGX_FILE_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
struct ngx_file_s {
ngx_fd_t fd;
ngx_str_t name;
ngx_file_info_t ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_file.h", "license": "bsd", "size": 4667} |
### File: src/core/ngx_hash.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
void *
ngx_hash_find(ngx_hash_t *hash, ngx_uint_t key, u_char *name, size_t len)
{
ngx_uint_t i;
ngx_hash_elt_t *elt;
#if 0
ngx_log_error(NGX_LOG_ALERT, n... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_hash.c", "license": "bsd", "size": 23024} |
### File: src/core/ngx_hash.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_HASH_H_INCLUDED_
#define _NGX_HASH_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
typedef struct {
void *value;
u_short len;
u_char name[1];
} ngx_ha... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_hash.h", "license": "bsd", "size": 2882} |
### File: src/core/ngx_inet.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
static ngx_int_t ngx_parse_unix_domain_url(ngx_pool_t *pool, ngx_url_t *u);
static ngx_int_t ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u);
static ngx_int_t ngx_parse_in... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_inet.c", "license": "bsd", "size": 30810} |
### File: src/core/ngx_inet.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_INET_H_INCLUDED_
#define _NGX_INET_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#define NGX_INET_ADDRSTRLEN (sizeof("255.255.255.255") - 1)
#define NGX_INET6_ADDRSTRLEN ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_inet.h", "license": "bsd", "size": 3703} |
### File: src/core/ngx_list.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
ngx_list_t *
ngx_list_create(ngx_pool_t *pool, ngx_uint_t n, size_t size)
{
ngx_list_t *list;
list = ngx_palloc(pool, sizeof(ngx_list_t));
if (list == NULL) {
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_list.c", "license": "bsd", "size": 1102} |
### File: src/core/ngx_list.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_LIST_H_INCLUDED_
#define _NGX_LIST_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
typedef struct ngx_list_part_s ngx_list_part_t;
struct ngx_list_part_s {
void *elts;
ngx_u... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_list.h", "license": "bsd", "size": 1436} |
### File: src/core/ngx_log.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
static char *ngx_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
static char *ngx_log_set_levels(ngx_conf_t *cf, ngx_log_t *log);
static void ngx_log_insert(ngx_log... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_log.c", "license": "bsd", "size": 16637} |
### File: src/core/ngx_log.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_LOG_H_INCLUDED_
#define _NGX_LOG_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#define NGX_LOG_STDERR 0
#define NGX_LOG_EMERG 1
#define NGX_LOG_ALERT 2
#define... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_log.h", "license": "bsd", "size": 9716} |
### File: src/core/ngx_md5.c
/*
* An internal implementation, based on Alexander Peslyak's
* public domain implementation:
* http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_md5.h>
static const u_char *ngx_md5_body(ngx_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_md5.c", "license": "bsd", "size": 8633} |
### File: src/core/ngx_md5.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_MD5_H_INCLUDED_
#define _NGX_MD5_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
typedef struct {
uint64_t bytes;
uint32_t a, b, c, d;
u_char buffer[64];
} ngx_md5_t;
void ngx_m... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_md5.h", "license": "bsd", "size": 475} |
### File: src/core/ngx_module.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Maxim Dounin
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#define NGX_MAX_DYNAMIC_MODULES 128
static ngx_uint_t ngx_module_index(ngx_cycle_t *cycle);
static ngx_uint_t ngx_module_ctx_index(ngx_cycl... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_module.c", "license": "bsd", "size": 8294} |
### File: src/core/ngx_module.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Maxim Dounin
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_MODULE_H_INCLUDED_
#define _NGX_MODULE_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#include <nginx.h>
#define NGX_MODULE_UNSET_INDEX (ngx_uint_t) -1
#define... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_module.h", "license": "bsd", "size": 7055} |
### File: src/core/ngx_murmurhash.c
/*
* Copyright (C) Austin Appleby
*/
#include <ngx_config.h>
#include <ngx_core.h>
uint32_t
ngx_murmur_hash2(u_char *data, size_t len)
{
uint32_t h, k;
h = 0 ^ len;
while (len >= 4) {
k = data[0];
k |= data[1] << 8;
k |= data[2] << 16;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_murmurhash.c", "license": "bsd", "size": 763} |
### File: src/core/ngx_murmurhash.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_MURMURHASH_H_INCLUDED_
#define _NGX_MURMURHASH_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
uint32_t ngx_murmur_hash2(u_char *data, size_t len);
#endif /* _NGX_MURMURHASH_H_INCLUDED_ *... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_murmurhash.h", "license": "bsd", "size": 286} |
### File: src/core/ngx_open_file_cache.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
/*
* open file cache caches
* open file handles with stat() info;
* directories stat() info;
* files and directories errors: no... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_open_file_cache.c", "license": "bsd", "size": 31195} |
### File: src/core/ngx_open_file_cache.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#ifndef _NGX_OPEN_FILE_CACHE_H_INCLUDED_
#define _NGX_OPEN_FILE_CACHE_H_INCLUDED_
#define NGX_OPEN_FILE_DIRECTIO_OFF NGX_MAX_OFF_T_VALUE
typedef struct {
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_open_file_cache.h", "license": "bsd", "size": 3305} |
### File: src/core/ngx_output_chain.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
#if 0
#define NGX_SENDFILE_LIMIT 4096
#endif
/*
* When DIRECTIO is enabled FreeBSD, Solaris, and MacOSX read directly
* to an application m... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_output_chain.c", "license": "bsd", "size": 20151} |
### File: src/core/ngx_palloc.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
static ngx_inline void *ngx_palloc_small(ngx_pool_t *pool, size_t size,
ngx_uint_t align);
static void *ngx_palloc_block(ngx_pool_t *pool, size_t size);
static void *ng... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_palloc.c", "license": "bsd", "size": 8225} |
### File: src/core/ngx_palloc.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_PALLOC_H_INCLUDED_
#define _NGX_PALLOC_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
/*
* NGX_MAX_ALLOC_FROM_POOL should be (ngx_pagesize - 1), i.e. 4095 on x86.
* On Windows NT it decrease... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_palloc.h", "license": "bsd", "size": 2263} |
### File: src/core/ngx_parse.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
ssize_t
ngx_parse_size(ngx_str_t *line)
{
u_char unit;
size_t len;
ssize_t size, scale, max;
len = line->len;
if (len == 0) {
return NGX_E... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_parse.c", "license": "bsd", "size": 5578} |
### File: src/core/ngx_parse.h
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#ifndef _NGX_PARSE_H_INCLUDED_
#define _NGX_PARSE_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
ssize_t ngx_parse_size(ngx_str_t *line);
off_t ngx_parse_offset(ngx_str_t *line);
ngx_int_t ngx_parse_time(ng... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_parse.h", "license": "bsd", "size": 362} |
### File: src/core/ngx_parse_time.c
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
static ngx_uint_t mday[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
time_t
ngx_parse_http_time(u_char *value, size_t len)
{
u_char *p, *end;
n... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/nginx", "path": "src/core/ngx_parse_time.c", "license": "bsd", "size": 5500} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.