Skip to content

Instantly share code, notes, and snippets.

🐱
Focusing

Aga Rudnicka antnieszka

🐱
Focusing
  • AGH UST
  • Poland
Block or report user

Report or block antnieszka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@antnieszka
antnieszka / temporary_venv.py
Created Nov 1, 2019
Create python venv and install dependencies in temp dir
View temporary_venv.py
import os
import tempfile
import subprocess
dependencies = """
flake8
black
""".strip()
# create temporary directory for venv
@antnieszka
antnieszka / fields.py
Created May 14, 2018
EnglishURLField
View fields.py
from django.db.models import CharField
from django.utils.text import slugify
import logging
logger = logging.getLogger(__name__)
class EnglishURLField(CharField):
def __init__(self, *args, **kwargs):
@antnieszka
antnieszka / gulpfile.js
Created Mar 12, 2018
Simple gulpfile for django projects
View gulpfile.js
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
gulp.task('default', function () {
browserSync.init({
notify: true,
proxy: "localhost:8000",
ghostMode: false,
reloadDebounce: 500
View keybase.md

Keybase proof

I hereby claim:

  • I am ant6 on github.
  • I am ant6 (https://keybase.io/ant6) on keybase.
  • I have a public key ASDhM29FBMjXFGk4GmzDWF2OPguwR1Wxw8Yn7HSTxq0SkQo

To claim this, I am signing this object:

View torque.py
>>> t = getattr(mcpartools.scheduler.torque, "Torque")
>>> t
<class 'mcpartools.scheduler.torque.Torque'>
>>> b
'torque'
>>> b.title()
'Torque'
>>> t = getattr(mcpartools.scheduler.torque, b.title())
>>> t.__name__
'Torque'
View chi_0.1.py
import numpy as np
import scipy.optimize
import beprof.profile
import logging
# logging = logging.getLogger()
# logging.setLevel(30)
# nbps = 3
View depart-list.py
# TO2 - projekt?
TO2 = False
with open("1-department-list.csv", "r", encoding="utf8") as depart_in:
przedmioty = ()
studenciaki = {}
temp_student = ""
for e in depart_in.readlines():
if e[0] != '\t': # pewno student
temp_student = e.strip().split(";")[0]
View gist:3074ed92d62b7756b6e6f85a2c961e3f
(beprof3){16-07-02 18:49} ~/Downloads ant6% ➜ rm -fr beprof
(beprof3){16-07-02 18:49} ~/Downloads ant6% ➜ git clone https://github.com/ant6/beprof.git
Cloning into 'beprof'...
remote: Counting objects: 654, done.
remote: Total 654 (delta 0), reused 0 (delta 0), pack-reused 654
Receiving objects: 100% (654/654), 155.03 KiB | 174.00 KiB/s, done.
Resolving deltas: 100% (366/366), done.
Checking connectivity... done.
(beprof3){16-07-02 18:49} ~/Downloads ant6% ➜ cd beprof
(beprof3){16-07-02 18:49} ~/Downloads/beprof@master ant6% ➜ python setup.py develop
View intersection_r27.5_s14.15
0 0.0
11.2135919357 0.0
11.2135919357 1.31920580374
15.4180208471 1.31920580374
15.4180208471 2.63841160748
19.4046196536 2.63841160748
19.4046196536 3.95761741123
22.707522112 3.95761741123
22.707522112 5.27682321497
25.948042535 5.27682321497
View matplotlib.use('pdf') + plotting png
Traceback (most recent call last):
File "/home/ant6/INZ/modulators/src/findworker.py", line 411, in run
self.plot_functions()
File "/home/ant6/INZ/modulators/src/findworker.py", line 464, in plot_functions
show=common.check_option('show_sobp_plot'))
File "/home/ant6/INZ/modulators/src/plotting.py", line 122, in plot_SOBP
pylab.savefig(filename + '.' + plot_format, format=plot_format)
File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 561, in savefig
return fig.savefig(*args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 1422, in savefig
You can’t perform that action at this time.