repo stringlengths 1 152 ⌀ | file stringlengths 14 221 | code stringlengths 501 25k | file_length int64 501 25k | avg_line_length float64 20 99.5 | max_line_length int64 21 134 | extension_type stringclasses 2
values |
|---|---|---|---|---|---|---|
psutil | psutil-master/psutil/_psutil_bsd.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola', Landry Breuil
* (OpenBSD implementation), Ryo Onodera (NetBSD implementation).
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Platform-specific module methods for FreeBSD and O... | 7,772 | 35.492958 | 105 | c |
psutil | psutil-master/psutil/_psutil_common.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Routines common to all platforms.
*/
#include <Python.h>
#include "_psutil_common.h"
// =====================================================... | 12,644 | 27.608597 | 80 | c |
psutil | psutil-master/psutil/_psutil_common.h | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
// ====================================================================
// --- Global vars / constants
// ==================... | 6,118 | 33.570621 | 77 | h |
psutil | psutil-master/psutil/_psutil_linux.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Linux-specific functions.
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include <Python.h>
#include <errno.h>
#include <stdlib.h>
#... | 15,257 | 25.721541 | 80 | c |
psutil | psutil-master/psutil/_psutil_osx.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* macOS platform-specific module methods.
*/
#include <Python.h>
#include <sys/proc.h>
#include <netinet/tcp_fsm.h>
#include "_psuti... | 4,821 | 32.72028 | 80 | c |
psutil | psutil-master/psutil/_psutil_windows.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Windows platform-specific module methods for _psutil_windows.
*
* List of undocumented Windows NT APIs which are used in here and i... | 10,563 | 35.937063 | 85 | c |
psutil | psutil-master/psutil/arch/aix/common.c | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/core.h>
#include <stdlib.h>
#include "common.h"
/* psutil_kread() - read from kernel memory */
int
psutil_kread(
... | 2,285 | 27.575 | 78 | c |
psutil | psutil-master/psutil/arch/aix/common.h | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef __PSUTIL_AIX_COMMON_H__
#define __PSUTIL_AIX_COMMON_H__
#include <sys/core.h>
#define PROCINFO_INCR (256)
#define PROCSIZE (sizeof... | 894 | 26.96875 | 73 | h |
psutil | psutil-master/psutil/arch/aix/ifaddrs.c | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*! Based on code from
https://lists.samba.org/archive/samba-technical/2009-February/063079.html
!*/
#include <string.h>
#include <stdlib.h>
#in... | 3,840 | 24.606667 | 77 | c |
psutil | psutil-master/psutil/arch/aix/ifaddrs.h | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*! Based on code from
https://lists.samba.org/archive/samba-technical/2009-February/063079.html
!*/
#ifndef GENERIC_AIX_IFADDRS_H
#define GENE... | 767 | 20.942857 | 77 | h |
psutil | psutil-master/psutil/arch/aix/net_connections.c | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Baded on code from lsof:
* http://www.ibm.com/developerworks/aix/library/au-lsof.html
* - dialects/aix/dproc.c:gather_proc_info
* - lib/prfp.c:... | 8,134 | 27.246528 | 78 | c |
psutil | psutil-master/psutil/arch/aix/net_kernel_structs.h | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* The kernel is always 64 bit but Python is usually compiled as a 32 bit
* process. We're reading the kernel memory to get the network connections,... | 4,060 | 35.258929 | 77 | h |
psutil | psutil-master/psutil/arch/bsd/cpu.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/resource.h>
#include <sys/sched.h>
PyObject *
psutil_cpu_count_logical(PyO... | 1,552 | 26.732143 | 73 | c |
psutil | psutil-master/psutil/arch/bsd/disk.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/mount.h>
#if PSUTIL_NETBSD
// getvfsstat()
#include <sys/types.h>
#include <sys/statvfs.... | 5,271 | 27.652174 | 73 | c |
psutil | psutil-master/psutil/arch/bsd/net.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <string.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <net/route.h>
Py... | 3,121 | 28.45283 | 73 | c |
psutil | psutil-master/psutil/arch/bsd/proc.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <kvm.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/types.h>
#include <sys/file.h>
#inclu... | 15,817 | 30.955556 | 107 | c |
psutil | psutil-master/psutil/arch/bsd/proc.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_pids(PyObject *self, PyObject *args);
PyObject *psutil_proc_environ(PyObject *self, PyObject *ar... | 519 | 36.142857 | 73 | h |
psutil | psutil-master/psutil/arch/bsd/sys.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <stdio.h>
#include <sys/param.h> // OS version
#ifdef PSUTIL_FREEBSD
#if __F... | 4,387 | 26.08642 | 89 | c |
psutil | psutil-master/psutil/arch/freebsd/cpu.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
System-wide CPU related functions.
Original code was refactored and moved from psutil/arch/freebsd/specific.c
in 2020 (and was move... | 5,555 | 27.492308 | 79 | c |
psutil | psutil-master/psutil/arch/freebsd/disk.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <devstat.h>
#include "../../_psutil_common.h"
#include "../../_psutil_posix.h"
... | 2,599 | 28.885057 | 83 | c |
psutil | psutil-master/psutil/arch/freebsd/mem.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <vm/vm_param.h>
#include <devsta... | 4,652 | 32.47482 | 81 | c |
psutil | psutil-master/psutil/arch/freebsd/proc.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/ty... | 19,437 | 25.848066 | 79 | c |
psutil | psutil-master/psutil/arch/freebsd/proc.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
typedef struct kinfo_proc kinfo_proc;
int psutil_get_proc_list(struct kinfo_proc **procList, size_t *procCount);... | 1,102 | 43.12 | 74 | h |
psutil | psutil-master/psutil/arch/freebsd/proc_socks.c | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Retrieves per-process open socket connections.
*/
#include <Python.h>
#include <sys/param.h>
#include <sys/user.h>
#include <sys/socketvar.... | 11,001 | 28.495979 | 85 | c |
psutil | psutil-master/psutil/arch/freebsd/sensors.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
Original code was refactored and moved from psutil/arch/freebsd/specific.c
For reference, here's the git history with original(ish)... | 2,329 | 27.072289 | 77 | c |
psutil | psutil-master/psutil/arch/freebsd/sys_socks.c | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Retrieves system-wide open socket connections. This is based off of
* sockstat utility source code:
* https://github.com/freebsd/freebsd/bl... | 10,147 | 26.576087 | 78 | c |
psutil | psutil-master/psutil/arch/netbsd/cpu.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sched.h>
#include <sys/sysctl.h>
#include <uvm/uvm_extern.h>
/*
CPU related functions. Orig... | 2,775 | 25.692308 | 77 | c |
psutil | psutil-master/psutil/arch/netbsd/disk.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
Disk related functions. Original code was refactored and moved from
psutil/arch/netbsd/specific.c in 2023 (and was moved in ... | 1,939 | 24.526316 | 74 | c |
psutil | psutil-master/psutil/arch/netbsd/mem.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
Memory related functions. Original code was refactored and moved from
psutil/arch/netbsd/specific.c in 2023 (and was moved i... | 3,428 | 29.078947 | 93 | c |
psutil | psutil-master/psutil/arch/netbsd/proc.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Platform-specific module methods for NetBSD.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <kvm.h>
#include "../.... | 10,328 | 23.889157 | 79 | c |
psutil | psutil-master/psutil/arch/netbsd/proc.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
typedef struct kinfo_proc2 kinfo_proc;
int psutil_kinfo_proc(pid_t pid, kinfo_proc *proc);
struct kinfo_f... | 927 | 37.666667 | 73 | h |
psutil | psutil-master/psutil/arch/netbsd/socks.c | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* Copyright (c) 2015, Ryo ONODERA.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/sysctl.h>
#inc... | 12,007 | 26.478261 | 73 | c |
psutil | psutil-master/psutil/arch/openbsd/cpu.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/sched.h> // for CPUSTATES & CP_*
PyObject *
psutil_per_cpu_times(P... | 2,787 | 24.345455 | 77 | c |
psutil | psutil-master/psutil/arch/openbsd/disk.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/disk.h>
PyObject *
psutil_disk_io_counters(PyObject *self, PyObject... | 1,656 | 23.367647 | 77 | c |
psutil | psutil-master/psutil/arch/openbsd/mem.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <sys/mount.h>
#include <sys/swap.h>
#include <sys... | 3,312 | 26.840336 | 73 | c |
psutil | psutil-master/psutil/arch/openbsd/proc.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/proc... | 8,398 | 25.495268 | 81 | c |
psutil | psutil-master/psutil/arch/openbsd/proc.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
typedef struct kinfo_proc kinfo_proc;
int psutil_kinfo_proc(pid_t pid, struct kinfo_proc *proc);
struct k... | 728 | 33.714286 | 74 | h |
psutil | psutil-master/psutil/arch/openbsd/socks.c | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#include <kvm.h>
#define _KERNEL // silence compiler warning
#include <sy... | 4,993 | 26.59116 | 79 | c |
psutil | psutil-master/psutil/arch/osx/cpu.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
System-wide CPU related functions.
Original code was refactored and moved from psutil/_psutil_osx.c in 2020
right before a4c0a0eb0... | 6,233 | 29.558824 | 78 | c |
psutil | psutil-master/psutil/arch/osx/cpu.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_cpu_count_cores(PyObject *self, PyObject *args);
PyObject *psutil_cpu_count_logical(PyObject *se... | 584 | 38 | 73 | h |
psutil | psutil-master/psutil/arch/osx/disk.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Disk related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame before t... | 12,376 | 31.743386 | 106 | c |
psutil | psutil-master/psutil/arch/osx/mem.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// System memory related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame... | 3,221 | 27.263158 | 76 | c |
psutil | psutil-master/psutil/arch/osx/net.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Networks related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame befo... | 2,807 | 26.529412 | 76 | c |
psutil | psutil-master/psutil/arch/osx/proc.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_pids(PyObject *self, PyObject *args);
PyObject *psutil_proc_cmdline(PyObject *self, PyObject *ar... | 1,035 | 46.090909 | 74 | h |
psutil | psutil-master/psutil/arch/osx/sensors.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Sensors related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame befor... | 3,421 | 32.223301 | 77 | c |
psutil | psutil-master/psutil/arch/osx/sys.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// System related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame before... | 2,529 | 27.426966 | 76 | c |
psutil | psutil-master/psutil/arch/solaris/environ.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Oleksii Shevchuk.
* All rights reserved. Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*
* Functions specific for Process.environ().
*/
#define _STRUCTURED_PROC 1
#include <Python.h>
#if !defined(_LP64) && _FILE_O... | 10,181 | 24.140741 | 78 | c |
psutil | psutil-master/psutil/arch/solaris/environ.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Oleksii Shevchuk.
* All rights reserved. Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
#ifndef PROCESS_AS_UTILS_H
#define PROCESS_AS_UTILS_H
char **
psutil_read_raw_args(psinfo_t info, const char *procfs_path, siz... | 511 | 24.6 | 76 | h |
psutil | psutil-master/psutil/arch/solaris/v10/ifaddrs.c | /* References:
* https://lists.samba.org/archive/samba-technical/2009-February/063079.html
* http://stackoverflow.com/questions/4139405/#4139811
* https://github.com/steve-o/openpgm/blob/master/openpgm/pgm/getifaddrs.c
*/
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <net/if.h>
#include <net... | 3,254 | 24.833333 | 82 | c |
psutil | psutil-master/psutil/arch/solaris/v10/ifaddrs.h | /* Reference: https://lists.samba.org/archive/samba-technical/2009-February/063079.html */
#ifndef __IFADDRS_H__
#define __IFADDRS_H__
#include <sys/socket.h>
#include <net/if.h>
#undef ifa_dstaddr
#undef ifa_broadaddr
#define ifa_broadaddr ifa_dstaddr
struct ifaddrs {
struct ifaddrs *ifa_next;
char ... | 567 | 20.037037 | 90 | h |
psutil | psutil-master/psutil/arch/windows/cpu.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <windows.h>
#include <PowrProf.h>
#include "../../_psutil_common.h"
/*
* Return the number of logical, active CP... | 11,539 | 26.807229 | 79 | c |
psutil | psutil-master/psutil/arch/windows/cpu.h | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_cpu_count_logical(PyObject *self, PyObject *args);
PyObject *psutil_cpu_count_cores(PyObject *self, PyObjec... | 573 | 37.266667 | 73 | h |
psutil | psutil-master/psutil/arch/windows/disk.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <windows.h>
#include <tchar.h>
#include "../../_psutil_common.h"
#ifndef _ARRAYSIZE
#define _ARRAYSIZE(a) (sizeof... | 12,338 | 30.719794 | 77 | c |
psutil | psutil-master/psutil/arch/windows/mem.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <windows.h>
#include <Psapi.h>
#include <pdh.h>
#include "../../_psutil_common.h"
PyObject *
psutil_ge... | 2,808 | 28.568421 | 81 | c |
psutil | psutil-master/psutil/arch/windows/net.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Fixes clash between winsock2.h and windows.h
#define WIN32_LEAN_AND_MEAN
#include <Python.h>
#include <windows.h>
#include <wchar.h>
#include... | 13,404 | 29.605023 | 79 | c |
psutil | psutil-master/psutil/arch/windows/ntextapi.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Define Windows structs and constants which are considered private.
*/
#if !defined(__NTEXTAPI_H__)
#define __NTEXTAPI_H__
#include <wi... | 19,323 | 26.293785 | 120 | h |
psutil | psutil-master/psutil/arch/windows/proc.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *TimeoutExpired;
PyObject *TimeoutAbandoned;
PyObject *psutil_pid_exists(PyObject *self, PyObject *args... | 1,767 | 49.514286 | 73 | h |
psutil | psutil-master/psutil/arch/windows/proc_handles.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* This module retrieves handles opened by a process.
* We use NtQuerySystemInformation to enumerate them and NtQueryObject
* to obtain the ... | 8,177 | 26.911263 | 79 | c |
psutil | psutil-master/psutil/arch/windows/proc_info.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <windows.h>
#include "ntextapi.h"
#define PSUTIL_FIRST_PROCESS(Processes) ( \
(PSYSTEM_PROCESS_INFO... | 961 | 37.48 | 80 | h |
psutil | psutil-master/psutil/arch/windows/proc_utils.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Helper process functions.
*/
#include <Python.h>
#include <windows.h>
#include <Psapi.h> // EnumProcesses
#include "../../_psutil... | 5,530 | 28.110526 | 78 | c |
psutil | psutil-master/psutil/arch/windows/proc_utils.h | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
DWORD* psutil_get_pids(DWORD *numberOfReturnedPIDs);
HANDLE psutil_handle_from_pid(DWORD pid, DWORD dwDesiredAccess);
HANDLE psutil_check_phandle... | 517 | 38.846154 | 77 | h |
psutil | psutil-master/psutil/arch/windows/security.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Security related functions for Windows platform (Set privileges such as
* SE DEBUG).
*/
#include <windows.h>
#include <Python.h>
... | 3,656 | 25.309353 | 79 | c |
psutil | psutil-master/psutil/arch/windows/sensors.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <windows.h>
// Added in https://github.com/giampaolo/psutil/commit/109f873 in 2017.
// Moved in here in... | 895 | 26.151515 | 79 | c |
psutil | psutil-master/psutil/arch/windows/services.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <windows.h>
#include <Winsvc.h>
#include "../../_psutil_common.h"
#include "services.h"
// ======================... | 12,998 | 26.024948 | 78 | c |
psutil | psutil-master/psutil/arch/windows/services.h | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <Winsvc.h>
SC_HANDLE psutil_get_service_handle(
char service_name, DWORD scm_access, DWORD access);
PyObject *p... | 734 | 39.833333 | 73 | h |
psutil | psutil-master/psutil/arch/windows/socks.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Fixes clash between winsock2.h and windows.h
#define WIN32_LEAN_AND_MEAN
#include <Python.h>
#include <windows.h>
#include <ws2tcpip.h>
#inc... | 14,505 | 29.733051 | 79 | c |
psutil | psutil-master/psutil/arch/windows/wmi.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Functions related to the Windows Management Instrumentation API.
*/
#include <Python.h>
#include <windows.h>
#include <pdh.h>
#include "../..... | 3,695 | 29.545455 | 120 | c |
FIt-SNE | FIt-SNE-master/src/kissrandom.h | #ifndef KISSRANDOM_H
#define KISSRANDOM_H
#if defined(_MSC_VER) && _MSC_VER == 1500
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif
// KISS = "keep it simple, stupid", but high quality random number generator
// http://www0.cs.ucl.ac.uk/staff/d.jones/GoodPr... | 2,365 | 21.11215 | 109 | h |
FIt-SNE | FIt-SNE-master/src/nbodyfft.h | #ifndef NBODYFFT_H
#define NBODYFFT_H
#ifdef _WIN32
#include "winlibs/fftw3.h"
#else
#include <fftw3.h>
#endif
#include <complex>
using namespace std;
typedef double (*kernel_type)(double, double, double);
typedef double (*kernel_type_2d)(double, double, double, double, double);
void precompute_2d(double x_max, do... | 1,677 | 44.351351 | 125 | h |
FIt-SNE | FIt-SNE-master/src/parallel_for.h | #ifndef PARALLEL_FOR_H
#define PARALLEL_FOR_H
#include<algorithm>
#include <functional>
#include <thread>
#include <vector>
#if defined(_OPENMP)
#pragma message "Using OpenMP threading."
#define PARALLEL_FOR(nthreads,LOOP_END,O) { \
if (nthreads >1 ) { \
_Pragma("omp parallel num_threads(nthreads)")... | 1,222 | 26.177778 | 83 | h |
FIt-SNE | FIt-SNE-master/src/sptree.h | /*
*
* Copyright (c) 2014, Laurens van der Maaten (Delft University of Technology)
* 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 source code must retain the above ... | 4,413 | 30.304965 | 129 | h |
FIt-SNE | FIt-SNE-master/src/time_code.h | #ifndef TIME_CODE_H
#define TIME_CODE_H
#include <chrono>
#if defined(TIME_CODE)
#pragma message "Timing code"
#define INITIALIZE_TIME std::chrono::steady_clock::time_point STARTVAR;
#define START_TIME \
STARTVAR = std::chrono::stead... | 950 | 44.285714 | 133 | h |
FIt-SNE | FIt-SNE-master/src/vptree.h | /*
*
* Copyright (c) 2014, Laurens van der Maaten (Delft University of Technology)
* 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 source code must retain the above ... | 9,593 | 32.90106 | 132 | h |
FIt-SNE | FIt-SNE-master/src/winlibs/fftw3.h | /*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* The following statement of license applies *only* to this header file,
* and *not* to the other files distributed with FFTW or derived therefrom:
*
* Redistribution and use in source and binary ... | 18,102 | 42.516827 | 93 | h |
FIt-SNE | FIt-SNE-master/src/winlibs/mman.c |
#include <windows.h>
#include <errno.h>
#include <io.h>
#include "mman.h"
#ifndef FILE_MAP_EXECUTE
#define FILE_MAP_EXECUTE 0x0020
#endif /* FILE_MAP_EXECUTE */
static int __map_mman_error(const DWORD err, const int deferr)
{
if (err == 0)
return 0;
//TODO: implement
return err;
}
static DWO... | 4,644 | 21.658537 | 88 | c |
FIt-SNE | FIt-SNE-master/src/winlibs/mman.h | /*
* sys/mman.h
* mman-win32
*/
#ifndef _SYS_MMAN_H_
#define _SYS_MMAN_H_
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif
/* All the headers incl... | 2,083 | 24.108434 | 109 | h |
FIt-SNE | FIt-SNE-master/src/winlibs/fftw/fftw3.h | /*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* The following statement of license applies *only* to this header file,
* and *not* to the other files distributed with FFTW or derived therefrom:
*
* Redistribution and use in source and binary ... | 18,102 | 42.516827 | 93 | h |
octomap | octomap-master/dynamicEDT3D/include/dynamicEDT3D/bucketedqueue.h | /**
* dynamicEDT3D:
* A library for incrementally updatable Euclidean distance transforms in 3D.
* @author C. Sprunk, B. Lau, W. Burgard, University of Freiburg, Copyright (C) 2011.
* @see http://octomap.sourceforge.net/
* License: New BSD License
*/
/*
* Copyright (c) 2011-2012, C. Sprunk, B. Lau, W. Burgard, Univer... | 3,237 | 34.582418 | 94 | h |
octomap | octomap-master/dynamicEDT3D/include/dynamicEDT3D/dynamicEDT3D.h | /**
* dynamicEDT3D:
* A library for incrementally updatable Euclidean distance transforms in 3D.
* @author C. Sprunk, B. Lau, W. Burgard, University of Freiburg, Copyright (C) 2011.
* @see http://octomap.sourceforge.net/
* License: New BSD License
*/
/*
* Copyright (c) 2011-2012, C. Sprunk, B. Lau, W. Burgard, Univer... | 5,228 | 33.401316 | 99 | h |
octomap | octomap-master/dynamicEDT3D/include/dynamicEDT3D/point.h | /**
* dynamicEDT3D:
* A library for incrementally updatable Euclidean distance transforms in 3D.
* @author C. Sprunk, B. Lau, W. Burgard, University of Freiburg, Copyright (C) 2011.
* @see http://octomap.sourceforge.net/
* License: New BSD License
*/
/*
* Copyright (c) 2011-2012, C. Sprunk, B. Lau, W. Burgard, Univer... | 2,379 | 37.387097 | 84 | h |
octomap | octomap-master/octomap/include/octomap/AbstractOcTree.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 6,748 | 39.90303 | 128 | h |
octomap | octomap-master/octomap/include/octomap/AbstractOccupancyOcTree.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 10,721 | 43.305785 | 108 | h |
octomap | octomap-master/octomap/include/octomap/ColorOcTree.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 7,563 | 35.365385 | 90 | h |
octomap | octomap-master/octomap/include/octomap/CountingOcTree.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 4,512 | 35.395161 | 84 | h |
octomap | octomap-master/octomap/include/octomap/MCTables.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2013, F-M. De Rainville, P. Bourke
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provid... | 19,345 | 53.342697 | 78 | h |
octomap | octomap-master/octomap/include/octomap/MapCollection.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 3,897 | 36.480769 | 110 | h |
octomap | octomap-master/octomap/include/octomap/MapNode.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 2,880 | 33.710843 | 78 | h |
octomap | octomap-master/octomap/include/octomap/OcTree.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 3,597 | 34.27451 | 80 | h |
octomap | octomap-master/octomap/include/octomap/OcTreeBase.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 2,391 | 40.241379 | 86 | h |
octomap | octomap-master/octomap/include/octomap/OcTreeBaseImpl.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 23,307 | 39.465278 | 123 | h |
octomap | octomap-master/octomap/include/octomap/OcTreeDataNode.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 4,866 | 34.268116 | 84 | h |
octomap | octomap-master/octomap/include/octomap/OcTreeKey.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 7,910 | 31.422131 | 96 | h |
octomap | octomap-master/octomap/include/octomap/OcTreeNode.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 3,621 | 35.959184 | 83 | h |
octomap | octomap-master/octomap/include/octomap/OcTreeStamped.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 4,655 | 35.093023 | 98 | h |
octomap | octomap-master/octomap/include/octomap/Pointcloud.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 4,430 | 33.889764 | 83 | h |
octomap | octomap-master/octomap/include/octomap/ScanGraph.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 7,500 | 31.331897 | 100 | h |
octomap | octomap-master/octomap/include/octomap/octomap.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 1,875 | 47.102564 | 78 | h |
octomap | octomap-master/octomap/include/octomap/octomap_deprecated.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 2,258 | 44.18 | 90 | h |
octomap | octomap-master/octomap/include/octomap/octomap_timing.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 2,205 | 39.109091 | 78 | h |
octomap | octomap-master/octomap/include/octomap/octomap_types.h | /*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... | 3,315 | 39.439024 | 110 | h |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.