Skip to content

Commit

Permalink
new contents added (#6)
Browse files Browse the repository at this point in the history
* new contents added

* Thesis document added

* dependencies updated

* enchanced:img added && pagefind disabled temporarily

* pagefind added again
  • Loading branch information
ilkersigirci authored Jul 22, 2024
1 parent 11562cb commit 63648a0
Show file tree
Hide file tree
Showing 18 changed files with 225 additions and 98 deletions.
Binary file modified bun.lockb
Binary file not shown.
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,41 @@
},
"devDependencies": {
"@neoconfetti/svelte": "^2.2.1",
"@playwright/test": "^1.45.1",
"@playwright/test": "^1.45.2",
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/adapter-vercel": "^5.4.0",
"@sveltejs/adapter-vercel": "^5.4.1",
"@sveltejs/enhanced-img": "^0.3.0",
"@sveltejs/kit": "^2.5.18",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@types/eslint": "8.56.10",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"eslint": "^9.6.0",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"eslint": "^9.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.41.0",
"eslint-plugin-svelte": "^2.43.0",
"mdsvex": "^0.11.2",
"prettier": "^3.3.2",
"prettier-plugin-svelte": "^3.2.5",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.6",
"svelte": "^4.2.18",
"svelte-check": "^3.8.4",
"tslib": "^2.6.3",
"typescript": "^5.5.3",
"vite": "^5.3.3",
"vite-plugin-pagefind": "^0.2.8",
"vitest": "^1.6.0"
"vite": "^5.3.4",
"vite-plugin-pagefind": "^0.2.9",
"vitest": "^2.0.3"
},
"dependencies": {
"@fontsource/fira-mono": "^5.0.13",
"@fontsource/jetbrains-mono": "^5.0.20",
"@fontsource/manrope": "^5.0.20",
"@pagefind/default-ui": "^1.1.0",
"lucide-svelte": "^0.399.0",
"lucide-svelte": "^0.412.0",
"open-props": "^1.7.5",
"pagefind": "^1.1.0",
"rehype-slug": "^6.0.0",
"remark-toc": "^9.0.0",
"remark-unwrap-images": "^4.0.0",
"shiki": "^1.10.1",
"shiki": "^1.10.3",
"svelte-zoo": "^0.4.10"
}
}
Binary file added src/assets/images/ThesisMethod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
---
title: MD Compatibility Test
description: MD Compatibility Test
title: Markdown Compatibility
description: Markdown Compatibility
date: '2023-4-10'
categories:
- sveltekit
- svelte
published: true
---

<script>
import Counter from './counter.svelte'
</script>


# Markdown.Syntax

