Skip to content

Instantly share code, notes, and snippets.

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

Kamila Łopuszańska camilajenny

🏠
Working from home
View GitHub Profile
class Docking:
"""
Implementacje:
* oddt.docking.autodock_vina
* custom engine }
* oddt.docking.rdock } nowe klasy
"""
def set_protein(self, protein): pass
def set_writer(self, writer): # writer of type MolWriter
#!/usr/bin/env bash
rm -f mine/tests/*.out
for f in tests/*.in
do
./pol < $f > mine/$f
# do something on $f
done
cd mine/tests
@camilajenny
camilajenny / 3dcurve.py
Created November 4, 2018 14:17
3D curve
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca(projection='3d')
theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
z = np.linspace(-2, 2, 100)
r = z**2 + 1
x = r * np.sin(theta)
y = r * np.cos(theta)
@camilajenny
camilajenny / chmod public.sh
Created September 3, 2018 09:12
chmod so that others have all permissions to all files recursively
find . -type d -exec chmod 777 {} \;
find . -type f -exec chmod 666 {} \;
find . -type f -executable -exec chmod 777 {} \;
#include <cstdio>
#include <functional>
using namespace std;
int edgeOperation(int &n);
int productOperation(int &n);
const function<int(int &)> operations[2] = {&productOperation, &edgeOperation};
int edgeOperation(int &n) {
--n;
@camilajenny
camilajenny / swapiness.md
Created November 11, 2017 10:36
swapiness on Linux
  • Change Swappiness Value
  1. Run terminal
  2. Enter following line to see current swappiness value cat /proc/sys/vm/swappiness (default value in Ubuntu for swappiness is 60)
  3. Open file /etc/sysctl.conf in a text editor, I did vim /etc/sysctl.conf
  4. Enter the following parameter

Decrease swappiness value

vm.swappiness=10

@camilajenny
camilajenny / seminarium7.md
Last active November 3, 2017 15:43
Skrót z pierwszych zajęć

Aby zaliczyć przedmiot, należy przygotować prezentację nt. swojej pracy inż (lic/magist?). Przykładowa prezentacja (z poprzedniego semestru): http://docdro.id/S8REdty

Plan:

  1. Strona tytułowa (imię, nazwisko, opiekun)
  2. Cel pracy
  3. Technologie a. wykorzystane b. przykłady innych zastosowań
  4. Przedstawienie pracy (LIVE, screenshots || video)
  5. Podsumowanie
@camilajenny
camilajenny / find_codes.pl
Last active June 25, 2017 13:35
Znajdź kody pocztowe w pliku
#!/usr/bin/perl
use strict;
my $filename = "kody.txt";
open my $kody, "<", $filename or die("Nie mogę otworzyć pliku ($!)!");
while (<$kody>)
{
my $matched = m/(\d{2}-\d{3})/;
my ($kod) = m/(\d{2}-\d{3})/;
@camilajenny
camilajenny / db-api.ts
Created June 6, 2017 15:15
db element from front
.post(upload.array(), function (req, res) {
let elem = new AnatomyElement();
let bodyElement = req.body.element;
elem.id = bodyElement.id;
elem.name = bodyElement.name;
elem.description = bodyElement.description;
elem.x = bodyElement.x;
elem.y = bodyElement.y;
elementService.createElement(elem);
res.send("post");
@camilajenny
camilajenny / COM_send_m.c
Created June 2, 2017 12:41
send multiple characters using `COM_send`
#include <stdarg.h>
void COM_send_m(int n, ...) {
va_list send;
va_start(send, n);
while(n--)
COM_send(va_arg(send, char*));
va_end(send);
}