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
# First, make sure you have a backup of your repository or any important files, as this process is irreversible. | |
git rm -r folder_name | |
git commit -m "Remove folder_name from repository" | |
By default, Git retains the history of commits, even for deleted files or folders. | |
To delete the history and make it easier to push the changes, you can use the git filter-branch command. Run the following command: | |
git filter-branch --force --index-filter 'git rm -r --cached --ignore-unmatch folder_name' --prune-empty --tag-name-filter cat -- --all | |
Once the filter-branch operation completes, the history of the folder will be deleted. However, the commits are still present in your local repository. | |
To remove them completely, you can run the following command: |
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
#!/bin/bash | |
#SBATCH --job-name=v02n | |
#SBATCH --partition=regular1 | |
#SBATCH --nodes=1 | |
#SBATCH --ntasks=1 | |
#SBATCH --mem=160G | |
#SBATCH --cpus-per-task=1 | |
#SBATCH --hint=nomultithread | |
#SBATCH --time=02:00:00 |
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
result_count_ir3_lb=pd.read_csv(path3/"bl_matrix_counts_ir3.txt",index_col=[0]) | |
result_count_ir3_lb.isnull().values.any() |
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
final2=pd.read_csv("final.csv", header=None,index_col=[0]) | |
final=final2.rename(columns=final2.iloc[0]).drop(final2.index[0]).reset_index(drop=True) |
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 pandas as pd | |
import numpy as np | |
from pathlib import Path | |
import functools | |
# We put the main path to the folder where 'counts' files are there. | |
path1=Path("/scratch/znazari/PPMI_ver_sep2022/RNA_Seq_data/star_ir2/counts/") | |
# We read the file: in the bl.txt is written the name of all files. |
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 <stdio.h> | |
#include "omp.h" | |
void main() | |
{ | |
printf("hi world from the main function\n"); | |
#pragma omp parallel | |
{ | |
//#pragma omp critical | |
{ |
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
// C[] is the elements of matrix multiplication | |
// we consider the hash value as zero and add the sum of the elemnt of the matrix as its value | |
// if the two matrices that we have computed have diffrent hash value then there would be an error in the computation of the matrics. | |
int hash_value = 0; | |
int i_m; | |
for( i_m = 0; i_m < N*N; i_m++) { | |
hash_value += C[i_m]; | |
} | |
// taking a modulo to shorten the final result. |
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
%%time | |
dfSave = pd.DataFrame() | |
for i in range(len(bl_files)): | |
print(i) | |
df = pd.read_csv(path1/bl_files.iloc[i][0],skiprows=1,delimiter='\t') | |
dfSave[bl_list[i]] = df.iloc[:,-1:] | |
del df |
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
git rm path/to/large_file.ext | |
# commit the removal: | |
git commit -m "Remove large file" | |
# If you want to keep the previous commit message, use: | |
git commit --amend --no-edit | |
# oteherwise | |
git commit --amend | |
# then: | |
git push --force origin branch_name | |
# force pushing can be disruptive and may affect other collaborators who have already pulled the previous commit. |
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
#In python instead of | |
my_list=[] | |
for i in range(len(my_files)): | |
my_list=my_list+[my_function(my_files.iloc[i][0])] | |
my_list; | |
#use: | |
my_list = [my_function(my_files.iloc[i][0]) for i in range(len(bl_files))] |