hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
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
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
19310709fccc926261a99f530ec7e2d84e44988f
3,142
py
Python
Drop7/test/Disk_Test.py
SanderP99/Drop7
b11c2590d3cc1e311fb34a4635a1f6c075d9cb59
[ "MIT" ]
null
null
null
Drop7/test/Disk_Test.py
SanderP99/Drop7
b11c2590d3cc1e311fb34a4635a1f6c075d9cb59
[ "MIT" ]
null
null
null
Drop7/test/Disk_Test.py
SanderP99/Drop7
b11c2590d3cc1e311fb34a4635a1f6c075d9cb59
[ "MIT" ]
null
null
null
# import Drop7.Board as Board import Drop7.Disk as Disk def test_Is_Proper_Disk__Legal_Case(score, max_score): """Function is_proper_disk: given disk is proper disk.""" max_score.value += 1 try: assert Disk.is_proper_disk(4, Disk.init_disk(Disk.VISIBLE, 4)) assert Disk.is_proper_disk(4, Dis...
26.854701
74
0.638765
0
0
0
0
0
0
0
0
426
0.135582
19340df43351011be81d21c8afe59df9e5f9d483
1,821
py
Python
Sensors/MaxSonarTTY.py
paceaux/pi-projects
c9eb1f138868d41f8304c4251382cc4a6d161ba8
[ "MIT" ]
null
null
null
Sensors/MaxSonarTTY.py
paceaux/pi-projects
c9eb1f138868d41f8304c4251382cc4a6d161ba8
[ "MIT" ]
null
null
null
Sensors/MaxSonarTTY.py
paceaux/pi-projects
c9eb1f138868d41f8304c4251382cc4a6d161ba8
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # Filename: maxSonarTTY.py # Reads serial data from Maxbotix ultrasonic rangefinders # Gracefully handles most common serial data glitches # Use as an importable module with "import MaxSonarTTY" # Returns an integer value representing distance to target in millimeters from time import time from ser...
33.109091
84
0.556837
1,480
0.81274
0
0
0
0
0
0
561
0.308072
1935874de5ab32170824f8aa54ca87bd5761ec1c
4,697
py
Python
src/estimator.py
NoumbissiValere/covid-19-cure
7b4ace8cb746c6ee5952bfd678303500f5ab58dc
[ "MIT" ]
null
null
null
src/estimator.py
NoumbissiValere/covid-19-cure
7b4ace8cb746c6ee5952bfd678303500f5ab58dc
[ "MIT" ]
null
null
null
src/estimator.py
NoumbissiValere/covid-19-cure
7b4ace8cb746c6ee5952bfd678303500f5ab58dc
[ "MIT" ]
null
null
null
def estimator(data): currentlyInfected = covid19ImpactEstimator(data['reportedCases']) severeCurrentlyInfected = covid19ImpactEstimator(data['reportedCases'], severe=True) infectionsByRequestedTime = getInfectionsByRequestedTime(currentlyInfected, ...
51.054348
110
0.604003
0
0
0
0
0
0
0
0
681
0.144986
1935e935a94ea899193f63cf6a01d898e2f578ec
2,577
py
Python
tests/output/TestFile.py
dstore-dbap/LumberMill
b7cbadc209a83386871735b8ad88b61da917a6ab
[ "Apache-2.0" ]
15
2015-12-14T19:07:28.000Z
2022-02-28T13:32:11.000Z
tests/output/TestFile.py
dstore-dbap/LumberMill
b7cbadc209a83386871735b8ad88b61da917a6ab
[ "Apache-2.0" ]
null
null
null
tests/output/TestFile.py
dstore-dbap/LumberMill
b7cbadc209a83386871735b8ad88b61da917a6ab
[ "Apache-2.0" ]
4
2017-02-08T10:49:55.000Z
2019-03-19T18:47:46.000Z
import sys import os import io import gzip import mock import tempfile import lumbermill.utils.DictUtils as DictUtils from tests.ModuleBaseTestCase import ModuleBaseTestCase from lumbermill.output import File class TestFile(ModuleBaseTestCase): def setUp(self): super(TestFile, self).setUp(File.File(mock...
37.347826
128
0.629414
2,365
0.917734
0
0
0
0
0
0
326
0.126504
19368974491b6add6e004f6c293a6ac67a000708
4,517
py
Python
user_scripts/decode_logits.py
DavidHribek/pero-ocr
8d274282813878b3e31dd560563a36b3f02e5c33
[ "BSD-3-Clause" ]
null
null
null
user_scripts/decode_logits.py
DavidHribek/pero-ocr
8d274282813878b3e31dd560563a36b3f02e5c33
[ "BSD-3-Clause" ]
null
null
null
user_scripts/decode_logits.py
DavidHribek/pero-ocr
8d274282813878b3e31dd560563a36b3f02e5c33
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import argparse import pickle import time import sys from safe_gpu.safe_gpu import GPUOwner from pero_ocr.decoding import confusion_networks from pero_ocr.decoding.decoding_itf import prepare_dense_logits, construct_lm, get_ocr_charset, BLANK_SYMBOL import pero_ocr.decoding.decoders as decoder...
34.480916
150
0.651317
530
0.117335
0
0
0
0
0
0
888
0.196591
1936ec832cd585d63cf22975d9e0473abed83035
1,608
py
Python
PiCN/Layers/ICNLayer/ContentStore/ContentStoreMemoryExact.py
NikolaiRutz/PiCN
7775c61caae506a88af2e4ec34349e8bd9098459
[ "BSD-3-Clause" ]
null
null
null
PiCN/Layers/ICNLayer/ContentStore/ContentStoreMemoryExact.py
NikolaiRutz/PiCN
7775c61caae506a88af2e4ec34349e8bd9098459
[ "BSD-3-Clause" ]
5
2020-07-15T09:01:42.000Z
2020-09-28T08:45:21.000Z
PiCN/Layers/ICNLayer/ContentStore/ContentStoreMemoryExact.py
NikolaiRutz/PiCN
7775c61caae506a88af2e4ec34349e8bd9098459
[ "BSD-3-Clause" ]
null
null
null
""" An in-memory content store with exact matching""" import time from PiCN.Packets import Content, Name from PiCN.Layers.ICNLayer.ContentStore import BaseContentStore, ContentStoreEntry class ContentStoreMemoryExact(BaseContentStore): """ A in memory Content Store using exact matching""" def __init__(self...
34.212766
83
0.65796
1,416
0.880597
0
0
0
0
0
0
150
0.093284
193ab624d131e849acb875b0bc59e01faf091e1d
279
py
Python
texaslan/slack/pipelines/on_success.py
hsmeans/texaslan.org
a981e7835381e77320e39536a619981ba9d03451
[ "MIT" ]
2
2018-02-06T06:24:03.000Z
2018-03-20T03:32:13.000Z
texaslan/slack/pipelines/on_success.py
hsmeans/texaslan.org
a981e7835381e77320e39536a619981ba9d03451
[ "MIT" ]
32
2017-02-21T20:01:43.000Z
2020-02-08T21:52:16.000Z
texaslan/slack/pipelines/on_success.py
hsmeans/texaslan.org
a981e7835381e77320e39536a619981ba9d03451
[ "MIT" ]
6
2017-03-21T21:16:40.000Z
2020-02-08T20:46:20.000Z
from django_slack_oauth.models import SlackOAuthRequest def register_token(request, api_data): SlackOAuthRequest.objects.create( associated_user=request.user, access_token=api_data.pop('access_token'), extras=api_data ) return request, api_data
27.9
55
0.749104
0
0
0
0
0
0
0
0
14
0.050179
193b0ac325ef43006df164a8a14a3f901439a20c
185
py
Python
main_app/forms.py
reeshabhkumarranjan/SocPay
ba3f3ea0b7b814e1ca40293b14f192b6d40adbbd
[ "MIT" ]
null
null
null
main_app/forms.py
reeshabhkumarranjan/SocPay
ba3f3ea0b7b814e1ca40293b14f192b6d40adbbd
[ "MIT" ]
null
null
null
main_app/forms.py
reeshabhkumarranjan/SocPay
ba3f3ea0b7b814e1ca40293b14f192b6d40adbbd
[ "MIT" ]
null
null
null
from django.forms import ModelForm # class add_money_form(ModelForm): # class Meta: # model = Transaction # fields = ['transaction_user_2', 'transaction_amount']
20.555556
63
0.675676
0
0
0
0
0
0
0
0
143
0.772973
193c6a68a587626a9b404a216a915daaf939afcb
7,187
py
Python
leetcode_python/Design/first-unique-number.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
leetcode_python/Design/first-unique-number.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
leetcode_python/Design/first-unique-number.py
yennanliu/Python_basics
6a597442d39468295946cefbfb11d08f61424dc3
[ "Unlicense" ]
null
null
null
""" 1429. First Unique Number # https://leetcode.ca/all/1429.html You have a queue of integers, you need to retrieve the first unique integer in the queue. Implement the FirstUnique class: FirstUnique(int[] nums) Initializes the object with the numbers in the queue. int showFirstUnique() returns the value of the f...
27.856589
125
0.579797
3,523
0.490191
0
0
0
0
0
0
3,475
0.483512
193cb661b098c4c5b452e6a65209cb9479f364c3
4,326
py
Python
get_git/github_client.py
alanahanson/get-git
a3b078a64ce8f4bb7103fcd46a0eee80cd35f87c
[ "MIT" ]
null
null
null
get_git/github_client.py
alanahanson/get-git
a3b078a64ce8f4bb7103fcd46a0eee80cd35f87c
[ "MIT" ]
null
null
null
get_git/github_client.py
alanahanson/get-git
a3b078a64ce8f4bb7103fcd46a0eee80cd35f87c
[ "MIT" ]
null
null
null
import os from get_git.utils import make_request GH_URL = 'https://api.github.com/graphql' TOKEN=os.environ.get('GH_API_TOKEN') class GithubClient: def __init__(self, username): self.username = username def get_user(self): query = """ {user(login:"%s") { starredRepos...
35.170732
100
0.487286
4,194
0.969487
0
0
0
0
0
0
2,694
0.622746
193eb2395e6afc892c407dab660196002686ac81
15,517
py
Python
Naluno/model.py
dstarrago/Naluno
de2a498b65ac7e10599f797e41c77d0ceae56c3e
[ "MIT" ]
null
null
null
Naluno/model.py
dstarrago/Naluno
de2a498b65ac7e10599f797e41c77d0ceae56c3e
[ "MIT" ]
null
null
null
Naluno/model.py
dstarrago/Naluno
de2a498b65ac7e10599f797e41c77d0ceae56c3e
[ "MIT" ]
null
null
null
from __future__ import division, print_function, unicode_literals from config import * __all__ = ['Map', 'Vertex', 'Edge', 'State'] class State: FREE = 0 CLOSED = 1 MANDATORY = 2 OPTIONAL = 3 class Square: def __init__(self): self._has_card = False @property ...
32.875
98
0.569827
15,340
0.988593
0
0
3,250
0.209448
0
0
134
0.008636
194088485187df0c1ce817432f67940ecca472cb
1,035
py
Python
combo/search/score.py
yanpei18345156216/COMBO_Python3
666a116dfece71e6236291e89ea2ab4d6db0ead9
[ "MIT" ]
139
2016-02-18T02:31:04.000Z
2022-02-18T10:38:06.000Z
combo/search/score.py
yanpei18345156216/COMBO_Python3
666a116dfece71e6236291e89ea2ab4d6db0ead9
[ "MIT" ]
8
2016-04-18T08:10:44.000Z
2020-12-30T08:49:33.000Z
combo/search/score.py
yanpei18345156216/COMBO_Python3
666a116dfece71e6236291e89ea2ab4d6db0ead9
[ "MIT" ]
50
2016-05-21T01:17:23.000Z
2022-02-18T01:27:41.000Z
import numpy as np import scipy.stats def EI(predictor, training, test, fmax=None): fmean = predictor.get_post_fmean(training, test) fcov = predictor.get_post_fcov(training, test) fstd = np.sqrt(fcov) if fmax is None: fmax = np.max(predictor.get_post_fmean(training, training)) temp1 = (f...
24.069767
67
0.656039
0
0
0
0
0
0
0
0
0
0
19414c412df3d7fe628fab1103ed1b978f8a57d8
1,528
py
Python
dags/calculating_google_ads_network.py
BjMrq/Python-AirflowReportPipeline
261812488d661580cb0f41808d94249cc8e0951b
[ "MIT" ]
2
2019-06-28T20:08:56.000Z
2021-03-30T15:24:10.000Z
dags/calculating_google_ads_network.py
BjMrq/Python-AirflowReportPipeline
261812488d661580cb0f41808d94249cc8e0951b
[ "MIT" ]
null
null
null
dags/calculating_google_ads_network.py
BjMrq/Python-AirflowReportPipeline
261812488d661580cb0f41808d94249cc8e0951b
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np LOCAL_DIR = '/tmp/' def main(**kwargs): # Retrieve acampus from Xcom ti = kwargs["ti"] source = ti.xcom_pull( task_ids="report_init_task") campus_name = source["campus"] # Read data file to create a data frame df = pd.read_csv(LOCAL_DIR + camp...
27.781818
78
0.621073
0
0
0
0
0
0
0
0
608
0.397906
1941b9b85d89dbfd9a868d046110eb8fc8e84d5a
1,401
py
Python
src/auditor/org_checker.py
agrc/agol-validator
b17f3fee55bf0b1f7d2ed21ae86b1556072da4d8
[ "MIT" ]
null
null
null
src/auditor/org_checker.py
agrc/agol-validator
b17f3fee55bf0b1f7d2ed21ae86b1556072da4d8
[ "MIT" ]
21
2020-01-29T22:03:54.000Z
2020-07-29T17:55:44.000Z
src/auditor/org_checker.py
agrc/agol-validator
b17f3fee55bf0b1f7d2ed21ae86b1556072da4d8
[ "MIT" ]
null
null
null
""" Holds an OrgChecker object that runs checks at the organization level (instead of at the item level) """ class OrgChecker: """ An OrgChecker runs checks at the org level, as opposed to the item level. For example, checking whether there are any items with the same title. To use, instantiate and t...
29.808511
117
0.628837
1,289
0.920057
0
0
0
0
0
0
678
0.48394
1941f729283db4adc38960fd6ecd423a78269f4b
994
py
Python
create_post.py
schlop/blog
74fe7d5ce4e1c00942cb033710720098ac493844
[ "MIT" ]
null
null
null
create_post.py
schlop/blog
74fe7d5ce4e1c00942cb033710720098ac493844
[ "MIT" ]
null
null
null
create_post.py
schlop/blog
74fe7d5ce4e1c00942cb033710720098ac493844
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from datetime import datetime import sys def create_blog_post(title=""): file_date = datetime.now().strftime("%Y-%m-%d") file_name = file_date + "---" + title.replace(" ", "-") + ".md" print(file_name) try: file = open("content/posts/" + file_name, "x") except FileExists...
26.157895
80
0.573441
0
0
0
0
0
0
0
0
398
0.400402
194306ac920374768433626240e00df6f0b039ac
1,436
py
Python
src/python/procyon/py3.py
orbea/procyon
469d94427d3b6e7cc2ab93606bdf968717a49150
[ "Apache-2.0" ]
null
null
null
src/python/procyon/py3.py
orbea/procyon
469d94427d3b6e7cc2ab93606bdf968717a49150
[ "Apache-2.0" ]
null
null
null
src/python/procyon/py3.py
orbea/procyon
469d94427d3b6e7cc2ab93606bdf968717a49150
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2017 The Procyon Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
29.306122
74
0.664345
0
0
0
0
0
0
0
0
1,029
0.716574
1943cab210caf1760efe3b398e0efc3f17bdc7ab
693
py
Python
interlens/criterions/criterion.py
cctien/bimultialign
d0dad62651c25545fb7539639cb72fc8ea2570aa
[ "MIT" ]
null
null
null
interlens/criterions/criterion.py
cctien/bimultialign
d0dad62651c25545fb7539639cb72fc8ea2570aa
[ "MIT" ]
null
null
null
interlens/criterions/criterion.py
cctien/bimultialign
d0dad62651c25545fb7539639cb72fc8ea2570aa
[ "MIT" ]
null
null
null
from allennlp.common import Registrable import torch class Criterion(torch.nn.Module, Registrable): """ A `Criterion` is a `Module` that ... """ def __init__(self, reduction: str = 'mean', verbose: bool = False,) -> None: super().__init__() self.redu...
23.896552
51
0.572872
584
0.842713
0
0
0
0
0
0
120
0.17316
1944d33ab633803b83a02f71e2b185489b6751ce
2,180
py
Python
week10_classes/seminar/generator_widgets.py
fortminors/msai-python
1dfe19c132cd59125ef64164cce007845ffb6cf8
[ "MIT" ]
9
2021-03-12T06:59:10.000Z
2022-01-21T20:23:31.000Z
week10_classes/seminar/generator_widgets.py
fortminors/msai-python
1dfe19c132cd59125ef64164cce007845ffb6cf8
[ "MIT" ]
null
null
null
week10_classes/seminar/generator_widgets.py
fortminors/msai-python
1dfe19c132cd59125ef64164cce007845ffb6cf8
[ "MIT" ]
14
2021-03-25T15:23:19.000Z
2022-02-05T14:34:40.000Z
# Form implementation generated from reading ui file 'generator.ui' # # Created by: PyQt6 UI code generator 6.2.2 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. from PyQt6 import QtCore, QtGui, QtWidgets class Ui_...
45.416667
86
0.707798
1,868
0.856881
0
0
0
0
0
0
465
0.213303
19455519ed74bb43e4ac991488c150b0c157ddd6
5,247
py
Python
sportradar/NFL.py
scrambldchannel/SportradarAPIs
e42e128313647d51784b6f1f3aa201b07fca0a08
[ "MIT" ]
33
2018-07-05T17:07:06.000Z
2022-02-05T16:32:19.000Z
sportradar/NFL.py
scrambldchannel/SportradarAPIs
e42e128313647d51784b6f1f3aa201b07fca0a08
[ "MIT" ]
6
2018-11-16T15:53:33.000Z
2021-06-26T23:04:33.000Z
sportradar/NFL.py
scrambldchannel/SportradarAPIs
e42e128313647d51784b6f1f3aa201b07fca0a08
[ "MIT" ]
17
2018-08-08T08:10:49.000Z
2021-10-06T00:25:21.000Z
# Sportradar APIs # Copyright 2018 John W. Miller # See LICENSE for details. from sportradar.api import API class NFL(API): def __init__(self, api_key, format_='json', access_level='ot', version=2, timeout=5, sleep_time=1.5): super().__init__(api_key, format_, timeout, sleep_time) ...
45.232759
90
0.658853
5,134
0.978464
0
0
0
0
0
0
2,076
0.395655
1945a3089e1f6313c2cc75593bf5a6b3e3eaea61
4,767
py
Python
rain/models/posemb_transformer.py
qq1418381215/caat
1422707bef7a2aeca272fa085f410bff07ced760
[ "MIT" ]
14
2021-09-15T02:49:18.000Z
2022-03-15T06:00:54.000Z
rain/models/posemb_transformer.py
qq1418381215/caat
1422707bef7a2aeca272fa085f410bff07ced760
[ "MIT" ]
11
2021-09-17T03:17:07.000Z
2022-02-08T03:12:41.000Z
rain/models/posemb_transformer.py
qq1418381215/caat
1422707bef7a2aeca272fa085f410bff07ced760
[ "MIT" ]
2
2021-11-06T19:22:29.000Z
2022-03-24T11:56:11.000Z
import torch import os from torch import Tensor import torch.nn as nn from fairseq import options, utils, checkpoint_utils from fairseq.dataclass import ChoiceEnum, FairseqDataclass from fairseq.models import ( transformer, FairseqLanguageModel, register_model, register_model_architecture, FairseqEn...
42.5625
102
0.680092
3,171
0.665198
0
0
4,239
0.889239
0
0
633
0.132788
1946122a44cafe21fe0a3f27b222402b8e3d88b9
6,345
py
Python
ensembl_map/symbol.py
mattdoug604/ensembl_map
5edb8a48943df4b53effe3cd7ddf4d461fdd4bae
[ "MIT" ]
null
null
null
ensembl_map/symbol.py
mattdoug604/ensembl_map
5edb8a48943df4b53effe3cd7ddf4d461fdd4bae
[ "MIT" ]
1
2020-03-24T18:20:15.000Z
2020-03-25T22:56:06.000Z
ensembl_map/symbol.py
mattdoug604/ensembl_map
5edb8a48943df4b53effe3cd7ddf4d461fdd4bae
[ "MIT" ]
null
null
null
from .ensembl import Ensembl from .util import is_ensembl_id ########## ## Exon ## ########## def get_exons(feature, feature_type): exons = [] for exon_id in get_exon_ids(feature, feature_type): exons.append(_query(exon_id, "exon", Ensembl().data.exon_by_id)) return exons def get_exon_ids(featur...
35.446927
96
0.695035
0
0
0
0
0
0
0
0
1,135
0.178881
194675cce0a60e3494b3def09e1010cda20f0f00
1,113
py
Python
MiGRIDS/InputHandler/readAllTimeSeries.py
mmuellerstoffels/GBSTools
aebd8aa6667a2284aaa16424f9b9d22ca3a2a375
[ "MIT" ]
8
2019-02-18T14:18:55.000Z
2022-03-04T12:34:24.000Z
MiGRIDS/InputHandler/readAllTimeSeries.py
mmuellerstoffels/GBSTools
aebd8aa6667a2284aaa16424f9b9d22ca3a2a375
[ "MIT" ]
3
2018-09-01T00:30:19.000Z
2018-09-01T01:09:50.000Z
MiGRIDS/InputHandler/readAllTimeSeries.py
acep-uaf/GBSTools
aebd8aa6667a2284aaa16424f9b9d22ca3a2a375
[ "MIT" ]
3
2019-06-10T19:49:22.000Z
2021-05-08T08:42:57.000Z
from MiGRIDS.InputHandler.readCsv import readCsv def readAllTimeSeries(inputDict): ''' Cycles through a list of files in the AVEC format and imports them into a single dataframe. :param inputDict: :return: pandas.DataFrame with data from all input files. ''' df = None for i in range(len(inp...
33.727273
95
0.591195
0
0
0
0
0
0
0
0
458
0.4115
1946a0c16887bdd25321c997aa98e68109542c3a
12,725
py
Python
tests/test_dryruns.py
gmcgoldr/pyteal_utils
6dc33d1f18b73ce26163040e37fb145ccd5c1de8
[ "MIT" ]
2
2021-12-16T15:43:46.000Z
2022-01-11T13:24:50.000Z
tests/test_dryruns.py
gmcgoldr/pyteal_utils
6dc33d1f18b73ce26163040e37fb145ccd5c1de8
[ "MIT" ]
null
null
null
tests/test_dryruns.py
gmcgoldr/pyteal_utils
6dc33d1f18b73ce26163040e37fb145ccd5c1de8
[ "MIT" ]
1
2022-01-11T13:25:03.000Z
2022-01-11T13:25:03.000Z
import algosdk as ag import pyteal as tl import pytest from algosdk.future.transaction import OnComplete from algosdk.v2client.algod import AlgodClient from algosdk.v2client.models.application_local_state import ApplicationLocalState from algosdk.v2client.models.application_state_schema import ApplicationStateSchema f...
36.048159
88
0.691473
0
0
0
0
864
0.067898
0
0
1,110
0.08723
19476d50e68179e3181c58bfc67d757bccf5c292
6,191
py
Python
aatrn.py
kmkurn/uxtspwsd
ea4da18cec023d0dc487ee061861e6715edc2e85
[ "MIT" ]
null
null
null
aatrn.py
kmkurn/uxtspwsd
ea4da18cec023d0dc487ee061861e6715edc2e85
[ "MIT" ]
null
null
null
aatrn.py
kmkurn/uxtspwsd
ea4da18cec023d0dc487ee061861e6715edc2e85
[ "MIT" ]
null
null
null
# Copyright (c) 2021 Kemal Kurniawan from typing import Optional import math from einops import rearrange from torch import BoolTensor, Tensor from crf import DepTreeCRF, LinearCRF def compute_aatrn_loss( scores: Tensor, aa_mask: BoolTensor, mask: Optional[BoolTensor] = None, projective: bool = Fal...
37.295181
95
0.709255
0
0
0
0
0
0
0
0
1,278
0.206429
1947c38029e5b214e95d735bbab912cedc55ad7e
5,151
py
Python
wildlifelicensing/apps/returns/models.py
jawaidm/wildlifelicensing
87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82
[ "Apache-2.0" ]
null
null
null
wildlifelicensing/apps/returns/models.py
jawaidm/wildlifelicensing
87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82
[ "Apache-2.0" ]
11
2019-03-19T02:03:11.000Z
2019-05-31T07:20:59.000Z
wildlifelicensing/apps/returns/models.py
jawaidm/wildlifelicensing
87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82
[ "Apache-2.0" ]
2
2020-08-10T10:17:10.000Z
2021-10-31T23:20:53.000Z
from __future__ import unicode_literals from django.db import models from django.contrib.postgres.fields.jsonb import JSONField from django.core.exceptions import ValidationError import datapackage import jsontableschema from ledger.accounts.models import RevisionedMixin, EmailUser from wildlifelicensing.apps.main.m...
34.57047
113
0.664143
4,739
0.920016
0
0
495
0.096098
0
0
1,109
0.215298
194979bac6f323e9a28bd3fab05ed2877e60ddea
605
py
Python
CE_to_AE_enemy_converter.py
Plouni/mari0_se_ce_to_ae_level_converter
9aa0d0ebffac4df1b5d541ff003bd9abeb187a0a
[ "MIT" ]
1
2022-02-03T23:07:20.000Z
2022-02-03T23:07:20.000Z
CE_to_AE_enemy_converter.py
Plouni/mari0_se_ce_to_ae_level_converter
9aa0d0ebffac4df1b5d541ff003bd9abeb187a0a
[ "MIT" ]
null
null
null
CE_to_AE_enemy_converter.py
Plouni/mari0_se_ce_to_ae_level_converter
9aa0d0ebffac4df1b5d541ff003bd9abeb187a0a
[ "MIT" ]
null
null
null
import os import json import logging cwd = os.getcwd() list_enemy = [file for file in os.listdir(cwd) if '.json' in file[-5:]] for enemy in list_enemy: try: with open(cwd + '\\' + enemy, 'r') as f: enemy_txt = f.read() enemy_txt = enemy_txt.replace('offsetx','offsetX')....
26.304348
194
0.591736
0
0
0
0
0
0
0
0
151
0.249587
1949bf476b27ab37588853e2472ecb87a7d25778
5,485
py
Python
tests/python/tensor_graph/test/test_internal/correctness/grad-op-test/te-cat-case2.py
QinHan-Erin/AMOS
634bf48edf4015e4a69a8c32d49b96bce2b5f16f
[ "Apache-2.0" ]
22
2022-03-18T07:29:31.000Z
2022-03-23T14:54:32.000Z
tests/python/tensor_graph/test/test_internal/correctness/grad-op-test/te-cat-case2.py
QinHan-Erin/AMOS
634bf48edf4015e4a69a8c32d49b96bce2b5f16f
[ "Apache-2.0" ]
null
null
null
tests/python/tensor_graph/test/test_internal/correctness/grad-op-test/te-cat-case2.py
QinHan-Erin/AMOS
634bf48edf4015e4a69a8c32d49b96bce2b5f16f
[ "Apache-2.0" ]
2
2022-03-18T08:26:34.000Z
2022-03-20T06:02:48.000Z
from tvm import testing from tvm from tvm import topi import tvm import numpy as np import torch dim0 = 3 dim1 = 4 dim2 = 1 shape_size1 = [dim0, dim1, dim2] shape_size2 = [dim0, dim1, dim2 * 8] dtype = "float32" cap0 = tvm.te.placeholder(shape_size1, dtype=dtype, name="cap0") cap1 = tvm.te.placeholder(shape_size1, ...
43.531746
95
0.699909
0
0
0
0
0
0
0
0
382
0.069644
194c38c24bff2dd1b26d3bd458a2d3f23f28316b
121
py
Python
controle_de_estoque/app.py
rodrigo-labs/controle_estoque
890acefef2c3dace68723d086a0d40f27ff20476
[ "MIT" ]
6
2020-09-20T21:38:47.000Z
2021-11-15T10:45:02.000Z
controle_de_estoque/app.py
rodrigo-labs/controle_estoque
890acefef2c3dace68723d086a0d40f27ff20476
[ "MIT" ]
null
null
null
controle_de_estoque/app.py
rodrigo-labs/controle_estoque
890acefef2c3dace68723d086a0d40f27ff20476
[ "MIT" ]
6
2019-06-27T18:15:51.000Z
2022-02-17T19:31:59.000Z
from controle_de_estoque.controllers import controllers if __name__ == "__main__": controllers.principal_controle()
24.2
55
0.809917
0
0
0
0
0
0
0
0
10
0.082645
194c851ed5bb33eaa2cf355799844f072e6955b4
2,334
py
Python
pagewalker/pagewalker/analyzer/devtools/devtools_protocol.py
rafal-qa/page-walker
8940a819d436d46f729c9307effc5118d692cad0
[ "MIT" ]
16
2018-07-08T19:20:15.000Z
2021-01-08T22:08:49.000Z
pagewalker/pagewalker/analyzer/devtools/devtools_protocol.py
rafal-qa/page-walker
8940a819d436d46f729c9307effc5118d692cad0
[ "MIT" ]
null
null
null
pagewalker/pagewalker/analyzer/devtools/devtools_protocol.py
rafal-qa/page-walker
8940a819d436d46f729c9307effc5118d692cad0
[ "MIT" ]
5
2018-10-26T13:08:10.000Z
2020-06-20T21:03:17.000Z
from .connector import websocket_connector, http_connector class DevtoolsProtocol(object): def __init__(self): self._http = http_connector.HttpConnector() self.tab_socket = None self.tab_target_id = None @property def browser_data(self): return self._http.browser_data ...
33.342857
86
0.653385
2,272
0.973436
0
0
76
0.032562
0
0
167
0.071551
194c8b5cc1cd58612c803208f1241b2813f11d98
9,523
py
Python
pysnmp/CISCO-IETF-PW-FR-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/CISCO-IETF-PW-FR-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/CISCO-IETF-PW-FR-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-IETF-PW-FR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-IETF-PW-FR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:43:46 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (defau...
119.0375
1,132
0.748609
0
0
0
0
0
0
0
0
2,393
0.251286
195261959efe1d29efc067b8292d053eeea3aa60
1,639
py
Python
Chapter05/non-model-view_code.py
trappn/Mastering-GUI-Programming-with-Python
14392c06dd3b9cf655420d09853bce6bfe8fe16d
[ "MIT" ]
138
2018-12-06T15:48:07.000Z
2022-03-28T12:23:12.000Z
Chapter05/non-model-view_code.py
thema27/Mastering-GUI-Programming-with-Python
66f33ff6c07b7e22a396a982a5502bd93c20d785
[ "MIT" ]
16
2019-11-21T08:17:42.000Z
2020-08-19T06:56:48.000Z
Chapter05/non-model-view_code.py
thema27/Mastering-GUI-Programming-with-Python
66f33ff6c07b7e22a396a982a5502bd93c20d785
[ "MIT" ]
116
2018-12-08T18:13:02.000Z
2022-03-22T14:30:57.000Z
import sys from os import path from PyQt5 import QtWidgets as qtw from PyQt5 import QtGui as qtg from PyQt5 import QtCore as qtc class MainWindow(qtw.QMainWindow): def __init__(self): """MainWindow constructor. This widget will be our main window. We'll define all the UI components in h...
27.779661
60
0.583282
1,286
0.784625
0
0
0
0
0
0
377
0.230018
195268ef4f0f6c79ac3ca7cf1356d6b54616df26
31
py
Python
src/__init__.py
abdelsamea/DeTraC
2c94d55908285fc9cbb24086da63078ee917525a
[ "MIT" ]
1
2020-09-17T14:17:50.000Z
2020-09-17T14:17:50.000Z
src/__init__.py
arkkhanu/DeTraC_COVId19
ab03719b49a1a048f74f08600a6670f6757bbe60
[ "MIT" ]
null
null
null
src/__init__.py
arkkhanu/DeTraC_COVId19
ab03719b49a1a048f74f08600a6670f6757bbe60
[ "MIT" ]
1
2021-04-14T08:52:36.000Z
2021-04-14T08:52:36.000Z
import tools import frameworks
10.333333
17
0.870968
0
0
0
0
0
0
0
0
0
0
19536799d88c875ad08a6f5696624ad8dc96acf2
442,707
py
Python
data/chars.py
Shadybloom/dnd-mass-combat-simulation
169bc6cfb967f871290014b342e926b1f71cde81
[ "MIT" ]
3
2020-05-27T08:36:00.000Z
2021-11-22T09:04:08.000Z
data/chars.py
Shadybloom/dnd-mass-combat-simulation
169bc6cfb967f871290014b342e926b1f71cde81
[ "MIT" ]
null
null
null
data/chars.py
Shadybloom/dnd-mass-combat-simulation
169bc6cfb967f871290014b342e926b1f71cde81
[ "MIT" ]
1
2021-11-21T03:57:33.000Z
2021-11-21T03:57:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Загружаем комплекты снаряжения (soldiers_pack) from data.items import * #---- # Лишённые индивидуальности заготовки солдат. Используются в squad_generation metadict_chars = {} #---- # Сельское ополчение (крестьяне и городская беднота): metadict_chars['Commoner 1 lvl ...
29.188831
133
0.551602
0
0
0
0
0
0
0
0
291,163
0.631241
1953a970695d2673fad8c3f0a83d3f344f3fbfa4
5,647
py
Python
sandbox/kl_div/kl.py
samuelfneumann/RLControl
71430b1de2e4262483908932eb44579c2ec8216d
[ "Apache-2.0" ]
9
2018-07-30T20:12:47.000Z
2021-02-05T17:02:04.000Z
sandbox/kl_div/kl.py
samuelfneumann/RLControl
71430b1de2e4262483908932eb44579c2ec8216d
[ "Apache-2.0" ]
14
2020-01-28T22:38:58.000Z
2022-02-10T00:11:21.000Z
sandbox/kl_div/kl.py
samuelfneumann/RLControl
71430b1de2e4262483908932eb44579c2ec8216d
[ "Apache-2.0" ]
3
2018-08-08T14:52:53.000Z
2021-01-23T18:00:05.000Z
import numpy as np import scipy as sp import scipy.stats import matplotlib.pyplot as plt class GaussianMixture1D: def __init__(self, mixture_probs, means, stds): self.num_mixtures = len(mixture_probs) self.mixture_probs = mixture_probs self.means = means self.stds = stds def s...
38.155405
168
0.64583
1,160
0.205419
0
0
0
0
0
0
388
0.068709
1953dea348e57ea12a9ad8bb64e5c7842c0eba20
37,416
py
Python
pysnmp-with-texts/CIRCUIT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CIRCUIT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CIRCUIT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CIRCUIT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CIRCUIT-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:49:40 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 0...
146.729412
3,536
0.795836
0
0
0
0
0
0
0
0
13,420
0.35867
19556d177fed4def9f6818303c33e5aa562c38b8
904
py
Python
SortingAlgorithm/shell_sort.py
hpf0532/algorithms_demo
4f02444ee634295e5cbf8e5624d4e5b65931897d
[ "MIT" ]
null
null
null
SortingAlgorithm/shell_sort.py
hpf0532/algorithms_demo
4f02444ee634295e5cbf8e5624d4e5b65931897d
[ "MIT" ]
null
null
null
SortingAlgorithm/shell_sort.py
hpf0532/algorithms_demo
4f02444ee634295e5cbf8e5624d4e5b65931897d
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # author: hpf # create time: 2020/7/16 21:33 # file: shell_sort.py # IDE: PyCharm # 希尔排序(Shell Sort)是插入排序的一种。也称缩小增量排序,是直接插入排序算法的一种更高效的改进版本。 # 希尔排序是非稳定排序算法。该方法因DL.Shell于1959年提出而得名。 希尔排序是把记录按下标的一定增量分组, # 对每组使用直接插入排序算法排序;随着增量逐渐减少,每组包含的关键词越来越多,当增量减至1时,整个文件恰被分成一组,算法便终止。 def shell_sort(alist): n...
21.52381
67
0.535398
0
0
0
0
0
0
0
0
816
0.608955
19557822a163b70d4aa82e704dabbed7f22587fe
4,273
py
Python
tests/rl/test_rainbow.py
pocokhc/simple_rl
765f12f392f87e6897027905d74f1bced6a2b7bf
[ "MIT" ]
1
2022-03-01T09:16:57.000Z
2022-03-01T09:16:57.000Z
tests/rl/test_rainbow.py
pocokhc/simple_rl
765f12f392f87e6897027905d74f1bced6a2b7bf
[ "MIT" ]
null
null
null
tests/rl/test_rainbow.py
pocokhc/simple_rl
765f12f392f87e6897027905d74f1bced6a2b7bf
[ "MIT" ]
null
null
null
import unittest import srl from srl.test import TestRL class Test(unittest.TestCase): def setUp(self) -> None: self.tester = TestRL() self.rl_config = srl.rl.rainbow.Config() def test_sequence(self): self.tester.play_sequence(self.rl_config) def test_mp(self): self.teste...
36.521368
101
0.670723
4,022
0.935566
0
0
0
0
0
0
621
0.144452
1955c95ee465de712840c70524c29d14aa03188f
353
py
Python
challenge_3/python/bryantpq/find_majority.py
rchicoli/2017-challenges
44f0b672e5dea34de1dde131b6df837d462f8e29
[ "Apache-2.0" ]
271
2017-01-01T22:58:36.000Z
2021-11-28T23:05:29.000Z
challenge_3/python/bryantpq/find_majority.py
AakashOfficial/2017Challenges
a8f556f1d5b43c099a0394384c8bc2d826f9d287
[ "Apache-2.0" ]
283
2017-01-01T23:26:05.000Z
2018-03-23T00:48:55.000Z
challenge_3/python/bryantpq/find_majority.py
AakashOfficial/2017Challenges
a8f556f1d5b43c099a0394384c8bc2d826f9d287
[ "Apache-2.0" ]
311
2017-01-01T22:59:23.000Z
2021-09-23T00:29:12.000Z
def find_majority(a): d = {} l = len(a) for i in a: if i in d: d[i] += 1 if d[i] > l / 2: return i else: d[i] = 1 return if __name__ == "__main__": a = [2,2,3,7,5,7,7,7,4,7,2,7,4,5,6,7,7,8,6,7,7,8,10,12,29,30,19,10,7,7,7,7,7,7,7,...
19.611111
89
0.413598
0
0
0
0
0
0
0
0
10
0.028329
1956211e1137a8ec3efab729e58887fd70b0e317
7,307
py
Python
data-structures/double-list.py
costincaraivan/cs-refresher
008fdb2af661310c65f656f017ec34e5df004424
[ "MIT" ]
1
2018-06-12T12:00:33.000Z
2018-06-12T12:00:33.000Z
data-structures/double-list.py
costincaraivan/cs-refresher
008fdb2af661310c65f656f017ec34e5df004424
[ "MIT" ]
null
null
null
data-structures/double-list.py
costincaraivan/cs-refresher
008fdb2af661310c65f656f017ec34e5df004424
[ "MIT" ]
null
null
null
# Completely silly exercises, in real life use: # Python lists: https://docs.python.org/3/tutorial/datastructures.html import unittest import logging logging.basicConfig(level=logging.INFO) # - DoublyLinkedListNode class. class DoublyLinkedListNode: value = None previousNode = None nextNode = None ...
26.765568
72
0.596141
6,885
0.942247
0
0
0
0
0
0
917
0.125496
19580f1da14543fc46625b13a2d4fdf6ece370dd
888
py
Python
Ch. 2/tcp_server.py
Kediel/BHP
b0cd2aa82c95eef58f50d9d7d137fddcb70644cb
[ "MIT" ]
null
null
null
Ch. 2/tcp_server.py
Kediel/BHP
b0cd2aa82c95eef58f50d9d7d137fddcb70644cb
[ "MIT" ]
4
2017-07-27T17:34:24.000Z
2017-07-31T23:13:03.000Z
Ch. 2/tcp_server.py
Kediel/BHP
b0cd2aa82c95eef58f50d9d7d137fddcb70644cb
[ "MIT" ]
null
null
null
import socket import threading bind_ip = "0.0.0.0" bind_port = 9999 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((bind_ip, bind_port)) server.listen(5) print "[*] Listening on %s:%d" % (bind_ip, bind_port) # This is our client-handling thread def handle_client(client_socket): #...
23.368421
79
0.614865
0
0
0
0
0
0
0
0
234
0.263514
195b152f91cd032e891708e898116a34b190d47e
210
py
Python
setup.py
nycz/ishu
6596b6e330c3439516dbd6cafe48d99388874aba
[ "MIT" ]
null
null
null
setup.py
nycz/ishu
6596b6e330c3439516dbd6cafe48d99388874aba
[ "MIT" ]
40
2015-08-14T23:11:08.000Z
2019-11-11T22:27:29.000Z
setup.py
nycz/ishu
6596b6e330c3439516dbd6cafe48d99388874aba
[ "MIT" ]
null
null
null
import setuptools import site import sys # This is a workaround to allow --user and -e combined # See https://github.com/pypa/pip/issues/7953 site.ENABLE_USER_SITE = "--user" in sys.argv[1:] setuptools.setup()
26.25
54
0.752381
0
0
0
0
0
0
0
0
107
0.509524
195cbcd5dccdd7c73a9db51970b9798eb35a32b9
466
py
Python
Python Programs/guess the number.py
sayanpoddar123/RTU-DigitalLibrary
658500ce3ee089d622cea0f6b49dfb8b485d0be6
[ "MIT" ]
null
null
null
Python Programs/guess the number.py
sayanpoddar123/RTU-DigitalLibrary
658500ce3ee089d622cea0f6b49dfb8b485d0be6
[ "MIT" ]
null
null
null
Python Programs/guess the number.py
sayanpoddar123/RTU-DigitalLibrary
658500ce3ee089d622cea0f6b49dfb8b485d0be6
[ "MIT" ]
null
null
null
#Guess program n=18 a=0 y = 1 print("Number of guesses is limited to only 4 times") while a<=3: z=int(input("Enter your choice=")) if z>n: print("Please less your number") a+=1 elif z<n: print("Please increase your number") a += 1 else: print("You win") ...
16.642857
64
0.555794
0
0
0
0
0
0
0
0
215
0.461373
195cc099346d6a0faa355accfa24ab213925cda9
8,019
py
Python
src/soundsystem.py
WinterLicht/Chaos-Projectile
3fffb788b241b7baa4247c1e630d83a7210ddc2e
[ "CC-BY-4.0" ]
59
2015-03-25T21:29:06.000Z
2022-01-17T22:48:05.000Z
src/soundsystem.py
WinterLicht/Chaos-Projectile
3fffb788b241b7baa4247c1e630d83a7210ddc2e
[ "CC-BY-4.0" ]
11
2015-07-07T07:10:42.000Z
2021-11-21T12:47:42.000Z
src/soundsystem.py
WinterLicht/Chaos-Projectile
3fffb788b241b7baa4247c1e630d83a7210ddc2e
[ "CC-BY-4.0" ]
19
2015-07-13T06:44:44.000Z
2022-02-05T03:09:27.000Z
""" .. module:: soundsystem :Platform: Unix, Windows :Synopsis: Sound system """ import os import pygame import events import ai class SoundSystem(object): """Render system. :Attributes: - *evManager*: event manager - *world*: game world - *screen*: game screen """ ...
43.819672
111
0.60419
7,881
0.982791
0
0
0
0
0
0
1,090
0.135927
195d27bed09f6f47effd9b2ab9128a9b8b6d2db2
2,227
py
Python
hammer/django_bulk/bulk_create_test.py
awolfly9/hammer
03add3037461154fd764bb3340e68393e16f015f
[ "MIT" ]
null
null
null
hammer/django_bulk/bulk_create_test.py
awolfly9/hammer
03add3037461154fd764bb3340e68393e16f015f
[ "MIT" ]
null
null
null
hammer/django_bulk/bulk_create_test.py
awolfly9/hammer
03add3037461154fd764bb3340e68393e16f015f
[ "MIT" ]
null
null
null
# -*- coding=utf-8 -*- import django import os import sys import datetime import random import time os.environ['DJANGO_SETTINGS_MODULE'] = 'web.settings' django.setup() from web.other.models import BilibiliPlay from .helper import bulk_create def test_once_get(): start = time.time() for i in range(0, 1000...
26.511905
186
0.606646
0
0
0
0
0
0
0
0
567
0.254603
195d837e267b2d3b0b05977370db15211b8d4942
37,304
py
Python
tests/rnacentral/search_export/exporter_test.py
RNAcentral/rnacentral-import-pipeline
238e573440c72581a051b16c15f56fcd25bece74
[ "Apache-2.0" ]
1
2018-08-09T14:41:16.000Z
2018-08-09T14:41:16.000Z
tests/rnacentral/search_export/exporter_test.py
RNAcentral/rnacentral-import-pipeline
238e573440c72581a051b16c15f56fcd25bece74
[ "Apache-2.0" ]
60
2015-02-04T16:43:53.000Z
2022-01-27T10:28:43.000Z
tests/rnacentral/search_export/exporter_test.py
RNAcentral/rnacentral-import-pipeline
238e573440c72581a051b16c15f56fcd25bece74
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute 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...
31.829352
134
0.562781
0
0
0
0
32,642
0.874956
0
0
16,853
0.451738
195f3150d0257121a8dd90bf3f90e35c01b0fa1c
1,921
py
Python
misago/threads/tests/test_thread_poll_api.py
HenryChenV/iJiangNan
68f156d264014939f0302222e16e3125119dd3e3
[ "MIT" ]
1
2017-07-25T03:04:36.000Z
2017-07-25T03:04:36.000Z
misago/threads/tests/test_thread_poll_api.py
HenryChenV/iJiangNan
68f156d264014939f0302222e16e3125119dd3e3
[ "MIT" ]
null
null
null
misago/threads/tests/test_thread_poll_api.py
HenryChenV/iJiangNan
68f156d264014939f0302222e16e3125119dd3e3
[ "MIT" ]
null
null
null
import json from django.urls import reverse from misago.acl.testutils import override_acl from misago.categories.models import Category from misago.threads import testutils from misago.users.testutils import AuthenticatedUserTestCase class ThreadPollApiTestCase(AuthenticatedUserTestCase): def setUp(self): ...
30.015625
93
0.605934
1,682
0.875586
0
0
0
0
0
0
297
0.154607
19618fa1e0fd69bf4ce89b6dd9ce0cf4d5bdf4a2
33
py
Python
PosPy/__init__.py
richierh/PointofSalePy
54fc11b5f167d361c75b6b1cb890c7020393d46c
[ "Apache-2.0" ]
null
null
null
PosPy/__init__.py
richierh/PointofSalePy
54fc11b5f167d361c75b6b1cb890c7020393d46c
[ "Apache-2.0" ]
null
null
null
PosPy/__init__.py
richierh/PointofSalePy
54fc11b5f167d361c75b6b1cb890c7020393d46c
[ "Apache-2.0" ]
null
null
null
#!usr/bin/python import __main__
11
16
0.787879
0
0
0
0
0
0
0
0
16
0.484848
196257af7109744f1d324ddf851e3f43ec9a1048
457
py
Python
__init__.py
patilaja/sqlalchemy-challenge
96e210106d31beb74d4ec5e42b20f5fd2d60db05
[ "ADSL" ]
null
null
null
__init__.py
patilaja/sqlalchemy-challenge
96e210106d31beb74d4ec5e42b20f5fd2d60db05
[ "ADSL" ]
null
null
null
__init__.py
patilaja/sqlalchemy-challenge
96e210106d31beb74d4ec5e42b20f5fd2d60db05
[ "ADSL" ]
null
null
null
#Helper method that implements the logic to look up an application. def get_app(self, reference_app=None): if reference_app is not None: return reference_app if self.app is not None: return self.app if current_app: return current_app._get_current_object() ...
30.466667
68
0.617068
0
0
0
0
0
0
0
0
140
0.306346
196317379bcca4ea114372256f94af6d980d0618
9,717
py
Python
demisto_sdk/commands/run_test_playbook/test_playbook_runner.py
SergeBakharev/demisto-sdk
17d00942a1bd33039a8aba9ddffecfd81008d275
[ "MIT" ]
null
null
null
demisto_sdk/commands/run_test_playbook/test_playbook_runner.py
SergeBakharev/demisto-sdk
17d00942a1bd33039a8aba9ddffecfd81008d275
[ "MIT" ]
null
null
null
demisto_sdk/commands/run_test_playbook/test_playbook_runner.py
SergeBakharev/demisto-sdk
17d00942a1bd33039a8aba9ddffecfd81008d275
[ "MIT" ]
null
null
null
import os import re import time import demisto_client from demisto_client.demisto_api.rest import ApiException from demisto_sdk.commands.common.tools import LOG_COLORS, get_yaml, print_color from demisto_sdk.commands.upload.uploader import Uploader SUCCESS_RETURN_CODE = 0 ERROR_RETURN_CODE = 1 ENTRY_TYPE_ERROR = 4 ...
41.348936
115
0.653185
9,395
0.966862
0
0
0
0
0
0
3,367
0.346506
19646232e69c582660ce7e5151741a5f639b0987
871
py
Python
procurement_portal/records/migrations/0017_auto_20201024_1438.py
rikusv/procurement-portal-backend
a00eb1d9d9da7737a84d9c495db0f59b26839157
[ "MIT" ]
null
null
null
procurement_portal/records/migrations/0017_auto_20201024_1438.py
rikusv/procurement-portal-backend
a00eb1d9d9da7737a84d9c495db0f59b26839157
[ "MIT" ]
19
2020-09-18T17:10:55.000Z
2020-10-18T09:54:16.000Z
procurement_portal/records/migrations/0017_auto_20201024_1438.py
rikusv/procurement-portal-backend
a00eb1d9d9da7737a84d9c495db0f59b26839157
[ "MIT" ]
2
2020-10-21T17:58:44.000Z
2022-02-13T17:21:22.000Z
# Generated by Django 3.1.1 on 2020-10-24 14:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('records', '0016_auto_20201012_0943'), ] operations = [ migrations.AddField( model_name='purchaserecord', name='imple...
30.034483
90
0.61194
778
0.893226
0
0
0
0
0
0
200
0.229621
19646d9adaadbd2e2fc9af7b3104bea3fb1c2bae
1,030
py
Python
docs/examples/template_query.py
Fourcast/flycs_sdk
4bf206c26f59726d0ce0caa51bd3a893a34fed2a
[ "MIT" ]
7
2020-12-15T13:25:43.000Z
2021-08-31T14:35:06.000Z
docs/examples/template_query.py
Fourcast/flycs_sdk
4bf206c26f59726d0ce0caa51bd3a893a34fed2a
[ "MIT" ]
2
2020-11-12T12:46:28.000Z
2021-12-21T07:26:28.000Z
docs/examples/template_query.py
Fourcast/flycs_sdk
4bf206c26f59726d0ce0caa51bd3a893a34fed2a
[ "MIT" ]
null
null
null
from datetime import datetime, timezone from flycs_sdk.entities import Entity from flycs_sdk.pipelines import Pipeline, PipelineKind from flycs_sdk.transformations import Transformation # Define your transformation SQL query using jinja template for the table name and define the list of table on which this transforma...
27.105263
154
0.694175
0
0
0
0
0
0
0
0
438
0.425243
1965469fd09240b19440049eb433930a5143a25d
13,252
py
Python
try/run_eval.py
CleverShovel/AIJ2020-digital-peter
baf07200e607cd39398fc0db1ba699c7af5cea77
[ "MIT" ]
null
null
null
try/run_eval.py
CleverShovel/AIJ2020-digital-peter
baf07200e607cd39398fc0db1ba699c7af5cea77
[ "MIT" ]
null
null
null
try/run_eval.py
CleverShovel/AIJ2020-digital-peter
baf07200e607cd39398fc0db1ba699c7af5cea77
[ "MIT" ]
null
null
null
import torch.nn.functional as F import torch.nn as nn import torch import torchvision.transforms.functional as VF from PIL import Image import numpy as np import os from os.path import join from collections import Counter # device = torch.device("cuda" if torch.cuda.is_available() else "cpu") import math from ct...
34.066838
145
0.60821
1,922
0.14411
0
0
0
0
0
0
7,972
0.597736
1966ed8573024a45a35bef1db87d4c67dcc7b5bc
496
py
Python
phr/ciudadano/migrations/0002_ciudadano_fecha_nacimiento.py
richardqa/django-ex
e5b8585f28a97477150ac5daf5e55c74b70d87da
[ "CC0-1.0" ]
null
null
null
phr/ciudadano/migrations/0002_ciudadano_fecha_nacimiento.py
richardqa/django-ex
e5b8585f28a97477150ac5daf5e55c74b70d87da
[ "CC0-1.0" ]
null
null
null
phr/ciudadano/migrations/0002_ciudadano_fecha_nacimiento.py
richardqa/django-ex
e5b8585f28a97477150ac5daf5e55c74b70d87da
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2017-01-09 09:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ciudadano', '0001_initial'), ] operations = [ migrations.AddField( ...
24.8
94
0.633065
338
0.681452
0
0
0
0
0
0
146
0.294355
1967b5cbe9cc4d8e1820eb5ee22aea8355578e45
8,306
py
Python
experiments/track_deep_trial.py
tcstewar/davis_tracking
4813eeaf66bdfad7b90f17831f6b0946daa8cbdf
[ "MIT" ]
5
2019-06-13T02:38:51.000Z
2021-07-29T03:32:41.000Z
experiments/track_deep_trial.py
tcstewar/davis_tracking
4813eeaf66bdfad7b90f17831f6b0946daa8cbdf
[ "MIT" ]
1
2019-08-05T17:30:31.000Z
2019-08-05T17:30:31.000Z
experiments/track_deep_trial.py
tcstewar/davis_tracking
4813eeaf66bdfad7b90f17831f6b0946daa8cbdf
[ "MIT" ]
3
2019-06-05T18:42:14.000Z
2019-06-19T19:36:02.000Z
import pytry import os import random import nengo import nengo_extras import numpy as np import nengo_dl import tensorflow as tf import davis_tracking class TrackingTrial(pytry.PlotTrial): def params(self): self.param('number of data sets to use', n_data=-1) self.param('data directory', dataset_d...
44.655914
131
0.567903
8,151
0.981339
0
0
0
0
0
0
669
0.080544
196901465c6a28bf050c45315b7c684ef13a92ea
1,337
py
Python
apps/collection/tests/public/test_public_collection_list.py
magocod/django_repository
660664ba2321499e92c3c5c23719756db2569e90
[ "MIT" ]
1
2019-10-01T01:39:29.000Z
2019-10-01T01:39:29.000Z
apps/collection/tests/public/test_public_collection_list.py
magocod/django_repository
660664ba2321499e92c3c5c23719756db2569e90
[ "MIT" ]
7
2019-12-04T21:40:40.000Z
2020-06-26T21:49:51.000Z
apps/collection/tests/public/test_public_collection_list.py
magocod/django_repository
660664ba2321499e92c3c5c23719756db2569e90
[ "MIT" ]
1
2020-04-08T02:46:31.000Z
2020-04-08T02:46:31.000Z
""" ... """ # Django from django.conf import settings # local Django from apps.collection.models import Collection from apps.collection.serializers import CollectionSlugSerializer from apps.tests.fixtures import RepositoryTestCase PAGE_SIZE = settings.REST_FRAMEWORK["PAGE_SIZE"] class CollectionPublicListTest(Rep...
31.093023
86
0.703067
1,050
0.78534
0
0
0
0
0
0
226
0.169035
196a103d422e501e45fed5d95aa6423587fcbc43
2,033
py
Python
main.py
uditarora/fashion-product-classification
686f8a6c34c54f2a09baa7fba89fe446582e8408
[ "MIT" ]
9
2020-04-28T17:26:42.000Z
2021-07-13T14:47:42.000Z
main.py
uditarora/fashion-product-classification
686f8a6c34c54f2a09baa7fba89fe446582e8408
[ "MIT" ]
2
2021-09-08T01:55:51.000Z
2022-03-12T00:25:38.000Z
main.py
uditarora/fashion-product-classification
686f8a6c34c54f2a09baa7fba89fe446582e8408
[ "MIT" ]
1
2020-08-03T15:27:05.000Z
2020-08-03T15:27:05.000Z
import argparse import logging import os from src.train import setup_top20, setup_ft, setup_bottom logging.basicConfig(level=logging.INFO) logger = logging.getLogger('fashion') def main(data_path, ckpt_path, mt, train_bottom=False): # Train on top-20 classes (train subsplit) logger.info("Training on top-20 cl...
37.648148
98
0.711264
0
0
0
0
0
0
0
0
616
0.303
196bb8f934a37aeb286c8e9a73930e525b7e413c
8,508
py
Python
src/toil_scripts/transfer_gtex_to_s3/transfer_gtex_to_s3.py
BD2KGenomics/toil-scripts
f878d863defcdccaabb7fe06f991451b7a198fb7
[ "Apache-2.0" ]
33
2015-10-28T18:26:31.000Z
2021-10-10T21:19:31.000Z
src/toil_scripts/transfer_gtex_to_s3/transfer_gtex_to_s3.py
BD2KGenomics/toil-scripts
f878d863defcdccaabb7fe06f991451b7a198fb7
[ "Apache-2.0" ]
464
2015-08-11T04:12:10.000Z
2018-02-21T21:29:11.000Z
src/toil_scripts/transfer_gtex_to_s3/transfer_gtex_to_s3.py
BD2KGenomics/toil-scripts
f878d863defcdccaabb7fe06f991451b7a198fb7
[ "Apache-2.0" ]
21
2015-09-08T18:07:49.000Z
2020-11-24T01:02:08.000Z
#!/usr/bin/env python2.7 """ Toil script to move TCGA data into an S3 bucket. Dependencies Curl: apt-get install curl Docker: wget -qO- https://get.docker.com/ | sh Toil: pip install toil S3AM: pip install --pre s3am """ import argparse import glob import hashlib import os import shutil import su...
42.328358
118
0.629525
0
0
0
0
0
0
0
0
3,442
0.40456
196bec7ed8b6cf58b1516910c7416d81061dacce
1,885
py
Python
tests/metrics/cpu_psutil_tests.py
shareablee/apm-agent-python
29f12ceb410b3c1a7f933b29dcecccf628dbbb6c
[ "BSD-3-Clause" ]
null
null
null
tests/metrics/cpu_psutil_tests.py
shareablee/apm-agent-python
29f12ceb410b3c1a7f933b29dcecccf628dbbb6c
[ "BSD-3-Clause" ]
null
null
null
tests/metrics/cpu_psutil_tests.py
shareablee/apm-agent-python
29f12ceb410b3c1a7f933b29dcecccf628dbbb6c
[ "BSD-3-Clause" ]
null
null
null
import time import pytest from elasticapm.utils import compat cpu_psutil = pytest.importorskip("elasticapm.metrics.sets.cpu_psutil") pytestmark = pytest.mark.psutil def test_cpu_mem_from_psutil(): metricset = cpu_psutil.CPUMetricSet() # do something that generates some CPU load for i in compat.irange(1...
33.660714
97
0.658886
0
0
0
0
0
0
0
0
842
0.446684
196e9f2b4480f78817f1f39de8dbbca5da718152
3,785
py
Python
day11/main.py
josteinl/advent2020
f109f9c1ef4fcb14582cda6b114d7648000decc6
[ "Apache-2.0" ]
null
null
null
day11/main.py
josteinl/advent2020
f109f9c1ef4fcb14582cda6b114d7648000decc6
[ "Apache-2.0" ]
null
null
null
day11/main.py
josteinl/advent2020
f109f9c1ef4fcb14582cda6b114d7648000decc6
[ "Apache-2.0" ]
null
null
null
""" Day 11 - Seating """ from itertools import chain import collections def occupied_count(seating): return ''.join(chain.from_iterable(seating)).count('#') def adjacent_occupied(x, y, seating): occupied = 0 # Above for look_x in range(x - 1, x + 2): for look_y in range(y - 1, y + 2): ...
29.115385
91
0.57675
0
0
0
0
0
0
0
0
440
0.116248
19709fd1d6df22996971f4e668193dabf3b6aadc
388
py
Python
firmware/pipelines.py
armijnhemel/FirmwareScraper
9684767bfbe076013386f6ee0b466f9282baf587
[ "MIT" ]
3
2022-02-13T09:12:57.000Z
2022-03-08T23:41:03.000Z
firmware/pipelines.py
armijnhemel/FirmwareScraper
9684767bfbe076013386f6ee0b466f9282baf587
[ "MIT" ]
4
2021-12-22T08:29:50.000Z
2022-03-02T18:48:53.000Z
firmware/pipelines.py
armijnhemel/FirmwareScraper
9684767bfbe076013386f6ee0b466f9282baf587
[ "MIT" ]
5
2019-11-19T06:26:07.000Z
2022-02-28T06:48:35.000Z
from scrapy.pipelines.files import FilesPipeline class FirmwarePipeline(FilesPipeline): def file_path(self, request, response=None, info=None): return request.url.split('/')[-1] class HpPipeline(FirmwarePipeline): pass class LinksysPipeline(FirmwarePipeline): pass class AvmPipeline(FirmwareP...
16.869565
59
0.747423
324
0.835052
0
0
0
0
0
0
3
0.007732
1971dea6d61ad931626506926b94703bc0412249
2,843
py
Python
research/cv/yolox/src/boxes.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/yolox/src/boxes.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/yolox/src/boxes.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2022 Huawei Technologies Co., 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 agreed to...
30.569892
89
0.562082
0
0
0
0
97
0.034119
0
0
965
0.33943
19720b08a53678ae7b601ebc496e7b65a4ff6078
3,343
py
Python
main/control/welcome.py
lipis/crypto-pocket
ec40e9f49e521d7b095c9065f89b8888a871313a
[ "MIT" ]
4
2018-01-17T12:41:18.000Z
2018-01-26T18:59:57.000Z
main/control/welcome.py
lipis/crypto-pocket
ec40e9f49e521d7b095c9065f89b8888a871313a
[ "MIT" ]
43
2018-01-29T06:15:52.000Z
2018-09-19T02:14:40.000Z
main/control/welcome.py
lipis/crypto-pocket
ec40e9f49e521d7b095c9065f89b8888a871313a
[ "MIT" ]
null
null
null
# coding: utf-8 import flask from google.appengine.ext import ndb import auth import config import model from main import app ############################################################################### # Welcome ############################################################################### @app.route('/') def...
33.43
126
0.608436
0
0
0
0
2,679
0.801376
0
0
889
0.265929
1973e78021509b21a44ae56187ef66052677e85e
2,029
py
Python
qa_multi_span/model.py
chunchiehy/musst
1525f917d8802d18c302720125ef9720b9c743fd
[ "MIT" ]
14
2021-02-26T15:19:21.000Z
2022-03-31T18:49:12.000Z
qa_multi_span/model.py
chunchiehy/musst
1525f917d8802d18c302720125ef9720b9c743fd
[ "MIT" ]
null
null
null
qa_multi_span/model.py
chunchiehy/musst
1525f917d8802d18c302720125ef9720b9c743fd
[ "MIT" ]
1
2021-11-16T07:20:32.000Z
2021-11-16T07:20:32.000Z
from transformers import AlbertModel from transformers import AlbertPreTrainedModel import torch.nn as nn import torch import torch.nn.functional as F class MUSTTransformerModel(AlbertPreTrainedModel): def __init__(self, config, max_num_spans, max_seq_len): super(MUSTTransformerModel, self).__init__(config) ...
33.816667
73
0.667817
1,874
0.923608
0
0
0
0
0
0
120
0.059142
19753cc35369937ec7625ed05051badbaa38c37c
1,160
py
Python
class_one/02_strings.py
nclairesays/intro-python-hackforla
65ab8584ab9d5082aaa405b40c47cbeacfff610c
[ "MIT" ]
null
null
null
class_one/02_strings.py
nclairesays/intro-python-hackforla
65ab8584ab9d5082aaa405b40c47cbeacfff610c
[ "MIT" ]
null
null
null
class_one/02_strings.py
nclairesays/intro-python-hackforla
65ab8584ab9d5082aaa405b40c47cbeacfff610c
[ "MIT" ]
null
null
null
# STRINGS # https://docs.python.org/3/tutorial/introduction.html#strings s = str(42) s # convert another data type into a string (casting) s = 'I like you' # examine a string s[0] # returns 'I' len(s) # returns 10 # string slicing like lists s[0:7] # returns 'I like ' s[6:] # returns 'you' s[-1] # returns...
22.745098
67
0.655172
0
0
0
0
0
0
0
0
947
0.816379
1975eb951bcdc39a34c55d4b1e7b13067352c07a
11,809
py
Python
amqpy/transport.py
veegee/amqpy
c5346b1f6910b8553ca96769d2c88a7807f83417
[ "MIT" ]
32
2015-02-04T03:57:28.000Z
2021-01-17T13:19:02.000Z
amqpy/transport.py
veegee/amqpy
c5346b1f6910b8553ca96769d2c88a7807f83417
[ "MIT" ]
33
2015-01-12T21:17:16.000Z
2018-03-14T22:54:13.000Z
amqpy/transport.py
veegee/amqpy
c5346b1f6910b8553ca96769d2c88a7807f83417
[ "MIT" ]
9
2015-02-17T04:44:31.000Z
2021-12-09T20:36:29.000Z
from __future__ import absolute_import, division, print_function __metaclass__ = type import errno import six import socket import ssl from abc import ABCMeta, abstractmethod import logging from threading import RLock from ssl import SSLError import datetime import time from . import compat from .proto import Frame f...
32.53168
110
0.597172
10,386
0.879499
0
0
2,750
0.232873
0
0
4,941
0.41841
197751283e20cfc29bc1ae41f28e04248f1f81be
2,795
py
Python
code/aditya.py
nyamako/hacktoberfest-2018
bf7939d4b0cfb57a854a1644dbbae7ddf8af3c4f
[ "MIT" ]
67
2018-09-25T21:37:23.000Z
2020-11-03T02:03:22.000Z
code/aditya.py
nyamako/hacktoberfest-2018
bf7939d4b0cfb57a854a1644dbbae7ddf8af3c4f
[ "MIT" ]
245
2018-09-18T10:07:28.000Z
2020-09-30T19:00:11.000Z
code/aditya.py
nyamako/hacktoberfest-2018
bf7939d4b0cfb57a854a1644dbbae7ddf8af3c4f
[ "MIT" ]
1,192
2018-09-18T11:27:55.000Z
2021-10-17T10:24:37.000Z
import random import time #list of words words = ("python", "india", "japan", "mother", "computer", "watch", "keyboard", "compass", "bottle", "monitor", "switch", "shoes", "chain", "mobile", "coffee", "alfredo", "mouse", "stomach", "tablet", "mojito", "halapeneos", "pizza", "nutella", "peanut", "broccoli") n = 0 #d...
28.814433
105
0.608945
91
0.032558
0
0
0
0
0
0
1,066
0.381395
19775af3ac0af2c8563350d3a05ceb55a427a779
639
py
Python
tracking/urls.py
KolibriSolutions/BepMarketplace
c47d252fd744cde6b927e37c34d7a103c6162be5
[ "BSD-3-Clause" ]
1
2019-06-29T15:24:24.000Z
2019-06-29T15:24:24.000Z
tracking/urls.py
KolibriSolutions/BepMarketplace
c47d252fd744cde6b927e37c34d7a103c6162be5
[ "BSD-3-Clause" ]
2
2020-01-12T17:47:33.000Z
2020-01-12T17:47:45.000Z
tracking/urls.py
KolibriSolutions/BepMarketplace
c47d252fd744cde6b927e37c34d7a103c6162be5
[ "BSD-3-Clause" ]
2
2019-06-29T15:24:26.000Z
2020-01-08T15:15:03.000Z
# Bep Marketplace ELE # Copyright (c) 2016-2021 Kolibri Solutions # License: See LICENSE file or https://github.com/KolibriSolutions/BepMarketplace/blob/master/LICENSE # from django.urls import path from . import views app_name = 'tracking' urlpatterns = [ path('user/login/', views.list_user_login, name='listu...
37.588235
102
0.744914
0
0
0
0
0
0
0
0
316
0.494523
1977d36fe2b99e051c145c78f7a06b38fad7e1e1
394
py
Python
admin_log_entries/settings.py
ataylor32/django-adminlogentries
6aa99b0444b3747369404bcaee4b50183f8194e0
[ "MIT" ]
5
2017-12-05T13:44:48.000Z
2021-07-29T14:04:57.000Z
admin_log_entries/settings.py
ataylor32/django-adminlogentries
6aa99b0444b3747369404bcaee4b50183f8194e0
[ "MIT" ]
null
null
null
admin_log_entries/settings.py
ataylor32/django-adminlogentries
6aa99b0444b3747369404bcaee4b50183f8194e0
[ "MIT" ]
null
null
null
from django.conf import settings default_settings = { 'has_module_permission_false': False, } ADMIN_LOG_ENTRIES_SETTINGS = {} def compute_settings(): for name, value in default_settings.items(): ADMIN_LOG_ENTRIES_SETTINGS[name] = value if hasattr(settings, 'ADMIN_LOG_ENTRIES'): ADMIN_LO...
21.888889
69
0.756345
0
0
0
0
0
0
0
0
48
0.121827
19782f36845f0387a12cf4d653a628e8d252f1ee
205
py
Python
katas/beta/reverse_the_number.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
katas/beta/reverse_the_number.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
katas/beta/reverse_the_number.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
def reverse(n): exp = 1 while n / 10 ** exp: exp += 1 return sum((n % 10 ** a / 10 ** (a - 1)) * (10 ** b) for a, b in zip(xrange(1, exp + 1), xrange(exp - 1, -1, -1)))
25.625
76
0.404878
0
0
0
0
0
0
0
0
0
0
1979aba1d17f885ed392d4535bcc74a5d8e636bc
464
py
Python
lwrl/optimizers/multistep_optimizer.py
sealday/lwrl
52bcd67751e605c38db4afa609c58938c7034e8d
[ "MIT" ]
2
2019-04-11T11:55:48.000Z
2020-05-29T18:09:51.000Z
lwrl/optimizers/multistep_optimizer.py
sealday/lwrl
52bcd67751e605c38db4afa609c58938c7034e8d
[ "MIT" ]
6
2021-06-01T22:21:00.000Z
2022-03-11T23:24:36.000Z
lwrl/optimizers/multistep_optimizer.py
sealday/lwrl
52bcd67751e605c38db4afa609c58938c7034e8d
[ "MIT" ]
1
2019-04-12T03:09:47.000Z
2019-04-12T03:09:47.000Z
from lwrl.optimizers import MetaOptimizer class MultistepOptimizer(MetaOptimizer): def __init__(self, parameters, optimizer, num_steps=10): self.num_steps = num_steps super().__init__(parameters, optimizer) def step(self, fn_loss, arguments, fn_reference, **kwargs): arguments['referen...
33.142857
69
0.709052
419
0.903017
0
0
0
0
0
0
11
0.023707
197a1ef6fa46d979a05f557aa10ddfcfec221a69
5,301
py
Python
saefportal/saef/views/connection_view.py
harry-consulting/SAEF
12ef43bbcc3178b8a988e21c1bef035881cf6e6d
[ "BSD-2-Clause" ]
4
2020-12-16T13:14:26.000Z
2022-03-26T08:54:12.000Z
saefportal/saef/views/connection_view.py
harry-consulting/SAEF
12ef43bbcc3178b8a988e21c1bef035881cf6e6d
[ "BSD-2-Clause" ]
1
2022-03-26T09:09:04.000Z
2022-03-26T09:09:04.000Z
saefportal/saef/views/connection_view.py
harry-consulting/SAEF
12ef43bbcc3178b8a988e21c1bef035881cf6e6d
[ "BSD-2-Clause" ]
1
2020-12-16T13:20:17.000Z
2020-12-16T13:20:17.000Z
from saef.connections import ConnectionFormHelper from ..models import Connection from ..forms import ConnectionTypeForm from saefportal.settings import MSG_SUCCESS_CONNECTION_UPDATE, MSG_SUCCESS_CONNECTION_VALID, \ MSG_ERROR_CONNECTION_INVALID, MSG_SUCCESS_CONNECTION_SAVED, MSG_ERROR_CONNECTION_SELECT_INVALID, \ ...
41.414063
105
0.716469
176
0.033201
0
0
4,294
0.810036
0
0
553
0.10432
197a2e031fcb6bc8c3c7153d570a652bf400420f
6,206
py
Python
modules/niftitools.py
NeuroSainteAnne/synthFLAIR
ddb083e0ddbb5a7a3131e947c8a84809f25b93a1
[ "BSD-3-Clause" ]
2
2022-01-09T11:25:40.000Z
2022-03-24T04:00:11.000Z
modules/niftitools.py
yunfei920406/synthFLAIR
ddb083e0ddbb5a7a3131e947c8a84809f25b93a1
[ "BSD-3-Clause" ]
null
null
null
modules/niftitools.py
yunfei920406/synthFLAIR
ddb083e0ddbb5a7a3131e947c8a84809f25b93a1
[ "BSD-3-Clause" ]
2
2022-03-24T04:00:17.000Z
2022-03-25T00:36:13.000Z
import os import pydicom import glob import numpy as np import nibabel as nib from skimage import filters, morphology from scipy.ndimage.morphology import binary_fill_holes from scipy.ndimage import label from dipy.segment.mask import median_otsu def padvolume(volume): "Applies a padding/cropping to a volume in or...
31.502538
91
0.618595
0
0
0
0
0
0
0
0
573
0.09233
197baac1afa4b35de9d60fc8d92a0d5870b20c39
1,937
py
Python
recognition.py
1159186649/Raspberry-Car
d1114793dd45be4e60a5d8a8da57b01ae3210f94
[ "Apache-2.0" ]
1
2020-11-04T02:28:32.000Z
2020-11-04T02:28:32.000Z
recognition.py
1159186649/Raspberry-Car
d1114793dd45be4e60a5d8a8da57b01ae3210f94
[ "Apache-2.0" ]
null
null
null
recognition.py
1159186649/Raspberry-Car
d1114793dd45be4e60a5d8a8da57b01ae3210f94
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from aip import AipFace from picamera import PiCamera import urllib.request import RPi.GPIO as GPIO import base64 import time import Main #百度智能云人脸识别id、key APP_ID = '*****' API_KEY = '**********' SECRET_KEY ='**********' client = AipFace(APP_ID, API_KEY, SECRE...
25.826667
87
0.573051
0
0
0
0
0
0
0
0
1,200
0.512601
197c315cc4fccd63e25903e81134070c4aabf0c5
2,939
py
Python
base/3base.py
chenliangold4j/MyPyDictionnary
3428333f42249f33732da71e420bdc41a412f594
[ "Apache-2.0" ]
null
null
null
base/3base.py
chenliangold4j/MyPyDictionnary
3428333f42249f33732da71e420bdc41a412f594
[ "Apache-2.0" ]
null
null
null
base/3base.py
chenliangold4j/MyPyDictionnary
3428333f42249f33732da71e420bdc41a412f594
[ "Apache-2.0" ]
null
null
null
L = ['Michael', 'Sarah', 'Tracy', 'Bob', 'Jack'] print(L[0:3]); # L[0:3]表示,从索引0开始取,直到索引3为止,但不包括索引3。即索引0,1,2,正好是3个元素。 # 如果第一个索引是0,还可以省略: print(L[:3]); # 类似的,既然Python支持L[-1]取倒数第一个元素,那么它同样支持倒数切片,试试: print(L[-2:]) L = list(range(100)) # 前10个数,每两个取一个: print(L[:10:2]) # 甚至什么都不写,只写[:]就可以原样复制一个list: # ,tuple也可以用切片操作,只是操作的结果仍是t...
27.726415
106
0.697856
0
0
130
0.028844
0
0
0
0
3,058
0.6785
197f119da149ba3627c410ef123a293d7183c17e
4,986
py
Python
rssxkcd.py
bkentropy/xkcd-updater
732b60428a9fdc79c2cd847623c7416cb4b6022d
[ "MIT" ]
null
null
null
rssxkcd.py
bkentropy/xkcd-updater
732b60428a9fdc79c2cd847623c7416cb4b6022d
[ "MIT" ]
null
null
null
rssxkcd.py
bkentropy/xkcd-updater
732b60428a9fdc79c2cd847623c7416cb4b6022d
[ "MIT" ]
null
null
null
#!/usr/local/bin/python2 import argparse import requests import feedparser import time import sys import sqlite3 import datetime # Command line args parser = argparse.ArgumentParser(description='Provide HipChat integration url to post xkcd comics') parser.add_argument('url', type=str, help='(string) a special url for ...
33.689189
113
0.583233
606
0.12154
0
0
0
0
0
0
1,214
0.243482
197ff79f1f26876a9752bd0bf842c448b0d64426
401
py
Python
Conditional/Lista 1/Thiago/07.py
Vitor-ORB/algorithms-and-programming-1-ufms
10821e9b580b78b7f78c27e740f3ead9c6b9f0bd
[ "MIT" ]
7
2021-05-25T16:49:20.000Z
2022-02-17T11:57:32.000Z
Conditional/Lista 1/Thiago/07.py
Vitor-ORB/algorithms-and-programming-1-ufms
10821e9b580b78b7f78c27e740f3ead9c6b9f0bd
[ "MIT" ]
null
null
null
Conditional/Lista 1/Thiago/07.py
Vitor-ORB/algorithms-and-programming-1-ufms
10821e9b580b78b7f78c27e740f3ead9c6b9f0bd
[ "MIT" ]
8
2021-05-25T16:49:39.000Z
2021-09-30T18:02:07.000Z
# Leia 2 valores numéricos e um símbolo correspondente a uma das operações. # soma (+), subtração(-), divisão(/) e multiplicação(*) n1, n2, op = input().split() n1 = int(n1) n2 = int(n2) if op == "+": print(n1 + n2) elif op == "-": print(n1 - n2) elif op == "/": print(n1 / n2) elif op == "*":...
22.277778
76
0.55611
0
0
0
0
0
0
0
0
198
0.475962
19822fbb662c35172c55da381ed0906814ac3187
2,000
py
Python
ciphers/caeser_cipher.py
nairraghav/ron-cipher
e7cbac6cd8f0fe30e71b7d7f26fddb8af4d6a88a
[ "MIT" ]
null
null
null
ciphers/caeser_cipher.py
nairraghav/ron-cipher
e7cbac6cd8f0fe30e71b7d7f26fddb8af4d6a88a
[ "MIT" ]
2
2021-02-02T23:46:26.000Z
2021-04-20T20:09:33.000Z
ciphers/caeser_cipher.py
nairraghav/ron-cipher
e7cbac6cd8f0fe30e71b7d7f26fddb8af4d6a88a
[ "MIT" ]
null
null
null
from ciphers.cipher_helper import get_character_map, flip_dict class CaeserCipher: def __init__(self, rotation: int = None): self.default_character_map = get_character_map() self.flipped_default_character_map = flip_dict( self.default_character_map ) if rotation: ...
29.411765
66
0.607
1,934
0.967
0
0
343
0.1715
0
0
60
0.03
198277b32eac2b22c43af843c0ee4c66623b8afb
327
py
Python
instagram/migrations/0020_remove_profile_follow.py
01king-ori/Kings-instagram
5e3c523462883879fe33834d68bdf1ebe4b75d8d
[ "MIT" ]
3
2020-06-25T22:35:05.000Z
2022-01-11T03:50:08.000Z
instagram/migrations/0020_remove_profile_follow.py
01king-ori/Kings-instagram
5e3c523462883879fe33834d68bdf1ebe4b75d8d
[ "MIT" ]
5
2020-06-05T23:38:22.000Z
2021-06-10T19:05:02.000Z
instagram/migrations/0020_remove_profile_follow.py
01king-ori/Kings-instagram
5e3c523462883879fe33834d68bdf1ebe4b75d8d
[ "MIT" ]
5
2020-01-07T05:39:10.000Z
2021-09-14T05:31:08.000Z
# Generated by Django 2.2.6 on 2019-10-14 13:19 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('instagram', '0019_profile_follow'), ] operations = [ migrations.RemoveField( model_name='profile', name='follow', ),...
18.166667
47
0.590214
242
0.740061
0
0
0
0
0
0
96
0.293578
1982e8dcbffc500675e9501f2db4214567aa2081
24,054
py
Python
boundaries/ca_qc_districts/definition.py
imhangoo/represent-canada-data
0d9cc818b343079f81a00c15438d79c079a10c9b
[ "OML" ]
null
null
null
boundaries/ca_qc_districts/definition.py
imhangoo/represent-canada-data
0d9cc818b343079f81a00c15438d79c079a10c9b
[ "OML" ]
null
null
null
boundaries/ca_qc_districts/definition.py
imhangoo/represent-canada-data
0d9cc818b343079f81a00c15438d79c079a10c9b
[ "OML" ]
null
null
null
# coding: utf-8 import re from datetime import date import boundaries # Noting that the "union" merge strategy fails with: # # GEOS_ERROR: TopologyException: found non-noded intersection between # LINESTRING (...) and LINESTRING (...) # # django.contrib.gis.geos.error.GEOSException: Could not initialize G...
42.877005
186
0.61204
0
0
0
0
0
0
0
0
14,555
0.601049
198370b8aa4515542204d0344e7d286fb2f76907
1,803
py
Python
pdbfairy/commands/compare_interactions.py
dannyroberts/pdbfairy
2cefd4a5e6c40f32e6fa3974ffd595fc336c582b
[ "BSD-3-Clause" ]
null
null
null
pdbfairy/commands/compare_interactions.py
dannyroberts/pdbfairy
2cefd4a5e6c40f32e6fa3974ffd595fc336c582b
[ "BSD-3-Clause" ]
null
null
null
pdbfairy/commands/compare_interactions.py
dannyroberts/pdbfairy
2cefd4a5e6c40f32e6fa3974ffd595fc336c582b
[ "BSD-3-Clause" ]
null
null
null
import difflib import io import click from pdbfairy import utils from pdbfairy.commands import find_interactions @click.argument('pdb_file_1') @click.argument('pdb_file_2') @click.option('--max-distance', default=find_interactions.MAX_DISTANCE, help=( "The distance in Angstroms under which atoms should " "b...
33.388889
78
0.653356
0
0
0
0
1,685
0.934554
0
0
362
0.200776
1983c2bf22bdcb42a662ebdbf2a359de7f422d6f
444
py
Python
accelerator/migrations/023_alter_topics_field_office_hours.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
6
2017-06-14T19:34:01.000Z
2020-03-08T07:16:59.000Z
accelerator/migrations/023_alter_topics_field_office_hours.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
160
2017-06-20T17:12:13.000Z
2022-03-30T13:53:12.000Z
accelerator/migrations/023_alter_topics_field_office_hours.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accelerator', '0022_add_meeting_info_on_office_hour_model'), ] operations = [ migrations.AlterField( model_name='mentorprogramofficehour...
23.368421
76
0.655405
359
0.808559
0
0
0
0
0
0
92
0.207207
198549dbef342bfbbd642fd61a76b181c129ac11
1,085
py
Python
guanabara/mundo1/ex018.py
thekilian/Python-pratica
875661addd5b8eb4364bc638832c7ab55dcefce4
[ "MIT" ]
null
null
null
guanabara/mundo1/ex018.py
thekilian/Python-pratica
875661addd5b8eb4364bc638832c7ab55dcefce4
[ "MIT" ]
null
null
null
guanabara/mundo1/ex018.py
thekilian/Python-pratica
875661addd5b8eb4364bc638832c7ab55dcefce4
[ "MIT" ]
null
null
null
# 018 - Faça um programa que leia um ângulo qualquer e mostre na tela o valor do seno, cosseno e tangente desse ângulo. ''' from math import sin, cos, tan ang = float(input('Digite um ângulo: ')) sen = sin(ang) cos = cos(ang) tan = tan(ang) print('Ângulo de {}°: \n Seno = {:.2f} \n Cosseno = {:.2f} \n Tangente = {:....
31
119
0.648848
0
0
0
0
0
0
0
0
922
0.839709
198848a18a09b75e39b55e572e9958bb26729aae
1,174
py
Python
models/basic_module.py
matsu911/CQTNet
e775f53fd91bbb9583d6640ae4e36f49031d1efd
[ "MIT" ]
25
2020-04-10T05:43:49.000Z
2022-03-28T02:25:44.000Z
models/basic_module.py
matsu911/CQTNet
e775f53fd91bbb9583d6640ae4e36f49031d1efd
[ "MIT" ]
2
2021-02-23T03:30:50.000Z
2021-06-28T09:02:38.000Z
models/basic_module.py
matsu911/CQTNet
e775f53fd91bbb9583d6640ae4e36f49031d1efd
[ "MIT" ]
7
2020-04-10T05:43:51.000Z
2021-12-23T09:34:44.000Z
import torch from torch import nn import torchvision import torch.nn.functional as F import time import os class BasicModule(torch.nn.Module): """ 封装了nn.Module,主要是提供了save和load两个方法 """ def __init__(self): super(BasicModule, self).__init__() self.model_name = str(type(self)) def load(...
29.35
84
0.602215
1,159
0.915482
0
0
0
0
0
0
313
0.247235
1989abd5efbf0b7dfe6d6083f611454b62427f76
654
py
Python
exp1_bot_detection/Cresci/Cresci.py
GabrielHam/SATAR_Twitter_Bot_Detection_with_Self-supervised_User_Representation_Learning
ac73e5deb9d748f02d1396d1458e716408470cc9
[ "MIT" ]
5
2021-08-10T14:15:18.000Z
2022-03-09T07:06:19.000Z
exp1_bot_detection/Cresci/Cresci.py
GabrielHam/SATAR_Twitter_Bot_Detection_with_Self-supervised_User_Representation_Learning
ac73e5deb9d748f02d1396d1458e716408470cc9
[ "MIT" ]
null
null
null
exp1_bot_detection/Cresci/Cresci.py
GabrielHam/SATAR_Twitter_Bot_Detection_with_Self-supervised_User_Representation_Learning
ac73e5deb9d748f02d1396d1458e716408470cc9
[ "MIT" ]
null
null
null
import math result = [1] * 4355 list = [] flag = '' def issub(strrr): global list cnt = 0 for dna in list: if strrr in dna: cnt = cnt + 1 return cnt def tryy(strrr): num = issub(strrr) if num > 1: for tmp in range(num): result[tmp] = max(result[tmp], ...
15.571429
63
0.524465
0
0
0
0
0
0
0
0
63
0.09633
198aafa829b773ab465bf52f7c98972087fa1385
3,119
py
Python
examples/smiley_face.py
Markichu/PythonAutoNifty
ab646601058297b6bfe14332f17b836ee3dfbe69
[ "MIT" ]
null
null
null
examples/smiley_face.py
Markichu/PythonAutoNifty
ab646601058297b6bfe14332f17b836ee3dfbe69
[ "MIT" ]
6
2021-11-24T00:48:57.000Z
2022-03-17T07:51:36.000Z
examples/smiley_face.py
Markichu/PythonAutoNifty
ab646601058297b6bfe14332f17b836ee3dfbe69
[ "MIT" ]
null
null
null
import random from pyautonifty.constants import DRAWING_SIZE, YELLOW, BLACK, MAGENTA, BLUE from pyautonifty.pos import Pos from pyautonifty.drawing import Drawing from pyautonifty.renderer import Renderer def smiley_face(drawing): # Set a background colour to be used for the drawing background_colour = MAGEN...
43.319444
114
0.721064
0
0
0
0
0
0
0
0
750
0.240462
198b6c8bdf9c4c45a62fc10ae148a99e4911a2b1
1,074
py
Python
cumulusci/tests/test_schema.py
davisagli/CumulusCI
fd74c324ad3ff662484b159395c639879011e711
[ "BSD-3-Clause" ]
109
2015-01-20T14:28:48.000Z
2018-08-31T12:12:39.000Z
cumulusci/tests/test_schema.py
davisagli/CumulusCI
fd74c324ad3ff662484b159395c639879011e711
[ "BSD-3-Clause" ]
365
2015-01-07T19:54:25.000Z
2018-09-11T15:10:02.000Z
cumulusci/tests/test_schema.py
davisagli/CumulusCI
fd74c324ad3ff662484b159395c639879011e711
[ "BSD-3-Clause" ]
125
2015-01-17T16:05:39.000Z
2018-09-06T19:05:00.000Z
import json import yaml from jsonschema import validate from cumulusci.utils.yaml import cumulusci_yml class TestSchema: def test_schema_validates(self, cumulusci_test_repo_root): schemapath = ( cumulusci_test_repo_root / "cumulusci/schema/cumulusci.jsonschema.json" ) with op...
32.545455
96
0.666667
966
0.899441
0
0
0
0
0
0
237
0.22067
198b7bfde744c3980b7b517559c0d495392afa36
7,650
py
Python
luxon/core/networking/sock.py
HieronymusCrouse/luxon
b0b08c103936adcbb3dd03b1701d44a65de8f61e
[ "BSD-3-Clause" ]
7
2018-02-27T00:18:02.000Z
2019-05-16T16:57:00.000Z
luxon/core/networking/sock.py
HieronymusCrouse/luxon
b0b08c103936adcbb3dd03b1701d44a65de8f61e
[ "BSD-3-Clause" ]
47
2018-01-23T13:49:28.000Z
2019-06-06T13:14:59.000Z
luxon/core/networking/sock.py
HieronymusCrouse/luxon
b0b08c103936adcbb3dd03b1701d44a65de8f61e
[ "BSD-3-Clause" ]
14
2018-01-15T08:47:11.000Z
2019-12-27T12:05:41.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2019-2020 Christiaan Frans Rademan <chris@fwiw.co.za>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the ...
33.116883
79
0.555817
5,490
0.717647
0
0
116
0.015163
0
0
1,858
0.242876
198cce97dd571e2e8a46ea89d848568e280efd25
739
py
Python
merge.py
Graze-Lab/SDE-of-species
c53ca05ff840e722fec3d71b5794057713d221f8
[ "MIT" ]
null
null
null
merge.py
Graze-Lab/SDE-of-species
c53ca05ff840e722fec3d71b5794057713d221f8
[ "MIT" ]
null
null
null
merge.py
Graze-Lab/SDE-of-species
c53ca05ff840e722fec3d71b5794057713d221f8
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 "A script to perform the linear regression and create the plot." # Python program to # demonstrate merging of # two files # Creating a list of filenames filenames = ['A.591-search-immune-dmel-FlyBase_IDs.txt', 'B.432_search-defense-dmel-FlyBase_IDs.txt'] # Open file3 in write mode with open(...
26.392857
101
0.653586
0
0
0
0
0
0
0
0
494
0.668471
198e2ea49efeb318a688dffd17a8ff15bcc42c01
13
py
Python
dmm/dmm_data/__init__.py
voghoei/Different-Models
ede4a48a7960ccb4a8519bfb77d234328f2936d1
[ "MIT" ]
11
2017-11-16T13:01:47.000Z
2021-12-26T20:07:24.000Z
optvaedatasets/__init__.py
rahulk90/inference_introspection
102b3cf72abae8d66718b945df365edd4a23a62d
[ "MIT" ]
null
null
null
optvaedatasets/__init__.py
rahulk90/inference_introspection
102b3cf72abae8d66718b945df365edd4a23a62d
[ "MIT" ]
null
null
null
all=['load']
6.5
12
0.538462
0
0
0
0
0
0
0
0
6
0.461538
19901da7c7a1960491cefcc10a95446ff706e6be
10,996
py
Python
game/sdktools/python/global/lib/site-packages/python_sfm.py
Andrej730/python-sfm
dc693b9d221fa046000a41ffdbb59b5ddca6d9dc
[ "MIT" ]
null
null
null
game/sdktools/python/global/lib/site-packages/python_sfm.py
Andrej730/python-sfm
dc693b9d221fa046000a41ffdbb59b5ddca6d9dc
[ "MIT" ]
null
null
null
game/sdktools/python/global/lib/site-packages/python_sfm.py
Andrej730/python-sfm
dc693b9d221fa046000a41ffdbb59b5ddca6d9dc
[ "MIT" ]
null
null
null
# encoding: utf-8 import os import pydoc import inspect import PySide import vs import sfm import sfmApp class SFMElement(object): def __init__(self, element): self._original = element @property def name(self): return self._original.GetName() @property def attributes(self): ...
29.013193
99
0.636049
5,598
0.508308
0
0
3,371
0.306093
0
0
2,373
0.215473
19918c7e3202a1fa8b8c6f798ca7ec26ed75c1a5
1,778
py
Python
waterApp/migrations/0014_gwmonitoringkobo.py
csisarep/groundwater_dashboard
4f93d7b7c9fd6b48ace54e7b62cae717decc98d2
[ "MIT" ]
null
null
null
waterApp/migrations/0014_gwmonitoringkobo.py
csisarep/groundwater_dashboard
4f93d7b7c9fd6b48ace54e7b62cae717decc98d2
[ "MIT" ]
null
null
null
waterApp/migrations/0014_gwmonitoringkobo.py
csisarep/groundwater_dashboard
4f93d7b7c9fd6b48ace54e7b62cae717decc98d2
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2021-09-14 07:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('waterApp', '0013_gwlocationsdata_location'), ] operations = [ migrations.CreateModel( name='GwMonitoringKobo', fields=...
46.789474
174
0.596738
1,687
0.948819
0
0
0
0
0
0
380
0.213723
1991dc4138a00addb007b9c008442a088b976ece
255
py
Python
graphs.py
spencerparkin/ComplexFunctionGrapher
780eea1fa704d3dcf0f41e701acbe709d0e8c410
[ "MIT" ]
null
null
null
graphs.py
spencerparkin/ComplexFunctionGrapher
780eea1fa704d3dcf0f41e701acbe709d0e8c410
[ "MIT" ]
null
null
null
graphs.py
spencerparkin/ComplexFunctionGrapher
780eea1fa704d3dcf0f41e701acbe709d0e8c410
[ "MIT" ]
null
null
null
# graphs.py # TODO: Import zeta function here or assume that the calling/loading program puts it into our global scope for us? def func1(z): # This, of course, is just the identity function. return z def func2(z): return (1.0 - z)*(1.0 + z)
25.5
114
0.678431
0
0
0
0
0
0
0
0
174
0.682353
1992027ec84925790a7d6fb4bda0cd8820388c0a
2,891
py
Python
src/rhc_hqa/rhc_hqa.py
Minyus/rhc_hqa
2b9f37a8b6ddb9dd36c08764acd2dcf9cbd7c551
[ "Apache-2.0" ]
null
null
null
src/rhc_hqa/rhc_hqa.py
Minyus/rhc_hqa
2b9f37a8b6ddb9dd36c08764acd2dcf9cbd7c551
[ "Apache-2.0" ]
null
null
null
src/rhc_hqa/rhc_hqa.py
Minyus/rhc_hqa
2b9f37a8b6ddb9dd36c08764acd2dcf9cbd7c551
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np from sklearn.linear_model import LogisticRegression from lightgbm import LGBMRegressor def cv_index_list_to_df(d): out_dict = {} for group, index_list in d.items(): for index in index_list: out_dict[index] = group df = pd.DataFrame.from_dict(out_d...
32.852273
80
0.649256
0
0
0
0
0
0
0
0
329
0.113801
1992310a23c16a6b24ee79181f9ba76bf057b0f3
2,301
py
Python
257.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
257.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
257.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
"""257. Binary Tree Paths""" # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution(object): def binaryTreePaths(self, root): """ :type roo...
29.883117
72
0.49761
2,070
0.899609
0
0
0
0
0
0
380
0.165146
1992ec78bc5a151f3be755b884f124a14b674536
213
py
Python
bot/tasks/__init__.py
gugarosa/botty
5d286c87716cb3ee55a58bdc560024be2276589f
[ "MIT" ]
null
null
null
bot/tasks/__init__.py
gugarosa/botty
5d286c87716cb3ee55a58bdc560024be2276589f
[ "MIT" ]
null
null
null
bot/tasks/__init__.py
gugarosa/botty
5d286c87716cb3ee55a58bdc560024be2276589f
[ "MIT" ]
null
null
null
"""A tasks package, used to support different tasks that the bot can execute. Essentialy, one can define any kind of operation that the bot can perform over a type of input data (audio, text, video and voice). """
53.25
85
0.760563
0
0
0
0
0
0
0
0
213
1
1993e0484cd76cbe8ee03395dd60ee7a00db241f
2,179
py
Python
crm/forms.py
zhangyafeii/CRM
4d93fb276c7210676590da48b18d8e72cc202ef0
[ "MIT" ]
null
null
null
crm/forms.py
zhangyafeii/CRM
4d93fb276c7210676590da48b18d8e72cc202ef0
[ "MIT" ]
null
null
null
crm/forms.py
zhangyafeii/CRM
4d93fb276c7210676590da48b18d8e72cc202ef0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @Datetime: 2018/10/23 @Author: Zhang Yafei """ from django.forms import ModelForm, forms from crm import models class EnrollmentForm(ModelForm): def __new__(cls, *args, **kwargs): # print('__new__',cls,args,kwargs) for field_name in cls.base_fields: file_ob...
35.145161
119
0.620009
2,044
0.932907
0
0
0
0
0
0
597
0.272478
199526a23444f21fe4ced48163607211a83fd853
3,911
py
Python
api/user_api.py
HuQi2018/BiSheServer
66fd77865e131f0a06313562b5d127e530128944
[ "Apache-2.0" ]
44
2021-06-03T04:01:30.000Z
2022-03-31T15:46:00.000Z
api/user_api.py
HuQi2018/BiSheServer
66fd77865e131f0a06313562b5d127e530128944
[ "Apache-2.0" ]
1
2022-02-21T05:40:01.000Z
2022-03-17T10:50:51.000Z
api/user_api.py
HuQi2018/BiSheServer
66fd77865e131f0a06313562b5d127e530128944
[ "Apache-2.0" ]
8
2021-06-05T17:13:35.000Z
2022-03-24T05:04:30.000Z
import uuid from django.core.files.base import ContentFile from django.core.files.storage import default_storage from django.db.models import Q from BiSheServer import settings from api.model_json import queryset_to_json from user.models import UsersPerfer, UsersDetail, UserTag # 用户api class User: def __init__(...
35.554545
116
0.611864
4,023
0.931466
0
0
2,589
0.599444
0
0
946
0.219032
199538a4a4f978d0b56aadb122776630718bac24
1,777
py
Python
Diretide/lib.py
sleibrock/dotacli
e361fbcf787f13232fcf8994b839d4c9f08bc67a
[ "MIT" ]
null
null
null
Diretide/lib.py
sleibrock/dotacli
e361fbcf787f13232fcf8994b839d4c9f08bc67a
[ "MIT" ]
null
null
null
Diretide/lib.py
sleibrock/dotacli
e361fbcf787f13232fcf8994b839d4c9f08bc67a
[ "MIT" ]
null
null
null
#!/usr/bin/env python #-*- coding: utf-8 -*- """ lib.py """ from string import printable as printable_chrs from collections import namedtuple from requests import get as re_get from datetime import datetime # Define constants API_URL = "http://dailydota2.com/match-api" Match = namedtuple("Match", ["timediff", "seri...
26.924242
78
0.621835
0
0
0
0
0
0
0
0
740
0.416432
1996ff9cbd376245bbd4ada8ffdff6a62803fa08
417
py
Python
hash-tool/vv_hash.py
amjunliang/virtualview_tools
7fcf62134b0a23a71bb8f4b54a6aac19cf858ef6
[ "MIT" ]
186
2017-12-06T09:17:07.000Z
2022-01-10T04:04:09.000Z
hash-tool/vv_hash.py
amjunliang/virtualview_tools
7fcf62134b0a23a71bb8f4b54a6aac19cf858ef6
[ "MIT" ]
16
2017-12-18T04:15:57.000Z
2021-04-15T06:50:37.000Z
hash-tool/vv_hash.py
amjunliang/virtualview_tools
7fcf62134b0a23a71bb8f4b54a6aac19cf858ef6
[ "MIT" ]
47
2018-01-12T06:23:26.000Z
2022-02-22T05:56:59.000Z
import sys if len(sys.argv) <= 1: print("python vv_hash.py property_name") exit(0) propertyName = sys.argv[1] if len(propertyName) == 0: print("empty element name") exit(0) hashCode = 0 for i in range(0, len(propertyName)): hashCode = (31 * hashCode + ord(propertyName[i])) & 0xFFFFFFFF if has...
24.529412
66
0.654676
0
0
0
0
0
0
0
0
68
0.16307
1998df4907ac93692e766bee0d9c71f2e17b5c12
237
py
Python
pycounter/test/test_jr1_tabs.py
loadbrain/pycounter
e5533d0ebe3685df0c29f8e491ea6dd1c14c6b66
[ "MIT" ]
null
null
null
pycounter/test/test_jr1_tabs.py
loadbrain/pycounter
e5533d0ebe3685df0c29f8e491ea6dd1c14c6b66
[ "MIT" ]
2
2020-08-27T14:12:44.000Z
2020-08-27T14:16:18.000Z
pycounter/test/test_jr1_tabs.py
loadbrain/pycounter
e5533d0ebe3685df0c29f8e491ea6dd1c14c6b66
[ "MIT" ]
null
null
null
"""Test COUNTER JR1 journal report (TSV)""" def test_html(tsv_jr1): assert [pub.html_total for pub in tsv_jr1.pubs] == [0, 15, 33, 0] def test_pdf(tsv_jr1): assert [pub.pdf_total for pub in tsv_jr1.pubs] == [32, 12, 855, 40]
23.7
71
0.662447
0
0
0
0
0
0
0
0
43
0.181435