This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct tnode{ | |
unsigned int data; | |
tnode *left = NULL; | |
tnode *right = NULL; | |
}; | |
tnode* create_tnode(unsigned int x){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main (){ | |
int t; cin >> t; | |
for(int i =0; i < t; i++){ | |
int n, x, y; | |
cin >> n >> x >> y; | |
int arr[n]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main (){ | |
int n;cin >> n; | |
for (int i = 0; i < n; ++i) { | |
int t; | |
cin >> t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main (){ | |
int n;cin >> n; | |
for (int i = 0; i < n; ++i) { | |
string s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def rename_html_to_php(): | |
for filename in os.listdir("."): | |
if os.path.isdir(filename): | |
os.chdir("./"+filename) | |
rename_html_to_php() | |
os.chdir("..") | |
if filename.endswith(".html"): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def remove_files_in_dir(deleted_filename): | |
for filename in os.listdir("."): | |
if os.path.isdir(filename): | |
os.chdir("./"+filename) | |
remove_files_in_dir(deleted_filename) | |
os.chdir("..") | |
if filename.endswith(deleted_filename): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from os import remove | |
def replace(file_path, pattern, subst): | |
# Create temp file | |
for filename in os.listdir("."): | |
if os.path.isdir(filename): | |
os.chdir("./" + filename) | |
replace(file_path, pattern, subst) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct tree_node{ | |
unsigned int data; | |
tree_node *left = NULL; | |
tree_node *right = NULL; | |
}; | |
struct list_node{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script extracts nested files from their folders to the outter folder | |
say in the current dir we have the following folders: | |
f1 | |
f2 | |
f3 | |
each one has folders inside of it and those folders have files inside of them | |
this script will get those files from the nested folders to the outer level | |
""" | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layout: stacked | |
style: light | |
plugins: | |
- jekyll-octicons | |
- jekyll-github-metadata | |
- jemoji | |
permalink: /:year/:month/:day/:title/ |
OlderNewer