repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
CedarChennn/myC | 04ObjectScopeandConversions/03inline-variables/constants.h | <gh_stars>1-10
#ifndef CONSTANTS_H
#define CONSTANTS_H
// define your own namespace to hold constants
namespace constants
{
inline constexpr double pi { 3.14159 }; // note: now inline constexpr
inline constexpr double avogadro { 6.0221413e23 };
inline constexpr double my_gravity { 9.2 }; // m/s^2 -- gravi... |
CedarChennn/myC | 08Basic object-oriented programming/friend-functions-and-classe/quiz/Point3d.h | #ifndef POINT3D_H
#define POINT3D_H
class Vector3d; //headfile also need forward declaration
class Point3d
{
private:
double m_x{};
double m_y{};
double m_z{};
public:
Point3d(double x = 0.0, double y = 0.0, double z = 0.0)
: m_x{x}, m_y{y}, m_z{z}
{
}
void print() const;
void... |
CedarChennn/myC | 03Operators/05bitMasks.h | #ifndef BITMASKS_H
#define BITMASKS_H
#include <cstdint>
// C++14
namespace c14
{
constexpr std::uint_fast8_t mask0{ 0b0000'0001 }; // represents bit 0
constexpr std::uint_fast8_t mask1{ 0b0000'0010 }; // represents bit 1
constexpr std::uint_fast8_t mask2{ 0b0000'0100 }; // represents bit 2
constexpr s... |
CedarChennn/myC | 01C++ Basics/e6/add.h | <reponame>CedarChennn/myC
#ifndef ADD_H
#define ADD_H
int add(int x,int y);
#endif |
CedarChennn/myC | 01C++ Basics/e9/io.h | <filename>01C++ Basics/e9/io.h
#ifndef IO_H
#define IO_H
int readNumber();
void writeAnswer(int x);
#endif |
CedarChennn/myC | 02Fundamental Data Types/constants.h | <filename>02Fundamental Data Types/constants.h
#ifndef CONSTANTS_H
#define CONSTANTS_H
// define your own namespace to hold constants
namespace constants
{
inline constexpr double pi { 3.14159 }; // inline constexpr is C++17 or newer only
inline constexpr double avogadro { 6.0221413e23 };
inline constexpr... |
bpowers/verified-jit | jit_exec.c | <gh_stars>1-10
#include <stdio.h>
#include <stdint.h>
#include <sys/mman.h>
#define ERR_NO_CODE (-999)
#define ERR_BAD_CODE_LEN (-998)
#define ERR_NO_STACK (-997)
#define ERR_MMAP_FAILED (-996)
#define ERR_MPROTECT_FAILED (-995)
// implemented in assembly
int __exec_fn(const void *code, int *sta... |
hgeddon/MaxObjects | limisnap~/c74_lib_limiter.h | /// @file
/// @ingroup minlib
/// @copyright Copyright 2018 The Min-Lib Authors. All rights reserved.
/// @license Use of this source code is governed by the MIT License found in the License.md file.
#pragma once
#include "c74_min_api.h"
namespace c74 { namespace min { namespace lib {
/// Lookahead limiter for ... |
fuqibin/wacth_ios_sdk | Example/wacthSDk/BAOSViewController.h | //
// BAOSViewController.h
// wacthSDk
//
// Created by fuqibin on 03/24/2021.
// Copyright (c) 2021 fuqibin. All rights reserved.
//
@import UIKit;
@interface BAOSViewController : UIViewController
@end
|
fuqibin/wacth_ios_sdk | wacthSDk/Classes/BAOSTest.h | //
// BAOSTest.h
// wacthSDk_Example
//
// Created by UncleDrew on 2021/3/24.
// Copyright © 2021 fuqibin. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface BAOSTest : NSObject
- (void)test;
@end
NS_ASSUME_NONNULL_END
|
fuqibin/wacth_ios_sdk | Example/wacthSDk/BAOSAppDelegate.h | <gh_stars>0
//
// BAOSAppDelegate.h
// wacthSDk
//
// Created by fuqibin on 03/24/2021.
// Copyright (c) 2021 fuqibin. All rights reserved.
//
@import UIKit;
@interface BAOSAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
kartikpatel211/KTQuadTree | KTQuadTree/KTQuadTree/KTQuadTree.h | <gh_stars>0
//
// KTQuadTree.h
// KTQuadTree
//
// Created by <NAME> on 10/7/16.
// Copyright © 2016 KTPatel. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for KTQuadTree.
FOUNDATION_EXPORT double KTQuadTreeVersionNumber;
//! Project version string for KTQuadTree.
FOUNDATION_EXPORT c... |
linkuri267/mikaos | source/int.c | <filename>source/int.c
#include <stdint.h>
int32_t stringToInt(char* string)
{
int32_t count = 0;
int32_t pos;
char sign;
if (string [0]=='-')
{
pos = 1;
sign = 1;
}
else
{
pos = 0;
sign = 0;
}
while((string[pos])!='\0')
{
count = count * 10 + string[pos] - '0';
pos ++;
}
if (sign == ... |
linkuri267/mikaos | source/connectfour.h | <filename>source/connectfour.h
#include <stdint.h>
#define MAX_COLUMN 5
#define MAX_ROW 5
void clearBoardArea();
void drawBoard();
void drawM(uint32_t row,uint32_t column);
void drawT(uint32_t row,uint32_t column);
void drawMark(uint32_t row,uint32_t column, uint32_t player);
char checkVerticalWin(char board[MAX_ROW+... |
linkuri267/mikaos | source/connectfour.c | #include <stdint.h>
#include "connectfour.h"
//Calls setPixel on board area with black forecolor
void clearBoardArea()
{
setForeColor(0x0);
uint32_t x;
uint32_t y;
for (y = 34; y <= 730; y++)
{
for (x = 112; x<= 910; x++)
{
setPixel(x,y);
}
}
}
//Draws 6x6 grid
void drawBoard()
{
uint32_t x0 = 11... |
linkuri267/mikaos | source/mem.c | <filename>source/mem.c
#include<stdint.h>
#include<stddef.h>
void* memset(void* s, int c, size_t n){
unsigned char* destination = s;
uint32_t i;
for(i=0;i<n;i++){
destination[i] = (unsigned char)c;
}
return(s);
}
|
marler8997/cage | xwayland.c | /*
* Cage: A Wayland kiosk.
*
* Copyright (C) 2018-2020 <NAME>
*
* See the LICENSE file accompanying this file.
*/
#include <stdbool.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_box.h>
#include <wlr/xwayland.h>
#include <wlr/util/log.h>
#include "server.h"
#include "view.h"
#i... |
marler8997/cage | seat.c | <gh_stars>0
/*
* Cage: A Wayland kiosk.
*
* Copyright (C) 2018-2020 <NAME>
*
* See the LICENSE file accompanying this file.
*/
#include "config.h"
#include <stdlib.h>
#include <linux/input-event-codes.h>
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/ty... |
marler8997/cage | output.h | #ifndef CG_OUTPUT_H
#define CG_OUTPUT_H
#include <wayland-server-core.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_damage.h>
#include "seat.h"
#include "server.h"
#include "view.h"
struct cg_output {
struct cg_server *server;
struct wlr_output *wlr_output;
struct wlr_output_damage *damage;
... |
IngwiePhoenix/gravity | src/utils/gravity_utils.h | //
// gravity_utils.h
// gravity
//
// Created by <NAME> on 29/08/14.
// Copyright (c) 2014 CreoLabs. All rights reserved.
//
#ifndef __GRAVITY_UTILS__
#define __GRAVITY_UTILS__
#include <stdint.h>
#include <stdbool.h>
#if defined(_WIN32)
#include <windows.h>
typedef unsigned __int64 nanotime_t;
#define DIRRE... |
IngwiePhoenix/gravity | src/optionals/gravity_env.h | #ifndef GRAVITY_ENV_H
#define GRAVITY_ENV_H
#include "gravity_vm.h"
#include "gravity_value.h"
GRAVITY_API void gravity_env_register(gravity_vm *vm);
#endif |
IngwiePhoenix/gravity | src/optionals/gravity_env.c | <filename>src/optionals/gravity_env.c
/**
* @file
* This file provides the environment class (`ENV`).
* It utilizes a couple of custom overloads to enhance usage and mimic the
* usage within other scripting and programming languages.
*/
#include <stdlib.h>
#include <string.h>
#include "gravity_vm.h"
#include "g... |
IngwiePhoenix/gravity | src/compiler/gravity_ast.c | <filename>src/compiler/gravity_ast.c
//
// gravity_ast.c
// gravity
//
// Created by <NAME> on 02/09/14.
// Copyright (c) 2014 CreoLabs. All rights reserved.
//
#include <inttypes.h>
#include "gravity_ast.h"
#include "gravity_hash.h"
#include "gravity_utils.h"
#include "gravity_visitor.h"
#include "gravity_symbolt... |
souzavyvy/TrabProgI | retangulo2.c | #include<stdio.h>
/*
Faça um programa em C para desenhar um retângulo usando um código da tabela ASCII como pixel.
O programa deve pedir:
- Tamanho do lado: 6 (qualquer numero)
- Tamanho da altura: 3 (qualquer numero)
- Símbolo do pixel: * (qualquer símbolo)
*/
int main()
{
int i, j;
int x=0;
int y=0;
... |
souzavyvy/TrabProgI | imc.c | #include<stdio.h>
#include<stdlib.h>
/*
O índice de massa corporal (IMC) de uma pessoa é calculado dividindo-se o peso
pela sua altura ao quadrado. Quando este valor está abaixo de 19, diz-se
que a pessoa está magra. Se este valor estiver entre 20 e 25, diz-se
que a pessoa está com o peso ideal. Se o v... |
souzavyvy/TrabProgI | retangulo.c | <filename>retangulo.c
#include<stdio.h>
int main()
{
int i, j;
int x=0;
int y=0;
printf("Informe uma altura""\n");
scanf("%d", &x);
printf("Informe uma largura""\n");
scanf("%d", &y);
printf("Ola meu nome eh Viviane e o retangulo ficou assim:""\n");
for(j=0; j,x;... |
souzavyvy/TrabProgI | trab2.c |
#include <stdio.h>
/* Faça um programa em C para desenhar um retângulo usando um código da tabela ASCII como pixel.
O programa deve pedir:
- Tamanho do largura: 6 (qualquer numero)
- Tamanho da altura: 3 (qualquer numero)
- Símbolo do pixel: * (qualquer símbolo)
Após essa entrada o programa deve exibir a seguinte... |
souzavyvy/TrabProgI | batalha.c |
#include <stdio.h>
/*
Faça um programa em C para simular um jogo de batalha naval (https://pt.wikipedia.org/wiki/Batalha_naval_(jogo)):
- Comece perguntando o nome do jogador: Fulano
- Use matrizes de 5x5 para mapear o campo com 1-bomba e 0-agua.
- Após a leitura da matriz, o jogo começa:
Entre com as coordenad... |
afiskon/programming-language-for-cats | plfc.c | <reponame>afiskon/programming-language-for-cats
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <termios.h>
const char* commands[] = {
"Stroke me",
"Feed me",
"Clean my toilet",
"Play with me",
};
void turn_off_stdin_buffering() {
struct termios term, term_orig;
if(tcgetattr(0, &term_... |
hlinnaka/pg_auto_failover | src/bin/pg_autoctl/cli_common.c | /*
* src/bin/pg_autoctl/cli_common.c
* Implementation of a CLI which lets you run individual keeper routines
* directly
*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the PostgreSQL License.
*
*/
#include <errno.h>
#include <inttypes.h>
#include <getopt.h>
#include <signa... |
jiayisuse/tensorpipe-1 | tensorpipe/core/pipe.h | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <deque>
#include <mutex>
#include <tensorpipe/common/callback.h>
#include <te... |
DiodeBrando/timp-746_idi | 746_idi-2.c | #include "stdafx.h"
#include <iostream>
#include <fstream>
#include <conio.h>
using namespace std;
int* dijkstra(int arr[5][5], int arr_size, int node) {
int *dist = new int[arr_size];
for (int i = 0; i < arr_size; i++) {
if (i == node) dist[i] = 0;
else dist[i] = 100000;
}
int min, min_id, temp, p... |
DiodeBrando/timp-746_idi | 746_idi-1-1.c | <reponame>DiodeBrando/timp-746_idi
#include "stdafx.h"
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
void comb_sort(int a[], int asize, double *aos, double *aoc)
{
int tmp, i;
int gap = asize;
double x = 0;
while (gap>1) {
gap /= 1.2473309;
if (gap<1) gap = 1;
... |
DiodeBrando/timp-746_idi | 746_idi-1-2.c | <filename>746_idi-1-2.c
#include "stdafx.h"
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
void shell_sort(int a[], int num, double *aos, double *aoc)
{
int tmp, i, j;
int s = num;
double x=0;
while (s>0) {
s /= 2;
for (i = 0; i<num - s; ++i) {
j = i;
... |
quinnjr/getopt-plus | src/getopt-plus.h | #ifndef _GETOPT_PLUS_H
#define _GETOPT_PLUS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
typedef enum option_argument_t {
NO_ARGUMENT,
OPTIONAL_ARGUMENT,
REQUIRED_ARGUMENT
} option_argument_t;
typedef struct option_t {
char* long_op... |
mitar/ecc | src/eckey.h | <filename>src/eckey.h
#ifndef ECC_ECKEY_H
#define ECC_ECKEY_H
#include <node.h>
#include <openssl/ec.h>
using namespace v8;
using namespace node;
class ECKey : public ObjectWrap {
public:
static void Init(Handle<Object> exports);
private:
ECKey(int curve);
~ECKey();
int mCurve;
EC_KEY *... |
ResultsDirect/RDProgressHUD | Demo/Classes/DemoAppDelegate.h | <filename>Demo/Classes/DemoAppDelegate.h
//
// DemoAppDelegate.h
// Demo
//
// Created by <NAME> on 10/22/10.
// Copyright 2010 Results Direct. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
//... |
ResultsDirect/RDProgressHUD | RDProgressHUD.h | <reponame>ResultsDirect/RDProgressHUD<gh_stars>0
//
// RDProgressHUD.h
// RDProgressHUD
//
// Created by <NAME> on 10/22/10.
// Copyright 2010 Results Direct. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following co... |
SpenderJ/snowcrash | level09/Ressources/main.c | <reponame>SpenderJ/snowcrash
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int i = -1;
while (argv[1][++i])
argv[1][i] -= i;
printf("%s\n", argv[1]);
return (0);
}
|
reactjs-alex-alex2006hw/react-native-worker-040 | ios/Workers/WorkerManager.h |
#ifndef WorkerManager_h
#define WorkerManager_h
#import "RCTBridgeModule.h"
@interface WorkerManager : NSObject <RCTBridgeModule>
@end
#endif /* WorkerManager_h */
|
reactjs-alex-alex2006hw/react-native-worker-040 | ios/Workers/WorkerSelfManager.h |
#ifndef WorkerSelfManager_h
#define WorkerSelfManager_h
#import "RCTBridgeModule.h"
@interface WorkerSelfManager : NSObject <RCTBridgeModule>
@property int workerId;
@property RCTBridge *parentBridge;
@end
#endif /* WorkerSelfManager_h */
|
jackprogramsjp/C-Math-Interpreter | nodes.h | #ifndef NODES_H
#define NODES_H
typedef enum {
PlusNode,
MinusNode,
EmptyNode,
NumberNode,
AddNode,
SubtractNode,
MultiplyNode,
DivideNode,
PowerNode
} NodeType;
typedef struct Node {
NodeType node_type;
double value;
struct Node *node_a;
struct Node *node_b;
} Node... |
jackprogramsjp/C-Math-Interpreter | lexer.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tokens.h"
#include "lexer.h"
Tokens *lexer_get_tokens(Lexer *lexer, const char *text, int text_size) {
lexer->text = text; // If fgets, newline could be added to the end, but we are able to advance and ignore that
lexer->text_size = text_siz... |
jackprogramsjp/C-Math-Interpreter | tokens.c | <reponame>jackprogramsjp/C-Math-Interpreter<filename>tokens.c
#include <stdio.h>
#include <stdlib.h>
#include "tokens.h"
const char *format_token_type(TokenType type) {
switch (type) {
case NUMBER: return "NUMBER";
case PLUS: return "PLUS";
case MINUS: return "MINUS";
case MULTIPLY... |
jackprogramsjp/C-Math-Interpreter | nodes.c | <gh_stars>1-10
#include <stdio.h>
#include <stdlib.h>
#include "tokens.h"
#include "lexer.h"
#include "nodes.h"
void print_node(Node *node) {
switch (node->node_type) {
case NumberNode:
printf("%lf", node->value);
break;
case PlusNode:
if (node->node_a != NULL) ... |
jackprogramsjp/C-Math-Interpreter | lexer.h | #ifndef LEXER_H
#define LEXER_H
#include "tokens.h"
#define WHITESPACE " \n\t"
#define DIGITS "0123456789"
typedef struct Lexer {
const char *text;
char error[50];
char current;
int text_size;
int index;
} Lexer;
Tokens *lexer_get_tokens(Lexer *, const char *, int);
Token *lexer_get_number(Lexer... |
jackprogramsjp/C-Math-Interpreter | interpreter.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "interpreter.h"
#include "nodes.h"
#include "values.h"
Number interpreter_visit(Interpreter *interpreter, Node *node) {
interpreter->error = NULL;
switch (node->node_type) {
case NumberNode:
return (Number) { node->value };... |
jackprogramsjp/C-Math-Interpreter | interpreter.h | <gh_stars>1-10
#ifndef INTERPRETER_H
#define INTERPRETER_H
#include "nodes.h"
#include "values.h"
typedef struct Interpreter {
const char *error;
} Interpreter;
Number interpreter_visit(Interpreter *, Node *);
Number interpreter_visit_add_node(Interpreter *, Node *);
Number interpreter_visit_subtract_node(Interp... |
jackprogramsjp/C-Math-Interpreter | parser.h | #ifndef PARSER_H
#define PARSER_H
#include "tokens.h"
#include "nodes.h"
typedef struct Parser {
Tokens *tokens;
Token *current;
char error[50];
int index;
} Parser;
Node *parser_parse(Parser *parser, Tokens **tokens);
void parser_advance(Parser *parser);
Node *parser_expr(Parser *parser);
Node *pars... |
jackprogramsjp/C-Math-Interpreter | main.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tokens.h"
#include "lexer.h"
#include "nodes.h"
#include "parser.h"
#include "interpreter.h"
#include "values.h"
int main(void) {
char buff[256];
printf("calc > ");
while (fgets(buff, sizeof(buff), stdin) != NULL) {
buff[strcsp... |
jackprogramsjp/C-Math-Interpreter | parser.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "parser.h"
#include "tokens.h"
#include "nodes.h"
Node *parser_parse(Parser *parser, Tokens **tokens) {
parser->tokens = *tokens;
append_tokens(&parser->tokens, (Token) { EOF_, 0 } );
parser->index = 0;
parser_advance(parser);
me... |
jackprogramsjp/C-Math-Interpreter | values.c | <reponame>jackprogramsjp/C-Math-Interpreter<gh_stars>1-10
#include <stdio.h>
#include "values.h"
void print_number(Number *number) {
printf("%lf\n", number->value);
}
|
jackprogramsjp/C-Math-Interpreter | tokens.h | <gh_stars>1-10
#ifndef TOKENS_H
#define TOKENS_H
typedef enum {
NUMBER,
PLUS,
MINUS,
MULTIPLY,
DIVIDE,
LPAREN,
RPAREN,
POWER,
EOF_
} TokenType;
typedef struct Token {
TokenType type;
double value;
} Token;
typedef struct Tokens {
Token token;
struct Tokens *next;
}... |
jackprogramsjp/C-Math-Interpreter | values.h | #ifndef VALUES_H
#define VALUES_H
typedef struct Number {
double value;
} Number;
void print_number(Number *);
#endif // VALUES_H
|
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_input_parser.h | <reponame>MarcosFernandez/gemtols-cnv
/*
* PROJECT: GEM-Tools library
* FILE: gt_input_parser.h
* DATE: 01/06/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#ifndef GT_INPUT_PARSER_H_
#define GT_INPUT_PARSER_H_
#include "gt_essentials.h"
#include "gt_attributes.h"
/... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/gcnorm.c | #include "gcnorm.h"
int norm_until_converges (enum WINDOWTYPE wt, float *gclookup, float *gclookup_x){
float max;
float max_x;
float min;
float min_x;
float p_max;
float p_max_x;
float p_min;
float p_min_x;
int i, j;
float mean = 0.0;
float mean_x = 0.0;
float stdev = 0.0;
float stdev... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_template.h | /*
* PROJECT: GEM-Tools library
* FILE: gt_template.h
* DATE: 01/06/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: Data structure modeling sequences' templates.
* That is, set of alignments and relationships between their maps.
*/
#ifndef GT_TEMPLATE_H_
#define GT_TEMPLATE_H_
#include "gt_essentials.h"
#i... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/bam2fastq/samtools/bam_maqcns.c | #include <math.h>
#include <assert.h>
#include "bam.h"
#include "bam_maqcns.h"
#include "ksort.h"
#include "kaln.h"
KSORT_INIT_GENERIC(uint32_t)
#define INDEL_WINDOW_SIZE 50
#define INDEL_EXT_DEP 0.9
typedef struct __bmc_aux_t {
int max;
uint32_t *info;
} bmc_aux_t;
typedef struct {
float esum[4], fsum[4];
uint3... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/utils.h | #ifndef __UTILS
#define __UTILS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zlib.h>
#include <ctype.h>
#include "globals.h"
#include "prep.h"
void print_error(char *);
void set_runmode(enum MODETYPE);
void set_gender(enum GENDERTYPE SET);
void set_str(char **, char *);
void init_global... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_pipe_io.h | //
// gt_pipe_io.h
// gemtools
//
// Created by <NAME> on 25/10/2013.
// Copyright (c) 2013 Bioinformatics Development Group. All rights reserved.
//
#ifndef GT_PIPE_IO_H
#define GT_PIPE_IO_H
#define GT_PIPE_IO_READ 0
#define GT_PIPE_IO_WRITE 1
#define GT_PIPE_IO_SHELL "/bin/sh"
int gt_pipe_io_check_command(cons... |
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_sam_attributes.c | /*
* PROJECT: GEM-Tools library
* FILE: gt_sam_data_attributes.c
* DATE: 15/01/2013
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: Provides support to SAM format data structures
*/
#include "gt_sam_attributes.h"
#include "gt_output_sam.h"
/*
* SAM File specifics Attribute (SAM Headers)
*/
#define GT_ATTR_SAM_I... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/bam2fastq/samtools/bam_pileup.c | #include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
#include "sam.h"
typedef struct __linkbuf_t {
bam1_t b;
uint32_t beg, end;
struct __linkbuf_t *next;
} lbnode_t;
/* --- BEGIN: Memory pool */
typedef struct {
int cnt, n, max;
lbnode_t **buf;
} mempool_t;
static mempool_t *mp_init()
... |
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_shash.c | /*
* PROJECT: GEM-Tools library
* FILE: gt_shash.c
* DATE: 10/07/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#include "gt_hash.h"
#include "gt_commons.h"
#include "gt_error.h"
#include "gt_mm.h"
#include "gt_string.h"
/*
* Setup
*/
GT_INLINE void gt_shash_free_element(gt_shash_element* const ... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/gcnorm.h | #ifndef __GCNORM
#define __GCNORM
#include <stdio.h>
#include <string.h>
#include "globals.h"
#include "sam.h"
#include <math.h>
#include <float.h>
#define MAXCOPY 2.5
#define MAXCOPY_X 1.5
#define MINCOPY 1.5
#define MINCOPY_X 0.5
int norm_until_converges(enum WINDOWTYPE, float *, float *);
void normalize(enum WI... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/prep.h | #ifndef __PREP
#define __PREP
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zlib.h>
#include "globals.h"
#include "utils.h"
typedef struct gapcell{
char *chrom;
int start;
int end;
}_gapcell;
struct gapcell *gaptable;
struct gapcell *pseudotable;
void prep_genome(void);
int count_chro... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gem_tools.h | /*
* PROJECT: GEM-Tools library
* FILE: gem_tools.h
* DATE: 01/06/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#ifndef GEM_TOOLS_H_
#define GEM_TOOLS_H_
// Essentials
#include "gt_essentials.h"
#include "gt_dna_string.h"
// Input handlers
#include "gt_input_file.h"
#include "gt_buffered_input_f... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_shash.h | <reponame>MarcosFernandez/gemtols-cnv
/*
* PROJECT: GEM-Tools library
* FILE: gt_shash.h
* DATE: 10/07/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#ifndef GT_SHASH_H_
#define GT_SHASH_H_
#include "gt_hash.h"
#include "uthash.h"
/*
* String Key Hash
*/
typedef struct {
char* key;
void* el... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_template_utils.h | /*
* PROJECT: GEM-Tools library
* FILE: gt_template_utils.h
* DATE: 19/07/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#ifndef GT_TEMPLATE_UTILS_H_
#define GT_TEMPLATE_UTILS_H_
#include "gt_essentials.h"
#include "gt_alignment_utils.h"
#include "gt_template.h"
#include "gt_map_score.h"
/*
* Te... |
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_template.c | <gh_stars>1-10
/*
* PROJECT: GEM-Tools library
* FILE: gt_template.c
* DATE: 01/06/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: Data structure modeling sequences' templates.
* That is, set of alignments and relationships between their maps.
*/
#include "gt_template.h"
#include "gt_sam_attributes.h"
#def... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/tools/kmermaker.h | #define MAXKMER 100
#define MAXLEN 10000
void breakthis(char *name, char *seq, char *, int klen, int start);
int slide=1;
int first=1;
char seq[MAXLEN];
char qual[MAXLEN];
char nmer[MAXKMER];
int pass_first = 0;
|
MarcosFernandez/gemtols-cnv | GEMTools/tools/align_stats.c | <reponame>MarcosFernandez/gemtols-cnv<filename>GEMTools/tools/align_stats.c
#include <getopt.h>
#ifdef HAVE_OPENMP
#include <omp.h>
#endif
#include <pthread.h>
#include "gem_tools.h"
#include "align_stats.h"
// Every entry will be set to zero be default
static const char base_tab[256]= {
['A']=2, ['C']=3, ['G']=4, [... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/prep.c | #include "prep.h"
void prep_genome(void){
FILE *fasta;
FILE *gaps;
FILE *pseudo;
int num_gaps;
char chrom[MAX_STR];
int start, end;
int max_len;
int i;
if (GENOME_FASTA == NULL)
print_error("Select genome fasta file (input) through -fasta parameter.\n");
if (GENOME_GAPS == NULL)
print_e... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_gtf.h | <reponame>MarcosFernandez/gemtols-cnv<filename>GEMTools/include/gt_gtf.h<gh_stars>1-10
/*
* Module to load and manage GTF annotation
*/
#ifndef GT_GTF_H_
#define GT_GTF_H_
#include "gt_commons.h"
#include "gt_string.h"
#include "gt_vector.h"
#include "gt_shash.h"
#include "gt_template.h"
#include "gt_output_map.h"
... |
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_map.c | <filename>GEMTools/src/gt_map.c
/*
* PROJECT: GEM-Tools library
* FILE: gt_map.c
* DATE: 01/06/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#include "gt_map.h"
#define GT_MAP_NUM_INITIAL_MISMS 4
#define GT_MAP_INITIAL_SEQ_NAME_SIZE 10
/*
* Setup
*/
GT_INLINE gt_map* gt_map_new() {
gt_map* ... |
MarcosFernandez/gemtols-cnv | GEMTools/tools/align_stats.h | #include "uthash.h"
#define MAX_READ_LENGTH 16384 // For sanity checking
#define QUAL_FASTQ 33
#define QUAL_SOLEXA 64
#define DEFAULT_QUAL_OFFSET 33 // FASTQ quality convention
#define MAX_QUAL 64
#define DEFAULT_MAX_INSERT 1000
#define MAX_INDEL_SIZE 1024
#define DUP_LIMIT 255
#define MISSING_QUAL 30
#define PAIR_TY... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/mrcanavar.c | #include "mrcanavar.h"
int main(int argc, char **argv){
int i;
int ctr;
int fileCount;
int fileEnd;
int fileStart;
char gzSAM;
char *indirSAM;
char *depthFile;
char *out_prefix;
char **c_depths;
init_globals();
gzSAM = 0;
indirSAM = NULL;
depthFile = NULL;
out_prefix = NULL... |
MarcosFernandez/gemtols-cnv | GEMTools/tools/gt.coverage.c | /*
* PROJECT: GEM-Tools library
* FILE: gt.coverage.c
* DATE: 10/03/2014
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: Calculate coverage from unsorted BAMs of GEM map files
*/
#include <getopt.h>
#ifdef HAVE_OPENMP
#include <omp.h>
#endif
#include "gem_tools.h"
typedef enum {GT_UNIQUE_FIRST, GT_UNIQUE_GEM, GT_... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/callcnv.h | <filename>GEMTools-cnv/mrcanavar/callcnv.h
#ifndef __CALLCNV
#define __CALLCNV
#include <stdio.h>
#include "globals.h"
#include "utils.h"
#include "gcnorm.h"
void call_cnv(char *, char *);
void readDepth(char *);
void print_copy_numbers(char *);
void dump_text_windows(char *, enum WINDOWTYPE);
void conc_depth(char *... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_attributes.h | /*
* PROJECT: GEM-Tools library
* FILE: gt_data_attributes.h
* DATE: 15/01/2013
* AUTHOR(S): <NAME> <<EMAIL>>
*/
#ifndef GT_ATTRIBUTES_H_
#define GT_ATTRIBUTES_H_
#include "gt_essentials.h"
/*
* Attributes IDs
*/
#define GT_ATTR_ID_MAX_COMPLETE_STRATA "MCS"
#define GT_ATTR_ID_NOT_UNIQUE "NOT-UNIQUE"
#define ... |
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_input_parser.c | <filename>GEMTools/src/gt_input_parser.c
/*
* PROJECT: GEM-Tools library
* FILE: gt_input_tag_parser.c
* DATE: 01/06/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#include "gt_input_parser.h"
#include "gt_input_fasta_parser.h"
/*
* Basic Parsing Functions
*/
GT_IN... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/utils.c | #include "utils.h"
void print_error(char *msg){
fprintf(stderr, "\nmrCaNaVaR version %s.\nLast update: %s.\n", VERSION, LAST_UPDATE);
fprintf(stderr, "\n%s\n", msg);
if (!strstr(msg, "No run mode"))
fprintf(stderr, "Kahrolsun bağzı şeyler.\n");
fprintf(stderr, "Invoke parameter -h for help.\n");
exit (0... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_output_sam.h | <reponame>MarcosFernandez/gemtols-cnv
/*
* PROJECT: GEM-Tools library
* FILE: gt_output_sam.h
* DATE: 01/08/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#ifndef GT_OUTPUT_SAM_H_
#define GT_OUTPUT_SAM_H_
#include "gt_essentials.h"
#include "gt_dna_string.h"
#include "gt_dna_read.h"
#include "gt_a... |
MarcosFernandez/gemtols-cnv | GEMTools/tools/gt.map2sam.c | /*
* PROJECT: GEM-Tools library
* FILE: gt.map2sam.c
* DATE: 02/02/2013
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: Converter from MAP to SAM
*/
#define GT_MAP2SAM "gt.map2sam"
#define GT_MAP2SAM_VERSION "1.1"
#include <getopt.h>
#ifdef HAVE_OPENMP
#include <omp.h>
#endif
#include "gem_tools.h"
typedef struc... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/gcnorm-longer.c | <filename>GEMTools-cnv/mrcanavar/gcnorm-longer.c
#include "gcnorm.h"
int norm_until_converges (enum WINDOWTYPE wt, float *gclookup, float *gclookup_x){
float max;
float max_x;
float min;
float min_x;
float p_max;
float p_max_x;
float p_min;
float p_min_x;
int i, j;
float mean = 0.0;
float me... |
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_input_map_utils.c | /*
* PROJECT: GEM-Tools library
* FILE: gt_input_map_utils.c
* DATE: 01/03/2013
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#include "gt_input_map_utils.h"
#include "gt_input_file.h"
#include "gt_buffered_input_file.h"
#include "gt_input_parser.h"
#include "gt_input_map_parser.h"
#include "gt_outpu... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_input_sam_parser.h | <reponame>MarcosFernandez/gemtols-cnv<gh_stars>1-10
/*
* PROJECT: GEM-Tools library
* FILE: gt_input_sam_parser.h
* DATE: 17/07/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#ifndef GT_INPUT_SAM_PARSER_H_
#define GT_INPUT_SAM_PARSER_H_
#include "gt_commons.h"
#include "gt_dna_string.h"
#include ... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_ihash.h | /*
* PROJECT: GEM-Tools library
* FILE: gt_ihash.h
* DATE: 2/09/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#ifndef GT_IHASH_H_
#define GT_IHASH_H_
#include "gt_commons.h"
#include "uthash.h"
/*
* Integer Key Hash
*/
typedef struct {
int64_t key;
void* element;
gt_hash_element_type ele... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_segmented_sequence.h | /*
* PROJECT: GEM-Tools library
* FILE: gt_segmented_sequence.h
* DATE: 3/09/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION:
* // TODO
*/
#ifndef GT_SEGMENTED_SEQUENCE_H_
#define GT_SEGMENTED_SEQUENCE_H_
#include "gt_essentials.h"
#include "gt_dna_string.h"
#include "gt_compact_dna_string.h"
/*
* Codes ... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_input_file.h | /*
* PROJECT: GEM-Tools library
* FILE: gt_input_file.h
* DATE: 01/06/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#ifndef GT_INPUT_FILE_H_
#define GT_INPUT_FILE_H_
#include "gt_essentials.h"
#include "gt_attributes.h"
#include "gt_sam_attributes.h"
#ifdef HAVE_ZLIB
#include <zlib.h>
#endif
#if... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/tools/kmermaker.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "kmermaker.h"
/* This program splits the reads into a given length*/
int main(int argc, char **argv){
FILE *fasta;
int klen=0;
int i = 0;
char name[MAXKMER];
char fname[100];
char line[100];
fname[0]=0;
/*Checking arguments*/
i... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_sequence_archive.h | <reponame>MarcosFernandez/gemtols-cnv<gh_stars>1-10
/*
* PROJECT: GEM-Tools library
* FILE: gt_sequence_archive.h
* DATE: 3/09/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION:
* Data structures needed to store a dictionary of DNA-sequences(chromosomes,contigs,etc) indexed by tag
*/
#ifndef GT_SEQUENCE_ARCHIV... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_map_score.h | <gh_stars>1-10
/*
* PROJECT: GEM-Tools library
* FILE: gt_map_score.h
* DATE: 03/09/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#ifndef GT_MAP_SCORE_H_
#define GT_MAP_SCORE_H_
#include "gt_essentials.h"
typedef enum { GT_XT_UNKNOWN, GT_XT_UNIQUE, GT_XT_REPEAT, GT_XT_UNMAPPED, GT_XT_MATE_SW } g... |
MarcosFernandez/gemtols-cnv | GEMTools/include/gt_sam_attributes.h | /*
* PROJECT: GEM-Tools library
* FILE: gt_sam_data_attributes.h
* DATE: 15/01/2013
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: Provides support to SAM format data structures
*/
#ifndef GT_SAM_DATA_ATTRIBUTES_H_
#define GT_SAM_DATA_ATTRIBUTES_H_
#include "gt_essentials.h"
#include "gt_generic_printer.h"
#incl... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/mrcanavar.h | #ifndef __MRCANAVAR
#define __MRCANAVAR
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <zlib.h>
#include "callcnv.h"
#include "globals.h"
#include "utils.h"
#include "prep.h"
#include "sam.h"
void printHelp(char *);
#endif
|
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_buffered_input_file.c | <reponame>MarcosFernandez/gemtols-cnv
/*
* PROJECT: GEM-Tools library
* FILE: gt_buffered_input_file.c
* DATE: 01/06/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#include "gt_buffered_input_file.h"
#define GT_BMI_BUFFER_SIZE GT_BUFFER_SIZE_4M
#define GT_BMI_NUM_LINES GT_NUM_LINES_10K
/*
* Buff... |
MarcosFernandez/gemtols-cnv | GEMTools/tools/gt.filter.c | <filename>GEMTools/tools/gt.filter.c<gh_stars>1-10
/*
* PROJECT: GEM-Tools library
* FILE: gt.filter.c
* DATE: 02/08/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: Application to filter {MAP,SAM,FASTQ} files and output the filtered result
*/
#ifdef HAVE_OPENMP
#include <omp.h>
#endif
#include "gem_tools.h"
#... |
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_gtf.c | #include "gt_gtf.h"
GT_INLINE gt_gtf_entry* gt_gtf_entry_new(const uint64_t start, const uint64_t end, const gt_strand strand, gt_string* const type){
gt_gtf_entry* entry = malloc(sizeof(gt_gtf_entry));
entry->uid = 0;
entry->start = start;
entry->end = end;
entry->num_children = 0;
entry->type = type;
e... |
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_alignment_utils.c | /*
* PROJECT: GEM-Tools library
* FILE: gt_alignment_utils.c
* DATE: 19/07/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#include "gt_alignment_utils.h"
/*
* Alignment basic tools
*/
GT_INLINE uint64_t gt_alignment_get_read_proportion(gt_alignment* const alignment,const float proportion) {
GT... |
MarcosFernandez/gemtols-cnv | GEMTools-cnv/mrcanavar/callcnv.c | #include "callcnv.h"
void call_cnv(char *depthFile, char *out_prefix){
int i, j;
float *gclookup;
float *gclookup_x;
char *fname;
char logname[2 * MAX_STR];
FILE *log;
if (GENOME_CONF == NULL)
print_error("Select genome configuration file (input) through the -conf parameter.\n");
if (depthFile ... |
MarcosFernandez/gemtols-cnv | GEMTools/src/gt_map_score.c | <filename>GEMTools/src/gt_map_score.c
/*
* PROJECT: GEM-Tools library
* FILE: gt_map_score.c
* DATE: 03/09/2012
* AUTHOR(S): <NAME> <<EMAIL>>
* DESCRIPTION: // TODO
*/
#include "gt_map_score.h"
#include "gt_sam_attributes.h"
/*
* Map Score Accessors
*/
GT_INLINE uint64_t gt_map_get_score(gt_map* const map) {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.