- [Markdown.Syntax](#markdownsyntax)
Expand Down Expand Up @@ -304,3 +309,22 @@ Unlike a pre-formatted code block, a code span indicates code within a
normal paragraph. For example:

Use the `printf()` function.

```ts
function greet(name: string) {
console.log(`Hey ${name}! 👋`)
}
```

## Static Image Serving

- Media inside the **static** folder is served from `/` normally.
- But if you arrange routes in `src/routes/post/[slug]` form, the static media will be served from `../`.
- If one uses `enhanced:img` instead of default `img`, images must be located inside `src/assets/images` and they can be referenced only by their file name.
- [ ] Research this
- ![Svelte](favicon.png)


## Svelte Component inside Markdown

<Counter />
32 changes: 32 additions & 0 deletions src/content/My.Thesis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: My Thesis
description: My Master Thesis Work
date: '2024-7-16'
categories:
- programming
- thesis
published: true
---

# ON THE USE OF LARGE LANGUAGE MODEL FOR VIRTUAL SCREENING

## Introduction

- Due to the abundance of drug candidates, conducting in-lab experiments to find an effective compound for a given target is a costly and time-consuming task in drug discovery.
- This thesis aims to reduce the number of drug candidates during early drug discovery by clustering the compounds.
- ChemBERTa, a Bidirectional Encoder Representation from Transformers (BERT) model, is employed to extract the descriptors for a compound.
- The compounds are clustered with respect to the learned features, and several clustering algorithms, including the k-means clustering algorithm and the Butina algorithm, are used.
- Finally, obtained clusters are evaluated by measures such as the Silhouette Score and Homogeneity Score.
- Our empirical findings show that using learned descriptors of ChemBERTa produces results that are comparable with traditional and graph-based models, as shown by metrics of cluster accuracy and computing runtime.
- Keywords: drug-target interaction, compound descriptors, representation learning,
natural language processing, clustering
- [Thesis Pdf](../pdfs/Thesis.pdf)
- [Github Repository](https://github.com/ilkersigirci/thesis-work)

## Method

- Our method consists of 5 main stages.
- We use 3 main compound SMILES datasets, with 3 different descriptors.
- We also use dimensionality reduction techniques before clustering.
- We use 4 main clustering algorithm and evaluate their performance with 3 different metrics.
- ![Thesis.Method](ThesisMethod.png)
117 changes: 117 additions & 0 deletions src/content/Python.Template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
title: Python Template
description: My Custom Python Project Template
date: '2024-7-16'
categories:
- programming
- python
published: true
---

## Project Structure

- [Github Repository](https://github.com/ilkersigirci/python-template)
- It uses `project.toml` instead of `setup.py` and `setup.cfg`. The reasoning is following:
- As [official setuptools guide](https://github.com/pypa/setuptools/blob/main/docs/userguide/quickstart.rst) says, " configuring new projects via setup.py is discouraged"
- One of the biggest problems with setuptools is that the use of an executable file (i.e. the setup.py) cannot be executed without knowing its dependencies. And there is really no way to know what these dependencies are unless you actually execute the file that contains the information related to package dependencies.
- The pyproject.toml file is supposed to solve the build-tool dependency chicken and egg problem since pip itself can read pyproject.yoml along with the version of setuptools or wheel the project requires.
- The pyproject.toml file was introduced in PEP-518 (2016) as a way of separating configuration of the build system from a specific, optional library (setuptools) and also enabling setuptools to install itself without already being installed. Subsequently PEP-621 (2020) introduces the idea that the pyproject.toml file be used for wider project configuration and PEP-660 (2021) proposes finally doing away with the need for setup.py for editable installation using pip.
- It uses [rye](https://github.com/astral-sh/rye) for python dependency operations and virtual environment management.
- It uses `src` layout, which is the recommended layout for python projects to avoid common [pitfalls](https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure).

## Install

### Default installation

- Install rye - System wide

```bash
make -s install-rye
```

- Install the project dependencies

```bash
make -s install
```

- After running above command, the project installed in editable mode with all development and test dependencies installed.
- Moreover, a dummy `entry point` called `placeholder` will be available as a cli command.

### Docker

```bash
# Development build (800 MB)
docker build --tag python-template --file docker/Dockerfile --target development .

# Production build (145 MB)
docker build --tag python-template --file docker/Dockerfile --target production .
```

- To run command inside the container:

```bash
docker run -it python-template:latest bash

# Temporary container
docker run --rm -it python-template:latest bash
```

## IDE Setings

### Pycharm

- Line-length: `Editor -> Code Style -> Hard wrap at 88`

#### Inspections

Settings -> Editor -> Inspections -> Python

Enable all except:

- Accessing a protected member of a class or a module
- Assignment can be replaced with augmented assignments
- Classic style class usage
- Incorrect BDD Behave-specific definitions
- No encoding specified for file
- The function argument is equal to the default parameter
- Type checker compatible with Pydantic
- For "PEP 8 coding style violation":
Ignore = E266, E501
- For "PEP 8 naming convetion violation":
Ignore = N803

#### Plugins

- Ruff
- Pydantic

### Vscode

- All recommended settings and extensions can be found in `.vscode` directory.

## Useful Makefile commands

```bash
# All available commands
makefile
makefile help

# Run all tests
make -s test

# Run specific tests
make -s test-one TEST_MARKER=<TEST_MARKER>

# Remove unnecessary files such as build,test, cache
make -s clean

# Run all pre-commit hooks
make -s pre-commit

# Lint the project
make -s lint

# Profile a file
make -s profile PROFILE_FILE_PATH=<PATH_TO_FILE>
```
File renamed without changes.
27 changes: 25 additions & 2 deletions src/lib/components/custom/img.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
<script context="module">
const images_base_path = '/src/assets/images'
// From: https://github.com/sveltejs/kit/issues/11535#issuecomment-2207645048
const images = import.meta.glob(['/src/assets/images/*.{avif,gif,heif,jpeg,jpg,png,tiff,webp}'], {
eager: true,
query: { enhanced: true }
})
const get_full = (desired_image) => {
desired_image = `${images_base_path}/${desired_image}`
return images[desired_image].default
}
</script>

<script lang="ts">
export let src: string
export let alt: string
const image = get_full(src)
</script>

<!-- NOTE: Enables lazy loading images in mdsvex rendered markdown -->
<img {src} {alt} loading="lazy" />
<!-- <img {src} {alt} loading="lazy" /> -->

<!-- NOTE: /src/.. like paths only works with enhanced:img -->
<!-- <img src={`${images_base_path}/${src}`} {alt} /> -->

<figure class="image">
<enhanced:img src={image} {alt} />
</figure>
29 changes: 0 additions & 29 deletions src/posts/Why.Nations.Fail.md

This file was deleted.

19 changes: 0 additions & 19 deletions src/posts/first-post.md

This file was deleted.

26 changes: 0 additions & 26 deletions src/posts/second-post.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/routes/api/posts/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Post } from '$lib/types'
async function getPosts() {
let posts: Post[] = []

const paths = import.meta.glob('/src/posts/*.md', { eager: true })
const paths = import.meta.glob('/src/content/*.md', { eager: true })

for (const path in paths) {
const file = paths[path]
Expand Down
4 changes: 2 additions & 2 deletions src/routes/api/posts_pagination/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import type { Post } from '$lib/types'
async function getPosts(limit: number, skip: number) {
let posts: Post[] = []

const paths = import.meta.glob('/src/posts/*.md', { eager: true })
const paths = import.meta.glob('/src/content/*.md', { eager: true })

// TODO: Get total number of posts to show it in the pagination
// TODO: Get total number of content to show it in the pagination
// console.log('paths', Object.keys(paths).length)

for (const path in paths) {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/post/[slug]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { error } from '@sveltejs/kit'

export async function load({ params }) {
try {
const post = await import(`../../../posts/${params.slug}.md`)
const post = await import(`../../../content/${params.slug}.md`)

return {
content: post.default,
Expand Down
Binary file added static/pdfs/Thesis.pdf
Binary file not shown.
Loading

0 comments on commit 63648a0

Please sign in to comment.