hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
ca15d3a39d10b75749c3989ddaa269a5e7fa2f8d
1,739
py
Python
src/hacenada/abstract.py
corydodt/Hacenada
32421d071bf684e56e629c84cfb6d585be5be846
[ "MIT" ]
1
2021-03-23T10:21:27.000Z
2021-03-23T10:21:27.000Z
src/hacenada/abstract.py
corydodt/Hacenada
32421d071bf684e56e629c84cfb6d585be5be846
[ "MIT" ]
1
2021-01-15T04:12:12.000Z
2021-01-15T04:12:12.000Z
src/hacenada/abstract.py
corydodt/Hacenada
32421d071bf684e56e629c84cfb6d585be5be846
[ "MIT" ]
null
null
null
""" Abstract types """ from abc import ABC, abstractmethod import typing from hacenada.const import STR_DICT class SessionStorage(ABC): """ Provide access to the session's underlying storage through any mechanism """ answer: typing.Any meta: typing.Any @property def script_path(self): ...
20.702381
81
0.592869
""" Abstract types """ from abc import ABC, abstractmethod import typing from hacenada.const import STR_DICT class SessionStorage(ABC): """ Provide access to the session's underlying storage through any mechanism """ answer: typing.Any meta: typing.Any @property def script_path(self): ...
0
0
0
4a5f5f16ca4b191cb32bb78237a6ad6567772ab5
6,965
py
Python
compounddb/tools.py
gitanna/chemminetools
1cfef18bcd773421c95f8662857f31e363211cdc
[ "BSD-4-Clause-UC" ]
2
2017-12-11T23:17:40.000Z
2020-08-17T08:35:01.000Z
compounddb/tools.py
gitanna/chemminetools
1cfef18bcd773421c95f8662857f31e363211cdc
[ "BSD-4-Clause-UC" ]
null
null
null
compounddb/tools.py
gitanna/chemminetools
1cfef18bcd773421c95f8662857f31e363211cdc
[ "BSD-4-Clause-UC" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.models import User from logging import root, basicConfig import openbabel import sys import re import tempfile import os import codecs import md5 import compounddb.sdfiterator import string import random cur_dir = os.path....
21.902516
162
0.560086
#!/usr/bin/python # -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.models import User from logging import root, basicConfig import openbabel import sys import re import tempfile import os import codecs import md5 import compounddb.sdfiterator import string import random cur_dir = os.path....
377
0
46
7333e00acece91b14003ff4ab485dc5fbb7d6ece
725
py
Python
reservation_units/migrations/0040_reservationunit_tax_percentage.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
reservation_units/migrations/0040_reservationunit_tax_percentage.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
reservation_units/migrations/0040_reservationunit_tax_percentage.py
SuviVappula/tilavarauspalvelu-core
ad7dec36e392a7b2927e2f825c3b0eb29b700793
[ "MIT" ]
null
null
null
# Generated by Django 3.1.14 on 2021-12-13 11:06 import django.db.models.deletion from django.db import migrations, models import reservation_units.models
32.954545
302
0.721379
# Generated by Django 3.1.14 on 2021-12-13 11:06 import django.db.models.deletion from django.db import migrations, models import reservation_units.models class Migration(migrations.Migration): dependencies = [ ('reservation_units', '0039_taxpercentage'), ] operations = [ migrations.Ad...
0
544
23
a1a9646cdfbe9e115bc034e382782125b3a992b9
569
py
Python
xtapi/__init__.py
istommao/xtapi
acc81493a11adea7f3bb75773bf8683a3ea74b9d
[ "MIT" ]
null
null
null
xtapi/__init__.py
istommao/xtapi
acc81493a11adea7f3bb75773bf8683a3ea74b9d
[ "MIT" ]
null
null
null
xtapi/__init__.py
istommao/xtapi
acc81493a11adea7f3bb75773bf8683a3ea74b9d
[ "MIT" ]
null
null
null
"""xtapi""" from fastapi import ( Query, Path, Body, Cookie, Header, Form, File, UploadFile, Request, Response, status, Depends, APIRouter, HTTPException, BackgroundTasks ) from .main import MainApp from .templates import Templates __all__ = [ 'Query', ...
12.931818
32
0.544815
"""xtapi""" from fastapi import ( Query, Path, Body, Cookie, Header, Form, File, UploadFile, Request, Response, status, Depends, APIRouter, HTTPException, BackgroundTasks ) from .main import MainApp from .templates import Templates __all__ = [ 'Query', ...
0
0
0
42665268d49b3fed30aab6d47b1012fe77337c56
4,226
py
Python
tensortrade/core/component.py
tttza/tensortrade
bdc83c0ded7281f835ef5cb5bc8f57694bb28e87
[ "Apache-2.0" ]
2
2022-02-07T18:53:50.000Z
2022-02-08T04:19:10.000Z
tensortrade/core/component.py
tttza/tensortrade
bdc83c0ded7281f835ef5cb5bc8f57694bb28e87
[ "Apache-2.0" ]
null
null
null
tensortrade/core/component.py
tttza/tensortrade
bdc83c0ded7281f835ef5cb5bc8f57694bb28e87
[ "Apache-2.0" ]
1
2022-02-07T18:53:31.000Z
2022-02-07T18:53:31.000Z
from abc import ABC, ABCMeta from typing import Any from . import registry from tensortrade.core.context import TradingContext, Context from tensortrade.core.base import Identifiable class InitContextMeta(ABCMeta): """Metaclass that executes `__init__` of instance in its core. This class works with the `Tr...
32.507692
88
0.635589
from abc import ABC, ABCMeta from typing import Any from . import registry from tensortrade.core.context import TradingContext, Context from tensortrade.core.base import Identifiable class InitContextMeta(ABCMeta): """Metaclass that executes `__init__` of instance in its core. This class works with the `Tr...
0
0
0
360b9d69d4522185d1aa103f09cae5f806771a7a
314
py
Python
sample/fun.py
henryneu/Python
41bdbe73944116dc5bbb27d5770d6f45c20276a5
[ "Apache-2.0" ]
1
2017-03-02T02:59:47.000Z
2017-03-02T02:59:47.000Z
sample/fun.py
henryneu/Python
41bdbe73944116dc5bbb27d5770d6f45c20276a5
[ "Apache-2.0" ]
null
null
null
sample/fun.py
henryneu/Python
41bdbe73944116dc5bbb27d5770d6f45c20276a5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import sqrt from math import sin # 函数作为参数传入 # 使用可变参数 print(same(3, abs, sqrt, sin)) print(do_fun([1, 2, 4, 9], abs, sqrt, sin))
17.444444
43
0.60828
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import sqrt from math import sin # 函数作为参数传入 # 使用可变参数 def same(x, *fs): f = [f(x) for f in fs] return f def do_fun(x=[], *fu): fx = [f(x_i) for x_i in x for f in fu] return fx print(same(3, abs, sqrt, sin)) print(do_fun([1, 2, 4, 9], abs, sqrt, sin))
82
0
45
d503b7c3004d0aec97a03aa45fb4af6a06bd8cfd
1,537
py
Python
stepic_rec_2.py
pis2pis2/stepik_auto_tests_course
5bd5df105848582b58620373055e2f4fc945e5e2
[ "MIT" ]
null
null
null
stepic_rec_2.py
pis2pis2/stepik_auto_tests_course
5bd5df105848582b58620373055e2f4fc945e5e2
[ "MIT" ]
null
null
null
stepic_rec_2.py
pis2pis2/stepik_auto_tests_course
5bd5df105848582b58620373055e2f4fc945e5e2
[ "MIT" ]
null
null
null
from selenium import webdriver import time try: # link = "http://suninjuly.github.io/registration1.html" link = "http://suninjuly.github.io/registration2.html" browser = webdriver.Chrome() browser.get(link) # Ваш код, который заполняет обязательные поля input_first_name = browser.find_element...
37.487805
103
0.745608
from selenium import webdriver import time try: # link = "http://suninjuly.github.io/registration1.html" link = "http://suninjuly.github.io/registration2.html" browser = webdriver.Chrome() browser.get(link) # Ваш код, который заполняет обязательные поля input_first_name = browser.find_element...
0
0
0
a513ba215a5ee45deeea7edac6742335f7fa9630
919
py
Python
stock_rv_ranker/metrics/ranknet.py
Sci-Inference/stock-return-volatility-ranker
96dd865cac146c2cadea369df9552b9698dd05be
[ "Apache-2.0" ]
null
null
null
stock_rv_ranker/metrics/ranknet.py
Sci-Inference/stock-return-volatility-ranker
96dd865cac146c2cadea369df9552b9698dd05be
[ "Apache-2.0" ]
null
null
null
stock_rv_ranker/metrics/ranknet.py
Sci-Inference/stock-return-volatility-ranker
96dd865cac146c2cadea369df9552b9698dd05be
[ "Apache-2.0" ]
1
2022-01-23T06:35:44.000Z
2022-01-23T06:35:44.000Z
import numpy as np # https://gist.github.com/bwhite/3726239
21.372093
66
0.64309
import numpy as np # https://gist.github.com/bwhite/3726239 def precision_at_k(r, k): assert k >= 1 r = np.asarray(r)[:k] != 0 if r.size != k: raise ValueError('Relevance score length < k') return np.mean(r) def average_precision(r): r = np.asarray(r) != 0 out = [precision_at_k(r, k + 1) for k in range(r....
738
0
115
0b90e2988d72868e586b38128130fb3bcab2cdf2
1,486
py
Python
training/components/data/data_split.py
anifort/vertex-mlops-airlines
5a213836070bcbe72419239f05dd15a42bdebd19
[ "MIT" ]
null
null
null
training/components/data/data_split.py
anifort/vertex-mlops-airlines
5a213836070bcbe72419239f05dd15a42bdebd19
[ "MIT" ]
null
null
null
training/components/data/data_split.py
anifort/vertex-mlops-airlines
5a213836070bcbe72419239f05dd15a42bdebd19
[ "MIT" ]
null
null
null
from kfp.v2.dsl import ( component, Input, Output, Dataset, Artifact, HTML, ) @component( packages_to_install=[ "dask[dataframe]==2021.12.0", "gcsfs==2021.11.1"] )
28.037736
185
0.658816
from kfp.v2.dsl import ( component, Input, Output, Dataset, Artifact, HTML, ) @component( packages_to_install=[ "dask[dataframe]==2021.12.0", "gcsfs==2021.11.1"] ) def data_split_comp( dataset: Input[Dataset], train_set: Output[Dataset], validation_set: Output[Da...
1,250
0
22
8f5bbfeb8bfe3c37315237b9e16a94e21b9c4579
723
py
Python
projects/rpg/src/ex_teams_generator2/config/config.py
japinol7/some-examples
a31ab64f861a7e37685582a9fb92ac58f86295d9
[ "MIT" ]
1
2020-07-25T23:28:56.000Z
2020-07-25T23:28:56.000Z
projects/rpg/src/ex_teams_generator2/config/config.py
japinol7/some_examples
a31ab64f861a7e37685582a9fb92ac58f86295d9
[ "MIT" ]
null
null
null
projects/rpg/src/ex_teams_generator2/config/config.py
japinol7/some_examples
a31ab64f861a7e37685582a9fb92ac58f86295d9
[ "MIT" ]
null
null
null
import logging GROUP_SEPARATOR = f"{'-' * 10}" N_TEAMS = 42 N_MEMBERS = 3 N_TEAMS_MAX = 50 N_MEMBERS_MAX = 15 BODY_TEAMS_KEY = 'teams' BODY_ERRORS_KEY = 'errors' ERROR_TAG = 'Error' ERROR_MAX_MSG = f"User input Error. Maximum {N_TEAMS_MAX} teams and {N_MEMBERS_MAX} members for team. " \ f"Values mu...
27.807692
112
0.748271
import logging GROUP_SEPARATOR = f"{'-' * 10}" N_TEAMS = 42 N_MEMBERS = 3 N_TEAMS_MAX = 50 N_MEMBERS_MAX = 15 BODY_TEAMS_KEY = 'teams' BODY_ERRORS_KEY = 'errors' ERROR_TAG = 'Error' ERROR_MAX_MSG = f"User input Error. Maximum {N_TEAMS_MAX} teams and {N_MEMBERS_MAX} members for team. " \ f"Values mu...
0
0
0
da08051bd47a3da223c1b5849a5d7df3dec70611
49,656
py
Python
pmagpy/tsunashawfuncs.py
yamamon75/PmagPy
fa5b189800a239683fc17c6b312cdfdd839a46c3
[ "BSD-3-Clause" ]
null
null
null
pmagpy/tsunashawfuncs.py
yamamon75/PmagPy
fa5b189800a239683fc17c6b312cdfdd839a46c3
[ "BSD-3-Clause" ]
null
null
null
pmagpy/tsunashawfuncs.py
yamamon75/PmagPy
fa5b189800a239683fc17c6b312cdfdd839a46c3
[ "BSD-3-Clause" ]
null
null
null
import matplotlib as mpl import matplotlib.pyplot as plt import multiprocessing as multi import numpy as np import os import pandas as pd import pmagpy import pmagpy.ipmag as ipmag import pmagpy.pmag as pmag import pmagpy.pmagplotlib as pmagplotlib import re import scipy.integrate as integrate import scipy.stats as st...
41.79798
168
0.616381
import matplotlib as mpl import matplotlib.pyplot as plt import multiprocessing as multi import numpy as np import os import pandas as pd import pmagpy import pmagpy.ipmag as ipmag import pmagpy.pmag as pmag import pmagpy.pmagplotlib as pmagplotlib import re import scipy.integrate as integrate import scipy.stats as st...
39,422
0
415
907bbce329dfe85ec9ec7bb56a5142c19f23dc3a
2,148
py
Python
backend/app/app/models/user.py
PY-GZKY/Tplan
9f5335f9a9a28afce608744bebed1d9827068e6d
[ "MIT" ]
121
2021-10-29T20:21:37.000Z
2022-03-21T03:33:52.000Z
backend/app/app/models/user.py
GZKY-PY/Tplan
425ca8a497cdb3438bdbf6c72ed8dc234479dd00
[ "MIT" ]
null
null
null
backend/app/app/models/user.py
GZKY-PY/Tplan
425ca8a497cdb3438bdbf6c72ed8dc234479dd00
[ "MIT" ]
8
2021-11-06T07:02:11.000Z
2022-02-28T11:53:23.000Z
import datetime from sqlalchemy import Boolean, Column, Integer, String, ForeignKey, Date from sqlalchemy.orm import relationship from app.db.base_class import Base class User(Base): """用户表""" id = Column(Integer, primary_key=True, index=True) username = Column(String(32), unique=True, index=True, nulla...
37.684211
121
0.684358
import datetime from sqlalchemy import Boolean, Column, Integer, String, ForeignKey, Date from sqlalchemy.orm import relationship from app.db.base_class import Base class User(Base): """用户表""" id = Column(Integer, primary_key=True, index=True) username = Column(String(32), unique=True, index=True, nulla...
0
0
0
5911f7aec8f081ff83e457af5fdd4cc279732509
32
py
Python
utils/models/highresnetv2/__init__.py
bhklab/ptl-oar-segmentation
354c3ee7f042a025f74e210a7b8462beac9b727d
[ "Apache-2.0" ]
3
2022-01-18T19:25:46.000Z
2022-02-05T18:53:24.000Z
utils/models/highresnetv2/__init__.py
bhklab/ptl-oar-segmentation
354c3ee7f042a025f74e210a7b8462beac9b727d
[ "Apache-2.0" ]
null
null
null
utils/models/highresnetv2/__init__.py
bhklab/ptl-oar-segmentation
354c3ee7f042a025f74e210a7b8462beac9b727d
[ "Apache-2.0" ]
null
null
null
from .model import HighResNet3D
16
31
0.84375
from .model import HighResNet3D
0
0
0
99102d586405e98b68ea689e5d8d0984d8adee8b
3,129
py
Python
hathor/p2p/messages.py
mbnunes/hathor-core
e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8
[ "Apache-2.0" ]
51
2019-12-28T03:33:27.000Z
2022-03-10T14:03:03.000Z
hathor/p2p/messages.py
mbnunes/hathor-core
e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8
[ "Apache-2.0" ]
316
2019-09-10T09:20:05.000Z
2022-03-31T20:18:56.000Z
hathor/p2p/messages.py
mbnunes/hathor-core
e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8
[ "Apache-2.0" ]
19
2020-01-04T00:13:18.000Z
2022-02-08T21:18:46.000Z
# Copyright 2021 Hathor Labs # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
26.294118
107
0.676894
# Copyright 2021 Hathor Labs # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
0
2,376
115
256b9c2991d095bc7b5875dc44f643f8c72cc6ef
1,980
py
Python
libya_elections/settings/dev.py
SmartElect/SmartElect
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
[ "Apache-2.0" ]
23
2015-10-28T14:08:23.000Z
2021-09-11T21:38:41.000Z
libya_elections/settings/dev.py
SmartElect/SmartElect
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
[ "Apache-2.0" ]
4
2019-12-05T20:36:10.000Z
2020-06-05T18:41:54.000Z
libya_elections/settings/dev.py
SmartElect/SmartElect
d6d35f2fa8f60e756ad5247f8f0a5f05830e92f8
[ "Apache-2.0" ]
11
2015-10-28T15:49:56.000Z
2021-09-14T14:18:36.000Z
import sys from libya_elections.settings.base import * # noqa DEBUG = True SECRET_KEY = 'dummy secret key for testing only' INTERNAL_IPS = ('127.0.0.1', ) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' CELERY_TASK_ALWAYS_EAGER = False INSTALLED_BACKENDS = { HTTPTESTER_BACKEND: { "E...
29.117647
94
0.676768
import sys from libya_elections.settings.base import * # noqa DEBUG = True SECRET_KEY = 'dummy secret key for testing only' INTERNAL_IPS = ('127.0.0.1', ) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' CELERY_TASK_ALWAYS_EAGER = False INSTALLED_BACKENDS = { HTTPTESTER_BACKEND: { "E...
0
0
0
d9da596db75589f3cb736b7eaf7f3d9f34f2592d
13,278
py
Python
pontoon/administration/tests/test_views.py
rhencke/pontoon
d530830acd4e03f3e29cae3273a5fede9f246499
[ "BSD-3-Clause" ]
1
2018-12-24T11:15:35.000Z
2018-12-24T11:15:35.000Z
pontoon/administration/tests/test_views.py
rhencke/pontoon
d530830acd4e03f3e29cae3273a5fede9f246499
[ "BSD-3-Clause" ]
1
2018-08-03T12:02:41.000Z
2018-08-03T12:02:41.000Z
pontoon/administration/tests/test_views.py
shkamaru/pontoon
6a1ec623d1518867e6b9b1d2059da00716a03ac0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from django.core.urlresolvers import reverse from pontoon.administration.forms import ( ProjectForm, ) from pontoon.administration.views import _create_or_update_translated_resources from pontoon.base.models import ( Entity, Locale, Project, ProjectLocale, ...
33.029851
91
0.675629
# -*- coding: utf-8 -*- import pytest from django.core.urlresolvers import reverse from pontoon.administration.forms import ( ProjectForm, ) from pontoon.administration.views import _create_or_update_translated_resources from pontoon.base.models import ( Entity, Locale, Project, ProjectLocale, ...
9,748
0
154
e0cfbaa527144500c045f954a24270f62d26262d
1,870
py
Python
orix/quaternion/__init__.py
bm424/texpy
8d78b568209a6da36fc831c6bc9e2b0cb4c740c8
[ "MIT" ]
6
2018-02-05T18:37:10.000Z
2018-10-07T22:07:26.000Z
orix/quaternion/__init__.py
bm424/texpy
8d78b568209a6da36fc831c6bc9e2b0cb4c740c8
[ "MIT" ]
5
2018-11-04T18:06:28.000Z
2019-09-13T11:22:43.000Z
orix/quaternion/__init__.py
bm424/texpy
8d78b568209a6da36fc831c6bc9e2b0cb4c740c8
[ "MIT" ]
3
2019-04-27T09:24:28.000Z
2019-09-13T10:24:57.000Z
# -*- coding: utf-8 -*- # Copyright 2018-2022 the orix developers # # This file is part of orix. # # orix is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) ...
36.666667
88
0.750802
# -*- coding: utf-8 -*- # Copyright 2018-2022 the orix developers # # This file is part of orix. # # orix is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) ...
0
0
0
a2c196cbaf7e46bd084dd1e8aa85dc85a0321db6
3,103
py
Python
dz5/integrators/integrators.py
vedrankolka/APR
4f8afefc74f3d0f67f5d2ec665c93a4b38fbdf2f
[ "Apache-2.0" ]
null
null
null
dz5/integrators/integrators.py
vedrankolka/APR
4f8afefc74f3d0f67f5d2ec665c93a4b38fbdf2f
[ "Apache-2.0" ]
null
null
null
dz5/integrators/integrators.py
vedrankolka/APR
4f8afefc74f3d0f67f5d2ec665c93a4b38fbdf2f
[ "Apache-2.0" ]
null
null
null
import numpy as np
26.982609
126
0.535933
import numpy as np class Integrator: def __init__(self, A, B=0, step=0.01, r=lambda t: 1): self.A = A self.B = B self.step = step self.r = r def integrate(self, x0, start, end, callbacks=[], v=100): xs = [x0] ts = [start] x = x0 t = start + sel...
2,382
102
593
d5ff97767b950838b9579739fb6e42b24968f25c
24,761
py
Python
src/auctioneer.py
Brechard/Auctioneer
f530a0e00d333a9f4d2201e61094b9b4986117a5
[ "MIT" ]
2
2019-02-10T12:07:00.000Z
2020-03-15T13:29:47.000Z
src/auctioneer.py
Brechard/Auctioneer
f530a0e00d333a9f4d2201e61094b9b4986117a5
[ "MIT" ]
null
null
null
src/auctioneer.py
Brechard/Auctioneer
f530a0e00d333a9f4d2201e61094b9b4986117a5
[ "MIT" ]
null
null
null
import random import matplotlib.pyplot as plt import numpy as np from prettytable import PrettyTable from auction import Auction if __name__ == '__main__': buyers = 10 strategy = [1 for n in range(buyers)] # strategy[0] = 4 auctioneer = Auctioneer(0.1, bidding_factor_str...
45.26691
119
0.619482
import random import matplotlib.pyplot as plt import numpy as np from prettytable import PrettyTable from auction import Auction class Auctioneer: def __init__(self, penalty_factor=0.1, bidding_factor_strategy=[], use_seller=True, starting_prices=[], M_types=3, K_sellers=4, N_buyers=10, R_roun...
644
23,297
23
bc8ce23b2de1c59918fb8dc6dfc87ea85a63c990
2,733
py
Python
atc/LINE-master/train.py
anaeliaovalle/atc-mt-dti
755bd175e852ef2a6792be7244b006ebed252d8d
[ "MIT" ]
null
null
null
atc/LINE-master/train.py
anaeliaovalle/atc-mt-dti
755bd175e852ef2a6792be7244b006ebed252d8d
[ "MIT" ]
null
null
null
atc/LINE-master/train.py
anaeliaovalle/atc-mt-dti
755bd175e852ef2a6792be7244b006ebed252d8d
[ "MIT" ]
null
null
null
import argparse from utils.utils import * from utils.line import Line from tqdm import trange import torch import torch.optim as optim import sys import pickle if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-g", "--graph_path", type=str) parser.add_argument("-save", "--...
36.932432
89
0.631906
import argparse from utils.utils import * from utils.line import Line from tqdm import trange import torch import torch.optim as optim import sys import pickle if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-g", "--graph_path", type=str) parser.add_argument("-save", "--...
0
0
0
e350a391ac04e2b8526a0c505584efa8bd49131b
13,994
py
Python
sdtv4/SDT4Parser.py
Homegateway/SDTTool
97e698ce3078595a6755ec0b599838dc903eaa3d
[ "Apache-2.0" ]
2
2018-05-14T16:00:23.000Z
2018-12-26T14:02:51.000Z
sdtv4/SDT4Parser.py
Homegateway/SDTTool
97e698ce3078595a6755ec0b599838dc903eaa3d
[ "Apache-2.0" ]
null
null
null
sdtv4/SDT4Parser.py
Homegateway/SDTTool
97e698ce3078595a6755ec0b599838dc903eaa3d
[ "Apache-2.0" ]
2
2016-09-05T09:24:41.000Z
2020-06-23T14:05:45.000Z
# SDT4Parser.py # # Callback target class for the ElementTree parser to parse a SDT4 from .SDT4Classes import * # # Hanlder for each of the element types # # # Assignment of element types and (handlerFunction, (tuple of allowed parents)) # handlers = { SDT4Parser.actionTag : (hand...
31.376682
223
0.736101
# SDT4Parser.py # # Callback target class for the ElementTree parser to parse a SDT4 from .SDT4Classes import * class SDT4Parser: # Define the element tags of the SDT4 actionTag = 'action' actionsTag = 'actions' argTag = 'arg' argsTag = 'args' arrayTypeTag = 'array' constraintTag ...
9,521
1,393
667
de130291f9918c171aaa53459b784a3e93f4b849
1,698
py
Python
tools/validator.py
adacker10/showdown
8ceb1ff46d5c33ec3055928d6ad293224446f63c
[ "MIT" ]
8
2019-02-02T01:15:57.000Z
2021-12-23T04:43:46.000Z
tools/validator.py
adacker10/showdown
8ceb1ff46d5c33ec3055928d6ad293224446f63c
[ "MIT" ]
null
null
null
tools/validator.py
adacker10/showdown
8ceb1ff46d5c33ec3055928d6ad293224446f63c
[ "MIT" ]
6
2020-09-11T13:15:05.000Z
2022-03-18T15:46:35.000Z
from data import dex import re def validate_team(team): ''' team is an array of six pokemon sets ''' if len(team) > 6: raise InValidSetError("more than 6 pokemon") pokemon_names = set() for pokemon in team: # check if the pokemon is an actual pokemon species = re.sub(r'...
40.428571
154
0.602473
from data import dex import re class InValidSetError(Exception): def __init__(self, message): self.message = message def validate_team(team): ''' team is an array of six pokemon sets ''' if len(team) > 6: raise InValidSetError("more than 6 pokemon") pokemon_names = set() f...
38
12
49
bceb90c866742318115d3897625ab3cd17dad9ae
1,782
py
Python
abfs/group_data_split.py
rcdilorenzo/abfs
a897d00a4589a9412a9b9e737f8db91df008fc26
[ "MIT" ]
7
2019-03-13T17:22:50.000Z
2022-01-09T09:03:16.000Z
abfs/group_data_split.py
rcdilorenzo/abfs
a897d00a4589a9412a9b9e737f8db91df008fc26
[ "MIT" ]
1
2019-08-01T23:42:09.000Z
2019-08-02T16:14:31.000Z
abfs/group_data_split.py
rcdilorenzo/abfs
a897d00a4589a9412a9b9e737f8db91df008fc26
[ "MIT" ]
2
2020-09-12T06:33:16.000Z
2021-01-01T01:05:48.000Z
from collections import namedtuple as Struct from sklearn.model_selection import GroupShuffleSplit, ShuffleSplit DataSplitConfig = Struct('DataSplitConfig', ['validation_size', 'test_size', 'random_seed']) DEFAULT_SPLIT_CONFIG = DataSplitConfig(0.2, 0.2, 1337)
30.724138
92
0.640292
from collections import namedtuple as Struct from sklearn.model_selection import GroupShuffleSplit, ShuffleSplit DataSplitConfig = Struct('DataSplitConfig', ['validation_size', 'test_size', 'random_seed']) DEFAULT_SPLIT_CONFIG = DataSplitConfig(0.2, 0.2, 1337) class GroupDataSplit(): def __init__(self, df, key, ...
915
581
23
b1412972007124b927dd10c01b84ccee4179e203
656
py
Python
data_extract_code/sex-ratio.py
jaya-shankar/Human-Development-Prediction
cdc7f2186c49db3506267573b05da6ba03cd5bfd
[ "Unlicense" ]
null
null
null
data_extract_code/sex-ratio.py
jaya-shankar/Human-Development-Prediction
cdc7f2186c49db3506267573b05da6ba03cd5bfd
[ "Unlicense" ]
null
null
null
data_extract_code/sex-ratio.py
jaya-shankar/Human-Development-Prediction
cdc7f2186c49db3506267573b05da6ba03cd5bfd
[ "Unlicense" ]
2
2021-11-01T15:48:16.000Z
2021-12-28T07:48:35.000Z
import csv file = open("sex-ratio.csv") csvreader = csv.reader(file) header = next(csvreader) mapped = {} for row in csvreader: if(row[0] not in mapped): mapped[row[0]]={} mapped[row[0]][row[2]] = row[3] # f = open("converted.csv",'w') rows=[] for c in mapped: row = [c] for y in mapped[c]:...
18.222222
54
0.599085
import csv file = open("sex-ratio.csv") csvreader = csv.reader(file) header = next(csvreader) mapped = {} for row in csvreader: if(row[0] not in mapped): mapped[row[0]]={} mapped[row[0]][row[2]] = row[3] # f = open("converted.csv",'w') rows=[] for c in mapped: row = [c] for y in mapped[c]:...
0
0
0
31f4a614a97ec199afd65d00866fe66229803029
525
py
Python
lib/flask_api/compat.py
imtiaz-emu/gcp-flask-test
096f466242aa14941712ab8ea06ac4fb4eaeb993
[ "Apache-2.0" ]
null
null
null
lib/flask_api/compat.py
imtiaz-emu/gcp-flask-test
096f466242aa14941712ab8ea06ac4fb4eaeb993
[ "Apache-2.0" ]
null
null
null
lib/flask_api/compat.py
imtiaz-emu/gcp-flask-test
096f466242aa14941712ab8ea06ac4fb4eaeb993
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import # Markdown is optional try: import markdown def apply_markdown(text): """ Simple wrapper around :func:`markdown.markdown` to set the base level of '#' style headers to <h2>. """ extensions...
25
77
0.645714
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import # Markdown is optional try: import markdown def apply_markdown(text): """ Simple wrapper around :func:`markdown.markdown` to set the base level of '#' style headers to <h2>. """ extensions...
0
0
0
6bff53885f7d7817bb5989d427b6919245c38e01
4,969
py
Python
src/cfdpy/derivative/finiteDifferenceMethods.py
mkihara/cfdpy
53945ddd87f810e65d4fffe3b68f6bf8c06098c2
[ "MIT" ]
1
2022-03-28T03:07:26.000Z
2022-03-28T03:07:26.000Z
src/cfdpy/derivative/finiteDifferenceMethods.py
mkihara/cfdpy
53945ddd87f810e65d4fffe3b68f6bf8c06098c2
[ "MIT" ]
null
null
null
src/cfdpy/derivative/finiteDifferenceMethods.py
mkihara/cfdpy
53945ddd87f810e65d4fffe3b68f6bf8c06098c2
[ "MIT" ]
null
null
null
"""Finite Difference Methods """ import numpy as np def FDMWeights(M, x0, alpha): """Calculate the weights in finite difference formulas for any order of derivative and to any order of accuracy on onedimensional grids with arbitrary spacing. Args: M (int): Order of derivative x0 (flo...
38.51938
105
0.603944
"""Finite Difference Methods """ import numpy as np def FDMWeights(M, x0, alpha): """Calculate the weights in finite difference formulas for any order of derivative and to any order of accuracy on onedimensional grids with arbitrary spacing. Args: M (int): Order of derivative x0 (flo...
1,346
0
106
ff72c44c7b3d8e713ec5a01de73d9db8358095b9
7,381
py
Python
revcar-cli.py
madkaye/revcar-cli
c49a0ae47b1545c81d53d4fb5ddccbc73203caa2
[ "MIT" ]
null
null
null
revcar-cli.py
madkaye/revcar-cli
c49a0ae47b1545c81d53d4fb5ddccbc73203caa2
[ "MIT" ]
null
null
null
revcar-cli.py
madkaye/revcar-cli
c49a0ae47b1545c81d53d4fb5ddccbc73203caa2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import time import datetime from bluepy import btle from bluepy.btle import Scanner, DefaultDelegate, Peripheral, Characteristic, ScanEntry, Service, UUID import curses import curses.textpad from carcontrol import CarControl # Scan timeout in seconds SCAN_TIMEOUT = 10 ## screen part...
34.013825
122
0.562796
#!/usr/bin/env python3 import os import time import datetime from bluepy import btle from bluepy.btle import Scanner, DefaultDelegate, Peripheral, Characteristic, ScanEntry, Service, UUID import curses import curses.textpad from carcontrol import CarControl # Scan timeout in seconds SCAN_TIMEOUT = 10 ## screen part...
5,923
462
23
cbfa2caf1265110b8014de4c1cbc3f72c30c2833
2,736
py
Python
landwatch/model/unet.py
Lleyton-Ariton/landwatch
21e86e899d33d0ee349cf9bf87c6c13ebdab82fa
[ "MIT" ]
1
2021-06-07T06:04:49.000Z
2021-06-07T06:04:49.000Z
landwatch/model/unet.py
Lleyton-Ariton/landwatch
21e86e899d33d0ee349cf9bf87c6c13ebdab82fa
[ "MIT" ]
null
null
null
landwatch/model/unet.py
Lleyton-Ariton/landwatch
21e86e899d33d0ee349cf9bf87c6c13ebdab82fa
[ "MIT" ]
null
null
null
import math import torch import torch.nn as nn
26.057143
88
0.574196
import math import torch import torch.nn as nn class ConvBlock(nn.Module): def __init__(self, in_channels: int, out_channels: int): super().__init__() self.in_channels = in_channels self.out_channels = out_channels self.conv_block = nn.Sequential( nn.Conv2d(self.in_...
2,434
20
231
2f9ce9ff91cdee6af0518b1de00124ffbd5bb250
5,714
py
Python
tests/functional/test_absensi.py
rdmaulana/absensi-api
d3dc8bef750ee0efc06e96689894dcdef2495ef6
[ "MIT" ]
null
null
null
tests/functional/test_absensi.py
rdmaulana/absensi-api
d3dc8bef750ee0efc06e96689894dcdef2495ef6
[ "MIT" ]
null
null
null
tests/functional/test_absensi.py
rdmaulana/absensi-api
d3dc8bef750ee0efc06e96689894dcdef2495ef6
[ "MIT" ]
null
null
null
import json from app.models import BaseModel
32.282486
91
0.650508
import json from app.models import BaseModel def test_checkin_absen(test_client, user_token_pegawai): response = test_client.get( '/api/presensi/in', headers = dict( Authorization = 'Bearer '+ user_token_pegawai ) ) data = json.loads(response.data.decode()) pri...
5,410
0
257
0e2664f2020e42cdf1e34c5553fdb17e94b6240a
5,580
py
Python
spycy/operator.py
kanales/spycy
f8702bcbfed8eb60bc6e3fca76cb30d781d69cb0
[ "MIT" ]
null
null
null
spycy/operator.py
kanales/spycy
f8702bcbfed8eb60bc6e3fca76cb30d781d69cb0
[ "MIT" ]
null
null
null
spycy/operator.py
kanales/spycy
f8702bcbfed8eb60bc6e3fca76cb30d781d69cb0
[ "MIT" ]
null
null
null
""" This module contains all the functions from the ``operator`` module (bar some functions that dind't feel like they belonged here) transformed into a spice so it can be used more confortable. :Example: Consider adding ``2`` to a list of numbers:: map(add(2), [1,2,3,4,5]) """ import operator from spycy impor...
45.365854
112
0.704659
""" This module contains all the functions from the ``operator`` module (bar some functions that dind't feel like they belonged here) transformed into a spice so it can be used more confortable. :Example: Consider adding ``2`` to a list of numbers:: map(add(2), [1,2,3,4,5]) """ import operator from spycy impor...
0
0
0
8f22602f2a4aaf4a77b2fbdbfd6ec7f59e6787bf
2,577
bzl
Python
recipes/brotli/config.bzl
curoky/rules_cc
943408c05e2204e1e603b70db05037217a53868d
[ "Apache-2.0" ]
3
2022-02-06T10:10:44.000Z
2022-02-07T11:53:25.000Z
recipes/brotli/config.bzl
curoky/rules_cc
943408c05e2204e1e603b70db05037217a53868d
[ "Apache-2.0" ]
null
null
null
recipes/brotli/config.bzl
curoky/rules_cc
943408c05e2204e1e603b70db05037217a53868d
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 curoky(cccuroky@gmail.com). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
57.266667
236
0.668607
# Copyright 2021 curoky(cccuroky@gmail.com). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
0
0
0
1e9f1106e32966139e9187c455ded6eb0bcb3ee5
565
py
Python
vvphotos/serializers.py
synw/django-vvphotos
3dd93fbe8a29d8db6fe440a40ee700d229da537b
[ "MIT" ]
1
2017-04-05T04:09:00.000Z
2017-04-05T04:09:00.000Z
vvphotos/serializers.py
synw/django-vvphotos
3dd93fbe8a29d8db6fe440a40ee700d229da537b
[ "MIT" ]
null
null
null
vvphotos/serializers.py
synw/django-vvphotos
3dd93fbe8a29d8db6fe440a40ee700d229da537b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from rest_framework import serializers from vvphotos.models import Album
25.681818
106
0.677876
# -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from rest_framework import serializers from vvphotos.models import Album class AlbumSerializer(serializers.ModelSerializer): class Meta: model = Album fields = read_only_fields = ["slug", "title", "image", "descri...
0
359
46
2e44b8dfcbd49f05cef5d226ed68147f4d615605
6,650
py
Python
docusign_esign/models/currency_feature_set_price.py
hunk/docusign-python-client
a643c42c1236715e74eef6fc279a1b29da1b5455
[ "MIT" ]
null
null
null
docusign_esign/models/currency_feature_set_price.py
hunk/docusign-python-client
a643c42c1236715e74eef6fc279a1b29da1b5455
[ "MIT" ]
null
null
null
docusign_esign/models/currency_feature_set_price.py
hunk/docusign-python-client
a643c42c1236715e74eef6fc279a1b29da1b5455
[ "MIT" ]
null
null
null
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from p...
30.365297
126
0.603308
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from p...
0
0
0
374c484b3ff01260b21cf925102e1875ef9938a6
477
py
Python
WarelogPyApi/app.py
propil5/WarelogManager
6baf338855175259877257352f9986a02ffd3e2e
[ "MIT" ]
null
null
null
WarelogPyApi/app.py
propil5/WarelogManager
6baf338855175259877257352f9986a02ffd3e2e
[ "MIT" ]
null
null
null
WarelogPyApi/app.py
propil5/WarelogManager
6baf338855175259877257352f9986a02ffd3e2e
[ "MIT" ]
null
null
null
from flask.helpers import url_for from pyTrendsExtensions import GetTrendingOverTime from flask import Flask, redirect # from flask_restful import Api, Resource, reqparse, abort, fields, marshal_with # from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) # api = Api(app) @app.route("/") @app.route("/<keywor...
29.8125
80
0.769392
from flask.helpers import url_for from pyTrendsExtensions import GetTrendingOverTime from flask import Flask, redirect # from flask_restful import Api, Resource, reqparse, abort, fields, marshal_with # from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) # api = Api(app) @app.route("/") def hello(): retu...
109
0
44
06d5b67bfa6a6b800139d199e86030897e4fbec4
1,190
py
Python
TCPServer/server.py
listenzcc/BCIMiddleware
80f74731b4df7f6da84c5df0c67e0ca4e6af7102
[ "MIT" ]
null
null
null
TCPServer/server.py
listenzcc/BCIMiddleware
80f74731b4df7f6da84c5df0c67e0ca4e6af7102
[ "MIT" ]
null
null
null
TCPServer/server.py
listenzcc/BCIMiddleware
80f74731b4df7f6da84c5df0c67e0ca4e6af7102
[ "MIT" ]
null
null
null
''' TCP server interface for console. The TCP server will be automatically built. - @interface: The function for user interface, and keep the server running. ''' from . import logger from .defines import TCPServer server = TCPServer() server.start()
23.8
76
0.532773
''' TCP server interface for console. The TCP server will be automatically built. - @interface: The function for user interface, and keep the server running. ''' from . import logger from .defines import TCPServer server = TCPServer() server.start() def interface(): logger.info(f'Interface start...
898
0
25
036784373473c2b9223ab0d805911bb033726125
712
py
Python
ideas/views.py
Adstefnum/ScrapBook
8391e86daf678f64a30dd693e34cd69939b6fe0d
[ "MIT" ]
null
null
null
ideas/views.py
Adstefnum/ScrapBook
8391e86daf678f64a30dd693e34cd69939b6fe0d
[ "MIT" ]
null
null
null
ideas/views.py
Adstefnum/ScrapBook
8391e86daf678f64a30dd693e34cd69939b6fe0d
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views.generic import ListView from .models import Video,Audio,Image,Note
20.941176
42
0.76264
from django.shortcuts import render from django.views.generic import ListView from .models import Video,Audio,Image,Note class IndexView(ListView): template_name = "ideas/index.html" def get_queryset(self): return Note.objects.all() class AudioView(ListView): template_name = "ideas/audio.html" def get_queryse...
153
323
115
15aa8a1888009a607ef0c0137fb959c9365621e7
3,701
py
Python
src/animal.py
Doankt/Rabbit-Wolf-Evolution-Simulation
ae3d3cb4cad7fd5059921d0a3cf41d93ab56e88e
[ "MIT" ]
null
null
null
src/animal.py
Doankt/Rabbit-Wolf-Evolution-Simulation
ae3d3cb4cad7fd5059921d0a3cf41d93ab56e88e
[ "MIT" ]
null
null
null
src/animal.py
Doankt/Rabbit-Wolf-Evolution-Simulation
ae3d3cb4cad7fd5059921d0a3cf41d93ab56e88e
[ "MIT" ]
null
null
null
from worldtools import * from enum import Enum from math import sin, cos, pi from random import uniform class Animal: """Class representing Animal in the world""" def __init__(self, world, pos: (float, float), speed: float): """ Initializes the Animal Args: world (World): The world pos ( (float, float)...
22.705521
83
0.667657
from worldtools import * from enum import Enum from math import sin, cos, pi from random import uniform class State(Enum): ROAM = 0 REPRODUCE = 1 class Animal: """Class representing Animal in the world""" def __init__(self, world, pos: (float, float), speed: float): """ Initializes the Animal Args: wor...
167
22
47
29436600c26ca109f41fc8cbab442dc2297f2a28
2,261
py
Python
graphgallery/gallery/nodeclas/dgl/appnp.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
1
2020-07-29T08:00:32.000Z
2020-07-29T08:00:32.000Z
graphgallery/gallery/nodeclas/dgl/appnp.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
null
null
null
graphgallery/gallery/nodeclas/dgl/appnp.py
dongzizhu/GraphGallery
c65eab42daeb52de5019609fe7b368e30863b4ae
[ "MIT" ]
null
null
null
import graphgallery.nn.models.dgl as models from graphgallery.data.sequence import FullBatchSequence from graphgallery import functional as gf from graphgallery.gallery.nodeclas import NodeClasTrainer from graphgallery.gallery.nodeclas import DGL @DGL.register() class APPNP(NodeClasTrainer): """Impleme...
37.683333
81
0.524547
import graphgallery.nn.models.dgl as models from graphgallery.data.sequence import FullBatchSequence from graphgallery import functional as gf from graphgallery.gallery.nodeclas import NodeClasTrainer from graphgallery.gallery.nodeclas import DGL @DGL.register() class APPNP(NodeClasTrainer): """Impleme...
1,478
0
87
8212a3f51dd0ff690f96c791a8239dc4e79430a6
2,225
py
Python
whale/src/choiceHeuristic.py
margaal/whale
00f0743a49e383319cec2d38883697774956ffc5
[ "MIT", "Unlicense" ]
null
null
null
whale/src/choiceHeuristic.py
margaal/whale
00f0743a49e383319cec2d38883697774956ffc5
[ "MIT", "Unlicense" ]
null
null
null
whale/src/choiceHeuristic.py
margaal/whale
00f0743a49e383319cec2d38883697774956ffc5
[ "MIT", "Unlicense" ]
null
null
null
#!/usr/bin/env python3 """ This module contains all class to manage variable choice Heuristic """ class VariableChoiceHeuristic: """ Super class to handle variable choice heuristic """ def __init__(self, vars): """ Args: vars (set): variables used in all clauses. """ ...
33.712121
127
0.595056
#!/usr/bin/env python3 """ This module contains all class to manage variable choice Heuristic """ class VariableChoiceHeuristic: """ Super class to handle variable choice heuristic """ def __init__(self, vars): """ Args: vars (set): variables used in all clauses. """ ...
205
0
53
4dafefa27f16be57f2e9da833baf8652ada74c41
139
py
Python
mayan/apps/common/forms.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
2
2021-09-12T19:41:19.000Z
2021-09-12T19:41:20.000Z
mayan/apps/common/forms.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
37
2021-09-13T01:00:12.000Z
2021-10-02T03:54:30.000Z
mayan/apps/common/forms.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
1
2021-09-22T13:17:30.000Z
2021-09-22T13:17:30.000Z
from mayan.apps.views.forms import FileDisplayForm
19.857143
51
0.71223
from mayan.apps.views.forms import FileDisplayForm class LicenseForm(FileDisplayForm): DIRECTORY = () FILENAME = 'LICENSE'
0
60
25
87e02e8e46132c97db5e7e96372e3d6b7ffa4c3f
21,615
py
Python
References/Original Docs/TrussCalc_v0.py
lorcan2440/SimpleTrussCalculator
3c063fbc5f1987e9a700e312b763b36d4ec22495
[ "MIT" ]
1
2021-07-29T14:34:08.000Z
2021-07-29T14:34:08.000Z
References/Original Docs/TrussCalc_v0.py
lorcan2440/SimpleTrussCalculator
3c063fbc5f1987e9a700e312b763b36d4ec22495
[ "MIT" ]
1
2021-07-30T17:34:42.000Z
2021-07-30T17:34:42.000Z
References/Original Docs/TrussCalc_v0.py
lorcan2440/SimpleTrussCalculator
3c063fbc5f1987e9a700e312b763b36d4ec22495
[ "MIT" ]
1
2022-03-13T11:01:34.000Z
2022-03-13T11:01:34.000Z
from matplotlib import pyplot as plt import math, sigfig, warnings # module "sigfig" requires "pip install sigfig" at command line import numpy as np # TRUSS INNER CLASSES END HERE # MAIN FUNCTIONS END HERE build_truss(815, True)
46.684665
152
0.556697
from matplotlib import pyplot as plt import math, sigfig, warnings # module "sigfig" requires "pip install sigfig" at command line import numpy as np def get_all_trusses(): return [truss for truss in Truss] class IterTruss(type): def __iter__(cls): return iter(cls._allTrusses) clas...
19,529
1,678
175
0e2883fc0a40eaacd3d346a142bc2ccbdbc6a50c
4,477
py
Python
src/dual_gazebo/src/control_key_drive.py
diddytpq/Dual-Motion-robot-gazebo
19d8098f9931ee7ded91f8242efdc176c418db8c
[ "MIT" ]
null
null
null
src/dual_gazebo/src/control_key_drive.py
diddytpq/Dual-Motion-robot-gazebo
19d8098f9931ee7ded91f8242efdc176c418db8c
[ "MIT" ]
null
null
null
src/dual_gazebo/src/control_key_drive.py
diddytpq/Dual-Motion-robot-gazebo
19d8098f9931ee7ded91f8242efdc176c418db8c
[ "MIT" ]
null
null
null
import rospy import numpy as np from std_msgs.msg import Float64 from gazebo_msgs.srv import * from geometry_msgs.msg import * import sys, select, os import roslib if os.name == 'nt': import msvcrt else: import tty, termios roslib.load_manifest('dual_gazebo') if __name__ == '__main__': try: ro...
22.725888
110
0.542104
import rospy import numpy as np from std_msgs.msg import Float64 from gazebo_msgs.srv import * from geometry_msgs.msg import * import sys, select, os import roslib if os.name == 'nt': import msvcrt else: import tty, termios roslib.load_manifest('dual_gazebo') def qua2eular(x,y,z,w): q_x = x q_y = y ...
2,630
0
138
316b321b9f7d046b9a1c73717ede0ee14f70b07e
3,151
py
Python
datalad/crawler/pipelines/tests/test_fcptable.py
yarikoptic/datalad
c0cd538de2ed9a30c0f58256c7afa6e18d325505
[ "MIT" ]
null
null
null
datalad/crawler/pipelines/tests/test_fcptable.py
yarikoptic/datalad
c0cd538de2ed9a30c0f58256c7afa6e18d325505
[ "MIT" ]
6
2015-11-20T21:41:13.000Z
2018-06-12T14:27:32.000Z
datalad/crawler/pipelines/tests/test_fcptable.py
yarikoptic/datalad
c0cd538de2ed9a30c0f58256c7afa6e18d325505
[ "MIT" ]
1
2017-03-28T14:44:16.000Z
2017-03-28T14:44:16.000Z
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
34.25
109
0.628689
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
1,844
0
68
2adfa5603510b5c0ce9f049510e9539047f88898
1,683
py
Python
KuldeepDwivedi_A2305218477/BFS/Water_jug.py
suraj0803/AI-LAB-WORK
c09776c104529678215d4f51a756ea0039a89df4
[ "Apache-2.0" ]
null
null
null
KuldeepDwivedi_A2305218477/BFS/Water_jug.py
suraj0803/AI-LAB-WORK
c09776c104529678215d4f51a756ea0039a89df4
[ "Apache-2.0" ]
null
null
null
KuldeepDwivedi_A2305218477/BFS/Water_jug.py
suraj0803/AI-LAB-WORK
c09776c104529678215d4f51a756ea0039a89df4
[ "Apache-2.0" ]
null
null
null
# Water Jug problem print("Solution for Water Jug problem!") x = int(input("Enter the capacity of jug1 : ")) y = int(input("Entert the capacity of jug2 : ")) target = int(input("Enter the target volume : ")) start = [0, 0] if target % gcd(x,y) == 0: print(bfs(start, target, x, y)) else: print("No so...
25.892308
84
0.512181
# Water Jug problem print("Solution for Water Jug problem!") x = int(input("Enter the capacity of jug1 : ")) y = int(input("Entert the capacity of jug2 : ")) target = int(input("Enter the target volume : ")) def bfs(start, target, x, y): path = [] front = [] front.append(start) visited = [] while(n...
1,281
0
50
63865fa932487f27230a6778c7a192a4701cb3dc
6,190
py
Python
ReadStereoCalibration.py
cxn304/Strain-gauges-recognition
1f9f64f8a0fa01892509835694ff88bc47736a7b
[ "Apache-2.0" ]
null
null
null
ReadStereoCalibration.py
cxn304/Strain-gauges-recognition
1f9f64f8a0fa01892509835694ff88bc47736a7b
[ "Apache-2.0" ]
null
null
null
ReadStereoCalibration.py
cxn304/Strain-gauges-recognition
1f9f64f8a0fa01892509835694ff88bc47736a7b
[ "Apache-2.0" ]
null
null
null
''' author: cxn version: 0.1.0 read camera calibration from mat ''' import numpy as np import cv2 from scipy.io import loadmat import matplotlib.pyplot as plt #双目相机参数 # 畸变校正和立体校正 def rectifyImage(image1, image2, map1x, map1y, map2x, map2y): """ cv2.remap重映射,就是把一幅图像中某位置的像素放置到另一个图片指定位置的过程 """ ...
32.578947
105
0.641034
''' author: cxn version: 0.1.0 read camera calibration from mat ''' import numpy as np import cv2 from scipy.io import loadmat import matplotlib.pyplot as plt #双目相机参数 class stereoCameral(object): def __init__(self): stereoParameters = loadmat("./internal_reference/stereoParameters.mat") self.cam...
6,169
7
137
9789fa0d9128f43bf8dfdc8bf19f5e86479b11c4
2,110
py
Python
lib/model/model.py
smallstrong0/easy_python
c6794bf290731beb9b3cab94f815880befb37d9b
[ "MIT" ]
2
2020-09-16T09:32:09.000Z
2021-02-10T12:09:40.000Z
lib/model/model.py
smallstrong0/easy_python
c6794bf290731beb9b3cab94f815880befb37d9b
[ "MIT" ]
null
null
null
lib/model/model.py
smallstrong0/easy_python
c6794bf290731beb9b3cab94f815880befb37d9b
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # Put your models here from sqlalchemy import Column, BigInteger, Integer, String, SmallInteger, Float, Boolean, DECIMAL, Text, DateTime, Date, \ Index, UniqueConstraint from sqlalchemy.dialects.mysql import MEDIUMTEXT, LONGTEXT, BIGINT, INTEGER, SMALLINT, TINYINT, T...
37.678571
122
0.735071
#! /usr/bin/env python # -*- coding: utf-8 -*- # Put your models here from sqlalchemy import Column, BigInteger, Integer, String, SmallInteger, Float, Boolean, DECIMAL, Text, DateTime, Date, \ Index, UniqueConstraint from sqlalchemy.dialects.mysql import MEDIUMTEXT, LONGTEXT, BIGINT, INTEGER, SMALLINT, TINYINT, T...
0
1,177
46
7f00b4d7b1812863814e19a971adecf24942fc84
3,949
py
Python
algorithms/Search.py
zhaoxinlu/leetcode-algorithms
f5e1c94c99628e7fb04ba158f686a55a8093e933
[ "MIT" ]
null
null
null
algorithms/Search.py
zhaoxinlu/leetcode-algorithms
f5e1c94c99628e7fb04ba158f686a55a8093e933
[ "MIT" ]
null
null
null
algorithms/Search.py
zhaoxinlu/leetcode-algorithms
f5e1c94c99628e7fb04ba158f686a55a8093e933
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Author: Zhao Xinlu School: BUPT Date: 2018-01-15 Function: Some different searching algorithms and its performance """ def Simple_search(lists, key): ''' Simple_search: 数据不排序的线性查找,遍历数据元素; 性能: 时间复杂度:O(n) :param lists: search list :param key: the value of key :...
26.326667
87
0.545455
# -*- coding: utf-8 -*- """ Author: Zhao Xinlu School: BUPT Date: 2018-01-15 Function: Some different searching algorithms and its performance """ def Simple_search(lists, key): ''' Simple_search: 数据不排序的线性查找,遍历数据元素; 性能: 时间复杂度:O(n) :param lists: search list :param key: the value of key :...
0
0
0
d04e9753e38d729231b2e66b82bf461bc97df527
3,220
py
Python
goldman/resources/oauth_ropc.py
sassoo/goldman
b72540c9ad06b5c68aadb1b4fa8cb0b716260bf2
[ "MIT" ]
2
2016-07-26T13:47:51.000Z
2017-02-13T12:08:38.000Z
goldman/resources/oauth_ropc.py
sassoo/goldman
b72540c9ad06b5c68aadb1b4fa8cb0b716260bf2
[ "MIT" ]
null
null
null
goldman/resources/oauth_ropc.py
sassoo/goldman
b72540c9ad06b5c68aadb1b4fa8cb0b716260bf2
[ "MIT" ]
null
null
null
""" resources.oauth_ropc ~~~~~~~~~~~~~~~~~~~~ OAuth2 Resource Owner Password Credentials Grant resource object with responders. This resource should be used to accept access_token requests according to RFC 6749 section 4.3: tools.ietf.org/html/rfc6749#section-4.3 The resource req...
32.857143
76
0.587888
""" resources.oauth_ropc ~~~~~~~~~~~~~~~~~~~~ OAuth2 Resource Owner Password Credentials Grant resource object with responders. This resource should be used to accept access_token requests according to RFC 6749 section 4.3: tools.ietf.org/html/rfc6749#section-4.3 The resource req...
89
0
27
6e976b5b835b38818090ff9810971809f857fe0e
7,534
py
Python
newapp.py
Andriusjok/VUSAMIFChatBot
9444bcf4f0f2137757925f8e07b8cc3ba442a162
[ "BSD-2-Clause" ]
null
null
null
newapp.py
Andriusjok/VUSAMIFChatBot
9444bcf4f0f2137757925f8e07b8cc3ba442a162
[ "BSD-2-Clause" ]
null
null
null
newapp.py
Andriusjok/VUSAMIFChatBot
9444bcf4f0f2137757925f8e07b8cc3ba442a162
[ "BSD-2-Clause" ]
null
null
null
import os from flask import Flask, request from fbmessenger import BaseMessenger from fbmessenger import quick_replies from fbmessenger.elements import Text from fbmessenger.thread_settings import GreetingText, GetStartedButton, MessengerProfile from fbmessenger import elements from fbmessenger import templates ACCESS...
41.395604
168
0.591585
import os from flask import Flask, request from fbmessenger import BaseMessenger from fbmessenger import quick_replies from fbmessenger.elements import Text from fbmessenger.thread_settings import GreetingText, GetStartedButton, MessengerProfile from fbmessenger import elements from fbmessenger import templates ACCESS...
6,737
10
260
788f66b9fb4748228011a407e6e029dba64a944b
14,173
py
Python
fixture/contact.py
Droriel/python_training
e0fbbf3df4289e5af606d9c752e99cab82c653a6
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
Droriel/python_training
e0fbbf3df4289e5af606d9c752e99cab82c653a6
[ "Apache-2.0" ]
null
null
null
fixture/contact.py
Droriel/python_training
e0fbbf3df4289e5af606d9c752e99cab82c653a6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from model.contact import ContactBaseData import re
46.621711
146
0.627672
# -*- coding: utf-8 -*- from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from model.contact import ContactBaseData import re class ContactHelper: def __init__(self, app): self.app = app # additional methods -adding contact d...
12,967
990
23
092f1761576ffa817c9655201b6f11db45a1a582
2,041
py
Python
vision/library/tools/engines/text_recognition_tesseract.py
lcmonteiro/space-vision-py
38022c99218de0e1e93ec0bae8d143fa0c787f1d
[ "MIT" ]
1
2019-12-14T20:00:17.000Z
2019-12-14T20:00:17.000Z
vision/library/tools/engines/text_recognition_tesseract.py
lcmonteiro/space-vision-py
38022c99218de0e1e93ec0bae8d143fa0c787f1d
[ "MIT" ]
null
null
null
vision/library/tools/engines/text_recognition_tesseract.py
lcmonteiro/space-vision-py
38022c99218de0e1e93ec0bae8d143fa0c787f1d
[ "MIT" ]
null
null
null
# ################################################################################################ # ------------------------------------------------------------------------------------------------ # File: text_recognition_tesseract_engine.py # Author: Luis Monteiro # # Created on nov 17, 2019, 22:00 PM # -----------...
48.595238
98
0.168055
# ################################################################################################ # ------------------------------------------------------------------------------------------------ # File: text_recognition_tesseract_engine.py # Author: Luis Monteiro # # Created on nov 17, 2019, 22:00 PM # -----------...
189
10
74
5111b400d490cda967a1cc070c3b3f72a6cd1341
685
py
Python
music_manuel/osc_server.py
HelsinkiGroup5/Hackathon
eb1c7c5f142fc3dbe83a41a558a1ab8071341d06
[ "MIT" ]
null
null
null
music_manuel/osc_server.py
HelsinkiGroup5/Hackathon
eb1c7c5f142fc3dbe83a41a558a1ab8071341d06
[ "MIT" ]
null
null
null
music_manuel/osc_server.py
HelsinkiGroup5/Hackathon
eb1c7c5f142fc3dbe83a41a558a1ab8071341d06
[ "MIT" ]
null
null
null
import OSC, time #import rtmidi_python as rtmidi #midi_out = rtmidi.MidiOut() #midi_out.open_port(0) if __name__ == "__main__": s = OSC.OSCServer(('10.100.7.151', 57120)) # listen on localhost, port 57120 s.addMsgHandler('/startup', handler) # call handler() for OSC messages received with the /startup a...
29.782609
113
0.655474
import OSC, time #import rtmidi_python as rtmidi #midi_out = rtmidi.MidiOut() #midi_out.open_port(0) def handler(addr, tags, data, client_address): txt = "OSCMessage '%s' from %s: " % (addr, client_address) txt += str(data) print(txt) #num = data[0] #print num #midi_out.send_message([0x90, 192...
313
0
23
f1a11d584fb476bc84cfd89ab66c348ee5ba13cc
24,531
py
Python
store/adminshop/views/compras.py
vallemrv/my_store_test
2da624fd02c5f1784464f15b751b488f3dd2bae6
[ "Apache-2.0" ]
null
null
null
store/adminshop/views/compras.py
vallemrv/my_store_test
2da624fd02c5f1784464f15b751b488f3dd2bae6
[ "Apache-2.0" ]
null
null
null
store/adminshop/views/compras.py
vallemrv/my_store_test
2da624fd02c5f1784464f15b751b488f3dd2bae6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: Manuel Rodriguez <valle> # @Date: 28-Aug-2017 # @Email: valle.mrv@gmail.com # @Filename: views.py # @Last modified by: valle # @Last modified time: 02-Mar-2018 # @License: Apache license vesion 2.0 from django.forms.models import model_to_dict from django.db.models import Q fro...
40.148936
107
0.61832
# -*- coding: utf-8 -*- # @Author: Manuel Rodriguez <valle> # @Date: 28-Aug-2017 # @Email: valle.mrv@gmail.com # @Filename: views.py # @Last modified by: valle # @Last modified time: 02-Mar-2018 # @License: Apache license vesion 2.0 from django.forms.models import model_to_dict from django.db.models import Q fro...
21,548
0
645
2a17da60768a072018629688624a0b3345cf9f9d
16,285
py
Python
tests/unit/test/plan/grammar/test_assertions.py
arareko/pysoa
a90e428558500cf692f7f6e33fd358dd2779c328
[ "Apache-2.0" ]
91
2017-05-08T22:41:33.000Z
2022-02-09T11:37:07.000Z
tests/unit/test/plan/grammar/test_assertions.py
arareko/pysoa
a90e428558500cf692f7f6e33fd358dd2779c328
[ "Apache-2.0" ]
63
2017-06-14T20:08:49.000Z
2021-06-16T23:08:25.000Z
tests/unit/test/plan/grammar/test_assertions.py
arareko/pysoa
a90e428558500cf692f7f6e33fd358dd2779c328
[ "Apache-2.0" ]
26
2017-10-13T23:23:13.000Z
2022-01-11T16:58:17.000Z
from __future__ import ( absolute_import, unicode_literals, ) import unittest from pysoa.common.errors import Error from pysoa.test.plan.grammar import assertions from pysoa.test.plan.grammar.data_types import AnyValue # noinspection PyTypeChecker
41.649616
120
0.55413
from __future__ import ( absolute_import, unicode_literals, ) import unittest from pysoa.common.errors import Error from pysoa.test.plan.grammar import assertions from pysoa.test.plan.grammar.data_types import AnyValue # noinspection PyTypeChecker class TestCustomAssertions(unittest.TestCase): def test_...
14,953
25
1,047
0ba1914cfcee88af2ca20a9d79b917b79305d0c5
5,248
py
Python
lbry/tests/integration/test_wallet_server_sessions.py
Nykseli/lbry-sdk
07afc0aa0a1e6c0ef6aa284fb47513af940440c1
[ "MIT" ]
null
null
null
lbry/tests/integration/test_wallet_server_sessions.py
Nykseli/lbry-sdk
07afc0aa0a1e6c0ef6aa284fb47513af940440c1
[ "MIT" ]
4
2020-10-27T21:53:05.000Z
2022-02-11T03:10:54.000Z
lbry/tests/integration/test_wallet_server_sessions.py
braveheart12/lbry-sdk
dc709b468f9dce60d206161785def5c7ace2b763
[ "MIT" ]
null
null
null
import asyncio import socket import time import logging from unittest.mock import Mock from torba.testcase import IntegrationTestCase, Conductor import lbry.wallet from lbry.schema.claim import Claim from lbry.wallet.transaction import Transaction, Output from lbry.wallet.dewies import dewies_to_lbc as d2l, lbc_to_dewi...
39.458647
116
0.695122
import asyncio import socket import time import logging from unittest.mock import Mock from torba.testcase import IntegrationTestCase, Conductor import lbry.wallet from lbry.schema.claim import Claim from lbry.wallet.transaction import Transaction, Output from lbry.wallet.dewies import dewies_to_lbc as d2l, lbc_to_dewi...
4,254
0
76
e76f76edb55be5c2cbb5a4d75f8d67fbe7d90f8d
1,924
py
Python
northwind.py
valogonor/DS-Unit-3-Sprint-2-SQL-and-Databases
07c83195c4933d0ce02f431692fe970ef154cacf
[ "MIT" ]
null
null
null
northwind.py
valogonor/DS-Unit-3-Sprint-2-SQL-and-Databases
07c83195c4933d0ce02f431692fe970ef154cacf
[ "MIT" ]
null
null
null
northwind.py
valogonor/DS-Unit-3-Sprint-2-SQL-and-Databases
07c83195c4933d0ce02f431692fe970ef154cacf
[ "MIT" ]
null
null
null
import sqlite3 conn = sqlite3.connect('northwind_small.sqlite3') curs = conn.cursor() query = '''SELECT ProductName FROM Product ORDER BY UnitPrice DESC LIMIT 10''' curs.execute(query) results = curs.fetchall() print('Ten most expensive items (per unit price):') for result in results: print(result[0]) query = '''S...
30.539683
94
0.730249
import sqlite3 conn = sqlite3.connect('northwind_small.sqlite3') curs = conn.cursor() query = '''SELECT ProductName FROM Product ORDER BY UnitPrice DESC LIMIT 10''' curs.execute(query) results = curs.fetchall() print('Ten most expensive items (per unit price):') for result in results: print(result[0]) query = '''S...
0
0
0
e6e666e5f27d346d3402248f6886267f86c56baa
10,930
py
Python
skfda/representation/basis/_basis.py
alejandro-ariza/scikit-fda
a3626eeaac81aac14660233ff7554ae9a1550434
[ "BSD-3-Clause" ]
null
null
null
skfda/representation/basis/_basis.py
alejandro-ariza/scikit-fda
a3626eeaac81aac14660233ff7554ae9a1550434
[ "BSD-3-Clause" ]
null
null
null
skfda/representation/basis/_basis.py
alejandro-ariza/scikit-fda
a3626eeaac81aac14660233ff7554ae9a1550434
[ "BSD-3-Clause" ]
null
null
null
"""Module for functional data manipulation in a basis system. Defines functional data object in a basis function system representation and the corresponding basis classes. """ import copy import warnings from abc import ABC, abstractmethod from typing import Tuple import numpy as np from ..._utils import _domain_ra...
30.788732
79
0.602928
"""Module for functional data manipulation in a basis system. Defines functional data object in a basis function system representation and the corresponding basis classes. """ import copy import warnings from abc import ABC, abstractmethod from typing import Tuple import numpy as np from ..._utils import _domain_ra...
1,289
0
343
833626e74d4e5013fbedd077febd8ce8f93d00fe
2,613
py
Python
02-lm-tensorflow/loglin-lm.py
tinySean/nn4nlp-tensorflow
17d64427ad3cf276f2d43eac706d14a6145cc3e6
[ "Apache-2.0" ]
2
2019-03-04T10:53:23.000Z
2020-09-25T02:31:44.000Z
02-lm-tensorflow/loglin-lm.py
tinySean/nn4nlp-tensorflow
17d64427ad3cf276f2d43eac706d14a6145cc3e6
[ "Apache-2.0" ]
null
null
null
02-lm-tensorflow/loglin-lm.py
tinySean/nn4nlp-tensorflow
17d64427ad3cf276f2d43eac706d14a6145cc3e6
[ "Apache-2.0" ]
1
2020-09-22T10:33:02.000Z
2020-09-22T10:33:02.000Z
from collections import defaultdict import math import time import random import tensorflow as tf import numpy as np # The length of the n-gram N = 2 # Functions to read in the corpus # NOTE: We are using data from the Penn Treebank, which is already converted # into an easy-to-use format with "<unk>" symbols. ...
35.310811
115
0.654038
from collections import defaultdict import math import time import random import tensorflow as tf import numpy as np # The length of the n-gram N = 2 # Functions to read in the corpus # NOTE: We are using data from the Penn Treebank, which is already converted # into an easy-to-use format with "<unk>" symbols. ...
112
0
22
d92e03bffe94661a767cf2e5a8765b439f90506e
340
py
Python
hgapp/powers/migrations/0015_remove_base_power_example_powers.py
shadytradesman/The-Contract-Website
d8b353064f91c53ebab951dec784a0a36caba260
[ "Apache-2.0" ]
6
2020-10-03T12:15:05.000Z
2021-10-15T04:43:36.000Z
hgapp/powers/migrations/0015_remove_base_power_example_powers.py
shadytradesman/The-Contract-Website
d8b353064f91c53ebab951dec784a0a36caba260
[ "Apache-2.0" ]
99
2020-06-04T17:43:56.000Z
2022-03-12T01:07:20.000Z
hgapp/powers/migrations/0015_remove_base_power_example_powers.py
shadytradesman/The-Contract-Website
d8b353064f91c53ebab951dec784a0a36caba260
[ "Apache-2.0" ]
9
2020-06-06T16:39:09.000Z
2020-10-02T16:24:17.000Z
# Generated by Django 2.2.12 on 2020-08-02 14:03 from django.db import migrations
18.888889
48
0.605882
# Generated by Django 2.2.12 on 2020-08-02 14:03 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('powers', '0014_auto_20200731_1402'), ] operations = [ migrations.RemoveField( model_name='base_power', name='example_powers...
0
233
23
7465a346a19ecfbc1286a25f61bbc8e6e0865c9f
201
py
Python
tree.py
juhyun0/python_turtle2
59943c03a07a71aa33ab7124bca56f6b880b6883
[ "Unlicense" ]
null
null
null
tree.py
juhyun0/python_turtle2
59943c03a07a71aa33ab7124bca56f6b880b6883
[ "Unlicense" ]
null
null
null
tree.py
juhyun0/python_turtle2
59943c03a07a71aa33ab7124bca56f6b880b6883
[ "Unlicense" ]
null
null
null
t.left(90) t.color("green") t.speed(1) tree(90)
11.823529
20
0.641791
def tree(length): if length>5: t.forward(length) t.right(20) tree(length-15) t.left(40) tree(length-15) t.right(20) t.backward(length) t.left(90) t.color("green") t.speed(1) tree(90)
128
0
22
5f574b8c03d61700a6552dfc9ad0569e5c66bcbe
3,648
py
Python
model/genetic_model.py
abduskhazi/PL-Binding-Affinity-Prediction-using-ML
fe7172570fa378480455b4dcd214d0b0c4e94ff0
[ "MIT" ]
1
2021-12-07T09:00:01.000Z
2021-12-07T09:00:01.000Z
model/genetic_model.py
abduskhazi/PL-Binding-Affinity-Prediction-using-ML
fe7172570fa378480455b4dcd214d0b0c4e94ff0
[ "MIT" ]
null
null
null
model/genetic_model.py
abduskhazi/PL-Binding-Affinity-Prediction-using-ML
fe7172570fa378480455b4dcd214d0b0c4e94ff0
[ "MIT" ]
null
null
null
# genetic algorithm search of the one max optimization problem from numpy.random import randint from numpy.random import rand import numpy as np import json # objective function # tournament selection # crossover two parents to create two children # mutation operator # genetic algorithm if False: # define t...
34.415094
96
0.590186
# genetic algorithm search of the one max optimization problem from numpy.random import randint from numpy.random import rand import numpy as np import json # objective function def onemax(x): return -sum(x) def sorted_population(pop, scores): indices = scores.argsort() sorted_pop = [] for i in indice...
2,789
0
133
96164478cbee8505379a42f6487489b2e0b29439
7,588
py
Python
dockerizing-django/web/joblistings/forms.py
MattYu/ConcordiaAce
35eff7614652eb548e532dcf00e3a7296855285c
[ "MIT" ]
1
2021-06-14T06:54:16.000Z
2021-06-14T06:54:16.000Z
joblistings/forms.py
MattYu/ConcordiaAce
35eff7614652eb548e532dcf00e3a7296855285c
[ "MIT" ]
34
2020-04-05T01:14:31.000Z
2022-03-12T00:23:02.000Z
joblistings/forms.py
MattYu/ConcordiaAce
35eff7614652eb548e532dcf00e3a7296855285c
[ "MIT" ]
null
null
null
from django import forms from joblistings.models import Job from accounts.models import Employer from ace.constants import CATEGORY_CHOICES, MAX_LENGTH_TITLE, MAX_LENGTH_DESCRIPTION, MAX_LENGTH_RESPONSABILITIES, MAX_LENGTH_REQUIREMENTS, MAX_LENGTH_STANDARDFIELDS, LOCATION_CHOICES from tinymce.widgets import TinyMCE fro...
38.714286
183
0.649974
from django import forms from joblistings.models import Job from accounts.models import Employer from ace.constants import CATEGORY_CHOICES, MAX_LENGTH_TITLE, MAX_LENGTH_DESCRIPTION, MAX_LENGTH_RESPONSABILITIES, MAX_LENGTH_REQUIREMENTS, MAX_LENGTH_STANDARDFIELDS, LOCATION_CHOICES from tinymce.widgets import TinyMCE fro...
4,111
2,935
50
766d0dea3bfd78b0a9fc1313787741bb68697e98
323
py
Python
cogdl/wrappers/data_wrapper/node_classification/__init__.py
li-ziang/cogdl
60022d3334e3abae2d2a505e6e049a26acf10f39
[ "MIT" ]
6
2020-07-09T02:48:41.000Z
2021-06-16T09:04:14.000Z
cogdl/wrappers/data_wrapper/node_classification/__init__.py
li-ziang/cogdl
60022d3334e3abae2d2a505e6e049a26acf10f39
[ "MIT" ]
null
null
null
cogdl/wrappers/data_wrapper/node_classification/__init__.py
li-ziang/cogdl
60022d3334e3abae2d2a505e6e049a26acf10f39
[ "MIT" ]
1
2020-05-19T11:45:45.000Z
2020-05-19T11:45:45.000Z
from .cluster_dw import ClusterWrapper from .graphsage_dw import GraphSAGEDataWrapper from .m3s_dw import M3SDataWrapper from .network_embedding_dw import NetworkEmbeddingDataWrapper from .node_classification_dw import FullBatchNodeClfDataWrapper from .pprgo_dw import PPRGoDataWrapper from .sagn_dw import SAGNDataWrapp...
40.375
63
0.891641
from .cluster_dw import ClusterWrapper from .graphsage_dw import GraphSAGEDataWrapper from .m3s_dw import M3SDataWrapper from .network_embedding_dw import NetworkEmbeddingDataWrapper from .node_classification_dw import FullBatchNodeClfDataWrapper from .pprgo_dw import PPRGoDataWrapper from .sagn_dw import SAGNDataWrapp...
0
0
0
dc39a84fe404c1eef75b6fc371c87b856fc55a84
500
py
Python
run.py
nefeli/trafficgen
81b6cb01d8e9d0abfcd83df641210035e265f13f
[ "BSD-3-Clause" ]
10
2017-04-26T07:01:48.000Z
2020-07-25T00:29:45.000Z
run.py
nefeli/trafficgen
81b6cb01d8e9d0abfcd83df641210035e265f13f
[ "BSD-3-Clause" ]
12
2017-03-21T17:58:16.000Z
2017-10-16T18:01:37.000Z
run.py
nefeli/trafficgen
81b6cb01d8e9d0abfcd83df641210035e265f13f
[ "BSD-3-Clause" ]
5
2017-03-09T19:59:26.000Z
2018-04-02T19:49:57.000Z
#!/usr/bin/env python3 import io import sys import generator from generator.cmdline import * if __name__ == '__main__': if len(sys.argv) == 1: run_cli() else: cmds = [] line_buf = [] for arg in sys.argv[1:]: if arg == '--': cmds.append(' '.join(line...
20.833333
47
0.498
#!/usr/bin/env python3 import io import sys import generator from generator.cmdline import * if __name__ == '__main__': if len(sys.argv) == 1: run_cli() else: cmds = [] line_buf = [] for arg in sys.argv[1:]: if arg == '--': cmds.append(' '.join(line...
0
0
0
2d0afb7f18f7dfcc8cf1e3ca1087c009e3e728f5
974
py
Python
scripts/genotype_from_fpaths.py
JIC-Image-Analysis/fishtools
9d7cfa695711ec4b40986be65e11eea7ad1b0b5d
[ "MIT" ]
null
null
null
scripts/genotype_from_fpaths.py
JIC-Image-Analysis/fishtools
9d7cfa695711ec4b40986be65e11eea7ad1b0b5d
[ "MIT" ]
null
null
null
scripts/genotype_from_fpaths.py
JIC-Image-Analysis/fishtools
9d7cfa695711ec4b40986be65e11eea7ad1b0b5d
[ "MIT" ]
1
2022-03-10T13:08:21.000Z
2022-03-10T13:08:21.000Z
import os import pathlib import click import parse from fishtools.config import Config @click.command() @click.argument('config_fpath') if __name__ == "__main__": main()
20.723404
60
0.666324
import os import pathlib import click import parse from fishtools.config import Config def is_image(filename, image_exts=['.czi']): _, ext = os.path.splitext(filename) return ext in image_exts @click.command() @click.argument('config_fpath') def main(config_fpath): config = Config(config_fpath) ...
746
0
45
052f73c51d8e906ef7280490bdcc2bd79bb64740
4,643
py
Python
list_id_bimap.py
martincochran/score-minion
58197798a0a3a4fbcd54ffa0a2fab2e865985bfd
[ "Apache-2.0" ]
null
null
null
list_id_bimap.py
martincochran/score-minion
58197798a0a3a4fbcd54ffa0a2fab2e865985bfd
[ "Apache-2.0" ]
3
2015-02-15T18:31:10.000Z
2015-02-22T19:56:05.000Z
list_id_bimap.py
martincochran/score-minion
58197798a0a3a4fbcd54ffa0a2fab2e865985bfd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2015 Martin Cochran # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
31.80137
92
0.713117
#!/usr/bin/env python # # Copyright 2015 Martin Cochran # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
0
0
0
468ad4ffeae4e5171b0014bec49676ed9cc8da05
2,988
py
Python
loralos/wms_image.py
SimonLarsen/loralos
198a6b94a984f12e7a069826e3f977db9de34d00
[ "MIT" ]
null
null
null
loralos/wms_image.py
SimonLarsen/loralos
198a6b94a984f12e7a069826e3f977db9de34d00
[ "MIT" ]
null
null
null
loralos/wms_image.py
SimonLarsen/loralos
198a6b94a984f12e7a069826e3f977db9de34d00
[ "MIT" ]
null
null
null
from owslib.wms import WebMapService import pyproj from PIL import Image from typing import Tuple, List, Dict, Any import os.path from pathlib import Path FORMAT_ENDINGS = {"image/jpeg": "jpg"}
30.489796
78
0.522758
from owslib.wms import WebMapService import pyproj from PIL import Image from typing import Tuple, List, Dict, Any import os.path from pathlib import Path FORMAT_ENDINGS = {"image/jpeg": "jpg"} class WMSImage: def __init__( self, url: str, layer: str, cache_dir: str, styl...
2,694
-6
103
1acaf21ff5c98fb66692384b82ca684a87d4e348
5,004
py
Python
mail/gmailapi.py
prabin-acharya/mail-Gmail
b39bfbd48fedcd3e2a101cd0d2d4c3302faa233d
[ "MIT" ]
1
2021-08-08T04:02:32.000Z
2021-08-08T04:02:32.000Z
mail/gmailapi.py
prabin-acharya/mail-Gmail
b39bfbd48fedcd3e2a101cd0d2d4c3302faa233d
[ "MIT" ]
null
null
null
mail/gmailapi.py
prabin-acharya/mail-Gmail
b39bfbd48fedcd3e2a101cd0d2d4c3302faa233d
[ "MIT" ]
null
null
null
from __future__ import print_function import os.path from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from google.oauth2.credentials import Credentials import time from email.mime.text import MIMEText from .models imp...
31.872611
118
0.607314
from __future__ import print_function import os.path from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from google.oauth2.credentials import Credentials import time from email.mime.text import MIMEText from .models imp...
3,540
0
138
3c5b5a01aea276ed55213cc1efedac91d26ae1c8
1,580
py
Python
diagrams/ibm/blockchain.py
houmam/diagrams
eaf3e98304014e847c347bfae19bbfb3fe91abb2
[ "MIT" ]
17,037
2020-02-03T01:30:30.000Z
2022-03-31T18:09:15.000Z
diagrams/ibm/blockchain.py
loftwah/diagrams
e45804b48d5360fe5bae1b785db6527db5a57d16
[ "MIT" ]
529
2020-02-03T10:43:41.000Z
2022-03-31T17:33:08.000Z
diagrams/ibm/blockchain.py
loftwah/diagrams
e45804b48d5360fe5bae1b785db6527db5a57d16
[ "MIT" ]
1,068
2020-02-05T11:54:29.000Z
2022-03-30T23:28:55.000Z
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _IBM # Aliases
17.173913
68
0.728481
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _IBM class _Blockchain(_IBM): _type = "blockchain" _icon_dir = "resources/ibm/blockchain" class BlockchainDeveloper(_Blockchain): _icon = "blockchain-developer.png" class Blockchain(_Blockchain): _icon = "blockchai...
0
975
483
f353ecb9975a775e9ee105aa31a7468ed23f0c58
1,634
py
Python
sp/test_remap.py
crepuscularlight/SemesterProject
acfb219ca315d912b76bb581b932aaf48090fa94
[ "MIT" ]
null
null
null
sp/test_remap.py
crepuscularlight/SemesterProject
acfb219ca315d912b76bb581b932aaf48090fa94
[ "MIT" ]
null
null
null
sp/test_remap.py
crepuscularlight/SemesterProject
acfb219ca315d912b76bb581b932aaf48090fa94
[ "MIT" ]
null
null
null
_base_='../swin/mask_rcnn_swin-t-p4-w7_fpn_1x_coco.py' dataset_type='CocoDataset' prefix='../coco-annotator/datasets/test/' classes=('plasticbottle','alu can','box') # classes=('',) model = dict( roi_head=dict( bbox_head=dict(num_classes=3), mask_head=dict(num_classes=3))) # train_pipeline = [ # ...
29.178571
79
0.612607
_base_='../swin/mask_rcnn_swin-t-p4-w7_fpn_1x_coco.py' dataset_type='CocoDataset' prefix='../coco-annotator/datasets/test/' classes=('plasticbottle','alu can','box') # classes=('',) model = dict( roi_head=dict( bbox_head=dict(num_classes=3), mask_head=dict(num_classes=3))) # train_pipeline = [ # ...
0
0
0
cd903e7ade80030c34ceee4d669a0b45dddb9daa
5,234
py
Python
flickipedia/mysqlio.py
rfaulkner/Flickipedia
1b53f30be4027901748a09c411d568c7148f4e4b
[ "BSD-2-Clause" ]
1
2016-03-11T09:40:19.000Z
2016-03-11T09:40:19.000Z
flickipedia/mysqlio.py
rfaulkner/Flickipedia
1b53f30be4027901748a09c411d568c7148f4e4b
[ "BSD-2-Clause" ]
1
2015-02-27T02:23:19.000Z
2015-02-27T02:23:19.000Z
flickipedia/mysqlio.py
rfaulkner/Flickipedia
1b53f30be4027901748a09c411d568c7148f4e4b
[ "BSD-2-Clause" ]
null
null
null
""" Handle MySQL I/O via sqlalchemy engine and ORM """ from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from flickipedia.config import schema from flickipedia.config import log, settings class DataIOMySQL(object): """ Class implementing data IO for MySQL. Utilizes sqlalchemy [1]. ...
28.601093
88
0.526557
""" Handle MySQL I/O via sqlalchemy engine and ORM """ from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from flickipedia.config import schema from flickipedia.config import log, settings class DataIOMySQL(object): """ Class implementing data IO for MySQL. Utilizes sqlalchemy [1]. ...
326
0
53
4af99f0e08de844feaa37c0def95f861de377265
1,158
py
Python
pepdb/tasks/migrations/0025_auto_20171022_0208.py
dchaplinsky/pep.org.ua
8633a65fb657d7f04dbdb12eb8ae705fa6be67e3
[ "MIT" ]
7
2015-12-21T03:52:46.000Z
2020-07-24T19:17:23.000Z
pepdb/tasks/migrations/0025_auto_20171022_0208.py
dchaplinsky/pep.org.ua
8633a65fb657d7f04dbdb12eb8ae705fa6be67e3
[ "MIT" ]
12
2016-03-05T18:11:05.000Z
2021-06-17T20:20:03.000Z
pepdb/tasks/migrations/0025_auto_20171022_0208.py
dchaplinsky/pep.org.ua
8633a65fb657d7f04dbdb12eb8ae705fa6be67e3
[ "MIT" ]
4
2016-07-17T20:19:38.000Z
2021-03-23T12:47:20.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-21 23:08 from __future__ import unicode_literals from django.db import migrations
27.571429
118
0.632988
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-21 23:08 from __future__ import unicode_literals from django.db import migrations def count_connections(p): return p.person2company_set.count() + p.from_persons.count() + p.person2country_set.count() + p.to_persons.count() def delete_stuck_orphans...
772
167
69
ce94a6e9468ca1ec3c62b98a42a762f04ebc1840
182
py
Python
tests/test_patient.py
genghisken/python-intermediate-inflammation
dc16cfb5824a713e8881dba1116f607793dd5f4c
[ "MIT" ]
null
null
null
tests/test_patient.py
genghisken/python-intermediate-inflammation
dc16cfb5824a713e8881dba1116f607793dd5f4c
[ "MIT" ]
20
2021-12-10T10:36:32.000Z
2021-12-10T12:46:34.000Z
code/poetry_project/tests/test_patient.py
SABS-R3/software-engineering-day4
d73cc72786fceb236cd1ec33e900e482fbad08d4
[ "CC-BY-4.0" ]
1
2021-12-10T11:54:57.000Z
2021-12-10T11:54:57.000Z
"""Tests for the Patient model."""
16.545455
43
0.659341
"""Tests for the Patient model.""" def test_create_patient(): from inflammation.models import Patient name = 'Alice' p = Patient(name=name) assert p.name == name
123
0
23
270ceac1e816bd1486bca6f8ee6231afb3d168fa
6,299
py
Python
PT2022_0412_1716_simpler_keys.py
O8pen/PhraseTranslate
62e657d1e58ab36df27f181f51410840526e939f
[ "Apache-2.0" ]
null
null
null
PT2022_0412_1716_simpler_keys.py
O8pen/PhraseTranslate
62e657d1e58ab36df27f181f51410840526e939f
[ "Apache-2.0" ]
null
null
null
PT2022_0412_1716_simpler_keys.py
O8pen/PhraseTranslate
62e657d1e58ab36df27f181f51410840526e939f
[ "Apache-2.0" ]
null
null
null
# Python 3.7.9 # pip install clipboard # pip install pywin32 # pip install pyautogui # pip install pynput # Google chrome Keyboard Shortcuts for Google Translate https://chrome.google.com/webstore/detail/keyboard-shortcuts-for-go/akjhnbnjanndggbcegmdggfjjclohjpo # alt+j listen google translate # Google chrome Dark Re...
27.627193
156
0.589459
# Python 3.7.9 # pip install clipboard # pip install pywin32 # pip install pyautogui # pip install pynput # Google chrome Keyboard Shortcuts for Google Translate https://chrome.google.com/webstore/detail/keyboard-shortcuts-for-go/akjhnbnjanndggbcegmdggfjjclohjpo # alt+j listen google translate # Google chrome Dark Re...
4,890
0
161
77826738beb692c3294e0414b44a66d2c7706884
1,019
py
Python
Python/SwapNodesInPairs.py
TonnyL/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
205
2017-11-16T08:38:46.000Z
2022-03-06T05:50:03.000Z
Python/SwapNodesInPairs.py
santosh241/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
3
2018-04-10T10:17:52.000Z
2020-12-11T08:00:09.000Z
Python/SwapNodesInPairs.py
santosh241/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
28
2018-04-10T06:42:42.000Z
2021-09-14T14:15:39.000Z
# -*- coding: UTF-8 -*- # # Given a linked list, swap every two adjacent nodes and return its head. # # For example, # Given 1->2->3->4, you should return the list as 2->1->4->3. # # Your algorithm should use only constant space. You may not modify the values in the list, only nodes itself can be changed. # # Python, P...
24.261905
125
0.56526
# -*- coding: UTF-8 -*- # # Given a linked list, swap every two adjacent nodes and return its head. # # For example, # Given 1->2->3->4, you should return the list as 2->1->4->3. # # Your algorithm should use only constant space. You may not modify the values in the list, only nodes itself can be changed. # # Python, P...
115
462
99
07b3c976ac05f24a31d7345afae0afd0ab42d98a
1,429
py
Python
tests/test_examples/test_brml/test_chapter_03.py
vahndi/probability
6ddf88e6f3d947c96b879e426030f60eb5cb2d59
[ "MIT" ]
2
2020-02-21T00:47:03.000Z
2020-09-22T19:00:48.000Z
tests/test_examples/test_brml/test_chapter_03.py
vahndi/probability
6ddf88e6f3d947c96b879e426030f60eb5cb2d59
[ "MIT" ]
52
2020-01-16T16:05:08.000Z
2022-02-24T15:10:10.000Z
tests/test_examples/test_brml/test_chapter_03.py
vahndi/probability
6ddf88e6f3d947c96b879e426030f60eb5cb2d59
[ "MIT" ]
null
null
null
from unittest.case import TestCase from probability.discrete import Discrete, Conditional
28.58
63
0.480056
from unittest.case import TestCase from probability.discrete import Discrete, Conditional class TestChapter03(TestCase): def setUp(self) -> None: self.r = Discrete.binary(0.2, 'rain') self.s = Discrete.binary(0.1, 'sprinkler') self.j__r = Conditional.from_probs({ (1, 1):...
1,224
9
104
5bf1138dbd9cc41844dc6aff07cb5e59592dbe1a
7,238
py
Python
vaelib/avb.py
rnagumo/vaelib
9505a62e07f539df1a94f1ac7e9ada694df62844
[ "MIT" ]
1
2021-11-12T14:25:05.000Z
2021-11-12T14:25:05.000Z
vaelib/avb.py
rnagumo/vaelib
9505a62e07f539df1a94f1ac7e9ada694df62844
[ "MIT" ]
null
null
null
vaelib/avb.py
rnagumo/vaelib
9505a62e07f539df1a94f1ac7e9ada694df62844
[ "MIT" ]
1
2021-12-30T12:30:53.000Z
2021-12-30T12:30:53.000Z
"""Adversarial Variational Bayes (AVB). Adversarial Variational Bayes: Unifying Variational Autoencoders and Generative Adversarial Networks http://arxiv.org/abs/1701.04722 Ref) https://github.com/gdikov/adversarial-variational-bayes http://seiya-kumada.blogspot.com/2018/07/adversarial-variational-bayes.html https://...
28.496063
160
0.553606
"""Adversarial Variational Bayes (AVB). Adversarial Variational Bayes: Unifying Variational Autoencoders and Generative Adversarial Networks http://arxiv.org/abs/1701.04722 Ref) https://github.com/gdikov/adversarial-variational-bayes http://seiya-kumada.blogspot.com/2018/07/adversarial-variational-bayes.html https://...
4,181
0
189
5c9be3cb9a56ea1892323736b562a0547d2d754c
351
py
Python
tests/test_basic.py
maxclaey/httpx_auth
63803846a9d6bcc79c2daafd5ab240f4fc579f0f
[ "MIT" ]
58
2020-02-10T18:29:43.000Z
2022-03-24T06:38:23.000Z
tests/test_basic.py
maxclaey/httpx_auth
63803846a9d6bcc79c2daafd5ab240f4fc579f0f
[ "MIT" ]
40
2020-02-10T18:37:57.000Z
2022-02-16T21:05:45.000Z
tests/test_basic.py
maxclaey/httpx_auth
63803846a9d6bcc79c2daafd5ab240f4fc579f0f
[ "MIT" ]
8
2020-05-21T14:48:46.000Z
2022-01-30T11:18:43.000Z
from pytest_httpx import HTTPXMock import httpx_auth from tests.auth_helper import get_header
27
79
0.760684
from pytest_httpx import HTTPXMock import httpx_auth from tests.auth_helper import get_header def test_basic_authentication_send_authorization_header(httpx_mock: HTTPXMock): auth = httpx_auth.Basic("test_user", "test_pwd") assert ( get_header(httpx_mock, auth).get("Authorization") == "Basic d...
232
0
23
989d84ba9d1966b892115c10525a944d80912f4e
4,884
py
Python
boards/apollo2_evb/examples/multi_boot_secure_sample/generate_secureboot_assets.py
wher0001/AmbiqSuiteSDK
e280cbde3e366509da6768ab95471782a05d2371
[ "BSD-3-Clause" ]
25
2019-09-26T18:30:40.000Z
2022-01-21T07:42:04.000Z
boards/apollo2_evb/examples/multi_boot_secure_sample/generate_secureboot_assets.py
vaxradius/AmbiqSuite-R2.4.2
0ffd4a67ec6b63512f56556c40fe6ee4ded1a569
[ "BSD-3-Clause" ]
23
2020-01-20T17:25:02.000Z
2021-11-16T21:06:42.000Z
boards/apollo2_evb/examples/multi_boot_secure_sample/generate_secureboot_assets.py
vaxradius/AmbiqSuite-R2.4.2
0ffd4a67ec6b63512f56556c40fe6ee4ded1a569
[ "BSD-3-Clause" ]
23
2020-04-04T18:35:35.000Z
2022-03-15T07:34:02.000Z
#!/usr/bin/env python3 import argparse import sys import os # This key table has to match the one in bootloader keyTbl = [0xDEADBEEF, 0xAAAAAAAA, 0x11111111, 0x00000000, 0xFFFFFFFF, 0x55555555, 0xA5A5A5A5, 0x66666666] #****************************************************************************** # # Main function #...
33.452055
115
0.546683
#!/usr/bin/env python3 import argparse import sys import os # This key table has to match the one in bootloader keyTbl = [0xDEADBEEF, 0xAAAAAAAA, 0x11111111, 0x00000000, 0xFFFFFFFF, 0x55555555, 0xA5A5A5A5, 0x66666666] #****************************************************************************** # # Main function #...
2,644
0
157
0496b97a9bf1fb8fa8146228a03e548726184666
1,303
py
Python
backend/api/views.py
trib3/django-vue-vuetify-toy
b73fe31acf989b63511bf1779695912257c88cf2
[ "MIT" ]
null
null
null
backend/api/views.py
trib3/django-vue-vuetify-toy
b73fe31acf989b63511bf1779695912257c88cf2
[ "MIT" ]
null
null
null
backend/api/views.py
trib3/django-vue-vuetify-toy
b73fe31acf989b63511bf1779695912257c88cf2
[ "MIT" ]
null
null
null
from django.views.generic import TemplateView from django.views.decorators.cache import never_cache from django.db.models import Count, Sum from django.db.models.functions import Coalesce from backend.api.models import Profile, ProfileDisplayFields, PostAggregateFields from django.http import JsonResponse from django.h...
30.302326
82
0.653876
from django.views.generic import TemplateView from django.views.decorators.cache import never_cache from django.db.models import Count, Sum from django.db.models.functions import Coalesce from backend.api.models import Profile, ProfileDisplayFields, PostAggregateFields from django.http import JsonResponse from django.h...
0
0
0
512587114336c35d6dc9c508ffa136085e46b053
2,295
py
Python
submission/id/models.py
simonprast/wopi-engine
b3f59782659c8be42f4064bce5281afd391833be
[ "BSD-Source-Code" ]
null
null
null
submission/id/models.py
simonprast/wopi-engine
b3f59782659c8be42f4064bce5281afd391833be
[ "BSD-Source-Code" ]
null
null
null
submission/id/models.py
simonprast/wopi-engine
b3f59782659c8be42f4064bce5281afd391833be
[ "BSD-Source-Code" ]
null
null
null
# # Created on Wed Nov 18 2020 # # Copyright (c) 2020 - Simon Prast # import os import uuid from django.conf import settings from django.db import models from user.models import User
25.786517
71
0.651852
# # Created on Wed Nov 18 2020 # # Copyright (c) 2020 - Simon Prast # import os import uuid from django.conf import settings from django.db import models from user.models import User class IDSubmissionManager(models.Manager): def create_submission(self, submitter, document, document_back): id_submissi...
754
1,232
118
54229d5bb24d7ad6c282137584e0947395e03605
418
py
Python
Session_01/py101/10_classes.py
weighanchor4414/DigitalWorldWorkshop2020
9eca3a789e5532680ab032c20fe892bdbd47b891
[ "MIT" ]
9
2020-06-05T17:01:23.000Z
2022-03-16T19:55:50.000Z
Session_01/py101/10_classes.py
weighanchor4414/DigitalWorldWorkshop2020
9eca3a789e5532680ab032c20fe892bdbd47b891
[ "MIT" ]
null
null
null
Session_01/py101/10_classes.py
weighanchor4414/DigitalWorldWorkshop2020
9eca3a789e5532680ab032c20fe892bdbd47b891
[ "MIT" ]
2
2020-02-20T16:48:35.000Z
2020-03-18T14:36:04.000Z
p1 = People("Maria", 1999) print(p1.name) print(p1.birthYear) print(p1.age) p1.pillar = "Architecture and Sustainable Design (ASD)" print(f"{p1.name} is {p1.age} years old, and she is majored in {p1.pillar}")
23.222222
76
0.645933
class People: def __init__(self, name, birthYear): self.name = name self.birthYear = birthYear self.age = 2020 - birthYear self.height = None self.pillar = None p1 = People("Maria", 1999) print(p1.name) print(p1.birthYear) print(p1.age) p1.pillar = "Architecture and Sustai...
165
-8
48
1f913af634f48374288edbe27e053cffc84d41af
4,845
py
Python
tests/functional/commands/test_list_command.py
aimar1986bupt/orion
6d217af1f9002aa671f8a3260a687c540ca5336d
[ "BSD-3-Clause" ]
4
2019-09-02T19:41:04.000Z
2020-04-07T13:05:47.000Z
tests/functional/commands/test_list_command.py
aimar1986bupt/orion
6d217af1f9002aa671f8a3260a687c540ca5336d
[ "BSD-3-Clause" ]
2
2018-06-26T19:17:09.000Z
2022-02-23T13:40:04.000Z
tests/functional/commands/test_list_command.py
aimar1986bupt/orion
6d217af1f9002aa671f8a3260a687c540ca5336d
[ "BSD-3-Clause" ]
2
2019-08-26T11:36:47.000Z
2020-04-07T13:05:48.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Perform a functional test of the list command.""" import os import orion.core.cli def test_no_exp(monkeypatch, clean_db, capsys): """Test that nothing is printed when there are no experiments.""" monkeypatch.chdir(os.path.dirname(os.path.abspath(__file__))) ...
30.664557
100
0.685449
#!/usr/bin/env python # -*- coding: utf-8 -*- """Perform a functional test of the list command.""" import os import orion.core.cli def test_no_exp(monkeypatch, clean_db, capsys): """Test that nothing is printed when there are no experiments.""" monkeypatch.chdir(os.path.dirname(os.path.abspath(__file__))) ...
0
0
0
674848ee2ebcca4d5c540f04215985c5a2e2f772
3,641
py
Python
students/k3343/kursoviks/Artamonova__Valeriya/server/school/serializers.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
10
2020-03-20T09:06:12.000Z
2021-07-27T13:06:02.000Z
students/k3343/kursoviks/Artamonova__Valeriya/server/school/serializers.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
134
2020-03-23T09:47:48.000Z
2022-03-12T01:05:19.000Z
students/k3343/kursoviks/Artamonova__Valeriya/server/school/serializers.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
71
2020-03-20T12:45:56.000Z
2021-10-31T19:22:25.000Z
from rest_framework import serializers from .models import Teacher,Timetable,Klass,Pupil,Cabinet,Subject, Grade class TeacherSerializer(serializers.ModelSerializer): """Список учителей""" class TeacherAddSerializer(serializers.ModelSerializer): """Добавление учителя""" class PupilSerializer(se...
28.669291
88
0.67042
from rest_framework import serializers from .models import Teacher,Timetable,Klass,Pupil,Cabinet,Subject, Grade class TeacherSerializer(serializers.ModelSerializer): """Список учителей""" class Meta: model = Teacher fields = ("id", "last_name", "first_name", "second_name", "teaching_pe...
0
730
414
94f35cf52b9ed17eeeb19e3cea45eb8e5993057c
6,441
py
Python
video_test.py
SteveSZF/Traffic-Lane-Detection
8217808178cdf2d655d02632eb71c543d39f5258
[ "MIT" ]
2
2019-10-08T08:52:43.000Z
2019-10-08T08:55:37.000Z
video_test.py
SteveSZF/Traffic-Lane-Detection
8217808178cdf2d655d02632eb71c543d39f5258
[ "MIT" ]
null
null
null
video_test.py
SteveSZF/Traffic-Lane-Detection
8217808178cdf2d655d02632eb71c543d39f5258
[ "MIT" ]
null
null
null
import argparse import os import numpy as np from tqdm import tqdm from mypath import Path from dataloaders import make_data_loader from modeling.sync_batchnorm.replicate import patch_replication_callback from modeling.erfnet_road import * from utils.loss import SegmentationLosses from utils.calculate_weights import c...
43.816327
164
0.604409
import argparse import os import numpy as np from tqdm import tqdm from mypath import Path from dataloaders import make_data_loader from modeling.sync_batchnorm.replicate import patch_replication_callback from modeling.erfnet_road import * from utils.loss import SegmentationLosses from utils.calculate_weights import c...
5,703
-2
99
b72f0aa5b11153c3e11b4251b59096cbdc84677d
128
py
Python
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_0/_pkg0_1_0_0/_pkg0_1_0_0_0/_mod0_1_0_0_0_3.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_0/_pkg0_1_0_0/_pkg0_1_0_0_0/_mod0_1_0_0_0_3.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_0/_pkg0_1_0_0/_pkg0_1_0_0_0/_mod0_1_0_0_0_3.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
name0_1_0_0_0_3_0 = None name0_1_0_0_0_3_1 = None name0_1_0_0_0_3_2 = None name0_1_0_0_0_3_3 = None name0_1_0_0_0_3_4 = None
14.222222
24
0.820313
name0_1_0_0_0_3_0 = None name0_1_0_0_0_3_1 = None name0_1_0_0_0_3_2 = None name0_1_0_0_0_3_3 = None name0_1_0_0_0_3_4 = None
0
0
0
5bc3308252b8c656c9f2d85675cb4f58fd8d48c6
1,440
py
Python
covertCSVtoData.py
kobe41999/ASUS_ECG
0e20ccc92ade8130fe4a8ace3c6ef2e910631376
[ "MIT" ]
null
null
null
covertCSVtoData.py
kobe41999/ASUS_ECG
0e20ccc92ade8130fe4a8ace3c6ef2e910631376
[ "MIT" ]
null
null
null
covertCSVtoData.py
kobe41999/ASUS_ECG
0e20ccc92ade8130fe4a8ace3c6ef2e910631376
[ "MIT" ]
null
null
null
import csv import config as C import pandas as pd from sklearn import preprocessing import numpy as np if __name__ == '__main__': df = pd.read_csv('./JsonToCSV/data0126.csv') ecgList = [] recordLen = 10000 for i in range(len(df.ECG)): ecgList.append(changeToList(df.ECG[i].split(" "))) fo...
27.692308
94
0.584722
import csv import config as C import pandas as pd from sklearn import preprocessing import numpy as np def changeToList(data): dataList = [] first = data[0].replace("['", "") dataList.append(first) for i in range(len(data) - 3): dataList.append(data[i + 1]) last = data[len(data) - 1].rep...
255
0
23
bf32004509e5d4fd9afea11cdf392904b73b5824
1,469
py
Python
python/classes/classPermiso.py
maestromark55/bust-radio
d3552304e9e0f551359b3a6b72f0f2bc31e863f5
[ "Apache-2.0" ]
null
null
null
python/classes/classPermiso.py
maestromark55/bust-radio
d3552304e9e0f551359b3a6b72f0f2bc31e863f5
[ "Apache-2.0" ]
null
null
null
python/classes/classPermiso.py
maestromark55/bust-radio
d3552304e9e0f551359b3a6b72f0f2bc31e863f5
[ "Apache-2.0" ]
null
null
null
import sys import piLock.configuration as conf import classErrorLog as errorLog
35.829268
110
0.461538
import sys import piLock.configuration as conf import classErrorLog as errorLog class classPermiso: def __init__(self, tag): self.rfidTag = tag try: with conf.db: c = conf.db.cursor() c.execute("SELECT * FROM %s WHERE (tarjeta_RFID=:x)" % conf.permisoTab...
1,342
-2
49
0f98aaa91b5b977fd6d211f7d9569c79ce941321
597
py
Python
Challenges/Quartiles.py
adarsh2104/Hacker-Rank-Days-of-Statistics
30a1c56dc69ae0a98c09e5075f9b6dd0b747e0f9
[ "MIT" ]
2
2021-02-26T14:28:08.000Z
2021-02-26T18:51:51.000Z
Challenges/Quartiles.py
adarsh2104/Hacker-Rank-Days-of-Statistics
30a1c56dc69ae0a98c09e5075f9b6dd0b747e0f9
[ "MIT" ]
null
null
null
Challenges/Quartiles.py
adarsh2104/Hacker-Rank-Days-of-Statistics
30a1c56dc69ae0a98c09e5075f9b6dd0b747e0f9
[ "MIT" ]
null
null
null
# Github : https://github.com/adarsh2104 # HR-Profile: https://www.hackerrank.com/adarsh_2104 # Challenge : https://www.hackerrank.com/challenges/s10-quartiles # Max Score : 30 n = input() input_array = sorted([int(x) for x in input().split()]) print(find_median(input_array[:len(input_array)//2])) print(fin...
28.428571
78
0.658291
# Github : https://github.com/adarsh2104 # HR-Profile: https://www.hackerrank.com/adarsh_2104 # Challenge : https://www.hackerrank.com/challenges/s10-quartiles # Max Score : 30 def find_median(array): if len(array) % 2 == 1: return array[len(array) // 2] else: return (array[len(array)...
152
0
23
586635bed9aefd8fbc1c66989b9458a4ab61adfe
1,945
py
Python
corehq/apps/export/det/base.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/apps/export/det/base.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/apps/export/det/base.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
import attr from couchexport.export import export_raw from couchexport.models import Format TITLE_ROW = [ 'Source Field', 'Field', 'Map Via', 'Data Source', 'Filter Name', 'Filter Value', 'Table Name', 'Format Via', ] @attr.s @attr.s @attr.s
24.935897
83
0.521337
import attr from couchexport.export import export_raw from couchexport.models import Format TITLE_ROW = [ 'Source Field', 'Field', 'Map Via', 'Data Source', 'Filter Name', 'Filter Value', 'Table Name', 'Format Via', ] @attr.s class DETConfig: name = attr.ib() tables = attr.ib...
1,199
398
66
87eb59f5bcf3a945fa6fe34538a2552cbcaa1241
2,241
py
Python
wayne/trend_generators/visit_trends.py
ucl-exoplanets/wayne
48fd07588cbbab6f5a32038455e36d7fc6b89625
[ "MIT" ]
7
2017-05-30T09:01:50.000Z
2019-04-05T05:46:23.000Z
wayne/trend_generators/visit_trends.py
ucl-exoplanets/wayne
48fd07588cbbab6f5a32038455e36d7fc6b89625
[ "MIT" ]
1
2018-06-07T17:31:19.000Z
2018-06-07T19:38:27.000Z
wayne/trend_generators/visit_trends.py
ucl-exoplanets/wayne
48fd07588cbbab6f5a32038455e36d7fc6b89625
[ "MIT" ]
2
2018-04-30T23:16:22.000Z
2020-09-30T18:12:47.000Z
""" Handles visit long trends (scaling factors) applied to the observation. The classic cases are the `hook' and long term ramp """ import abc import numpy as np class BaseVisitTrend(object): """ Visit trends take input the visit planner output and generate a scaling factor that will be multiplied per expos...
30.283784
86
0.671129
""" Handles visit long trends (scaling factors) applied to the observation. The classic cases are the `hook' and long term ramp """ import abc import numpy as np class BaseVisitTrend(object): """ Visit trends take input the visit planner output and generate a scaling factor that will be multiplied per expos...
429
558
76
20b20caa6fbb670cc141c57bc10a431f41d617b3
14,975
py
Python
ietf/meeting/migrations/0011_ietf92_meetings.py
ekr/ietfdb
8d936836b0b9ff31cda415b0a423e3f5b33ab695
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2021-11-20T03:40:40.000Z
2021-11-20T03:40:42.000Z
ietf/meeting/migrations/0011_ietf92_meetings.py
ekr/ietfdb
8d936836b0b9ff31cda415b0a423e3f5b33ab695
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ietf/meeting/migrations/0011_ietf92_meetings.py
ekr/ietfdb
8d936836b0b9ff31cda415b0a423e3f5b33ab695
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.db import migrations
76.403061
152
0.482204
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.db import migrations def backfill_92_other_meetings(apps, schema_editor): Meeting = apps.get_model('meeting', 'Meeting') Schedule = apps.get_model('meeting', 'Schedule') ScheduledSess...
14,493
320
46
5d8f36982b929c47137cde1f262689332f36b121
26,755
py
Python
pipelines/create_trackhub_for_project.py
PRIDE-Toolsuite/trackhub-creator
ade2cfafeaad95088664caecacb783b501c170aa
[ "Apache-2.0" ]
null
null
null
pipelines/create_trackhub_for_project.py
PRIDE-Toolsuite/trackhub-creator
ade2cfafeaad95088664caecacb783b501c170aa
[ "Apache-2.0" ]
null
null
null
pipelines/create_trackhub_for_project.py
PRIDE-Toolsuite/trackhub-creator
ade2cfafeaad95088664caecacb783b501c170aa
[ "Apache-2.0" ]
null
null
null
# # Author    : Manuel Bernal Llinares # Project   : trackhub-creator # Timestamp : 07-09-2017 11:24 # --- # © 2017 Manuel Bernal Llinares <mbdebian@gmail.com> # All rights reserved. # """ This pipeline creates a trackhub for a PRIDE project, based on the information provided via a JSON formatted file, as it can be ...
50.196998
120
0.676808
# # Author    : Manuel Bernal Llinares # Project   : trackhub-creator # Timestamp : 07-09-2017 11:24 # --- # © 2017 Manuel Bernal Llinares <mbdebian@gmail.com> # All rights reserved. # """ This pipeline creates a trackhub for a PRIDE project, based on the information provided via a JSON formatted file, as it can be ...
16,356
533
896
b76df0159986f1a2e79043c17c75ba6fb06ea156
8,516
py
Python
tests/extractors/test_protein.py
KalinNonchev/kipoiseq
38d1134885e401198acd3883286dc55627cf12a6
[ "MIT" ]
2
2019-12-16T17:13:04.000Z
2021-07-29T12:05:47.000Z
tests/extractors/test_protein.py
KalinNonchev/kipoiseq
38d1134885e401198acd3883286dc55627cf12a6
[ "MIT" ]
117
2020-04-22T12:46:45.000Z
2021-08-02T04:40:58.000Z
tests/extractors/test_protein.py
KalinNonchev/kipoiseq
38d1134885e401198acd3883286dc55627cf12a6
[ "MIT" ]
null
null
null
import pytest from pytest_mock import mocker import pandas as pd from kipoiseq.transforms.functional import translate, rc_dna from kipoiseq.dataclasses import Interval, Variant from kipoiseq.extractors.protein import cut_transcript_seq, gtf_row2interval, \ CDSFetcher, TranscriptSeqExtractor, ProteinSeqExtractor, \ ...
31.308824
99
0.705965
import pytest from pytest_mock import mocker import pandas as pd from kipoiseq.transforms.functional import translate, rc_dna from kipoiseq.dataclasses import Interval, Variant from kipoiseq.extractors.protein import cut_transcript_seq, gtf_row2interval, \ CDSFetcher, TranscriptSeqExtractor, ProteinSeqExtractor, \ ...
7,047
0
500
eed5699e06d3cac61b4a945b53a1004046c608f3
1,026
py
Python
task3/task3.py
ksmirenko/ml-homework
a5e558352ffc332ad5e40526dda21f205718a203
[ "MIT" ]
1
2020-08-05T08:06:33.000Z
2020-08-05T08:06:33.000Z
task3/task3.py
ksmirenko/ml-homework
a5e558352ffc332ad5e40526dda21f205718a203
[ "MIT" ]
null
null
null
task3/task3.py
ksmirenko/ml-homework
a5e558352ffc332ad5e40526dda21f205718a203
[ "MIT" ]
null
null
null
from PIL import Image import numpy as np # Works when launched from terminal # noinspection PyUnresolvedReferences from k_means import k_means input_image_file = 'lena.jpg' output_image_prefix = 'out_lena' n_clusters = [2, 3, 5] max_iterations = 100 launch_count = 3 main()
27.72973
104
0.692008
from PIL import Image import numpy as np # Works when launched from terminal # noinspection PyUnresolvedReferences from k_means import k_means input_image_file = 'lena.jpg' output_image_prefix = 'out_lena' n_clusters = [2, 3, 5] max_iterations = 100 launch_count = 3 def main(): # Read input image image = np...
724
0
23
4029817dc33967552ae1824d14039c95b823fc6b
12,289
py
Python
neural_guided_symbolic_regression/models/mcts.py
egonrian/google-research
8177adbe9ca0d7e5a9463b54581fe6dd27be0974
[ "Apache-2.0" ]
3
2021-01-18T04:46:49.000Z
2021-03-05T09:21:40.000Z
neural_guided_symbolic_regression/models/mcts.py
Alfaxad/google-research
2c0043ecd507e75e2df9973a3015daf9253e1467
[ "Apache-2.0" ]
7
2021-11-10T19:44:38.000Z
2022-02-10T06:48:39.000Z
neural_guided_symbolic_regression/models/mcts.py
Alfaxad/google-research
2c0043ecd507e75e2df9973a3015daf9253e1467
[ "Apache-2.0" ]
4
2021-02-08T10:25:45.000Z
2021-04-17T14:46:26.000Z
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
37.58104
85
0.714948
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
0
0
0
c84726272f5ccce872fa9f251d5064eaed566127
1,302
py
Python
Graded/G3/slam/solution/__init__.py
chrstrom/TTK4250
f453c3a59597d3fe6cff7d35b790689919798b94
[ "Unlicense" ]
null
null
null
Graded/G3/slam/solution/__init__.py
chrstrom/TTK4250
f453c3a59597d3fe6cff7d35b790689919798b94
[ "Unlicense" ]
null
null
null
Graded/G3/slam/solution/__init__.py
chrstrom/TTK4250
f453c3a59597d3fe6cff7d35b790689919798b94
[ "Unlicense" ]
null
null
null
from .pytransform import pyarmor_runtime pyarmor_runtime() __pyarmor__(__name__, __file__, b'\x50\x59\x41\x52\x4d\x4f\x52\x00\x00\x03\x09\x00\x61\x0d\x0d\x0a\x08\x2d\xa0\x01\x00\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00\xed\x00\x00\x00\x00\x00\x00\x18\x3d\x71\xc5\x03\x9e\x68\x9a\xa0\x37\x72\x21\xef\xad\x8a\xf4\x10\x0...
434
1,243
0.754992
from .pytransform import pyarmor_runtime pyarmor_runtime() __pyarmor__(__name__, __file__, b'\x50\x59\x41\x52\x4d\x4f\x52\x00\x00\x03\x09\x00\x61\x0d\x0d\x0a\x08\x2d\xa0\x01\x00\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00\xed\x00\x00\x00\x00\x00\x00\x18\x3d\x71\xc5\x03\x9e\x68\x9a\xa0\x37\x72\x21\xef\xad\x8a\xf4\x10\x0...
0
0
0
1ca24822ceacb59afa74f32fca7fe5d5d075a42c
5,532
py
Python
tests/unit/modules/test_mine.py
xiaowei582648206/saltx
1d17b030b973ce5422e0fbe7e17c98c7ca91c49b
[ "Apache-2.0" ]
1
2022-02-09T06:40:14.000Z
2022-02-09T06:40:14.000Z
tests/unit/modules/test_mine.py
xiaowei582648206/saltx
1d17b030b973ce5422e0fbe7e17c98c7ca91c49b
[ "Apache-2.0" ]
null
null
null
tests/unit/modules/test_mine.py
xiaowei582648206/saltx
1d17b030b973ce5422e0fbe7e17c98c7ca91c49b
[ "Apache-2.0" ]
4
2020-11-04T06:28:05.000Z
2022-02-09T10:54:49.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Rupesh Tare <rupesht@saltstack.com> ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock import ( patch,...
44.256
99
0.357014
# -*- coding: utf-8 -*- ''' :codeauthor: Rupesh Tare <rupesht@saltstack.com> ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock import ( patch,...
36
0
26
261d9ad0af2c41868951b0b120d7fd4d4af8e62d
13,215
py
Python
metrics/custom_losses.py
tbuikr/fastMRI
4395380bbcddefe0bcfea76a2790e0d978009dea
[ "MIT" ]
2
2019-12-09T04:57:57.000Z
2020-02-24T18:04:12.000Z
metrics/custom_losses.py
tbuikr/fastMRI
4395380bbcddefe0bcfea76a2790e0d978009dea
[ "MIT" ]
null
null
null
metrics/custom_losses.py
tbuikr/fastMRI
4395380bbcddefe0bcfea76a2790e0d978009dea
[ "MIT" ]
null
null
null
import torch from torch import nn import torch.nn.functional as F from metrics.ssim import ssim from metrics.tv_loss import TVLoss #import models.networks as networks from metrics.my_ssim import ssim_loss # class CSSIM(nn.Module): # Complementary SSIM # def __init__(self, default_range=1, filter_size=11, k1=0.01...
37.225352
139
0.62308
import torch from torch import nn import torch.nn.functional as F from metrics.ssim import ssim from metrics.tv_loss import TVLoss #import models.networks as networks from metrics.my_ssim import ssim_loss # class CSSIM(nn.Module): # Complementary SSIM # def __init__(self, default_range=1, filter_size=11, k1=0.01...
9,908
405
1,052
36e99d037172fee82cbe9e3275f4053561bba8c8
1,808
py
Python
tests/integration_tests/data_steward/gcloud/gcs_client_test.py
dcarbone/curation
68f9ba9466646d73509d424567b64566856fb8e8
[ "MIT" ]
1
2019-03-18T18:22:41.000Z
2019-03-18T18:22:41.000Z
tests/integration_tests/data_steward/gcloud/gcs_client_test.py
nishanthpp93/curation
ac9f38b2f4580ae806121dd929293159132c7d2a
[ "MIT" ]
null
null
null
tests/integration_tests/data_steward/gcloud/gcs_client_test.py
nishanthpp93/curation
ac9f38b2f4580ae806121dd929293159132c7d2a
[ "MIT" ]
1
2021-09-16T14:25:19.000Z
2021-09-16T14:25:19.000Z
""" Test the Google Cloud Storage Client and associated helper functions """ # Python stl imports import os import unittest # Project imports from gcloud.gcs import StorageClient # Third-party imports
29.639344
79
0.606195
""" Test the Google Cloud Storage Client and associated helper functions """ # Python stl imports import os import unittest # Project imports from gcloud.gcs import StorageClient # Third-party imports class GcsClientTest(unittest.TestCase): @classmethod def setUpClass(cls): print('*****************...
1,384
197
23