hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
676a35038f2f1fa1008bac252e568a2761aaeeed
2,866
py
Python
deepfool.py
LandAndLand/Universal-Adversarial-Perturbations-Pytorch
967bb0aedf924a3836172bf0d4acb8a7ac442048
[ "MIT" ]
39
2019-06-03T21:28:24.000Z
2022-03-26T12:12:16.000Z
deepfool.py
LandAndLand/Universal-Adversarial-Perturbations-Pytorch
967bb0aedf924a3836172bf0d4acb8a7ac442048
[ "MIT" ]
1
2020-02-24T02:02:00.000Z
2020-02-24T02:02:00.000Z
deepfool.py
LandAndLand/Universal-Adversarial-Perturbations-Pytorch
967bb0aedf924a3836172bf0d4acb8a7ac442048
[ "MIT" ]
10
2019-07-05T19:09:57.000Z
2022-02-16T05:38:18.000Z
## This file source is https://github.com/BXuan694/Universal-Adversarial-Perturbation/blob/master/deepfool.py ## This file is not the scope of the original paper of this project import numpy as np from torch.autograd import Variable import torch as torch import copy from torch.autograd.gradcheck import zero_gradients...
33.325581
142
0.618632
55f75811d3b2ede04b0b8b8b6f4bd969afde4971
1,204
py
Python
model/cascade.rcnn/yexiguafu/res50.rcnn.double.heads.two.stages.set.nms/demo.py
yexiguafuqihao/crowddet-megengine
866c0fd3767e8f3cce84a78efc0ff95f23ef6b61
[ "Apache-2.0" ]
1
2022-03-09T06:59:32.000Z
2022-03-09T06:59:32.000Z
model/cascade.rcnn/yexiguafu/res50.rcnn.double.heads.two.stages.set.nms/demo.py
yexiguafuqihao/crowddet-megengine
866c0fd3767e8f3cce84a78efc0ff95f23ef6b61
[ "Apache-2.0" ]
null
null
null
model/cascade.rcnn/yexiguafu/res50.rcnn.double.heads.two.stages.set.nms/demo.py
yexiguafuqihao/crowddet-megengine
866c0fd3767e8f3cce84a78efc0ff95f23ef6b61
[ "Apache-2.0" ]
null
null
null
from config import config from common import * def computeJaccard(fpath, save_path ='results.md'): assert os.path.exists(fpath) records = load_func(fpath) GT = load_func(config.eval_json) fid = open(save_path, 'a') for i in range(3, 10): score_thr = 1e-1 * i results = common_proces...
26.173913
73
0.591362
6aedde51ba335d586bdb455e473e969b9e72abe2
1,670
py
Python
dockerfille_dev/flask_api.py
Bilal-IA/Continuous-Machine-Learning-CML-CI-CD-project
5b5c418241f0d2b6c05bde196348c90769c13518
[ "Apache-2.0" ]
null
null
null
dockerfille_dev/flask_api.py
Bilal-IA/Continuous-Machine-Learning-CML-CI-CD-project
5b5c418241f0d2b6c05bde196348c90769c13518
[ "Apache-2.0" ]
null
null
null
dockerfille_dev/flask_api.py
Bilal-IA/Continuous-Machine-Learning-CML-CI-CD-project
5b5c418241f0d2b6c05bde196348c90769c13518
[ "Apache-2.0" ]
null
null
null
from flask import Flask, request import pickle import flasgger from flasgger import Swagger app=Flask(__name__) Swagger(app) pickle_in = open("model.pkl","rb") reg_model=pickle.load(pickle_in) @app.route('/predict',methods=["Get"]) def predict_house_price(): """Real Estate Price Prediction !!. ...
27.833333
138
0.632335
b5bd07cb92cfaded0d512d59acd3cdf09193dfed
8,049
py
Python
modin/pandas/test/dataframe/test_binary.py
heuermh/modin
2f880c1c93b05dbcaf8120ef6bb75a6adfa2e8e5
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
modin/pandas/test/dataframe/test_binary.py
heuermh/modin
2f880c1c93b05dbcaf8120ef6bb75a6adfa2e8e5
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
modin/pandas/test/dataframe/test_binary.py
heuermh/modin
2f880c1c93b05dbcaf8120ef6bb75a6adfa2e8e5
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
32.719512
94
0.638464
02f2408585678efc2603dabf4e3e519292b9af20
3,979
py
Python
lib/galaxy/datatypes/upload_util.py
astrovsky01/galaxy
e106fd2f0b1a9a2f37a92e634fb8a5dc3d0fe51a
[ "CC-BY-3.0" ]
2
2015-02-23T21:21:44.000Z
2015-06-17T20:10:47.000Z
lib/galaxy/datatypes/upload_util.py
astrovsky01/galaxy
e106fd2f0b1a9a2f37a92e634fb8a5dc3d0fe51a
[ "CC-BY-3.0" ]
8
2015-09-23T15:45:17.000Z
2021-06-30T19:14:19.000Z
lib/galaxy/datatypes/upload_util.py
anvilproject/galaxy
c429c8f12f3788bb1450d8a7b43cfb84831f2c54
[ "CC-BY-3.0" ]
null
null
null
import os from typing import NamedTuple, Optional from galaxy.datatypes import data, sniff from galaxy.util.checkers import ( check_binary, is_single_file_zip, is_zip, ) class UploadProblemException(Exception): pass class HandleUploadResponse(NamedTuple): stdout: Optional[str] ext: str ...
39.79
120
0.671023
c368486fba0ab6bd97ee7297baa78caba3170c2c
538
py
Python
main/xinput/template.py
RoastVeg/cports
803c7f07af341eb32f791b6ec1f237edb2764bd5
[ "BSD-2-Clause" ]
null
null
null
main/xinput/template.py
RoastVeg/cports
803c7f07af341eb32f791b6ec1f237edb2764bd5
[ "BSD-2-Clause" ]
null
null
null
main/xinput/template.py
RoastVeg/cports
803c7f07af341eb32f791b6ec1f237edb2764bd5
[ "BSD-2-Clause" ]
null
null
null
pkgname = "xinput" pkgver = "1.6.3" pkgrel = 0 build_style = "gnu_configure" hostmakedepends = ["pkgconf"] makedepends = [ "libxext-devel", "libxi-devel", "libxrandr-devel", "libxinerama-devel" ] pkgdesc = "X input device configuration utility" maintainer = "q66 <q66@chimera-linux.org>" license = "MIT" url = "https...
29.888889
75
0.737918
a04e5610ec98ac23399936c3693e1730c24fc347
351
py
Python
pressure_vessel_calcs/h_conical_head_calc.py
marciokristo/Pressure_Vessel_Calc
146a656021f694d0faf453cce2a0947eef24158c
[ "MIT" ]
null
null
null
pressure_vessel_calcs/h_conical_head_calc.py
marciokristo/Pressure_Vessel_Calc
146a656021f694d0faf453cce2a0947eef24158c
[ "MIT" ]
null
null
null
pressure_vessel_calcs/h_conical_head_calc.py
marciokristo/Pressure_Vessel_Calc
146a656021f694d0faf453cce2a0947eef24158c
[ "MIT" ]
null
null
null
""" PR_VESSEL 2021 ASME VIII Div.1 Calculation program for Pressure Vessels analysis Created by Marcio Cristo 2021 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. File destinated to create conical ...
39
167
0.811966
51f28545c2e31df4fe0ae246c58c01590dcfada7
3,366
py
Python
Python Programs/consecutive-prime-sum-tcs-codevita.py
muhammad-masood-ur-rehman/Skillrack
71a25417c89d0efab40ee6229ccd758b26ae4312
[ "CC0-1.0" ]
2
2021-06-26T21:50:59.000Z
2021-09-18T04:55:51.000Z
Python Programs/consecutive-prime-sum-tcs-codevita.py
muhammad-masood-ur-rehman/Skillrack
71a25417c89d0efab40ee6229ccd758b26ae4312
[ "CC0-1.0" ]
null
null
null
Python Programs/consecutive-prime-sum-tcs-codevita.py
muhammad-masood-ur-rehman/Skillrack
71a25417c89d0efab40ee6229ccd758b26ae4312
[ "CC0-1.0" ]
null
null
null
Consecutive Prime Sum - TCS CodeVita Some prime numbers can be expressed as a sum of other consecutive prime numbers. · For example o 5 = 2 + 3, o 17 = 2 + 3 + 5 + 7, o 41 = 2 + 3 + 5 + 7 + 11 + 13. Your task is to find out how many prime numbers which satisfy this property are present in the range 3 to N subject to a...
19.125
181
0.45514
3dca01bfccd19f099bd7425174814c2b2876b5e8
5,366
py
Python
KD_Lib/KD/vision/BANN/BANN.py
DA-southampton/KD_Lib
bd4a9b93b9674607ecf467d280d5cab1c516bdc6
[ "MIT" ]
1
2021-11-26T17:46:29.000Z
2021-11-26T17:46:29.000Z
KD_Lib/KD/vision/BANN/BANN.py
DA-southampton/KD_Lib
bd4a9b93b9674607ecf467d280d5cab1c516bdc6
[ "MIT" ]
null
null
null
KD_Lib/KD/vision/BANN/BANN.py
DA-southampton/KD_Lib
bd4a9b93b9674607ecf467d280d5cab1c516bdc6
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import os import glob from copy import deepcopy from KD_Lib.KD.common import BaseClass class BANN(BaseClass): """ Implementation of paper "Born Again Neural Networks" https://arxiv.org/abs/1805.04770 :param student_model (torch.nn.M...
35.773333
134
0.611629
e7037fbf044ecc71e6d33b7cba00759955406b69
4,357
py
Python
keras_frcnn/stanford_dogs_parser.py
bordac6/frcnn-from-scratch-with-keras
f041d360c835d5ec15c3c12bf3658a54ffb20d73
[ "Apache-2.0" ]
null
null
null
keras_frcnn/stanford_dogs_parser.py
bordac6/frcnn-from-scratch-with-keras
f041d360c835d5ec15c3c12bf3658a54ffb20d73
[ "Apache-2.0" ]
null
null
null
keras_frcnn/stanford_dogs_parser.py
bordac6/frcnn-from-scratch-with-keras
f041d360c835d5ec15c3c12bf3658a54ffb20d73
[ "Apache-2.0" ]
null
null
null
import os import cv2 import xml.etree.ElementTree as ET from scipy.io import loadmat import numpy as np def get_data(data_paths): all_imgs = [] classes_count = {} class_mapping = {} visualise = False print("data path:", data_paths) train_list = loadmat(os.path.join(dat...
48.955056
129
0.439982
2141bd975fad1b180f193f014ef9c5533a34f002
1,547
gyp
Python
library/boost-phoenix/1.57.0.gyp
KjellSchubert/bru
dd70b721d07fbd27c57c845cc3a29cd8f2dfc587
[ "MIT" ]
3
2015-01-06T15:22:16.000Z
2015-11-27T18:13:04.000Z
library/boost-phoenix/1.57.0.gyp
KjellSchubert/bru
dd70b721d07fbd27c57c845cc3a29cd8f2dfc587
[ "MIT" ]
7
2015-02-10T15:13:38.000Z
2021-05-30T07:51:13.000Z
library/boost-phoenix/1.57.0.gyp
KjellSchubert/bru
dd70b721d07fbd27c57c845cc3a29cd8f2dfc587
[ "MIT" ]
3
2015-01-29T17:19:53.000Z
2016-01-06T12:50:06.000Z
{ "targets": [ { "target_name": "boost-phoenix", "type": "none", "include_dirs": [ "1.57.0/phoenix-boost-1.57.0/include" ], "all_dependent_settings": { "include_dirs": [ "1.57.0/phoenix-boost-1.57...
37.731707
86
0.461538
3d5da590ffaaa562174a9fd2350c60699a8b4cb2
10,294
py
Python
tools/waf-tools/f_vscode.py
patkan/foxbms-2
329216a5b0739362512b4c744975a136f674f60c
[ "CC-BY-4.0", "BSD-3-Clause" ]
null
null
null
tools/waf-tools/f_vscode.py
patkan/foxbms-2
329216a5b0739362512b4c744975a136f674f60c
[ "CC-BY-4.0", "BSD-3-Clause" ]
null
null
null
tools/waf-tools/f_vscode.py
patkan/foxbms-2
329216a5b0739362512b4c744975a136f674f60c
[ "CC-BY-4.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. # All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
38.845283
98
0.674471
0c3d1d17430244999650f3ff14ef461bc2b43b0a
17,035
py
Python
tests/integration/basetests.py
glormph/msstitch
ec7256caa5ec2bb0ba14a326fd445266c56f2295
[ "MIT" ]
2
2017-03-06T13:59:52.000Z
2019-02-08T19:33:40.000Z
tests/integration/basetests.py
glormph/msstitch
ec7256caa5ec2bb0ba14a326fd445266c56f2295
[ "MIT" ]
3
2017-06-26T07:10:33.000Z
2020-03-06T11:43:28.000Z
tests/integration/basetests.py
glormph/msstitch
ec7256caa5ec2bb0ba14a326fd445266c56f2295
[ "MIT" ]
2
2018-10-04T10:04:04.000Z
2019-05-17T22:09:29.000Z
import unittest import subprocess import os import shutil import sqlite3 import re from lxml import etree from tempfile import mkdtemp class BaseTest(unittest.TestCase): testdir = 'tests' fixdir = os.path.join(os.getcwd(), testdir, 'fixtures') basefixdir = os.path.join(os.getcwd(), testdir, 'base_fixtures...
39.43287
114
0.532962
85ced520c9935a7bbd3491364d2ae154ebc498f0
6,792
py
Python
bindings/python/ensmallen_graph/datasets/string/thioalkalimicrobiumaerophilum.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/thioalkalimicrobiumaerophilum.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/thioalkalimicrobiumaerophilum.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Thioalkalimicrobium aerophilum. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Dateti...
35.560209
223
0.708186
d4f09e7c7e695a027cd5f9335e372eac4fe053bc
1,637
py
Python
ooobuild/lo/util/x_refresh_listener.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/util/x_refresh_listener.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/util/x_refresh_listener.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
34.829787
135
0.745266
c361ee9a1f7457902ed58797b4cd61b9315f1372
5,228
py
Python
desktop/libs/hadoop/src/hadoop/fs/upload.py
abayer/hue
27213bb8fe89cdf0547109081e9f29c03bcc8ca5
[ "Apache-2.0" ]
1
2020-01-09T15:48:22.000Z
2020-01-09T15:48:22.000Z
desktop/libs/hadoop/src/hadoop/fs/upload.py
abayer/hue
27213bb8fe89cdf0547109081e9f29c03bcc8ca5
[ "Apache-2.0" ]
null
null
null
desktop/libs/hadoop/src/hadoop/fs/upload.py
abayer/hue
27213bb8fe89cdf0547109081e9f29c03bcc8ca5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
32.47205
80
0.688982
0419b2e1d88c6040202150b709038c2b9d54f87f
3,924
py
Python
Bio/motifs/xms.py
lukasz-kozlowski/biopython
6b601cf09234e1e82cfc94ad5030389036cb6343
[ "BSD-3-Clause" ]
2,856
2015-01-01T07:10:06.000Z
2022-03-31T18:17:25.000Z
Bio/motifs/xms.py
lukasz-kozlowski/biopython
6b601cf09234e1e82cfc94ad5030389036cb6343
[ "BSD-3-Clause" ]
3,429
2015-01-05T11:11:42.000Z
2022-03-31T13:08:10.000Z
Bio/motifs/xms.py
lukasz-kozlowski/biopython
6b601cf09234e1e82cfc94ad5030389036cb6343
[ "BSD-3-Clause" ]
1,619
2015-01-05T13:07:11.000Z
2022-03-31T19:19:52.000Z
# Copyright 2015 by Gert Hulselmans. All rights reserved. # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Parse XMS motif files...
36.672897
98
0.603721
55c430fb3f1eb7ccb30dabc9a121fa578c877b72
3,346
py
Python
tests/src/HDP/prediction/smote.py
bellwethers-in-se/issueCloseTime
e5e00c9625da0793dc8e7985fd88b0ca0b35f7d3
[ "MIT" ]
9
2017-07-27T10:32:48.000Z
2021-07-01T11:51:51.000Z
tests/src/HDP/prediction/smote.py
bellwethers-in-se/issueCloseTime
e5e00c9625da0793dc8e7985fd88b0ca0b35f7d3
[ "MIT" ]
11
2016-03-15T16:27:47.000Z
2019-09-05T02:25:08.000Z
tests/src/HDP/prediction/smote.py
bellwethers-in-se/issueCloseTime
e5e00c9625da0793dc8e7985fd88b0ca0b35f7d3
[ "MIT" ]
5
2017-01-28T22:45:34.000Z
2019-12-04T13:15:10.000Z
from collections import Counter from sklearn.neighbors import NearestNeighbors, BallTree, KDTree import numpy as np from scipy.spatial.distance import euclidean from random import choice, seed as rseed, uniform as rand from pdb import set_trace import pandas as pd def SMOTE(data=None, atleast=50, atmost=100, a=None, ...
30.981481
99
0.527197
6d6ba65def40f3fbb5a99e9f9f303fc0459daea4
6,355
py
Python
utility/uwsgi/daemon.py
sbofgayschool/KV2
b894ac3ddbc389df642fc1bcb730cb0d3310ad4c
[ "MIT" ]
3
2020-01-14T14:44:59.000Z
2020-01-15T23:52:42.000Z
utility/uwsgi/daemon.py
ririripley/KV2
b894ac3ddbc389df642fc1bcb730cb0d3310ad4c
[ "MIT" ]
null
null
null
utility/uwsgi/daemon.py
ririripley/KV2
b894ac3ddbc389df642fc1bcb730cb0d3310ad4c
[ "MIT" ]
1
2020-12-07T16:15:43.000Z
2020-12-07T16:15:43.000Z
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2020 SBofGaySchoolBuPaAnything # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limita...
39.47205
117
0.654603
e26c34124fd2b4407c4cfd7317a3ae5c2eb07e74
22,802
py
Python
Benchmark_Approaches/IGSQL/model_util.py
xjtu-intsoft/chase-page
84657a6b80e926b91ff99a78e660ba8f603321f4
[ "MIT" ]
34
2021-05-07T06:59:33.000Z
2022-03-15T02:36:19.000Z
Benchmark_Approaches/IGSQL/model_util.py
xjtu-intsoft/chase-page
84657a6b80e926b91ff99a78e660ba8f603321f4
[ "MIT" ]
null
null
null
Benchmark_Approaches/IGSQL/model_util.py
xjtu-intsoft/chase-page
84657a6b80e926b91ff99a78e660ba8f603321f4
[ "MIT" ]
2
2021-08-17T12:23:03.000Z
2021-10-12T04:10:41.000Z
"""Basic model training and evaluation functions.""" from enum import Enum import random import sys import json import progressbar import model.torch_utils import data_util.sql_util import torch def write_prediction(fileptr, identifier, input_seq, probab...
36.95624
126
0.555302
777d00046f9c7faf78f9ee4605e1695c87e8c4f8
1,062
py
Python
Python_Exams/1_Exam_Arrays/Solutions/solution_exercise_3.py
pablogalve/Python-Learning
40e296ba416dffc3f9c794c7770e03cc2c9a53d0
[ "MIT" ]
4
2020-01-27T13:46:19.000Z
2022-02-15T15:11:50.000Z
Python_Exams/1_Exam_Arrays/Solutions/solution_exercise_3.py
pablogalve/Python-Learning
40e296ba416dffc3f9c794c7770e03cc2c9a53d0
[ "MIT" ]
null
null
null
Python_Exams/1_Exam_Arrays/Solutions/solution_exercise_3.py
pablogalve/Python-Learning
40e296ba416dffc3f9c794c7770e03cc2c9a53d0
[ "MIT" ]
null
null
null
print("...CITIES...") print("1-Add an element to the llist.") print("2-Remove an element from the list.") print("3-Find an element in the list.") print("4-Exit the program") list_variable = [] i = 0 chosen_option = int(input("Choose an option: ")) while (chosen_option != 4): if (chosen_option == 1): element = i...
33.1875
69
0.653484
199f10c2bbe835dd35880e4a2bba5bdf1f3664e8
56
py
Python
cli/__init__.py
dimko/binaryalert
53d7c407a18f5c3153b6bb4a2ceaf21c8321e89e
[ "Apache-2.0" ]
1,324
2017-07-26T03:46:03.000Z
2022-03-31T01:32:47.000Z
cli/__init__.py
abhinavbom/binaryalert
53d7c407a18f5c3153b6bb4a2ceaf21c8321e89e
[ "Apache-2.0" ]
168
2017-07-26T05:48:01.000Z
2021-06-01T22:27:35.000Z
cli/__init__.py
abhinavbom/binaryalert
53d7c407a18f5c3153b6bb4a2ceaf21c8321e89e
[ "Apache-2.0" ]
212
2017-07-26T04:05:11.000Z
2022-02-25T17:48:15.000Z
"""BinaryAlert release version""" __version__ = '1.2.0'
18.666667
33
0.696429
3964f1144e51d9b7aa9fc2d8a201844148828aa5
2,222
py
Python
entity_history/migrations/0001_initial.py
ambitioninc/django-entity-history
128b4bddb7338d259f69179bafd1918f3e59b4b0
[ "MIT" ]
4
2015-11-01T00:33:25.000Z
2017-08-31T16:56:18.000Z
entity_history/migrations/0001_initial.py
ambitioninc/django-entity-history
128b4bddb7338d259f69179bafd1918f3e59b4b0
[ "MIT" ]
2
2015-04-06T20:24:38.000Z
2015-04-20T14:32:50.000Z
entity_history/migrations/0001_initial.py
ambitioninc/django-entity-history
128b4bddb7338d259f69179bafd1918f3e59b4b0
[ "MIT" ]
7
2015-04-06T19:49:37.000Z
2018-03-05T18:14:53.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('entity', '0001_initial'), ] operations = [ migrations.CreateModel( name='Entity...
44.44
218
0.605311
5a0cfae56b6755531f88369e3c738996e650facf
592
py
Python
src/api/data_objects.py
Matthew-Klawitter/Matrix-Barista-Bot
cc42cabce2ed123fff94f77f1677d6685b19acc2
[ "MIT" ]
2
2021-10-17T03:32:49.000Z
2022-02-24T04:28:15.000Z
src/api/data_objects.py
Matthew-Klawitter/Matrix-Barista-Bot
cc42cabce2ed123fff94f77f1677d6685b19acc2
[ "MIT" ]
null
null
null
src/api/data_objects.py
Matthew-Klawitter/Matrix-Barista-Bot
cc42cabce2ed123fff94f77f1677d6685b19acc2
[ "MIT" ]
null
null
null
class Message: def __init__(self, bridge, room, event): self.username = room.user_name(event.sender) self.room_id = room.room_id self.room_name = room.display_name self.bridge = bridge self.message = event.body self.is_command = event.body.startswith("!") # Pa...
34.823529
53
0.552365
cb0e8c8363421c0f5d9d9a96aa708b9be39ce5af
703
py
Python
ot2_controller/launch/ot2_bob_bringup.launch.py
AD-SDL/ot2_workcell
c994c5a5bd79a154e624f17bbde1a13a5461cc69
[ "MIT" ]
2
2022-02-09T19:18:58.000Z
2022-02-09T19:18:59.000Z
ot2_controller/launch/ot2_bob_bringup.launch.py
urd00m/ros2tests
c994c5a5bd79a154e624f17bbde1a13a5461cc69
[ "MIT" ]
1
2022-03-14T20:50:28.000Z
2022-03-14T20:50:28.000Z
ot2_controller/launch/ot2_bob_bringup.launch.py
urd00m/ros2tests
c994c5a5bd79a154e624f17bbde1a13a5461cc69
[ "MIT" ]
null
null
null
from launch import LaunchDescription from launch_ros.actions import Node def generate_launch_description(): ld = LaunchDescription() ot2_controller = Node( package="ot2_controller", executable="ot2_controller", output='screen', parameters=[{"name": "bob"}], emulate_tty=...
27.038462
44
0.630156
d9b1aeb73eb595109a7a5aaa6583f0dbe67a0152
1,083
py
Python
samples/tests/test_query_to_arrow.py
KoffieLabs/python-bigquery
33b317abdc6d69f33722cb0504bb0b78c1c80e30
[ "Apache-2.0" ]
1
2022-03-25T21:07:44.000Z
2022-03-25T21:07:44.000Z
samples/tests/test_query_to_arrow.py
abecerrilsalas/python-bigquery
8da4fa9e77bcfd2b68818b5d65b38ccc59899a01
[ "Apache-2.0" ]
null
null
null
samples/tests/test_query_to_arrow.py
abecerrilsalas/python-bigquery
8da4fa9e77bcfd2b68818b5d65b38ccc59899a01
[ "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, ...
34.935484
74
0.751616
d57621fec4e5bfc885c13ec0ec64ee3152777236
13,261
py
Python
luna/gateware/soc/peripheral.py
TomKeddie/luna
6688f7ae2a1b506eb6498cc2ad15dddcef0cc06a
[ "BSD-3-Clause" ]
2
2020-11-04T10:54:15.000Z
2022-03-17T20:38:21.000Z
luna/gateware/soc/peripheral.py
hxkrrzq/luna
e56a3eef6a9fa138755512bec1252725601425c1
[ "BSD-3-Clause" ]
null
null
null
luna/gateware/soc/peripheral.py
hxkrrzq/luna
e56a3eef6a9fa138755512bec1252725601425c1
[ "BSD-3-Clause" ]
2
2021-06-26T06:06:52.000Z
2022-01-19T22:36:19.000Z
# # This file is part of LUNA. # # Adapted from lambdasoc. # This file includes content Copyright (C) 2020 LambdaConcept. # # Per our BSD license, derivative files must include this license disclaimer. # # Copyright (c) 2020 Great Scott Gadgets <info@greatscottgadgets.com> # SPDX-License-Identifier: BSD-3-Clause """ P...
34.989446
102
0.598296
2bbcc9b8bb0a67d7be431fb22741ea93a00a8521
788
py
Python
resources/lib/utils.py
robweber/service.history
445d88fcd35c508a49404cb3a6172c6857da5a17
[ "MIT" ]
1
2022-02-13T16:55:30.000Z
2022-02-13T16:55:30.000Z
resources/lib/utils.py
robweber/service.history
445d88fcd35c508a49404cb3a6172c6857da5a17
[ "MIT" ]
null
null
null
resources/lib/utils.py
robweber/service.history
445d88fcd35c508a49404cb3a6172c6857da5a17
[ "MIT" ]
null
null
null
import xbmc import xbmcaddon __addon_id__= 'service.history' __Addon = xbmcaddon.Addon(__addon_id__) def data_dir(): return __Addon.getAddonInfo('profile') def addon_dir(): return __Addon.getAddonInfo('path') def log(message,loglevel=xbmc.LOGNOTICE): xbmc.log(encode(__addon_id__ + ": " + message),level=...
26.266667
157
0.725888
12020df236136a7e613b4e88bbe23ab744130758
3,245
py
Python
model_selfAttn.py
danachang/End2EndDecoder
575d6077c5932a2e0a63d5af9691d12e5cb468ef
[ "MIT" ]
null
null
null
model_selfAttn.py
danachang/End2EndDecoder
575d6077c5932a2e0a63d5af9691d12e5cb468ef
[ "MIT" ]
null
null
null
model_selfAttn.py
danachang/End2EndDecoder
575d6077c5932a2e0a63d5af9691d12e5cb468ef
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from util import log from decoder_selfAttn import Decoder from decoder_mdl import Decoder_Mdl class Model(object): def __init__(self, config, d...
30.613208
80
0.552542
a990710624274b2f54cca3a0ef587b69b44600e9
1,418
py
Python
yts-top-movies/yts-top-movies.py
jae-yong-2/awesomeScripts
7561f2a6966e51973338db592da9f64cf53245e8
[ "MIT" ]
245
2020-09-24T03:49:20.000Z
2021-01-31T20:09:57.000Z
yts-top-movies/yts-top-movies.py
jae-yong-2/awesomeScripts
7561f2a6966e51973338db592da9f64cf53245e8
[ "MIT" ]
252
2020-09-28T02:19:44.000Z
2021-01-23T09:00:34.000Z
yts-top-movies/yts-top-movies.py
jae-yong-2/awesomeScripts
7561f2a6966e51973338db592da9f64cf53245e8
[ "MIT" ]
219
2020-09-23T18:51:42.000Z
2021-01-23T09:54:40.000Z
"""This script allows us to see the most popular movies on yts.mx - Most popular movies - Latest uploads - Upcoming movies The script uses BeautifylSoup to scrap data from the website. """ import requests from bs4 import BeautifulSoup title = f""" \t {'-' * 80} \t {'YTS.mx Top Movies':^80} \t {'-' * ...
27.269231
70
0.616361
2cdbaf6ffd5b45d80505c713762777ee91ef76b9
1,096
py
Python
var/spack/repos/builtin/packages/r-sp/package.py
RemoteConnectionManager/spack
f2967b6c16effd26ce007cf86cadbb645c574f50
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/r-sp/package.py
RemoteConnectionManager/spack
f2967b6c16effd26ce007cf86cadbb645c574f50
[ "ECL-2.0", "Apache-2.0", "MIT" ]
17
2018-09-20T18:32:50.000Z
2019-12-04T16:58:12.000Z
var/spack/repos/builtin/packages/r-sp/package.py
RemoteConnectionManager/spack
f2967b6c16effd26ce007cf86cadbb645c574f50
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-09-21T07:45:10.000Z
2019-09-21T07:45:10.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RSp(RPackage): """Classes and methods for spatial data; the classes document where the ...
43.84
95
0.730839
32c7cee45607a82e35c95d44e9d12e5365b515f2
142
py
Python
exercises/while_loops.py
salwa19-meet/y2s18-python_review
701c4e3a1a294fbcb32be3f06f54a371bcececfa
[ "MIT" ]
null
null
null
exercises/while_loops.py
salwa19-meet/y2s18-python_review
701c4e3a1a294fbcb32be3f06f54a371bcececfa
[ "MIT" ]
null
null
null
exercises/while_loops.py
salwa19-meet/y2s18-python_review
701c4e3a1a294fbcb32be3f06f54a371bcececfa
[ "MIT" ]
null
null
null
# Write your solution for 1.3 here!sum = 0 i = 1 counter = 0 while (sum<=10000): sum = sum + i i+=1 counter+=1 print (counter )
15.777778
43
0.577465
add9c6dd70fe908b970668eb02a23564754e9dfc
1,312
py
Python
Laelia/apps/base/migrations/0029_auto_20201003_2233.py
arantesdv/LaeliaAppProject
93fca5393cb8406694903d9adde02067480c792e
[ "MIT" ]
null
null
null
Laelia/apps/base/migrations/0029_auto_20201003_2233.py
arantesdv/LaeliaAppProject
93fca5393cb8406694903d9adde02067480c792e
[ "MIT" ]
null
null
null
Laelia/apps/base/migrations/0029_auto_20201003_2233.py
arantesdv/LaeliaAppProject
93fca5393cb8406694903d9adde02067480c792e
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-10-04 01:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0028_auto_20201003_2231'), ] operations = [ migrations.AlterField( model_name='schedule', name='duration', ...
45.241379
351
0.492378
882ca4fef2a8c0710b6b3779de645d5523509ae9
8,122
py
Python
networkconfgen/custom_filters.py
hoelsner/networkconfgen
d30ccc5c4e58d74c5eb5bcd41386c453d0130685
[ "MIT" ]
21
2018-01-25T10:56:00.000Z
2020-12-12T18:09:26.000Z
networkconfgen/custom_filters.py
AstritCepele/networkconfgen
d30ccc5c4e58d74c5eb5bcd41386c453d0130685
[ "MIT" ]
null
null
null
networkconfgen/custom_filters.py
AstritCepele/networkconfgen
d30ccc5c4e58d74c5eb5bcd41386c453d0130685
[ "MIT" ]
7
2018-06-28T13:44:20.000Z
2020-11-16T00:26:18.000Z
""" Any custom filter that is bound to the Jinja2 Template Engine used in the NetworkConfGen class """ import logging import re from ipaddress import IPv4Network from networkconfgen.constants import ERROR_UNKNOWN, ERROR_INVALID_VLAN_RANGE, ERROR_INVALID_VALUE, \ CISCO_INTERFACE_PATTERN, JUNIPER_INTERFACE_PATTERN, O...
32.358566
121
0.619921
46207b5296e9594219bb55face43bf1f45981042
6,339
py
Python
baselines/baselines/common/policies.py
yooceii/HardRLWithYoutube
e9644c16a8125af09d998ad1df733135d129a3aa
[ "MIT" ]
34
2018-10-16T16:09:07.000Z
2021-10-19T06:21:03.000Z
baselines/baselines/common/policies.py
yooceii/HardRLWithYoutube
e9644c16a8125af09d998ad1df733135d129a3aa
[ "MIT" ]
5
2019-01-31T16:31:13.000Z
2019-06-26T01:13:04.000Z
baselines/baselines/common/policies.py
yooceii/HardRLWithYoutube
e9644c16a8125af09d998ad1df733135d129a3aa
[ "MIT" ]
9
2018-12-04T11:39:43.000Z
2021-04-02T19:17:11.000Z
import tensorflow as tf from baselines.common import tf_util from baselines.a2c.utils import fc from baselines.common.distributions import make_pdtype from baselines.common.input import observation_placeholder, encode_observation from baselines.common.tf_util import adjust_shape from baselines.common.mpi_running_mean_s...
35.216667
137
0.630541
3e5d64cb37ce17377d8718948d142779de4a84fb
7,678
py
Python
example/example_face.py
Tomoya-K-0504/deepSELF
0e5a7d0169b3e9edcb5c8d9802140a84ce5cb69a
[ "MIT" ]
1
2021-08-17T09:56:47.000Z
2021-08-17T09:56:47.000Z
example/example_face.py
JIangjiang1108/deepSELF
0e5a7d0169b3e9edcb5c8d9802140a84ce5cb69a
[ "MIT" ]
null
null
null
example/example_face.py
JIangjiang1108/deepSELF
0e5a7d0169b3e9edcb5c8d9802140a84ce5cb69a
[ "MIT" ]
1
2021-08-17T09:56:41.000Z
2021-08-17T09:56:41.000Z
import itertools import logging import pprint import shutil from copy import deepcopy from dataclasses import dataclass from datetime import datetime as dt from pathlib import Path import hydra import mlflow import numpy as np import pandas as pd import torch from hydra import utils from joblib import Parallel, delaye...
37.091787
120
0.646913
228c2c4d80462b7089b07d8ccee38c9a8e4f7a3c
2,961
py
Python
mysite/scisheets/helpers/helpers_test.py
ScienceStacks/JViz
c8de23d90d49d4c9bc10da25f4a87d6f44aab138
[ "Artistic-2.0", "Apache-2.0" ]
31
2016-11-16T22:34:35.000Z
2022-03-22T22:16:11.000Z
mysite/scisheets/helpers/helpers_test.py
ScienceStacks/JViz
c8de23d90d49d4c9bc10da25f4a87d6f44aab138
[ "Artistic-2.0", "Apache-2.0" ]
6
2017-06-24T06:29:36.000Z
2022-01-23T06:30:01.000Z
mysite/scisheets/helpers/helpers_test.py
ScienceStacks/JViz
c8de23d90d49d4c9bc10da25f4a87d6f44aab138
[ "Artistic-2.0", "Apache-2.0" ]
4
2017-07-27T16:23:50.000Z
2022-03-12T06:36:13.000Z
'''Client Mocks''' import scisheets.core.helpers.cell_types as cell_types from django.test import TestCase, RequestFactory from django.contrib.sessions.middleware import SessionMiddleware BASE_URL = "http://localhost:8000/scisheets/" TARGET = 'Cell' COMMAND = 'Update' VALUE = 'XXX' ROW_INDEX = 1 COLUMN_INDEX = 3 COLU...
28.747573
76
0.609591
bf8e6c757be4595777016c9c30c3d2a607aad858
2,150
py
Python
zipline/pipeline/hooks/delegate.py
leonarduschen/zipline
5e6c9fce7e0f812bd181024ad192ca2976d49667
[ "Apache-2.0" ]
14,525
2015-01-01T02:57:52.000Z
2022-03-31T18:16:35.000Z
zipline/pipeline/hooks/delegate.py
leonarduschen/zipline
5e6c9fce7e0f812bd181024ad192ca2976d49667
[ "Apache-2.0" ]
2,146
2015-01-01T13:03:44.000Z
2022-02-22T03:25:28.000Z
zipline/pipeline/hooks/delegate.py
leonarduschen/zipline
5e6c9fce7e0f812bd181024ad192ca2976d49667
[ "Apache-2.0" ]
4,517
2015-01-01T14:26:47.000Z
2022-03-31T14:38:05.000Z
from interface import implements from zipline.utils.compat import ExitStack, contextmanager, wraps from .iface import PipelineHooks, PIPELINE_HOOKS_CONTEXT_MANAGERS from .no import NoHooks def delegating_hooks_method(method_name): """Factory function for making DelegatingHooks methods. """ if method_nam...
32.575758
79
0.626977
4a19fd2b2985d4d9656278c2e7d1ba36e8276eed
9,621
py
Python
train_crf.py
bubblemans/Gun-Violence-Information-Retrieval-Using-BERT-as-Sequence-Tagging-Task
a8a199760c531286ae79fd9de541387a6c9fd5a7
[ "MIT" ]
null
null
null
train_crf.py
bubblemans/Gun-Violence-Information-Retrieval-Using-BERT-as-Sequence-Tagging-Task
a8a199760c531286ae79fd9de541387a6c9fd5a7
[ "MIT" ]
null
null
null
train_crf.py
bubblemans/Gun-Violence-Information-Retrieval-Using-BERT-as-Sequence-Tagging-Task
a8a199760c531286ae79fd9de541387a6c9fd5a7
[ "MIT" ]
null
null
null
import argparse import math import logging import pandas as pd import tqdm import torch import torch.nn as nn from torch.utils.data import DataLoader from models import BERT_CRF_Linear, BERT_CRF_LSTM, BERT_CRF_BiLSTM from dataset import GunViolenceDataset from utils import * logging.basicConfig(format='%(asctime)s...
35.899254
150
0.566989
924a8378e03074102f4f470ee41805bd89d04096
1,655
py
Python
djangocms_nbrender/migrations/0001_initial.py
correctiv/djangocms-nbrender
230e23a22a3e08d6e64d985da5da0a1b5cc43372
[ "MIT" ]
6
2016-03-22T09:26:44.000Z
2020-03-05T16:20:35.000Z
djangocms_nbrender/migrations/0001_initial.py
correctiv/djangocms-nbrender
230e23a22a3e08d6e64d985da5da0a1b5cc43372
[ "MIT" ]
null
null
null
djangocms_nbrender/migrations/0001_initial.py
correctiv/djangocms-nbrender
230e23a22a3e08d6e64d985da5da0a1b5cc43372
[ "MIT" ]
4
2017-12-14T08:18:22.000Z
2018-09-18T00:30:29.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import djangocms_nbrender.utils import djangocms_nbrender.models class Migration(migrations.Migration): dependencies = [ ('cms', '0013_urlconfrevision'), ] operations = [ migrations....
36.777778
171
0.574018
0a0e6f9ca0d12d45dd00c00f80e139d097fe5600
748
py
Python
kaggle-tables/main.py
brigadadigitalmx/medical-policy-briefs
93c60d294538337cb1dd187b0dc30e3940882bf7
[ "Apache-2.0" ]
null
null
null
kaggle-tables/main.py
brigadadigitalmx/medical-policy-briefs
93c60d294538337cb1dd187b0dc30e3940882bf7
[ "Apache-2.0" ]
12
2020-04-07T20:30:34.000Z
2021-09-28T01:52:47.000Z
kaggle-tables/main.py
brigadadigitalmx/medical-policy-briefs
93c60d294538337cb1dd187b0dc30e3940882bf7
[ "Apache-2.0" ]
4
2020-04-10T03:24:43.000Z
2020-04-14T00:49:23.000Z
import re from pathlib import Path from selenium import webdriver import pandas as pd driver = webdriver.Firefox() driver.get("https://www.kaggle.com/covid-19-contributions") elems = driver.find_elements_by_class_name('c19-finding') first = elems[0] headers = first.find_elements_by_class_name('heading6') tables = f...
27.703704
64
0.725936
54e86aef40055c8911549ee3ec692bfeb7c8ee40
5,245
py
Python
promgen/admin.py
kackey0-1/promgen
8fb7b65c8a814429a0b5f484bfec931df76c5d83
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
913
2016-08-02T03:06:09.000Z
2022-03-29T17:35:26.000Z
promgen/admin.py
kackey0-1/promgen
8fb7b65c8a814429a0b5f484bfec931df76c5d83
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
299
2016-08-08T02:48:02.000Z
2022-03-31T01:01:15.000Z
promgen/admin.py
kackey0-1/promgen
8fb7b65c8a814429a0b5f484bfec931df76c5d83
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
152
2016-08-06T08:23:15.000Z
2022-02-28T09:17:12.000Z
# Copyright (c) 2017 LINE Corporation # These sources are released under the terms of the MIT license: see LICENSE import json from django import forms from django.contrib import admin from django.utils.html import format_html from promgen import actions, models, plugins class PrometheusInline(admin.TabularInline):...
28.505435
86
0.672259
7e7df1b2cba282e14a79dd5fcf25200390493c07
5,428
py
Python
rational_number_class.py
markfoleyie/pa1_2021
b6011ff6eece29e53095a8cf69d0f2764e8d0c88
[ "MIT" ]
1
2020-10-01T20:22:40.000Z
2020-10-01T20:22:40.000Z
rational_number_class.py
markfoleyie/pa1_2021
b6011ff6eece29e53095a8cf69d0f2764e8d0c88
[ "MIT" ]
null
null
null
rational_number_class.py
markfoleyie/pa1_2021
b6011ff6eece29e53095a8cf69d0f2764e8d0c88
[ "MIT" ]
3
2020-10-29T21:19:37.000Z
2021-02-25T20:04:30.000Z
""" A simple Rational number class. This demonstrates operator overloading using the 'magic' methods such as '__add__'. """ class Rational: """ Implements a simple Rational number. Note that not all possible methods are implemented. Only a sample of the 'magic' methods which enable operator overloading ar...
35.94702
115
0.602432
d760a78a562fc5634425083f5eb63174fd6ea3fb
1,017
py
Python
run.py
tr4n2uil/test-automate
ca68b2b142f987643784b1eaab69328eb979e58e
[ "MIT" ]
null
null
null
run.py
tr4n2uil/test-automate
ca68b2b142f987643784b1eaab69328eb979e58e
[ "MIT" ]
null
null
null
run.py
tr4n2uil/test-automate
ca68b2b142f987643784b1eaab69328eb979e58e
[ "MIT" ]
null
null
null
#!/usr/local/bin/python # coding: utf-8 from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.desired_capabilities import DesiredCapabilities #desired_cap = {'os': 'ios', 'device': 'iPhone 6', 'browser': 'iPhone', 'emulator': True } desired_cap = {'os': 'OS X', ...
37.666667
103
0.745329
dbd8b34ac2fdd238f11219430c9057fe793c44ff
4,041
py
Python
mcrouter/test/test_mcrouter.py
alynx282/mcrouter
b16af1a119eee775b051d323cb885b73fdf75757
[ "MIT" ]
null
null
null
mcrouter/test/test_mcrouter.py
alynx282/mcrouter
b16af1a119eee775b051d323cb885b73fdf75757
[ "MIT" ]
null
null
null
mcrouter/test/test_mcrouter.py
alynx282/mcrouter
b16af1a119eee775b051d323cb885b73fdf75757
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import time from mcrouter.test.MCProcess import Memcached from mcrouter.test.McrouterTestCase import McrouterTestCa...
33.396694
76
0.661717
5f1eac462a2dcc6007189e1e39bba852ec2a1aeb
13,212
py
Python
pycalculix/cadimporter.py
tnakaicode/-pycalculix4win
c269e66d5b234275ca7905f13d186e31864523ea
[ "Apache-2.0" ]
null
null
null
pycalculix/cadimporter.py
tnakaicode/-pycalculix4win
c269e66d5b234275ca7905f13d186e31864523ea
[ "Apache-2.0" ]
null
null
null
pycalculix/cadimporter.py
tnakaicode/-pycalculix4win
c269e66d5b234275ca7905f13d186e31864523ea
[ "Apache-2.0" ]
null
null
null
"""This module stores the CadImporter class, which is used to load CAD parts.""" import collections import math import os # needed to prevent dxfgrabber from crashing on import os.environ['DXFGRABBER_CYTHON'] = 'OFF' import dxfgrabber # needed for dxf files import subprocess # needed to run gmsh to make geo files fro...
39.321429
82
0.548819
671a2e7e071ec01724b5691461ac1b52c3e191bc
6,404
py
Python
NLP/GPT2/run_generation.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
null
null
null
NLP/GPT2/run_generation.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
null
null
null
NLP/GPT2/run_generation.py
LiuHaolan/models
1639b3039237c3997c51ff87f0b6113bb2e8d236
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in c...
41.856209
124
0.686914
e5107e1707993e6b0ea9a6e4a05a7c8e57202625
115
py
Python
pylint_beergarden/__init__.py
gershwinlabs/pylint-beergarden
1a581c4dbf73eb5b1cd3b945291d9c0aca0cd55c
[ "MIT" ]
null
null
null
pylint_beergarden/__init__.py
gershwinlabs/pylint-beergarden
1a581c4dbf73eb5b1cd3b945291d9c0aca0cd55c
[ "MIT" ]
null
null
null
pylint_beergarden/__init__.py
gershwinlabs/pylint-beergarden
1a581c4dbf73eb5b1cd3b945291d9c0aca0cd55c
[ "MIT" ]
null
null
null
# vim: expandtab tabstop=4 shiftwidth=4 from pylint_beergarden import plugin, checker register = plugin.register
19.166667
45
0.808696
00dc588a4688a086685c490e20bd1bd7c71b2a19
2,068
py
Python
homeassistant/components/binary_sensor/modbus.py
EmitKiwi/home-assistant
0999e2ddc476f4bddf710005168b082f03a7cdc0
[ "Apache-2.0" ]
37
2018-05-22T07:17:26.000Z
2022-03-03T13:14:46.000Z
homeassistant/components/binary_sensor/modbus.py
EmitKiwi/home-assistant
0999e2ddc476f4bddf710005168b082f03a7cdc0
[ "Apache-2.0" ]
125
2018-12-11T07:31:20.000Z
2021-07-27T08:20:03.000Z
homeassistant/components/binary_sensor/modbus.py
EmitKiwi/home-assistant
0999e2ddc476f4bddf710005168b082f03a7cdc0
[ "Apache-2.0" ]
8
2018-05-30T20:05:26.000Z
2021-02-19T14:17:05.000Z
""" Support for Modbus Coil sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.modbus/ """ import logging import voluptuous as vol import homeassistant.components.modbus as modbus from homeassistant.const import CONF_NAME, CONF_SLAVE ...
28.722222
74
0.663443
289c8317fafc084793c303577de5a0a539d2555d
4,464
py
Python
CybORG/CybORG/Shared/BaselineRewardCalculator.py
rafvasq/cage-challenge-1
95affdfa38afc1124f1a1a09c92fbc0ed5b96318
[ "MIT" ]
18
2021-08-20T15:07:55.000Z
2022-03-11T12:05:15.000Z
CybORG/CybORG/Shared/BaselineRewardCalculator.py
rafvasq/cage-challenge-1
95affdfa38afc1124f1a1a09c92fbc0ed5b96318
[ "MIT" ]
7
2021-11-09T06:46:58.000Z
2022-03-31T12:35:06.000Z
CybORG/CybORG/Shared/BaselineRewardCalculator.py
rafvasq/cage-challenge-1
95affdfa38afc1124f1a1a09c92fbc0ed5b96318
[ "MIT" ]
13
2021-08-17T00:26:31.000Z
2022-03-29T20:06:45.000Z
# Copyright DST Group. Licensed under the MIT license. from CybORG.Shared.Actions.Action import Action from CybORG.Shared.RewardCalculator import RewardCalculator WIN_REWARD = 1 LOSE_REWARD = -1 REWARD_MAX_DECIMAL_PLACES = 3 REWARD_DIFF_SCALE_FACTOR = 1000 class BaselineRewardCalculator(RewardCalculator): def...
33.56391
106
0.499776
85714bb7a1ae08a253c7b81a878b4d2d5fb5b727
278
py
Python
paramiko_tutorial/files.py
Full-Stack-Cloud-Developer/paramiko-tutorial
e890a9770ef896fde43e93d683470b9ae736453c
[ "MIT" ]
1
2020-11-25T12:46:10.000Z
2020-11-25T12:46:10.000Z
paramiko_tutorial/files.py
jbrdge/paramiko-tutorial
90151d4b432e69f089a41079a05387d8c235e697
[ "MIT" ]
null
null
null
paramiko_tutorial/files.py
jbrdge/paramiko-tutorial
90151d4b432e69f089a41079a05387d8c235e697
[ "MIT" ]
null
null
null
"""Find local files to be uploaded to remote host.""" import os def fetch_local_files(local_file_dir): """Create list of file paths.""" local_files = os.walk(local_file_dir) for root, dirs, files in local_files: return [f'{root}/{file}' for file in files]
27.8
53
0.683453
15daf5fc39f3766110be8a8f733f328fe07b3d76
490
py
Python
data/scripts/templates/object/tangible/ship/components/droid_interface/shared_ddi_sfs_imperial_2.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/ship/components/droid_interface/shared_ddi_sfs_imperial_2.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/ship/components/droid_interface/shared_ddi_sfs_imperial_2.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/components/droid_interface/shared_ddi_sfs_imperial_2.iff" resu...
28.823529
98
0.746939
1d75f6c94f340178a26d4fd94c2c4311c301cd1b
5,120
py
Python
private_sharing/urls.py
danamlewis/open-humans
9b08310cf151f49032b66ddd005bbd47d466cc4e
[ "MIT" ]
57
2016-09-01T21:55:52.000Z
2022-03-27T22:15:32.000Z
private_sharing/urls.py
danamlewis/open-humans
9b08310cf151f49032b66ddd005bbd47d466cc4e
[ "MIT" ]
464
2015-03-23T18:08:28.000Z
2016-08-25T04:57:36.000Z
private_sharing/urls.py
danamlewis/open-humans
9b08310cf151f49032b66ddd005bbd47d466cc4e
[ "MIT" ]
25
2017-01-24T16:23:27.000Z
2021-11-07T01:51:42.000Z
from django.urls import path, re_path from django.views.generic import TemplateView from . import views app_name = "direct-sharing" urlpatterns = [ path( "projects/oauth2/create/", views.CreateOAuth2DataRequestProjectView.as_view(), name="create-oauth2", ), path( "projects...
31.411043
88
0.604297
1aae79f49423c7b3ae9372c5d001c1edb7ffb5ab
6,197
py
Python
rl_player_train.py
ScarfZapdos/showdownbot
02c5ee6d8fb76fbaa5dc4f8b41e2ab6e29d6024d
[ "MIT" ]
null
null
null
rl_player_train.py
ScarfZapdos/showdownbot
02c5ee6d8fb76fbaa5dc4f8b41e2ab6e29d6024d
[ "MIT" ]
null
null
null
rl_player_train.py
ScarfZapdos/showdownbot
02c5ee6d8fb76fbaa5dc4f8b41e2ab6e29d6024d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import tensorflow as tf import os from poke_env.player.env_player import Gen8EnvSinglePlayer from poke_env.player.random_player import RandomPlayer from rl.agents.dqn import DQNAgent from rl.policy import LinearAnnealedPolicy, EpsGreedyQPolicy from rl.memory import...
31.943299
86
0.648701
747390a1ab0557c66ea8a047e2e1c213ed918e00
21,530
py
Python
urllib3/util/selectors.py
lslebodn/urllib3
da86fb6c3f44281d808ceb14d8f2a01895cab6e5
[ "MIT" ]
null
null
null
urllib3/util/selectors.py
lslebodn/urllib3
da86fb6c3f44281d808ceb14d8f2a01895cab6e5
[ "MIT" ]
null
null
null
urllib3/util/selectors.py
lslebodn/urllib3
da86fb6c3f44281d808ceb14d8f2a01895cab6e5
[ "MIT" ]
null
null
null
# Backport of selectors.py from Python 3.5+ to support Python < 3.4 # Also has the behavior specified in PEP 475 which is to retry syscalls # in the case of an EINTR error. This module is required because selectors34 # does not follow this behavior and instead returns that no dile descriptor # events have occurred rath...
36.306914
89
0.56614
76ef55080249585331b0153c7e9f49d33aca787b
1,024
py
Python
DifferentiableHOS/Plot.py
LSSTDESC/DifferentiableHOS
7c83f6c9e4a820a0420adef113e0f2435732fe3e
[ "MIT" ]
1
2021-01-18T14:44:14.000Z
2021-01-18T14:44:14.000Z
DifferentiableHOS/Plot.py
LSSTDESC/DifferentiableHOS
7c83f6c9e4a820a0420adef113e0f2435732fe3e
[ "MIT" ]
13
2021-02-19T09:59:41.000Z
2021-12-13T09:52:41.000Z
DifferentiableHOS/Plot.py
LSSTDESC/DifferentiableHOS
7c83f6c9e4a820a0420adef113e0f2435732fe3e
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from matplotlib.patches import Ellipse import numpy as np def plot_contours(fisher, pos, nstd=1., ax=None, **kwargs): """ Plot 2D parameter contours given a Hessian matrix of the likelihood """ def eigsorted(cov): vals, vecs = np.linalg.eigh(cov) order = val...
27.675676
78
0.610352
fb77a5ef6a73df2a997f5848847b70fb3f2f2127
1,150
py
Python
backend/util/string.py
artontech/ArtonFileManager
b099c5294ab731b0a0f1eb7dbe35397df4515863
[ "Apache-2.0" ]
1
2020-11-17T12:45:47.000Z
2020-11-17T12:45:47.000Z
backend/util/string.py
artontech/ArtonFileManager
b099c5294ab731b0a0f1eb7dbe35397df4515863
[ "Apache-2.0" ]
null
null
null
backend/util/string.py
artontech/ArtonFileManager
b099c5294ab731b0a0f1eb7dbe35397df4515863
[ "Apache-2.0" ]
null
null
null
''' string ''' import base64 import os def join(str1: str, str2: str) -> str: ''' join string ''' if str1 is None: str1 = '' if str2 is None: str2 = '' return str1 + str2 def str2bool(data: str, default: bool = None) -> bool: ''' trans to bool ''' l_str = str(da...
25.555556
65
0.54087
211b67be1bc8853d3981c36517dbe6dde98e137f
18,076
py
Python
userbot/modules/gdrive.py
yonouf/UserBug
23c1d750e58a67eaaaf9a13b8700fe9dccf3bb7d
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/gdrive.py
yonouf/UserBug
23c1d750e58a67eaaaf9a13b8700fe9dccf3bb7d
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/gdrive.py
yonouf/UserBug
23c1d750e58a67eaaaf9a13b8700fe9dccf3bb7d
[ "Naumen", "Condor-1.1", "MS-PL" ]
2
2020-01-01T11:36:37.000Z
2020-01-02T05:41:19.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. import asyncio import math import os import time from pySmartDL import SmartDL from telethon import events from apiclien...
40.895928
105
0.618721
a7e666dfa6daeed54685c2e7f80e02e16b0c2712
8,183
py
Python
SCSCons/PathList.py
Relintai/pandemonium_engine
3de05db75a396b497f145411f71eb363572b38ae
[ "MIT", "Apache-2.0", "CC-BY-4.0", "Unlicense" ]
1,403
2017-11-23T14:24:01.000Z
2022-03-30T20:59:39.000Z
nuitka/build/inline_copy/lib/scons-4.3.0/SCons/PathList.py
lps1333/Nuitka
02e8d59a275cd7fe482cbc8100e753ff5abe39d7
[ "Apache-2.0" ]
3,708
2017-11-27T13:47:12.000Z
2022-03-29T17:21:17.000Z
nuitka/build/inline_copy/lib/scons-4.3.0/SCons/PathList.py
lps1333/Nuitka
02e8d59a275cd7fe482cbc8100e753ff5abe39d7
[ "Apache-2.0" ]
281
2017-12-01T23:48:38.000Z
2022-03-31T15:25:44.000Z
# MIT License # # Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, ...
36.368889
77
0.65245
f5f6806f33d4334e8f4039e613e5e6f4369bff14
3,004
py
Python
tensorflow/python/training/learning_rate_decay_test.py
deepakmuralidharan/tensorflow
f40e41f9c71ef2865f96f3db3cea2909797fe2a3
[ "Apache-2.0" ]
23
2016-02-04T21:08:43.000Z
2022-01-14T13:22:33.000Z
tensorflow/python/training/learning_rate_decay_test.py
deepakmuralidharan/tensorflow
f40e41f9c71ef2865f96f3db3cea2909797fe2a3
[ "Apache-2.0" ]
2
2016-05-31T16:38:55.000Z
2018-12-30T20:17:05.000Z
tensorflow/python/training/learning_rate_decay_test.py
deepakmuralidharan/tensorflow
f40e41f9c71ef2865f96f3db3cea2909797fe2a3
[ "Apache-2.0" ]
20
2016-02-15T17:31:02.000Z
2020-01-12T08:18:48.000Z
# Copyright 2015 Google Inc. 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 or a...
37.55
80
0.665113
1224064900ea09b9ec50ee17ce1ec1a43214ecc8
3,816
py
Python
contrib/macdeploy/custom_dsstore.py
bitcoin-pirate/BITP-Core
613a24d6e49ed3035a2144a50f39e7d03eeca20b
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
bitcoin-pirate/BITP-Core
613a24d6e49ed3035a2144a50f39e7d03eeca20b
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
bitcoin-pirate/BITP-Core
613a24d6e49ed3035a2144a50f39e7d03eeca20b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
62.557377
1,817
0.730346
b2b41fae203875643d41015acebcc26954848381
6,737
py
Python
practice/src/transformer2.py
hankyul2/ddackdae
5e9728578ab0f05c1f49e4a39e9753233a75e1da
[ "Apache-2.0" ]
null
null
null
practice/src/transformer2.py
hankyul2/ddackdae
5e9728578ab0f05c1f49e4a39e9753233a75e1da
[ "Apache-2.0" ]
null
null
null
practice/src/transformer2.py
hankyul2/ddackdae
5e9728578ab0f05c1f49e4a39e9753233a75e1da
[ "Apache-2.0" ]
null
null
null
import copy import math import torch import numpy as np from einops import rearrange from torch import nn import torch.nn.functional as F class Encoder(nn.Module): def __init__(self, layer, norm, N): super(Encoder, self).__init__() self.layers = clone(layer, N) self.norm = norm def f...
31.046083
104
0.629212
3c95e61d32d1d5f2b303290e819aaca832ebf9df
1,712
py
Python
CIL-tutorial/walnut.py
paskino/CIL-work
20b7d6db2f74bcbb4b5dd524a5c3ae3fe7b1952d
[ "BSD-3-Clause" ]
null
null
null
CIL-tutorial/walnut.py
paskino/CIL-work
20b7d6db2f74bcbb4b5dd524a5c3ae3fe7b1952d
[ "BSD-3-Clause" ]
null
null
null
CIL-tutorial/walnut.py
paskino/CIL-work
20b7d6db2f74bcbb4b5dd524a5c3ae3fe7b1952d
[ "BSD-3-Clause" ]
1
2021-07-01T11:27:58.000Z
2021-07-01T11:27:58.000Z
import numpy as np import os from cil.io import TXRMDataReader, TIFFWriter from cil.processors import TransmissionAbsorptionConverter, Binner from cil.plugins.tigre import FBP from cil.utilities.display import show2D, show_geometry base_dir = os.path.abspath(r"C:\Users\ofn77899\Data\walnut") data_name = "valnut" file...
27.612903
98
0.733061
719dab7a2a9a17ecf76aec878de83cf0dabdfc72
379
py
Python
setup.py
kirberich/textractor
fb55c27f2facbe8ff200bbf2cf30daaed7ab01b6
[ "MIT" ]
null
null
null
setup.py
kirberich/textractor
fb55c27f2facbe8ff200bbf2cf30daaed7ab01b6
[ "MIT" ]
null
null
null
setup.py
kirberich/textractor
fb55c27f2facbe8ff200bbf2cf30daaed7ab01b6
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='textractor', version='1.0', description='Minimalistic HTML text extraction library', url='https://github.com/kirberich/textractor', author='Robert Kirberich', license='MIT', py_modules=['textractor'], zip_safe=False, install_requires=[ ...
21.055556
60
0.627968
95b94e7327030cee33385ba574c8017ea793b5ef
3,775
py
Python
deepseries/model/wave2wave.py
EvilPsyCHo/Deep-Time-Series-Prediction
f6a6da060bb3f7d07f2a61967ee6007e9821064e
[ "Apache-2.0" ]
334
2019-11-01T01:39:18.000Z
2022-03-31T08:10:17.000Z
deepseries/model/wave2wave.py
luxixiang/Deep-Time-Series-Prediction
f6a6da060bb3f7d07f2a61967ee6007e9821064e
[ "Apache-2.0" ]
8
2019-12-30T08:01:32.000Z
2021-12-06T05:27:29.000Z
deepseries/model/wave2wave.py
luxixiang/Deep-Time-Series-Prediction
f6a6da060bb3f7d07f2a61967ee6007e9821064e
[ "Apache-2.0" ]
57
2020-01-13T13:20:15.000Z
2022-03-31T08:10:20.000Z
# encoding: utf-8 """ @author : zhirui zhou @contact: evilpsycho42@gmail.com @time : 2020/5/20 10:51 """ import torch.nn as nn import torch from deepseries.nn.cnn import WaveNet from deepseries.nn.comm import Embeddings, Concat from deepseries.nn.loss import RMSE from deepseries.log import get_logger logger = get_lo...
43.390805
111
0.593642
a47033aab9506653cb2c6aa31f6a3f6c67255717
299
py
Python
2. mergesort in multi-threading/test.py
yedkk/parallel-computing-and-mapreduce
e10448ae318deca0dbd9e7a0e1cf8bfc7a66c323
[ "MIT" ]
null
null
null
2. mergesort in multi-threading/test.py
yedkk/parallel-computing-and-mapreduce
e10448ae318deca0dbd9e7a0e1cf8bfc7a66c323
[ "MIT" ]
null
null
null
2. mergesort in multi-threading/test.py
yedkk/parallel-computing-and-mapreduce
e10448ae318deca0dbd9e7a0e1cf8bfc7a66c323
[ "MIT" ]
null
null
null
words = count_them(["different","same"],['C:\\Users\yedkk\ds410-hw-yedkk\hw3\part-00000', 'C:\\Users\yedkk\ds410-hw-yedkk\hw3\part-00001', 'C:\\Users\yedkk\ds410-hw-yedkk\hw3\part-00002', 'C:\\Users\yedkk\ds410-hw-yedkk\hw3\part-00003']) d.visualize('ati_out.png') print(words[-5000], words[-10000])
99.666667
237
0.70903
1ea039ee17dfe9410263211646390f7e98b8af05
5,828
py
Python
mvm_python.py
JamesSample/icpw
47562f601fc8fe23720267d083dabc540889565e
[ "MIT" ]
1
2020-05-06T21:18:33.000Z
2020-05-06T21:18:33.000Z
mvm_python.py
JamesSample/icpw
47562f601fc8fe23720267d083dabc540889565e
[ "MIT" ]
1
2020-02-05T16:50:23.000Z
2020-03-26T16:16:37.000Z
mvm_python.py
JamesSample/icpw
47562f601fc8fe23720267d083dabc540889565e
[ "MIT" ]
null
null
null
#------------------------------------------------------------------------------- # Name: mvm_python.py # Purpose: Download data from the MVM web API. # # Author: James Sample # # Created: 19/10/2018 # Copyright: (c) James Sample and NIVA, 2018 # Licence: <your licence> #-----------------------...
33.494253
86
0.497598
fb085d03d58f8d54a2dc6855fc977bf8bb57a57e
2,939
py
Python
Award/models.py
Eugeneiregi/Awards
5cd6d51d59f170cd6ee4ee464f152484191884bd
[ "MIT" ]
null
null
null
Award/models.py
Eugeneiregi/Awards
5cd6d51d59f170cd6ee4ee464f152484191884bd
[ "MIT" ]
8
2020-06-11T10:03:53.000Z
2022-03-12T00:34:32.000Z
Award/models.py
Eugeneiregi/Awards
5cd6d51d59f170cd6ee4ee464f152484191884bd
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models class Profile(models.Model): profile_picture = models.ImageField(upload_to='profile_pics/', blank=True) prof_user = models.ForeignKey(User, on_delete=models.PROTECT,...
34.576471
104
0.699898
96be3af8e55400ee7ddc00de1dbd1d53417e6945
936
py
Python
matrix-python-project/utils/decrypt.py
hokaso/hocassian-media-matrix
2c2e5a4c72dfa43d2eed0f083f5b19238aea2765
[ "MIT" ]
141
2021-06-27T03:18:54.000Z
2022-03-17T03:24:26.000Z
matrix-python-project/utils/decrypt.py
hokaso/hocassian-media-matrix
2c2e5a4c72dfa43d2eed0f083f5b19238aea2765
[ "MIT" ]
1
2021-08-06T17:35:01.000Z
2021-08-06T17:35:01.000Z
matrix-python-project/utils/decrypt.py
hokaso/hocassian-media-matrix
2c2e5a4c72dfa43d2eed0f083f5b19238aea2765
[ "MIT" ]
24
2021-06-29T01:58:59.000Z
2022-03-02T01:42:43.000Z
# -*- coding: utf-8 -*- # AES-demo #采用AES对称加密算法 import os, json, time, base64 from Crypto.Cipher import AES # str不是16的倍数那就补足为16的倍数 def add_to_16(value): while len(value) % 16 != 0: value += '\0' return str.encode(value) # 解密方法 def decrypt(): with open("../key.txt", 'r') as f: key = f.r...
22.285714
94
0.58547
9126fb916a06464b0b12a1884880e97d4ddef2bd
4,809
py
Python
pymc3/step_methods/arraystep.py
ds7788/hello-world
f16466f4d4de8cd412771415a361738ba020e568
[ "Apache-2.0" ]
1
2018-08-16T22:03:21.000Z
2018-08-16T22:03:21.000Z
pymc3/step_methods/arraystep.py
ds7788/hello-world
f16466f4d4de8cd412771415a361738ba020e568
[ "Apache-2.0" ]
null
null
null
pymc3/step_methods/arraystep.py
ds7788/hello-world
f16466f4d4de8cd412771415a361738ba020e568
[ "Apache-2.0" ]
null
null
null
from ..core import * from .compound import CompoundStep from ..vartypes import * import numpy as np from numpy.random import uniform from numpy import log, isfinite from enum import IntEnum, unique __all__ = ['ArrayStep', 'ArrayStepShared', 'metrop_select', 'SamplerHist', 'Competence', 'Constant'] # TOD...
28.96988
122
0.607403
b2706655401d1fd3621fc1a9adfdba984f20015f
3,296
py
Python
pyspheregl/demo/world_points.py
JosephOHagan/pyspheregl
4258f8bb69372f0cb33ea1d859aaa1d8195e0167
[ "BSD-2-Clause" ]
null
null
null
pyspheregl/demo/world_points.py
JosephOHagan/pyspheregl
4258f8bb69372f0cb33ea1d859aaa1d8195e0167
[ "BSD-2-Clause" ]
null
null
null
pyspheregl/demo/world_points.py
JosephOHagan/pyspheregl
4258f8bb69372f0cb33ea1d859aaa1d8195e0167
[ "BSD-2-Clause" ]
3
2018-08-09T18:57:51.000Z
2019-11-23T08:27:33.000Z
import numpy as np import pyglet from pyglet.gl import * # sphere stuff from ..sim.sphere_sim import getshader, resource_file from ..sim import sphere_sim from ..sphere import sphere from ..utils.graphics_utils import make_unit_quad_tile from ..utils.shader import ShaderVBO, shader_from_file from ..utils.np_vbo impor...
37.033708
148
0.581311
858c644641578fab57269fe79cb1d579c6db5942
11,752
py
Python
froide/helper/email_parsing.py
OpendataCH/froide
8136bac0d8caa56f9cfc7ba15480be987280e55d
[ "MIT" ]
null
null
null
froide/helper/email_parsing.py
OpendataCH/froide
8136bac0d8caa56f9cfc7ba15480be987280e55d
[ "MIT" ]
null
null
null
froide/helper/email_parsing.py
OpendataCH/froide
8136bac0d8caa56f9cfc7ba15480be987280e55d
[ "MIT" ]
null
null
null
""" Original EmailParser Code by Ian Lewis: http://www.ianlewis.org/en/parsing-email-attachments-python Licensed under MIT """ import re import time from contextlib import closing from datetime import datetime, timedelta from email.header import decode_header from email.message import EmailMessage from email.parser ...
31.007916
113
0.646273
5a5ddc6c3e8a40ca8b0cbc723191a01cf09b8a05
4,064
py
Python
custom_components/ge_home/devices/base.py
bendavis/ha_components
cc19732fd5d234881f74c90f636658ca7b04cb47
[ "MIT" ]
null
null
null
custom_components/ge_home/devices/base.py
bendavis/ha_components
cc19732fd5d234881f74c90f636658ca7b04cb47
[ "MIT" ]
null
null
null
custom_components/ge_home/devices/base.py
bendavis/ha_components
cc19732fd5d234881f74c90f636658ca7b04cb47
[ "MIT" ]
null
null
null
import asyncio import logging from typing import Dict, List, Optional from gehomesdk import GeAppliance from gehomesdk.erd import ErdCode, ErdCodeType, ErdApplianceType from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import Entity from homeassistant.helpers.update_coordinator import Dat...
32.253968
94
0.656988
69f6c22cb075dcba695f64c5a667da858d2dbf88
4,293
py
Python
task-automation/AMITaggingFromEc2py.py
witaloandrade/botools
b37ef276fc7f1882e5c20a992c20c13e80078fe8
[ "MIT" ]
null
null
null
task-automation/AMITaggingFromEc2py.py
witaloandrade/botools
b37ef276fc7f1882e5c20a992c20c13e80078fe8
[ "MIT" ]
null
null
null
task-automation/AMITaggingFromEc2py.py
witaloandrade/botools
b37ef276fc7f1882e5c20a992c20c13e80078fe8
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """ Witalo Andrade - 2021-07-15 This script will copy old BillingId/Owner tag values to new values. How run it: python3 ./<NAME>.py """ import os import boto3 from time import sleep from botocore.exceptions import ClientError import logging import re logging.basicConfig(format='%(levelname)s : %(m...
38.330357
121
0.569299
0d8c21969cb6a759e7ccc7dc7d78c05395f52aaf
5,255
py
Python
python/examples/depthwise_conv/depthwise_conv_2d_bench.py
yzhang93/iree-llvm-sandbox
1566f318f27585b60464516a63b49e5bc09f8fcb
[ "Apache-2.0" ]
null
null
null
python/examples/depthwise_conv/depthwise_conv_2d_bench.py
yzhang93/iree-llvm-sandbox
1566f318f27585b60464516a63b49e5bc09f8fcb
[ "Apache-2.0" ]
null
null
null
python/examples/depthwise_conv/depthwise_conv_2d_bench.py
yzhang93/iree-llvm-sandbox
1566f318f27585b60464516a63b49e5bc09f8fcb
[ "Apache-2.0" ]
null
null
null
# RUN: %PYTHON %s 2>&1 | FileCheck %s # This file contains simple test cases that combine various codegen options. from ..core.experts import * from ..core.harness import * from ..core.transforms import * from .definitions import * fun_name = 'depthwise_conv_2d_nhwc_hwc' op_name = 'linalg.depthwise_conv_2d_nhwc_hwc...
38.357664
81
0.442055
648a04658683e4dfd71ff4e6f2a620d5a400b2da
4,028
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/18_features/numtrees_12/rule_4.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/18_features/numtrees_12/rule_4.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/18_features/numtrees_12/rule_4.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Passanger, obj[1]: Weather, obj[2]: Time, obj[3]: Coupon, obj[4]: Coupon_validity, obj[5]: Gender, obj[6]: Age, obj[7]: Maritalstatus, obj[8]: Children, obj[9]: Education, obj[10]: Occupation, obj[11]: Income, obj[12]: Bar, obj[13]: Coffeehouse, obj[14]: Restaurantlessthan20, obj[15]: Re...
37.296296
378
0.542205
35c4094b846663cdbc4b77e0ba392b8ebfae8185
901
py
Python
animal_shelters/migrations/0014_auto_20210716_1333.py
KrzysztofCalus/Animal_shelters_app
982689c719377d94bac22145fb6fc4bfb81821a2
[ "CC0-1.0" ]
null
null
null
animal_shelters/migrations/0014_auto_20210716_1333.py
KrzysztofCalus/Animal_shelters_app
982689c719377d94bac22145fb6fc4bfb81821a2
[ "CC0-1.0" ]
null
null
null
animal_shelters/migrations/0014_auto_20210716_1333.py
KrzysztofCalus/Animal_shelters_app
982689c719377d94bac22145fb6fc4bfb81821a2
[ "CC0-1.0" ]
null
null
null
# Generated by Django 3.2.4 on 2021-07-16 13:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('animal_shelters', '0013_auto_20210715_1935'), ] operations = [ migrations.AlterField( model_name='owner', name='abou...
26.5
69
0.564928
6322cae22e46b1890a4644a369af6810818abe11
495
py
Python
cat_blog/users/tests/test_tasks.py
turamant/cat_blog
0a04978db78d805f6468626ab23454ffa52b2411
[ "MIT" ]
null
null
null
cat_blog/users/tests/test_tasks.py
turamant/cat_blog
0a04978db78d805f6468626ab23454ffa52b2411
[ "MIT" ]
4
2021-03-30T14:29:55.000Z
2021-06-10T19:56:22.000Z
cat_blog/users/tests/test_tasks.py
turamant/cat_blog
0a04978db78d805f6468626ab23454ffa52b2411
[ "MIT" ]
null
null
null
import pytest from celery.result import EagerResult from cat_blog.users.tasks import get_users_count from cat_blog.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_count Celery task.""" UserFactory.create_batc...
29.117647
66
0.789899
a7cba21667e624e970fb95c8372f19d0fd0e5e2c
4,582
py
Python
test/functional/mempool_reorg.py
Carbon-Reduction-Initiative/CARI
ff7e8d4d67628aa1a833d338704b37c3d8188aaa
[ "MIT" ]
2
2021-04-23T20:50:52.000Z
2021-11-08T20:09:46.000Z
test/functional/mempool_reorg.py
Carbon-Reduction-Initiative/CARI
ff7e8d4d67628aa1a833d338704b37c3d8188aaa
[ "MIT" ]
null
null
null
test/functional/mempool_reorg.py
Carbon-Reduction-Initiative/CARI
ff7e8d4d67628aa1a833d338704b37c3d8188aaa
[ "MIT" ]
5
2020-11-06T10:06:07.000Z
2022-01-26T17:19:20.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test mempool re-org scenarios. Test re-org scenarios with a mempool that contains transactions that sp...
48.231579
123
0.690965
f72538c76f49ccac9bcd5d18c35fad8c0e5bdbe6
691
py
Python
backtracking/0216_combination_sum_3.py
MartinMa28/Algorithms_review
3f2297038c00f5a560941360ca702e6868530f34
[ "MIT" ]
null
null
null
backtracking/0216_combination_sum_3.py
MartinMa28/Algorithms_review
3f2297038c00f5a560941360ca702e6868530f34
[ "MIT" ]
null
null
null
backtracking/0216_combination_sum_3.py
MartinMa28/Algorithms_review
3f2297038c00f5a560941360ca702e6868530f34
[ "MIT" ]
null
null
null
class Solution: def __init__(self): self.combs = [] def _backtrack(self, candidates, cur, target, k): if len(cur) == k and sum(cur) == target: self.combs.append(cur[:]) return if sum(cur) > target: return elif len(cur) < k: ...
30.043478
69
0.474674
3fae588403a5e2909f831ba1636738eee83128c4
2,965
py
Python
ggpacket.py
twasilczyk/gg-server
e267eb9845f8c743b153279b7ae716d60fe1f611
[ "MIT" ]
1
2018-01-16T04:01:06.000Z
2018-01-16T04:01:06.000Z
ggpacket.py
twasilczyk/gg-server
e267eb9845f8c743b153279b7ae716d60fe1f611
[ "MIT" ]
null
null
null
ggpacket.py
twasilczyk/gg-server
e267eb9845f8c743b153279b7ae716d60fe1f611
[ "MIT" ]
null
null
null
import struct import time import ggproto import packets_pb2 def readUIN(data): return int(data[2:]) def writeUIN(uin): uin = str(uin) return struct.pack("<BB", 0, len(uin)) + uin class GGPacket: def __init__(self, pid): self.pid = pid def body(self): return "" def __str__(self): b = self.body() head...
23.164063
89
0.693761
435808ecd070b23c6baf2ccf88b907be018ba667
12,172
py
Python
venv/lib/python3.8/site-packages/mercurial/lock.py
JesseDavids/mqtta
389eb4f06242d4473fe1bcff7fc6a22290e0d99c
[ "Apache-2.0" ]
4
2021-02-05T10:57:39.000Z
2022-02-25T04:43:23.000Z
venv/lib/python3.8/site-packages/mercurial/lock.py
JesseDavids/mqtta
389eb4f06242d4473fe1bcff7fc6a22290e0d99c
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/mercurial/lock.py
JesseDavids/mqtta
389eb4f06242d4473fe1bcff7fc6a22290e0d99c
[ "Apache-2.0" ]
null
null
null
# lock.py - simple advisory locking scheme for mercurial # # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import contextlib import errn...
30.582915
78
0.552498
a67e32ba36d9f5b94b86acb9e52573d6ccd245fa
10,703
py
Python
odoo/addons/website_sale/models/sale_order.py
tuanquanghpvn/odoo8-tutorial
52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e
[ "MIT" ]
1
2019-12-29T11:53:56.000Z
2019-12-29T11:53:56.000Z
odoo/addons/website_sale/models/sale_order.py
tuanquanghpvn/odoo8-tutorial
52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e
[ "MIT" ]
null
null
null
odoo/addons/website_sale/models/sale_order.py
tuanquanghpvn/odoo8-tutorial
52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import random from openerp import SUPERUSER_ID from openerp.osv import osv, orm, fields from openerp.addons.web.http import request from openerp.tools.translate import _ class sale_order(osv.Model): _inherit = "sale.order" def _cart_qty(self, cr, uid, ids, field_name, arg, context=No...
48.429864
141
0.613286
e73da25b738650b85ba56a05411845edcd2b5f27
5,935
py
Python
nerfies/schedules.py
oahzxl/nerfies
9e8b007d8fc7059f6a42e07233c76c4f356d8439
[ "Apache-2.0" ]
716
2021-02-03T08:37:54.000Z
2022-03-31T19:40:45.000Z
nerfies/schedules.py
oahzxl/nerfies
9e8b007d8fc7059f6a42e07233c76c4f356d8439
[ "Apache-2.0" ]
53
2021-02-04T21:07:44.000Z
2022-03-31T15:58:21.000Z
nerfies/schedules.py
oahzxl/nerfies
9e8b007d8fc7059f6a42e07233c76c4f356d8439
[ "Apache-2.0" ]
107
2021-02-03T09:57:48.000Z
2022-03-29T09:19:33.000Z
# Copyright 2021 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
29.527363
77
0.693513
6d325f33051561006bca2e2b619761bd0a157753
10,688
py
Python
vyper/parser/lll_node.py
mpcnat/vyper
731263c9bea826a167639989350688833f68c182
[ "MIT" ]
null
null
null
vyper/parser/lll_node.py
mpcnat/vyper
731263c9bea826a167639989350688833f68c182
[ "MIT" ]
null
null
null
vyper/parser/lll_node.py
mpcnat/vyper
731263c9bea826a167639989350688833f68c182
[ "MIT" ]
null
null
null
import re from vyper.types import ( ceil32, BaseType, NodeType, NullType ) from vyper.opcodes import ( comb_opcodes ) from vyper.utils import valid_lll_macros # Set default string representation for ints in LLL output. AS_HEX_DEFAULT = True # Terminal color types OKBLUE = '\033[94m' OKMAGENTA = '\...
44.719665
152
0.544068
cbcdb6909198784a7079e1ce5f3995fffb5b72f0
598
py
Python
src/sentry/testutils/middleware.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
src/sentry/testutils/middleware.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
src/sentry/testutils/middleware.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from sentry.middleware.sudo import SudoMiddleware as BaseSudoMiddleware class BrokenRequestMiddleware(object): def process_request(self, request): raise ImportError("request") class BrokenResponseMiddleware(object): def process_response(self, request, response...
24.916667
71
0.757525
d8f3ee92b81b82e85b49144b1a59b7a4c93ecd5d
1,588
py
Python
src/baxter_tools/__init__.py
birlrobotics/baxter_tools
0561030eb8cacd0e241d8f282d1f238466d44504
[ "BSD-3-Clause" ]
null
null
null
src/baxter_tools/__init__.py
birlrobotics/baxter_tools
0561030eb8cacd0e241d8f282d1f238466d44504
[ "BSD-3-Clause" ]
null
null
null
src/baxter_tools/__init__.py
birlrobotics/baxter_tools
0561030eb8cacd0e241d8f282d1f238466d44504
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2013-2014, Rethink Robotics # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditio...
54.758621
77
0.785894
67c99cf8281b54455de7bb1998602f66105a3994
256
py
Python
solutions/976_largest_perimeter_triangle.py
YiqunPeng/leetcode_pro
7e6376984f9baec49a5e827d98330fe3d1b656f0
[ "MIT" ]
null
null
null
solutions/976_largest_perimeter_triangle.py
YiqunPeng/leetcode_pro
7e6376984f9baec49a5e827d98330fe3d1b656f0
[ "MIT" ]
null
null
null
solutions/976_largest_perimeter_triangle.py
YiqunPeng/leetcode_pro
7e6376984f9baec49a5e827d98330fe3d1b656f0
[ "MIT" ]
null
null
null
class Solution: def largestPerimeter(self, nums: List[int]) -> int: nums.sort() for i in range(len(nums)-1, 1, -1): if nums[i-1] + nums[i-2] > nums[i]: return nums[i-1] + nums[i-2] + nums[i] return 0
32
55
0.5
23362a8c6eacc40514591784e5e13606c819b9fc
17,684
py
Python
evalml/tests/model_understanding_tests/prediction_explanations_tests/test_user_interface.py
freddyaboulton/evalml
53242f9d7397a1af3f8c48d498a023042790d4c3
[ "BSD-3-Clause" ]
454
2020-09-25T15:36:06.000Z
2022-03-30T04:48:49.000Z
evalml/tests/model_understanding_tests/prediction_explanations_tests/test_user_interface.py
freddyaboulton/evalml
53242f9d7397a1af3f8c48d498a023042790d4c3
[ "BSD-3-Clause" ]
2,175
2020-09-25T17:05:45.000Z
2022-03-31T19:54:54.000Z
evalml/tests/model_understanding_tests/prediction_explanations_tests/test_user_interface.py
freddyaboulton/evalml
53242f9d7397a1af3f8c48d498a023042790d4c3
[ "BSD-3-Clause" ]
66
2020-09-25T18:46:27.000Z
2022-03-02T18:33:30.000Z
import copy import json from itertools import product import numpy as np import pandas as pd import pytest from evalml.model_understanding.prediction_explanations._user_interface import ( _BinarySHAPTable, _make_json_serializable, _make_rows, _make_text_table, _MultiClassSHAPTable, _Regression...
26.998473
118
0.417892
599b48d82b505fbcafd05e8e6288511fe975f658
9,051
py
Python
contrib/python/numpy/numpy/core/shape_base.py
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
60
2017-08-05T21:47:56.000Z
2022-03-08T21:46:29.000Z
contrib/python/numpy/numpy/core/shape_base.py
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
48
2020-05-20T08:26:54.000Z
2022-03-29T21:19:52.000Z
contrib/python/numpy/numpy/core/shape_base.py
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
31
2020-05-25T21:14:56.000Z
2022-03-25T08:57:43.000Z
from __future__ import division, absolute_import, print_function __all__ = ['atleast_1d', 'atleast_2d', 'atleast_3d', 'vstack', 'hstack', 'stack'] from . import numeric as _nx from .numeric import asanyarray, newaxis def atleast_1d(*arys): """ Convert inputs to arrays with at least one dimension. ...
25.786325
79
0.54204
b186e4947ad4ffefd3ec4fdc0971a6081e9e068a
548
py
Python
test_cases/general/array/of/path/py/test_generate/__init__.py
Parquery/mapry
93515307f9eba8447fe64b0ac7cc68b2d07205a7
[ "MIT" ]
11
2019-06-26T05:56:41.000Z
2021-03-28T16:44:16.000Z
test_cases/general/array/of/path/py/test_generate/__init__.py
Parquery/mapry
93515307f9eba8447fe64b0ac7cc68b2d07205a7
[ "MIT" ]
4
2019-10-18T14:43:59.000Z
2020-04-02T19:12:07.000Z
test_cases/general/array/of/path/py/test_generate/__init__.py
Parquery/mapry
93515307f9eba8447fe64b0ac7cc68b2d07205a7
[ "MIT" ]
3
2019-06-17T07:39:03.000Z
2020-04-01T14:01:23.000Z
# File automatically generated by mapry. DO NOT EDIT OR APPEND! """defines some object graph.""" import pathlib import typing class SomeGraph: """defines some object graph.""" def __init__( self, array_of_paths: typing.List[pathlib.Path]) -> None: """ initializes a...
20.296296
67
0.65146
ad2c19c7613ac72dbe8324af1f3c7a8052b05216
42,215
py
Python
mmdet3d/models/dense_heads/fcos_mono3d_head.py
amirulhaq/mmdetection3d
88855ae872aa1411ab124fd1702edc3e2105c3dd
[ "Apache-2.0" ]
29
2021-09-29T13:31:12.000Z
2022-03-15T13:31:25.000Z
mmdet3d/models/dense_heads/fcos_mono3d_head.py
amirulhaq/mmdetection3d
88855ae872aa1411ab124fd1702edc3e2105c3dd
[ "Apache-2.0" ]
3
2021-12-13T01:21:12.000Z
2022-02-24T01:46:14.000Z
mmdet3d/models/dense_heads/fcos_mono3d_head.py
amirulhaq/mmdetection3d
88855ae872aa1411ab124fd1702edc3e2105c3dd
[ "Apache-2.0" ]
1
2021-06-22T23:43:29.000Z
2021-06-22T23:43:29.000Z
import numpy as np import torch from mmcv.cnn import Scale, normal_init from mmcv.runner import force_fp32 from torch import nn as nn from mmdet3d.core import box3d_multiclass_nms, limit_period, xywhr2xyxyr from mmdet.core import multi_apply from mmdet.models.builder import HEADS, build_loss from .anchor_free_mono3d_h...
44.624736
113
0.571195
38bdd5891b4f18a611c0d1400eab329f8e3c270e
1,759
py
Python
manga_db/db/id_map.py
nilfoer/mangadb
860d7de310002735631ea26810b4df5b6bc08d7b
[ "MIT" ]
3
2021-01-14T16:22:41.000Z
2022-02-21T03:31:22.000Z
manga_db/db/id_map.py
nilfoer/mangadb
860d7de310002735631ea26810b4df5b6bc08d7b
[ "MIT" ]
13
2021-01-14T10:34:19.000Z
2021-05-20T08:47:54.000Z
manga_db/db/id_map.py
nilfoer/mangadb
860d7de310002735631ea26810b4df5b6bc08d7b
[ "MIT" ]
1
2022-02-24T03:10:04.000Z
2022-02-24T03:10:04.000Z
import weakref class IndentityMap: def __init__(self): # d[key] directly returns acutal object (not weakref) # if value gets gc'd key/entry gets autmatically removed from WeakValueDictionary # if we retrieved and assigned the obj to a var then it wont be collected by gc anymore se...
25.128571
95
0.549744
6e1a1ad6f798eaa5838ca53f1f5a62f22e5313bb
482
py
Python
packages/python/plotly/plotly/validators/splom/hoverlabel/_bordercolor.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/splom/hoverlabel/_bordercolor.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/splom/hoverlabel/_bordercolor.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="splom.hoverlabel", **kwargs ): super(BordercolorValidator, self).__init__( plotly_name=plotly_name, p...
32.133333
81
0.653527
262a0ab73cb1436d2b54b1a0aefa4f16d78ce539
800
py
Python
migrations/versions/6abc139be248_creating_table_subjects.py
gabrieldosprazeres/e-plus
0cd2cf77a2be5ac5b577e22c64f78180d3f5ff69
[ "MIT" ]
null
null
null
migrations/versions/6abc139be248_creating_table_subjects.py
gabrieldosprazeres/e-plus
0cd2cf77a2be5ac5b577e22c64f78180d3f5ff69
[ "MIT" ]
null
null
null
migrations/versions/6abc139be248_creating_table_subjects.py
gabrieldosprazeres/e-plus
0cd2cf77a2be5ac5b577e22c64f78180d3f5ff69
[ "MIT" ]
null
null
null
"""creating table 'subjects' Revision ID: 6abc139be248 Revises: 567869708e99 Create Date: 2022-01-06 21:48:30.749836 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '6abc139be248' down_revision = '567869708e99' branch_labels = None depends_on = None def upgra...
23.529412
65
0.685
d1fb329cc395e99e9cee3db38eb481f56c890e73
1,436
py
Python
src/its_preselector/test/test_cal_source.py
NTIA/Preselector
ee275a6bd48b452cc1d2cd8870e1e617d7e4373b
[ "RSA-MD" ]
null
null
null
src/its_preselector/test/test_cal_source.py
NTIA/Preselector
ee275a6bd48b452cc1d2cd8870e1e617d7e4373b
[ "RSA-MD" ]
1
2022-03-25T21:57:57.000Z
2022-03-25T21:57:57.000Z
src/its_preselector/test/test_cal_source.py
NTIA/Preselector
ee275a6bd48b452cc1d2cd8870e1e617d7e4373b
[ "RSA-MD" ]
null
null
null
import unittest from its_preselector.web_relay_preselector import WebRelayPreselector import json class TestCalSource(unittest.TestCase): @classmethod def setUpClass(cls): file = open('test_metadata.sigmf-meta') sensor_def = json.load(file) file.close() cls.preselector = WebRe...
37.789474
181
0.711003
b58d03ffa8a18b32ecf99a2f312c35311e37f471
3,246
py
Python
monk/pytorch/losses/retrieve_loss.py
Shreyashwaghe/monk_v1
4ee4d9483e8ffac9b73a41f3c378e5abf5fc799b
[ "Apache-2.0" ]
2
2020-09-16T06:05:50.000Z
2021-04-07T12:05:20.000Z
monk/pytorch/losses/retrieve_loss.py
Shreyashwaghe/monk_v1
4ee4d9483e8ffac9b73a41f3c378e5abf5fc799b
[ "Apache-2.0" ]
null
null
null
monk/pytorch/losses/retrieve_loss.py
Shreyashwaghe/monk_v1
4ee4d9483e8ffac9b73a41f3c378e5abf5fc799b
[ "Apache-2.0" ]
null
null
null
from pytorch.losses.imports import * from system.imports import * @accepts(dict, post_trace=True) @TraceFunction(trace_args=False, trace_rv=False) def retrieve_loss(system_dict): ''' Retrieve loss post state changes Args: system_dict (dict): System dictionary storing experiment state and set vari...
35.67033
91
0.601664
be4e5c3c81fefd213e5a89f63bac36543c571e1c
259
py
Python
lib/model/nms/nms_gpu.py
user-never-lose/fpn.pytorch
21b15e1414db9bb8fb8c5574cfc0ce0d40e01286
[ "MIT" ]
945
2018-01-14T05:11:11.000Z
2022-03-30T07:44:41.000Z
lib/model/nms/nms_gpu.py
smartprobe/SKCD
f8d52f060d07f043c2d208ec84e5ce55225aaef6
[ "MIT" ]
55
2018-01-20T22:34:47.000Z
2021-12-03T05:48:51.000Z
lib/model/nms/nms_gpu.py
smartprobe/SKCD
f8d52f060d07f043c2d208ec84e5ce55225aaef6
[ "MIT" ]
254
2018-01-14T05:12:16.000Z
2022-03-19T12:50:31.000Z
import torch import numpy as np from _ext import nms import pdb def nms_gpu(dets, thresh): keep = dets.new(dets.size(0), 1).zero_().int() num_out = dets.new(1).zero_().int() nms.nms_cuda(keep, dets, num_out, thresh) keep = keep[:num_out[0]] return keep
21.583333
47
0.702703
6b226ec047dbd0edfe152e91a361e5b89a26216b
3,502
py
Python
OS/10. Round Robin.py
pratikpc/OpenGL-Pracs
8827eb65576db788733a011dcabee4daa3d32d94
[ "MIT" ]
1
2019-04-26T15:09:57.000Z
2019-04-26T15:09:57.000Z
OS/10. Round Robin.py
pratikpc/OpenGL-Pracs
8827eb65576db788733a011dcabee4daa3d32d94
[ "MIT" ]
null
null
null
OS/10. Round Robin.py
pratikpc/OpenGL-Pracs
8827eb65576db788733a011dcabee4daa3d32d94
[ "MIT" ]
1
2020-11-19T07:59:13.000Z
2020-11-19T07:59:13.000Z
# Algorithm # Create A Class Process # Store Usual params in it # ProcessId, Burst, Arrival, Completion etc # # But also create Param # <b>*RobinLeft*</b> # Set *RobinLeft=Burst* # Also IterationCount = 0 # ProcessAppendNotAddedAhead # Iterate through all processes # Add to Chart all Processes which have #...
31.836364
104
0.736722
f0cec8c3aac51ad838bb6de92bd719f169eca75d
7,962
py
Python
app.py
syedparsa/mealRestAPI
1fd2dcb41fc1a320f6724471bfa89070d872d5e5
[ "MIT" ]
null
null
null
app.py
syedparsa/mealRestAPI
1fd2dcb41fc1a320f6724471bfa89070d872d5e5
[ "MIT" ]
null
null
null
app.py
syedparsa/mealRestAPI
1fd2dcb41fc1a320f6724471bfa89070d872d5e5
[ "MIT" ]
null
null
null
from flask_migrate import Migrate from flask import Flask, request, jsonify, make_response from flask_sqlalchemy import SQLAlchemy from werkzeug.security import generate_password_hash, check_password_hash import uuid import jwt import datetime import json from functools import wraps app = Flask(__name__) app.config["...
30.273764
190
0.632756