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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4013520787f6cc9bbf08df7635faa9848889aff8 | 13,500 | py | Python | onemsdk/parser/tag.py | mvnm/onemsdk | d6293c632d15af3b044f130343899d3b242e287a | [
"MIT"
] | null | null | null | onemsdk/parser/tag.py | mvnm/onemsdk | d6293c632d15af3b044f130343899d3b242e287a | [
"MIT"
] | 6 | 2019-07-05T07:54:03.000Z | 2019-09-30T10:47:10.000Z | onemsdk/parser/tag.py | mvnm/onemsdk | d6293c632d15af3b044f130343899d3b242e287a | [
"MIT"
] | 2 | 2019-08-30T07:36:48.000Z | 2020-01-13T01:40:06.000Z | import inspect
import sys
from abc import ABC, abstractmethod
from enum import Enum
from typing import List, Union, Type, Optional, Dict, Any
from pydantic import BaseModel
from onemsdk.exceptions import NodeTagMismatchException, ONEmSDKException
from .node import Node
__all__ = ['Tag', 'HeaderTag', 'FooterTag', 'Br... | 28.421053 | 91 | 0.605333 | 12,177 | 0.902 | 0 | 0 | 3,476 | 0.257481 | 0 | 0 | 1,864 | 0.138074 |
4014970fe4ab56a4d4e3af8b117a8432e328801e | 12,113 | py | Python | backend/syntax/rule.py | austinmarsray/Ccompiler | b3ef61283e33d06294c491b71586a945c38c6e54 | [
"MIT"
] | null | null | null | backend/syntax/rule.py | austinmarsray/Ccompiler | b3ef61283e33d06294c491b71586a945c38c6e54 | [
"MIT"
] | null | null | null | backend/syntax/rule.py | austinmarsray/Ccompiler | b3ef61283e33d06294c491b71586a945c38c6e54 | [
"MIT"
] | null | null | null | class Sign:
"""
符号
"""
def __init__(self, sign_type, sign_str='', sign_line=-1):
"""
构造
:param sign_type: 符号的类型
:param sign_str: 符号的内容(可以为空)
:param sign_line: 符号所在行数(可以为空)
"""
self.type = sign_type
self.str = sign_str
self.line = si... | 29.834975 | 103 | 0.536366 | 2,883 | 0.232088 | 0 | 0 | 0 | 0 | 0 | 0 | 8,035 | 0.646836 |
4015db6712f5e331d7a0bca4b41018047675a6cf | 24,566 | py | Python | redash/models.py | slachiewicz/redash | 84d95272f31885be00fbeef0cdbf6ddae6037f5d | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-06-27T07:40:51.000Z | 2019-06-27T07:40:51.000Z | redash/models.py | slachiewicz/redash | 84d95272f31885be00fbeef0cdbf6ddae6037f5d | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2021-03-20T05:38:23.000Z | 2021-03-20T05:38:23.000Z | redash/models.py | slachiewicz/redash | 84d95272f31885be00fbeef0cdbf6ddae6037f5d | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import json
import hashlib
import logging
import os
import threading
import time
import datetime
import itertools
import peewee
from passlib.apps import custom_app_context as pwd_context
from playhouse.postgres_ext import ArrayField, DateTimeTZField, PostgresqlExtDatabase
from flask.ext.login import UserMixin, Anonymo... | 33.790922 | 121 | 0.620492 | 22,373 | 0.91073 | 0 | 0 | 6,619 | 0.269437 | 0 | 0 | 2,856 | 0.116258 |
40163fa4a642e9716f853bee7c3624573ecfac17 | 10,112 | py | Python | xclib/classifier/ova.py | sushantsondhi/pyxclib | ecdfab6b72f9a02892eee617f45bef73c928ca81 | [
"MIT"
] | 4 | 2019-07-11T14:43:22.000Z | 2019-08-08T19:12:53.000Z | xclib/classifier/ova.py | kunaldahiya/xclib | b40e4dd49533ac78231a12f8af362e7f8c6f5df2 | [
"MIT"
] | null | null | null | xclib/classifier/ova.py | kunaldahiya/xclib | b40e4dd49533ac78231a12f8af362e7f8c6f5df2 | [
"MIT"
] | null | null | null | import numpy as np
import time
import logging
from .base import BaseClassifier
import scipy.sparse as sp
from ._svm import train_one
from functools import partial
from ..utils import sparse
from ..data import data_loader
from ._svm import train_one, _get_liblinear_solver_type
from joblib import Parallel, delayed
from .... | 37.313653 | 79 | 0.598497 | 9,461 | 0.935621 | 0 | 0 | 129 | 0.012757 | 0 | 0 | 4,037 | 0.399229 |
40179a2e52133e978bed3c8e59ac4742ba5dae20 | 6,555 | py | Python | ipgroup_test.py | RyPeck/python-ipgroup | 8fb1037d886a52127e7231f051403396dcb4dc60 | [
"Apache-2.0"
] | 1 | 2015-01-10T18:34:51.000Z | 2015-01-10T18:34:51.000Z | ipgroup_test.py | RyPeck/python-ipgroup | 8fb1037d886a52127e7231f051403396dcb4dc60 | [
"Apache-2.0"
] | null | null | null | ipgroup_test.py | RyPeck/python-ipgroup | 8fb1037d886a52127e7231f051403396dcb4dc60 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import ipaddress
import random
import unittest
import ipgroup
class TestGroupIPs(unittest.TestCase):
def setUp(self):
pass
def test_group(self):
IPs = ["127.0.0.1",
"127.0.1.1",
"127.1.1.1",
"127.1.0.1",
"127... | 31.666667 | 79 | 0.438139 | 6,413 | 0.978337 | 0 | 0 | 0 | 0 | 0 | 0 | 1,670 | 0.254767 |
4017c147f527555c7fa69c7bf75c0f142e6a0a28 | 2,566 | py | Python | progress.py | PsiLupan/calcprogress | 05b77e1eedb7726c34f545e10837283e2a1c6180 | [
"MIT"
] | 2 | 2022-03-07T06:41:35.000Z | 2022-03-11T04:26:40.000Z | progress.py | PsiLupan/calcprogress | 05b77e1eedb7726c34f545e10837283e2a1c6180 | [
"MIT"
] | 1 | 2022-02-22T02:08:06.000Z | 2022-02-22T02:08:06.000Z | progress.py | PsiLupan/calcprogress | 05b77e1eedb7726c34f545e10837283e2a1c6180 | [
"MIT"
] | 1 | 2022-02-21T19:47:10.000Z | 2022-02-21T19:47:10.000Z | from dataclasses import dataclass
from pickle import FALSE
from dol import Dol
from asm_section_list import AsmSection, AsmSectionType
@dataclass
class Slice:
start: int
end: int
def size(self) -> int:
assert self.end > self.start
return self.end - self.start
def contains_section(self... | 33.763158 | 102 | 0.66212 | 663 | 0.258379 | 0 | 0 | 685 | 0.266952 | 0 | 0 | 454 | 0.176929 |
4018589aba6937e4ecc7ee0d948bf2a417774d03 | 13,993 | py | Python | main_qm9.py | maxxxzdn/en_flows | 04ed4dd45431cafcd23f8bf5199a47f917a72058 | [
"MIT"
] | null | null | null | main_qm9.py | maxxxzdn/en_flows | 04ed4dd45431cafcd23f8bf5199a47f917a72058 | [
"MIT"
] | null | null | null | main_qm9.py | maxxxzdn/en_flows | 04ed4dd45431cafcd23f8bf5199a47f917a72058 | [
"MIT"
] | null | null | null | import utils
import argparse
import wandb
from os.path import join
from qm9 import dataset
from qm9 import losses
from qm9.models import get_optim, get_model
from flows.utils import assert_mean_zero_with_mask, remove_mean_with_mask,\
assert_correctly_masked
import torch
import time
import pickle
import numpy as np
... | 38.977716 | 116 | 0.622811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,641 | 0.188737 |
40186bf606d530f7f4ad08aa9b623b5881609f5c | 230 | py | Python | vise/tests/util/test_string.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 16 | 2020-07-14T13:14:05.000Z | 2022-03-04T13:39:30.000Z | vise/tests/util/test_string.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 10 | 2021-03-15T20:47:45.000Z | 2021-08-19T00:47:12.000Z | vise/tests/util/test_string.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 6 | 2020-03-03T00:42:39.000Z | 2022-02-22T02:34:47.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021. Distributed under the terms of the MIT License.
from vise.util.string import numbers_to_lowercases
def test_numbers_to_lowercases():
assert numbers_to_lowercases("Mg2") == "Mg₂" | 32.857143 | 70 | 0.73913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.452586 |
401926cb60c477135712ef8b53eac69d6cf43064 | 421 | py | Python | code/ch_02_foundations/_02_noneness.py | SuppMonkey/write.pythonic.code | 4400b219198c14ea0d7d9453cf6d367123b6ce8c | [
"MIT"
] | 679 | 2016-06-16T22:19:40.000Z | 2022-03-25T19:31:45.000Z | code/ch_02_foundations/_02_noneness.py | SuppMonkey/write.pythonic.code | 4400b219198c14ea0d7d9453cf6d367123b6ce8c | [
"MIT"
] | 11 | 2017-04-17T15:25:42.000Z | 2019-11-30T15:58:28.000Z | code/ch_02_foundations/_02_noneness.py | SuppMonkey/write.pythonic.code | 4400b219198c14ea0d7d9453cf6d367123b6ce8c | [
"MIT"
] | 199 | 2016-06-21T19:13:47.000Z | 2022-03-25T03:36:54.000Z | def find_accounts(search_text):
# perform search...
if not db_is_available:
return None
# returns a list of account IDs
return db_search(search_text)
accounts = find_accounts('python')
if accounts is None:
print("Error: DB not available")
else:
print("Accounts found: Would list them he... | 10.268293 | 52 | 0.655582 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.294537 |
401988f94a7b7ebda02b1f821bbce411385f8136 | 3,885 | py | Python | pupa/tests/importers/test_base_importer.py | influence-usa/pupa | 5105c39a535ad401f7babe4eecb3861bed1f8326 | [
"BSD-3-Clause"
] | null | null | null | pupa/tests/importers/test_base_importer.py | influence-usa/pupa | 5105c39a535ad401f7babe4eecb3861bed1f8326 | [
"BSD-3-Clause"
] | 3 | 2015-06-09T19:22:50.000Z | 2015-06-09T21:41:22.000Z | pupa/tests/importers/test_base_importer.py | influence-usa/pupa | 5105c39a535ad401f7babe4eecb3861bed1f8326 | [
"BSD-3-Clause"
] | null | null | null | import os
import json
import shutil
import tempfile
import mock
import pytest
from opencivicdata.models import Person
from pupa.scrape import Person as ScrapePerson
from pupa.scrape import Organization as ScrapeOrganization
from pupa.importers.base import omnihash, BaseImporter
from pupa.importers import PersonImporter... | 31.585366 | 94 | 0.686486 | 52 | 0.013385 | 0 | 0 | 1,892 | 0.487001 | 0 | 0 | 1,160 | 0.298584 |
401b154f2a06b6253bd915fb79af056b04b243aa | 6,008 | py | Python | packaging/bdist_trinoadmin.py | wgzhao/trino-admin | cd2c71e4d0490cf836a7ddf0dbab69b967408ac8 | [
"Apache-2.0"
] | null | null | null | packaging/bdist_trinoadmin.py | wgzhao/trino-admin | cd2c71e4d0490cf836a7ddf0dbab69b967408ac8 | [
"Apache-2.0"
] | 2 | 2021-10-19T05:37:09.000Z | 2022-03-29T22:07:21.000Z | packaging/bdist_trinoadmin.py | wgzhao/trino-admin | cd2c71e4d0490cf836a7ddf0dbab69b967408ac8 | [
"Apache-2.0"
] | 1 | 2021-12-27T02:38:32.000Z | 2021-12-27T02:38:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# 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 t... | 37.55 | 116 | 0.621172 | 5,166 | 0.859854 | 0 | 0 | 0 | 0 | 0 | 0 | 1,794 | 0.298602 |
401bf5f8c246403323fb3816b89f804ced1d9820 | 547 | py | Python | 2020-05-month-long-challenge/day22.py | jkbockstael/leetcode | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | [
"Unlicense"
] | null | null | null | 2020-05-month-long-challenge/day22.py | jkbockstael/leetcode | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | [
"Unlicense"
] | null | null | null | 2020-05-month-long-challenge/day22.py | jkbockstael/leetcode | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# Day 22: Sort Characters By Frequency
#
# Given a string, sort it in decreasing order based on the frequency of
# characters.
import collections
class Solution:
def frequencySort(self, s: str) -> str:
return "".join(map(
lambda t: t[0] * t[1],
collections.C... | 27.35 | 71 | 0.659963 | 179 | 0.327239 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.391225 |
401c85c8336927c2f23953dd8bb76eb17a0d8316 | 1,877 | py | Python | loc.py | relax-space/pandas-first | c8aceae09263a9566ef7dc7631e27f25d569aad4 | [
"Apache-2.0"
] | null | null | null | loc.py | relax-space/pandas-first | c8aceae09263a9566ef7dc7631e27f25d569aad4 | [
"Apache-2.0"
] | null | null | null | loc.py | relax-space/pandas-first | c8aceae09263a9566ef7dc7631e27f25d569aad4 | [
"Apache-2.0"
] | null | null | null | '''
说明: loc和iloc有几个功能
1. 可以获取一行或者多行数据
2. 可以获取1列或多列数据
3. 可以获取某个单元格的数据
对应dataframe来说, 在不指定index和columns的情况下,iloc和loc一样
区别在于,iloc根据索引下标取值, loc根据索引值取值
'''
import numpy as np
import pandas as pd
def test_1():
# 按行取值
pf = pd.DataFrame([[1, 2], [3, 4]])
iloc_0 = pf.iloc[0]
loc_0 = pf.loc[0]
assert pd.Se... | 26.069444 | 79 | 0.559403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 679 | 0.319229 |
401e8c47a022914e9d9cdffe16372061e6ecc752 | 4,673 | py | Python | checkproject/runner.py | perror/checkproject | 9321470164e010778d32e24dc77c0b28eccd9429 | [
"BSD-3-Clause"
] | null | null | null | checkproject/runner.py | perror/checkproject | 9321470164e010778d32e24dc77c0b28eccd9429 | [
"BSD-3-Clause"
] | null | null | null | checkproject/runner.py | perror/checkproject | 9321470164e010778d32e24dc77c0b28eccd9429 | [
"BSD-3-Clause"
] | null | null | null | """Runner to discover, run and collect the results of all the checks."""
def import_module(module_path):
"""Import a Python file as a module in the current context.
@param module_path: Path to the Python file.
@return: A reference to the module once loaded.
"""
import os
import sys
modu... | 32.227586 | 85 | 0.596833 | 3,599 | 0.770169 | 0 | 0 | 0 | 0 | 0 | 0 | 1,554 | 0.332549 |
401fd2803f10b2fab1010a7dfe0776cbe8cc8571 | 11,612 | py | Python | neutron_fwaas/extensions/firewall_v2.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | neutron_fwaas/extensions/firewall_v2.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | neutron_fwaas/extensions/firewall_v2.py | sapcc/neutron-fwaas | 59bad17387d15f86ea7d08f8675208160a999ffe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 38.323432 | 79 | 0.673527 | 2,602 | 0.224079 | 0 | 0 | 2,536 | 0.218395 | 0 | 0 | 3,529 | 0.30391 |
40202bd57c8aba134557450b58ae36c3239d01dd | 4,345 | py | Python | model_hub/model_hub/mmdetection/utils.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | null | null | null | model_hub/model_hub/mmdetection/utils.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | null | null | null | model_hub/model_hub/mmdetection/utils.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | null | null | null | """
Various utility functions for using mmdetection in Determined that may be useful
even if not using the provided MMDetTrial.
build_fp16_loss_scaler is large derived from the original mmcv code at
https://github.com/open-mmlab/mmcv/blob/master/mmcv/runner/hooks/optimizer.py
mmcv is covered by the Apache 2.0 License.... | 40.990566 | 95 | 0.61519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,422 | 0.557422 |
40203044d0b70862532fc8cce70af574c829a8d8 | 2,465 | py | Python | gcloud/datastores/tests/STUB_test_bigquery.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 2 | 2017-03-01T20:09:06.000Z | 2019-02-08T17:10:16.000Z | gcloud/datastores/tests/STUB_test_bigquery.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 40 | 2015-10-10T15:02:21.000Z | 2020-03-17T22:32:04.000Z | gcloud/datastores/tests/STUB_test_bigquery.py | pantheon-ci-bot/etl-framework | 36d4c0d5c26ddd7c0bb2d2b99e3138b50a21c46f | [
"MIT"
] | 2 | 2018-11-14T21:50:58.000Z | 2022-03-07T20:59:27.000Z | """tests bigquery client"""
import unittest
from gcloud.datastores.bigquery import BigqueryClient
class BigqueryClientTestCases(unittest.TestCase):
"""stuff"""
@classmethod
def setUpClass(cls):
cls.project_id = 'test'
cls.dataset_id = 'etl_test'
cls.table_id = 'etl_test'
... | 22.409091 | 78 | 0.539959 | 2,363 | 0.958621 | 0 | 0 | 1,291 | 0.523732 | 0 | 0 | 326 | 0.132252 |
40219219083fe79c8f213a75f899041ef2518cf2 | 354 | py | Python | filter_hash.py | mbougarne/python-algos | f05c491903dfce95ee134852252c55c2cee1b07a | [
"MIT"
] | null | null | null | filter_hash.py | mbougarne/python-algos | f05c491903dfce95ee134852252c55c2cee1b07a | [
"MIT"
] | null | null | null | filter_hash.py | mbougarne/python-algos | f05c491903dfce95ee134852252c55c2cee1b07a | [
"MIT"
] | null | null | null | fruits = ["orange", "banana", "apple", "avocado", "kiwi", "apricot",
"cherry", "grape", "coconut", "lemon", "mango", "peach",
"pear", "strawberry", "pineapple", "apple", "orange", "pear",
"grape", "banana"
]
filters = dict()
for key in fruits:
filters[key] = 1
result =... | 27.230769 | 73 | 0.536723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.443503 |
4022d54aeba2badfe2c92ef3c771f491343dff82 | 1,919 | py | Python | teste/knn.py | joandesonandrade/nebulosa | 5bc157322ed0bdb81f6f00f6ed1ea7f7a5cadfe0 | [
"MIT"
] | null | null | null | teste/knn.py | joandesonandrade/nebulosa | 5bc157322ed0bdb81f6f00f6ed1ea7f7a5cadfe0 | [
"MIT"
] | null | null | null | teste/knn.py | joandesonandrade/nebulosa | 5bc157322ed0bdb81f6f00f6ed1ea7f7a5cadfe0 | [
"MIT"
] | null | null | null | from sklearn import preprocessing
import pandas as pd
import numpy as np
#import matplotlib.pyplot as plt
#Abrindo o dados como Dataframe
dados = pd.read_csv('dados/001.csv')
#Iniciando o método para binanizar as classe sim=1; não=0
pre = preprocessing.LabelBinarizer()
#Binazirando a classe jogou, e atribuíndo a uma... | 28.641791 | 105 | 0.727983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 896 | 0.464249 |
40255e51d495409353d842161452761a11a4b039 | 8,940 | py | Python | components/google-cloud/tests/container/experimental/gcp_launcher/test_batch_prediction_job_remote_runner.py | m-mayran/pipelines | 4e89973504980ff89d896fda09fc29a339b2d744 | [
"Apache-2.0"
] | null | null | null | components/google-cloud/tests/container/experimental/gcp_launcher/test_batch_prediction_job_remote_runner.py | m-mayran/pipelines | 4e89973504980ff89d896fda09fc29a339b2d744 | [
"Apache-2.0"
] | null | null | null | components/google-cloud/tests/container/experimental/gcp_launcher/test_batch_prediction_job_remote_runner.py | m-mayran/pipelines | 4e89973504980ff89d896fda09fc29a339b2d744 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Kubeflow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 45.380711 | 115 | 0.794519 | 7,697 | 0.860962 | 0 | 0 | 6,616 | 0.740045 | 0 | 0 | 1,459 | 0.163199 |
4027f13cd3b7d7bc0f1afe366ba2f0949bed351e | 805 | py | Python | rotypes/Windows/Storage/Streams/__init__.py | Gliese129/ArknightsAutoHelper | 43971a63da55001ebc55a7e0de56e9364dff04bb | [
"MIT"
] | 18 | 2022-03-18T08:20:28.000Z | 2022-03-31T15:19:15.000Z | rotypes/Windows/Storage/Streams/__init__.py | Gliese129/ArknightsAutoHelper | 43971a63da55001ebc55a7e0de56e9364dff04bb | [
"MIT"
] | 4 | 2021-01-23T13:05:39.000Z | 2021-09-11T14:29:56.000Z | rotypes/Windows/Storage/Streams/__init__.py | Gliese129/ArknightsAutoHelper | 43971a63da55001ebc55a7e0de56e9364dff04bb | [
"MIT"
] | 1 | 2022-03-20T05:52:38.000Z | 2022-03-20T05:52:38.000Z | from ctypes import c_uint32, c_void_p, string_at
from rotypes.idldsl import define_winrt_com_method, GUID
from rotypes.inspectable import IInspectable, IUnknown
@GUID('905a0fef-bc53-11df-8c49-001e4fc686da')
class IBufferByteAccess(IUnknown):
pass
@GUID('905A0FE0-BC53-11DF-8C49-001E4FC686DA')
class IBuffer(IIns... | 27.758621 | 69 | 0.773913 | 273 | 0.33913 | 0 | 0 | 365 | 0.453416 | 0 | 0 | 122 | 0.151553 |
40293f7dca9ef672564fb8730fe1d23ecd590f2b | 23,410 | py | Python | simple_playgrounds/playground.py | Asjidkalam/simple-playgrounds | 72ec42987a33175103191fa9722e0e002f889954 | [
"MIT"
] | null | null | null | simple_playgrounds/playground.py | Asjidkalam/simple-playgrounds | 72ec42987a33175103191fa9722e0e002f889954 | [
"MIT"
] | null | null | null | simple_playgrounds/playground.py | Asjidkalam/simple-playgrounds | 72ec42987a33175103191fa9722e0e002f889954 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Playground documentation.
Module defining Playground Base Class
"""
import os
from abc import ABC
import yaml
import pymunk
from .utils import PositionAreaSampler
from .utils.definitions import SPACE_DAMPING, CollisionTypes, SceneElementTypes
# pylint: disable=unused-argument
# pylint:... | 31.893733 | 125 | 0.641948 | 23,060 | 0.985049 | 0 | 0 | 1,397 | 0.059675 | 0 | 0 | 4,363 | 0.186373 |
402b9f4345d8a408ad36e88d31b1b6668765cd8b | 2,679 | py | Python | UEManifestReader/classes/FManifestData.py | ryryburge/UEManifestReader | 970b24dd80fc6b5d599d1bd77de78a1b19f4432e | [
"MIT"
] | null | null | null | UEManifestReader/classes/FManifestData.py | ryryburge/UEManifestReader | 970b24dd80fc6b5d599d1bd77de78a1b19f4432e | [
"MIT"
] | null | null | null | UEManifestReader/classes/FManifestData.py | ryryburge/UEManifestReader | 970b24dd80fc6b5d599d1bd77de78a1b19f4432e | [
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import zlib
from UEManifestReader.enums import *
from UEManifestReader.classes.FCustomFields import FCustomFields
from UEManifestReader.classes.FManifestMeta import FManifestMeta
from UEManifestReader.classes.FChunkDataList import FChunkDataList
from UEManifestReader.classes.FManifestHeader imp... | 46.189655 | 117 | 0.711459 | 2,121 | 0.791713 | 0 | 0 | 0 | 0 | 0 | 0 | 496 | 0.185144 |
402ba89b6c4bbf8923f29b3e69bf5634d07e5b15 | 98 | py | Python | Python/module.py | minjibyeongho/KOSA-Pytorch | 80d71a8c579d645bea4c3352c9babdf232a8630e | [
"MIT"
] | 2 | 2021-05-25T08:52:07.000Z | 2021-08-13T23:49:42.000Z | Python/module.py | minjibyeongho/KOSA-Pytorch | 80d71a8c579d645bea4c3352c9babdf232a8630e | [
"MIT"
] | null | null | null | Python/module.py | minjibyeongho/KOSA-Pytorch | 80d71a8c579d645bea4c3352c9babdf232a8630e | [
"MIT"
] | 2 | 2021-05-24T00:49:45.000Z | 2021-06-11T01:30:12.000Z | #module.py
def hello():
print("Hello!")
#if __name__=="__main__":
# print(__name__) | 14 | 26 | 0.581633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.663265 |
402c6d1527bb64bf420904254134ab7105236ec8 | 10,690 | py | Python | data_utils.py | algoprog/Quin | c1fd3b8e5e2163217f6c8062620ee0c1dfeed0e8 | [
"MIT"
] | 47 | 2020-08-02T12:28:07.000Z | 2022-03-30T01:56:57.000Z | data_utils.py | algoprog/Quin | c1fd3b8e5e2163217f6c8062620ee0c1dfeed0e8 | [
"MIT"
] | 4 | 2020-09-20T17:31:51.000Z | 2021-12-02T17:40:03.000Z | data_utils.py | algoprog/Quin | c1fd3b8e5e2163217f6c8062620ee0c1dfeed0e8 | [
"MIT"
] | 4 | 2020-11-23T15:47:34.000Z | 2021-03-30T02:02:02.000Z | import csv
import json
import pickle
import logging
import re
import pandas
import gzip
import os
import numpy as np
from random import randint, random
from tqdm import tqdm
from retriever.dense_retriever import DenseRetriever
from models.tokenization import tokenize
from typing import Union, List
class InputExampl... | 31.627219 | 119 | 0.528718 | 1,075 | 0.100561 | 0 | 0 | 0 | 0 | 0 | 0 | 1,207 | 0.112909 |
402d9bbc776d0b10c128c8af7e8de8955e864e57 | 327 | py | Python | hc/accounts/migrations/0025_remove_member_team.py | opsct/healthchecks | 069bc9b735c0473aed9946104ab85238d065bea1 | [
"BSD-3-Clause"
] | null | null | null | hc/accounts/migrations/0025_remove_member_team.py | opsct/healthchecks | 069bc9b735c0473aed9946104ab85238d065bea1 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:14:00.000Z | 2021-06-10T23:14:00.000Z | hc/accounts/migrations/0025_remove_member_team.py | opsct/healthchecks | 069bc9b735c0473aed9946104ab85238d065bea1 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.1.5 on 2019-01-22 08:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0024_auto_20190119_1540'),
]
operations = [
migrations.RemoveField(
model_name='member',
name='team',
),... | 18.166667 | 48 | 0.590214 | 242 | 0.740061 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.293578 |
402da872d024b72e61193b2048d5c5fe8a54f2e6 | 6,671 | py | Python | openstack-dashboard/openstack_dashboard/api/proxy.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | openstack-dashboard/openstack_dashboard/api/proxy.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | openstack-dashboard/openstack_dashboard/api/proxy.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
#from proxyclient.v2 import client as proxy_client
from openstack_dashboard.utils import proxy_client
def proxyclient(request):
management_url = getattr(settings, 'MANAGEMENT_URL')
conn = proxy_client.Client(request.user.username,
request.user.t... | 35.296296 | 86 | 0.746665 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.023984 |
402e10f9fc439179bd0a8ffc8b3cd706de061b93 | 251 | py | Python | tfl_data.py | dongyan1024/overtime | 4f722a823585890026fe9584ba5985963b2a586c | [
"MIT"
] | 9 | 2020-10-15T13:53:36.000Z | 2022-03-08T12:08:09.000Z | tfl_data.py | dongyan1024/overtime | 4f722a823585890026fe9584ba5985963b2a586c | [
"MIT"
] | 6 | 2021-02-07T15:43:12.000Z | 2021-04-24T04:03:39.000Z | tfl_data.py | dongyan1024/overtime | 4f722a823585890026fe9584ba5985963b2a586c | [
"MIT"
] | 7 | 2020-10-15T13:55:12.000Z | 2022-03-12T03:54:02.000Z |
import overtime as ot
times = ['14:00','14:05', '14:10', '14:15', '14:20', '14:25', '14:30', '14:35', '14:40', '14:45', '14:50', '14:55']
tfl_data = ot.TflInput(['victoria', 'central', 'bakerloo', 'piccadilly'], ['inbound', 'outbound'], times)
| 41.833333 | 116 | 0.565737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 144 | 0.573705 |
402eafa1a88db63bd7cacd91e03e8377d8b8d5d8 | 2,375 | py | Python | apps/dc_tools/odc/apps/dc_tools/fs_to_dc.py | opendatacube/odc-tools | 42950e93305846b640a1c6135c9da16ba76c1b3a | [
"Apache-2.0"
] | 29 | 2019-09-18T10:21:07.000Z | 2022-03-10T07:46:57.000Z | apps/dc_tools/odc/apps/dc_tools/fs_to_dc.py | opendatacube/odc-tools | 42950e93305846b640a1c6135c9da16ba76c1b3a | [
"Apache-2.0"
] | 259 | 2019-12-11T03:19:01.000Z | 2022-03-31T22:46:11.000Z | apps/dc_tools/odc/apps/dc_tools/fs_to_dc.py | opendatacube/odc-tools | 42950e93305846b640a1c6135c9da16ba76c1b3a | [
"Apache-2.0"
] | 18 | 2020-01-22T14:50:27.000Z | 2022-03-01T14:48:12.000Z | import json
from pathlib import Path
import click
import datacube
from datacube.index.hl import Doc2Dataset
from odc.apps.dc_tools.utils import (
index_update_dataset,
update_if_exists,
allow_unsafe,
transform_stac,
)
from ._stac import stac_transform
from typing import Generator, Optional
import loggi... | 26.388889 | 84 | 0.596211 | 0 | 0 | 0 | 0 | 1,534 | 0.645895 | 0 | 0 | 367 | 0.154526 |
4030d959e7cf60e57a2223602eae1667433715a2 | 651 | py | Python | scripts/fullizer.py | stijm/jazzjackrabbit2 | e47f1c42fd7c450c2e12bcb7dcaae0f695a0dc12 | [
"MIT"
] | 5 | 2021-08-03T20:02:00.000Z | 2021-11-19T20:29:36.000Z | scripts/fullizer.py | stijm/jj2 | e47f1c42fd7c450c2e12bcb7dcaae0f695a0dc12 | [
"MIT"
] | null | null | null | scripts/fullizer.py | stijm/jj2 | e47f1c42fd7c450c2e12bcb7dcaae0f695a0dc12 | [
"MIT"
] | null | null | null | """
WARNING:
Using this script outside any server except one with IP 127.0.0.1 means risking getting
an instant and permanent ban, anywhere you use it.
The script was created *ONLY FOR LOCAL* testing purposes.
NEVER, NEVER, *NEVER* run it in an online multiplayer server.
At least unless you're a dumb freak.
""... | 26.04 | 91 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 355 | 0.545315 |
403251bad5543a2ea9b5b81f85773876a2b6f3ba | 1,458 | py | Python | setup.py | pranithk/gluster-georep-tools | 3c8c7dcf63042613b002385edcead7c1ec079e61 | [
"MIT"
] | null | null | null | setup.py | pranithk/gluster-georep-tools | 3c8c7dcf63042613b002385edcead7c1ec079e61 | [
"MIT"
] | null | null | null | setup.py | pranithk/gluster-georep-tools | 3c8c7dcf63042613b002385edcead7c1ec079e61 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
gluster-georep-tools.setup.py
:copyright: (c) 2016 by Aravinda VK
:license: MIT, see LICENSE for more details.
"""
from setuptools import setup
setup(
name="gluster-georep-tools",
version="0.2",
packages=["gluster_georep_tools",
"gluster_georep_tools.... | 30.375 | 75 | 0.61454 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 943 | 0.646776 |
403346598a2baf176ef8cdcf1186f9c5ce45137d | 14,184 | py | Python | docs/_downloads/dbc5873471dad3c21022112121cbd008/tensorboard_profiler_tutorial.py | woojinsong/PyTorch-tutorials-kr | 36fefd556f45c2b1f5db912793172c0369430fd4 | [
"BSD-3-Clause"
] | 221 | 2018-04-06T01:42:58.000Z | 2021-11-28T10:12:45.000Z | intermediate_source/tensorboard_profiler_tutorial.py | konlidoo/tutorials | 75b1c673a73ca285a16f52a62fc8ffcc6d069936 | [
"BSD-3-Clause"
] | 280 | 2018-05-25T08:53:21.000Z | 2021-12-02T05:37:25.000Z | intermediate_source/tensorboard_profiler_tutorial.py | konlidoo/tutorials | 75b1c673a73ca285a16f52a62fc8ffcc6d069936 | [
"BSD-3-Clause"
] | 181 | 2018-05-25T02:00:28.000Z | 2021-11-19T11:56:39.000Z | """
PyTorch Profiler With TensorBoard
====================================
This tutorial demonstrates how to use TensorBoard plugin with PyTorch Profiler
to detect performance bottlenecks of the model.
Introduction
------------
PyTorch 1.8 includes an updated profiler API capable of
recording the CPU side operations ... | 40.758621 | 150 | 0.666314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12,613 | 0.886865 |
403352816f5874a59e3b9fffa9b383a34c03d749 | 311 | py | Python | imgtoch/__init__.py | hrpzcf/imgtoch | 13b59dd4c6b65b8ee17bbd22ac1133a86d34d5fb | [
"MIT"
] | null | null | null | imgtoch/__init__.py | hrpzcf/imgtoch | 13b59dd4c6b65b8ee17bbd22ac1133a86d34d5fb | [
"MIT"
] | null | null | null | imgtoch/__init__.py | hrpzcf/imgtoch | 13b59dd4c6b65b8ee17bbd22ac1133a86d34d5fb | [
"MIT"
] | null | null | null | # coding: utf-8
from .__utils__ import grayscaleOf, makeImage, sortByGrayscale
NAME = "imgtoch"
VERSIONNUM = 0, 2, 3
VERSION = ".".join(map(str, VERSIONNUM))
AUTHOR = "hrpzcf"
EMAIL = "hrpzcf@foxmail.com"
WEBSITE = "https://gitee.com/hrpzcf/imgtoch"
__all__ = ["grayscaleOf", "makeImage", "sortByGrayscale"]
| 23.923077 | 62 | 0.717042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 0.418006 |
40339ee3fc200a5b40a0b837adca77cf33b0c95c | 4,298 | py | Python | packages/gradient_boosting_model/gradient_boosting_model/processing/validation.py | g-nightingale/testing-and-monitoring-ml-deployments | 770d2889968e7195dba1697c164b3344cff3c5ee | [
"BSD-3-Clause"
] | 99 | 2019-11-14T11:58:51.000Z | 2022-03-19T14:23:17.000Z | packages/gradient_boosting_model/gradient_boosting_model/processing/validation.py | hoai-nguyen/testing-and-monitoring-ml-deployments | c4c0bc8d857326cc10899be6fe7c5bb03586347c | [
"BSD-3-Clause"
] | 1 | 2020-03-05T04:08:26.000Z | 2020-03-05T04:08:26.000Z | packages/gradient_boosting_model/gradient_boosting_model/processing/validation.py | hoai-nguyen/testing-and-monitoring-ml-deployments | c4c0bc8d857326cc10899be6fe7c5bb03586347c | [
"BSD-3-Clause"
] | 188 | 2019-12-13T16:48:23.000Z | 2022-03-29T09:25:12.000Z | import typing as t
from gradient_boosting_model.config.core import config
import numpy as np
import pandas as pd
from marshmallow import fields, Schema, ValidationError
class HouseDataInputSchema(Schema):
Alley = fields.Str(allow_none=True)
BedroomAbvGr = fields.Integer()
BldgType = fields.Str()
Bsm... | 34.66129 | 85 | 0.704281 | 2,986 | 0.694742 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.061191 |
403486f59aaf160172f092701ccd24e42088b089 | 2,458 | py | Python | pyplan_engine/classes/IOEngine.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 17 | 2019-12-04T19:22:19.000Z | 2021-07-28T11:17:05.000Z | pyplan_engine/classes/IOEngine.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 9 | 2019-12-13T15:34:43.000Z | 2022-02-10T11:43:00.000Z | pyplan_engine/classes/IOEngine.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 5 | 2019-12-04T15:57:06.000Z | 2021-08-20T19:59:26.000Z |
class IOEngine(object):
def __init__(self, node):
self.node = node
self.inputs = []
self.outputs = []
def release(self):
self.inputs = None
self.outputs = None
self.node = None
def updateInputs(self, names):
# remove prior outputs
for input... | 32.342105 | 77 | 0.58869 | 2,456 | 0.999186 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.00895 |
4035dbde81734e9262f7a5d9f7fcf21b0a2fc083 | 1,006 | py | Python | RLBotPack/JoeyBot/CSharpPythonAgent/CSharpPythonAgent.py | RLMarvin/RLBotPack | c88c4111bf67d324b471ad87ad962e7bc8c2a202 | [
"MIT"
] | 13 | 2019-05-25T20:25:51.000Z | 2022-03-19T13:36:23.000Z | RLBotPack/JoeyBot/CSharpPythonAgent/CSharpPythonAgent.py | RLMarvin/RLBotPack | c88c4111bf67d324b471ad87ad962e7bc8c2a202 | [
"MIT"
] | 53 | 2019-06-07T13:31:59.000Z | 2022-03-28T22:53:47.000Z | RLBotPack/JoeyBot/CSharpPythonAgent/CSharpPythonAgent.py | RLMarvin/RLBotPack | c88c4111bf67d324b471ad87ad962e7bc8c2a202 | [
"MIT"
] | 78 | 2019-06-30T08:42:13.000Z | 2022-03-23T20:11:42.000Z | import os
from rlbot.agents.base_agent import BOT_CONFIG_AGENT_HEADER
from rlbot.agents.base_dotnet_agent import BaseDotNetAgent
from rlbot.parsing.custom_config import ConfigHeader, ConfigObject
class DotNetBot(BaseDotNetAgent):
def get_port_file_path(self):
# Look for a port.cfg file in the same direct... | 43.73913 | 102 | 0.744533 | 806 | 0.801193 | 0 | 0 | 305 | 0.303181 | 0 | 0 | 228 | 0.22664 |
4036ce0b3a0763152669516459e91450d4954edb | 2,640 | py | Python | v3_experiments.py | runekaagaard/workflows | 7bb7fe3821bc33b5e82c65dda3ca61f69ee8bcfa | [
"Unlicense"
] | null | null | null | v3_experiments.py | runekaagaard/workflows | 7bb7fe3821bc33b5e82c65dda3ca61f69ee8bcfa | [
"Unlicense"
] | null | null | null | v3_experiments.py | runekaagaard/workflows | 7bb7fe3821bc33b5e82c65dda3ca61f69ee8bcfa | [
"Unlicense"
] | null | null | null | # coding=utf-8
import inspect
from functools import wraps
def listify(func_s):
if callable(func_s):
return [func_s]
else:
return func_s
def parse_conditions(condition_s, args, kwargs, title):
err_msg = unicode(title) + u" nr. {} failed: {}"
for i, condition in enumerate(listify(condi... | 22.372881 | 75 | 0.576894 | 0 | 0 | 0 | 0 | 940 | 0.356061 | 0 | 0 | 213 | 0.080682 |
4037b08c119c1be84f8a39d7cd954a0ebc06a052 | 1,198 | py | Python | externals/binaryen/test/emscripten/tools/distill_asm.py | caokun8008/ckeos | 889093599eb59c90e4cbcff2817f4421302fada1 | [
"MIT"
] | 40 | 2018-05-14T11:05:03.000Z | 2020-10-20T03:03:06.000Z | externals/binaryen/test/emscripten/tools/distill_asm.py | caokun8008/ckeos | 889093599eb59c90e4cbcff2817f4421302fada1 | [
"MIT"
] | 4 | 2019-08-19T13:07:10.000Z | 2020-10-17T02:45:04.000Z | externals/binaryen/test/emscripten/tools/distill_asm.py | caokun8008/ckeos | 889093599eb59c90e4cbcff2817f4421302fada1 | [
"MIT"
] | 14 | 2018-05-28T09:45:02.000Z | 2018-12-18T10:54:26.000Z | '''
Gets the core asm module out of an emscripten output file.
By default it adds a ';' to end the
var asm = ...
statement. You can add a third param to customize that. If the third param is 'swap-in', it will emit code to swap this asm module in, instead of the default one.
XXX this probably doesn't work with cl... | 32.378378 | 162 | 0.69783 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 892 | 0.744574 |
4037b4c2546a2c9d2335471a4c5869528e8d4f28 | 2,399 | py | Python | apex/contrib/conv_bias_relu/conv_bias_relu.py | XL-Kong/Painter_GAN | 23cfb57638497fdd1f2d8c09728b439b0e83efde | [
"BSD-3-Clause"
] | null | null | null | apex/contrib/conv_bias_relu/conv_bias_relu.py | XL-Kong/Painter_GAN | 23cfb57638497fdd1f2d8c09728b439b0e83efde | [
"BSD-3-Clause"
] | null | null | null | apex/contrib/conv_bias_relu/conv_bias_relu.py | XL-Kong/Painter_GAN | 23cfb57638497fdd1f2d8c09728b439b0e83efde | [
"BSD-3-Clause"
] | null | null | null | import torch
import pdb
from torch.autograd import gradcheck
import fused_conv_bias_relu
class ConvBiasReLU_(torch.autograd.Function):
@staticmethod
@torch.cuda.amp.custom_fwd(cast_inputs=torch.half)
def forward(ctx, x, weight, bias, padding, stride):
outputs = fused_conv_bias_relu.forward([x, wei... | 31.155844 | 93 | 0.681951 | 2,193 | 0.914131 | 0 | 0 | 2,025 | 0.844102 | 0 | 0 | 0 | 0 |
403a8f16077fbf7702c11e3631833751b1f7fb2c | 3,367 | py | Python | data-structures/trees/trees/trees.py | bayan-alkhatib/data-structures-and-algorithms-401 | c22e0adf159392a8925f07a36b3083654d3a7002 | [
"MIT"
] | null | null | null | data-structures/trees/trees/trees.py | bayan-alkhatib/data-structures-and-algorithms-401 | c22e0adf159392a8925f07a36b3083654d3a7002 | [
"MIT"
] | 11 | 2021-06-14T00:14:54.000Z | 2021-06-30T00:08:30.000Z | data-structures/trees/trees/trees.py | bayan-alkhatib/data-structures-and-algorithms-401 | c22e0adf159392a8925f07a36b3083654d3a7002 | [
"MIT"
] | 1 | 2021-07-26T11:08:29.000Z | 2021-07-26T11:08:29.000Z | class Node:
def __init__(self,value):
self.value=value
self.left=None
self.right=None
class Binary_Tree:
def __init__(self):
self.root = None
def pre_order(self):
""" root-left-right """
try:
self.values=[]
if self.ro... | 24.223022 | 51 | 0.415206 | 3,337 | 0.99109 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.057618 |
403ab8cc728f6138166c183502ef116ca738da28 | 3,037 | py | Python | ironic_inspector/cmd/dbsync.py | namnx228/ironic-inspector | fb5955bccef367af58c972718643fe5fdb18ffa5 | [
"Apache-2.0"
] | 31 | 2015-06-23T08:06:05.000Z | 2021-11-20T05:34:32.000Z | ironic_inspector/cmd/dbsync.py | sapcc/ironic-inspector | dee8734f8ca2b0fb0acc4c56f1806237234bf55d | [
"Apache-2.0"
] | 1 | 2019-11-22T12:07:56.000Z | 2019-11-22T12:07:59.000Z | ironic_inspector/cmd/dbsync.py | sapcc/ironic-inspector | dee8734f8ca2b0fb0acc4c56f1806237234bf55d | [
"Apache-2.0"
] | 33 | 2015-12-02T05:27:56.000Z | 2022-02-28T07:57:43.000Z | # Copyright 2015 Cisco Systems
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 33.01087 | 76 | 0.709582 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 860 | 0.283174 |
403ac1f41e289fbd9825b8c92a8b0c154ef6090e | 1,300 | py | Python | trabalhoaqui/comp_perguntas/valida.py | EmanoelG/jogodaforca | 06baf78b31e4b40d8db9fc5be67700be32c66cba | [
"MIT"
] | 1 | 2020-06-06T17:09:55.000Z | 2020-06-06T17:09:55.000Z | trabalhoaqui/comp_perguntas/valida.py | EmanoelG/jogodaforca | 06baf78b31e4b40d8db9fc5be67700be32c66cba | [
"MIT"
] | null | null | null | trabalhoaqui/comp_perguntas/valida.py | EmanoelG/jogodaforca | 06baf78b31e4b40d8db9fc5be67700be32c66cba | [
"MIT"
] | null | null | null | from jogo import desenha_jogo
from random import randint
import sys
def input_cria_usuario():
usuario = dict()
usuario['nome'] = input('Informe o seu nome: ')
usuario['pontos'] = 0
usuario['desafiado'] = False
return usuario
def comeco(j1, j2):
j1 = 1
j2 = 2
n= randint(j1,j2)
... | 23.214286 | 127 | 0.412308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 840 | 0.646154 |
403b3bdafa5f824c48528757629f8e664b7cbcd3 | 9,018 | py | Python | DesksReminder/Desks/accounts_desk.py | flopezag/fiware-management-scripts | 3e9ccdb62a11ec0ffd0747511f5512bcdb0df729 | [
"Apache-2.0"
] | null | null | null | DesksReminder/Desks/accounts_desk.py | flopezag/fiware-management-scripts | 3e9ccdb62a11ec0ffd0747511f5512bcdb0df729 | [
"Apache-2.0"
] | 21 | 2017-01-17T12:19:47.000Z | 2021-06-03T07:56:56.000Z | DesksReminder/Desks/accounts_desk.py | flopezag/fiware-management-scripts | 3e9ccdb62a11ec0ffd0747511f5512bcdb0df729 | [
"Apache-2.0"
] | 1 | 2017-05-03T21:42:49.000Z | 2017-05-03T21:42:49.000Z | from datetime import date, datetime
from DesksReminder.Basics.dataFinder import Data
from DesksReminder.Basics.nickNames import ContactBook
from Config.settings import JIRA_URL
__author__ = 'Manuel Escriche'
class AccountsDesk:
def __init__(self):
self.contactBook = ContactBook()
def open(self):
... | 49.01087 | 120 | 0.555001 | 8,768 | 0.972278 | 0 | 0 | 0 | 0 | 0 | 0 | 2,703 | 0.299734 |
403c902e2dd03cc231fcbd2349b64917b93e7dde | 826 | py | Python | scripts/ip2hex.py | Kidlike/dotfiles | b9c4daa4da1f416662b708338a497b5a620ddcbf | [
"Apache-2.0"
] | null | null | null | scripts/ip2hex.py | Kidlike/dotfiles | b9c4daa4da1f416662b708338a497b5a620ddcbf | [
"Apache-2.0"
] | null | null | null | scripts/ip2hex.py | Kidlike/dotfiles | b9c4daa4da1f416662b708338a497b5a620ddcbf | [
"Apache-2.0"
] | 1 | 2018-05-28T08:08:25.000Z | 2018-05-28T08:08:25.000Z | #!/usr/bin/python
import sys
import re
def iptohex(ip):
octets = ip.split('.')
hex_octets = []
for octet in octets:
if int(octet) < 16:
hex_octets.append('0' + hex(int(octet))[2:])
else:
hex_octets.append(hex(int(oc... | 26.645161 | 68 | 0.468523 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.161017 |
403cacc3c31596cf185f47bf3504df89608d6f14 | 1,329 | py | Python | src/models/CVX_weighted.py | DanqingZ/social-DCM | 3c2541a7ed0e7f4519d97783b5b673fa6c06ae94 | [
"MIT"
] | 14 | 2017-08-10T17:00:20.000Z | 2021-12-23T09:00:50.000Z | src/models/CVX_weighted.py | DanqingZ/social-DCM | 3c2541a7ed0e7f4519d97783b5b673fa6c06ae94 | [
"MIT"
] | null | null | null | src/models/CVX_weighted.py | DanqingZ/social-DCM | 3c2541a7ed0e7f4519d97783b5b673fa6c06ae94 | [
"MIT"
] | 1 | 2019-08-13T08:47:43.000Z | 2019-08-13T08:47:43.000Z | import random
import numpy as np
import numpy.linalg as LA
import scipy as spy
import time
from itertools import *
import sys
import cvxpy as cvx
from random import randint
import numpy as np
import random
from scipy.sparse import csc_matrix
from scipy import sparse as sp
import networkx as nx
class CVX_weighted:
def... | 26.58 | 157 | 0.699774 | 1,033 | 0.777276 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.011287 |
403ceb47a5257374ece3af5ee6603178afb5bfd2 | 5,704 | py | Python | experiments/colorization_cINN/data.py | jlmaccal/FrEIA | 64a04cb784e19bdff69546657f602fd31835c21f | [
"MIT"
] | null | null | null | experiments/colorization_cINN/data.py | jlmaccal/FrEIA | 64a04cb784e19bdff69546657f602fd31835c21f | [
"MIT"
] | null | null | null | experiments/colorization_cINN/data.py | jlmaccal/FrEIA | 64a04cb784e19bdff69546657f602fd31835c21f | [
"MIT"
] | null | null | null | import sys
import glob
from os.path import join
from multiprocessing import Pool
import numpy as np
import matplotlib.pyplot as plt
from skimage import io, color
from PIL import Image, ImageEnhance
import torch
from torch.utils.data import Dataset, DataLoader, TensorDataset
import torch.nn.functional as F
import torch... | 32.971098 | 144 | 0.603086 | 864 | 0.151473 | 0 | 0 | 0 | 0 | 0 | 0 | 959 | 0.168128 |
403d3f7c3cad2d68df2456deb94e9f014798faf1 | 16,215 | py | Python | utils/editor.py | tien1504/idinvert_pytorch | 19999e9945aef4843a464930426a565256863ded | [
"MIT"
] | 415 | 2020-04-02T03:06:47.000Z | 2022-03-28T09:32:13.000Z | utils/editor.py | tien1504/idinvert_pytorch | 19999e9945aef4843a464930426a565256863ded | [
"MIT"
] | 52 | 2020-04-03T04:13:57.000Z | 2021-11-23T16:52:31.000Z | utils/editor.py | tien1504/idinvert_pytorch | 19999e9945aef4843a464930426a565256863ded | [
"MIT"
] | 68 | 2020-04-03T10:08:30.000Z | 2021-10-29T20:13:45.000Z | # python 3.7
"""Utility functions for image editing from latent space."""
import os.path
import numpy as np
__all__ = [
'parse_indices', 'interpolate', 'mix_style',
'get_layerwise_manipulation_strength', 'manipulate', 'parse_boundary_list'
]
def parse_indices(obj, min_val=None, max_val=None):
"""Parses in... | 41.259542 | 80 | 0.687882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,509 | 0.586432 |
403d7ac07f1f092095ae4d7caf15898f47658901 | 96 | py | Python | venv/lib/python3.8/site-packages/pyls/_version.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/pyls/_version.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/pyls/_version.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/24/e8/39/183700a0b2d2a9545f3da2571d82b53df290aab3a51dc229b113d16e6c | 96 | 96 | 0.895833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
403e17c5ec985065a02c6baa32d0dcd4699f18d1 | 1,277 | py | Python | pymoo/util/normalization.py | Electr0phile/pymoo | 652428473cc68b6d9deada3792635bc8a831b255 | [
"Apache-2.0"
] | 1 | 2020-08-27T09:51:27.000Z | 2020-08-27T09:51:27.000Z | pymoo/util/normalization.py | Asurada2015/pymoo | 023a787d0b78813e789f170a3e94b2de85605aff | [
"Apache-2.0"
] | null | null | null | pymoo/util/normalization.py | Asurada2015/pymoo | 023a787d0b78813e789f170a3e94b2de85605aff | [
"Apache-2.0"
] | null | null | null | import numpy as np
def denormalize(x, x_min, x_max):
if x_max is None:
_range = 1
else:
_range = (x_max - x_min)
return x * _range + x_min
def normalize(x, x_min=None, x_max=None, return_bounds=False, estimate_bounds_if_none=True):
# if the bounds should be estimated if none do it... | 21.644068 | 92 | 0.617071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 270 | 0.211433 |
4040a877bb3e28b9851ff90970e6bf5e768e303c | 31,211 | py | Python | alembic/versions/92235b77ea53_check_new.py | go-lab/appcomposer | c2468f11b8398edc9b16e1552ac8d609d8347677 | [
"BSD-2-Clause"
] | 1 | 2018-01-20T14:56:01.000Z | 2018-01-20T14:56:01.000Z | alembic/versions/92235b77ea53_check_new.py | go-lab/appcomposer | c2468f11b8398edc9b16e1552ac8d609d8347677 | [
"BSD-2-Clause"
] | 25 | 2015-01-21T09:16:26.000Z | 2021-12-13T20:01:21.000Z | alembic/versions/92235b77ea53_check_new.py | go-lab/appcomposer | c2468f11b8398edc9b16e1552ac8d609d8347677 | [
"BSD-2-Clause"
] | 3 | 2015-07-28T18:40:05.000Z | 2017-03-28T08:14:37.000Z | """Check new
Revision ID: 92235b77ea53
Revises: 381fdb66ec27
Create Date: 2017-10-14 02:38:51.007307
"""
# revision identifiers, used by Alembic.
revision = '92235b77ea53'
down_revision = '381fdb66ec27'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic - pl... | 90.205202 | 149 | 0.79834 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19,232 | 0.616193 |
4040e2297e78d48d586c2e4b34ffa775eb46c92e | 5,633 | py | Python | build/lib/adb_utils/adb_utils.py | christopherferreira3/Python-ADB-Tools | 94e39cfe4b285517ee2502f658ab23af4ff18643 | [
"MIT"
] | null | null | null | build/lib/adb_utils/adb_utils.py | christopherferreira3/Python-ADB-Tools | 94e39cfe4b285517ee2502f658ab23af4ff18643 | [
"MIT"
] | null | null | null | build/lib/adb_utils/adb_utils.py | christopherferreira3/Python-ADB-Tools | 94e39cfe4b285517ee2502f658ab23af4ff18643 | [
"MIT"
] | null | null | null | import subprocess
import os
def get_connected_devices() -> list:
"""
Returns a list of tuples containing the Device name and the android Version
:return:
"""
devices = []
devices_output = subprocess.check_output(["adb", "devices"]).decode("utf-8").strip("List of devices attached").split("\n")
... | 27.081731 | 129 | 0.617788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,086 | 0.370318 |
4041a6092503143d16664ce5f9772df9bdedc920 | 2,664 | py | Python | tests/unit/test_cl61d.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | 1 | 2021-11-16T15:23:24.000Z | 2021-11-16T15:23:24.000Z | tests/unit/test_cl61d.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | null | null | null | tests/unit/test_cl61d.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | null | null | null | import glob
import os
import sys
from tempfile import TemporaryDirectory
import netCDF4
import numpy as np
import numpy.ma as ma
from all_products_fun import Check
from lidar_fun import LidarFun
from cloudnetpy import concat_lib
from cloudnetpy.instruments import ceilo2nc
SCRIPT_PATH = os.path.dirname(os.path.realpa... | 30.62069 | 81 | 0.634384 | 1,581 | 0.593023 | 0 | 0 | 0 | 0 | 0 | 0 | 503 | 0.188672 |
4043eb802b57171a6cc605056ffc3abeca7f2a68 | 1,343 | py | Python | tests/functions/test_count.py | athre0z/clickhouse-sqlalchemy | d4be4a818c2fadef8eeb76a59d11ff82fc2c433a | [
"MIT"
] | 1 | 2021-07-07T09:06:00.000Z | 2021-07-07T09:06:00.000Z | tests/functions/test_count.py | athre0z/clickhouse-sqlalchemy | d4be4a818c2fadef8eeb76a59d11ff82fc2c433a | [
"MIT"
] | null | null | null | tests/functions/test_count.py | athre0z/clickhouse-sqlalchemy | d4be4a818c2fadef8eeb76a59d11ff82fc2c433a | [
"MIT"
] | null | null | null | from sqlalchemy import Column, func
from clickhouse_sqlalchemy import types, Table
from tests.testcase import (
BaseAbstractTestCase, HttpSessionTestCase, NativeSessionTestCase,
)
class CountTestCaseBase(BaseAbstractTestCase):
def create_table(self):
metadata = self.metadata()
return Table(
... | 27.408163 | 72 | 0.63589 | 1,149 | 0.855547 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.109456 |
4043f84908b97607d02cc9c6faf2b455d08e20a4 | 1,055 | py | Python | scripts/commands/html/actions/search.py | stevekineeve88/orb | 284cc78659e88e85e8773599da3bda382a8bb833 | [
"MIT"
] | null | null | null | scripts/commands/html/actions/search.py | stevekineeve88/orb | 284cc78659e88e85e8773599da3bda382a8bb833 | [
"MIT"
] | null | null | null | scripts/commands/html/actions/search.py | stevekineeve88/orb | 284cc78659e88e85e8773599da3bda382a8bb833 | [
"MIT"
] | null | null | null | import click
import requests
from bs4 import BeautifulSoup
from modules.Word.managers.DictionaryManager import DictionaryManager
import re
@click.command()
@click.option('--url', help='URL to fetch from')
@click.pass_context
def search(ctx, url):
dictionary_manager: DictionaryManager = ctx.obj[DictionaryManager]
... | 30.142857 | 70 | 0.6 | 0 | 0 | 0 | 0 | 913 | 0.865403 | 0 | 0 | 112 | 0.106161 |
404408dcaaf3ec9278595ad0836bc4bc90af7ec0 | 81 | py | Python | asf_search/constants/DATASET/__init__.py | jhkennedy/Discovery-asf_search | 4ec45e8a85cd626ea92f83937df9f8f04e0f7f4f | [
"BSD-3-Clause"
] | null | null | null | asf_search/constants/DATASET/__init__.py | jhkennedy/Discovery-asf_search | 4ec45e8a85cd626ea92f83937df9f8f04e0f7f4f | [
"BSD-3-Clause"
] | 1 | 2021-04-01T16:30:56.000Z | 2021-04-01T16:30:56.000Z | asf_search/constants/DATASET/__init__.py | jhkennedy/Discovery-asf_search | 4ec45e8a85cd626ea92f83937df9f8f04e0f7f4f | [
"BSD-3-Clause"
] | null | null | null | """Datasets to be used in search and related functions"""
from .DATASET import * | 27 | 57 | 0.740741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.703704 |
404411fc8cdef43afe8b983d66104ed1efd7c616 | 16,089 | py | Python | cell2cell/plotting/cci_plot.py | ckmah/cell2cell | ce18bbb63e12f9b1da8699567dec9a2a8b78f824 | [
"BSD-3-Clause"
] | 16 | 2020-09-30T01:53:43.000Z | 2022-03-25T09:58:54.000Z | cell2cell/plotting/cci_plot.py | ckmah/cell2cell | ce18bbb63e12f9b1da8699567dec9a2a8b78f824 | [
"BSD-3-Clause"
] | 2 | 2021-08-09T21:26:54.000Z | 2021-11-08T14:47:39.000Z | cell2cell/plotting/cci_plot.py | ckmah/cell2cell | ce18bbb63e12f9b1da8699567dec9a2a8b78f824 | [
"BSD-3-Clause"
] | 3 | 2021-11-08T07:47:44.000Z | 2022-03-30T18:40:00.000Z | # -*- coding: utf-8 -*-
import matplotlib as mpl
import numpy as np
import pandas as pd
import seaborn as sns
from matplotlib import pyplot as plt
from cell2cell.clustering import compute_linkage
from cell2cell.preprocessing.manipulate_dataframes import check_symmetry
from cell2cell.plotting.aesthetics import map_col... | 38.307143 | 122 | 0.605134 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,388 | 0.459196 |
40465e4dbbb9334d5135c8ffe536947ae617c71d | 1,051 | py | Python | var/spack/repos/builtin.mock/packages/gnuconfig/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin.mock/packages/gnuconfig/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin.mock/packages/gnuconfig/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.package import *
class Gnuconfig(Package):
"""
The GNU config.guess and config.sub scripts... | 29.194444 | 78 | 0.669838 | 811 | 0.771646 | 0 | 0 | 0 | 0 | 0 | 0 | 598 | 0.568982 |
40472eab6c9976684dd368889d9c68536758019e | 378 | py | Python | mp4box/parsing/ctts.py | abhijeetbhagat/mp4box | 841ff0ef70c7f5a96548f47414bba69c00aa2f5e | [
"BSD-3-Clause"
] | 7 | 2019-08-14T03:03:51.000Z | 2021-11-14T19:10:00.000Z | mp4box/parsing/ctts.py | wanyhamo/mp4box | c5c73cd37c01bd9d637f1f3ed82221065dc86d6f | [
"BSD-3-Clause"
] | 10 | 2019-08-03T16:27:08.000Z | 2019-09-10T10:05:23.000Z | mp4box/parsing/ctts.py | abhijeetbhagat/mp4box | 841ff0ef70c7f5a96548f47414bba69c00aa2f5e | [
"BSD-3-Clause"
] | 7 | 2019-08-19T17:58:03.000Z | 2021-03-03T07:25:54.000Z | from mp4box.box import CompositionTimeToSampleBox
def parse_ctts(reader, my_size):
version = reader.read32()
box = CompositionTimeToSampleBox(my_size, version, 0)
box.entry_count = reader.read32()
for _ in range(0, box.entry_count):
box.sample_count.append(reader.read32())
box... | 29.076923 | 58 | 0.693122 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4047883a8f6ee83210f65d3f654ff142172cb4a8 | 24,485 | py | Python | MsLightweaverManager.py | Goobley/MsLightweaver | 6383867ba2a7ab00df947c8470b438d9eadcc321 | [
"MIT"
] | null | null | null | MsLightweaverManager.py | Goobley/MsLightweaver | 6383867ba2a7ab00df947c8470b438d9eadcc321 | [
"MIT"
] | 1 | 2020-05-05T13:49:54.000Z | 2021-04-29T12:41:40.000Z | MsLightweaverManager.py | Goobley/MsLightweaver | 6383867ba2a7ab00df947c8470b438d9eadcc321 | [
"MIT"
] | null | null | null | import pickle
import numpy as np
import matplotlib.pyplot as plt
from lightweaver.rh_atoms import H_6_atom, C_atom, O_atom, OI_ord_atom, Si_atom, Al_atom, Fe_atom, FeI_atom, MgII_atom, N_atom, Na_atom, S_atom, CaII_atom
from lightweaver.atmosphere import Atmosphere, ScaleType
from lightweaver.atomic_table import Defaul... | 37.611367 | 260 | 0.575128 | 20,407 | 0.833449 | 0 | 0 | 830 | 0.033898 | 0 | 0 | 4,380 | 0.178885 |
404999f8afb17c0ba6be91ab0f875db288f28bae | 1,895 | py | Python | common/writeExcel.py | lixiaofeng1993/DjangoBlog | 94d062324367b8a30edf8d29e2e661c822bcb7c1 | [
"MIT"
] | null | null | null | common/writeExcel.py | lixiaofeng1993/DjangoBlog | 94d062324367b8a30edf8d29e2e661c822bcb7c1 | [
"MIT"
] | 6 | 2020-06-06T00:44:08.000Z | 2022-01-13T01:52:46.000Z | common/writeExcel.py | lixiaofeng1993/DjangoBlog | 94d062324367b8a30edf8d29e2e661c822bcb7c1 | [
"MIT"
] | null | null | null | # coding:utf-8
from openpyxl import load_workbook
import openpyxl
from openpyxl.styles import Font, colors
def copy_excel(cese_path, report_path):
"""
复制测试用例到report_path
:param cese_path:
:param report_path:
:return:
"""
wb2 = openpyxl.Workbook()
wb2.save(report_path) # 在设置的路径下创建一个exc... | 28.712121 | 65 | 0.601055 | 770 | 0.363379 | 0 | 0 | 0 | 0 | 0 | 0 | 674 | 0.318075 |
404a28cfcd9e972210d8ead53be99918c37812fc | 1,904 | py | Python | test/cts/tool/CTSConverter/src/nn/specs/V1_1/depthwise_conv2d_float_weights_as_inputs_relaxed.mod.py | zhaoming0/webml-polyfill | 56cf96eff96665da0f5fd7ef86fd5748f4bd22b9 | [
"Apache-2.0"
] | 255 | 2020-05-22T07:45:29.000Z | 2022-03-29T23:58:22.000Z | test/cts/tool/CTSConverter/src/nn/specs/V1_1/depthwise_conv2d_float_weights_as_inputs_relaxed.mod.py | zhaoming0/webml-polyfill | 56cf96eff96665da0f5fd7ef86fd5748f4bd22b9 | [
"Apache-2.0"
] | 5,102 | 2020-05-22T07:48:33.000Z | 2022-03-31T23:43:39.000Z | test/cts/tool/CTSConverter/src/nn/specs/V1_1/depthwise_conv2d_float_weights_as_inputs_relaxed.mod.py | ibelem/webml-polyfill | aaf1ba4f5357eaf6e89bf9990f5bdfb543cd2bc2 | [
"Apache-2.0"
] | 120 | 2020-05-22T07:51:08.000Z | 2022-02-16T19:08:05.000Z | #
# Copyright (C) 2018 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 31.733333 | 74 | 0.56355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,012 | 0.531513 |
404a73f48e1b3ca8bb85958c0c604a1931f4d34f | 1,450 | py | Python | jina/executors/evaluators/rank/recall.py | sdsd0101/jina | 1a835d9015c627a2cbcdc58ee3d127962ada1bc9 | [
"Apache-2.0"
] | 2 | 2020-10-19T17:06:19.000Z | 2020-10-22T14:10:55.000Z | jina/executors/evaluators/rank/recall.py | ayansiddiqui007/jina | 2a764410de47cc11e53c8f652ea1095d5dab5435 | [
"Apache-2.0"
] | null | null | null | jina/executors/evaluators/rank/recall.py | ayansiddiqui007/jina | 2a764410de47cc11e53c8f652ea1095d5dab5435 | [
"Apache-2.0"
] | null | null | null | from typing import Sequence, Any
from jina.executors.evaluators.rank import BaseRankingEvaluator
from jina.executors.evaluators.decorators import as_aggregator
class RecallEvaluator(BaseRankingEvaluator):
"""A :class:`RecallEvaluator` evaluates the Precision of the search.
It computes how many of the firs... | 35.365854 | 117 | 0.648966 | 1,286 | 0.886897 | 0 | 0 | 842 | 0.58069 | 0 | 0 | 598 | 0.412414 |
404be03a1fd1048c68239ebc361551f5a1526980 | 270 | py | Python | tests/schema_mapping/structures/example5.py | danny-vayu/typedpy | e97735a742acbd5f1133e23f08cf43836476686a | [
"MIT"
] | null | null | null | tests/schema_mapping/structures/example5.py | danny-vayu/typedpy | e97735a742acbd5f1133e23f08cf43836476686a | [
"MIT"
] | null | null | null | tests/schema_mapping/structures/example5.py | danny-vayu/typedpy | e97735a742acbd5f1133e23f08cf43836476686a | [
"MIT"
] | null | null | null | from typedpy import Array, DoNotSerialize, Structure, mappers
class Foo(Structure):
i: int
s: str
_serialization_mapper = {"i": "j", "s": "name"}
class Example5(Foo):
a: Array
_serialization_mapper = [{"j": DoNotSerialize}, mappers.TO_LOWERCASE] | 20.769231 | 73 | 0.674074 | 203 | 0.751852 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.066667 |
404bea024a89b873fc6d227cd6a12a54af3b3b8c | 3,447 | py | Python | src/semantic_parsing_with_constrained_lm/eval.py | microsoft/semantic_parsing_with_constrained_lm | 7e3c099500c3102e46d7a47469fe6840580c2b11 | [
"MIT"
] | 17 | 2021-09-22T13:08:37.000Z | 2022-03-27T10:39:53.000Z | src/semantic_parsing_with_constrained_lm/eval.py | microsoft/semantic_parsing_with_constrained_lm | 7e3c099500c3102e46d7a47469fe6840580c2b11 | [
"MIT"
] | 1 | 2022-03-12T01:05:15.000Z | 2022-03-12T01:05:15.000Z | src/semantic_parsing_with_constrained_lm/eval.py | microsoft/semantic_parsing_with_constrained_lm | 7e3c099500c3102e46d7a47469fe6840580c2b11 | [
"MIT"
] | 1 | 2021-12-16T22:26:54.000Z | 2021-12-16T22:26:54.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import dataclasses
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Dict, Generic, List, Optional, Sequence, TypeVar
from semantic_parsing_with_constrained_lm.datum import FullDatum, FullDatumSub
from sema... | 32.214953 | 81 | 0.630403 | 2,114 | 0.613287 | 0 | 0 | 1,930 | 0.559907 | 0 | 0 | 907 | 0.263127 |
404beb06647e2d6fc143a0b58a7a3cacb5877553 | 959 | py | Python | irrigation_control/irrigation_control_py3/common_irrigation_chains_py3.py | bopopescu/docker_images_a | 348d0982c5962f2ae34d10183ed9522b7a6fe286 | [
"MIT"
] | 2 | 2018-02-21T03:46:51.000Z | 2019-12-24T16:40:51.000Z | irrigation_control/irrigation_control_py3/common_irrigation_chains_py3.py | bopopescu/docker_images_a | 348d0982c5962f2ae34d10183ed9522b7a6fe286 | [
"MIT"
] | 7 | 2020-07-16T19:54:08.000Z | 2022-03-02T03:29:07.000Z | irrigation_control/irrigation_control_py3/common_irrigation_chains_py3.py | bopopescu/docker_images_a | 348d0982c5962f2ae34d10183ed9522b7a6fe286 | [
"MIT"
] | 2 | 2018-04-16T07:02:35.000Z | 2020-07-23T21:57:19.000Z |
class Check_Excessive_Current(object):
def __init__(self,chain_name,cf,handlers,irrigation_io,irrigation_hash_control,get_json_object):
self.get_json_object = get_json_object
cf.define_chain(chain_name, False )
#cf.insert.log("check_excessive_current")
cf.insert.ass... | 33.068966 | 100 | 0.691345 | 914 | 0.953076 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.171011 |
404c32173164735222505b93f1ef2b7219cec987 | 8,913 | py | Python | lib/surface/spanner/operations/list.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/surface/spanner/operations/list.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/surface/spanner/operations/list.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2016 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 37.766949 | 95 | 0.674072 | 3,529 | 0.395939 | 0 | 0 | 3,640 | 0.408392 | 0 | 0 | 5,340 | 0.599125 |
404cc5bda9dc3a1cc2cecd17725e8022aeed3ad0 | 49,844 | py | Python | pgmpy/tests/test_models/test_SEM.py | predictive-analytics-lab/pgmpy | 6c2a31641adc72793acd130d007190fdb1632271 | [
"MIT"
] | null | null | null | pgmpy/tests/test_models/test_SEM.py | predictive-analytics-lab/pgmpy | 6c2a31641adc72793acd130d007190fdb1632271 | [
"MIT"
] | null | null | null | pgmpy/tests/test_models/test_SEM.py | predictive-analytics-lab/pgmpy | 6c2a31641adc72793acd130d007190fdb1632271 | [
"MIT"
] | null | null | null | import os
import unittest
import numpy as np
import networkx as nx
import numpy.testing as npt
from pgmpy.models import SEM, SEMGraph, SEMAlg
class TestSEM(unittest.TestCase):
def test_from_graph(self):
self.demo = SEM.from_graph(
ebunch=[
("xi1", "x1"),
("xi1... | 41.536667 | 100 | 0.455862 | 49,691 | 0.99693 | 0 | 0 | 0 | 0 | 0 | 0 | 7,272 | 0.145895 |
404d173b85da7aa2302b72d549875f4086a67bcc | 1,790 | py | Python | data_scripts/translation.py | wangcongcong123/transection | 3b931ce09c9b5e03ec6afdea6f58a317ad07361b | [
"MIT"
] | 4 | 2021-01-11T06:21:27.000Z | 2021-12-19T17:49:07.000Z | data_scripts/translation.py | wangcongcong123/transection | 3b931ce09c9b5e03ec6afdea6f58a317ad07361b | [
"MIT"
] | null | null | null | data_scripts/translation.py | wangcongcong123/transection | 3b931ce09c9b5e03ec6afdea6f58a317ad07361b | [
"MIT"
] | 2 | 2021-01-21T02:48:49.000Z | 2021-03-19T09:45:52.000Z | # coding=utf-8
# This script is finished following HF's datasets' template:
# https://github.com/huggingface/datasets/blob/master/templates/new_dataset_script.py
# More examples as references to write a customized dataset can be found here:
# https://github.com/huggingface/datasets/tree/master/datasets
from __future__... | 32.545455 | 103 | 0.622346 | 1,264 | 0.706145 | 313 | 0.17486 | 0 | 0 | 0 | 0 | 505 | 0.282123 |
404f20db207c728bba35266d11df1248aa4d138a | 7,941 | py | Python | utils/chat_formatting.py | lyricalpaws/snekbot | 704197777dbaa284d163a95642e224d6efe2c4b2 | [
"MIT"
] | 13 | 2018-11-26T15:55:28.000Z | 2022-02-05T16:07:02.000Z | utils/chat_formatting.py | lyricalpaws/snekbot | 704197777dbaa284d163a95642e224d6efe2c4b2 | [
"MIT"
] | 8 | 2018-11-12T19:04:01.000Z | 2018-11-23T15:11:55.000Z | utils/chat_formatting.py | lyricalpaws/snekbot | 704197777dbaa284d163a95642e224d6efe2c4b2 | [
"MIT"
] | 23 | 2019-01-01T23:53:37.000Z | 2022-03-12T14:52:45.000Z | import itertools
from typing import Sequence, Iterator
# Source: https://github.com/Cog-Creators/Red-DiscordBot/blob/V3/develop/redbot/core/utils/chat_formatting.py
def error(text: str) -> str:
"""Get text prefixed with an error emoji.
Returns
-------
str
The new message.
"""
return "... | 27.28866 | 109 | 0.546783 | 0 | 0 | 2,301 | 0.289325 | 0 | 0 | 0 | 0 | 4,223 | 0.530995 |
404ff68f947024e93fe50b765fa029be24f36c84 | 35,410 | py | Python | strategy/trade/strategymargintrade.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | strategy/trade/strategymargintrade.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | strategy/trade/strategymargintrade.py | firebird631/siis | 8d64e8fb67619aaa5c0a62fda9de51dedcd47796 | [
"PostgreSQL"
] | null | null | null | # @date 2018-12-28
# @author Frederic Scherma, All rights reserved without prejudices.
# @license Copyright (c) 2018 Dream Overflow
# Strategy trade for margin with multiples positions.
from __future__ import annotations
from typing import TYPE_CHECKING, Optional, Tuple
if TYPE_CHECKING:
from trader.trader impor... | 37.352321 | 119 | 0.553347 | 34,719 | 0.980486 | 0 | 0 | 127 | 0.003587 | 0 | 0 | 7,465 | 0.210816 |
4050379eb6d6d6226db82e9fbcbba3933c358e43 | 718 | py | Python | src/pyramid_debugtoolbar_api_sqlalchemy/__init__.py | jvanasco/pyramid_debugtoolbar_api_sqla | 286a7e4ee32e7dd64f31813c46d59e0651534cbd | [
"MIT"
] | null | null | null | src/pyramid_debugtoolbar_api_sqlalchemy/__init__.py | jvanasco/pyramid_debugtoolbar_api_sqla | 286a7e4ee32e7dd64f31813c46d59e0651534cbd | [
"MIT"
] | null | null | null | src/pyramid_debugtoolbar_api_sqlalchemy/__init__.py | jvanasco/pyramid_debugtoolbar_api_sqla | 286a7e4ee32e7dd64f31813c46d59e0651534cbd | [
"MIT"
] | null | null | null | # local
from .panels import SqlalchemyCsvDebugPanel
__VERSION__ = "0.3.1"
# ==============================================================================
def includeme(config):
"""
Pyramid hook to install this debugtoolbar plugin.
Update your ENVIRONMENT.ini file
debugtoolbar.includes = pyr... | 24.758621 | 80 | 0.558496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 475 | 0.66156 |
4050460227ae968820c1eb94e5dff24549e4e557 | 1,165 | py | Python | ultron/utilities/zlib_engine.py | wangjiehui11235/ultron | ade46fdcff7eaf01187cdf9b9fb1d6a04ae972b7 | [
"Apache-2.0"
] | 4 | 2019-06-06T09:38:49.000Z | 2022-01-29T00:02:11.000Z | ultron/utilities/zlib_engine.py | wangjiehui11235/ultron | ade46fdcff7eaf01187cdf9b9fb1d6a04ae972b7 | [
"Apache-2.0"
] | 1 | 2022-02-11T03:43:10.000Z | 2022-02-11T03:43:10.000Z | ultron/utilities/zlib_engine.py | wangjiehui11235/ultron | ade46fdcff7eaf01187cdf9b9fb1d6a04ae972b7 | [
"Apache-2.0"
] | 8 | 2019-06-02T13:11:00.000Z | 2021-11-11T01:06:22.000Z | # -*- coding: utf-8 -*-
import os,os.path
import zipfile
def zip_compress(dir_name, zip_filename):
filelist = []
if os.path.isfile(dir_name):
filelist.append(dir_name)
else :
for root, dirs, files in os.walk(dir_name):
for name in files:
filelist.append(os.path.... | 32.361111 | 66 | 0.581974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.034335 |
4050b29c16a41f96705714cdbf17492431b85f0e | 1,985 | py | Python | scripts/instances2inventory.py | TipaZloy/coda-automation | 20c00a92f2e3088e205677c0db96b3ed5c82b238 | [
"Apache-2.0"
] | null | null | null | scripts/instances2inventory.py | TipaZloy/coda-automation | 20c00a92f2e3088e205677c0db96b3ed5c82b238 | [
"Apache-2.0"
] | null | null | null | scripts/instances2inventory.py | TipaZloy/coda-automation | 20c00a92f2e3088e205677c0db96b3ed5c82b238 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import boto
import boto.ec2
import sys
from pprint import pprint
from collections import defaultdict
output = defaultdict(lambda: [])
comments = defaultdict(lambda: {})
skip_region_strings = ['us-gov', 'cn-', 'ca-']
#skip_region_strings = ['us-gov', 'cn-', 'ca-', 'eu-', 'ap-']
if len(sys.arg... | 25.126582 | 144 | 0.602519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 341 | 0.171788 |
4050f12cd3fda3e62426b196e960faffe455d7f7 | 938 | py | Python | selfdrive/crash.py | darknight111/openpilot3 | a0c755fbe1889f26404a8225816f57e89fde7bc2 | [
"MIT"
] | 19 | 2020-08-05T12:11:58.000Z | 2022-03-07T01:18:56.000Z | selfdrive/crash.py | darknight111/openpilot3 | a0c755fbe1889f26404a8225816f57e89fde7bc2 | [
"MIT"
] | 18 | 2020-08-20T05:17:38.000Z | 2021-12-06T09:02:00.000Z | selfdrive/crash.py | darknight111/openpilot3 | a0c755fbe1889f26404a8225816f57e89fde7bc2 | [
"MIT"
] | 25 | 2020-08-30T09:10:14.000Z | 2022-02-20T02:31:13.000Z | """Install exception handler for process crash."""
from selfdrive.swaglog import cloudlog
from selfdrive.version import version
import sentry_sdk
from sentry_sdk.integrations.threading import ThreadingIntegration
def capture_exception(*args, **kwargs) -> None:
cloudlog.error("crash", exc_info=kwargs.get('exc_info',... | 33.5 | 102 | 0.735608 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.229211 |
4051ffa508f128d4ca3a6951f908adec0dd2fce3 | 1,235 | py | Python | 0000_examples/grasping_antipodal_planning.py | huzhengtao14z/wrs | d567787ca41818f1756c325b304215faf7f10f29 | [
"MIT"
] | null | null | null | 0000_examples/grasping_antipodal_planning.py | huzhengtao14z/wrs | d567787ca41818f1756c325b304215faf7f10f29 | [
"MIT"
] | null | null | null | 0000_examples/grasping_antipodal_planning.py | huzhengtao14z/wrs | d567787ca41818f1756c325b304215faf7f10f29 | [
"MIT"
] | null | null | null | import math
import visualization.panda.world as wd
import modeling.geometric_model as gm
import modeling.collision_model as cm
import grasping.planning.antipodal as gpa
import robot_sim.end_effectors.grippers.yumi_gripper.yumi_gripper as yg
base = wd.World(cam_pos=[1, 1, 1],w=960,
h=540, lookat_pos=[0... | 44.107143 | 95 | 0.701215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.063158 |
40544e3050932f38de418744707458dee5d3337b | 60,103 | py | Python | keystone/assignment/core.py | pritha-srivastava/keystone | 69abe058328954becdea13cc245459f2ba2342fc | [
"Apache-2.0"
] | null | null | null | keystone/assignment/core.py | pritha-srivastava/keystone | 69abe058328954becdea13cc245459f2ba2342fc | [
"Apache-2.0"
] | null | null | null | keystone/assignment/core.py | pritha-srivastava/keystone | 69abe058328954becdea13cc245459f2ba2342fc | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 44.520741 | 79 | 0.606842 | 58,450 | 0.972497 | 0 | 0 | 54,447 | 0.905895 | 0 | 0 | 23,790 | 0.395821 |
4059ed80d6a8d54038d707dea3406a21f8501339 | 3,193 | py | Python | single-shot-pose/lib/linemod_dataset.py | take-cheeze/models | 3ded8fd062c57f20f6154cac2dd0d998181de755 | [
"MIT"
] | 112 | 2018-04-18T07:13:03.000Z | 2022-03-11T03:36:34.000Z | single-shot-pose/lib/linemod_dataset.py | take-cheeze/models | 3ded8fd062c57f20f6154cac2dd0d998181de755 | [
"MIT"
] | 16 | 2018-05-11T11:41:08.000Z | 2021-04-24T03:50:54.000Z | single-shot-pose/lib/linemod_dataset.py | take-cheeze/models | 3ded8fd062c57f20f6154cac2dd0d998181de755 | [
"MIT"
] | 45 | 2018-04-18T07:13:06.000Z | 2021-12-22T03:46:18.000Z | import numpy as np
import os
from chainercv.chainer_experimental.datasets.sliceable import GetterDataset
from chainercv.utils import read_image
linemod_object_diameters = {
'ape': 0.103,
'benchvise': 0.286908,
'cam': 0.173,
'can': 0.202,
'cat': 0.155,
'driller': 0.262,
'duck': 0.109,
... | 30.409524 | 75 | 0.551832 | 1,816 | 0.568744 | 0 | 0 | 0 | 0 | 0 | 0 | 277 | 0.086752 |
405b957bd7045b5d856865ed3de04736c0fcea38 | 10,857 | py | Python | DQM/BeamMonitor/test/44X_beam_dqm_sourceclient-live_cfg.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | DQM/BeamMonitor/test/44X_beam_dqm_sourceclient-live_cfg.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | DQM/BeamMonitor/test/44X_beam_dqm_sourceclient-live_cfg.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
process = cms.Process("BeamMonitor")
#----------------------------
# Common part for PP and H.I Running
#-----------------------------
process.load("DQM.Integration.test.inputsource_cfi")
#--------------------------
# HLT Filter
process.load("HLTrigger.special.HLTTriggerType... | 42.410156 | 127 | 0.644377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,040 | 0.280004 |
405c6e44b37edbad093dd87de80a9e8b880c990d | 3,036 | py | Python | tests/routes/test_hackers.py | TorrentofShame/hackathon-2021-backend | a85989421df8ad900b01ad026dbe713312b0a54e | [
"MIT"
] | null | null | null | tests/routes/test_hackers.py | TorrentofShame/hackathon-2021-backend | a85989421df8ad900b01ad026dbe713312b0a54e | [
"MIT"
] | null | null | null | tests/routes/test_hackers.py | TorrentofShame/hackathon-2021-backend | a85989421df8ad900b01ad026dbe713312b0a54e | [
"MIT"
] | null | null | null | # flake8: noqa
import json
from src.models.hacker import Hacker
from tests.base import BaseTestCase
from datetime import datetime
class TestHackersBlueprint(BaseTestCase):
"""Tests for the Hackers Endpoints"""
"""create_hacker"""
def test_create_hacker(self):
now = datetime.now()
res = s... | 28.641509 | 96 | 0.560606 | 2,903 | 0.956192 | 0 | 0 | 0 | 0 | 0 | 0 | 626 | 0.206192 |
405e5ce74a48720ac95f86fcad8f93d05cb3edfc | 13,330 | py | Python | open_cp/sources/chicago.py | sumau/PredictCode | e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8 | [
"Artistic-2.0"
] | 18 | 2017-04-19T09:17:19.000Z | 2021-05-24T08:53:28.000Z | open_cp/sources/chicago.py | sumau/PredictCode | e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8 | [
"Artistic-2.0"
] | 8 | 2017-06-11T17:46:35.000Z | 2021-06-07T10:49:10.000Z | open_cp/sources/chicago.py | sumau/PredictCode | e2a2d5a8fa5d83f011c33e18d4ce6ac7e1429aa8 | [
"Artistic-2.0"
] | 10 | 2017-07-19T18:29:37.000Z | 2020-11-12T22:06:45.000Z | """
sources.chicago
===============
Reads a CSV file in the format (as of April 2017) of data available from:
- https://catalog.data.gov/dataset/crimes-one-year-prior-to-present-e171f
- https://catalog.data.gov/dataset/crimes-2001-to-present-398a4
The default data is loaded from a file "chicago.csv" which should be ... | 37.130919 | 113 | 0.641485 | 0 | 0 | 1,107 | 0.083046 | 0 | 0 | 0 | 0 | 6,533 | 0.490098 |
405e96dac8375ff59b836544a212c81d70fbb3ff | 2,140 | py | Python | Codility/Lesson/0011.Sieve-of-Eratosthenes/CountSemiprimes/CountSemiprimes.py | kimi0230/LeetcodeGolang | 2b276e49b67d7f66731ce6c629cd1390642af230 | [
"MIT"
] | 4 | 2021-07-21T01:16:11.000Z | 2022-01-11T07:43:51.000Z | Codility/Lesson/0011.Sieve-of-Eratosthenes/CountSemiprimes/CountSemiprimes.py | kimi0230/LeetcodeGolang | 2b276e49b67d7f66731ce6c629cd1390642af230 | [
"MIT"
] | null | null | null | Codility/Lesson/0011.Sieve-of-Eratosthenes/CountSemiprimes/CountSemiprimes.py | kimi0230/LeetcodeGolang | 2b276e49b67d7f66731ce6c629cd1390642af230 | [
"MIT"
] | null | null | null | # https://github.com/Anfany/Codility-Lessons-By-Python3/blob/master/L11_Sieve%20of%20Eratosthenes/11.2%20CountSemiprimes.md
def solution(N, P, Q):
"""
返回由数组P、Q的元素组成的区间内,不大于N的半素数的个数, 时间复杂度O(N * log(log(N)) + M)
:param N: 半素数的最大值
:param P: 数组
:param Q: 数组
:return: 每次查询,得到的半素数的个数
"""
# 半素数... | 33.4375 | 191 | 0.482243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,045 | 0.425142 |
4060cef76afd120f8b88cf8abb7104b1c967dfca | 2,614 | py | Python | src/zope/formlib/errors.py | zopefoundation/zope.formlib | af2d587a6eb24e59e95a8b1feb7aafc5d3b87ba4 | [
"ZPL-2.1"
] | 4 | 2018-05-09T04:16:25.000Z | 2021-03-05T17:27:21.000Z | src/zope/formlib/errors.py | zopefoundation/zope.formlib | af2d587a6eb24e59e95a8b1feb7aafc5d3b87ba4 | [
"ZPL-2.1"
] | 25 | 2016-03-24T15:23:08.000Z | 2021-03-05T16:53:53.000Z | src/zope/formlib/errors.py | zopefoundation/zope.formlib | af2d587a6eb24e59e95a8b1feb7aafc5d3b87ba4 | [
"ZPL-2.1"
] | 5 | 2015-02-11T13:32:06.000Z | 2018-05-09T04:16:26.000Z | ##############################################################################
#
# Copyright (c) 2006 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... | 34.394737 | 78 | 0.653405 | 1,343 | 0.513772 | 0 | 0 | 1,464 | 0.560061 | 0 | 0 | 1,122 | 0.429227 |
4061946ebfbadada4a68b023604bd5475c508749 | 6,090 | py | Python | src/packagedcode/about.py | sthagen/nexB-scancode-toolkit | 12cc1286df78af898fae76fa339da2bb50ad51b9 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | src/packagedcode/about.py | sthagen/nexB-scancode-toolkit | 12cc1286df78af898fae76fa339da2bb50ad51b9 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | src/packagedcode/about.py | sthagen/nexB-scancode-toolkit | 12cc1286df78af898fae76fa339da2bb50ad51b9 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | #
# Copyright (c) nexB Inc. and others. All rights reserved.
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/scancode-toolkit for support or download.
# See https://aboutcode.org for more in... | 36.25 | 98 | 0.621182 | 5,100 | 0.837438 | 4,769 | 0.783087 | 4,803 | 0.78867 | 0 | 0 | 1,696 | 0.278489 |
4061e49b5b1d7dddbcbb3f8df2b62b73c065877a | 2,359 | py | Python | gazepattern/eyedetector/admin.py | AriRodriguezCruz/mcfgpr | c6f83f8e68bbab0054a7ea337feab276fc0790fc | [
"MIT"
] | null | null | null | gazepattern/eyedetector/admin.py | AriRodriguezCruz/mcfgpr | c6f83f8e68bbab0054a7ea337feab276fc0790fc | [
"MIT"
] | 12 | 2020-06-05T22:56:39.000Z | 2022-02-10T10:35:13.000Z | gazepattern/eyedetector/admin.py | AriRodriguezCruz/mcfgpr | c6f83f8e68bbab0054a7ea337feab276fc0790fc | [
"MIT"
] | 1 | 2019-10-06T23:40:45.000Z | 2019-10-06T23:40:45.000Z | # -*- coding: utf-8 -*-
#django
from django.contrib import admin
from django.db import transaction
#python
import csv
from decimal import Decimal
#gazepattern
from .models import Experiment, ExperimentPoint, Image, ImageRectangle, ExperimentPointCSV, ExperimentFunction
@transaction.atomic
def procesar(modeladmin, req... | 31.878378 | 110 | 0.676982 | 820 | 0.347605 | 0 | 0 | 836 | 0.354387 | 0 | 0 | 299 | 0.126749 |
4061ef1026efc595fdfdf42014af88613e5012a6 | 2,634 | py | Python | orders/tests/test_views.py | ms0680146/Order_System | 934c3849ad0d72c0ce560706a6857870935e8599 | [
"MIT"
] | null | null | null | orders/tests/test_views.py | ms0680146/Order_System | 934c3849ad0d72c0ce560706a6857870935e8599 | [
"MIT"
] | null | null | null | orders/tests/test_views.py | ms0680146/Order_System | 934c3849ad0d72c0ce560706a6857870935e8599 | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.urls import reverse
from orders.models import Order, OrderItem
from datetime import datetime
from django.utils.timezone import get_current_timezone
import pytz
class TestViews(TestCase):
def setUp(self):
self.client = Client()
def test_home_GET... | 34.207792 | 118 | 0.612756 | 2,420 | 0.918755 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 0.109339 |
406203c920d38242adfa5e5ed2a39070a52fd1c1 | 373 | py | Python | codigo/hexagonal/app/adapter/light_bulb_repository.py | VulturARG/charla_01 | 43a53fded4f3205a02b00993a523e2f94b79fc99 | [
"Apache-2.0"
] | null | null | null | codigo/hexagonal/app/adapter/light_bulb_repository.py | VulturARG/charla_01 | 43a53fded4f3205a02b00993a523e2f94b79fc99 | [
"Apache-2.0"
] | null | null | null | codigo/hexagonal/app/adapter/light_bulb_repository.py | VulturARG/charla_01 | 43a53fded4f3205a02b00993a523e2f94b79fc99 | [
"Apache-2.0"
] | null | null | null | from codigo.hexagonal.app.domain.switchable_repository import Switchable
class LightBulb(Switchable):
def turn_on(self) -> bool:
print("Connecting with the device...")
print("The light is on")
return True
def turn_off(self) -> bool:
print("The light is off")
print("Dis... | 26.642857 | 72 | 0.646113 | 297 | 0.796247 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.268097 |
4062ba894ee618c56f6c5822e3859495a6c3298f | 541 | py | Python | aula12/ex1.py | otaviobizulli/python-exercices | 2c61f014bf481fa463721b174ddd4238bf8d0cb3 | [
"MIT"
] | null | null | null | aula12/ex1.py | otaviobizulli/python-exercices | 2c61f014bf481fa463721b174ddd4238bf8d0cb3 | [
"MIT"
] | null | null | null | aula12/ex1.py | otaviobizulli/python-exercices | 2c61f014bf481fa463721b174ddd4238bf8d0cb3 | [
"MIT"
] | null | null | null | from random import randint
menor = 100
linha = 0
maior = 0
m = []
for i in range(10):
m.append([])
for j in range(10):
m[i].append(randint(1,99))
for i in range(10):
for j in range(10):
print(f'{m[i][j]:2}',end=' ')
print()
for i in range(10):
for j in range(10):
if m[i][j... | 16.393939 | 76 | 0.51756 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.160517 |
4063e065b5e1d8a9952507fe4d95419e55a2613a | 1,153 | py | Python | src/token_classification/format.py | adriens63/BERT_fine_tuning_for_MLM_and_token_classification | 89ff0d8ed12da370b1f8757ae9db8d725143a5bb | [
"Apache-2.0"
] | null | null | null | src/token_classification/format.py | adriens63/BERT_fine_tuning_for_MLM_and_token_classification | 89ff0d8ed12da370b1f8757ae9db8d725143a5bb | [
"Apache-2.0"
] | 1 | 2021-12-10T15:26:05.000Z | 2021-12-10T15:26:05.000Z | src/token_classification/format.py | adriens63/BERT_fine_tuning_for_MLM_and_token_classification | 89ff0d8ed12da370b1f8757ae9db8d725143a5bb | [
"Apache-2.0"
] | 3 | 2021-12-05T12:43:23.000Z | 2021-12-10T15:42:40.000Z | import os.path as osp
import argparse
import yaml
from src.token_classification.archs.data_formatter import *
# ********************* launch formating ***********************
# cmd to launch : python -m src.token_classification.format --config ./src/token_classification/config/config.yml
if __name__ == '__main__... | 32.942857 | 142 | 0.674761 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.386817 |
4063f5350f19ec0fcf289e841719b7191b72872c | 6,393 | py | Python | add.py | cleolepart/timedomain | 340e3fa614bca2dc333c9723893951318356dccf | [
"MIT"
] | null | null | null | add.py | cleolepart/timedomain | 340e3fa614bca2dc333c9723893951318356dccf | [
"MIT"
] | null | null | null | add.py | cleolepart/timedomain | 340e3fa614bca2dc333c9723893951318356dccf | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import os, sys, time
import numpy as np
import scipy.sparse
import scipy.linalg
import scipy.sparse.linalg
from astropy.table import Table, Column
import multiprocessing
from desiutil.log import get_logger
from desispec.interpolation import resample... | 40.980769 | 126 | 0.552323 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 936 | 0.14641 |
40642da36f0613fe957f14edea19df84f13b530a | 2,525 | py | Python | pontoon/pretranslation/tests/test_pretranslate.py | timvisee/pontoon | aec1ef7b5c5d56c3be28fecf1147945d2622bbad | [
"BSD-3-Clause"
] | null | null | null | pontoon/pretranslation/tests/test_pretranslate.py | timvisee/pontoon | aec1ef7b5c5d56c3be28fecf1147945d2622bbad | [
"BSD-3-Clause"
] | null | null | null | pontoon/pretranslation/tests/test_pretranslate.py | timvisee/pontoon | aec1ef7b5c5d56c3be28fecf1147945d2622bbad | [
"BSD-3-Clause"
] | null | null | null | from mock import patch
import pytest
from pontoon.base.models import User
from pontoon.pretranslation.pretranslate import get_translations
from pontoon.test.factories import (
EntityFactory,
TranslationMemoryFactory,
)
@patch("pontoon.pretranslation.pretranslate.get_google_translate_data")
@pytest.mark.djan... | 34.121622 | 87 | 0.693069 | 0 | 0 | 0 | 0 | 2,293 | 0.908119 | 0 | 0 | 499 | 0.197624 |
406526a2d40a76aa8b9a7ce0c6aadecb3ce65af4 | 9,615 | py | Python | cubes/common.py | digitalsatori/cubes | 140133e8c2e3f2ff60631cc3ebc9966d16c1655e | [
"MIT"
] | 1,020 | 2015-01-02T03:05:26.000Z | 2022-02-12T18:48:51.000Z | cubes/common.py | digitalsatori/cubes | 140133e8c2e3f2ff60631cc3ebc9966d16c1655e | [
"MIT"
] | 259 | 2015-01-02T22:35:14.000Z | 2021-09-02T04:20:41.000Z | cubes/common.py | digitalsatori/cubes | 140133e8c2e3f2ff60631cc3ebc9966d16c1655e | [
"MIT"
] | 288 | 2015-01-08T00:42:26.000Z | 2022-03-31T17:25:10.000Z | # -*- encoding: utf-8 -*-
"""Utility functions for computing combinations of dimensions and hierarchy
levels"""
from __future__ import absolute_import
import re
import os.path
import json
from collections import OrderedDict
from .errors import ModelInconsistencyError, ArgumentError, ConfigurationError
from . impor... | 30.141066 | 83 | 0.584191 | 1,843 | 0.19156 | 0 | 0 | 0 | 0 | 0 | 0 | 3,552 | 0.369192 |
40665e1c58be6db40c3e5c0613a58755896c8a6f | 4,366 | py | Python | wavenet_iaf.py | Ella77/ClariNet | 1a2eea899f5c28b34beb6fb08725f38309e7e053 | [
"MIT"
] | 126 | 2019-05-23T03:37:43.000Z | 2021-08-02T20:15:22.000Z | wavenet_iaf.py | Ella77/ClariNet | 1a2eea899f5c28b34beb6fb08725f38309e7e053 | [
"MIT"
] | 4 | 2019-06-05T11:30:51.000Z | 2022-03-17T09:01:29.000Z | wavenet_iaf.py | Ella77/ClariNet | 1a2eea899f5c28b34beb6fb08725f38309e7e053 | [
"MIT"
] | 24 | 2019-05-23T03:37:39.000Z | 2021-12-23T22:29:01.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from modules import Conv, ResBlock
class Wavenet_Student(nn.Module):
def __init__(self, num_blocks_student=[1, 1, 1, 1, 1, 1], num_layers=10,
front_channels=32, residual_channels=64, gate_channels=128, skip_channels=64,
... | 39.690909 | 111 | 0.584517 | 4,258 | 0.975263 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.003665 |
4066b6af1e7dfd680248198011c778dca827452b | 828 | py | Python | tests/__init__.py | ybelleguic/openbrokerapi | 9d6019dd1b6649c9d0cb0dee4b3236e0ee209dbc | [
"MIT"
] | 36 | 2017-10-06T15:16:21.000Z | 2021-07-30T16:25:59.000Z | tests/__init__.py | ybelleguic/openbrokerapi | 9d6019dd1b6649c9d0cb0dee4b3236e0ee209dbc | [
"MIT"
] | 167 | 2017-09-28T23:38:33.000Z | 2022-03-28T21:18:49.000Z | tests/__init__.py | ybelleguic/openbrokerapi | 9d6019dd1b6649c9d0cb0dee4b3236e0ee209dbc | [
"MIT"
] | 26 | 2017-09-29T13:46:38.000Z | 2022-01-05T08:49:25.000Z | try:
from gevent import monkey
monkey.patch_all()
except ImportError:
# fine if no gevent is available
pass
import base64
import logging
from unittest.mock import Mock
from flask.app import Flask
from flask_testing import TestCase
from openbrokerapi.api import BrokerCredentials
from openbrokerapi.log... | 23.657143 | 67 | 0.641304 | 479 | 0.578502 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.066425 |
4067311b4e6925a510e59163839cef51d453a910 | 5,234 | py | Python | ansible/lib/ansible/modules/extras/network/f5/bigip_gtm_wide_ip.py | kiv-box/kafka | debec1c4bc8c43776070ee447a53b55fef42bd52 | [
"Apache-2.0"
] | null | null | null | ansible/lib/ansible/modules/extras/network/f5/bigip_gtm_wide_ip.py | kiv-box/kafka | debec1c4bc8c43776070ee447a53b55fef42bd52 | [
"Apache-2.0"
] | null | null | null | ansible/lib/ansible/modules/extras/network/f5/bigip_gtm_wide_ip.py | kiv-box/kafka | debec1c4bc8c43776070ee447a53b55fef42bd52 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Michael Perzel
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at you... | 31.914634 | 97 | 0.643676 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,564 | 0.489874 |
4067cec9a6ceb8438c7e66edc2d29eb2148964ae | 1,323 | py | Python | sql/src/test/resources/joins/create_sample_table.py | MichelaSalvemini/Modelli_project | b70d505f9c3fef4a5f857fdccaa60b1b64c8a71d | [
"Apache-2.0"
] | 677 | 2016-01-04T04:05:50.000Z | 2022-03-24T06:37:27.000Z | sql/src/test/resources/joins/create_sample_table.py | MichelaSalvemini/Modelli_project | b70d505f9c3fef4a5f857fdccaa60b1b64c8a71d | [
"Apache-2.0"
] | 249 | 2015-12-29T03:41:31.000Z | 2020-09-02T03:11:30.000Z | sql/src/test/resources/joins/create_sample_table.py | MichelaSalvemini/Modelli_project | b70d505f9c3fef4a5f857fdccaa60b1b64c8a71d | [
"Apache-2.0"
] | 148 | 2015-12-29T03:25:48.000Z | 2021-08-25T03:59:52.000Z | #! /usr/bin/env python
from __future__ import print_function
import pandas as pd
import numpy as np
import argparse
def generate_csv(start_index, fname):
cols = [
str('A' + str(i)) for i in range(start_index, NUM_COLS + start_index)
]
data = []
for i in range(NUM_ROWS):
vals = (np.ra... | 30.068182 | 77 | 0.670446 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 235 | 0.177627 |
4067fffb2bd9b7aaa8d3273ea742884e5f876e2d | 1,219 | py | Python | Advanced/1- Introduction/5- Index_words.py | AlirezaMojtabavi/Python_Practice | c0128d6ce4cf172d93cc4e48861e7980e8e016a2 | [
"MIT"
] | null | null | null | Advanced/1- Introduction/5- Index_words.py | AlirezaMojtabavi/Python_Practice | c0128d6ce4cf172d93cc4e48861e7980e8e016a2 | [
"MIT"
] | null | null | null | Advanced/1- Introduction/5- Index_words.py | AlirezaMojtabavi/Python_Practice | c0128d6ce4cf172d93cc4e48861e7980e8e016a2 | [
"MIT"
] | 1 | 2020-11-14T07:19:26.000Z | 2020-11-14T07:19:26.000Z |
indexWords = list()
def PreviousWord(_list, _word):
if _list[_list.index(_word)-1] :
return _list[_list.index(_word)-1]
else:
return
phrase = str(input())
phraseList = phrase.split(" ")
length = len(phraseList)
for item in phraseList :
item = item.strip()
if phrase != "" :
fo... | 31.25641 | 74 | 0.538966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.031993 |
40686bfbfab402b52cf133e6f6f5366a147289d1 | 14,107 | py | Python | appengine/findit/handlers/test/completed_build_pubsub_ingestor_test.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/handlers/test/completed_build_pubsub_ingestor_test.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | 4 | 2022-03-17T18:58:21.000Z | 2022-03-17T18:58:22.000Z | appengine/findit/handlers/test/completed_build_pubsub_ingestor_test.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import base64
import json
import mock
import webapp2
from google.appengine.api import taskqueue
from go.chromium.org.luci.buildbucket.proto.build_pb2 impor... | 40.654179 | 78 | 0.607712 | 13,518 | 0.958248 | 0 | 0 | 13,228 | 0.937691 | 0 | 0 | 3,741 | 0.265187 |
40686c4879d63aced85e26a35f076b9028592fdb | 24,660 | py | Python | sdk/python/pulumi_azure_native/containerservice/v20191027preview/open_shift_managed_cluster.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/containerservice/v20191027preview/open_shift_managed_cluster.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/containerservice/v20191027preview/open_shift_managed_cluster.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 47.514451 | 856 | 0.679927 | 24,181 | 0.980576 | 0 | 0 | 18,975 | 0.769465 | 0 | 0 | 10,258 | 0.415977 |
40686f7cd56545ec9981f33c3903dd74fd6b1048 | 326 | py | Python | django_drf_server/quiz/migrations/0017_remove_quiz_questions.py | pammalPrasanna/quizie | 3c03552c39ef3d7e613f5b613479df4ef8d44ac1 | [
"MIT"
] | null | null | null | django_drf_server/quiz/migrations/0017_remove_quiz_questions.py | pammalPrasanna/quizie | 3c03552c39ef3d7e613f5b613479df4ef8d44ac1 | [
"MIT"
] | null | null | null | django_drf_server/quiz/migrations/0017_remove_quiz_questions.py | pammalPrasanna/quizie | 3c03552c39ef3d7e613f5b613479df4ef8d44ac1 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-06-17 02:01
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('quiz', '0016_auto_20210617_0724'),
]
operations = [
migrations.RemoveField(
model_name='quiz',
name='questions',
),
... | 18.111111 | 47 | 0.588957 | 241 | 0.739264 | 0 | 0 | 0 | 0 | 0 | 0 | 95 | 0.291411 |
4069e772d72345dc8c5aa0533940bffe33f5921a | 18,348 | py | Python | main.py | khan-git/webRecipies | 4fa9f9bc3c9809f82c5c8fd94dbb604da3443dcb | [
"MIT"
] | null | null | null | main.py | khan-git/webRecipies | 4fa9f9bc3c9809f82c5c8fd94dbb604da3443dcb | [
"MIT"
] | null | null | null | main.py | khan-git/webRecipies | 4fa9f9bc3c9809f82c5c8fd94dbb604da3443dcb | [
"MIT"
] | null | null | null | # -*- coding: iso-8859-1 -*-
import os
import shutil
import datetime
import sqlite3
from flask import Flask, request, session, render_template, g, redirect, url_for, abort, flash, make_response
from random import randint
import json
import urllib2
import json
from json.decoder import JSONObject
from werkzeug.utils imp... | 33 | 150 | 0.601373 | 0 | 0 | 0 | 0 | 12,285 | 0.669555 | 0 | 0 | 5,343 | 0.291203 |