Skip to content

Instantly share code, notes, and snippets.

View vestigegroup's full-sized avatar
🏠
Working from home

Harish Vagjiyani vestigegroup

🏠
Working from home
View GitHub Profile
@mogproject
mogproject / PythonUnitTestCheatSheet.md
Created July 24, 2015 11:17
Python unittest Cheat Sheet

Python unittest Cheat Sheet

Skeleton

@heavywatal
heavywatal / thread_pool.py
Last active December 21, 2022 08:36
Example of thread pool in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Example of thread pool
https://docs.python.org/3/library/concurrent.futures.html
https://docs.python.org/3/library/multiprocessing.html
"""
import concurrent.futures as confu
import multiprocessing.pool as mpp
import time
/// <reference path="Emp.js" />
var App = angular.module('MyApp', ['ngRoute']);//already disscused about ngRoute and angular.module
App.controller('EmpController', function ($scope, EmployeeService) {// controller with two parameters $scope and serive Which i have little bit discused about it in ever first angualrjs tutorial
$scope.isFormValid = false;
$scope.message = null;
$scope.employee = null;
EmployeeService.GetEmployeeList().then(function (d) { //Call the GetEmployeeList() function in service for getting all Employee Record
$scope.employee = d.data;
},
function () {
@plasx
plasx / AzureCheatSheet.md
Last active May 24, 2022 05:47
Azure Cheat Sheet

Listing Images via Azure CLI

az vm image list --output table

Deleting certain resoruces in a resource group

List resource groups in a subscription

az resource list
@esecamalich
esecamalich / Baseball.py
Created March 23, 2018 16:54
Python: Baseball Game
# Baseball Game
# By: Sergio Camalich
# Website: www.camali.ch
# Import modules
import sys
import random
import time
# Playing?
@mpepping
mpepping / aws-cli.md
Last active August 13, 2022 04:59
aws-cli
@jinhoyoo
jinhoyoo / solved_code.py
Created March 20, 2019 16:14
Given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.
import unittest
'''Write a function:
def solution(A)
that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.
For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5.
Given A = [1, 2, 3], the function should return 4.
Given A = [−1, −3], the function should return 1.

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
const debug = require('debug')('steve');
debug('variable value... through debug');
//console.log('variable value... through console.');
let arr = [].fill(123, 0, 10000);
let arr2 = new arr.map(item => item * 10); // needed `new` in front of Array
debug('after the loop');