hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
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
130
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
130
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.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
ee48436c60a5877970258f407f9b69ebc8ea1a0c
1,592
py
Python
fake_users.py
Mohamed-Kaizen/django_playground
0ca623041857f15c06bd2f9c8edcd2b54b4c4897
[ "MIT" ]
null
null
null
fake_users.py
Mohamed-Kaizen/django_playground
0ca623041857f15c06bd2f9c8edcd2b54b4c4897
[ "MIT" ]
3
2021-06-08T21:15:15.000Z
2022-03-12T00:35:49.000Z
fake_users.py
Mohamed-Kaizen/django_playground
0ca623041857f15c06bd2f9c8edcd2b54b4c4897
[ "MIT" ]
null
null
null
""" creating fake user for test""" import os import secrets import django from django.contrib.auth import get_user_model os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_playground.settings",) django.setup() user = get_user_model() def create_users(*, users: int = 5) -> None: """ create random us...
24.492308
78
0.623116
""" creating fake user for test""" import os import secrets import django import factory from django.contrib.auth import get_user_model os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_playground.settings",) django.setup() user = get_user_model() class UserFactory(factory.Factory): """ Using facto...
0
0
0
457
0
0
0
-7
45
81ff2f8b4868cae15d89f546ff0c784896af2164
413
py
Python
decisiontrees/entropy.py
C3NZ/ds2-1
743416356ddc6b50f0c41bcba8a21018f98a77da
[ "MIT" ]
null
null
null
decisiontrees/entropy.py
C3NZ/ds2-1
743416356ddc6b50f0c41bcba8a21018f98a77da
[ "MIT" ]
null
null
null
decisiontrees/entropy.py
C3NZ/ds2-1
743416356ddc6b50f0c41bcba8a21018f98a77da
[ "MIT" ]
null
null
null
# Given the first Probability of our coin, calculate the entropy # Calculate the entropy of our 3 coins print(calc_entropy(0.5)) print(calc_entropy(0.9)) print(calc_entropy(0.1)) # Calculate the entropy of someone playing tennis from our tennis dataset # (9 out of 14 people said no) print(calc_entropy(9 / 14))
24.294118
73
0.714286
import numpy as np # Given the first Probability of our coin, calculate the entropy def calc_entropy(P): return -(P * np.log2(P) + (1 - P) * np.log2(1 - P)) # Calculate the entropy of our 3 coins print(calc_entropy(0.5)) print(calc_entropy(0.9)) print(calc_entropy(0.1)) # Calculate the entropy of someone playi...
0
0
0
0
0
55
0
-3
44
11dfc12a42aa0ef811cd035fdd797354255ee364
1,475
py
Python
capanno_utils/helpers/validate_cwl.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
null
null
null
capanno_utils/helpers/validate_cwl.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
1
2019-12-16T17:06:44.000Z
2019-12-16T17:06:44.000Z
capanno_utils/helpers/validate_cwl.py
xDBio-Inc/xD-CWL-utils
a7c602e221f3711aeea41a68e868eb13b37550c5
[ "Apache-2.0" ]
1
2020-10-21T19:50:36.000Z
2020-10-21T19:50:36.000Z
import logging import os from pathlib import Path from urllib.parse import urlparse from schema_salad.exceptions import ValidationException from schema_salad.ref_resolver import file_uri from cwltool.load_tool import resolve_and_validate_document, fetch_document from cwltool.main import main as cwl_tool def validate_...
37.820513
113
0.736949
import logging import os from pathlib import Path from urllib.parse import urlparse from schema_salad.exceptions import ValidationException from schema_salad.ref_resolver import file_uri from cwltool.load_tool import resolve_and_validate_document, fetch_document from cwltool.main import main as cwl_tool def validate_...
0
0
0
0
0
0
0
0
0
52905630110a3b5de04eda3b9d173db216cd1168
2,529
py
Python
src/mlsp_challenge/utils/validate_submission.py
Hguimaraes/SE3D
5c3cfb19c42405b507bfa1b894c66edd49ec18bb
[ "MIT" ]
3
2021-12-01T15:22:22.000Z
2022-03-06T13:12:18.000Z
src/mlsp_challenge/utils/validate_submission.py
Hguimaraes/SE3D
5c3cfb19c42405b507bfa1b894c66edd49ec18bb
[ "MIT" ]
null
null
null
src/mlsp_challenge/utils/validate_submission.py
Hguimaraes/SE3D
5c3cfb19c42405b507bfa1b894c66edd49ec18bb
[ "MIT" ]
null
null
null
import os import numpy as np import librosa ''' Check if the the submssion folders are valid: all files must have the correct format, shape and naming. WORK IN PROGRESS... ''' def validate_task1_submission(submission_folder, test_folder): ''' Args: - submission_folder: folder containing the model's output ...
43.603448
99
0.647291
import os, sys import numpy as np import pandas as pd import librosa ''' Check if the the submssion folders are valid: all files must have the correct format, shape and naming. WORK IN PROGRESS... ''' def validate_task1_submission(submission_folder, test_folder): ''' Args: - submission_folder: folder conta...
0
0
0
0
0
0
0
3
22
a454e2ab72d06fa2eb9341ae81746261c70849b3
5,701
py
Python
learn_layer/train_artificial.py
tpimentelms/phonotactic-complexity
70d0a9e45943096d7640eaf7277033e3920408c9
[ "MIT" ]
5
2020-04-17T20:46:11.000Z
2022-03-02T10:32:00.000Z
learn_layer/train_artificial.py
tpimentelms/phonotactic-complexity
70d0a9e45943096d7640eaf7277033e3920408c9
[ "MIT" ]
null
null
null
learn_layer/train_artificial.py
tpimentelms/phonotactic-complexity
70d0a9e45943096d7640eaf7277033e3920408c9
[ "MIT" ]
null
null
null
import sys sys.path.append('./') from util import argparser full_results = [['lang', 'artificial', 'avg_len', 'test_shannon', 'test_loss', 'test_acc', 'val_loss', 'val_acc', 'best_epoch']] if __name__ == '__main__': args = argparser.parse_args(csv_folder='artificial/%s/normal') ...
43.853846
114
0.678828
import pandas as pd import numpy as np import sys sys.path.append('./') from train_base import write_csv, read_info, convert_to_loader, _run_language from util import argparser full_results = [['lang', 'artificial', 'avg_len', 'test_shannon', 'test_loss', 'test_acc', 'val_loss', 'val_acc', 'best_epoc...
46
0
0
0
0
4,818
0
51
342
5254837f133c5e006b1604f6c976453db56c2ee0
7,368
py
Python
neuro/metrics.py
idea-iitd/NeuroSED
8df1526046c11f6cd676877a6625958016e039c2
[ "MIT" ]
1
2022-03-27T20:18:53.000Z
2022-03-27T20:18:53.000Z
neuro/metrics.py
idea-iitd/NeuroSED
8df1526046c11f6cd676877a6625958016e039c2
[ "MIT" ]
null
null
null
neuro/metrics.py
idea-iitd/NeuroSED
8df1526046c11f6cd676877a6625958016e039c2
[ "MIT" ]
null
null
null
import sys sys.path.insert(0, '../..') sys.path.insert(0, '../../pyged/lib')
40.043478
103
0.566097
import sklearn as sk import sklearn.metrics import torch import torch_geometric as tg import torch_geometric.data from tqdm.auto import tqdm from . import config, utils import sys sys.path.insert(0, '../..') sys.path.insert(0, '../../pyged/lib') import pyged def err(lb, ub, pred): lb, ub, pred = (x.to(config.devi...
0
0
0
0
0
6,560
0
6
726
cb189b515e001d19f1ea76d9958afa78663c6dbc
11,599
py
Python
tgback_utils.py
NotStatilko/tgback
4f2c1f92ac1f244c4adeac3ac5624c103f59ef93
[ "MIT" ]
10
2019-10-14T13:50:12.000Z
2020-11-21T15:26:10.000Z
tgback_utils.py
NotStatilko/tgback
4f2c1f92ac1f244c4adeac3ac5624c103f59ef93
[ "MIT" ]
10
2019-10-14T15:25:05.000Z
2021-07-02T17:54:31.000Z
tgback_utils.py
NotStatilko/tgback
4f2c1f92ac1f244c4adeac3ac5624c103f59ef93
[ "MIT" ]
3
2019-12-08T22:16:39.000Z
2021-09-27T14:17:20.000Z
try: from PIL import UnidentifiedImageError qr_available = True except ImportError: qr_available = False image_error = IndexError if not qr_available else UnidentifiedImageError from base64 import b64decode from telethon import TelegramClient from reedsolo import RSCodec VERSION = 'v4.0' TelegramClient._...
37.905229
99
0.648677
try: from PIL import Image, ImageOps, UnidentifiedImageError from pyzbar import pyzbar qr_available = True except ImportError: qr_available = False image_error = IndexError if not qr_available else UnidentifiedImageError from os import urandom from hashlib import scrypt from itertools import cycle fro...
0
551
3,613
3,106
0
2,182
0
445
611
bc7defdc4e5a41422ec2a6c37de04f8bdc9dd9dd
13,747
py
Python
tests/test_bilateral_approx_cuda.py
tatuanb/monai_V1
41e492b61c78bb3c303f38b03fe9fdc74a3c2e96
[ "Apache-2.0" ]
2,971
2019-10-16T23:53:16.000Z
2022-03-31T20:58:24.000Z
tests/test_bilateral_approx_cuda.py
catherine1996cn/MONAI
ff9bbfa82763de46cbac75553e340633e3d84ecb
[ "Apache-2.0" ]
2,851
2020-01-10T16:23:44.000Z
2022-03-31T22:14:53.000Z
tests/test_bilateral_approx_cuda.py
catherine1996cn/MONAI
ff9bbfa82763de46cbac75553e340633e3d84ecb
[ "Apache-2.0" ]
614
2020-01-14T19:18:01.000Z
2022-03-31T14:06:14.000Z
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
33.94321
106
0.407071
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
0
1,336
0
0
0
0
0
103
157
3d135bbfccb58f323ee103f730f1f3145c47d1e2
7,816
py
Python
graph_S_and_b.py
haydenshively/AME-261
1cf686835e4eead3a5d23cae65dd7644515fe665
[ "MIT" ]
1
2022-03-29T23:59:23.000Z
2022-03-29T23:59:23.000Z
graph_S_and_b.py
haydenshively/AME-261
1cf686835e4eead3a5d23cae65dd7644515fe665
[ "MIT" ]
null
null
null
graph_S_and_b.py
haydenshively/AME-261
1cf686835e4eead3a5d23cae65dd7644515fe665
[ "MIT" ]
null
null
null
if __name__ == '__main__': import sys import json from copy import copy import numpy as np from hangar import planes requirements = {} with open('requirements.json') as f: requirements = json.load(f) print('Mission Requirements:') print(json.dumps(requirements, ind...
43.664804
119
0.53915
def max_payload(plane, speed): Cl = plane.Cl(speed) Cd_c = plane.Cd_c(Cl, speed) if (plane.tc_max is not None) and (plane.Lam is not None) else 0 drag = plane.drag(plane.Cd(plane.Cd_i(Cl), Cd_c), speed) T_a = plane.jet_thrust_available() while T_a > drag: plane.W_payload += 100 Cl = ...
0
0
0
0
0
551
0
26
78
bf7d6576d1a10880f060477a1f5bb83d11f7431d
10,882
py
Python
trajnetbaselines/trajnetbaselines/mlp/utils.py
vita-epfl/RRB
9099356565c4150d2c53e9a6cfc75bdb792a8929
[ "BSD-2-Clause" ]
37
2021-04-11T06:23:19.000Z
2022-03-27T22:06:14.000Z
trajnetbaselines/trajnetbaselines/mlp/utils.py
swb19/RRB
9099356565c4150d2c53e9a6cfc75bdb792a8929
[ "BSD-2-Clause" ]
6
2021-03-15T14:54:43.000Z
2022-03-04T16:32:16.000Z
trajnetbaselines/trajnetbaselines/mlp/utils.py
swb19/RRB
9099356565c4150d2c53e9a6cfc75bdb792a8929
[ "BSD-2-Clause" ]
6
2021-05-11T08:34:02.000Z
2022-03-17T09:48:59.000Z
#from mpc import mpc #from mpc.mpc import QuadCost, LinDx, GradMethods import torch.nn as nn from .. import augmentation import warnings warnings.filterwarnings("ignore")
51.57346
176
0.593457
#from mpc import mpc #from mpc.mpc import QuadCost, LinDx, GradMethods import torch import numpy as np import torch.nn as nn import pdb from ..scene_funcs.cnn import CNN from ..scene_funcs.scene_funcs import scene_funcs from .. import augmentation import time from .utils import * import cv2 import trajnetba...
0
0
0
1,152
0
9,222
0
-3
332
e78120f44ffcb5a7e02cd8c58305ad138fe81282
1,759
py
Python
Learnpy/manytask/shareingvar.py
JackyYuanjie/python-scripts
490eb9668bda6db004ae87d204588fb6ffe56051
[ "Apache-2.0" ]
1
2021-07-08T05:09:38.000Z
2021-07-08T05:09:38.000Z
Learnpy/manytask/shareingvar.py
JackyYuanjie/python-scripts
490eb9668bda6db004ae87d204588fb6ffe56051
[ "Apache-2.0" ]
null
null
null
Learnpy/manytask/shareingvar.py
JackyYuanjie/python-scripts
490eb9668bda6db004ae87d204588fb6ffe56051
[ "Apache-2.0" ]
1
2020-01-09T07:29:17.000Z
2020-01-09T07:29:17.000Z
# -*- coding:utf-8 -*- import threading import time """ . work1, work2. """ """ # num = 0 # work1 def work1(): # num global num for i in range(10): num += 1 print("work1--------",num) # work2 def work2(): # num. print("work2=======",num) if __name__=="__main__": # 2 ...
16.439252
72
0.625355
# -*- coding:utf-8 -*- import threading import time """ 多个线程方法中可以共用全局变量. 查看work1线程对全局变量的修改, 在work2中能否查看修改后的结果. """ """ # 定义全局变量 num = 0 # work1 def work1(): # 声明num是一个全局变量 global num for i in range(10): num += 1 print("work1--------",num) # work2 def work2(): # num可以在多个线程中共享. p...
1,191
0
0
0
0
201
0
0
44
39a28b7e7d87da34ecd64ff50d2f111db9f9b19f
209
py
Python
OmegaErp/contact/urls.py
OMAR-EHAB777/FerpMenu
6aee4616bc9bc7801023fe51acfa28e1e1267b66
[ "BSD-3-Clause" ]
null
null
null
OmegaErp/contact/urls.py
OMAR-EHAB777/FerpMenu
6aee4616bc9bc7801023fe51acfa28e1e1267b66
[ "BSD-3-Clause" ]
null
null
null
OmegaErp/contact/urls.py
OMAR-EHAB777/FerpMenu
6aee4616bc9bc7801023fe51acfa28e1e1267b66
[ "BSD-3-Clause" ]
null
null
null
from django.urls import path from . import views app_name = 'contact' urlpatterns = [ path('',views.send_email , name='send_email' ), path('success/' , views.send_success , name='send_success'), ]
17.416667
64
0.679426
from django.urls import path from . import views app_name = 'contact' urlpatterns = [ path('',views.send_email , name='send_email' ), path('success/' , views.send_success , name='send_success'), ]
0
0
0
0
0
0
0
0
0
60aec61449730e216ed88ac128c52a3d3c36e74a
1,898
py
Python
allmychanges/downloaders/vcs/git_commits.py
AllMyChanges/allmychanges.com
6729e9bddee8f76068737383d641ca3bc6e85422
[ "BSD-2-Clause" ]
46
2015-01-31T10:19:26.000Z
2019-07-01T14:00:01.000Z
allmychanges/downloaders/vcs/git_commits.py
AllMyChanges/allmychanges.com
6729e9bddee8f76068737383d641ca3bc6e85422
[ "BSD-2-Clause" ]
59
2015-02-27T12:01:22.000Z
2021-06-10T23:01:10.000Z
allmychanges/downloaders/vcs/git_commits.py
AllMyChanges/allmychanges.com
6729e9bddee8f76068737383d641ca3bc6e85422
[ "BSD-2-Clause" ]
11
2015-02-22T19:55:13.000Z
2020-06-05T18:20:03.000Z
from twiggy_goodies.threading import log from allmychanges.downloaders.vcs.git import (_guess) def guess(*args, **kwargs): """We build changelog from commit messages only if there are tags like version numbers or a special version extractor is available for this repository. """ with log.name_and...
30.126984
73
0.631718
import tempfile import os from django.conf import settings from twiggy_goodies.threading import log from allmychanges.downloaders.vcs.git import ( do, _download, _guess) from allmychanges.vcs_extractor import ( get_versions_from_vcs, choose_version_extractor) from allmychanges.crawler import _extr...
0
0
0
0
0
1,114
0
172
205
a7a34a7615109d129221f1339e9488f6a2435cae
969
py
Python
PyMesh/scripts/convex_hull.py
VincentLefevre/3D-parallax
8eab905fcc591e1bd7ddbbb01ad21427286c02e3
[ "MIT" ]
73
2021-01-05T07:25:51.000Z
2022-03-17T20:46:01.000Z
PyMesh/scripts/convex_hull.py
VincentLefevre/3D-parallax
8eab905fcc591e1bd7ddbbb01ad21427286c02e3
[ "MIT" ]
1
2021-01-05T11:45:36.000Z
2021-01-05T20:55:28.000Z
PyMesh/scripts/convex_hull.py
VincentLefevre/3D-parallax
8eab905fcc591e1bd7ddbbb01ad21427286c02e3
[ "MIT" ]
4
2021-01-05T10:27:50.000Z
2021-01-06T12:02:57.000Z
#!/usr/bin/env python """ Compute the convex hull of a given mesh. """ if __name__ == "__main__": main();
28.5
69
0.635707
#!/usr/bin/env python """ Compute the convex hull of a given mesh. """ import argparse import pymesh import numpy as np def parse_args(): parser = argparse.ArgumentParser(__doc__); parser.add_argument("--engine", default="qhull", choices=["qhull", "cgal", "triangle", "tetgen"]); ...
0
0
0
0
0
745
0
-17
121
b35c7fb8f1f84e7a4003966d38b7fea6bd6e6da2
3,202
py
Python
causalrep_expms/sec2-4-3-2-celebA/src/download_celeba.py
yixinwang/representation-causal-public
f092baf600dfbcfa998e8f7ba9c9e751a8524739
[ "MIT" ]
23
2021-09-09T21:03:04.000Z
2022-03-27T16:09:02.000Z
causalrep_expms/sec2-4-3-2-celebA/src/download_celeba.py
cheetooooo/representation-causal-public
f092baf600dfbcfa998e8f7ba9c9e751a8524739
[ "MIT" ]
1
2022-03-17T17:28:06.000Z
2022-03-17T17:28:06.000Z
causalrep_expms/sec2-4-3-2-celebA/src/download_celeba.py
cheetooooo/representation-causal-public
f092baf600dfbcfa998e8f7ba9c9e751a8524739
[ "MIT" ]
9
2021-09-26T04:10:40.000Z
2022-03-23T05:41:14.000Z
# https://stackoverflow.com/questions/65528568/how-do-i-load-the-celeba-dataset-on-google-colab-using-torch-vision-without-ru import os import zipfile import gdown import torch from torchvision import transforms ## Setup # Number of gpus available ngpu = 1 device = torch.device('cuda:0' if ( torch.cuda.is_availa...
33.010309
125
0.69925
# https://stackoverflow.com/questions/65528568/how-do-i-load-the-celeba-dataset-on-google-colab-using-torch-vision-without-ru import os import zipfile import gdown import torch from natsort import natsorted from PIL import Image from torch.utils.data import Dataset from torchvision import transforms ## Setup # Numbe...
0
0
0
799
0
0
0
23
88
b55fec40cbf178237d8128467d8469febdb2a32b
12,752
py
Python
chemex/parameters/database.py
gbouvignies/chemex
b021650928b6db930281957222529bc6bcab8aa2
[ "BSD-3-Clause" ]
11
2015-03-16T16:45:42.000Z
2018-09-17T08:43:58.000Z
chemex/parameters/database.py
gbouvignies/chemex
b021650928b6db930281957222529bc6bcab8aa2
[ "BSD-3-Clause" ]
33
2015-01-12T16:46:48.000Z
2018-03-29T15:01:15.000Z
chemex/parameters/database.py
gbouvignies/chemex
b021650928b6db930281957222529bc6bcab8aa2
[ "BSD-3-Clause" ]
8
2015-01-15T21:53:16.000Z
2018-01-04T15:33:52.000Z
from __future__ import annotations from re import compile from chemex.configuration.methods import Method from chemex.messages import print_status_changes _FLOAT = r"[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?" _RE_PARAM_NAME = compile(r"\[(.+?)\]") _RE_GRID_DEFINITION = compile( rf"(lin[(]{_FLOAT},{_FLOAT},\d+[)]$)|...
35.820225
92
0.666797
from __future__ import annotations from collections import Counter from collections import defaultdict from collections.abc import Hashable from collections.abc import Iterable from collections.abc import Sequence from dataclasses import dataclass from dataclasses import field from re import compile from typing import...
0
9,868
0
496
0
236
0
266
446
a1fb856a6d305bc38d137071e890da513e3ca7de
49,734
py
Python
mvpa2/tests/test_clf.py
adswa/PyMVPA
fe0b7655bd2b89b4946fc324279abfb5c41869df
[ "MIT" ]
1
2017-06-07T19:54:07.000Z
2017-06-07T19:54:07.000Z
mvpa2/tests/test_clf.py
mih/PyMVPA
8dd092277a5410b784bd71f760e39a231b3e45ce
[ "MIT" ]
null
null
null
mvpa2/tests/test_clf.py
mih/PyMVPA
8dd092277a5410b784bd71f760e39a231b3e45ce
[ "MIT" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
43.741425
127
0.572365
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ###...
0
31,484
0
16,172
0
59
0
676
500
ff4e0847b700991954e92df2144998e43c4b052d
1,156
py
Python
src/labster/domain2/services/workflow/workflow.py
jean3108/labandco
4317e7d3875f10d76076ad5fc68c1ba3c12badba
[ "Apache-2.0" ]
2
2019-11-11T22:09:58.000Z
2020-01-20T19:44:30.000Z
src/labster/domain2/services/workflow/workflow.py
jean3108/labandco
4317e7d3875f10d76076ad5fc68c1ba3c12badba
[ "Apache-2.0" ]
15
2020-03-31T10:58:37.000Z
2022-01-22T09:14:49.000Z
src/labster/domain2/services/workflow/workflow.py
jean3108/labandco
4317e7d3875f10d76076ad5fc68c1ba3c12badba
[ "Apache-2.0" ]
2
2021-05-28T12:20:24.000Z
2021-09-08T11:27:57.000Z
from __future__ import annotations
28.9
78
0.730969
from __future__ import annotations from labster.lib.workflow import Workflow from .states import ALL_STATES, EN_EDITION from .transitions import ABANDONNER, ACCUSER_RECEPTION, COMMENTER, \ CONFIRMER_FINALISATION_DGRTT, CONFIRMER_RECEVABILITE_DGRTT, DESARCHIVER, \ PRENDRE_LA_MAIN_DGRTT, PRENDRE_LA_MAIN_GESTION...
0
0
0
699
0
0
0
330
91
7d960b4e902a6c439e9f6caf2564ef6459733fd4
527
py
Python
AutomateTheBoringStuff/bulletPointAdder.py
pythoncoder999/Python
4a75698da65a26ffedb28cf5cefcc03095641eb9
[ "MIT" ]
1
2019-12-30T12:45:41.000Z
2019-12-30T12:45:41.000Z
AutomateTheBoringStuff/bulletPointAdder.py
pythoncoder999/Python
4a75698da65a26ffedb28cf5cefcc03095641eb9
[ "MIT" ]
null
null
null
AutomateTheBoringStuff/bulletPointAdder.py
pythoncoder999/Python
4a75698da65a26ffedb28cf5cefcc03095641eb9
[ "MIT" ]
1
2021-04-20T19:56:27.000Z
2021-04-20T19:56:27.000Z
# -*- coding: utf-8 -*- """ Created on Mon Oct 28 13:36:21 2019 @author: Gunardi Saputra """ #! python3 # bulletPointAdder.py = Adds Wikipedia bullet points to the start # of each line of text on the clipboard import pyperclip text = pyperclip.paste() pyperclip.copy(text) # Separate lines and add stars. lines = tex...
22.913043
73
0.686907
# -*- coding: utf-8 -*- """ Created on Mon Oct 28 13:36:21 2019 @author: Gunardi Saputra """ #! python3 # bulletPointAdder.py = Adds Wikipedia bullet points to the start # of each line of text on the clipboard import pyperclip text = pyperclip.paste() pyperclip.copy(text) # Separate lines and add stars. lines = tex...
0
0
0
0
0
0
0
0
0
b8bbb7a53502c6d968a64a61d057371a31830cf3
7,785
py
Python
designate/tests/unit/agent/backends/test_knot2.py
mrlesmithjr/designate
bff3d5f6e31fe595a77143ec4ac779c187bf72a8
[ "Apache-2.0" ]
145
2015-01-02T09:35:53.000Z
2021-12-14T17:03:53.000Z
designate/tests/unit/agent/backends/test_knot2.py
mrlesmithjr/designate
bff3d5f6e31fe595a77143ec4ac779c187bf72a8
[ "Apache-2.0" ]
6
2015-03-15T00:22:27.000Z
2019-12-16T09:37:38.000Z
designate/tests/unit/agent/backends/test_knot2.py
mrlesmithjr/designate
bff3d5f6e31fe595a77143ec4ac779c187bf72a8
[ "Apache-2.0" ]
109
2015-01-13T16:47:34.000Z
2021-03-15T13:18:48.000Z
# Copyright 2016 Hewlett Packard Enterprise Development Company LP # # Author: Federico Ceratto <federico.ceratto@hpe.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....
34.295154
77
0.668337
# Copyright 2016 Hewlett Packard Enterprise Development Company LP # # Author: Federico Ceratto <federico.ceratto@hpe.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....
0
3,830
0
2,977
0
0
0
104
202
40ddc8c8799f42573a12874cbe3b8060f292dffc
12,191
py
Python
helpers.py
drhay53/SALT2X
5d51ded9d6feabe9846edc2f75f7956efbc38fa4
[ "MIT" ]
null
null
null
helpers.py
drhay53/SALT2X
5d51ded9d6feabe9846edc2f75f7956efbc38fa4
[ "MIT" ]
null
null
null
helpers.py
drhay53/SALT2X
5d51ded9d6feabe9846edc2f75f7956efbc38fa4
[ "MIT" ]
null
null
null
import gzip import cPickle def save(object, filename, protocol=-1): """Saves a compressed object to disk """ file = gzip.GzipFile(filename, 'wb') cPickle.dump(object, file, protocol) file.close() def load( filename ): """Loads a compressed object from disk """ file = gzip.GzipFile(fil...
43.539286
100
0.573948
import numpy as np import sncosmo import glob from astropy import units as u import os import gzip import cPickle def dump_emcee_results(chains, outfile, sn_name, z, chisq, dof, survey, maxll=True): res = {} for k in chains.keys(): res[k] = np.percentile(chains[k], [16,50,84]) if maxll: max...
0
0
0
0
0
11,550
0
-23
179
23f316fa700def2a79c10c119d90eb86450d0415
2,139
py
Python
Friend Requests I: Overall Acceptance Rate.py
sugia/leetcode
6facec2a54d1d9f133f420c9bce1d1043f57ebc6
[ "Apache-2.0" ]
null
null
null
Friend Requests I: Overall Acceptance Rate.py
sugia/leetcode
6facec2a54d1d9f133f420c9bce1d1043f57ebc6
[ "Apache-2.0" ]
null
null
null
Friend Requests I: Overall Acceptance Rate.py
sugia/leetcode
6facec2a54d1d9f133f420c9bce1d1043f57ebc6
[ "Apache-2.0" ]
null
null
null
''' In social network like Facebook or Twitter, people send friend requests and accept others requests as well. Now given two tables as below: Table: friend_request | sender_id | send_to_id |request_date| |-----------|------------|------------| | 1 | 2 | 2016_06-01 | | 1 | 3 | 2016_0...
43.653061
267
0.639551
''' In social network like Facebook or Twitter, people send friend requests and accept others’ requests as well. Now given two tables as below: Table: friend_request | sender_id | send_to_id |request_date| |-----------|------------|------------| | 1 | 2 | 2016_06-01 | | 1 | 3 | 2016_...
9
0
0
0
0
0
0
0
0
a1d4e584d97619329c33386cbfb861427f859e1c
2,283
py
Python
src/sst/elements/merlin/tests/dragon_128_test.py
deanchester/sst-elements
cad5463b1a954ce36cd810b0f1df8ea6c453cc5d
[ "BSD-3-Clause" ]
null
null
null
src/sst/elements/merlin/tests/dragon_128_test.py
deanchester/sst-elements
cad5463b1a954ce36cd810b0f1df8ea6c453cc5d
[ "BSD-3-Clause" ]
null
null
null
src/sst/elements/merlin/tests/dragon_128_test.py
deanchester/sst-elements
cad5463b1a954ce36cd810b0f1df8ea6c453cc5d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright 2009-2021 NTESS. Under the terms # of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. # # Copyright (c) 2009-2021, NTESS # All rights reserved. # # This file is part of the SST software package. For license # information, see the LICEN...
25.651685
69
0.659658
#!/usr/bin/env python # # Copyright 2009-2021 NTESS. Under the terms # of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. # # Copyright (c) 2009-2021, NTESS # All rights reserved. # # This file is part of the SST software package. For license # information, see the LICEN...
0
0
0
0
0
0
0
34
111
604d06d6f7e65ec0ddbc58b09ced396170ba7187
2,280
py
Python
Archive/boardConvert.py
KristofferLM96/TsetlinMachine-GO
926091fc70042abe5a67230932398bdab2c46328
[ "MIT" ]
2
2020-02-27T16:22:08.000Z
2020-03-22T11:04:35.000Z
Archive/boardConvert.py
KristofferLM96/TsetlinMachine-GO
926091fc70042abe5a67230932398bdab2c46328
[ "MIT" ]
null
null
null
Archive/boardConvert.py
KristofferLM96/TsetlinMachine-GO
926091fc70042abe5a67230932398bdab2c46328
[ "MIT" ]
null
null
null
import os import glob import Go import time timestr = time.strftime("%Y%-m%/d--%H-%M-%S") print("Stating at "+timestr) path = 'Data/20181218natsukaze_self/01' output = open("9x9binary.txt", 'w+') board_size = 9 total_pos = 19 for infile in glob.glob(os.path.join(path, '*.sgf')): # print("current file is: " ...
20.727273
53
0.460965
import os import glob import Go import time timestr = time.strftime("%Y%-m%/d--%H-%M-%S") print("Stating at "+timestr) path = 'Data/20181218natsukaze_self/01' output = open("9x9binary.txt", 'w+') board_size = 9 total_pos = 19 def board(inboard): result = inboard[0].split("RE") results = 2 if result[1][...
0
0
0
0
0
1,553
0
0
69
87e514a6b7af5f849fe43a3f7e256919612759f8
17,556
py
Python
python/services/tpu/node.py
trodge/declarative-resource-client-library
2cb7718a5074776b3113cc18a7483b54022238f3
[ "Apache-2.0" ]
16
2021-01-08T19:35:22.000Z
2022-03-23T16:23:49.000Z
python/services/tpu/node.py
trodge/declarative-resource-client-library
2cb7718a5074776b3113cc18a7483b54022238f3
[ "Apache-2.0" ]
1
2021-08-18T19:12:20.000Z
2021-08-18T19:12:20.000Z
python/services/tpu/node.py
LaudateCorpus1/declarative-resource-client-library
a559c4333587fe9531cef150532e6fcafff153e4
[ "Apache-2.0" ]
11
2021-03-18T11:27:28.000Z
2022-03-12T06:49:14.000Z
# Copyright 2021 Google LLC. All Rights Reserved. # # 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 o...
34.833333
87
0.665527
# Copyright 2021 Google LLC. All Rights Reserved. # # 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 o...
0
6,401
0
9,521
0
0
0
109
911
c1a3a720520fa0181a91ab42bf42bd43717d8ce3
1,181
py
Python
mariner/server/app.py
hansale/mariner
c4fd5575f35ad4dd859009c87218b9b3a20cc95c
[ "MIT" ]
null
null
null
mariner/server/app.py
hansale/mariner
c4fd5575f35ad4dd859009c87218b9b3a20cc95c
[ "MIT" ]
1
2021-04-19T05:19:31.000Z
2021-04-19T05:19:31.000Z
mariner/server/app.py
hansale/mariner
c4fd5575f35ad4dd859009c87218b9b3a20cc95c
[ "MIT" ]
null
null
null
import os from flask import Flask from flask_wtf.csrf import CSRFProtect from whitenoise import WhiteNoise frontend_dist_directory: str = get_frontend_assets_path() app: Flask = Flask( __name__, template_folder=frontend_dist_directory, static_folder=frontend_dist_directory, ) csrf = CSRFProtect(app) # p...
26.840909
88
0.701101
import os from pathlib import Path from typing import Sequence from flask import Flask from flask_wtf.csrf import CSRFProtect from whitenoise import WhiteNoise def get_frontend_assets_path() -> str: potential_paths: Sequence[Path] = [ Path("./frontend/dist/"), Path("/opt/venvs/mariner3d/dist/"), ...
0
0
0
0
0
402
0
9
67
91fc3bb5bed6c734453bcdad540f121435202d8e
3,886
py
Python
tests/test_sagemaker/test_sagemaker_models.py
Preskton/moto
c9c30b82867294030833cef292db167955bc8240
[ "Apache-2.0" ]
1
2021-04-06T12:48:00.000Z
2021-04-06T12:48:00.000Z
tests/test_sagemaker/test_sagemaker_models.py
Preskton/moto
c9c30b82867294030833cef292db167955bc8240
[ "Apache-2.0" ]
null
null
null
tests/test_sagemaker/test_sagemaker_models.py
Preskton/moto
c9c30b82867294030833cef292db167955bc8240
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals
31.852459
87
0.67473
# -*- coding: utf-8 -*- from __future__ import unicode_literals import boto3 from botocore.exceptions import ClientError import pytest from moto import mock_sagemaker import sure # noqa from moto.sagemaker.models import VpcConfig class MySageMakerModel(object): def __init__(self, name, arn, container=None, vp...
0
2,783
0
677
0
0
0
27
327
5cbc1b71b78f93c32f8df97c87ded94330fb97f5
8,798
py
Python
code/marscudasim/simulators.py
GandalfSaxe/letomes
5f73a4066fcf69260cb538c105acf898b22e756d
[ "MIT" ]
null
null
null
code/marscudasim/simulators.py
GandalfSaxe/letomes
5f73a4066fcf69260cb538c105acf898b22e756d
[ "MIT" ]
null
null
null
code/marscudasim/simulators.py
GandalfSaxe/letomes
5f73a4066fcf69260cb538c105acf898b22e756d
[ "MIT" ]
null
null
null
""" Repeatedly run single integration steps for some initial conditions until some stopping conditions. """ import logging import time import numpy as np from orbsim.r4b_3d import UNIT_TIME from new_ephemerides import (get_ephemerides) # from ctypes import cdll cudasim = cdll.LoadLibrary("./libcudasim.so") from ma...
29.622896
88
0.630939
""" Repeatedly run single integration steps for some initial conditions until some stopping conditions. """ import logging import time from decimal import Decimal import numpy as np from orbsim.r4b_3d import UNIT_TIME from new_ephemerides import ( get_coordinates_on_day_rad, get_ephemerides, get_ephemerid...
0
0
0
0
0
3,484
0
72
67
3a4052903ae0ed6b3dfecbb28ea8d1c41cf14ea6
115
py
Python
pulsemaker/__init__.py
anushkrishnav/pulsemaker
598b0b35569a7b3adb4722d0ebd70dd495e12037
[ "Apache-2.0" ]
14
2021-02-13T03:02:45.000Z
2021-12-13T06:03:53.000Z
pulsemaker/__init__.py
anushkrishnav/pulsemaker
598b0b35569a7b3adb4722d0ebd70dd495e12037
[ "Apache-2.0" ]
null
null
null
pulsemaker/__init__.py
anushkrishnav/pulsemaker
598b0b35569a7b3adb4722d0ebd70dd495e12037
[ "Apache-2.0" ]
3
2021-02-08T08:07:21.000Z
2021-12-17T14:16:32.000Z
# __all__ = ['ScheduleEditor', 'PulseDesigner', '...']
38.333333
54
0.721739
# __all__ = ['ScheduleEditor', 'PulseDesigner', '...'] from .ScheduleDesigner import * from .PulseDesigner import *
0
0
0
0
0
0
0
17
44
442b78fd956ddc29812fbf28744892c66a72ed24
8,412
py
Python
applications/SpecialCalculator.py
Justobioma/master-to-pythonista
cce23d6ab0ff026347885a75f7f19f002da7a4aa
[ "MIT" ]
12
2020-10-02T04:49:23.000Z
2022-01-29T07:58:50.000Z
applications/SpecialCalculator.py
Justobioma/master-to-pythonista
cce23d6ab0ff026347885a75f7f19f002da7a4aa
[ "MIT" ]
16
2020-10-02T04:30:23.000Z
2020-10-09T11:11:10.000Z
applications/SpecialCalculator.py
Justobioma/master-to-pythonista
cce23d6ab0ff026347885a75f7f19f002da7a4aa
[ "MIT" ]
23
2020-10-02T04:36:39.000Z
2021-10-18T02:38:35.000Z
#Calculator Description This mini project Calculator is the implementation of Calculator which can perform different arithematic operations. Few of the most required arithematic operations that must be present in this mini-projects are #Result after each operation should be stored for future operations Addition of 2 n...
36.733624
267
0.414051
#Calculator Description This mini project Calculator is the implementation of Calculator which can perform different arithematic operations. Few of the most required arithematic operations that must be present in this mini-projects are #Result after each operation should be stored for future operations Addition of 2 n...
0
0
0
0
0
657
0
0
66
bc61bc3deb32a94e12f374c23920a1ffcfc1c112
1,196
py
Python
orangeshare/shortcuts/handlers/clipboard.py
krzemienski/Orange-Share
26a1cb55c3d147bc16807bbf1faa73350f72be22
[ "MIT" ]
18
2021-07-31T18:10:25.000Z
2022-03-14T01:38:54.000Z
orangeshare/shortcuts/handlers/clipboard.py
krzemienski/Orange-Share
26a1cb55c3d147bc16807bbf1faa73350f72be22
[ "MIT" ]
14
2021-08-06T19:10:01.000Z
2021-12-20T10:21:50.000Z
orangeshare/shortcuts/handlers/clipboard.py
krzemienski/Orange-Share
26a1cb55c3d147bc16807bbf1faa73350f72be22
[ "MIT" ]
2
2021-11-13T15:53:20.000Z
2022-01-23T12:25:32.000Z
import pyperclip from orangeshare import Config from orangeshare.notify import notify def handle_file(file: str, file_name: str): """ Copies the file to clipboard by saving it to a temporary directory and then copying it :param file: The file :param file_name: The filename :return: response for ...
27.181818
90
0.667224
import pyperclip from orangeshare import Config from orangeshare.notify import notify def handle_file(file: str, file_name: str): """ Copies the file to clipboard by saving it to a temporary directory and then copying it :param file: The file :param file_name: The filename :return: response for ...
0
0
0
0
0
0
0
0
0
17e10d247802208013156637d552a79beca33cd7
437
py
Python
app1/migrations/0010_auto_20200623_1709.py
vashuteotia123/zbcvit
da29b3281ccc87481a264b63c5b6c3a549945f33
[ "MIT" ]
6
2021-09-16T16:46:56.000Z
2022-02-06T13:00:08.000Z
app1/migrations/0010_auto_20200623_1709.py
vashuteotia123/zbcvit
da29b3281ccc87481a264b63c5b6c3a549945f33
[ "MIT" ]
null
null
null
app1/migrations/0010_auto_20200623_1709.py
vashuteotia123/zbcvit
da29b3281ccc87481a264b63c5b6c3a549945f33
[ "MIT" ]
1
2021-09-14T09:26:58.000Z
2021-09-14T09:26:58.000Z
# Generated by Django 3.0.6 on 2020-06-23 17:09
23
93
0.624714
# Generated by Django 3.0.6 on 2020-06-23 17:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app1', '0009_auto_20200622_0235'), ] operations = [ migrations.AlterField( model_name='event_photos', name='event_ph...
0
0
0
323
0
0
0
19
46
40bbca1d4fdf15efdfd8c6ec217ff96cdffa3070
13,836
py
Python
src/iris/bin/retention.py
dwang159/iris-api
f607fe4c5595469766470b899950d97570e8aebe
[ "BSD-2-Clause" ]
null
null
null
src/iris/bin/retention.py
dwang159/iris-api
f607fe4c5595469766470b899950d97570e8aebe
[ "BSD-2-Clause" ]
null
null
null
src/iris/bin/retention.py
dwang159/iris-api
f607fe4c5595469766470b899950d97570e8aebe
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license. # See LICENSE in the project root for license information. from gevent import monkey monkey.patch_all() # NOQA import logging import os # metrics stats_reset = { 'sql_errors': 0, 'deleted_messages': 0, 'de...
34.939394
173
0.574371
# Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license. # See LICENSE in the project root for license information. from gevent import monkey, sleep, spawn monkey.patch_all() # NOQA from sqlalchemy import create_engine from collections import deque import logging import ujs...
0
0
0
0
0
11,329
0
23
271
63cb711394d4abb3a585a93f62efc94b1b909989
1,824
py
Python
generator_scripts/transfer_generator.py
antonkulikov401/crypto-exchange
72dc06ef09129a3b50eb9c5dc43f9c909f93501d
[ "MIT" ]
null
null
null
generator_scripts/transfer_generator.py
antonkulikov401/crypto-exchange
72dc06ef09129a3b50eb9c5dc43f9c909f93501d
[ "MIT" ]
null
null
null
generator_scripts/transfer_generator.py
antonkulikov401/crypto-exchange
72dc06ef09129a3b50eb9c5dc43f9c909f93501d
[ "MIT" ]
null
null
null
import random random.seed(a=5) with open('transfer_operation.sql', 'w') as output: output.write('SET SEARCH_PATH = crypto_exchange;\n\nINSERT INTO transfer_operation (account_id, operation_code, operation_amt, external_wallet_no, operation_dttm)\nVALUES\n') for i in range(1, 201): x = round(ran...
55.272727
206
0.600877
import random import time import string def strTimeProp(start, end, format, prop): stime = time.mktime(time.strptime(start, format)) etime = time.mktime(time.strptime(end, format)) ptime = stime + prop * (etime - stime) return time.strftime(format, time.localtime(ptime)) def random_string(st...
0
0
0
0
0
462
0
-18
121
b3a8d54bc27d932ce3d20dc97934a6226c969178
9,515
py
Python
GEOS_Util/coupled_diagnostics/analysis/clim/plot_hice_icesat.py
GEOS-ESM/GMAO_Shared
022af23abbc7883891006b57379be96d9a50df23
[ "NASA-1.3", "ECL-2.0", "Apache-2.0" ]
1
2020-02-01T17:36:53.000Z
2020-02-01T17:36:53.000Z
GEOS_Util/coupled_diagnostics/analysis/clim/plot_hice_icesat.py
GEOS-ESM/GMAO_Shared
022af23abbc7883891006b57379be96d9a50df23
[ "NASA-1.3", "ECL-2.0", "Apache-2.0" ]
105
2019-07-08T19:27:23.000Z
2022-03-22T02:12:16.000Z
GEOS_Util/coupled_diagnostics/analysis/clim/plot_hice_icesat.py
GEOS-ESM/GMAO_Shared
022af23abbc7883891006b57379be96d9a50df23
[ "NASA-1.3", "ECL-2.0", "Apache-2.0" ]
10
2019-07-05T18:00:44.000Z
2022-03-11T16:26:29.000Z
#! /usr/bin/env python from netCDF4 import Dataset import matplotlib import matplotlib.pyplot as plt import numpy as np import numpy.ma as ma import array import matplotlib.cm as cm from mpl_toolkits.basemap import Basemap #import cmocean as cm import glob import struct from importlib import import_module import datet...
30.79288
104
0.665055
#! /usr/bin/env python from netCDF4 import Dataset import matplotlib import matplotlib.pyplot as plt import numpy as np import numpy.ma as ma import array import matplotlib.cm as cm from mpl_toolkits.basemap import Basemap #import cmocean as cm import glob import struct from importlib import import_module import datet...
0
0
0
0
0
1,822
0
0
46
9c652ab9678a33ee54a5984622469d951a7214bd
3,602
py
Python
lib/grizzled/grizzled/net/__init__.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/grizzled/grizzled/net/__init__.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/grizzled/grizzled/net/__init__.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
# $Id: f8ce5bf718c826df5fb3cd06701dc2bf6e144acb $ """ Network-related methods and classes. """ from __future__ import absolute_import __docformat__ = 'restructuredtext en' # --------------------------------------------------------------------------- # Imports # -------------------------------------------------------...
34.634615
93
0.508884
# $Id: f8ce5bf718c826df5fb3cd06701dc2bf6e144acb $ """ Network-related methods and classes. """ from __future__ import absolute_import __docformat__ = 'restructuredtext en' # --------------------------------------------------------------------------- # Imports # -------------------------------------------------------...
0
0
0
0
0
0
0
0
0
04cfa552172955d2da9afeff7d0f8dbdbadd726f
2,047
py
Python
tests/test_iau2010.py
priyatharsan/beyond
1061b870407d316d43e4d1351a7ec026629685ae
[ "MIT" ]
null
null
null
tests/test_iau2010.py
priyatharsan/beyond
1061b870407d316d43e4d1351a7ec026629685ae
[ "MIT" ]
null
null
null
tests/test_iau2010.py
priyatharsan/beyond
1061b870407d316d43e4d1351a7ec026629685ae
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*-
28.041096
108
0.617978
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from pytest import fixture, yield_fixture from unittest.mock import patch from beyond.dates.date import Date from beyond.dates.eop import Eop from beyond.frames.iau2010 import _earth_orientation, _sideral, _planets, _xys, _xysxy2 @fixture def date(mod...
0
328
0
0
0
1,279
0
117
272
64ca67fc71466a53e63e6d5cf36dd68e02152dac
3,248
py
Python
src/aptsources_cleanup/util/strings.py
Hunsu/aptsources-cleanup
e315b837ac55605f79869f383a6a22de0e2add0d
[ "MIT" ]
null
null
null
src/aptsources_cleanup/util/strings.py
Hunsu/aptsources-cleanup
e315b837ac55605f79869f383a6a22de0e2add0d
[ "MIT" ]
null
null
null
src/aptsources_cleanup/util/strings.py
Hunsu/aptsources-cleanup
e315b837ac55605f79869f383a6a22de0e2add0d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 """String utilities""" __all__ = ( "startswith_token", "prefix", "strip", "lstrip", "rstrip", "contains_ordered" ) if __debug__: def startswith_token(s, prefix, separators=None): """Tests if a string is either equal to a given prefix or prefixed by it followed by a separator. """ if separ...
21.228758
75
0.680727
# -*- coding: utf-8 """String utilities""" __all__ = ( "startswith_token", "prefix", "strip", "lstrip", "rstrip", "contains_ordered" ) import operator if __debug__: import collections from warnings import warn from .itertools import map_pairs def startswith_token(s, prefix, separators=None): """Tests if a st...
0
0
0
0
0
2,249
0
6
345
d6e986b440e81e3140749f3ca33755a4502b017a
690
py
Python
src/shorten_.py
23subbhashit/house_prediction
6a71645cb86e39d60709adb9142ce14392711323
[ "MIT" ]
null
null
null
src/shorten_.py
23subbhashit/house_prediction
6a71645cb86e39d60709adb9142ce14392711323
[ "MIT" ]
null
null
null
src/shorten_.py
23subbhashit/house_prediction
6a71645cb86e39d60709adb9142ce14392711323
[ "MIT" ]
1
2021-06-16T13:54:29.000Z
2021-06-16T13:54:29.000Z
import joblib import pandas as pd from lightgbm import LGBMRegressor as lgbr train = pd.read_csv('../data/train_.csv') X = train.drop('SalePrice', axis=1) y = train.SalePrice model = lgbr(bagging_fraction=0.8, bagging_freq=5, feature_fraction=0.5, min_child_samples=91, min_split_gain=0.9, n_estimators=300...
34.5
76
0.702899
import joblib import pandas as pd from lightgbm import LGBMRegressor as lgbr train = pd.read_csv('../data/train_.csv') X = train.drop('SalePrice', axis=1) y = train.SalePrice model = lgbr(bagging_fraction=0.8, bagging_freq=5, feature_fraction=0.5, min_child_samples=91, min_split_gain=0.9, n_estimators=300...
0
0
0
0
0
0
0
0
0
06402e61138355e371fa03631e3636cd4fc77795
384
py
Python
scgv/tests/conftest.py
lchorbadjiev/SCGV
7b2fd1fbada7bea49166e37bcb82bd742617fe51
[ "MIT" ]
8
2017-03-31T19:55:36.000Z
2021-01-22T09:11:40.000Z
scgv/tests/conftest.py
lchorbadjiev/SCGV
7b2fd1fbada7bea49166e37bcb82bd742617fe51
[ "MIT" ]
null
null
null
scgv/tests/conftest.py
lchorbadjiev/SCGV
7b2fd1fbada7bea49166e37bcb82bd742617fe51
[ "MIT" ]
2
2019-06-11T09:07:01.000Z
2020-09-25T02:30:22.000Z
''' Created on Dec 2, 2016 @author: lubo '''
15.36
44
0.734375
''' Created on Dec 2, 2016 @author: lubo ''' import pytest from scgv.models.model import DataModel @pytest.fixture def example_data(): return 'exampledata/example.archive.zip' @pytest.fixture def example_dir(): return 'exampledata/example.directory' @pytest.fixture def model_fixture(example_data): mo...
0
212
0
0
0
0
0
10
113
b49d8203a438874b2c7d7f936929aa10a9a79d2b
792
py
Python
project euler solutions/Problem_059.py
helq/old_code
a432faf1b340cb379190a2f2b11b997b02d1cd8d
[ "CC0-1.0" ]
null
null
null
project euler solutions/Problem_059.py
helq/old_code
a432faf1b340cb379190a2f2b11b997b02d1cd8d
[ "CC0-1.0" ]
4
2020-03-10T19:20:21.000Z
2021-06-07T15:39:48.000Z
project euler solutions/Problem_059.py
helq/old_code
a432faf1b340cb379190a2f2b11b997b02d1cd8d
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- text_encrypt = "".join(map(lambda x: chr(x), eval( "[" + open("059-cipher1.txt", "Ur").readline()[:-1] + "]" ))) posible_pass = [chr(i) + chr(j) + chr(k) for i in range(97,123) for j in range(97,123) for k in range(97,123)] max_num_space = 0 for i in range(len(posible_p...
36
112
0.645202
#!/usr/bin/env python2 # -*- coding: utf-8 -*- def decrypt(text,passw): l = min(len(text), len(passw)) if l == 0: return "" return "".join(chr(ord(text[n])^ord(passw[n])) for n in xrange(l) ) + decrypt(text[l:], passw) text_encrypt = "".join(map(lambda x: chr(x), eval( "[" + open("059-cipher1.txt", "Ur")....
0
0
0
0
0
162
0
0
23
2398c32ad9341e731e460520a5c6098d1c343559
4,794
py
Python
votesim/models/spatialerror.py
johnh865/election_sim
b73b7e65f1bb22abb82cbe8442fcf02b0c20894e
[ "MIT" ]
8
2019-10-21T23:24:51.000Z
2021-09-14T03:04:59.000Z
votesim/models/spatialerror.py
johnh865/election_sim
b73b7e65f1bb22abb82cbe8442fcf02b0c20894e
[ "MIT" ]
2
2021-02-09T23:52:47.000Z
2021-02-10T04:08:35.000Z
votesim/models/spatialerror.py
johnh865/election_sim
b73b7e65f1bb22abb82cbe8442fcf02b0c20894e
[ "MIT" ]
1
2019-10-21T23:32:18.000Z
2019-10-21T23:32:18.000Z
# -*- coding: utf-8 -*- """ Voter spatials models with variations of voter behavior of 1. Voter Error -- Voters with error in regret/distance calculation 2. Voter Ignorance -- Voters with limited memory and will only evaluate a finite number of candidates. 3. Min/Max voters -- Voters who min/max their scored bal...
29.411043
79
0.531915
# -*- coding: utf-8 -*- """ Voter spatials models with variations of voter behavior of 1. Voter Error -- Voters with error in regret/distance calculation 2. Voter Ignorance -- Voters with limited memory and will only evaluate a finite number of candidates. 3. Min/Max voters -- Voters who min/max their scored bal...
0
2,077
0
2,070
0
0
0
37
116
ab68289e321515913d739b86fff7164b757e7f0e
2,552
py
Python
tests/test_build_gettext.py
methane/python-doc-ja.sphinx-ja
b911f63318ac715733b5c10dfbc197549c85044f
[ "BSD-2-Clause" ]
1
2015-03-22T16:49:07.000Z
2015-03-22T16:49:07.000Z
tests/test_build_gettext.py
methane/python-doc-ja.sphinx-ja
b911f63318ac715733b5c10dfbc197549c85044f
[ "BSD-2-Clause" ]
null
null
null
tests/test_build_gettext.py
methane/python-doc-ja.sphinx-ja
b911f63318ac715733b5c10dfbc197549c85044f
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ test_build_gettext ~~~~~~~~~~~~~~~~~~ Test the build process with gettext builder with the test root. :copyright: Copyright 2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """
31.121951
79
0.576411
# -*- coding: utf-8 -*- """ test_build_gettext ~~~~~~~~~~~~~~~~~~ Test the build process with gettext builder with the test root. :copyright: Copyright 2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import gettext import os from subprocess import Popen, PIPE fr...
0
2,052
0
0
0
41
0
-5
204
86c4fa41463e8d16a655ab7d9082bccd043f0005
1,413
py
Python
step/make_aug_fg.py
suyukun666/CDA
c254b10deff624ee06d62cfd84f2b602a4a046d5
[ "MIT" ]
68
2021-03-03T02:17:22.000Z
2022-03-14T03:39:05.000Z
step/make_aug_fg.py
junzai0215/CDA
7d0502c58e72c95e4381828c3728d9ad6e181ba6
[ "MIT" ]
2
2021-11-21T12:01:00.000Z
2022-01-18T04:16:13.000Z
step/make_aug_fg.py
junzai0215/CDA
7d0502c58e72c95e4381828c3728d9ad6e181ba6
[ "MIT" ]
25
2021-03-18T16:58:29.000Z
2022-03-08T02:41:03.000Z
import scipy.misc as misc
32.860465
88
0.61005
import numpy as np import os import scipy.misc as misc def run(args): for i in range(20): os.makedirs(os.path.join(args.sem_seg_out_fg_dir,str(i)), exist_ok=True) for seg_img in os.listdir(args.sem_seg_out_dir): id=seg_img.split('.')[0] img=misc.imread(os.path.join(args.voc12_root,'JP...
6
0
0
0
0
1,334
0
-15
67
2d5d1a49c3ef8b888c9d98df43d5e8a96c869229
3,325
py
Python
backend/authentication/views.py
vindem22/work-hour-registration
05daac6bc1504658909dc396e48cc8100ec1747c
[ "Apache-2.0" ]
null
null
null
backend/authentication/views.py
vindem22/work-hour-registration
05daac6bc1504658909dc396e48cc8100ec1747c
[ "Apache-2.0" ]
null
null
null
backend/authentication/views.py
vindem22/work-hour-registration
05daac6bc1504658909dc396e48cc8100ec1747c
[ "Apache-2.0" ]
null
null
null
from api.models import Employee # Create your views here.
28.177966
74
0.610226
from api.models import Employee import json import requests from django.conf import settings from rest_framework import viewsets, status from rest_framework.decorators import action from rest_framework.permissions import AllowAny, IsAuthenticated from rest_framework.response import Response from rest_framework.views ...
0
1,013
0
1,621
0
0
0
312
317
62b1ab2a38ad816fabf72bcd78abf18896cf136c
1,904
py
Python
test/azure/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/_auto_rest_parameterized_host_test_client_async.py
fearthecowboy/autorest.python
a251e361218598b55b0621db2275aafcb7158a5c
[ "MIT" ]
null
null
null
test/azure/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/_auto_rest_parameterized_host_test_client_async.py
fearthecowboy/autorest.python
a251e361218598b55b0621db2275aafcb7158a5c
[ "MIT" ]
null
null
null
test/azure/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/_auto_rest_parameterized_host_test_client_async.py
fearthecowboy/autorest.python
a251e361218598b55b0621db2275aafcb7158a5c
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
38.08
89
0.691702
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
0
0
0
1,168
0
0
0
127
113
b23de71ee927cb4e73bad9f1544521a78c740a57
3,161
py
Python
tests/test_transformers.py
nth-attempt/whatlies
3347fa57cf7eaa40a79723a4a4623c844874333d
[ "Apache-2.0" ]
null
null
null
tests/test_transformers.py
nth-attempt/whatlies
3347fa57cf7eaa40a79723a4a4623c844874333d
[ "Apache-2.0" ]
null
null
null
tests/test_transformers.py
nth-attempt/whatlies
3347fa57cf7eaa40a79723a4a4623c844874333d
[ "Apache-2.0" ]
null
null
null
from whatlies.language import SpacyLanguage from whatlies.transformers import Noise, AddRandom, Normalizer, Umap, Tsne, Pca words = [ "prince", "princess", "nurse", "doctor", "banker", "man", "woman", "cousin", "neice", "king", "queen", "dude", "guy", "gal", ...
23.766917
88
0.635558
import pytest import numpy as np from sklearn.preprocessing import normalize from whatlies.language import SpacyLanguage from whatlies.transformers import Noise, AddRandom, Normalizer, Umap, Tsne, Pca from whatlies.transformers._transformer import Transformer, SklearnTransformer words = [ "prince", "princess...
0
1,134
0
0
0
782
0
68
227
2ccab1647909393692687dbe282aba4839530e4c
1,994
py
Python
tests/transformations_test/UselessSymbolsRemove/SimpleTest.py
PatrikValkovic/grammpy
8308a1fd349bf9ea0d267360cc9a4ab20d1629e8
[ "MIT" ]
1
2021-02-04T12:41:08.000Z
2021-02-04T12:41:08.000Z
tests/transformations_test/UselessSymbolsRemove/SimpleTest.py
PatrikValkovic/grammpy
8308a1fd349bf9ea0d267360cc9a4ab20d1629e8
[ "MIT" ]
3
2017-07-08T16:28:52.000Z
2020-04-23T18:06:24.000Z
tests/transformations_test/UselessSymbolsRemove/SimpleTest.py
PatrikValkovic/grammpy
8308a1fd349bf9ea0d267360cc9a4ab20d1629e8
[ "MIT" ]
1
2021-02-04T12:41:10.000Z
2021-02-04T12:41:10.000Z
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 17.08.2017 14:39 :Licence MIT Part of grammpy """ from unittest import main if __name__ == '__main__': main()
31.650794
68
0.615848
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 17.08.2017 14:39 :Licence MIT Part of grammpy """ from unittest import TestCase, main from grammpy import * from grammpy.transforms import ContextFree class S(Nonterminal): pass class A(Nonterminal): pass class B(Nonterminal): pass class RuleSto0(Rule): rule...
0
0
0
1,563
0
0
0
31
222
65f42b99aad9a3fb329a8fc54bd3f2db23081be0
28,001
py
Python
tests/test_distribution.py
coordinape/coordinape-protocol
8c90de1b1fbc19bab05e1c5848813d022492753a
[ "MIT" ]
22
2021-10-17T23:19:38.000Z
2022-03-24T05:13:56.000Z
tests/test_distribution.py
coordinape/coordinape-protocol
8c90de1b1fbc19bab05e1c5848813d022492753a
[ "MIT" ]
12
2021-09-29T16:27:03.000Z
2022-03-30T17:54:08.000Z
tests/test_distribution.py
coordinape/coordinape-protocol
8c90de1b1fbc19bab05e1c5848813d022492753a
[ "MIT" ]
4
2021-10-14T19:08:36.000Z
2022-03-29T16:42:21.000Z
TAP_BASE = 1 TAP_PROFIT = 0
60.871739
197
0.732581
from brownie import accounts, chain, reverts, Wei import json import time TAP_BASE = 1 TAP_PROFIT = 0 def setup_protocol(ape_reg, ape_fee, ape_distro, ape_router_registry_beacon, ape_factory_registry_beacon, minter): set_fee_call = ape_reg.setFeeRegistry.encode_input(ape_fee) set_router_call = ape_reg.setRout...
0
0
0
0
0
27,622
0
8
342
f0c490fd8322d2f4e878b3d7953356a0c3141974
6,433
py
Python
serverpkg/asyncChecker.py
noam1023/technion-iem-ds_lab
22493a981ce90ce8a4f342adfaa5ebf7486bcd03
[ "MIT" ]
null
null
null
serverpkg/asyncChecker.py
noam1023/technion-iem-ds_lab
22493a981ce90ce8a4f342adfaa5ebf7486bcd03
[ "MIT" ]
11
2019-06-30T12:20:13.000Z
2021-05-30T11:04:23.000Z
serverpkg/asyncChecker.py
noam1023/technion-iem-ds_lab
22493a981ce90ce8a4f342adfaa5ebf7486bcd03
[ "MIT" ]
4
2019-04-04T12:39:38.000Z
2021-11-10T18:13:44.000Z
import re from .logger import Logger logger = Logger(__name__).logger def _extract_run_time(string): """ extract the runtime that we wrote as the last line in the stderr stream supplied in string :param string: the stderr stream. last line looks like: 0.5 user 1.6 system :return: run time in seconds...
46.615942
135
0.610602
import re import subprocess import threading from .logger import Logger from .server_codes import ExitCode logger = Logger(__name__).logger def _extract_run_time(string): """ extract the runtime that we wrote as the last line in the stderr stream supplied in string :param string: the stderr stream. last...
0
0
0
5,141
0
0
0
4
89
84802f69e3e86455949e9e1fe78deca3b7c8b671
24,175
py
Python
cemu/ui/main.py
clayne/cemu
ec661f5cb79e15d908bdef6db20e42d3c84b8dc9
[ "MIT" ]
null
null
null
cemu/ui/main.py
clayne/cemu
ec661f5cb79e15d908bdef6db20e42d3c84b8dc9
[ "MIT" ]
null
null
null
cemu/ui/main.py
clayne/cemu
ec661f5cb79e15d908bdef6db20e42d3c84b8dc9
[ "MIT" ]
null
null
null
import cemu.core import cemu.plugins
37.078221
122
0.579111
import functools import pathlib import tempfile from typing import Callable, Optional from PyQt6.QtCore import QFileInfo, QSettings, Qt from PyQt6.QtGui import QAction, QIcon from PyQt6.QtWidgets import (QApplication, QDockWidget, QFileDialog, QGridLayout, QLabel, QMainWindow, QMenu, ...
0
0
0
23,108
0
0
0
541
487
0194f09c7c259d70cdb8c1bf8b95cf286b728dbd
273
py
Python
examples/transformer/config_reddit.py
qkaren/texar
38bbb70ea9d389e3e2c092d213389e9c6b99b824
[ "Apache-2.0" ]
null
null
null
examples/transformer/config_reddit.py
qkaren/texar
38bbb70ea9d389e3e2c092d213389e9c6b99b824
[ "Apache-2.0" ]
null
null
null
examples/transformer/config_reddit.py
qkaren/texar
38bbb70ea9d389e3e2c092d213389e9c6b99b824
[ "Apache-2.0" ]
null
null
null
batch_size = 4000 #256 test_batch_size = 8 max_train_epoch = 100 display_steps = 200 eval_steps = 10000 #4000 #2000 max_decoding_length= 30 filename_prefix = "processed." input_dir = 'temp/run_query_response_bpe/data' vocab_file = input_dir + '/processed.vocab.pickle'
19.5
50
0.78022
batch_size = 4000 #256 test_batch_size = 8 max_train_epoch = 100 display_steps = 200 eval_steps = 10000 #4000 #2000 max_decoding_length= 30 filename_prefix = "processed." input_dir = 'temp/run_query_response_bpe/data' vocab_file = input_dir + '/processed.vocab.pickle'
0
0
0
0
0
0
0
0
0
590e0d54b5bbca362551bb78aabce6b08696cf66
11,644
py
Python
cube2x2.py
MatheusMAssis/Magic_Cube-Project
40e0bbe7362cd8a6b80fb08883eec0d725625812
[ "MIT" ]
null
null
null
cube2x2.py
MatheusMAssis/Magic_Cube-Project
40e0bbe7362cd8a6b80fb08883eec0d725625812
[ "MIT" ]
null
null
null
cube2x2.py
MatheusMAssis/Magic_Cube-Project
40e0bbe7362cd8a6b80fb08883eec0d725625812
[ "MIT" ]
null
null
null
#--- auxiliar function ---# #--- cube class (in this case, a 2x2x2) ---#
36.3875
81
0.428203
import numpy as np import random as rd #--- auxiliar function ---# def change(n): color_dict = {0: 'W', 1: 'O', 2: 'G', 3: 'R', 4: 'B', 5: 'Y'} return color_dict[n] #--- cube class (in this case, a 2x2x2) ---# class cu...
0
0
0
11,310
0
174
0
-5
90
f90e18aefe02d14e1d2609dc35cfa3d5f9db403f
4,575
py
Python
test/test_basic_sim.py
top-sim/topsim
90cb3cff2612ced3d51f94fe852dc814dcca7730
[ "MIT" ]
2
2022-03-30T01:19:20.000Z
2022-03-30T02:53:51.000Z
test/test_basic_sim.py
firewood1996/topsim
90cb3cff2612ced3d51f94fe852dc814dcca7730
[ "MIT" ]
15
2020-10-21T08:35:12.000Z
2022-01-20T07:55:24.000Z
test/test_basic_sim.py
firewood1996/topsim
90cb3cff2612ced3d51f94fe852dc814dcca7730
[ "MIT" ]
1
2021-11-02T14:21:05.000Z
2021-11-02T14:21:05.000Z
# Copyright (C) 6/11/20 RW Bunney # This program 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) any later version. # This program is distributed in the...
34.923664
78
0.668197
# Copyright (C) 6/11/20 RW Bunney # This program 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) any later version. # This program is distributed in the...
0
0
0
3,235
0
0
0
103
156
125498bccd0b3e247bdd9210f18f55f1879db290
3,479
py
Python
src/performance/evaluate_VAN.py
echoyi/MAPSED
98452e0101bc907c63bcf03666a3de955ebfb2ce
[ "MIT" ]
3
2021-11-23T04:34:05.000Z
2021-12-07T05:55:26.000Z
src/performance/evaluate_VAN.py
echoyi/MAPSED
98452e0101bc907c63bcf03666a3de955ebfb2ce
[ "MIT" ]
null
null
null
src/performance/evaluate_VAN.py
echoyi/MAPSED
98452e0101bc907c63bcf03666a3de955ebfb2ce
[ "MIT" ]
null
null
null
import torch from torch.utils.data import DataLoader from src.model.mapsed import MAPSED from src.model.vae.conv_vae import ConvVAE from src.utils.load_data import load_seq_data import numpy as np import pandas as pd if __name__ == '__main__': device = torch.device('cuda') vae = ConvVAE(input_channels=4).to(...
42.950617
102
0.647887
import torch from torch.utils.data import DataLoader from src.model.mapsed import MAPSED from src.model.vae.conv_vae import ConvVAE from src.utils.calculate_seq_loss import calculate_seq_loss from src.utils.load_data import load_seq_data, normalize_data_tensor, recover_data_tensor import numpy as np import pandas as pd...
0
0
0
0
0
858
0
82
45
c32e8925ddf3fef99c15df0a6c1b5094c7f63de8
2,566
py
Python
company/views.py
hamblin/django-denmark.org
8b23a44b9d4307a883b601d9a4683ceb1aa33965
[ "MIT" ]
null
null
null
company/views.py
hamblin/django-denmark.org
8b23a44b9d4307a883b601d9a4683ceb1aa33965
[ "MIT" ]
null
null
null
company/views.py
hamblin/django-denmark.org
8b23a44b9d4307a883b601d9a4683ceb1aa33965
[ "MIT" ]
null
null
null
# Create your views here. # CreateView # DetailView # CompanyDetailViewEditUpdate takes 2 parameters LoginRequiredMixin to secure different # functionalities for users when signed in or not and ListView. # UpdateView # DeleteView
32.481013
95
0.746687
from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import CreateView from django.views.generic import DeleteView from django.views.generic import DetailView from django.views.generic import ListView from django.views.generic import UpdateView from .forms import CompanyForm from .models...
0
0
0
1,820
0
0
0
172
333
958156ab77941ea7d857413d35cce677c60c2d6c
3,138
py
Python
appengine/predator/analysis/linear/changelist_features/test/touch_crashed_file_meta_test.py
mcgreevy/chromium-infra
09064105713603f7bf75c772e8354800a1bfa256
[ "BSD-3-Clause" ]
1
2018-01-02T05:47:07.000Z
2018-01-02T05:47:07.000Z
appengine/predator/analysis/linear/changelist_features/test/touch_crashed_file_meta_test.py
mcgreevy/chromium-infra
09064105713603f7bf75c772e8354800a1bfa256
[ "BSD-3-Clause" ]
null
null
null
appengine/predator/analysis/linear/changelist_features/test/touch_crashed_file_meta_test.py
mcgreevy/chromium-infra
09064105713603f7bf75c772e8354800a1bfa256
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
44.197183
80
0.728171
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import mock import unittest from analysis.analysis_testcase import AnalysisTestCase from analysis.crash_report import CrashReport from analysis.linear.chang...
0
0
0
1,983
0
0
0
527
465
dcf7a0fecda5cddb81b53094ea2739c4ded5a2b5
192
py
Python
zazi/apps/identity/urls.py
felixcheruiyot/zazi-core-banking
0a2dac42235adcac3cf8c114961e407f54844223
[ "Apache-2.0" ]
null
null
null
zazi/apps/identity/urls.py
felixcheruiyot/zazi-core-banking
0a2dac42235adcac3cf8c114961e407f54844223
[ "Apache-2.0" ]
1
2021-08-20T06:41:57.000Z
2021-08-20T06:41:57.000Z
zazi/apps/identity/urls.py
felixcheruiyot/zazi-core-banking
0a2dac42235adcac3cf8c114961e407f54844223
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^identity/verify/$', views.verify_identity, name='verify_identity'), ]
24
78
0.75
from django.conf.urls import url, include from django.urls import reverse from . import views urlpatterns = [ url(r'^identity/verify/$', views.verify_identity, name='verify_identity'), ]
0
0
0
0
0
0
0
19
22
348ceb2ebfe6d8aa174a88dac18c9edb9af86e29
1,360
py
Python
update_resources.py
steppi/famplex
ed09bf583b38a46b951cf8635871272c95df7fb8
[ "CC0-1.0" ]
11
2018-06-14T18:23:52.000Z
2021-12-16T14:06:59.000Z
update_resources.py
steppi/famplex
ed09bf583b38a46b951cf8635871272c95df7fb8
[ "CC0-1.0" ]
97
2018-03-29T15:15:58.000Z
2021-11-10T12:49:51.000Z
update_resources.py
steppi/famplex
ed09bf583b38a46b951cf8635871272c95df7fb8
[ "CC0-1.0" ]
12
2018-03-28T17:52:02.000Z
2022-03-29T23:16:54.000Z
"""This script moves resources and exports from the top level of the repo into the corresponding folders within the Python package. Resource files and exports are only checked into version control at the top level and are copied into the package by setup.py upon installation. If a user clones this repo with the intent...
48.571429
78
0.719118
"""This script moves resources and exports from the top level of the repo into the corresponding folders within the Python package. Resource files and exports are only checked into version control at the top level and are copied into the package by setup.py upon installation. If a user clones this repo with the intent...
0
0
0
0
0
0
0
0
0
a455345587c4acf914cf5aa80e95e1080c55f4f3
511
py
Python
06-Microservices/RESTful/fig/source/JSON-vs-XML.py
zgsolucoes/Treinamento
22a223fd0853785191bf54eb3c94ba5ac4f87c2d
[ "Apache-2.0" ]
4
2017-04-24T19:57:00.000Z
2018-08-22T23:46:17.000Z
06-Microservices/RESTful/fig/source/JSON-vs-XML.py
zgsolucoes/Treinamento
22a223fd0853785191bf54eb3c94ba5ac4f87c2d
[ "Apache-2.0" ]
null
null
null
06-Microservices/RESTful/fig/source/JSON-vs-XML.py
zgsolucoes/Treinamento
22a223fd0853785191bf54eb3c94ba5ac4f87c2d
[ "Apache-2.0" ]
3
2017-06-24T03:39:10.000Z
2019-10-24T18:22:37.000Z
import plotly.offline as py import plotly.graph_objs as go data = [go.Bar(x=['JSON', 'XML'], y=[26.2, 77.3])] layout = go.Layout( title='JSON vs XML', yaxis=dict( title='KB', titlefont=dict( family='Courier New, monospace', size=18, color='#7f7f7f' )...
20.44
50
0.563601
import plotly.offline as py import plotly.graph_objs as go data = [go.Bar(x=['JSON', 'XML'], y=[26.2, 77.3])] layout = go.Layout( title='JSON vs XML', yaxis=dict( title='KB', titlefont=dict( family='Courier New, monospace', size=18, color='#7f7f7f' )...
0
0
0
0
0
0
0
0
0
978288aa0328cef821303dd2c4d886c6b544f17f
1,844
py
Python
fusion_tests/fsnGenNotation.py
ReDeFinance/web3fsnpy
a825c607f2320e0352b77242e985f423e94f00bf
[ "MIT" ]
4
2019-11-01T23:20:25.000Z
2022-01-16T06:07:25.000Z
fusion_tests/fsnGenNotation.py
ReDeFinance/web3fsnpy
a825c607f2320e0352b77242e985f423e94f00bf
[ "MIT" ]
2
2021-06-02T00:27:51.000Z
2021-11-05T16:58:15.000Z
fusion_tests/fsnGenNotation.py
ReDeFinance/web3fsnpy
a825c607f2320e0352b77242e985f423e94f00bf
[ "MIT" ]
5
2019-09-03T10:00:48.000Z
2021-12-21T04:42:15.000Z
#!/usr/bin/env python3 # """ Demonstrate generating a USAN notation on Fusion. """ # # import os #import pdb ; pdb.set_trace() #web3fusion from web3fsnpy import Fsn # Remember to set your environment variables to run this test # e.g. export FSN_PRIVATE_KEY=123456789123456789ABCDEF linkToChain = { 'ne...
21.694118
130
0.693059
#!/usr/bin/env python3 # """ Demonstrate generating a USAN notation on Fusion. """ # # import os import sys #import pdb ; pdb.set_trace() #web3fusion from web3fsnpy import Fsn # Remember to set your environment variables to run this test # e.g. export FSN_PRIVATE_KEY=123456789123456789ABCDEF linkToChain...
0
0
0
0
0
0
0
-10
22
8683e761562f97cad618979ac2a7f309156daf4a
1,402
py
Python
bigquery/samples/update_routine.py
DaveCheez/google-cloud-python
fc03d4d41f13e9d13db7206438163b3a471fdabd
[ "Apache-2.0" ]
null
null
null
bigquery/samples/update_routine.py
DaveCheez/google-cloud-python
fc03d4d41f13e9d13db7206438163b3a471fdabd
[ "Apache-2.0" ]
null
null
null
bigquery/samples/update_routine.py
DaveCheez/google-cloud-python
fc03d4d41f13e9d13db7206438163b3a471fdabd
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
31.155556
79
0.667618
# Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
0
0
803
0
0
23
004a94a9286cda6fb4e91373cd1677ad467b21f5
10,299
py
Python
cogs/permissions.py
laminarity/the-bot
74c1472c882b7337a275801b3fd127af73282949
[ "MIT" ]
2
2021-06-22T16:57:39.000Z
2021-06-22T16:58:09.000Z
cogs/permissions.py
laminarity/the-bot
74c1472c882b7337a275801b3fd127af73282949
[ "MIT" ]
null
null
null
cogs/permissions.py
laminarity/the-bot
74c1472c882b7337a275801b3fd127af73282949
[ "MIT" ]
1
2021-06-23T15:41:43.000Z
2021-06-23T15:41:43.000Z
import sys import mysql.connector sys.path.insert(1, '../') sys.path.insert(1, '../constants') #MySQL stuff mydb = mysql.connector.connect( host= sql.host, user= sql.user, password= sql.password, database= sql.database, port= sql.port ) c = mydb.cursor() #Loading Cog
36.136842
235
0.623653
import discord from discord.ext import commands import sys import mysql.connector sys.path.insert(1, '../') from config import * sys.path.insert(1, '../constants') from colors import * from constants import * #MySQL stuff mydb = mysql.connector.connect( host= sql.host, user= sql.user, passwo...
0
9,544
0
63
0
123
0
4
247
46edd31d33c743a5caa871a15ab0e8201c587d15
542
py
Python
1/longest_consecutive_sequence.py
IronCore864/leetcode
a62a4cdde9814ae48997176debcaad537f7ad01f
[ "Apache-2.0" ]
4
2018-03-07T02:56:03.000Z
2021-06-15T05:43:31.000Z
1/longest_consecutive_sequence.py
IronCore864/leetcode
a62a4cdde9814ae48997176debcaad537f7ad01f
[ "Apache-2.0" ]
null
null
null
1/longest_consecutive_sequence.py
IronCore864/leetcode
a62a4cdde9814ae48997176debcaad537f7ad01f
[ "Apache-2.0" ]
1
2021-09-02T12:05:15.000Z
2021-09-02T12:05:15.000Z
s = Solution() print s.longestConsecutive([100, 4, 200, 1, 3, 2]) print s.longestConsecutive([1, 2, 3])
23.565217
50
0.426199
class Solution(object): def longestConsecutive(self, nums): """ :type nums: List[int] :rtype: int """ nums = set(nums) result = 0 for x in nums: if x - 1 not in nums: l = 1 y = x + 1 while y in nums: ...
0
0
0
414
0
0
0
0
22
db2494a2a726da9527bae572a902a882cb5ec050
21,838
py
Python
orghtml.py
Anti-Distinctlyminty/orgextended
621fbbcd32b0558964bf5d05a4024a7a00c9a766
[ "MIT" ]
null
null
null
orghtml.py
Anti-Distinctlyminty/orgextended
621fbbcd32b0558964bf5d05a4024a7a00c9a766
[ "MIT" ]
null
null
null
orghtml.py
Anti-Distinctlyminty/orgextended
621fbbcd32b0558964bf5d05a4024a7a00c9a766
[ "MIT" ]
null
null
null
import re import regex import OrgExtended.orgparse.node as node import OrgExtended.orgutil.util as util import logging import sys log = logging.getLogger(__name__) # Global properties I AT LEAST want to support. # Both as a property on the document and in our settings. #+OPTIONS: num:nil toc:nil #+REVEAL_TRANS: Non...
30.542657
184
0.649831
import sublime import sublime_plugin import datetime import re import regex from pathlib import Path import os import fnmatch import OrgExtended.orgparse.node as node from OrgExtended.orgparse.sublimenode import * import OrgExtended.orgutil.util as util import OrgExtended.orgutil.navigation as nav import OrgExtended...
0
0
0
13,751
0
3,968
0
165
944
6615c512889a5b55c9d0831a40848d81567a3b8e
214
py
Python
Python/110-1/Midterm Exam/001.py
JenFuChen/NKUST
bd80a449eddfdaf75709379d2e904ff70d409666
[ "MIT" ]
3
2021-11-07T17:33:54.000Z
2021-12-28T08:31:20.000Z
Python/110-1/Midterm Exam/001.py
JenFuChen/NKUST
bd80a449eddfdaf75709379d2e904ff70d409666
[ "MIT" ]
null
null
null
Python/110-1/Midterm Exam/001.py
JenFuChen/NKUST
bd80a449eddfdaf75709379d2e904ff70d409666
[ "MIT" ]
null
null
null
# 01 f = open("input.txt", mode='r') min = 0 for line in f.readlines(): num = int(line) if min < num: min = num f2 = open("output.txt", mode='w') print(min, file=f2) f.close() f2.close()
17.833333
34
0.53271
# 01 f = open("input.txt", mode='r') min = 0 for line in f.readlines(): num = int(line) if min < num: min = num f2 = open("output.txt", mode='w') print(min, file=f2) f.close() f2.close()
0
0
0
0
0
0
0
0
0
b358888d55cd09df77f9f662466353b85f1a2241
710
py
Python
sctokenizer/assets/java_keywords.py
ngocjr7/sctokenizer
05564a6b58e21ae0469aa2ab19919c4c7937a37f
[ "MIT" ]
5
2020-09-07T16:21:26.000Z
2020-10-07T13:18:12.000Z
sctokenizer/assets/java_keywords.py
ngocjr7/sctokenizer
05564a6b58e21ae0469aa2ab19919c4c7937a37f
[ "MIT" ]
2
2021-07-21T05:11:05.000Z
2021-07-23T06:29:40.000Z
sctokenizer/assets/java_keywords.py
ngocjr7/sctokenizer
05564a6b58e21ae0469aa2ab19919c4c7937a37f
[ "MIT" ]
null
null
null
java_keyword_set = { 'abstract', 'assert', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'const', 'continue', 'default', 'do', 'double', 'else', 'enum', 'extends', 'final', 'finally', 'float', 'for', 'goto', 'if'...
13.653846
20
0.429577
java_keyword_set = { 'abstract', 'assert', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'const', 'continue', 'default', 'do', 'double', 'else', 'enum', 'extends', 'final', 'finally', 'float', 'for', 'goto', 'if'...
0
0
0
0
0
0
0
0
0
f476d1a3025c0f67c99b1df46161691d776fe317
2,354
py
Python
mars/services/cluster/tests/backend.py
wjsi/mars
a69fb19edfe748d4393b90ff2c4941a76c084596
[ "Apache-2.0" ]
1
2022-02-02T03:03:48.000Z
2022-02-02T03:03:48.000Z
mars/services/cluster/tests/backend.py
wjsi/mars
a69fb19edfe748d4393b90ff2c4941a76c084596
[ "Apache-2.0" ]
null
null
null
mars/services/cluster/tests/backend.py
wjsi/mars
a69fb19edfe748d4393b90ff2c4941a76c084596
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # 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 a...
35.134328
82
0.684367
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # 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 a...
0
1,498
0
0
0
0
0
68
112
f032f538000b57b7c47e090a702b409344f3d9c3
962
py
Python
tests/test_progarchives.py
9seconds/rymtracks
a9233ad24c8eff5190cf1a2870ea6eca5619f44b
[ "MIT" ]
1
2022-01-19T11:46:02.000Z
2022-01-19T11:46:02.000Z
tests/test_progarchives.py
9seconds/rymtracks
a9233ad24c8eff5190cf1a2870ea6eca5619f44b
[ "MIT" ]
null
null
null
tests/test_progarchives.py
9seconds/rymtracks
a9233ad24c8eff5190cf1a2870ea6eca5619f44b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for ProgArchives service. """ if __name__ == "__main__": from mixins import FetchMixin else: from unittest import main ############################################################################## ######################################################...
21.377778
78
0.456341
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for ProgArchives service. """ if __name__ == "__main__": from mixins import FetchMixin else: from .mixins import FetchMixin from six import u from unittest import TestCase, main ########################################################################...
0
0
0
479
0
0
0
15
72
4598f20dd4aefd3a0b282f042ef924338144d20a
11,793
py
Python
cuzdi_toolbox.py
parallaxe1/cuzdi_mask
6b6fdb357354e75a8f2b8d6f4b4d33dc6f9e0721
[ "MIT" ]
null
null
null
cuzdi_toolbox.py
parallaxe1/cuzdi_mask
6b6fdb357354e75a8f2b8d6f4b4d33dc6f9e0721
[ "MIT" ]
null
null
null
cuzdi_toolbox.py
parallaxe1/cuzdi_mask
6b6fdb357354e75a8f2b8d6f4b4d33dc6f9e0721
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Tue Dec 15 18:02:25 2015 @author: a.mester """ #import numpy import math def m2pt( m_value ): "meter to pt" #m2pt = 2.835270768e3*m_value m2pt = 1e3 * m_value # m2mm - update 2020 return m2pt def deg2rad( deg_value ): "degree to radian...
51.723684
470
0.596371
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Tue Dec 15 18:02:25 2015 @author: a.mester """ #import numpy import math import string def m2pt( m_value ): "meter to pt" #m2pt = 2.835270768e3*m_value m2pt = 1e3 * m_value # m2mm - update 2020 return m2pt def deg2rad( deg_value ): "de...
14
0
0
0
0
11,323
0
-8
91
9f223b174011fedf231c202a1cc6142069293e93
708
py
Python
day01_solve_puzzle2.py
olsgaard/adventofcode2019
1e14fd38f472cde894cbbbd7eebdd6545cd4c4ee
[ "MIT" ]
1
2019-12-05T20:08:07.000Z
2019-12-05T20:08:07.000Z
day01_solve_puzzle2.py
olsgaard/adventofcode2019
1e14fd38f472cde894cbbbd7eebdd6545cd4c4ee
[ "MIT" ]
null
null
null
day01_solve_puzzle2.py
olsgaard/adventofcode2019
1e14fd38f472cde894cbbbd7eebdd6545cd4c4ee
[ "MIT" ]
null
null
null
""" So, for each module mass, calculate its fuel and add it to the total. Then, treat the fuel amount you just calculated as the input mass and repeat the process, continuing until a fuel requirement is zero or negative. """ assert calculate_fuels_fuel(14) == 2 assert calculate_fuels_fuel(1969) == 966 assert calcul...
27.230769
90
0.713277
""" So, for each module mass, calculate its fuel and add it to the total. Then, treat the fuel amount you just calculated as the input mass and repeat the process, continuing until a fuel requirement is zero or negative. """ def calculate_fuel(mass): return int(mass / 3) - 2 def calculate_fuels_fuel(mass): ...
0
0
0
0
0
168
0
0
46
4fbb620dd4c264c8f94e19702dbc6a7426a52c7a
449
py
Python
for_testing.py
MrSakaikun/ExtractTopicWord
5bfcd0320f4fe6b265df2664e73eaff67d8bc7a0
[ "MIT" ]
null
null
null
for_testing.py
MrSakaikun/ExtractTopicWord
5bfcd0320f4fe6b265df2664e73eaff67d8bc7a0
[ "MIT" ]
null
null
null
for_testing.py
MrSakaikun/ExtractTopicWord
5bfcd0320f4fe6b265df2664e73eaff67d8bc7a0
[ "MIT" ]
null
null
null
text_for_test = [ '', '', '' ] if __name__ == '__main__': main()
20.409091
97
0.599109
from extract_topicword import ExtractTopicWord text_for_test = [ '明日は元気に研究しに行く予定だ.', '電気通信大学は良い大学だ.', '数学の成績が良い.' ] def main(): #話題語抽出器の読み込み etw = ExtractTopicWord(corpus_choice='for_test', conditional_noun='all', format='binaryfile') #テスト for text in text_for_test: print(text) print...
156
0
0
0
0
255
0
25
45
1d84310462d153c62dc560b37bf4bda5d6c3fcd1
5,118
py
Python
lis/utils/afwa/retune_bratseth/scripts/semivar.py
KathyNie/LISF
5c3e8b94494fac5ff76a1a441a237e32af420d06
[ "Apache-2.0" ]
67
2018-11-13T21:40:54.000Z
2022-02-23T08:11:56.000Z
lis/utils/usaf/retune_bratseth/scripts/semivar.py
dmocko/LISF
08d024d6d5fe66db311e43e78740842d653749f4
[ "Apache-2.0" ]
679
2018-11-13T20:10:29.000Z
2022-03-30T19:55:25.000Z
lis/utils/usaf/retune_bratseth/scripts/semivar.py
dmocko/LISF
08d024d6d5fe66db311e43e78740842d653749f4
[ "Apache-2.0" ]
119
2018-11-08T15:53:35.000Z
2022-03-28T10:16:01.000Z
#!/usr/bin/env python3 """ SCRIPT: semivar.py Contains common functions used by both fit_semivariogram.py and plot_semivariogram.py. REVISION HISTORY: 20 Nov 2020: Eric Kemp. Initial specification. """ # Standard library import os import sys # Other libraries import numpy as np #-----------------------------------...
32.598726
79
0.555881
#!/usr/bin/env python3 """ SCRIPT: semivar.py Contains common functions used by both fit_semivariogram.py and plot_semivariogram.py. REVISION HISTORY: 20 Nov 2020: Eric Kemp. Initial specification. """ # Standard library import configparser import os import sys # Other libraries import numpy as np #---------------...
0
0
0
0
0
0
0
-2
22
b758e05b038b56ca95f3f687d44742172bb9f569
1,859
py
Python
synapsesuggestor/urls.py
clbarnes/CATMAID-synapsesuggestor
7b9ffd96c034ca47a6567ebbeb0eff4ece44cb33
[ "MIT" ]
3
2017-07-27T20:33:14.000Z
2018-11-09T11:14:24.000Z
synapsesuggestor/urls.py
clbarnes/CATMAID-synapsesuggestor
7b9ffd96c034ca47a6567ebbeb0eff4ece44cb33
[ "MIT" ]
10
2017-09-29T14:43:32.000Z
2018-11-13T19:19:22.000Z
synapsesuggestor/urls.py
clbarnes/CATMAID-synapsesuggestor
7b9ffd96c034ca47a6567ebbeb0eff4ece44cb33
[ "MIT" ]
1
2018-06-15T19:12:55.000Z
2018-06-15T19:12:55.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from synapsesuggestor.control import (treenode_association as node_assoc, synapse_detection as syn_det, workflow, analysis, training_data) app_name = 'synapsesuggestor' urlpatterns = [] # synapse detection endpoints u...
38.729167
114
0.749866
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from synapsesuggestor.control import ( treenode_association as node_assoc, synapse_detection as syn_det, workflow, analysis, training_data ) app_name = 'synapsesuggestor' urlpatterns = [] # synapse detection endpoi...
0
0
0
0
0
0
0
6
0
95e33dd33f74d65f9d756245f2c105ffb4a9915d
916
py
Python
launcher.py
Timofey-Lutsenko/InfoTechTest
9f8b15f1e949a21087871794dc7dbb55466c39a4
[ "MIT" ]
null
null
null
launcher.py
Timofey-Lutsenko/InfoTechTest
9f8b15f1e949a21087871794dc7dbb55466c39a4
[ "MIT" ]
null
null
null
launcher.py
Timofey-Lutsenko/InfoTechTest
9f8b15f1e949a21087871794dc7dbb55466c39a4
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger('mainapp.log') # Opening console on start if __name__ == '__main__': launcher()
25.444444
75
0.548035
import subprocess import logging import os logger = logging.getLogger('mainapp.log') def path_checker(path): if os.path.exists(path): return True else: return False # Opening console on start def launcher(): print('Input get src_path dst_path - to download file from Dr...
0
0
0
0
0
693
0
-16
94
d33ac18f5ed307a392b1d646c1cdac16a5d4aaa4
6,880
py
Python
Mfold/data/_rna.py
old-dasadan/DNAScoring
b22cdb50c184f09199690d222008195767d0314f
[ "MIT" ]
null
null
null
Mfold/data/_rna.py
old-dasadan/DNAScoring
b22cdb50c184f09199690d222008195767d0314f
[ "MIT" ]
null
null
null
Mfold/data/_rna.py
old-dasadan/DNAScoring
b22cdb50c184f09199690d222008195767d0314f
[ "MIT" ]
null
null
null
"""Parse the energies from Turner, 2004 to rna.py.""" from os import path DIR = path.dirname(path.realpath(__file__)) DIR_DATA = path.join(DIR, "..", "data") DE = path.join(DIR_DATA, "rna.dangle.txt") # input files DE_DH = path.join(DIR_DATA, "rna.dangle.dh.txt") LOOP = path.join(DIR_DATA, "rna.loop.txt"...
28.907563
89
0.519477
"""Parse the energies from Turner, 2004 to rna.py.""" from os import path DIR = path.dirname(path.realpath(__file__)) DIR_DATA = path.join(DIR, "..", "data") DE = path.join(DIR_DATA, "rna.dangle.txt") # input files DE_DH = path.join(DIR_DATA, "rna.dangle.dh.txt") LOOP = path.join(DIR_DATA, "rna.loop.txt"...
0
0
0
0
0
2,373
0
0
112
61c53bd884818c62faef28ac94fcedc9ef4b1fbc
2,062
py
Python
tests/python/gaia-ui-tests/gaiatest/tests/functional/browser/test_browser_navigation.py
jedp/gaia
1379d47a41a479fec4c7ac7106afaaa02fcc800e
[ "Apache-2.0" ]
1
2017-09-09T12:55:56.000Z
2017-09-09T12:55:56.000Z
tests/python/gaia-ui-tests/gaiatest/tests/functional/browser/test_browser_navigation.py
jedp/gaia
1379d47a41a479fec4c7ac7106afaaa02fcc800e
[ "Apache-2.0" ]
null
null
null
tests/python/gaia-ui-tests/gaiatest/tests/functional/browser/test_browser_navigation.py
jedp/gaia
1379d47a41a479fec4c7ac7106afaaa02fcc800e
[ "Apache-2.0" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
37.490909
121
0.728419
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette.by import By from gaiatest import GaiaTestCase from gaiatest.apps.browser.app import Browser class Te...
0
0
0
1,728
0
0
0
43
91
3182c95b8df7b3db2f759556629d18b8c5e0c9c4
5,607
py
Python
evaluate.py
wuzhanghui/postrate
24291edbc8df9b88f347aee132a128c78d17cc21
[ "Apache-2.0" ]
null
null
null
evaluate.py
wuzhanghui/postrate
24291edbc8df9b88f347aee132a128c78d17cc21
[ "Apache-2.0" ]
null
null
null
evaluate.py
wuzhanghui/postrate
24291edbc8df9b88f347aee132a128c78d17cc21
[ "Apache-2.0" ]
null
null
null
import os import argparse from douzero.evaluation.simulation import evaluate if __name__ == '__main__': # # parser = argparse.ArgumentParser( # 'Dou Dizhu Evaluation') # parser.add_argument('--landlord', type=str, # default='baselines/ADP/landlord.ckpt') # parser.add_...
47.923077
96
0.658463
import os import argparse from douzero.evaluation.simulation import evaluate if __name__ == '__main__': #测试农民 # parser = argparse.ArgumentParser( # 'Dou Dizhu Evaluation') # parser.add_argument('--landlord', type=str, # default='baselines/ADP/landlord.ckpt') # parser....
27
0
0
0
0
0
0
0
0
044a64fffec87d06815a68b5ce9520b9d4e4ebe1
1,808
py
Python
test_snowflake.py
TuskyOrg/snowflake-python-client
c64b9e34135a9fbdff9b745da762da8dd77f607c
[ "MIT" ]
null
null
null
test_snowflake.py
TuskyOrg/snowflake-python-client
c64b9e34135a9fbdff9b745da762da8dd77f607c
[ "MIT" ]
null
null
null
test_snowflake.py
TuskyOrg/snowflake-python-client
c64b9e34135a9fbdff9b745da762da8dd77f607c
[ "MIT" ]
null
null
null
import pytest if __name__ == "__main__": pytest.main()
26.202899
85
0.705199
import datetime from unittest.mock import patch import pytest import _fake_service import tusky_snowflake @pytest.fixture() def flake(): return tusky_snowflake.Snowflake("43755317257211904") def test_eq(flake: tusky_snowflake.Snowflake): assert flake == 43755317257211904 another_flake = tusky_snowflak...
0
911
0
0
0
550
0
4
273
d010d18e38886adf16da8a661f8546bba6c3ed64
2,821
py
Python
bot.py
ajchili/SquatBot
96506bafb238ea136eef2f51ec24c0fd9440564d
[ "Apache-2.0" ]
1
2018-02-09T21:32:12.000Z
2018-02-09T21:32:12.000Z
bot.py
ajchili/SquatBot
96506bafb238ea136eef2f51ec24c0fd9440564d
[ "Apache-2.0" ]
null
null
null
bot.py
ajchili/SquatBot
96506bafb238ea136eef2f51ec24c0fd9440564d
[ "Apache-2.0" ]
null
null
null
import socket HOST = 'irc.twitch.tv' PORT = 6667 NAME = 'squat_bot' PASS = '' CHANNEL = 'thebasementintern' CONNECT_MESSAGE = 'Come on ladies move those muscles!' CHEERS = [ 'cheer', 'Kappa', 'DansGame', 'EleGiggle', 'TriHard', 'Kreygasm', '4Head', 'SwiftRage', 'NotLikeThis', 'FailFish', 'VoHiYo', 'PJSalt'...
25.645455
184
0.571783
import socket import os HOST = 'irc.twitch.tv' PORT = 6667 NAME = 'squat_bot' PASS = '' CHANNEL = 'thebasementintern' CONNECT_MESSAGE = 'Come on ladies move those muscles!' CHEERS = [ 'cheer', 'Kappa', 'DansGame', 'EleGiggle', 'TriHard', 'Kreygasm', '4Head', 'SwiftRage', 'NotLikeThis', 'FailFish', 'VoHiYo...
0
0
0
0
0
1,082
0
-12
223
25abacc583cb6abd62c62330b622fc4173ca4f70
2,221
py
Python
morphocell/image.py
alxndrkalinin/morphocell
00e2529756c95e8a6ccf06c2a222ac5eff9de328
[ "MIT" ]
null
null
null
morphocell/image.py
alxndrkalinin/morphocell
00e2529756c95e8a6ccf06c2a222ac5eff9de328
[ "MIT" ]
null
null
null
morphocell/image.py
alxndrkalinin/morphocell
00e2529756c95e8a6ccf06c2a222ac5eff9de328
[ "MIT" ]
null
null
null
"""Contains a simple class for storing image data."""
32.661765
99
0.578118
"""Contains a simple class for storing image data.""" from typing import Optional, Sequence import numpy as np from .gpu import get_gpu_info, get_device, get_image_method class Image: """A simple class to store NumPy/CuPy image data and metadata.""" gpu_info = get_gpu_info() def __init__( self...
0
0
0
2,024
0
0
0
51
91
f581ad6899e7bb1b28379889a63d34c055c340ce
391
py
Python
RecoBTag/Combined/python/candidateChargeBTagComputer_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
RecoBTag/Combined/python/candidateChargeBTagComputer_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
RecoBTag/Combined/python/candidateChargeBTagComputer_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms candidateChargeBTagComputer = cms.ESProducer("CandidateChargeBTagESProducer", useCondDB = cms.bool(False), gbrForestLabel = cms.string(""), weightFile = cms.FileInPath('RecoBTag/Combined/data/ChargeBTag_4sep_2016.weights.xml.gz'), useAdaBoost = cms.bool(True), ...
35.545455
94
0.741688
import FWCore.ParameterSet.Config as cms candidateChargeBTagComputer = cms.ESProducer("CandidateChargeBTagESProducer", useCondDB = cms.bool(False), gbrForestLabel = cms.string(""), weightFile = cms.FileInPath('RecoBTag/Combined/data/ChargeBTag_4sep_2016.weights.xml.gz'), useAdaBoost = cms.bool(True), ...
0
0
0
0
0
0
0
0
0
2cc0746b93e46e395c6b923ab384970679f67296
220
py
Python
dosed/datasets/__init__.py
BadrYoubiIdrissi/dosed
d4cefc11f85b0fca4c8dd947331dfa7b63ac9e26
[ "MIT" ]
40
2019-04-12T16:18:40.000Z
2022-03-02T07:03:58.000Z
dosed/datasets/__init__.py
BadrYoubiIdrissi/dosed
d4cefc11f85b0fca4c8dd947331dfa7b63ac9e26
[ "MIT" ]
5
2019-10-28T14:19:20.000Z
2021-08-19T07:43:41.000Z
dosed/datasets/__init__.py
BadrYoubiIdrissi/dosed
d4cefc11f85b0fca4c8dd947331dfa7b63ac9e26
[ "MIT" ]
15
2019-04-13T22:14:42.000Z
2022-02-27T14:57:38.000Z
from .dataset import EventDataset, BalancedEventDataset from .utils import collate, get_train_validation_test __all__ = [ "EventDataset", "collate", "BalancedEventDataset", "get_train_validation_test" ]
22
55
0.759091
from .dataset import EventDataset, BalancedEventDataset from .utils import collate, get_train_validation_test __all__ = [ "EventDataset", "collate", "BalancedEventDataset", "get_train_validation_test" ]
0
0
0
0
0
0
0
0
0
9b04290a32f68fa56cda3182595fe0fc26858f3f
2,039
py
Python
convolutional_neural_networks/semantic_segmentation/run_session_code.py
jithari/Autonomous-World-Mentoring
67ff9199bdf678313139af8aeadaa6d27d365504
[ "MIT" ]
null
null
null
convolutional_neural_networks/semantic_segmentation/run_session_code.py
jithari/Autonomous-World-Mentoring
67ff9199bdf678313139af8aeadaa6d27d365504
[ "MIT" ]
null
null
null
convolutional_neural_networks/semantic_segmentation/run_session_code.py
jithari/Autonomous-World-Mentoring
67ff9199bdf678313139af8aeadaa6d27d365504
[ "MIT" ]
2
2021-02-02T15:25:16.000Z
2021-02-02T15:59:36.000Z
import cv2 MODEL_PATH = r"models/enet-model.net" NET_INPUT = (1024, 512) RED = [255, 0, 0] ORANGE = [255, 165, 0] YELLOW = [255, 255, 0] GREEN = [0, 255, 0] BLUE = [0, 0, 255] INDIGO = [75, 0, 130] VIOLET = [238, 130, 238] BLACK = [0, 0, 0] GRAY = [127, 127, 127] WHITE = [255, 255, 255] CYAN = [0, 255, 255] PURPLE = ...
20.188119
64
0.600294
import cv2 import imutils import numpy as np MODEL_PATH = r"models/enet-model.net" NET_INPUT = (1024, 512) RED = [255, 0, 0] ORANGE = [255, 165, 0] YELLOW = [255, 255, 0] GREEN = [0, 255, 0] BLUE = [0, 0, 255] INDIGO = [75, 0, 130] VIOLET = [238, 130, 238] BLACK = [0, 0, 0] GRAY = [127, 127, 127] WHITE = [255, 255, 2...
0
0
0
0
0
881
0
-10
90
4a1f96b05c411192ba7f31908baaeca076432642
1,652
py
Python
src/common/dynamiccode/dynamiccode.py
catarinaacsilva/security_auction
f0b76ad47ca8cc211fd90712c2090b8e5ff934a5
[ "MIT" ]
null
null
null
src/common/dynamiccode/dynamiccode.py
catarinaacsilva/security_auction
f0b76ad47ca8cc211fd90712c2090b8e5ff934a5
[ "MIT" ]
1
2021-06-01T23:30:44.000Z
2021-06-01T23:30:44.000Z
src/common/dynamiccode/dynamiccode.py
catarinaacsilva/security_auction
f0b76ad47ca8cc211fd90712c2090b8e5ff934a5
[ "MIT" ]
null
null
null
import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger('DC') logger.setLevel(logging.DEBUG)
30.036364
103
0.592615
import sys import logging from RestrictedPython import compile_restricted from RestrictedPython import safe_builtins logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger('DC') logger.setLevel(logging.DEBUG) class DynamicCode: @static...
0
1,263
0
-3
0
0
0
36
170
f33574b1ea2a3689cc168276ec9b1fd327e69616
122
py
Python
app/app.py
noosxe/rules_python_example
8dcd8e46da1e97d5f4a531b7861da0037c80c58d
[ "MIT" ]
null
null
null
app/app.py
noosxe/rules_python_example
8dcd8e46da1e97d5f4a531b7861da0037c80c58d
[ "MIT" ]
null
null
null
app/app.py
noosxe/rules_python_example
8dcd8e46da1e97d5f4a531b7861da0037c80c58d
[ "MIT" ]
null
null
null
import requests response = requests.get('https://google.com') print(f'response status code was {response.status_code}')
20.333333
57
0.762295
import requests response = requests.get('https://google.com') print(f'response status code was {response.status_code}')
0
0
0
0
0
0
0
0
0
339563e6ea9aacaae46f1e2e64f1fcd2e66e53fc
1,464
py
Python
jp.atcoder/abc170/abc170_e/30759780.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc170/abc170_e/30759767.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc170/abc170_e/30759780.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
24
66
0.487022
import typing import heapq def main() -> None: n, q = map(int, input().split()) K = 1 << 18 rate_queues = [[] for _ in range(K)] rate = [-1] * n belongs_to = [-1] * n for i in range(n): r, j = map(int, input().split()) j -= 1 belongs_to[i] = j ...
0
0
0
0
0
1,364
0
-17
71
7c268b5b87557c08cd39ec8b65123cbf2784f3a1
498
py
Python
agate/tableset/to_csv.py
andriyor/agate
9b12d4bcc75bf3788e0774e23188f4409c3e7519
[ "MIT" ]
663
2016-02-16T13:43:00.000Z
2022-03-13T17:21:19.000Z
agate/tableset/to_csv.py
andriyor/agate
9b12d4bcc75bf3788e0774e23188f4409c3e7519
[ "MIT" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
agate/tableset/to_csv.py
andriyor/agate
9b12d4bcc75bf3788e0774e23188f4409c3e7519
[ "MIT" ]
122
2016-02-23T02:43:24.000Z
2022-03-04T17:21:14.000Z
#!/usr/bin/env python import os def to_csv(self, dir_path, **kwargs): """ Write each table in this set to a separate CSV in a given directory. See :meth:`.Table.to_csv` for additional details. :param dir_path: Path to the directory to write the CSV files to. """ if not os.path.e...
21.652174
61
0.62249
#!/usr/bin/env python import os def to_csv(self, dir_path, **kwargs): """ Write each table in this set to a separate CSV in a given directory. See :meth:`.Table.to_csv` for additional details. :param dir_path: Path to the directory to write the CSV files to. """ if not os.path.e...
0
0
0
0
0
0
0
0
0
b30dfde2f601342bf194c249cfb9445c081e3f7f
1,654
py
Python
simulation.py
vporubsky/COMBINE_2020_reproducibility
43ae5cda128845fbb1d63bc22dc97c0afff04c0c
[ "Apache-2.0" ]
null
null
null
simulation.py
vporubsky/COMBINE_2020_reproducibility
43ae5cda128845fbb1d63bc22dc97c0afff04c0c
[ "Apache-2.0" ]
null
null
null
simulation.py
vporubsky/COMBINE_2020_reproducibility
43ae5cda128845fbb1d63bc22dc97c0afff04c0c
[ "Apache-2.0" ]
null
null
null
'''simulation.py Simulation script for model_v003.py which imports fitted parameters k1 and k4 from parameter_estimation.py and curated kinetic constant for k7 from data_aggregation.py.''' from model_v003 import antimony_str import tellurium as te import matplotlib.pyplot as plt from data_aggregation import k7 plt.sty...
37.590909
95
0.769045
'''simulation.py Simulation script for model_v003.py which imports fitted parameters k1 and k4 from parameter_estimation.py and curated kinetic constant for k7 from data_aggregation.py.''' from model_v003 import antimony_str import tellurium as te import matplotlib.pyplot as plt from data_aggregation import k7 plt.sty...
0
0
0
0
0
0
0
0
0
a7ba41a04df4657aef3710ab5d53a9932c9d4299
3,085
py
Python
tests/path_checker/test_convert_file.py
yumechi/webp_image_converter
dd5e3dfa0fb36251fb6b17bae0989d0f8091b677
[ "MIT" ]
null
null
null
tests/path_checker/test_convert_file.py
yumechi/webp_image_converter
dd5e3dfa0fb36251fb6b17bae0989d0f8091b677
[ "MIT" ]
null
null
null
tests/path_checker/test_convert_file.py
yumechi/webp_image_converter
dd5e3dfa0fb36251fb6b17bae0989d0f8091b677
[ "MIT" ]
null
null
null
""" """ import os import pathlib from src.converter import file_conveter from src.converter.logger import Logger INPUT_ROOT_DIR = pathlib.Path("./test_input") OUTPUT_ROOT_DIR = pathlib.Path("./test_output") file_conveter.logger = Logger().get_logger() def test_convert_all(): """ """ file_c...
25.081301
75
0.653485
""" 全体的なテスト """ import os import pathlib import shutil from src.converter import file_conveter from src.converter.logger import Logger INPUT_ROOT_DIR = pathlib.Path("./test_input") OUTPUT_ROOT_DIR = pathlib.Path("./test_output") file_conveter.logger = Logger().get_logger() def cleanup_output_dir_files(): def ...
615
0
0
0
0
251
0
-8
45
41fb4cf019ba99779d442ad3d7e2703eebe1f3d3
463
py
Python
ambvis/system_settings.py
jonasoh/ambvis
ee4d9f8ea12aef079638f183c4124bcf4d2a5368
[ "BSD-2-Clause" ]
null
null
null
ambvis/system_settings.py
jonasoh/ambvis
ee4d9f8ea12aef079638f183c4124bcf4d2a5368
[ "BSD-2-Clause" ]
null
null
null
ambvis/system_settings.py
jonasoh/ambvis
ee4d9f8ea12aef079638f183c4124bcf4d2a5368
[ "BSD-2-Clause" ]
null
null
null
from flask import Blueprint from ambvis.config import Config cfg = Config() bp = Blueprint('system_settings', __name__, url_prefix='/settings/system')
28.9375
105
0.786177
from flask import Blueprint, Response, request, abort, session, redirect, url_for, flash, render_template from ambvis import globals from ambvis.hw import motor, MotorError from ambvis.config import Config from ambvis.logger import log, debug from ambvis.decorators import public_route cfg = Config() bp = Blueprint('s...
0
61
0
0
0
0
0
137
112
d12a2a3afd345455803d15c36a8ae66e6f4bee9b
13,265
py
Python
pytorch/models.py
mimbres/dcase2019_task4
d54cde279a3261494fe7d1d68b65dda5ce3b66cc
[ "MIT" ]
19
2019-03-13T09:09:59.000Z
2021-08-02T15:16:26.000Z
pytorch/models.py
mimbres/dcase2019_task4
d54cde279a3261494fe7d1d68b65dda5ce3b66cc
[ "MIT" ]
2
2019-07-10T15:56:50.000Z
2021-05-13T10:43:12.000Z
pytorch/models.py
mimbres/dcase2019_task4
d54cde279a3261494fe7d1d68b65dda5ce3b66cc
[ "MIT" ]
5
2019-04-10T05:39:42.000Z
2021-09-09T05:58:46.000Z
import torch.nn as nn def init_layer(layer, nonlinearity='leaky_relu'): """Initialize a Linear or Convolutional layer. """ nn.init.kaiming_uniform_(layer.weight, nonlinearity=nonlinearity) if hasattr(layer, 'bias'): if layer.bias is not None: layer.bias.data.fill_(0.) def in...
36.847222
85
0.597738
import math import torch import torch.nn as nn import torch.nn.functional as F from pytorch_utils import interpolate def init_layer(layer, nonlinearity='leaky_relu'): """Initialize a Linear or Convolutional layer. """ nn.init.kaiming_uniform_(layer.weight, nonlinearity=nonlinearity) if hasattr(layer, '...
0
0
0
12,495
0
0
0
7
229
a8e4a4c30d58df87ed1599cd4fd023647f1da263
60
py
Python
spyns/algorithms/__init__.py
datamaterials/spyns
68e8412ba003e2d882373db93f322497be7bff93
[ "MIT" ]
9
2019-12-06T06:54:04.000Z
2022-03-14T00:16:47.000Z
spyns/algorithms/__init__.py
jkglasbrenner/spyns
68e8412ba003e2d882373db93f322497be7bff93
[ "MIT" ]
1
2018-10-31T16:41:07.000Z
2018-11-19T21:19:56.000Z
spyns/algorithms/__init__.py
datamaterials/spyns
68e8412ba003e2d882373db93f322497be7bff93
[ "MIT" ]
2
2019-12-06T06:06:45.000Z
2020-02-12T11:35:30.000Z
# -*- coding: utf-8 -*-
15
34
0.683333
# -*- coding: utf-8 -*- import spyns.algorithms.metropolis
0
0
0
0
0
0
0
13
23
40bb0445ed3e1b9bd72f78e8ebd553ecf67fd482
996
py
Python
python_scripts/check_domain_monophyly.py
Neo-sage/UniveralMarkerEMTW
ad4e21076282ef485e2c9cc11eb10a2dddc09b2e
[ "MIT" ]
null
null
null
python_scripts/check_domain_monophyly.py
Neo-sage/UniveralMarkerEMTW
ad4e21076282ef485e2c9cc11eb10a2dddc09b2e
[ "MIT" ]
null
null
null
python_scripts/check_domain_monophyly.py
Neo-sage/UniveralMarkerEMTW
ad4e21076282ef485e2c9cc11eb10a2dddc09b2e
[ "MIT" ]
null
null
null
from __future__ import print_function import re, sys from ete3 import Tree target_tree = sys.argv[1] #map tip IDs to domain tip_to_domain = {} inh = open("genomemetadata.tsv") for line in inh: fields = re.split("\t", line.rstrip()) tip_to_domain[fields[0]] = fields[21] inh.close() num_arch = 0 num_bact = 0 tree = ...
27.666667
106
0.678715
from __future__ import print_function import os, re, sys from ete3 import Tree target_tree = sys.argv[1] #map tip IDs to domain tip_to_domain = {} inh = open("genomemetadata.tsv") for line in inh: fields = re.split("\t", line.rstrip()) tip_to_domain[fields[0]] = fields[21] inh.close() num_arch = 0 num_bact = 0 tre...
0
0
0
0
0
0
0
4
0
8461013673249ffcfbdd9c685f7daa15ccf50ae7
4,075
py
Python
article/views.py
yubang/tech
3509a86d5be0c45963a1f5c097fe56d9f9dcb769
[ "Apache-2.0" ]
null
null
null
article/views.py
yubang/tech
3509a86d5be0c45963a1f5c097fe56d9f9dcb769
[ "Apache-2.0" ]
null
null
null
article/views.py
yubang/tech
3509a86d5be0c45963a1f5c097fe56d9f9dcb769
[ "Apache-2.0" ]
null
null
null
# coding:UTF-8 def get_labels(obj): """ :param label: :return: list """ if obj: obj.label = obj.label.split(",") return obj
33.401639
97
0.532025
# coding:UTF-8 from django.shortcuts import render_to_response from django.http import HttpResponseNotFound from django.core.exceptions import ObjectDoesNotExist from tech.models import ArticleModel, ArticleReadNumber from django.db.models import F import json def get_labels(obj): """ 获取标签列表 :param labe...
159
0
0
0
0
3,419
0
114
317
756633cf281f6af44b11ce1c8eeb70ae962aa0ce
1,068
py
Python
analysis/top_25_users.py
adunkman/hows-my-driving-dc
c8d9422290a75eb06d9238399154df5d6f88e4b6
[ "MIT" ]
21
2018-07-25T03:47:24.000Z
2021-10-08T19:58:09.000Z
analysis/top_25_users.py
adunkman/hows-my-driving-dc
c8d9422290a75eb06d9238399154df5d6f88e4b6
[ "MIT" ]
18
2018-07-25T14:57:27.000Z
2022-03-11T23:34:01.000Z
analysis/top_25_users.py
adunkman/hows-my-driving-dc
c8d9422290a75eb06d9238399154df5d6f88e4b6
[ "MIT" ]
3
2019-02-17T00:07:30.000Z
2021-10-08T19:58:14.000Z
import sqlite3 import pandas as pd # Establish Connection con= sqlite3.connect(r'../archive.db') cur = con.cursor() # Max Date df = pd.read_sql("""SELECT MAX(date(created_at)) as end_date FROM tweets WHERE (number NOT IN ('NOTAGS', 'notag', 'na')) OR ...
31.411765
83
0.486891
import sqlite3 import pandas as pd import altair as alt from datetime import date # Establish Connection con= sqlite3.connect(r'../archive.db') cur = con.cursor() # Max Date df = pd.read_sql("""SELECT MAX(date(created_at)) as end_date FROM tweets WHERE (nu...
0
0
0
0
0
0
0
3
44
86a9dbe72b71f200bcd22ad04611655a5f03a414
1,752
py
Python
code/app/bookmarks/model.py
TomOrth/trenton-catalog-system
c40a0d7f1b667972baa0db2d53c6c65233de0c30
[ "MIT" ]
2
2021-05-04T20:03:38.000Z
2021-05-05T01:41:26.000Z
code/app/bookmarks/model.py
TomOrth/trenton-catalog-system
c40a0d7f1b667972baa0db2d53c6c65233de0c30
[ "MIT" ]
null
null
null
code/app/bookmarks/model.py
TomOrth/trenton-catalog-system
c40a0d7f1b667972baa0db2d53c6c65233de0c30
[ "MIT" ]
null
null
null
""" BookmarkTranscript model to represent the user_transcript_view By: Tom Orth """
31.854545
99
0.640982
""" BookmarkTranscript model to represent the user_transcript_view By: Tom Orth """ from app.database.entity import Entity class BookmarkTranscript(Entity): """ BookmarkTranscript Entity Class """ def __init__(self): """ Instantiate the object """ self.user_id = -1 ...
0
1,143
0
464
0
0
0
17
44
6e28b70b57732d2994e0b212e99122e11d61d96f
1,024
py
Python
src/main.py
Evelkos/PAM-and-CLARA
26fbb8d2d4a7924ce1d0d504c4b23bac38238c69
[ "MIT" ]
null
null
null
src/main.py
Evelkos/PAM-and-CLARA
26fbb8d2d4a7924ce1d0d504c4b23bac38238c69
[ "MIT" ]
null
null
null
src/main.py
Evelkos/PAM-and-CLARA
26fbb8d2d4a7924ce1d0d504c4b23bac38238c69
[ "MIT" ]
null
null
null
from clustering_algorithms import get_initial_points from data_loaders import load_data from visualizers import plot_data # FILENAME = "datasets/artificial/sizes3.arff" FILENAME = "datasets/artificial/zelnik4.arff" # FILENAME = "datasets/artificial/xclara.arff" # FILENAME = "datasets/real-world/glass.arff" if __na...
30.117647
88
0.709961
from clustering_algorithms import CLARA, PAM, get_initial_points from data_loaders import load_data from timer import Timer from visualizers import plot_data # FILENAME = "datasets/artificial/sizes3.arff" FILENAME = "datasets/artificial/zelnik4.arff" # FILENAME = "datasets/artificial/xclara.arff" # FILENAME = "dataset...
0
0
0
0
0
246
0
14
68
464d85ae39cce95e20d07923fc7623776d8c525f
4,739
py
Python
2017/day14/2017_14.py
stenbein/AdventOfCode
3e8c24f7140dd9cdc687e176272af6a1302a9ca5
[ "MIT" ]
3
2018-04-08T10:40:52.000Z
2018-12-06T02:37:23.000Z
2017/day14/2017_14.py
stenbein/AdventOfCode
3e8c24f7140dd9cdc687e176272af6a1302a9ca5
[ "MIT" ]
2
2018-04-10T11:44:18.000Z
2022-02-22T21:25:54.000Z
2017/day14/2017_14.py
stenbein/AdventOfCode
3e8c24f7140dd9cdc687e176272af6a1302a9ca5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ --- Day 14: Disk Defragmentation --- Cut and pasted the knot hash script from day 10. When I first tackled this problem I omitted some details from the day 10 implementation and ran into errors. It was the intent of the contest designer to use the prior method including the inputs an...
27.876471
103
0.585989
# -*- coding: utf-8 -*- """ --- Day 14: Disk Defragmentation --- Cut and pasted the knot hash script from day 10. When I first tackled this problem I omitted some details from the day 10 implementation and ran into errors. It was the intent of the contest designer to use the prior method including the inputs an...
0
0
0
673
0
2,650
0
0
222
abe6415b697eb5538a80c56b4e6ee3b376258001
18,400
py
Python
The_Garbage_Can_Model_v40.py
Mac13kW/Garbage_Can_Model
d8c79423f5218a8b6b1329f2330e83d5fc761719
[ "MIT" ]
3
2019-04-21T06:44:28.000Z
2021-04-25T10:06:03.000Z
The_Garbage_Can_Model_v40.py
Mac13kW/Garbage_Can_Model
d8c79423f5218a8b6b1329f2330e83d5fc761719
[ "MIT" ]
null
null
null
The_Garbage_Can_Model_v40.py
Mac13kW/Garbage_Can_Model
d8c79423f5218a8b6b1329f2330e83d5fc761719
[ "MIT" ]
5
2016-02-05T04:28:22.000Z
2021-12-17T01:25:52.000Z
print ''' This is a ver 4.0 of the Garbage Can Model (Cohen, March, Olsen, 1972) This model allows cycling over all scenarios and 100 iterations and over parameter space. This would be the final version of the GCM. ----------------------------- Maciej Workiewicz 2014 ''' import random as rnd import numpy as np impor...
44.337349
79
0.5125
print ''' This is a ver 4.0 of the Garbage Can Model (Cohen, March, Olsen, 1972) This model allows cycling over all scenarios and 100 iterations and over parameter space. This would be the final version of the GCM. ----------------------------- Maciej Workiewicz 2014 ''' import random as rnd import numpy as np impor...
0
0
0
0
0
0
0
0
0