Skip to content

Instantly share code, notes, and snippets.

View gs-niteesh's full-sized avatar

Niteesh Babu G S gs-niteesh

  • India, Tamil Nadu
View GitHub Profile
@gs-niteesh
gs-niteesh / sum.c
Last active February 4, 2021 04:27
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void sumBaseB(char *a,
char *b, int base)
{
int len_a, len_b;
len_a = strlen(a);
#include <stdio.h>
int main() {
int N1, N2, ind, ind1;
scanf("%d", &N1);
int arr[N1];
for(ind = 0; ind < N1; scanf("%d", &arr[ind++]));
scanf("%d", &N2);
int arr1[N2];
#!/usr/bin/env python
import rospy
import cv2
import copy
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import numpy as np
#!/usr/bin/env python
import rospy
import cv2
import copy
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import numpy as np
def parse_atom_line(line):
line = line.split()
if (line[0] != 'ATOM'):
return (False, "")
return (True, line)
def extract_aminos(file_name):
amino_acids = []
with open(file_name, 'r') as f:
for line in f:
#!/usr/bin/env python
"""
Ros node to make to the turtle draw a circle
"""
import rospy
from turtlesim.msg import Pose
from geometry_msgs.msg import Twist
import math
def extract_acid(st):
# Split the line by comma
# eg: ['GLU', '993', '38.874', '20.973', '18.439'] will be split into
# individual tokens seperated by commas i.e GLU, 38.874, 993 and
# consider only the acid name which is stored in variable a
a, b, c, d, e = st.split(',')
return a[1:]
def main():
acids = {} # Dictionary to store number of acids
# Open the file
with open('acids.txt', 'r') as f:
# Read line by line
for line in f:
# Split the line by comma
# eg: ['GLU', '993', '38.874', '20.973', '18.439'] will be split into
# individual tokens seperated by commas i.e GLU, 38.874, 993 and
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>