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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42a9d7f0de1fb5aee832bc5e97c48ecbdecd3930 | 10,460 | py | Python | scripts/pos_eval.py | ProKil/sparse-text-prototype | e7369dc981fb2c2a94ccb4edca4a7e7c7d7543cd | [
"MIT"
] | 19 | 2020-11-05T12:17:45.000Z | 2021-11-17T08:43:50.000Z | scripts/pos_eval.py | ProKil/sparse-text-prototype | e7369dc981fb2c2a94ccb4edca4a7e7c7d7543cd | [
"MIT"
] | 1 | 2021-07-08T13:30:15.000Z | 2021-07-08T13:30:15.000Z | scripts/pos_eval.py | ProKil/sparse-text-prototype | e7369dc981fb2c2a94ccb4edca4a7e7c7d7543cd | [
"MIT"
] | 2 | 2020-12-20T13:19:14.000Z | 2021-06-25T20:18:00.000Z | import os
import argparse
import subprocess
import random
import edlib
from typing import List
from collections import Counter
import stanza
class ExtractMetric(object):
"""used for precision recall"""
def __init__(self, nume=0, denom_p=0, denom_r=0, precision=0, recall=0, f1=0):
super(ExtractMetric, ... | 33.41853 | 122 | 0.603537 | 365 | 0.034895 | 0 | 0 | 0 | 0 | 0 | 0 | 1,949 | 0.186329 |
42aa82728f6722cbbdd0c68a0e10c8dd5f0958ee | 582 | py | Python | tests/rules/test_git_stash_pop.py | RogueScholar/thefuck-termux | cc33d5fa0077b2b2323b8a62f3478ff8efef3fba | [
"MIT"
] | null | null | null | tests/rules/test_git_stash_pop.py | RogueScholar/thefuck-termux | cc33d5fa0077b2b2323b8a62f3478ff8efef3fba | [
"MIT"
] | null | null | null | tests/rules/test_git_stash_pop.py | RogueScholar/thefuck-termux | cc33d5fa0077b2b2323b8a62f3478ff8efef3fba | [
"MIT"
] | null | null | null | import pytest
from thefuck.rules.git_stash_pop import get_new_command
from thefuck.rules.git_stash_pop import match
from thefuck.types import Command
@pytest.fixture
def output():
return """error: Your local changes to the following files would be overwritten by merge:"""
def test_match(output):
assert mat... | 26.454545 | 96 | 0.707904 | 0 | 0 | 0 | 0 | 126 | 0.216495 | 0 | 0 | 178 | 0.305842 |
42ab556174e9603454893f6f485c837afcd3bad8 | 3,642 | py | Python | src/arima_model.py | SaharCarmel/ARIMA | c54e8554f1c4a95c25687bdf35b4296ed6bd78d6 | [
"MIT"
] | null | null | null | src/arima_model.py | SaharCarmel/ARIMA | c54e8554f1c4a95c25687bdf35b4296ed6bd78d6 | [
"MIT"
] | null | null | null | src/arima_model.py | SaharCarmel/ARIMA | c54e8554f1c4a95c25687bdf35b4296ed6bd78d6 | [
"MIT"
] | null | null | null | """ The ARIMA model. """
import torch
import numpy as np
class ARIMA(torch.nn.Module):
"""ARIMA [summary]
"""
def __init__(self,
p: int = 0,
d: int = 0,
q: int = 0) -> None:
"""__init__ General ARIMA model constructor.
Args:
... | 34.358491 | 77 | 0.549149 | 3,581 | 0.983251 | 0 | 0 | 0 | 0 | 0 | 0 | 1,386 | 0.38056 |
42ab6fa034b5730a8c76b4b76e6056f1b558984c | 687 | py | Python | problems/slidingwindow/Solution1100.py | akalu/cs-problems-python | 9b1bd8e3932be62135a38a77f955ded9a766b654 | [
"MIT"
] | null | null | null | problems/slidingwindow/Solution1100.py | akalu/cs-problems-python | 9b1bd8e3932be62135a38a77f955ded9a766b654 | [
"MIT"
] | null | null | null | problems/slidingwindow/Solution1100.py | akalu/cs-problems-python | 9b1bd8e3932be62135a38a77f955ded9a766b654 | [
"MIT"
] | null | null | null | """
Sliding window
Given a string S, return the number of substrings of length K with no
repeated characters.
Example 1:
Input: S = "havefunonleetcode", K = 5 Output: 6 Explanation: There are 6
substrings they are : 'havef','avefu','vefun','efuno','etcod','tcode'.
cou... | 18.078947 | 86 | 0.58952 | 28 | 0.040757 | 0 | 0 | 0 | 0 | 0 | 0 | 656 | 0.954876 |
42ab8cf968e58717ef4f86c899c0440ef99114b5 | 26 | py | Python | the_file_propagator/__init__.py | joeflack4/the-file-propagator | c72fdad7774c82c8bfa6bf5253b83f6bb1e4e713 | [
"MIT"
] | null | null | null | the_file_propagator/__init__.py | joeflack4/the-file-propagator | c72fdad7774c82c8bfa6bf5253b83f6bb1e4e713 | [
"MIT"
] | null | null | null | the_file_propagator/__init__.py | joeflack4/the-file-propagator | c72fdad7774c82c8bfa6bf5253b83f6bb1e4e713 | [
"MIT"
] | null | null | null | """The File Propagator"""
| 13 | 25 | 0.653846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.961538 |
42ab9f264f4ecd8a53e0ce06b3bb77538b433100 | 4,681 | py | Python | src/wa_kat/templates/static/js/Lib/site-packages/components/keyword_handler.py | WebArchivCZ/WA-KAT | 719f7607222f5a4d917c535b2da6371184222101 | [
"MIT"
] | 3 | 2017-03-23T12:59:21.000Z | 2017-11-22T08:23:14.000Z | src/wa_kat/templates/static/js/Lib/site-packages/components/keyword_handler.py | WebArchivCZ/WA-KAT | 719f7607222f5a4d917c535b2da6371184222101 | [
"MIT"
] | 89 | 2015-06-28T22:10:28.000Z | 2017-01-30T16:06:05.000Z | src/wa_kat/templates/static/js/Lib/site-packages/components/keyword_handler.py | WebarchivCZ/WA-KAT | 719f7607222f5a4d917c535b2da6371184222101 | [
"MIT"
] | 1 | 2015-12-17T02:56:59.000Z | 2015-12-17T02:56:59.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: brython (http://brython.info) (like python3)
#
# Imports =====================================================================
from os.path import join
from browser import window
from browser import document
# virtual filesystem / modules provide... | 29.25625 | 79 | 0.580432 | 4,001 | 0.853456 | 0 | 0 | 911 | 0.194326 | 0 | 0 | 2,281 | 0.486561 |
42abdb34b5121a34132a5ff61f5b37cf1ca828bc | 53 | py | Python | scripts/rnn/gru/__init__.py | bfeng/CryptoGRU | 65f6fe9eba981fea65fc665ff16938bf3a593001 | [
"MIT"
] | 1 | 2022-01-12T03:18:55.000Z | 2022-01-12T03:18:55.000Z | scripts/rnn/gru/__init__.py | bfeng/CryptoGRU | 65f6fe9eba981fea65fc665ff16938bf3a593001 | [
"MIT"
] | null | null | null | scripts/rnn/gru/__init__.py | bfeng/CryptoGRU | 65f6fe9eba981fea65fc665ff16938bf3a593001 | [
"MIT"
] | null | null | null | from .grucell import MyGRUCell
from .gru import MyGRU | 26.5 | 30 | 0.830189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
42b002236c965251bc510639be4dce4dd1300339 | 2,946 | py | Python | ZZZ_OtherDemo/00-dyld-832.7.3/testing/kernel-cache-tests/kext-missing-weak-bind/test.py | 1079278593/TreasureChest | 8b1ebe04ed7c2ed399c4ecf3b75b3fee0a1aced8 | [
"MIT"
] | null | null | null | ZZZ_OtherDemo/00-dyld-832.7.3/testing/kernel-cache-tests/kext-missing-weak-bind/test.py | 1079278593/TreasureChest | 8b1ebe04ed7c2ed399c4ecf3b75b3fee0a1aced8 | [
"MIT"
] | null | null | null | ZZZ_OtherDemo/00-dyld-832.7.3/testing/kernel-cache-tests/kext-missing-weak-bind/test.py | 1079278593/TreasureChest | 8b1ebe04ed7c2ed399c4ecf3b75b3fee0a1aced8 | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
import os
import KernelCollection
# Check that weak binds can be missing, so long as we check for the magic symbol
def check(kernel_cache):
kernel_cache.buildKernelCollection("arm64", "/kext-missing-weak-bind/main.kc", "/kext-missing-weak-bind/main.kernel", "/kext-missing-weak-bind/extension... | 62.680851 | 316 | 0.681942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,686 | 0.572301 |
42b0f3205382f72fca408d985411165330e27a01 | 7,453 | py | Python | datahub/search/investment/models.py | alixedi/data-hub-api-cd-poc | a5e5ea45bb496c0d2a06635864514af0c7d4291a | [
"MIT"
] | null | null | null | datahub/search/investment/models.py | alixedi/data-hub-api-cd-poc | a5e5ea45bb496c0d2a06635864514af0c7d4291a | [
"MIT"
] | 16 | 2020-04-01T15:25:35.000Z | 2020-04-14T14:07:30.000Z | datahub/search/investment/models.py | alixedi/data-hub-api-cd-poc | a5e5ea45bb496c0d2a06635864514af0c7d4291a | [
"MIT"
] | null | null | null | from elasticsearch_dsl import Boolean, Date, Double, Integer, Keyword, Long, Object, Text
from datahub.search import dict_utils
from datahub.search import fields
from datahub.search.models import BaseESModel
DOC_TYPE = 'investment_project'
def _related_investment_project_field():
"""Field for a related investm... | 38.417526 | 99 | 0.70106 | 6,955 | 0.933181 | 0 | 0 | 0 | 0 | 0 | 0 | 1,047 | 0.14048 |
42b106aaf54e3b2c19e17572d5a63e648baf43b4 | 1,670 | py | Python | robust_sleep_net/models/modulo_net/features_encoder/fully_connected.py | Dreem-Organization/RobustSleepNet | c8ff3f6f857299eb2bf2e9400483084d5ecd4106 | [
"MIT"
] | 16 | 2021-04-06T14:04:45.000Z | 2022-03-11T14:37:08.000Z | robust_sleep_net/models/modulo_net/features_encoder/fully_connected.py | Dreem-Organization/RobustSleepNet | c8ff3f6f857299eb2bf2e9400483084d5ecd4106 | [
"MIT"
] | null | null | null | robust_sleep_net/models/modulo_net/features_encoder/fully_connected.py | Dreem-Organization/RobustSleepNet | c8ff3f6f857299eb2bf2e9400483084d5ecd4106 | [
"MIT"
] | 4 | 2021-06-10T06:48:33.000Z | 2022-03-26T22:29:07.000Z | from collections import OrderedDict
import torch
from torch import nn
class FullyConnected(nn.Module):
def __init__(self, features, layers=None, dropout=0.0):
super(FullyConnected, self).__init__()
print("Layers:", layers)
input_channels = 0
for feature in features:
in... | 32.115385 | 96 | 0.426946 | 1,596 | 0.955689 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.021557 |
35e91cbc49c53f3ff38da3a05748e14783d919ce | 2,968 | py | Python | data/rawdata_dataset.py | weiyw16/pytorch-CycleGAN-and-pix2pix | 432a91ee6ca8dc606ba0116b27b0948abc48f295 | [
"BSD-3-Clause"
] | null | null | null | data/rawdata_dataset.py | weiyw16/pytorch-CycleGAN-and-pix2pix | 432a91ee6ca8dc606ba0116b27b0948abc48f295 | [
"BSD-3-Clause"
] | null | null | null | data/rawdata_dataset.py | weiyw16/pytorch-CycleGAN-and-pix2pix | 432a91ee6ca8dc606ba0116b27b0948abc48f295 | [
"BSD-3-Clause"
] | null | null | null | #import
import os
#import torch
#import torch.nn as nn
import torch.utils.data as Data
#import torchvision
import matplotlib.pyplot as plt
import h5py
#from torch.autograd import Variable
import numpy as np
import torch
class rawdataDataset(Data.Dataset):
def __init__(self):
super(rawdataDataset, self)... | 38.545455 | 97 | 0.597035 | 2,718 | 0.915768 | 0 | 0 | 89 | 0.029987 | 0 | 0 | 1,561 | 0.525943 |
35eca7541efb5afc537b44ba4b6a0fc5cf5a30dd | 310 | py | Python | pythons/pythons/pythons_app/urls.py | BoyanPeychinov/python_web_framework | bb3a78c36790821d8b3a2b847494a1138d063193 | [
"MIT"
] | null | null | null | pythons/pythons/pythons_app/urls.py | BoyanPeychinov/python_web_framework | bb3a78c36790821d8b3a2b847494a1138d063193 | [
"MIT"
] | null | null | null | pythons/pythons/pythons_app/urls.py | BoyanPeychinov/python_web_framework | bb3a78c36790821d8b3a2b847494a1138d063193 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
from .views import IndexView
urlpatterns = [
# path('', views.index, name="index"),
path('', IndexView.as_view(), name="index"),
# path('create/', views.create, name="create"),
path('create/', views.PythonCreateView.as_view(), name="create"),
] | 31 | 69 | 0.66129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.358065 |
35ed1f868aeb38f0c96a30ed7f9536e255837e20 | 356 | py | Python | tests/python/text_utility.py | Noxsense/mCRL2 | dd2fcdd6eb8b15af2729633041c2dbbd2216ad24 | [
"BSL-1.0"
] | 61 | 2018-05-24T13:14:05.000Z | 2022-03-29T11:35:03.000Z | tests/python/text_utility.py | Noxsense/mCRL2 | dd2fcdd6eb8b15af2729633041c2dbbd2216ad24 | [
"BSL-1.0"
] | 229 | 2018-05-28T08:31:09.000Z | 2022-03-21T11:02:41.000Z | tests/python/text_utility.py | Noxsense/mCRL2 | dd2fcdd6eb8b15af2729633041c2dbbd2216ad24 | [
"BSL-1.0"
] | 28 | 2018-04-11T14:09:39.000Z | 2022-02-25T15:57:39.000Z | #~ Copyright 2014 Wieger Wesselink.
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
def read_text(filename):
with open(filename, 'r') as f:
return f.read()
def write_text(filename, text):
with open(filenam... | 29.666667 | 82 | 0.691011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 184 | 0.516854 |
35ed5dd8d0b8879efae47e20f5661656b1666fbb | 159 | py | Python | Dumper/temp.py | NeerajGulia/kafka-monitor | cfcd39a37d22c86d3cebffe289687a030bb84353 | [
"Apache-2.0"
] | null | null | null | Dumper/temp.py | NeerajGulia/kafka-monitor | cfcd39a37d22c86d3cebffe289687a030bb84353 | [
"Apache-2.0"
] | null | null | null | Dumper/temp.py | NeerajGulia/kafka-monitor | cfcd39a37d22c86d3cebffe289687a030bb84353 | [
"Apache-2.0"
] | null | null | null | import datetime
t1 = datetime.datetime(2019, 3, 9, 10, 55, 30, 991882)
t2 = datetime.datetime(2019, 3, 10, 10, 55, 30, 991882)
print((t2-t1).total_seconds()) | 26.5 | 55 | 0.685535 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
35ee497682f551e6df5ef747e053a1c6578b24fe | 1,401 | py | Python | listools/llogic/is_descending.py | jgarte/listools | 17ef56fc7dde701890213f248971d8dc7a6e6b7c | [
"MIT"
] | 2 | 2019-01-22T03:50:43.000Z | 2021-04-22T16:12:17.000Z | listools/llogic/is_descending.py | jgarte/listools | 17ef56fc7dde701890213f248971d8dc7a6e6b7c | [
"MIT"
] | 2 | 2019-01-22T03:57:49.000Z | 2021-04-22T22:03:47.000Z | listools/llogic/is_descending.py | jgarte/listools | 17ef56fc7dde701890213f248971d8dc7a6e6b7c | [
"MIT"
] | 1 | 2021-04-22T21:13:00.000Z | 2021-04-22T21:13:00.000Z | def is_descending(input_list: list, step: int = -1) -> bool:
r"""llogic.is_descending(input_list[, step])
This function returns True if the input list is descending with a fixed
step, otherwise it returns False. Usage:
>>> alist = [3, 2, 1, 0]
>>> llogic.is_descending(alist)
True
The fina... | 27.470588 | 75 | 0.608851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,061 | 0.757316 |
35ef2ec3e738f6a7d680ddbb0d8cfed8a80181c4 | 384 | py | Python | blazer/hpc/local/__init__.py | radiantone/blazer | 4f369729a72a397a5a472f081002bf24cf22b69c | [
"CC0-1.0"
] | 4 | 2022-02-11T13:37:03.000Z | 2022-02-26T00:25:13.000Z | blazer/hpc/local/__init__.py | radiantone/blazer | 4f369729a72a397a5a472f081002bf24cf22b69c | [
"CC0-1.0"
] | null | null | null | blazer/hpc/local/__init__.py | radiantone/blazer | 4f369729a72a397a5a472f081002bf24cf22b69c | [
"CC0-1.0"
] | null | null | null | from functools import partial
from pipe import select, where
from pydash import chunk
from pydash import filter_ as filter
from pydash import flatten, get, omit
from .primitives import parallel, pipeline, scatter
__all__ = (
"parallel",
"scatter",
"pipeline",
"partial",
"select",
"where",
... | 16.695652 | 51 | 0.648438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.229167 |
35f130f559ed7cd7af033555dccc66ba4d2035c4 | 304 | py | Python | resumebuilder/resumebuilder.py | kinshuk4/ResumeBuilder | 2c997f73b522c0668f3a66afb372bd91c6408b3c | [
"MIT"
] | 1 | 2020-01-04T05:54:19.000Z | 2020-01-04T05:54:19.000Z | resumebuilder/resumebuilder.py | kinshuk4/ResumeBuilder | 2c997f73b522c0668f3a66afb372bd91c6408b3c | [
"MIT"
] | null | null | null | resumebuilder/resumebuilder.py | kinshuk4/ResumeBuilder | 2c997f73b522c0668f3a66afb372bd91c6408b3c | [
"MIT"
] | null | null | null | import yaml
def yaml2dict(filename):
with open(filename, "r") as stream:
resume_dict = yaml.load(stream)
return resume_dict
def main():
resumeFile = "../demo/sample-resume.yaml"
resume_dict = yaml2dict(resumeFile)
print(resume_dict)
if __name__ == '__main__':
main()
| 17.882353 | 45 | 0.664474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.134868 |
35f16309c334902b0ed8ed87b8f07d61caa46a9a | 6,025 | py | Python | backend/tests/unittests/metric_source/test_report/junit_test_report_tests.py | ICTU/quality-report | f6234e112228ee7cfe6476c2d709fe244579bcfe | [
"Apache-2.0"
] | 25 | 2016-11-25T10:41:24.000Z | 2021-07-03T14:02:49.000Z | backend/tests/unittests/metric_source/test_report/junit_test_report_tests.py | ICTU/quality-report | f6234e112228ee7cfe6476c2d709fe244579bcfe | [
"Apache-2.0"
] | 783 | 2016-09-19T12:10:21.000Z | 2021-01-04T20:39:15.000Z | backend/tests/unittests/metric_source/test_report/junit_test_report_tests.py | ICTU/quality-report | f6234e112228ee7cfe6476c2d709fe244579bcfe | [
"Apache-2.0"
] | 15 | 2015-03-25T13:52:49.000Z | 2021-03-08T17:17:56.000Z | """
Copyright 2012-2019 Ministerie van Sociale Zaken en Werkgelegenheid
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... | 47.81746 | 113 | 0.64249 | 5,249 | 0.871203 | 0 | 0 | 0 | 0 | 0 | 0 | 2,486 | 0.412614 |
35f24e93301e26ad076b53b869df2630d390d615 | 965 | py | Python | lang/Python/compare-sorting-algorithms-performance-6.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | 1 | 2018-11-09T22:08:38.000Z | 2018-11-09T22:08:38.000Z | lang/Python/compare-sorting-algorithms-performance-6.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | null | null | null | lang/Python/compare-sorting-algorithms-performance-6.py | ethansaxenian/RosettaDecode | 8ea1a42a5f792280b50193ad47545d14ee371fb7 | [
"MIT"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | sort_functions = [
builtinsort, # see implementation above
insertion_sort, # see [[Insertion sort]]
insertion_sort_lowb, # ''insertion_sort'', where sequential search is replaced
# by lower_bound() function
qsort, # see [[Quicksort]]
qsortranlc... | 50.789474 | 85 | 0.598964 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 450 | 0.466321 |
35f445a5ba07dee2c2143db897f87a8a3259db16 | 6,300 | py | Python | server/organization/tests.py | NicholasNagy/ALTA | ca07627481ee91f2969b0fc8e8f15e2a37b3e992 | [
"Apache-2.0"
] | 3 | 2020-09-09T23:26:29.000Z | 2020-10-17T22:58:34.000Z | server/organization/tests.py | NicholasNagy/ALTA | ca07627481ee91f2969b0fc8e8f15e2a37b3e992 | [
"Apache-2.0"
] | 294 | 2020-09-27T17:20:50.000Z | 2021-06-23T01:44:09.000Z | server/organization/tests.py | NicholasNagy/ALTA | ca07627481ee91f2969b0fc8e8f15e2a37b3e992 | [
"Apache-2.0"
] | 10 | 2020-10-07T05:25:30.000Z | 2021-05-01T05:32:59.000Z | from rest_framework import status
from rest_framework.test import APITestCase
from rest_framework.test import APIClient
from django.db.models import signals
import factory
from user_account.models import CustomUser
from .models import Organization
class OrganizationTestCase(APITestCase):
def setUp(self):
... | 45.985401 | 161 | 0.686667 | 6,046 | 0.959683 | 0 | 0 | 811 | 0.12873 | 0 | 0 | 1,545 | 0.245238 |
35f470bfac10a58409ff19aa1d364eb85ab7359d | 1,656 | py | Python | src/mumblecode/convert.py | Mumbleskates/mumblecode | 0221c33a09df154bf80ece73ff907c51d2a971f0 | [
"MIT"
] | 1 | 2016-05-17T23:07:38.000Z | 2016-05-17T23:07:38.000Z | src/mumblecode/convert.py | Mumbleskates/mumblecode | 0221c33a09df154bf80ece73ff907c51d2a971f0 | [
"MIT"
] | null | null | null | src/mumblecode/convert.py | Mumbleskates/mumblecode | 0221c33a09df154bf80ece73ff907c51d2a971f0 | [
"MIT"
] | null | null | null | # coding=utf-8
from math import log2, ceil
# valid chars for a url path component: a-z A-Z 0-9 .-_~!$&'()*+,;=:@
# For the default set here (base 72) we have excluded $'();:@
radix_alphabet = ''.join(sorted(
"0123456789"
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
".-_~!&*+,="
))
radix =... | 24.352941 | 114 | 0.634662 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 627 | 0.378623 |
35f52784cb920f6695ea0214e66ce046c4ba0969 | 961 | py | Python | flaskapp/routes.py | vijay0707/Send-Email-Flask | 3e8f981c5ef4c4051f61b5229eb3e56a35142bc7 | [
"MIT"
] | null | null | null | flaskapp/routes.py | vijay0707/Send-Email-Flask | 3e8f981c5ef4c4051f61b5229eb3e56a35142bc7 | [
"MIT"
] | null | null | null | flaskapp/routes.py | vijay0707/Send-Email-Flask | 3e8f981c5ef4c4051f61b5229eb3e56a35142bc7 | [
"MIT"
] | null | null | null | from flaskapp import app, db, mail
from flask import render_template, url_for
from flask import request, flash, redirect
# from flaskapp.model import User
from flaskapp.form import SurveyForm
from flask_mail import Message
@app.route('/', methods = ['POST', 'GET'])
def form():
form = SurveyForm()
if ... | 32.033333 | 97 | 0.632674 | 0 | 0 | 0 | 0 | 727 | 0.754149 | 0 | 0 | 320 | 0.33195 |
35f622ff3fa5187c3265b7d1252636eaf5af175d | 5,708 | py | Python | tests/test_camera.py | Gokender/kameramera | 7ebd9a196809c1e7ab117bb11b90bcea8d1eb8e7 | [
"MIT"
] | null | null | null | tests/test_camera.py | Gokender/kameramera | 7ebd9a196809c1e7ab117bb11b90bcea8d1eb8e7 | [
"MIT"
] | null | null | null | tests/test_camera.py | Gokender/kameramera | 7ebd9a196809c1e7ab117bb11b90bcea8d1eb8e7 | [
"MIT"
] | null | null | null | import unittest
from kameramera import camera
class Camera(unittest.TestCase):
def setUp(self):
self.camera = camera.Camera(camera_id='canon_ae1')
def test_general_manufacturer(self):
self.assertEqual(self.camera.general.manufacturer, 'Canon')
def test_general_name(self):
se... | 31.711111 | 82 | 0.637176 | 5,659 | 0.991416 | 0 | 0 | 0 | 0 | 0 | 0 | 369 | 0.064646 |
35f678cde08c5ff864121819c46adfa1fdba45f0 | 887 | py | Python | app/coordinates.py | krasch/simply_landmarks | 8a5c3f2ff476377e44646a00e61b8287a53260e3 | [
"MIT"
] | 14 | 2020-02-03T22:30:48.000Z | 2021-11-01T09:41:34.000Z | app/coordinates.py | krasch/simply_landmarks | 8a5c3f2ff476377e44646a00e61b8287a53260e3 | [
"MIT"
] | 3 | 2020-11-28T17:24:28.000Z | 2022-01-26T19:56:35.000Z | app/coordinates.py | krasch/simply_landmarks | 8a5c3f2ff476377e44646a00e61b8287a53260e3 | [
"MIT"
] | 4 | 2020-10-11T21:26:53.000Z | 2021-09-14T03:59:20.000Z | from pathlib import Path
from PIL import Image
# coordinates are sent as slightly weird URL parameters (e.g. 0.png?214,243)
# parse them, will crash server if they are coming in unexpected format
def parse_coordinates(args):
keys = list(args.keys())
assert len(keys) == 1
coordinates = keys[0]
assert... | 27.71875 | 77 | 0.67982 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.259301 |
35f6bdfd466ccfcc3ec731821bd0d70b92cb5b92 | 2,851 | py | Python | lib/tool_images.py | KTingLee/image-training | c02c7caa81a55b61e935d07ead27bcaed468eb0a | [
"MIT"
] | null | null | null | lib/tool_images.py | KTingLee/image-training | c02c7caa81a55b61e935d07ead27bcaed468eb0a | [
"MIT"
] | 2 | 2021-01-22T09:10:33.000Z | 2021-01-22T14:22:09.000Z | lib/tool_images.py | KTingLee/image-training | c02c7caa81a55b61e935d07ead27bcaed468eb0a | [
"MIT"
] | 1 | 2021-01-22T08:56:34.000Z | 2021-01-22T08:56:34.000Z | import matplotlib.pyplot as plt
import numpy as np
import math
import cv2
kernel = np.ones((3, 3), np.int8)
# 去除雜訊
def eraseImage (image):
return cv2.erode(image, kernel, iterations = 1)
# 模糊圖片
def blurImage (image):
return cv2.GaussianBlur(image, (5, 5), 0)
# 銳利化圖片
# threshold1,2,較小的值為作為偵測邊界的最小值
def edgedImage... | 25.684685 | 88 | 0.62785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 581 | 0.192193 |
35f6e6f91f9e05d76fd7957364cd9c3157a56978 | 2,965 | py | Python | Code/geneset_testing.py | dylkot/EbolaSC | d363f9d2c10911f01c7b1d22fec2b192df2569b1 | [
"MIT"
] | 2 | 2020-09-28T09:27:33.000Z | 2021-01-04T09:16:42.000Z | Code/geneset_testing.py | dylkot/SC-Ebola | d363f9d2c10911f01c7b1d22fec2b192df2569b1 | [
"MIT"
] | null | null | null | Code/geneset_testing.py | dylkot/SC-Ebola | d363f9d2c10911f01c7b1d22fec2b192df2569b1 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from scipy.stats import mannwhitneyu, fisher_exact, ranksums
def load_geneset(gmtfn, genes=None, minsize=0):
'''
Load genesets stored in gmt format (e.g. as provided by msigdb)
gmtfn : str
path to gmt file
genes : list, optional
only include gene... | 29.949495 | 89 | 0.57774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 518 | 0.174705 |
35f85f5cb5fab6226fab7a5a01b0882ca5ca7ca9 | 54 | py | Python | tests/src/import_func.py | bayashi-cl/expander | b3623b656a71801233797e05781295a6101fefd8 | [
"CC0-1.0"
] | null | null | null | tests/src/import_func.py | bayashi-cl/expander | b3623b656a71801233797e05781295a6101fefd8 | [
"CC0-1.0"
] | 1 | 2022-03-12T20:41:21.000Z | 2022-03-13T06:34:30.000Z | tests/src/import_func.py | bayashi-cl/expander | b3623b656a71801233797e05781295a6101fefd8 | [
"CC0-1.0"
] | null | null | null | from testlib_a.main_a import print_name
print_name()
| 13.5 | 39 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
35f901a5b14d9bb965c94938ad6cacba20eb8f77 | 2,167 | py | Python | nn_wtf/parameter_optimizers/brute_force_optimizer.py | lene/nn-wtf | 4696f143d936e0c0c127847e3bb1e93a6e756d35 | [
"Apache-2.0"
] | null | null | null | nn_wtf/parameter_optimizers/brute_force_optimizer.py | lene/nn-wtf | 4696f143d936e0c0c127847e3bb1e93a6e756d35 | [
"Apache-2.0"
] | 20 | 2016-02-20T12:43:04.000Z | 2016-12-23T13:57:25.000Z | nn_wtf/parameter_optimizers/brute_force_optimizer.py | lene/nn-wtf | 4696f143d936e0c0c127847e3bb1e93a6e756d35 | [
"Apache-2.0"
] | null | null | null | import pprint
from nn_wtf.parameter_optimizers.neural_network_optimizer import NeuralNetworkOptimizer
__author__ = 'Lene Preuss <[email protected]>'
class BruteForceOptimizer(NeuralNetworkOptimizer):
DEFAULT_LAYER_SIZES = (
(32, 48, 64), # (32, 48, 64, 80, 96, 128),
(32, 48, 64, 80, 96, 12... | 38.696429 | 119 | 0.677434 | 2,008 | 0.926627 | 0 | 0 | 0 | 0 | 0 | 0 | 152 | 0.070143 |
35f926086eaca9043bf3f10e9c0ac0804430ebb4 | 1,856 | py | Python | tests/test_get_value.py | mdpiper/bmi-example-python | e6b1e9105daef44fe1f0adba5b857cde1bbd032a | [
"MIT"
] | 3 | 2020-10-20T08:59:19.000Z | 2021-10-18T17:57:06.000Z | tests/test_get_value.py | mdpiper/bmi-example-python | e6b1e9105daef44fe1f0adba5b857cde1bbd032a | [
"MIT"
] | 4 | 2019-04-19T20:07:15.000Z | 2021-01-28T23:34:35.000Z | tests/test_get_value.py | mdpiper/bmi-example-python | e6b1e9105daef44fe1f0adba5b857cde1bbd032a | [
"MIT"
] | 7 | 2020-08-05T17:25:34.000Z | 2021-09-08T21:38:33.000Z | #!/usr/bin/env python
from numpy.testing import assert_array_almost_equal, assert_array_less
import numpy as np
from heat import BmiHeat
def test_get_initial_value():
model = BmiHeat()
model.initialize()
z0 = model.get_value_ptr("plate_surface__temperature")
assert_array_less(z0, 1.0)
assert_arr... | 24.746667 | 82 | 0.715517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.177263 |
35fac5891884a7fafbd906447065470f94dbe9cf | 9,158 | py | Python | tensorflow/dgm/exp.py | goldfarbDave/vcl | 24fb33a1dcadfa6c6cf5e9e9838b64f4fd23143a | [
"Apache-2.0"
] | null | null | null | tensorflow/dgm/exp.py | goldfarbDave/vcl | 24fb33a1dcadfa6c6cf5e9e9838b64f4fd23143a | [
"Apache-2.0"
] | null | null | null | tensorflow/dgm/exp.py | goldfarbDave/vcl | 24fb33a1dcadfa6c6cf5e9e9838b64f4fd23143a | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
import sys, os
sys.path.extend(['alg/', 'models/'])
from visualisation import plot_images
from encoder_no_shared import encoder, recon
from utils import init_variables, save_params, load_params, load_data
from eval_test_ll import construct_eval_func
dimZ = 50
dimH = 500
n_cha... | 40.166667 | 102 | 0.597183 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,298 | 0.141734 |
35fb641cc4c232d5e95579ae3bf4fec4904fbdf7 | 1,663 | py | Python | src/cltl/combot/infra/config/k8config.py | leolani/cltl-combot | 7008742ba9db782166f79322658a8cb49890d61b | [
"MIT"
] | 1 | 2020-11-21T18:53:22.000Z | 2020-11-21T18:53:22.000Z | src/cltl/combot/infra/config/k8config.py | leolani/cltl-combot | 7008742ba9db782166f79322658a8cb49890d61b | [
"MIT"
] | null | null | null | src/cltl/combot/infra/config/k8config.py | leolani/cltl-combot | 7008742ba9db782166f79322658a8cb49890d61b | [
"MIT"
] | null | null | null | import logging
import os
import cltl.combot.infra.config.local as local_config
logger = logging.getLogger(__name__)
K8_CONFIG_DIR = "/cltl_k8_config"
K8_CONFIG = "config/k8.config"
class K8LocalConfigurationContainer(local_config.LocalConfigurationContainer):
@staticmethod
def load_configuration(config_fi... | 36.955556 | 116 | 0.710764 | 667 | 0.401082 | 0 | 0 | 584 | 0.351173 | 0 | 0 | 184 | 0.110643 |
35fb6a7aec8441ab62bd7a834d5a31a1a31bbbcf | 17,640 | py | Python | act_map/scripts/exp_compare_diff_maps.py | debugCVML/rpg_information_field | 56f9ffba83aaee796502116e1cf651c5bc405bf6 | [
"MIT"
] | 149 | 2020-06-23T12:08:47.000Z | 2022-03-31T08:18:52.000Z | act_map/scripts/exp_compare_diff_maps.py | debugCVML/rpg_information_field | 56f9ffba83aaee796502116e1cf651c5bc405bf6 | [
"MIT"
] | 4 | 2020-08-28T07:51:15.000Z | 2021-04-09T13:18:49.000Z | act_map/scripts/exp_compare_diff_maps.py | debugCVML/rpg_information_field | 56f9ffba83aaee796502116e1cf651c5bc405bf6 | [
"MIT"
] | 34 | 2020-06-26T14:50:34.000Z | 2022-03-04T06:45:55.000Z | #!/usr/bin/env python
import os
import argparse
import yaml
import numpy as np
from colorama import init, Fore, Style
from matplotlib import rc
import matplotlib.pyplot as plt
import plot_utils as pu
init(autoreset=True)
rc('font', **{'serif': ['Cardo'], 'size': 20})
rc('text', usetex=True)
kMetrics = ['det', 'mi... | 41.505882 | 129 | 0.626361 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,335 | 0.189059 |
35fbe8e8b4f1e1aa102f85306945ce878960b4de | 52 | py | Python | tests/conftest.py | grintor/Hello-Wolrd-CI | 1f1b8c40f55d0b35cd73601ed90567a84abf03db | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | grintor/Hello-Wolrd-CI | 1f1b8c40f55d0b35cd73601ed90567a84abf03db | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | grintor/Hello-Wolrd-CI | 1f1b8c40f55d0b35cd73601ed90567a84abf03db | [
"Apache-2.0"
] | null | null | null | # see: https://stackoverflow.com/a/34520971/3238695
| 26 | 51 | 0.769231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.980769 |
35fc69cf4551ec557452a3db41e67d9efead2ebf | 1,318 | py | Python | Files/SpeechRecognition/speechDandR.py | JahnaviDoneria/HomeAutomationSystem | 0419ba4a0fefd16b9a5c7a19fef7897d76850dc2 | [
"MIT"
] | null | null | null | Files/SpeechRecognition/speechDandR.py | JahnaviDoneria/HomeAutomationSystem | 0419ba4a0fefd16b9a5c7a19fef7897d76850dc2 | [
"MIT"
] | null | null | null | Files/SpeechRecognition/speechDandR.py | JahnaviDoneria/HomeAutomationSystem | 0419ba4a0fefd16b9a5c7a19fef7897d76850dc2 | [
"MIT"
] | 1 | 2020-01-20T13:04:55.000Z | 2020-01-20T13:04:55.000Z | import json
import apiai
import speech_recognition as sr
def speechRecognition():
recog = sr.Recognizer()
with sr.Microphone() as source:
print("It's your cue")
audio = recog.listen(source)
i = True
while i is True:
try:
text = recog.recognize_google(audio)
... | 23.122807 | 63 | 0.651745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.154021 |
35fcbb05f8e3b57b8ab5311822807b3114647a9f | 4,667 | py | Python | mylib/dataset/coco.py | duducheng/deeplabv3p_gluon | fd8e3e8d834838a9a221785b825499c62cee578f | [
"Apache-2.0"
] | 66 | 2018-07-20T04:01:41.000Z | 2021-11-08T10:40:49.000Z | mylib/dataset/coco.py | duducheng/deeplabv3p_gluon | fd8e3e8d834838a9a221785b825499c62cee578f | [
"Apache-2.0"
] | 6 | 2018-08-16T08:06:39.000Z | 2020-11-28T13:07:21.000Z | mylib/dataset/coco.py | duducheng/deeplabv3p_gluon | fd8e3e8d834838a9a221785b825499c62cee578f | [
"Apache-2.0"
] | 11 | 2018-07-20T18:00:29.000Z | 2020-04-28T15:21:58.000Z | # raise NotImplementedError("Did not check!")
"""MSCOCO Semantic Segmentation pretraining for VOC."""
import os
from tqdm import trange
from PIL import Image, ImageOps, ImageFilter
import numpy as np
import pickle
from gluoncv.data.segbase import SegmentationDataset
class COCOSegmentation(SegmentationDataset):
... | 40.582609 | 92 | 0.555817 | 4,395 | 0.941718 | 0 | 0 | 329 | 0.070495 | 0 | 0 | 948 | 0.203128 |
35fd4da34b0954ed2f821de46d87379191733efa | 1,045 | py | Python | find_other_news_sources.py | sr33/OtherNewsSources | 17857381a5690d5e89d4a034f1fc60f61c2377dc | [
"MIT"
] | 10 | 2015-07-17T09:57:38.000Z | 2020-05-24T20:09:20.000Z | find_other_news_sources.py | sr33/OtherNewsSources | 17857381a5690d5e89d4a034f1fc60f61c2377dc | [
"MIT"
] | null | null | null | find_other_news_sources.py | sr33/OtherNewsSources | 17857381a5690d5e89d4a034f1fc60f61c2377dc | [
"MIT"
] | null | null | null | # __author__ = 'sree'
import urllib2
from lxml import html
import requests
def get_page_tree(url=None):
page = requests.get(url=url, verify=False)
return html.fromstring(page.text)
def get_title(url=None):
tree = get_page_tree(url=url)
return tree.xpath('//title//text()')[0].strip().split(' -')[0]
d... | 40.192308 | 119 | 0.702392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.205742 |
35fda7f9b73a414c879824f59fa81da72f267f5a | 35,235 | py | Python | code/client/munkilib/adobeutils/adobeinfo.py | Rippling/munki | 115832687d4411ca825202ec82d9a27053fef7c8 | [
"Apache-2.0"
] | 1 | 2021-10-06T12:56:14.000Z | 2021-10-06T12:56:14.000Z | code/client/munkilib/adobeutils/adobeinfo.py | Rippling/munki | 115832687d4411ca825202ec82d9a27053fef7c8 | [
"Apache-2.0"
] | null | null | null | code/client/munkilib/adobeutils/adobeinfo.py | Rippling/munki | 115832687d4411ca825202ec82d9a27053fef7c8 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# Copyright 2009-2020 Greg Neagle.
#
# 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... | 44.657795 | 80 | 0.565319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,245 | 0.347524 |
35fe055b65de9e34581ebd9b036ec7f195d41986 | 645 | py | Python | mandrel/config/helpers.py | gf-atebbe/python-mandrel | 64b90e3265a522ff72019960752bcc716533347f | [
"MIT"
] | null | null | null | mandrel/config/helpers.py | gf-atebbe/python-mandrel | 64b90e3265a522ff72019960752bcc716533347f | [
"MIT"
] | null | null | null | mandrel/config/helpers.py | gf-atebbe/python-mandrel | 64b90e3265a522ff72019960752bcc716533347f | [
"MIT"
] | null | null | null | from .. import util
def configurable_class(setting_name, default_class_name=None):
def getter(self):
value = None
try:
value = self.configuration_get(setting_name)
except KeyError:
pass
if not value:
if not default_class_name:
ret... | 25.8 | 81 | 0.626357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
35ff001cebfbaa2f16c6208ca4d5a99ce422a736 | 1,606 | py | Python | Components/MoveComponent.py | RuoxiQin/Unmanned-Aerial-Vehicle-Tracking | 49a0a32abcce42fc6bf9e71f5b098ec708373153 | [
"Apache-2.0"
] | 13 | 2018-06-16T12:52:18.000Z | 2021-08-14T02:43:24.000Z | Components/MoveComponent.py | RuoxiQin/Unmanned-Aerial-Vehicle-Tracking | 49a0a32abcce42fc6bf9e71f5b098ec708373153 | [
"Apache-2.0"
] | null | null | null | Components/MoveComponent.py | RuoxiQin/Unmanned-Aerial-Vehicle-Tracking | 49a0a32abcce42fc6bf9e71f5b098ec708373153 | [
"Apache-2.0"
] | 6 | 2019-06-20T21:06:01.000Z | 2021-08-14T02:43:28.000Z | #!/usr/bin/python
#-*-coding:utf-8-*-
from Component import Component
class MoveComponent(Component):
'''This is the moveable component.'''
_name = 'MoveComponent'
def move(self,cmd):
'''Input L,R,U,D or S to move the component or stop. Rise exception if moving out of region.'''
cmd = cm... | 34.170213 | 104 | 0.52802 | 1,533 | 0.954545 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.13325 |
35ff5a9fe6f25456cafae5f86dcd151f7638267e | 35,016 | py | Python | poshc2/server/Tasks.py | slackr/PoshC2 | d4804f1f534dac53b95dd6dd6578431beaf79360 | [
"BSD-3-Clause"
] | 1,504 | 2016-07-12T04:14:00.000Z | 2022-03-31T02:59:30.000Z | poshc2/server/Tasks.py | PhilKeeble/PoshC2 | 498b30097e12e46b5aa454feaeaa4bbae3c04c0d | [
"BSD-3-Clause"
] | 139 | 2016-10-13T10:41:18.000Z | 2022-03-31T13:22:47.000Z | poshc2/server/Tasks.py | PhilKeeble/PoshC2 | 498b30097e12e46b5aa454feaeaa4bbae3c04c0d | [
"BSD-3-Clause"
] | 377 | 2016-07-12T03:10:03.000Z | 2022-03-31T10:04:13.000Z | import datetime, hashlib, base64, traceback, os, re
import poshc2.server.database.DB as DB
from poshc2.Colours import Colours
from poshc2.server.Config import ModulesDirectory, DownloadsDirectory, ReportsDirectory
from poshc2.server.Implant import Implant
from poshc2.server.Core import decrypt, encrypt, default_respon... | 64.486188 | 474 | 0.499714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,882 | 0.225097 |
c4005a008048988474573247edb485bd20d1bb6d | 1,029 | py | Python | Leetcode/89.grayCode.py | Song2017/Leetcode_python | 99d9f3cec0e47ddab6ec107392a6b33bf6c1d046 | [
"MIT"
] | 1 | 2019-05-14T00:55:30.000Z | 2019-05-14T00:55:30.000Z | LeetcodeView/89.grayCode.md | Song2017/Leetcode_python | 99d9f3cec0e47ddab6ec107392a6b33bf6c1d046 | [
"MIT"
] | null | null | null | LeetcodeView/89.grayCode.md | Song2017/Leetcode_python | 99d9f3cec0e47ddab6ec107392a6b33bf6c1d046 | [
"MIT"
] | null | null | null | class Solution:
'''
格雷编码是一个二进制数字系统,在该系统中,两个连续的数值仅有一个位数的差异。
给定一个代表编码总位数的非负整数 n,打印其格雷编码序列。格雷编码序列必须以 0 开头。
输入: 2
输出: [0,1,3,2]
解释: 00 - 0, 01 - 1, 11 - 3, 10 - 2
'''
def grayCode(self, n: int):
# 观察连续数值对应的格雷编码序列对应的关系
# 追加二进制位到首位, 0: 数值仍为前一个数组的值, 1: 前一个数组的每个元素 + 2的(n-1)次幂
... | 25.725 | 62 | 0.433431 | 1,294 | 0.970743 | 0 | 0 | 0 | 0 | 0 | 0 | 918 | 0.688672 |
c400620022eebd6f0df3a706d1f575d077a9ad78 | 6,781 | py | Python | object/test.py | SkinLesionsResearch/NCPL | 562e9664f77e14ed9b2655b82e8498b8a8ce5d2d | [
"MIT"
] | null | null | null | object/test.py | SkinLesionsResearch/NCPL | 562e9664f77e14ed9b2655b82e8498b8a8ce5d2d | [
"MIT"
] | null | null | null | object/test.py | SkinLesionsResearch/NCPL | 562e9664f77e14ed9b2655b82e8498b8a8ce5d2d | [
"MIT"
] | null | null | null | import argparse
import os, sys
os.chdir("/home/jackie/ResearchArea/SkinCancerResearch/semi_skin_cancer")
sys.path.append("/home/jackie/ResearchArea/SkinCancerResearch/semi_skin_cancer")
print(os.getcwd())
import os.path as osp
import torchvision
import numpy as np
import torch
# import torch.nn as nn
# impo... | 38.971264 | 113 | 0.626309 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,208 | 0.178145 |
c4009ade7b5eb056201eed0338579ec28e08eb56 | 226 | py | Python | countdownhype/urls.py | chri4354/BeeMe_platform | b73843d9146c5ba54a63a8839980ee7c8024e80d | [
"CC-BY-4.0"
] | null | null | null | countdownhype/urls.py | chri4354/BeeMe_platform | b73843d9146c5ba54a63a8839980ee7c8024e80d | [
"CC-BY-4.0"
] | 8 | 2020-06-06T01:55:55.000Z | 2022-03-12T00:31:52.000Z | countdownhype/urls.py | chri4354/BeeMe_platform | b73843d9146c5ba54a63a8839980ee7c8024e80d | [
"CC-BY-4.0"
] | null | null | null | from django.urls import path, re_path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('countdown/', views.countdown, name='countdown'),
#re_path(r'.+', views.redir, name='redir'),
]
| 22.6 | 58 | 0.650442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.331858 |
c40260dc06f3a35df8d6b1598c7152ecade68c53 | 204 | py | Python | argv.py | christoga/python | 1395b3177e7baf46677a7a7a4ae89d2488c6f0fa | [
"MIT"
] | 5 | 2015-11-15T19:08:31.000Z | 2015-11-27T02:34:28.000Z | argv.py | christoga/python | 1395b3177e7baf46677a7a7a4ae89d2488c6f0fa | [
"MIT"
] | null | null | null | argv.py | christoga/python | 1395b3177e7baf46677a7a7a4ae89d2488c6f0fa | [
"MIT"
] | null | null | null | from sys import argv
script, first, second, third = argv
print "This script called", script
print "The first variable :", first
print "The second variable :", second
print "The third variable :", third
| 22.666667 | 37 | 0.735294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.426471 |
c402fd47d18c33d2119498b3bf7f8c6a643683c4 | 545 | py | Python | featureflow/feature_registration.py | featureflow/featureflow-python-sdk | a84cf54812fdc65d9aa52d10b17325504e67057f | [
"Apache-2.0"
] | null | null | null | featureflow/feature_registration.py | featureflow/featureflow-python-sdk | a84cf54812fdc65d9aa52d10b17325504e67057f | [
"Apache-2.0"
] | null | null | null | featureflow/feature_registration.py | featureflow/featureflow-python-sdk | a84cf54812fdc65d9aa52d10b17325504e67057f | [
"Apache-2.0"
] | 2 | 2020-06-01T05:37:16.000Z | 2020-07-15T08:17:18.000Z | class FeatureRegistration:
def __init__(self, key, failoverVariant, variants=[]):
"""docstring for __init__"""
self.key = key
self.failoverVariant = failoverVariant
self.variants = [v.toJSON() for v in variants]
def toJSON(self):
"""docstring for toJSON"""
self._... | 24.772727 | 58 | 0.594495 | 541 | 0.992661 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.198165 |
c403737a02fdcf7c798629d6151ff7c1e4a813cf | 913 | py | Python | ryu/gui/views/topology.py | uiuc-srg/ryu | 2a597f812270ea9690269a20bf659f334c323eb6 | [
"Apache-2.0"
] | 269 | 2015-03-08T11:32:45.000Z | 2022-03-30T11:18:16.000Z | ryu/gui/views/topology.py | uiuc-srg/ryu | 2a597f812270ea9690269a20bf659f334c323eb6 | [
"Apache-2.0"
] | 4 | 2017-03-07T11:51:24.000Z | 2020-07-07T20:13:55.000Z | ryu/gui/views/topology.py | uiuc-srg/ryu | 2a597f812270ea9690269a20bf659f334c323eb6 | [
"Apache-2.0"
] | 205 | 2015-01-13T04:52:25.000Z | 2022-03-30T13:37:33.000Z | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
#
# 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 appli... | 33.814815 | 69 | 0.739321 | 237 | 0.259584 | 0 | 0 | 0 | 0 | 0 | 0 | 616 | 0.674699 |
c4038c43fba700001a9ef9e5ce94db202c34c7bb | 2,247 | py | Python | allennlp/tests/modules/token_embedders/bag_of_word_counts_token_embedder_test.py | urigoren/allennlp | 236e1fd01ca30409cd736625901292609009f5c4 | [
"Apache-2.0"
] | 1 | 2020-03-30T14:07:02.000Z | 2020-03-30T14:07:02.000Z | allennlp/tests/modules/token_embedders/bag_of_word_counts_token_embedder_test.py | urigoren/allennlp | 236e1fd01ca30409cd736625901292609009f5c4 | [
"Apache-2.0"
] | 123 | 2020-04-26T02:41:30.000Z | 2021-08-02T21:18:00.000Z | allennlp/tests/modules/token_embedders/bag_of_word_counts_token_embedder_test.py | urigoren/allennlp | 236e1fd01ca30409cd736625901292609009f5c4 | [
"Apache-2.0"
] | 2 | 2019-12-21T05:58:44.000Z | 2021-08-16T07:41:21.000Z | import numpy as np
import pytest
import torch
from numpy.testing import assert_almost_equal
from allennlp.common.checks import ConfigurationError
from allennlp.common.testing import AllenNlpTestCase
from allennlp.data import Vocabulary
from allennlp.modules.token_embedders import BagOfWordCountsTokenEmbedder
class T... | 44.94 | 93 | 0.696484 | 1,933 | 0.860258 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.008901 |
c404204e3c66a1ac63a04d196c9f1142497f7ef7 | 1,020 | py | Python | dqn/ops.py | khurshedmemon/DQN-UN-TL | 1a981feff66825b6c35aafd08aba29d3c08ed745 | [
"Apache-2.0"
] | 1 | 2021-12-01T15:08:44.000Z | 2021-12-01T15:08:44.000Z | dqn/ops.py | khurshedmemon/DQN-UN-TL | 1a981feff66825b6c35aafd08aba29d3c08ed745 | [
"Apache-2.0"
] | 1 | 2021-12-02T06:09:05.000Z | 2021-12-02T06:09:05.000Z | dqn/ops.py | khurshedmemon/DQN-UN-TL | 1a981feff66825b6c35aafd08aba29d3c08ed745 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
def clipped_error(x):
# Huber loss
try:
return tf.select(tf.abs(x) < 1.0, 0.5 * tf.square(x), tf.abs(x) - 0.5 )
except:
return tf.where(tf.abs(x) < 1.0, 0.5 * tf.square(x), tf.abs(x) - 0.5 )
def linear(input_, output_size, stddev=0.02, bias_star... | 32.903226 | 107 | 0.582353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.121569 |
c40422c343f9bc25ecff00b38032cd67afe03520 | 4,081 | py | Python | cellsium/model/initialization.py | modsim/CellSium | 8c3f4f5ccf84fa5555206d01cc3359c89071dcba | [
"BSD-2-Clause"
] | null | null | null | cellsium/model/initialization.py | modsim/CellSium | 8c3f4f5ccf84fa5555206d01cc3359c89071dcba | [
"BSD-2-Clause"
] | null | null | null | cellsium/model/initialization.py | modsim/CellSium | 8c3f4f5ccf84fa5555206d01cc3359c89071dcba | [
"BSD-2-Clause"
] | 1 | 2021-12-29T23:19:17.000Z | 2021-12-29T23:19:17.000Z | """Cell parameter random initializations."""
from typing import Any, Dict
import numpy as np
from ..parameters import (
Height,
NewCellBendLowerLower,
NewCellBendLowerUpper,
NewCellBendOverallLower,
NewCellBendOverallUpper,
NewCellBendUpperLower,
NewCellBendUpperUpper,
NewCellLength1Me... | 32.133858 | 81 | 0.589561 | 3,391 | 0.830924 | 1,656 | 0.405783 | 2,987 | 0.731928 | 0 | 0 | 285 | 0.069836 |
c4049f3019aff074a372d03e83e2c871a888286d | 7,540 | py | Python | QAOA_MaxClique.py | bernovie/QAOA-MaxClique | 59b795480e019ae19d25ace274bdb86714ed49e2 | [
"MIT"
] | 2 | 2020-06-19T06:58:11.000Z | 2021-05-18T07:17:22.000Z | QAOA_MaxClique.py | bernovie/QAOA-MaxClique | 59b795480e019ae19d25ace274bdb86714ed49e2 | [
"MIT"
] | 1 | 2020-09-21T20:26:46.000Z | 2020-09-21T20:26:46.000Z | QAOA_MaxClique.py | bernovie/QAOA-MaxClique | 59b795480e019ae19d25ace274bdb86714ed49e2 | [
"MIT"
] | 1 | 2020-09-20T12:42:02.000Z | 2020-09-20T12:42:02.000Z | import qiskit
import numpy as np
import matplotlib.pyplot as plt
import json
from graph import *
# Random comment
P =1
def makeCircuit(inbits, outbits):
q = qiskit.QuantumRegister(inbits+outbits)
c = qiskit.ClassicalRegister(inbits+outbits)
qc = qiskit.QuantumCircuit(q, c)
q_input = [q[i] for i in ran... | 31.157025 | 116 | 0.589125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,395 | 0.317639 |
c406c0be47fb741172f1a8941c81701c0d28eb02 | 253 | py | Python | yakut/cmd/file_server/__init__.py | pavel-kirienko/un | 996e64668d8902bd876fab16b64e3361094a674d | [
"MIT"
] | 1 | 2020-12-23T22:59:12.000Z | 2020-12-23T22:59:12.000Z | yakut/cmd/file_server/__init__.py | pavel-kirienko/un | 996e64668d8902bd876fab16b64e3361094a674d | [
"MIT"
] | null | null | null | yakut/cmd/file_server/__init__.py | pavel-kirienko/un | 996e64668d8902bd876fab16b64e3361094a674d | [
"MIT"
] | null | null | null | # Copyright (c) 2021 OpenCyphal
# This software is distributed under the terms of the MIT License.
# Author: Pavel Kirienko <[email protected]>
from ._app_descriptor import AppDescriptor as AppDescriptor
from ._cmd import file_server as file_server
| 36.142857 | 66 | 0.810277 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.56917 |
c407355017835f143ce6a0c84504a53fa41a83ee | 15,959 | py | Python | src/learn_mtfixbmodel.py | ornithos/pytorch-mtds-mocap | 3ec10387d3d897e9a20d789bd4a3782a047519f7 | [
"MIT"
] | 2 | 2022-02-09T17:53:31.000Z | 2022-03-02T11:25:35.000Z | src/learn_mtfixbmodel.py | ornithos/pytorch-mtds-mocap | 3ec10387d3d897e9a20d789bd4a3782a047519f7 | [
"MIT"
] | null | null | null | src/learn_mtfixbmodel.py | ornithos/pytorch-mtds-mocap | 3ec10387d3d897e9a20d789bd4a3782a047519f7 | [
"MIT"
] | null | null | null | """Simple code for training an RNN for motion prediction."""
import os
import sys
import time
import numpy as np
import torch
import torch.optim as optim
from torch.autograd import Variable
import mtfixb_model
import mtfixb_model2
import parseopts
def create_model(args, total_num_batches):
"""Create MT model a... | 33.739958 | 119 | 0.59208 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,431 | 0.277649 |
c408095eb7ab9da191765321215bacfdbf223067 | 11,260 | py | Python | python/tvm/topi/nn/conv2d_transpose.py | ccjoechou/tvm | 779dc51e1332f417fa4c304b595ce76891dfc33a | [
"Apache-2.0"
] | 4 | 2020-04-14T12:31:45.000Z | 2020-11-02T14:20:59.000Z | python/tvm/topi/nn/conv2d_transpose.py | ccjoechou/tvm | 779dc51e1332f417fa4c304b595ce76891dfc33a | [
"Apache-2.0"
] | null | null | null | python/tvm/topi/nn/conv2d_transpose.py | ccjoechou/tvm | 779dc51e1332f417fa4c304b595ce76891dfc33a | [
"Apache-2.0"
] | 1 | 2020-11-02T14:21:45.000Z | 2020-11-02T14:21:45.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.329268 | 99 | 0.653819 | 0 | 0 | 0 | 0 | 1,580 | 0.14032 | 0 | 0 | 5,060 | 0.449378 |
c40810867a32dd051fe382d63b22b8bac17db49f | 91,964 | py | Python | econml/solutions/causal_analysis/_causal_analysis.py | huigangchen/EconML | 9a56d651e2964ebd05144de52f577f9044a22a0b | [
"BSD-3-Clause"
] | 1,846 | 2019-05-06T21:14:19.000Z | 2022-03-31T11:52:21.000Z | econml/solutions/causal_analysis/_causal_analysis.py | cleeway/EconML | fb2d1139f6c271d4b9a24d9c6d122d4d0891afb0 | [
"BSD-3-Clause"
] | 393 | 2019-05-08T00:55:32.000Z | 2022-03-31T14:26:16.000Z | econml/solutions/causal_analysis/_causal_analysis.py | cleeway/EconML | fb2d1139f6c271d4b9a24d9c6d122d4d0891afb0 | [
"BSD-3-Clause"
] | 414 | 2019-05-14T03:51:08.000Z | 2022-03-31T09:32:17.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""Module for assessing causal feature importance."""
import warnings
from collections import OrderedDict, namedtuple
import joblib
import lightgbm as lgb
from numba.core.utils import erase_traceback
import numpy as np
from... | 51.319196 | 119 | 0.603562 | 73,135 | 0.795257 | 0 | 0 | 1,401 | 0.015234 | 0 | 0 | 42,148 | 0.45831 |
c4083724a00de9c5692943d43c6a11f16b96a31e | 1,365 | py | Python | problem solving/mini-max-sum.py | avnoor-488/hackerrank-solutions | b62315549c254d88104b70755e4dfcd43eba59bf | [
"MIT"
] | 1 | 2020-10-01T16:54:52.000Z | 2020-10-01T16:54:52.000Z | problem solving/mini-max-sum.py | avnoor-488/hackerrank-solutions | b62315549c254d88104b70755e4dfcd43eba59bf | [
"MIT"
] | 2 | 2020-10-07T02:22:13.000Z | 2020-10-22T06:15:50.000Z | problem solving/mini-max-sum.py | avnoor-488/hackerrank-solutions | b62315549c254d88104b70755e4dfcd43eba59bf | [
"MIT"
] | 9 | 2020-10-01T12:30:56.000Z | 2020-10-22T06:10:14.000Z | '''
problem--
Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five integers. Then print the respective minimum and maximum values as a single line of two space-separated long integers.
For example, arr=[1,3,5,7,9]. Our minimum sum is 1+3+5+7=16 a... | 24.375 | 242 | 0.710623 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,048 | 0.767766 |
c40b63017932ee0022e50a1cd077dafbac537066 | 4,610 | py | Python | 19/network.py | jcsesznegi/advent-of-code-2017 | 9710e184e092b82aa798076b9ce3915c6e42758d | [
"MIT"
] | 1 | 2020-04-12T17:54:52.000Z | 2020-04-12T17:54:52.000Z | 19/network.py | jcsesznegi/advent-of-code-2017 | 9710e184e092b82aa798076b9ce3915c6e42758d | [
"MIT"
] | null | null | null | 19/network.py | jcsesznegi/advent-of-code-2017 | 9710e184e092b82aa798076b9ce3915c6e42758d | [
"MIT"
] | null | null | null | from pprint import pprint
from enum import Enum
class Direction(Enum):
UP = 'up'
DOWN = 'down'
LEFT = 'left'
RIGHT = 'right'
class Network:
def __init__(self, diagramRows):
self.diagram = self.setDiagram(diagramRows)
self.currentPosition = self.setCurrentPosition()
self.cur... | 37.786885 | 74 | 0.632972 | 4,558 | 0.98872 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.006725 |
c40cb374c8f69dbfb3dd6a423d469c3fd1845232 | 2,639 | py | Python | examples/gan.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | 117 | 2019-07-14T20:39:48.000Z | 2021-10-17T19:16:48.000Z | examples/gan.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | 41 | 2019-12-06T23:56:44.000Z | 2021-08-02T09:13:30.000Z | examples/gan.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | 13 | 2019-09-22T00:46:54.000Z | 2021-04-09T15:53:15.000Z | import argparse
import copy
import torch
from torchvision.datasets import MNIST, CIFAR10
import torchvision.transforms as TF
import torchelie as tch
import torchelie.loss.gan.hinge as gan_loss
from torchelie.recipes.gan import GANRecipe
import torchelie.callbacks as tcb
from torchelie.recipes import Recipe
parser =... | 29.322222 | 84 | 0.61349 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.069344 |
c40ce4ea8967938d11ba63e971d617289f172e0d | 22 | py | Python | Python/SCRIPT PYTHON/Hello.py | guimaraesalves/material-python | d56b6b24ae35a67d394b43cb1ef4420805c7bd9b | [
"MIT"
] | null | null | null | Python/SCRIPT PYTHON/Hello.py | guimaraesalves/material-python | d56b6b24ae35a67d394b43cb1ef4420805c7bd9b | [
"MIT"
] | null | null | null | Python/SCRIPT PYTHON/Hello.py | guimaraesalves/material-python | d56b6b24ae35a67d394b43cb1ef4420805c7bd9b | [
"MIT"
] | null | null | null | print ("Hello Word!")
| 11 | 21 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.590909 |
c40e9360b8918f73e4cf97eef85c363173d03ce0 | 21,719 | py | Python | hs_geo_raster_resource/serialization.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | 1 | 2018-09-17T13:07:29.000Z | 2018-09-17T13:07:29.000Z | hs_geo_raster_resource/serialization.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | 100 | 2017-08-01T23:48:04.000Z | 2018-04-03T13:17:27.000Z | hs_geo_raster_resource/serialization.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | 2 | 2017-07-27T20:41:33.000Z | 2017-07-27T22:40:57.000Z | import xml.sax
import rdflib
from django.db import transaction
from hs_core.serialization import GenericResourceMeta
class RasterResourceMeta(GenericResourceMeta):
"""
Lightweight class for representing metadata of RasterResource instances.
"""
def __init__(self):
super(RasterResourceMeta, s... | 47.215217 | 97 | 0.55776 | 21,594 | 0.994245 | 0 | 0 | 2,033 | 0.093605 | 0 | 0 | 4,285 | 0.197293 |
c410261f2af66c058c52c7122ed945e7bc1bf8e8 | 857 | py | Python | setup.py | mrocklin/pygdf | 2de9407427da9497ebdf8951a12857be0fab31bb | [
"Apache-2.0"
] | 5 | 2019-01-15T12:31:49.000Z | 2021-03-05T21:17:13.000Z | setup.py | mrocklin/pygdf | 2de9407427da9497ebdf8951a12857be0fab31bb | [
"Apache-2.0"
] | 1 | 2019-06-18T20:58:21.000Z | 2019-06-18T20:58:21.000Z | setup.py | mrocklin/pygdf | 2de9407427da9497ebdf8951a12857be0fab31bb | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
import versioneer
packages = ['pygdf',
'pygdf.tests',
]
install_requires = [
'numba',
]
setup(name='pygdf',
description="GPU Dataframe",
version=versioneer.get_version(),
classifiers=[
# "Development Status :: 4 - Beta",
"In... | 24.485714 | 54 | 0.588098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 377 | 0.439907 |
c412a68b17b363d84e8cdaf62f22ff38191fc6e5 | 335 | py | Python | pymarl/envs/__init__.py | twoodford/pymarl | c78e63e54ed772171fbcaea6c55c703cff0e9302 | [
"Apache-2.0"
] | null | null | null | pymarl/envs/__init__.py | twoodford/pymarl | c78e63e54ed772171fbcaea6c55c703cff0e9302 | [
"Apache-2.0"
] | null | null | null | pymarl/envs/__init__.py | twoodford/pymarl | c78e63e54ed772171fbcaea6c55c703cff0e9302 | [
"Apache-2.0"
] | null | null | null | from functools import partial
from .multiagentenv import MultiAgentEnv
import sys
import os
def env_fn(env, **kwargs) -> MultiAgentEnv:
return env(**kwargs)
REGISTRY = {}
#REGISTRY["sc2"] = partial(env_fn, env=StarCraft2Env)
def register_env(nm, env_class):
global REGISTRY
REGISTRY[nm] = partial(env_fn, ... | 22.333333 | 53 | 0.740299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.158209 |
c415cf0f1a05df7a1ed0253bc2693cc05cb80cc0 | 4,938 | py | Python | gumtree_watchdog/db.py | undeadparrot/gumtree-telegram-watchdog | 48db6b37876c520bd5d2e0f9a97e19b04d70e12f | [
"MIT"
] | 1 | 2019-03-04T15:38:01.000Z | 2019-03-04T15:38:01.000Z | gumtree_watchdog/db.py | undeadparrot/gumtree-telegram-watchdog | 48db6b37876c520bd5d2e0f9a97e19b04d70e12f | [
"MIT"
] | null | null | null | gumtree_watchdog/db.py | undeadparrot/gumtree-telegram-watchdog | 48db6b37876c520bd5d2e0f9a97e19b04d70e12f | [
"MIT"
] | null | null | null | import os
import os.path
import sqlite3
import logging
from typing import List
from gumtree_watchdog.types import Listing, Contract, ListingWithChatId
TConn = sqlite3.Connection
DB_PATH = os.environ.get('GUMTREE_DB')
def get_connection() -> TConn:
if not DB_PATH:
raise Exception("Please specify Sqlite3 db... | 28.37931 | 92 | 0.584447 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,636 | 0.533819 |
c4184af48713ebd40a957015c82bc531d4f8d4b7 | 3,601 | py | Python | apps/1d/mhd/shock_tube/this_app_params.py | dcseal/finess | 766e583ae9e84480640c7c3b3c157bf40ab87fe4 | [
"BSD-3-Clause"
] | null | null | null | apps/1d/mhd/shock_tube/this_app_params.py | dcseal/finess | 766e583ae9e84480640c7c3b3c157bf40ab87fe4 | [
"BSD-3-Clause"
] | null | null | null | apps/1d/mhd/shock_tube/this_app_params.py | dcseal/finess | 766e583ae9e84480640c7c3b3c157bf40ab87fe4 | [
"BSD-3-Clause"
] | null | null | null | #section [initial]
def _parameters_accessors_checks():
from finess.params import Parameter, Accessor, Check, \
CheckGreaterEqual, CheckGreaterThan, \
CheckOneOf, EnumParameterType
parameters = []
checks = []
rhol = Parameter(variable_name = "rhol",
... | 31.587719 | 68 | 0.463482 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 450 | 0.124965 |
c418d7e5abef02bb7493320d6cd67da6e01f6114 | 1,142 | py | Python | async-functions.py | cheezyy/python_scripts | 9db713ca085c6f1fd5ec63d79762a470093e028a | [
"MIT"
] | null | null | null | async-functions.py | cheezyy/python_scripts | 9db713ca085c6f1fd5ec63d79762a470093e028a | [
"MIT"
] | null | null | null | async-functions.py | cheezyy/python_scripts | 9db713ca085c6f1fd5ec63d79762a470093e028a | [
"MIT"
] | null | null | null | '''
Chad Meadowcroft
Credit to Sentdex (https://pythonprogramming.net/)
'''
import asyncio
async def find_divisibles(inrange, div_by):
# Define division function with async functionality
print("finding nums in range {} divisible by {}".format(inrange, div_by))
located = []
for i in range(inrange):
... | 29.282051 | 77 | 0.645359 | 0 | 0 | 0 | 0 | 0 | 0 | 790 | 0.691769 | 285 | 0.249562 |
c41996b81d3533341a720d569e52c1e49f5c467b | 1,114 | py | Python | setup.py | jackaraz/ma5_expert | 4d359b5110874c2f44f81e10307bd1ea3f9e20d0 | [
"MIT"
] | 2 | 2021-04-06T08:37:41.000Z | 2022-01-07T09:15:25.000Z | setup.py | jackaraz/ma5_expert | 4d359b5110874c2f44f81e10307bd1ea3f9e20d0 | [
"MIT"
] | null | null | null | setup.py | jackaraz/ma5_expert | 4d359b5110874c2f44f81e10307bd1ea3f9e20d0 | [
"MIT"
] | null | null | null | from setuptools import setup
import os
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
requirements = []
if os.path.isfile("./requirements.txt"):
with open("requirements.txt", "r") as f:
requirements = f.read()
requirements = [x for x in requirements.split("\n") if ... | 29.315789 | 67 | 0.630162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 481 | 0.431777 |
c41a92320c98d0d79eebb92f7c12dfc1830b9325 | 4,977 | py | Python | apitest/api_test/common/auth.py | willhuang1206/apitest | 4b41855710ba8f21788027da83a830f631e11f26 | [
"Apache-2.0"
] | null | null | null | apitest/api_test/common/auth.py | willhuang1206/apitest | 4b41855710ba8f21788027da83a830f631e11f26 | [
"Apache-2.0"
] | 3 | 2020-06-06T01:57:41.000Z | 2021-06-10T22:57:58.000Z | apitest/api_test/common/auth.py | willhuang1206/apitest | 4b41855710ba8f21788027da83a830f631e11f26 | [
"Apache-2.0"
] | null | null | null | from rest_framework.authentication import BaseAuthentication
from rest_framework import exceptions
from rest_framework.parsers import JSONParser
from django.conf import settings
import requests
from api_test.common import MD5
from api_test.models import ProjectMember
from django.contrib.auth.models import User,Group
fr... | 42.905172 | 166 | 0.569821 | 2,369 | 0.46772 | 0 | 0 | 0 | 0 | 0 | 0 | 515 | 0.101678 |
c41b88fc454a463ac7213753efc46174f0522ef0 | 12,745 | py | Python | futu/common/pb/Qot_GetPriceReminder_pb2.py | Hason-Cheung/py-futu-api | caa2f136ee07a2b123c79b2d75bbb524d7873e53 | [
"Apache-2.0"
] | 858 | 2018-11-12T12:54:56.000Z | 2022-03-10T17:35:43.000Z | futu/common/pb/Qot_GetPriceReminder_pb2.py | EricChengg/hongkong-futu-user-investment-report-generater | d450260a107f9e053036c31b05b8290b7b22c237 | [
"Apache-2.0"
] | 113 | 2018-11-12T01:52:31.000Z | 2022-02-27T03:53:07.000Z | futu/common/pb/Qot_GetPriceReminder_pb2.py | EricChengg/hongkong-futu-user-investment-report-generater | d450260a107f9e053036c31b05b8290b7b22c237 | [
"Apache-2.0"
] | 201 | 2018-11-19T08:32:45.000Z | 2022-03-23T06:39:02.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Qot_GetPriceReminder.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflect... | 36.83526 | 1,141 | 0.748764 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,306 | 0.259396 |
c41bd740e3e0dc24d155a81087255bfae49c7719 | 903 | py | Python | leave/models.py | shoaibsaikat/Django-Office-Management | 952aa44c2d3c2f99e91c2ed1aada17ee15fc9eb0 | [
"Apache-2.0"
] | null | null | null | leave/models.py | shoaibsaikat/Django-Office-Management | 952aa44c2d3c2f99e91c2ed1aada17ee15fc9eb0 | [
"Apache-2.0"
] | null | null | null | leave/models.py | shoaibsaikat/Django-Office-Management | 952aa44c2d3c2f99e91c2ed1aada17ee15fc9eb0 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.db.models.deletion import CASCADE
from accounts.models import User
class Leave(models.Model):
title = models.CharField(max_length=255, default='', blank=False)
user = models.ForeignKey(User, on_delete=CASCADE, blank=False, related_name='leaves')
creationDate = mode... | 45.15 | 102 | 0.75526 | 792 | 0.877076 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.032115 |
c41c16df2e1d607a9a0d2aad44ec758217ef96ce | 22,021 | py | Python | svtk/vtk_animation_timer_callback.py | SimLeek/pglsl-neural | 8daaffded197cf7be4432754bc5941f1bca3239c | [
"MIT"
] | 5 | 2018-03-25T23:43:32.000Z | 2019-05-18T10:35:21.000Z | svtk/vtk_animation_timer_callback.py | PyGPAI/PyGPNeural | 8daaffded197cf7be4432754bc5941f1bca3239c | [
"MIT"
] | 11 | 2017-12-24T20:03:16.000Z | 2017-12-26T00:18:34.000Z | svtk/vtk_animation_timer_callback.py | SimLeek/PyGPNeural | 8daaffded197cf7be4432754bc5941f1bca3239c | [
"MIT"
] | null | null | null | import time
import numpy as np
import vtk
from vtk.util import numpy_support
from svtk.lib.toolbox.integer import minmax
from svtk.lib.toolbox.idarray import IdArray
from svtk.lib.toolbox.numpy_helpers import normalize
import math as m
class VTKAnimationTimerCallback(object):
"""This class is called every few m... | 40.629151 | 121 | 0.608374 | 21,780 | 0.989056 | 0 | 0 | 0 | 0 | 0 | 0 | 6,148 | 0.279188 |
c41c57d2fe8c5d4f03096ac847acc8fe35f19ed2 | 3,679 | py | Python | work/ArchitectureSearch.py | jialiasus2/AI-Studio-Contest-Quantum202103 | 350f20b8805e9696cacacc1339e71bf695571e74 | [
"Apache-2.0"
] | null | null | null | work/ArchitectureSearch.py | jialiasus2/AI-Studio-Contest-Quantum202103 | 350f20b8805e9696cacacc1339e71bf695571e74 | [
"Apache-2.0"
] | null | null | null | work/ArchitectureSearch.py | jialiasus2/AI-Studio-Contest-Quantum202103 | 350f20b8805e9696cacacc1339e71bf695571e74 | [
"Apache-2.0"
] | null | null | null | import time
import numpy as np
from tqdm import tqdm
from utils import RandomCNOT, RandomCNOTs
def SimulatedAnnealing(quantum_count, layer_count, solver, epochs=100, save_path=None, global_best_score=0):
#TODO:
best_score = 0
cnot = RandomCNOTs(quantum_count, layer_count)
sc, model = solver(cnot)
... | 38.322917 | 173 | 0.59527 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 576 | 0.152019 |
c41c9ed8f0eeeb7bc96538ff09de8ee1da20fa88 | 4,113 | py | Python | tests/localyaml/test_localyaml.py | sbussetti/jenkins-job-builder | fc63f1439816d9022a2d538614b0b7592f96b454 | [
"Apache-2.0"
] | 1 | 2021-07-30T04:03:53.000Z | 2021-07-30T04:03:53.000Z | tests/localyaml/test_localyaml.py | sbussetti/jenkins-job-builder | fc63f1439816d9022a2d538614b0b7592f96b454 | [
"Apache-2.0"
] | 12 | 2020-05-29T05:33:48.000Z | 2020-09-29T13:02:29.000Z | tests/localyaml/test_localyaml.py | sbussetti/jenkins-job-builder | fc63f1439816d9022a2d538614b0b7592f96b454 | [
"Apache-2.0"
] | 2 | 2020-05-15T08:29:33.000Z | 2020-06-04T07:27:31.000Z | #!/usr/bin/env python
#
# Copyright 2013 Darragh Bailey
#
# 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... | 33.991736 | 87 | 0.699733 | 3,182 | 0.773645 | 0 | 0 | 0 | 0 | 0 | 0 | 1,784 | 0.433747 |
c41dbd4f1116c76a73c6b7f3a90d3a40a1fa6018 | 24,625 | py | Python | seijibot.py | seiji56/bot-tac | b16b8a8a79d6ac2deb0476ab3a9a0e0b136b1d54 | [
"MIT"
] | null | null | null | seijibot.py | seiji56/bot-tac | b16b8a8a79d6ac2deb0476ab3a9a0e0b136b1d54 | [
"MIT"
] | null | null | null | seijibot.py | seiji56/bot-tac | b16b8a8a79d6ac2deb0476ab3a9a0e0b136b1d54 | [
"MIT"
] | null | null | null | from bot_interface import *
import math
class SeijiBot(BotBase):
def __init__(self):
self.initialized = False
def initialize(self, gamestate):
gamestate.log("Initializing...")
#Getting UID
self.uid = gamestate.bot.uid
gamestate.log("This ship has uid " + str(self.ui... | 37.884615 | 608 | 0.496853 | 24,550 | 0.996954 | 0 | 0 | 0 | 0 | 0 | 0 | 2,049 | 0.083208 |
c41f3f30efc1128fe0e35981a452b93b464ce15f | 304 | py | Python | configs/gdrn/ycbvPbrSO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO_09_10PottedMeatCan.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 33 | 2021-12-15T07:11:47.000Z | 2022-03-29T08:58:32.000Z | configs/gdrn/ycbvPbrSO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO_09_10PottedMeatCan.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | 3 | 2021-12-15T11:39:54.000Z | 2022-03-29T07:24:23.000Z | configs/gdrn/ycbvPbrSO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO_09_10PottedMeatCan.py | THU-DA-6D-Pose-Group/self6dpp | c267cfa55e440e212136a5e9940598720fa21d16 | [
"Apache-2.0"
] | null | null | null | _base_ = "./resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO_01_02MasterChefCan.py"
OUTPUT_DIR = (
"output/gdrn/ycbvPbrSO/resnest50d_AugCosyAAEGray_BG05_visib10_mlBCE_DoubleMask_ycbvPbr100e_SO/09_10PottedMeatCan"
)
DATASETS = dict(TRAIN=("ycbv_010_potted_meat_can_train_pbr",))
| 50.666667 | 117 | 0.871711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 245 | 0.805921 |
c41fd9dec58d9f797e213eba1e8064f8aba14576 | 682 | py | Python | days/01-03-datetimes/code/100day_calc.py | rhelmstedter/100daysofcode-with-python-course | 076c99939b5641be541023f61c10ff30a7f05524 | [
"MIT"
] | null | null | null | days/01-03-datetimes/code/100day_calc.py | rhelmstedter/100daysofcode-with-python-course | 076c99939b5641be541023f61c10ff30a7f05524 | [
"MIT"
] | null | null | null | days/01-03-datetimes/code/100day_calc.py | rhelmstedter/100daysofcode-with-python-course | 076c99939b5641be541023f61c10ff30a7f05524 | [
"MIT"
] | null | null | null | from datetime import date, datetime, timedelta
import time
START_DATE = date(2021, 5, 25)
duration = timedelta(days=100)
def countdown():
event_delta = LAST_DAY_OF_SCHOOL - datetime.now()
print()
print("\tTime until school is out for summer 2021:", end="\n\n")
while event_delta.seconds > 0:
h... | 32.47619 | 104 | 0.668622 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.247801 |
c42001c4593f0af28c9a44cdd561459d12ab258c | 195 | py | Python | output/copilot/python/timeout/palindrome-partitioning.py | nhtnhan/CMPUT663-copilot-eval | 896711d006eb37a78e010cd1b9f79dc285ad054d | [
"Apache-2.0"
] | null | null | null | output/copilot/python/timeout/palindrome-partitioning.py | nhtnhan/CMPUT663-copilot-eval | 896711d006eb37a78e010cd1b9f79dc285ad054d | [
"Apache-2.0"
] | null | null | null | output/copilot/python/timeout/palindrome-partitioning.py | nhtnhan/CMPUT663-copilot-eval | 896711d006eb37a78e010cd1b9f79dc285ad054d | [
"Apache-2.0"
] | null | null | null | # https://leetcode.com/problems/palindrome-partitioning/
class Solution(object):
def partition(self, s):
"""
:type s: str
:rtype: List[List[str]]
"""
| 21.666667 | 56 | 0.54359 | 128 | 0.65641 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.635897 |
c42012e1044d2e28166a8361142bd8a07f4789f3 | 6,071 | py | Python | aggregathor/ea_datasource.py | big-data-lab-umbc/autodist | c8514b27cf5608f35254b63c4ac8093c7295a8e7 | [
"Apache-2.0"
] | null | null | null | aggregathor/ea_datasource.py | big-data-lab-umbc/autodist | c8514b27cf5608f35254b63c4ac8093c7295a8e7 | [
"Apache-2.0"
] | null | null | null | aggregathor/ea_datasource.py | big-data-lab-umbc/autodist | c8514b27cf5608f35254b63c4ac8093c7295a8e7 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import keras
import random
from keras.datasets import mnist
from keras import backend as K
K.set_floatx('float64')
class DataSource(object):
def __init__(self):
raise NotImplementedError()
def partitioned_by_rows(self, num_workers, test_reserve=.3):
raise NotImplementedError(... | 43.056738 | 135 | 0.653434 | 5,472 | 0.901334 | 0 | 0 | 0 | 0 | 0 | 0 | 864 | 0.142316 |
c42094cad42afee256fee1fad8338f794ac45419 | 255 | py | Python | proxySTAR_V3/certbot/venv/lib/python2.7/site-packages/pylint/test/functional/pygtk_enum_crash.py | mami-project/lurk | 98c293251e9b1e9c9a4b02789486c5ddaf46ba3c | [
"Apache-2.0"
] | 2 | 2017-07-05T09:57:33.000Z | 2017-11-14T23:05:53.000Z | Libraries/Python/pylint/v1.4.4/pylint/test/functional/pygtk_enum_crash.py | davidbrownell/Common_Environment | 4015872aeac8d5da30a6aa7940e1035a6aa6a75d | [
"BSL-1.0"
] | 1 | 2019-01-17T14:26:22.000Z | 2019-01-17T22:56:26.000Z | Libraries/Python/pylint/v1.4.4/pylint/test/functional/pygtk_enum_crash.py | davidbrownell/Common_Environment | 4015872aeac8d5da30a6aa7940e1035a6aa6a75d | [
"BSL-1.0"
] | 1 | 2017-08-31T14:33:03.000Z | 2017-08-31T14:33:03.000Z | # pylint: disable=C0121
"""http://www.logilab.org/ticket/124337"""
import gtk
def print_some_constant(arg=gtk.BUTTONS_OK):
"""crash because gtk.BUTTONS_OK, a gtk enum type, is returned by
astroid as a constant
"""
print(arg)
| 21.25 | 69 | 0.662745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.65098 |
c4231b8d3eab02f60fcc36025477bf600813aa38 | 1,519 | py | Python | py_at/OrderItem.py | kanghua309/at_py | 8fa7943a9de52cd81d235f06b57a25aa07fb715b | [
"Apache-2.0"
] | null | null | null | py_at/OrderItem.py | kanghua309/at_py | 8fa7943a9de52cd81d235f06b57a25aa07fb715b | [
"Apache-2.0"
] | null | null | null | py_at/OrderItem.py | kanghua309/at_py | 8fa7943a9de52cd81d235f06b57a25aa07fb715b | [
"Apache-2.0"
] | 2 | 2018-09-19T16:07:26.000Z | 2019-11-09T15:46:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = ''
__author__ = 'HaiFeng'
__mtime__ = '2016/8/16'
"""
import time
from py_at.EnumDefine import *
########################################################################
class OrderItem(object):
"""策略信号"""
#----------------------------------------------... | 26.649123 | 142 | 0.578012 | 1,301 | 0.847557 | 0 | 0 | 0 | 0 | 0 | 0 | 528 | 0.343974 |
c4246529ebfd4899aa1216798277f3b74d90b3f5 | 547 | py | Python | pyscf/nao/m_rf_den.py | mfkasim1/pyscf | 7be5e015b2b40181755c71d888449db936604660 | [
"Apache-2.0"
] | 3 | 2021-02-28T00:52:53.000Z | 2021-03-01T06:23:33.000Z | pyscf/nao/m_rf_den.py | mfkasim1/pyscf | 7be5e015b2b40181755c71d888449db936604660 | [
"Apache-2.0"
] | 36 | 2018-08-22T19:44:03.000Z | 2020-05-09T10:02:36.000Z | pyscf/nao/m_rf_den.py | mfkasim1/pyscf | 7be5e015b2b40181755c71d888449db936604660 | [
"Apache-2.0"
] | 4 | 2018-02-14T16:28:28.000Z | 2019-08-12T16:40:30.000Z | from __future__ import print_function, division
import numpy as np
from numpy import identity, dot, zeros, zeros_like
def rf_den_via_rf0(self, rf0, v):
""" Whole matrix of the interacting response via non-interacting response and interaction"""
rf = zeros_like(rf0)
I = identity(rf0.shape[1])
for ir,r in enume... | 28.789474 | 94 | 0.718464 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.272395 |
c4253c3edd906a40552637d516df1601047e0dd5 | 669 | py | Python | app/model/compare_users.py | dwdraugr/YADS | c8036d8196a3158636aaa4f1910033e70ec8ecb4 | [
"Apache-2.0"
] | 3 | 2019-09-02T11:26:58.000Z | 2019-12-06T15:54:38.000Z | app/model/compare_users.py | dwdraugr/YADS | c8036d8196a3158636aaa4f1910033e70ec8ecb4 | [
"Apache-2.0"
] | null | null | null | app/model/compare_users.py | dwdraugr/YADS | c8036d8196a3158636aaa4f1910033e70ec8ecb4 | [
"Apache-2.0"
] | null | null | null | from app.model.model import Model
class CompareUsers(Model):
def get_compare_users(self, uid):
cursor = self.matchadb.cursor()
cursor.execute('SELECT whomid FROM likes WHERE whoid = %s', (uid,))
whomids = [item[0] for item in cursor.fetchall()]
if len(whomids) == 0:
rai... | 35.210526 | 75 | 0.560538 | 632 | 0.944694 | 0 | 0 | 0 | 0 | 0 | 0 | 121 | 0.180867 |
c425a0389a78978ea2d9dbb437a26224ad54fcc9 | 9,004 | py | Python | venv/Lib/site-packages/sklearn/ensemble/_hist_gradient_boosting/tests/test_histogram.py | mokshagna517/recommendation_sys | bc8ced225dff3c93d619ff5da363f42d0aa0676c | [
"MIT"
] | 25 | 2019-03-08T01:03:03.000Z | 2022-02-14T17:38:32.000Z | venv/Lib/site-packages/sklearn/ensemble/_hist_gradient_boosting/tests/test_histogram.py | mokshagna517/recommendation_sys | bc8ced225dff3c93d619ff5da363f42d0aa0676c | [
"MIT"
] | 9 | 2020-09-25T22:32:02.000Z | 2022-02-09T23:45:10.000Z | venv/Lib/site-packages/sklearn/ensemble/_hist_gradient_boosting/tests/test_histogram.py | mokshagna517/recommendation_sys | bc8ced225dff3c93d619ff5da363f42d0aa0676c | [
"MIT"
] | 31 | 2019-01-15T20:16:50.000Z | 2022-03-01T05:47:38.000Z | import numpy as np
import pytest
from numpy.testing import assert_allclose
from numpy.testing import assert_array_equal
from sklearn.ensemble._hist_gradient_boosting.histogram import (
_build_histogram_naive,
_build_histogram,
_build_histogram_no_hessian,
_build_histogram_root_no_hessian,
_build_h... | 44.35468 | 79 | 0.691804 | 0 | 0 | 0 | 0 | 6,359 | 0.706242 | 0 | 0 | 729 | 0.080964 |
c425a78347ab246234b9b4acc34bdb1ab5a3665b | 349 | py | Python | dgpolygon/gmappolygons/urls.py | mariohmol/django-google-polygon | 9d9448e540a4d100d925d7170425143f126e2174 | [
"MIT"
] | 1 | 2018-04-28T17:06:23.000Z | 2018-04-28T17:06:23.000Z | dgpolygon/gmappolygons/urls.py | mariohmol/django-google-polygon | 9d9448e540a4d100d925d7170425143f126e2174 | [
"MIT"
] | null | null | null | dgpolygon/gmappolygons/urls.py | mariohmol/django-google-polygon | 9d9448e540a4d100d925d7170425143f126e2174 | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, include, url
from django.contrib import admin
from gmappolygons import views
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
url(r'^search', views.search, name='search'),
url(r'^submit/$', views.submit, name='submit'),
url(r'^show/(?P<area_id>\d+)/',... | 31.727273 | 60 | 0.673352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.240688 |
c4263856e2d9e9e21750aa2037ab8e37b21086eb | 2,407 | py | Python | apps/user/models.py | mrf-foundation/ckios_v1 | 3556a99ba5e01f00e137fd124903ace77d2cba28 | [
"Apache-2.0"
] | null | null | null | apps/user/models.py | mrf-foundation/ckios_v1 | 3556a99ba5e01f00e137fd124903ace77d2cba28 | [
"Apache-2.0"
] | null | null | null | apps/user/models.py | mrf-foundation/ckios_v1 | 3556a99ba5e01f00e137fd124903ace77d2cba28 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django import forms
from django.contrib.auth.models import User
from PIL import Image
from django.utils.timezone import now
class Profile(models.Model):
user = models.OneToOneField(User, null=True, blank=True, on_delete=models.CASCADE)
image = models.ImageField(upload_to="up... | 44.574074 | 103 | 0.658912 | 2,218 | 0.921479 | 0 | 0 | 0 | 0 | 0 | 0 | 602 | 0.250104 |
c429c3cef7b7daf43f4b36c099ac1e6ca683a4ff | 19,880 | py | Python | slt/chmm/train.py | paper-submit-account/Sparse-CHMM | 8a33dfe375a012cc0cc3324907135b74606a7b5d | [
"Apache-2.0"
] | null | null | null | slt/chmm/train.py | paper-submit-account/Sparse-CHMM | 8a33dfe375a012cc0cc3324907135b74606a7b5d | [
"Apache-2.0"
] | null | null | null | slt/chmm/train.py | paper-submit-account/Sparse-CHMM | 8a33dfe375a012cc0cc3324907135b74606a7b5d | [
"Apache-2.0"
] | null | null | null | import os
import logging
import numpy as np
from typing import Optional
import torch
from torch.utils.data import DataLoader
from ..eval import Metric
from .dataset import CHMMBaseDataset
from .dataset import collate_fn as default_collate_fn
logger = logging.getLogger(__name__)
OUT_RECALL = 0.9
OUT_PRECISION = 0.8
... | 38.452611 | 118 | 0.604326 | 13,235 | 0.665744 | 0 | 0 | 1,678 | 0.084406 | 0 | 0 | 5,679 | 0.285664 |
c42c480ac786f98d925a893f66e8658af5b8de1c | 6,881 | py | Python | flask_obfuscateids/lib.py | mlenzen/flask-obfuscateids | 22319633b2685f2969bd67eae3fd09d2db6567f1 | [
"BSD-3-Clause"
] | null | null | null | flask_obfuscateids/lib.py | mlenzen/flask-obfuscateids | 22319633b2685f2969bd67eae3fd09d2db6567f1 | [
"BSD-3-Clause"
] | 1 | 2015-01-26T06:23:12.000Z | 2015-01-26T06:23:12.000Z | flask_obfuscateids/lib.py | mlenzen/flask-obfuscateids | 22319633b2685f2969bd67eae3fd09d2db6567f1 | [
"BSD-3-Clause"
] | null | null | null |
from random import Random
from collections_extended import setlist
# The version of seeding to use for random
SEED_VERSION = 2
# Common alphabets to use
ALPHANUM = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
def shuffle(key... | 30.312775 | 98 | 0.748874 | 1,402 | 0.203749 | 416 | 0.060456 | 0 | 0 | 0 | 0 | 3,031 | 0.440488 |
c42c74470081e712e5a554684e5bb789162adcd2 | 377 | py | Python | lib/response.py | dpla/akara | 432f14782152dd19931bdbd8f9fad19b5932426d | [
"Apache-2.0"
] | 5 | 2015-01-30T03:50:37.000Z | 2015-09-23T00:46:11.000Z | lib/response.py | dpla/akara | 432f14782152dd19931bdbd8f9fad19b5932426d | [
"Apache-2.0"
] | null | null | null | lib/response.py | dpla/akara | 432f14782152dd19931bdbd8f9fad19b5932426d | [
"Apache-2.0"
] | 3 | 2015-03-09T19:16:56.000Z | 2019-09-19T02:41:29.000Z | """Information for the outgoing response
code - the HTTP response code (default is "200 Ok")
headers - a list of key/value pairs used for the WSGI start_response
"""
code = None
headers = []
def add_header(key, value):
"""Helper function to append (key, value) to the list of response headers"""
headers.... | 23.5625 | 80 | 0.700265 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.740053 |
c42d5c2686fc626989593bdff74f807903b98683 | 1,594 | py | Python | parte 3/desafio93.py | BrunoSoares-DEV/Exercicios-python | fcfd0a7b3e2c6af2b7dd8e5a15ca6585c97f7c67 | [
"MIT"
] | 2 | 2021-02-24T20:05:24.000Z | 2021-02-24T20:05:41.000Z | parte 3/desafio93.py | BrunoSoares-DEV/Exercicios-python | fcfd0a7b3e2c6af2b7dd8e5a15ca6585c97f7c67 | [
"MIT"
] | null | null | null | parte 3/desafio93.py | BrunoSoares-DEV/Exercicios-python | fcfd0a7b3e2c6af2b7dd8e5a15ca6585c97f7c67 | [
"MIT"
] | null | null | null | jog = {}
#pegando dados
jog['Nome do jogador'] = str(input('Digite o nome do jogador: ')).strip().title()
jog['Total partidas'] = int(input('Quantas partidas jogou: '))
#lista de gol
gols = []
#Quantos gols em cada partida
for i in range(0, jog['Total partidas']):
gols.append(int(input(f'Quantos gols na partida ... | 37.952381 | 161 | 0.717064 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,317 | 0.820561 |
c42d617d9e6dd57810d5d84da656ddd4e8d82bf1 | 5,891 | py | Python | b2sdk/v1/account_info.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/v1/account_info.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | b2sdk/v1/account_info.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | ######################################################################
#
# File: b2sdk/v1/account_info.py
#
# Copyright 2021 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
from abc import abstractmeth... | 30.523316 | 186 | 0.636904 | 5,127 | 0.870311 | 0 | 0 | 1,873 | 0.317943 | 0 | 0 | 2,019 | 0.342726 |
c42ddcb403bc1b33c57898bd141f1f505a69b04f | 9,539 | py | Python | src/pyrin/security/hashing/handlers/pbkdf2.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | src/pyrin/security/hashing/handlers/pbkdf2.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | src/pyrin/security/hashing/handlers/pbkdf2.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pbkdf2 hashing handler module.
"""
import hashlib
import re
import pyrin.configuration.services as config_services
import pyrin.security.utils.services as security_utils_services
from pyrin.security.hashing.decorators import hashing
from pyrin.security.hashing.handlers.base import Hashing... | 39.094262 | 93 | 0.588636 | 9,040 | 0.947688 | 0 | 0 | 9,051 | 0.948842 | 0 | 0 | 5,117 | 0.536429 |
c42e18634a20b6733cded46ea5994450f7ae4da0 | 8,652 | py | Python | src/steps/prepare_ner_data.py | allanwright/media-classifier | a0da0799cc0bd6ef7360012c362f9fab273286c6 | [
"MIT"
] | 2 | 2019-08-16T00:49:27.000Z | 2021-08-15T16:37:45.000Z | src/steps/prepare_ner_data.py | allanwright/media-classifier | a0da0799cc0bd6ef7360012c362f9fab273286c6 | [
"MIT"
] | 1 | 2020-02-19T10:17:56.000Z | 2020-07-26T09:42:49.000Z | src/steps/prepare_ner_data.py | allanwright/media-classifier | a0da0799cc0bd6ef7360012c362f9fab273286c6 | [
"MIT"
] | 1 | 2019-06-27T10:57:07.000Z | 2019-06-27T10:57:07.000Z | '''Defines a pipeline step which prepares training and test data for
named entity recognition.
'''
import ast
import json
import pickle
from mccore import EntityRecognizer
from mccore import ner
from mccore import persistence
import pandas as pd
from sklearn.utils import resample
from src.step import Step
class Pr... | 36.05 | 98 | 0.496417 | 8,340 | 0.963828 | 0 | 0 | 0 | 0 | 0 | 0 | 2,014 | 0.232752 |
c42e658ca9b791acfc8cc494fe87a5ee5b2f994f | 1,006 | py | Python | jubakit/test/__init__.py | vishalbelsare/jubakit | f6252ba627ce4e2e42eb9aafaaf05c882bc1c678 | [
"MIT"
] | 12 | 2016-04-11T04:49:08.000Z | 2019-02-08T01:43:46.000Z | jubakit/test/__init__.py | vishalbelsare/jubakit | f6252ba627ce4e2e42eb9aafaaf05c882bc1c678 | [
"MIT"
] | 138 | 2016-04-11T05:57:48.000Z | 2020-09-26T03:09:31.000Z | jubakit/test/__init__.py | vishalbelsare/jubakit | f6252ba627ce4e2e42eb9aafaaf05c882bc1c678 | [
"MIT"
] | 10 | 2016-04-11T03:18:45.000Z | 2018-04-14T10:11:15.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
__all__ = ['requireSklearn']
from jubakit.compat import PYTHON3
try:
import embedded_jubatus
embedded_available = True
except ImportError:
embedded_available = False
try:
import numpy
import scipy
... | 26.473684 | 82 | 0.777336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.109344 |
c42e88219fc65a0c84a4b46fac98f1c167ea84ef | 9,859 | py | Python | YoLo2Net.py | zhouyc2002/yolo2-cntk | 549cb46365d1750031eee90044b6262f9b94ff49 | [
"Apache-2.0"
] | 3 | 2017-07-27T00:05:39.000Z | 2021-02-25T08:56:10.000Z | YoLo2Net.py | zhouyc2002/yolo2-cntk | 549cb46365d1750031eee90044b6262f9b94ff49 | [
"Apache-2.0"
] | 1 | 2019-08-05T12:55:06.000Z | 2019-08-06T00:43:58.000Z | YoLo2Net.py | zhouyc2002/yolo2-cntk | 549cb46365d1750031eee90044b6262f9b94ff49 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 28 13:03:05 2017
@author: ZHOU Yuncheng
"""
import cntk as C
import _cntk_py
import cntk.layers
import cntk.initializer
import cntk.losses
import cntk.metrics
import cntk.logging
import cntk.io.transforms as xforms
import cntk.io
import cntk.train
import os
import numpy ... | 39.436 | 171 | 0.647733 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,602 | 0.162491 |
c42f5f63c17465e80eb4449fa0bfca6ef5e47655 | 948 | py | Python | hqq_tool/rongcloud/demo.py | yaoruda/DRFLearning | 6b17ef0d557142e8563d80788351f8b7ab94f248 | [
"MIT"
] | 1 | 2018-09-21T09:42:02.000Z | 2018-09-21T09:42:02.000Z | hqq_tool/rongcloud/demo.py | yaoruda/DRFLearning | 6b17ef0d557142e8563d80788351f8b7ab94f248 | [
"MIT"
] | null | null | null | hqq_tool/rongcloud/demo.py | yaoruda/DRFLearning | 6b17ef0d557142e8563d80788351f8b7ab94f248 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# __author__= "Ruda"
# Date: 2018/10/16
'''
import os
from rongcloud import RongCloud
app_key = os.environ['APP_KEY']
app_secret = os.environ['APP_SECRET']
rcloud = RongCloud(app_key, app_secret)
r = rcloud.User.getToken(userId='userid1', name='username', portraitUri='http://www.rongcloud.c... | 27.085714 | 143 | 0.679325 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 943 | 0.994726 |
c4311123dd5258af551865a612948896d2a1bbc9 | 2,132 | py | Python | registration/email.py | openstack-kr/openinfradays-2018 | 9eb0e284ab95e177dc4acca17d63ccbdaff67fb1 | [
"Apache-2.0"
] | null | null | null | registration/email.py | openstack-kr/openinfradays-2018 | 9eb0e284ab95e177dc4acca17d63ccbdaff67fb1 | [
"Apache-2.0"
] | 1 | 2018-06-17T02:21:41.000Z | 2018-06-17T02:21:41.000Z | registration/email.py | openstack-kr/openinfradays-2018 | 9eb0e284ab95e177dc4acca17d63ccbdaff67fb1 | [
"Apache-2.0"
] | 1 | 2018-05-31T11:39:02.000Z | 2018-05-31T11:39:02.000Z | from django.core.mail import EmailMessage
from django.conf import settings
def send_email(name, date, email):
txt = """
<html>
<body>
<table cellpadding='0' cellspacing='0' width='100%' border='0'>
<tbody>
<tr>
<td style='word-wrap:break-word;font-size:0px;padding:0px;padding-bottom:10px' alig... | 38.071429 | 147 | 0.60272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,927 | 0.880713 |
c431a581714f033cba2ab3f52062e3fdddf8f0b8 | 5,767 | py | Python | train_ema.py | qym7/WTALFakeLabels | 139738025ab69f287c4fe3c97389a637f1a0b376 | [
"MIT"
] | 3 | 2021-12-24T09:27:42.000Z | 2022-01-03T10:59:47.000Z | train_ema.py | qym7/WTALFakeLabels | 139738025ab69f287c4fe3c97389a637f1a0b376 | [
"MIT"
] | 1 | 2021-12-26T02:40:40.000Z | 2021-12-26T02:50:26.000Z | train_ema.py | qym7/WTALFakeLabels | 139738025ab69f287c4fe3c97389a637f1a0b376 | [
"MIT"
] | null | null | null | '''
Author: your name
Date: 2021-12-25 17:33:51
LastEditTime: 2021-12-29 10:10:14
LastEditors: Please set LastEditors
Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
FilePath: /yimingqin/code/WTAL-Uncertainty-Modeling/train.py
'''
import torch
import torch.nn a... | 38.704698 | 106 | 0.602393 | 2,945 | 0.508899 | 0 | 0 | 0 | 0 | 0 | 0 | 1,567 | 0.270779 |
c43395c47fe6f6295740535434326b1a38c6e0c8 | 3,597 | py | Python | scan/fetchers/cli/cli_fetch_oteps_lxb.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/fetchers/cli/cli_fetch_oteps_lxb.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/fetchers/cli/cli_fetch_oteps_lxb.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 43.865854 | 79 | 0.512093 | 2,773 | 0.77092 | 0 | 0 | 0 | 0 | 0 | 0 | 1,449 | 0.402836 |
c433cd175dc051909207a6a2031e2dac3b9eff92 | 612 | py | Python | appengine_config.py | ioriwitte/datavocab | 5f99c679a23a164ab93ac1bcaf9a30a01728ee37 | [
"Apache-2.0"
] | 13 | 2019-12-03T15:25:55.000Z | 2021-10-16T00:18:47.000Z | appengine_config.py | jesman/schemaorg | 6649c41e56a9724eaeed25dedf67736258f922bf | [
"Apache-2.0"
] | 11 | 2019-10-16T12:34:11.000Z | 2021-02-04T11:23:03.000Z | appengine_config.py | jesman/schemaorg | 6649c41e56a9724eaeed25dedf67736258f922bf | [
"Apache-2.0"
] | 9 | 2017-12-13T08:07:48.000Z | 2019-06-18T14:30:12.000Z | """`appengine_config` gets loaded when starting a new application instance."""
import vendor
# insert `lib` as a site directory so our `main` module can load
# third-party libraries, and override built-ins with newer
# versions.
vendor.add('lib')
import os
# Called only if the current namespace is not set.
def namespa... | 38.25 | 78 | 0.756536 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 379 | 0.619281 |
c433ed35cefab756913c6887caed7bdb03a9f9e5 | 270 | py | Python | 10_KNN_3D/main.py | ManMohan291/PyProgram | edcaa927bd70676bd14355acad7262ae2d32b8e5 | [
"MIT"
] | 2 | 2018-09-07T17:44:54.000Z | 2018-09-07T17:44:57.000Z | 10_KNN_3D/main.py | ManMohan291/PyProgram | edcaa927bd70676bd14355acad7262ae2d32b8e5 | [
"MIT"
] | null | null | null | 10_KNN_3D/main.py | ManMohan291/PyProgram | edcaa927bd70676bd14355acad7262ae2d32b8e5 | [
"MIT"
] | null | null | null |
import KNN as K
K.clearScreen()
dataTraining= K.loadData("dataTraining.txt")
X=dataTraining[:,0:3]
initial_centroids=K.listToArray([[3, 3,3],[6, 2,4],[8,5,7]])
idx=K.KMean_Run(X,initial_centroids,5)
K.SaveData(K.concatenateVectors(X,idx))
K.plotKNN2(X,idx)
| 12.272727 | 60 | 0.703704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.066667 |
c434ee7e49ec7f84e8ed989b7259f62a6d292fde | 3,793 | py | Python | hummingbird/graphics/state_plotbox.py | don4get/hummingbird | ec9da37b74f17702201f475d79b842f41694c095 | [
"MIT"
] | null | null | null | hummingbird/graphics/state_plotbox.py | don4get/hummingbird | ec9da37b74f17702201f475d79b842f41694c095 | [
"MIT"
] | null | null | null | hummingbird/graphics/state_plotbox.py | don4get/hummingbird | ec9da37b74f17702201f475d79b842f41694c095 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pyqtgraph as pg
from pyqtgraph import ViewBox
from hummingbird.graphics.plotter_args import PlotBoxArgs
from hummingbird.graphics.state_plot import StatePlot
class StatePlotBox:
def __init__(self, window, args):
""" Create a new plotbox wrapper object
Arguments:
... | 35.12037 | 108 | 0.627472 | 3,603 | 0.949908 | 0 | 0 | 0 | 0 | 0 | 0 | 842 | 0.221988 |
c4355d1898179dbc210d3d0618bca78d79edd5b7 | 348 | py | Python | quizapp/jsonify_quiz_output.py | malgulam/100ProjectsOfCode | 95026b15d858a6e97dfd847c5ec576bbc260ff61 | [
"MIT"
] | 8 | 2020-12-13T16:15:34.000Z | 2021-11-13T22:45:28.000Z | quizapp/jsonify_quiz_output.py | malgulam/100ProjectsOfCode | 95026b15d858a6e97dfd847c5ec576bbc260ff61 | [
"MIT"
] | 1 | 2021-06-02T03:42:39.000Z | 2021-06-02T03:42:39.000Z | quizapp/jsonify_quiz_output.py | malgulam/100ProjectsOfCode | 95026b15d858a6e97dfd847c5ec576bbc260ff61 | [
"MIT"
] | 1 | 2020-12-14T20:01:14.000Z | 2020-12-14T20:01:14.000Z | import json
#start
print('start')
with open('quizoutput.txt') as f:
lines = f.readlines()
print('loaded quiz data')
print('changing to json')
json_output = json.loads(lines[0])
print(json_output)
with open('quizoutput.txt', 'w') as f:
f.write(json_output)
# for item in json_output:
# print(item['ques... | 19.333333 | 38 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 158 | 0.454023 |