Skip to content

Instantly share code, notes, and snippets.

View pareksha's full-sized avatar
:octocat:
Code && Coffee

Pareksha Manchanda pareksha

:octocat:
Code && Coffee
  • Chandigarh, India
View GitHub Profile
@pareksha
pareksha / 2d_array_pointer.c
Created November 28, 2017 03:11
c programs
#include<stdio.h>
#include<stdlib.h>
void main()
{
int a[2][3];
int (*p)[3];
p = a;
int i,j,k;
printf("Enter elements of '2 x 3' array:\n");
for(i=0;i<2;i++)
from tkinter import *
import random
import datetime
def question_window():
root = Toplevel(start_window)
root.geometry('2000x2000')
top_frame = Frame(root)
""" CSC108 Assignment 3: Friend Finder - Main Program code """
from typing import List
from network_functions import load_profiles, make_recommendations
def display_recommendations(potential_friends: List[str]) -> None:
"""Display the recommendations in potential_friends or a message
indicating that there are no recommendations.
"""
import random
import sys
import time
def initialiseBoard():
"""Set the grid dimensions according to the user.
Function returns grid_list containing the grid values.
Option to change the size of the board added.
[WARNING][12:50:43] Implicit 'Default' section inheritance is deprecated. It will be removed soon. To silence this warning remove settings in the 'Default' section from your coafile. You can use dots to specify inheritance: the section 'all.python' will inherit all settings from 'all'.
Executing section LineLength...
Executing section CheckQuotation...
Executing section UnusedCode...
Executing section pep8...
Executing section SpaceCheck...
Executing section cli...
from coalib.bearlib.languages.Language import Language
@Language
class Tcl:
aliases = 'Tcl/Tk',
versions = 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6
extensions = '.tcl',
comment_delimiter = '#'
string_delimiters = {'"': '"', '{': '}'}
from coalib.bearlib.languages.Language import Language
@Language
class m4:
versions = 1.4,
extensions = '.m4',
comment_delimiter = '#'
multiline_comment_delimiters = {'/*': '*/'}
string_delimiters = {'`': "'", '"': '"'}
from coalib.bearlib.languages.Language import Language
@Language
class VB:
aliases = 'vb',
versions = 14.0, 15.0
extensions = '.vb',
comment_delimiter = "'"
string_delimiters = {'"': '"'}
@pareksha
pareksha / djangoCreateDirectoryShortcut.py
Last active January 8, 2019 11:01
This python snippet creates the directory if it doesn't exist.
import os
directory = 'media/csvs/'
if not os.path.exists(directory):
os.makedirs(directory)
@pareksha
pareksha / djangoValidateEmail.py
Last active January 8, 2019 11:08
Easy email validation in django.
from django.core.validators import ValidationError
try:
validate_email(email)
except ValidationError:
return Response({"status": "error", "message": "Provided email id is invalid."})