hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1e2fe28bdba3c11579d9119dd5193c9ed892645c | 201,951 | py | Python | bios_pnp/vendors.py | neverware-mirrors/bios_pnp | 56a12a94a536c43ca1a071e6ed502ee3d7400323 | [
"Apache-2.0"
] | null | null | null | bios_pnp/vendors.py | neverware-mirrors/bios_pnp | 56a12a94a536c43ca1a071e6ed502ee3d7400323 | [
"Apache-2.0"
] | null | null | null | bios_pnp/vendors.py | neverware-mirrors/bios_pnp | 56a12a94a536c43ca1a071e6ed502ee3d7400323 | [
"Apache-2.0"
] | 2 | 2018-03-29T01:19:03.000Z | 2021-01-16T14:06:21.000Z | # THIS FILE WAS AUTOGENERATED BY make_vendor_list.py!
# pylint: disable=line-too-long,missing-docstring,too-many-lines
# yapf: disable
import datetime
from bios_pnp import pnp
VENDORS = {
"BUT": pnp.Vendor("21ST CENTURY ENTERTAINMENT", "BUT", datetime.date(2002, 4, 25)),
"TTL": pnp.Vendor("2-Tel B.V", "TTL", da... | 81.794654 | 138 | 0.630163 |
1e31aafbd6d3baac6fea5ff1008384c247a90db7 | 568 | py | Python | ABC/ABC126/abc126_d.py | yatabis/AtCoder-in-Python3 | cc2948853b549a6b8f39df5685c9e84cda81499d | [
"MIT"
] | null | null | null | ABC/ABC126/abc126_d.py | yatabis/AtCoder-in-Python3 | cc2948853b549a6b8f39df5685c9e84cda81499d | [
"MIT"
] | null | null | null | ABC/ABC126/abc126_d.py | yatabis/AtCoder-in-Python3 | cc2948853b549a6b8f39df5685c9e84cda81499d | [
"MIT"
] | null | null | null | # URL: https://atcoder.jp/contests/abc126/tasks/abc126_d
# URL: https://atcoder.jp/contests/abc126/submissions/14638903
from heapq import heappop, heappush
n = int(input())
a = [[] for _ in range(n)]
for _ in range(n - 1):
u, v, w = map(int, input().split())
a[u - 1].append((v - 1, w))
a[v - 1].append((u ... | 22.72 | 64 | 0.556338 |
1e334b9a938fd3c9df3467c8d839369988bb30b6 | 10,029 | py | Python | Codes/utility/load_data.py | CRIPAC-DIG/K-GHRM | 5d73ed701b7753ee402ecfc1dbc4b20c578a4656 | [
"MIT"
] | 3 | 2021-07-19T14:34:07.000Z | 2022-03-31T06:24:38.000Z | Codes/utility/load_data.py | CRIPAC-DIG/K-GHRM | 5d73ed701b7753ee402ecfc1dbc4b20c578a4656 | [
"MIT"
] | null | null | null | Codes/utility/load_data.py | CRIPAC-DIG/K-GHRM | 5d73ed701b7753ee402ecfc1dbc4b20c578a4656 | [
"MIT"
] | 1 | 2021-08-22T07:23:49.000Z | 2021-08-22T07:23:49.000Z | import numpy as np
import random as rd
from time import time
from math import log
import gc
import heapq
import copy
from utility.parser import parse_args
args = parse_args()
| 41.271605 | 444 | 0.466746 |
1e33b7d46ae6ef1f9eed0f3bad1e2a967744885c | 4,379 | py | Python | popseg/models/panopticdeeplab.py | sithu31296/panoptic-segmentation | bd3f5bf51729dcf5698959b3a6b53a1da8e2db65 | [
"MIT"
] | 1 | 2021-11-06T09:00:11.000Z | 2021-11-06T09:00:11.000Z | popseg/models/panopticdeeplab.py | sithu31296/panoptic-segmentation | bd3f5bf51729dcf5698959b3a6b53a1da8e2db65 | [
"MIT"
] | 1 | 2021-11-07T11:59:57.000Z | 2021-11-08T14:29:10.000Z | popseg/models/panopticdeeplab.py | sithu31296/panoptic-segmentation | bd3f5bf51729dcf5698959b3a6b53a1da8e2db65 | [
"MIT"
] | null | null | null | import torch
from torch import nn, Tensor
from torch.nn import functional as F
from .modules import Conv, SeparableConv
from .backbones import ResNet
if __name__ == '__main__':
model = PanopticDeepLab('50')
x = torch.randn(2, 3, 224, 224)
semantic, center, offset = model(x)
print(semantic.shape)
... | 35.893443 | 114 | 0.631879 |
1e35b131f0e0e93445407cb308ded03d523d37ec | 474 | py | Python | heap/easy/qheap.py | YANG007SUN/data_structure | 481e76eb713dc305409eafe4118121f499357ec6 | [
"Apache-2.0"
] | null | null | null | heap/easy/qheap.py | YANG007SUN/data_structure | 481e76eb713dc305409eafe4118121f499357ec6 | [
"Apache-2.0"
] | null | null | null | heap/easy/qheap.py | YANG007SUN/data_structure | 481e76eb713dc305409eafe4118121f499357ec6 | [
"Apache-2.0"
] | null | null | null | # https://www.hackerrank.com/challenges/qheap1/problem?isFullScreen=true
Q = int(input())
hp = []
for _ in range(Q):
ls = list(map(int, input().split()))
if ls[0]==1:
if len(hp)==0:
hp.append(ls[1])
minv = hp[0]
else:
minv = min(ls[1], minv)
hp.ap... | 23.7 | 72 | 0.466245 |
1e366c09791897360353aaacf043f05a0076f0a2 | 680 | py | Python | bagpipe/exabgp/message/update/attribute/labels.py | taheri0/MPLS-over-GRE | 7d14b819d396b7779b02ea1150bcaf412cb6d36c | [
"Apache-2.0"
] | 94 | 2015-01-05T17:15:21.000Z | 2022-01-09T20:05:16.000Z | bagpipe/exabgp/message/update/attribute/labels.py | taheri0/MPLS-over-GRE | 7d14b819d396b7779b02ea1150bcaf412cb6d36c | [
"Apache-2.0"
] | 18 | 2015-03-16T16:16:55.000Z | 2017-03-27T11:22:38.000Z | bagpipe/exabgp/message/update/attribute/labels.py | taheri0/MPLS-over-GRE | 7d14b819d396b7779b02ea1150bcaf412cb6d36c | [
"Apache-2.0"
] | 36 | 2015-03-13T02:30:15.000Z | 2021-06-22T10:10:23.000Z | # encoding: utf-8
"""
labels.py
Created by Thomas Mangin on 2009-11-05.
Copyright (c) 2009-2012 Exa Networks. All rights reserved.
Modified by Orange - 2014
"""
from struct import pack
#from bagpipe.exabgp.message.update.attribute import AttributeID,Flag,Attribute
# =================================================... | 19.428571 | 79 | 0.627941 |
1e369a1097ab91da0411c8e0085e71ff5b62e1cb | 3,087 | py | Python | pygcn/layers.py | linzhongping/fm-gcn | d403eff40c19c7cf7998c894e03b2c45da556ac7 | [
"MIT"
] | 1 | 2020-01-11T12:53:28.000Z | 2020-01-11T12:53:28.000Z | pygcn/layers.py | linzhongping/fm-gcn | d403eff40c19c7cf7998c894e03b2c45da556ac7 | [
"MIT"
] | 11 | 2019-08-06T02:23:32.000Z | 2022-03-11T23:51:20.000Z | pygcn/layers.py | linzhongping/fm-gcn | d403eff40c19c7cf7998c894e03b2c45da556ac7 | [
"MIT"
] | 1 | 2020-01-11T12:53:29.000Z | 2020-01-11T12:53:29.000Z | import math
from torch.nn import Embedding
import torch
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
from torch.nn import init
from torch.autograd import Variable
torch.random.manual_seed(2070)
| 31.5 | 77 | 0.6184 |
1e36f1e2ae5ddfe99dd5a797c7fd43899e122c3b | 39 | py | Python | jinahub/segmenters/PDFSegmenter/__init__.py | sauravgarg540/executors | c06a16633767346eee96ec019ae6a171f125f6cb | [
"Apache-2.0"
] | null | null | null | jinahub/segmenters/PDFSegmenter/__init__.py | sauravgarg540/executors | c06a16633767346eee96ec019ae6a171f125f6cb | [
"Apache-2.0"
] | null | null | null | jinahub/segmenters/PDFSegmenter/__init__.py | sauravgarg540/executors | c06a16633767346eee96ec019ae6a171f125f6cb | [
"Apache-2.0"
] | null | null | null | from .pdf_segmenter import PDFSegmenter | 39 | 39 | 0.897436 |
1e3792ff3e2c12900e4deb81ec079584de749ca2 | 1,623 | py | Python | digest/test/test_digest_tools.py | dongboyan77/quay | 8018e5bd80f17e6d855b58b7d5f2792d92675905 | [
"Apache-2.0"
] | 1 | 2020-10-16T19:30:41.000Z | 2020-10-16T19:30:41.000Z | digest/test/test_digest_tools.py | dongboyan77/quay | 8018e5bd80f17e6d855b58b7d5f2792d92675905 | [
"Apache-2.0"
] | 15 | 2020-06-18T15:32:06.000Z | 2022-03-03T23:06:24.000Z | digest/test/test_digest_tools.py | dongboyan77/quay | 8018e5bd80f17e6d855b58b7d5f2792d92675905 | [
"Apache-2.0"
] | null | null | null | import pytest
from digest.digest_tools import Digest, content_path, InvalidDigestException
| 30.055556 | 84 | 0.593346 |
1e3868fcfa8f7c10952baf06df24ab8e1002802d | 199 | py | Python | skipper-lib/skipper_lib/logger/logger_helper.py | xandrade/katana-skipper | 196a1bd58ceab03dd409bc5bb1b0f9b6218ccd92 | [
"Apache-2.0"
] | 162 | 2021-05-17T20:43:34.000Z | 2022-03-31T04:19:51.000Z | skipper-lib/skipper_lib/logger/logger_helper.py | xandrade/katana-skipper | 196a1bd58ceab03dd409bc5bb1b0f9b6218ccd92 | [
"Apache-2.0"
] | 4 | 2021-10-09T07:21:21.000Z | 2022-02-08T19:35:29.000Z | skipper-lib/skipper_lib/logger/logger_helper.py | xandrade/katana-skipper | 196a1bd58ceab03dd409bc5bb1b0f9b6218ccd92 | [
"Apache-2.0"
] | 30 | 2021-05-30T07:50:37.000Z | 2022-03-10T01:56:02.000Z | import requests
| 22.111111 | 53 | 0.698492 |
1e3951f43593829e9f73863dbf2d7b40f67d59a0 | 1,277 | py | Python | tests/test_block.py | quantum13/mile-csa-python | f3303836ef520886fc58fb8a06ab716ff3065fb2 | [
"MIT"
] | null | null | null | tests/test_block.py | quantum13/mile-csa-python | f3303836ef520886fc58fb8a06ab716ff3065fb2 | [
"MIT"
] | null | null | null | tests/test_block.py | quantum13/mile-csa-python | f3303836ef520886fc58fb8a06ab716ff3065fb2 | [
"MIT"
] | null | null | null | import unittest
from milecsa import Chain, Config
import local_config
if __name__ == '__main__':
unittest.main()
| 25.54 | 113 | 0.602976 |
1e3b2896c4c71de1f2f4c4021609291572737a53 | 14,014 | py | Python | index.py | jansusea/video_rent_demo | 17e3d2f239a433fc313c7f2c45fbb46b7573a6a6 | [
"Apache-2.0"
] | 2 | 2019-12-13T06:10:52.000Z | 2019-12-15T14:58:07.000Z | index.py | jansusea/video_rent_demo | 17e3d2f239a433fc313c7f2c45fbb46b7573a6a6 | [
"Apache-2.0"
] | null | null | null | index.py | jansusea/video_rent_demo | 17e3d2f239a433fc313c7f2c45fbb46b7573a6a6 | [
"Apache-2.0"
] | null | null | null | from flask_jsglue import JSGlue
from flask import Flask, render_template, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_restful import reqparse, Api
app = Flask(__name__)
api = Api(app)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:root@localhost:3306/videorent?charset=utf8mb4'
app.config['SQLALCH... | 35.659033 | 125 | 0.630512 |
1e3bf3816d2775c53ca40f975a39eda86b48bb10 | 11,285 | py | Python | everest/repositories/rdb/querying.py | helixyte/everest | 70c9b93c3061db5cb62428349d18b8fb8566411b | [
"MIT"
] | 3 | 2015-03-10T17:38:25.000Z | 2017-04-29T03:47:06.000Z | everest/repositories/rdb/querying.py | helixyte/everest | 70c9b93c3061db5cb62428349d18b8fb8566411b | [
"MIT"
] | 1 | 2015-03-02T16:02:41.000Z | 2015-03-02T16:02:41.000Z | everest/repositories/rdb/querying.py | cenix/everest | 70c9b93c3061db5cb62428349d18b8fb8566411b | [
"MIT"
] | 1 | 2020-07-12T22:46:59.000Z | 2020-07-12T22:46:59.000Z | """
Querying functionality for the rdb repository.
This file is part of the everest project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Created on Jan 7, 2013.
"""
from everest.constants import RESOURCE_ATTRIBUTE_KINDS
from everest.entities.base import Entity
from everest.exceptions ... | 37.616667 | 99 | 0.672751 |
1e3c4d4cb0dbc4f7cda5f5d0400be26747fb6df0 | 1,259 | py | Python | myLogger.py | DavideFrr/ibmqx_experiments | f9e3c2e85d3fd8ea3f9a69b7bee26c135eabc755 | [
"Apache-2.0"
] | 6 | 2017-11-07T12:01:49.000Z | 2018-04-23T06:45:05.000Z | myLogger.py | DavideFrr/ibmqx_envariance | f9e3c2e85d3fd8ea3f9a69b7bee26c135eabc755 | [
"Apache-2.0"
] | null | null | null | myLogger.py | DavideFrr/ibmqx_envariance | f9e3c2e85d3fd8ea3f9a69b7bee26c135eabc755 | [
"Apache-2.0"
] | 1 | 2018-05-07T06:34:42.000Z | 2018-05-07T06:34:42.000Z | # Copyright 2017 Quantum Information Science, University of Parma, Italy. 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... | 38.151515 | 94 | 0.70135 |
1e40bb23a7df34b4097b777f22663a9bcc159f40 | 3,742 | py | Python | predicting solar enegy generation/solar.py | imsanjoykb/Working-Analysis | 12267ccbe833ea0daedb34990ba1757f3888e447 | [
"Apache-2.0"
] | 3 | 2020-12-31T19:23:45.000Z | 2022-02-07T16:09:14.000Z | predicting solar enegy generation/solar.py | imsanjoykb/Working-Analysis | 12267ccbe833ea0daedb34990ba1757f3888e447 | [
"Apache-2.0"
] | null | null | null | predicting solar enegy generation/solar.py | imsanjoykb/Working-Analysis | 12267ccbe833ea0daedb34990ba1757f3888e447 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 12 17:57:02 2020
@author: Atique Akhtar
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn import metrics
fro... | 29.464567 | 110 | 0.756547 |
1e42f7faf93d8ca30408b7f1bf98b2c4582082bf | 7,047 | py | Python | scoring_functions.py | juius/GB-GA | 4b49f1822c5190e8b2bbb8b7403eed30af9e50fd | [
"MIT"
] | 42 | 2018-10-24T09:31:07.000Z | 2021-04-10T04:04:51.000Z | scoring_functions.py | juius/GB-GA | 4b49f1822c5190e8b2bbb8b7403eed30af9e50fd | [
"MIT"
] | null | null | null | scoring_functions.py | juius/GB-GA | 4b49f1822c5190e8b2bbb8b7403eed30af9e50fd | [
"MIT"
] | 25 | 2018-10-24T09:01:59.000Z | 2021-04-24T10:51:22.000Z | '''
Written by Jan H. Jensen 2018
'''
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Descriptors
from rdkit.DataStructs.cDataStructs import TanimotoSimilarity
from rdkit.Chem import rdFMCS
from rdkit import rdBase
rdBase.DisableLog('rdApp.error')
import numpy as np
import sys
from multi... | 28.188 | 137 | 0.711225 |
1e437b4dfd0558c6e8bffff9311d6c58e3c2a593 | 386 | py | Python | mmdet3d/models/middle_encoders/__init__.py | yangzilongdmgy/merge_monster_3d | 0595e36749d32c3d5537a3f707727a137c82076e | [
"Apache-2.0"
] | null | null | null | mmdet3d/models/middle_encoders/__init__.py | yangzilongdmgy/merge_monster_3d | 0595e36749d32c3d5537a3f707727a137c82076e | [
"Apache-2.0"
] | null | null | null | mmdet3d/models/middle_encoders/__init__.py | yangzilongdmgy/merge_monster_3d | 0595e36749d32c3d5537a3f707727a137c82076e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
from .pillar_scatter import PointPillarsScatter
from .sparse_encoder import SparseEncoder
from .sparse_unet import SparseUNet
from .sparse_encoder_aux import SparseEncoder_AUX
from .sparse_encoderv2 import SparseEncoderV2
__all__ = [
'PointPillarsScatter', 'SparseEnc... | 32.166667 | 78 | 0.813472 |
1e45671ec504dd3c04b26925a2e6eba78b31882e | 845 | py | Python | mopy/policies/backup.py | TylerSandman/mopy | df66bb728f6dacee8ee6267a8802a4b71a04fd43 | [
"MIT"
] | null | null | null | mopy/policies/backup.py | TylerSandman/mopy | df66bb728f6dacee8ee6267a8802a4b71a04fd43 | [
"MIT"
] | null | null | null | mopy/policies/backup.py | TylerSandman/mopy | df66bb728f6dacee8ee6267a8802a4b71a04fd43 | [
"MIT"
] | null | null | null | """
Contains result backpropagation policies for MCTS.
All policies should be represented as a function that takes a MCTree and
the result of a game, and updates a node accordingly. Backup policies dictate
how the results of simulated games affect game states beforehand. See the main
Mopy module and MCTree for m... | 36.73913 | 79 | 0.710059 |
1e49f827aac986a59bed712075a11f7c49c14620 | 2,917 | py | Python | tests/validation/parameter/test_min_max_length_validation.py | maroux/flex | dfd7c6d79d065d7ce1b0c799e51e9bb5292612b2 | [
"MIT"
] | 160 | 2015-01-15T05:36:44.000Z | 2021-08-04T00:43:54.000Z | tests/validation/parameter/test_min_max_length_validation.py | maroux/flex | dfd7c6d79d065d7ce1b0c799e51e9bb5292612b2 | [
"MIT"
] | 151 | 2015-01-20T16:45:36.000Z | 2022-02-23T21:07:58.000Z | tests/validation/parameter/test_min_max_length_validation.py | maroux/flex | dfd7c6d79d065d7ce1b0c799e51e9bb5292612b2 | [
"MIT"
] | 90 | 2015-01-20T11:19:36.000Z | 2021-08-03T08:58:18.000Z | import pytest
from flex.exceptions import ValidationError
from flex.loading.schema.paths.path_item.operation.parameters import (
parameters_validator,
)
from flex.validation.parameter import (
validate_parameters,
)
from flex.constants import (
PATH,
STRING,
)
from tests.utils import assert_path_in_er... | 20.687943 | 76 | 0.545766 |
1e4ce32c38c583706ec7bfb679d5be87d306fa64 | 2,556 | py | Python | src/python-multiCameraServer/facegrip.py | FRCTeam1277/PavelVisionTests2021 | 1c5b674aed893c3c1d770ca4f124cb6d93615903 | [
"BSD-3-Clause"
] | null | null | null | src/python-multiCameraServer/facegrip.py | FRCTeam1277/PavelVisionTests2021 | 1c5b674aed893c3c1d770ca4f124cb6d93615903 | [
"BSD-3-Clause"
] | null | null | null | src/python-multiCameraServer/facegrip.py | FRCTeam1277/PavelVisionTests2021 | 1c5b674aed893c3c1d770ca4f124cb6d93615903 | [
"BSD-3-Clause"
] | null | null | null | import cv2
import numpy
import math
from enum import Enum
| 36 | 292 | 0.687011 |
1e4e63042228f66cff5a912d41b87d37722d2937 | 3,298 | py | Python | Task2/main.py | KKowalewski24/ADZ | 8a04570a1f6f08506572386b2312a259a8308f56 | [
"MIT"
] | null | null | null | Task2/main.py | KKowalewski24/ADZ | 8a04570a1f6f08506572386b2312a259a8308f56 | [
"MIT"
] | null | null | null | Task2/main.py | KKowalewski24/ADZ | 8a04570a1f6f08506572386b2312a259a8308f56 | [
"MIT"
] | null | null | null | from argparse import ArgumentParser, Namespace
from typing import Any, Dict, Tuple
import numpy as np
from sklearn.cluster import DBSCAN
from sklearn.metrics import precision_score, recall_score
from sklearn.neighbors import LocalOutlierFactor
from module.LatexGenerator import LatexGenerator
from module.OutlierAgglom... | 35.462366 | 93 | 0.647665 |
1e4f198f80a2b90957f00d6e9a760ddb7d4d2c00 | 1,534 | py | Python | test/test_matching_with_dont_cares.py | matkaczmarek/string-algorithms | df1367e633ee0b3377cbdd67a77982f373fe2459 | [
"MIT"
] | 1 | 2020-06-27T01:33:43.000Z | 2020-06-27T01:33:43.000Z | test/test_matching_with_dont_cares.py | TenGumis/string-algorithms | e57a9dc6150e92ab65cad4a5c1e68533b7166eb7 | [
"MIT"
] | null | null | null | test/test_matching_with_dont_cares.py | TenGumis/string-algorithms | e57a9dc6150e92ab65cad4a5c1e68533b7166eb7 | [
"MIT"
] | null | null | null | import itertools
import os
import unittest
from generator import rand
from approximate_string_matching import dont_care, matching_with_dont_cares
| 34.088889 | 75 | 0.643416 |
1e4f435f06f8b0f3c610c16275c5fe53209837e7 | 1,902 | py | Python | nengo/utils/network.py | HugoChateauLaurent/nengo | 749893186ee09aa6c621a40da3ffd3878114db9c | [
"BSD-2-Clause"
] | null | null | null | nengo/utils/network.py | HugoChateauLaurent/nengo | 749893186ee09aa6c621a40da3ffd3878114db9c | [
"BSD-2-Clause"
] | null | null | null | nengo/utils/network.py | HugoChateauLaurent/nengo | 749893186ee09aa6c621a40da3ffd3878114db9c | [
"BSD-2-Clause"
] | null | null | null | import nengo
from .magic import decorator
def activate_direct_mode(network):
"""Activates direct mode for a network.
This sets the neuron type of all ensembles to a `nengo.Direct`
instance unless:
- there is a connection to or from the ensemble's neurons
- there is a probe on an ensemble's neur... | 29.71875 | 76 | 0.640904 |
1e502b66e5902b480d62357920638ef90c30a7e7 | 379 | py | Python | src/utils/Evaluator.py | elfaizamine/loan_default_prediction | c76632b0757e9f23d347e00bcd755d26800a54be | [
"MIT"
] | null | null | null | src/utils/Evaluator.py | elfaizamine/loan_default_prediction | c76632b0757e9f23d347e00bcd755d26800a54be | [
"MIT"
] | null | null | null | src/utils/Evaluator.py | elfaizamine/loan_default_prediction | c76632b0757e9f23d347e00bcd755d26800a54be | [
"MIT"
] | null | null | null | from matplotlib import pyplot as plt
from sklearn import metrics
| 19.947368 | 62 | 0.622691 |
1e509497962389e6ed71b35b5ec1d4dff24d9090 | 779 | py | Python | acme/resources/DVI.py | reinaortega/ACME-oneM2M-CSE | ee45a6a2bcbb0fd0397cfffc0522fa252d7e98be | [
"BSD-3-Clause"
] | null | null | null | acme/resources/DVI.py | reinaortega/ACME-oneM2M-CSE | ee45a6a2bcbb0fd0397cfffc0522fa252d7e98be | [
"BSD-3-Clause"
] | null | null | null | acme/resources/DVI.py | reinaortega/ACME-oneM2M-CSE | ee45a6a2bcbb0fd0397cfffc0522fa252d7e98be | [
"BSD-3-Clause"
] | null | null | null | #
# DVI.py
#
# (c) 2020 by Andreas Kraft
# License: BSD 3-Clause License. See the LICENSE file for further details.
#
# ResourceType: mgmtObj:DeviceInfo
#
from .MgmtObj import *
from Constants import Constants as C
import Utils
defaultDeviceType = 'unknown'
defaultModel = "unknown"
defaultManufacturer = "unknown"
def... | 26.862069 | 74 | 0.752246 |
1e520e590c8df2d66276d19de77a152e7ca6c316 | 1,272 | py | Python | augmentation.py | chaets/cogniac | aefb4355d3f7b56cbc42e1039e88d709b40051dc | [
"Apache-2.0"
] | 1 | 2021-04-26T18:15:35.000Z | 2021-04-26T18:15:35.000Z | augmentation.py | chaets/cogniac | aefb4355d3f7b56cbc42e1039e88d709b40051dc | [
"Apache-2.0"
] | null | null | null | augmentation.py | chaets/cogniac | aefb4355d3f7b56cbc42e1039e88d709b40051dc | [
"Apache-2.0"
] | 1 | 2021-03-19T21:40:48.000Z | 2021-03-19T21:40:48.000Z | import cv2
import numpy as np
| 31.02439 | 87 | 0.575472 |
1e529806b916a14d473506fae40b14ec1ce0965a | 557 | py | Python | pages/themes/beginners/unicodeTopics/examples/fromWin1251_toUTF8.py | ProgressBG-Python-Course/ProgressBG-VC2-Python | 03b892a42ee1fad3d4f97e328e06a4b1573fd356 | [
"MIT"
] | null | null | null | pages/themes/beginners/unicodeTopics/examples/fromWin1251_toUTF8.py | ProgressBG-Python-Course/ProgressBG-VC2-Python | 03b892a42ee1fad3d4f97e328e06a4b1573fd356 | [
"MIT"
] | null | null | null | pages/themes/beginners/unicodeTopics/examples/fromWin1251_toUTF8.py | ProgressBG-Python-Course/ProgressBG-VC2-Python | 03b892a42ee1fad3d4f97e328e06a4b1573fd356 | [
"MIT"
] | null | null | null | input_file_name = "windows-1251_encoded_file.txt"
output_file_name = "utf8_encoded_file.txt"
decoded_content = read_from("cp1251", input_file_name)
write_to("utf8", decoded_content, output_file_name)
| 25.318182 | 54 | 0.746858 |
1e53d52936557fab1d6afac1ad13ee2619cc016c | 449 | py | Python | iaso/migrations/0065_auto_20201201_1456.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 29 | 2020-12-26T07:22:19.000Z | 2022-03-07T13:40:09.000Z | iaso/migrations/0065_auto_20201201_1456.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 150 | 2020-11-09T15:03:27.000Z | 2022-03-07T15:36:07.000Z | iaso/migrations/0065_auto_20201201_1456.py | ekhalilbsq/iaso | e6400c52aeb4f67ce1ca83b03efa3cb11ef235ee | [
"MIT"
] | 4 | 2020-11-09T10:38:13.000Z | 2021-10-04T09:42:47.000Z | # Generated by Django 3.0.7 on 2020-12-01 14:56
from django.db import migrations, models
| 28.0625 | 101 | 0.67706 |
1e56b55098ede8127120d4b6280c82f5e4c576f7 | 436 | py | Python | examples/app/myapp.py | westurner/celery | 41964f24df4c8ca5d96bf0d644e40778212e10cb | [
"BSD-3-Clause"
] | 1 | 2015-02-27T00:56:02.000Z | 2015-02-27T00:56:02.000Z | examples/app/myapp.py | westurner/celery | 41964f24df4c8ca5d96bf0d644e40778212e10cb | [
"BSD-3-Clause"
] | null | null | null | examples/app/myapp.py | westurner/celery | 41964f24df4c8ca5d96bf0d644e40778212e10cb | [
"BSD-3-Clause"
] | null | null | null | """myapp.py
Usage:
(window1)$ python myapp.py worker -l info
(window2)$ python
>>> from myapp import add
>>> add.delay(16, 16).get()
32
You can also specify the app to use with celeryd::
$ celery worker -l info --app=myapp
"""
from celery import Celery
celery = Celery("myapp", broker="amqp://... | 15.034483 | 59 | 0.626147 |
1e572a42c6bc0c9afac50afe4337fe89f5d90d51 | 7,795 | py | Python | PyObjCTest/test_cfdictionary.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | PyObjCTest/test_cfdictionary.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | PyObjCTest/test_cfdictionary.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | import CoreFoundation
import objc
from PyObjCTools.TestSupport import TestCase
| 40.180412 | 88 | 0.636947 |
1e578a66b213b846971e0fefcbf7b9c33b776eea | 1,462 | py | Python | hallo/test/modules/hallo_control/test_active_threads.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2018-05-19T22:27:20.000Z | 2018-05-19T22:27:20.000Z | hallo/test/modules/hallo_control/test_active_threads.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 75 | 2015-09-26T18:07:18.000Z | 2022-01-04T07:15:11.000Z | hallo/test/modules/hallo_control/test_active_threads.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2021-04-10T12:02:47.000Z | 2021-04-10T12:02:47.000Z | from threading import Thread
import time
from hallo.events import EventMessage
| 37.487179 | 90 | 0.719562 |
1e57a3b1f5bc69858ee77a65eb9d305c058566c9 | 3,910 | py | Python | melior_transformers/encoding/encoding_model.py | MeliorAI/meliorTransformers | b2936e1aac23e63e0b737d03975124c31a960812 | [
"Apache-2.0"
] | 1 | 2020-08-06T10:48:49.000Z | 2020-08-06T10:48:49.000Z | melior_transformers/encoding/encoding_model.py | MeliorAI/meliorTransformers | b2936e1aac23e63e0b737d03975124c31a960812 | [
"Apache-2.0"
] | 2 | 2020-02-13T12:45:57.000Z | 2020-04-14T11:30:33.000Z | melior_transformers/encoding/encoding_model.py | MeliorAI/meliorTransformers | b2936e1aac23e63e0b737d03975124c31a960812 | [
"Apache-2.0"
] | 2 | 2020-07-21T12:43:51.000Z | 2021-08-13T15:21:22.000Z | import logging
from typing import Dict, List
import numpy as np
import torch
from numpy import ndarray
from sentence_transformers import SentenceTransformer, models
from melior_transformers.config.global_args import global_args
from melior_transformers.encoding.constants import MODEL_CLASSES
logger = logging.getLogg... | 33.418803 | 88 | 0.615601 |
1e57b3a6e4d96a119f56fc088803962c5fcf3de7 | 114 | py | Python | Models/instances/refresh_from_db()/models.py | looking-for-a-job/django-examples | dfafa450668cac5c0351f6c7238b8886511229bf | [
"Unlicense"
] | null | null | null | Models/instances/refresh_from_db()/models.py | looking-for-a-job/django-examples | dfafa450668cac5c0351f6c7238b8886511229bf | [
"Unlicense"
] | null | null | null | Models/instances/refresh_from_db()/models.py | looking-for-a-job/django-examples | dfafa450668cac5c0351f6c7238b8886511229bf | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
from django.db import models
| 16.285714 | 31 | 0.72807 |
1e57f2da3f20d5ecc4a09a1464ede0da10a2f32a | 9,234 | py | Python | tortilla/core.py | sunlightlabs/python-tortilla | 4b4f3538b293ccff218610c5a452f69d582130d4 | [
"BSD-3-Clause"
] | 1 | 2019-07-31T02:54:10.000Z | 2019-07-31T02:54:10.000Z | tortilla/core.py | sunlightlabs/python-tortilla | 4b4f3538b293ccff218610c5a452f69d582130d4 | [
"BSD-3-Clause"
] | null | null | null | tortilla/core.py | sunlightlabs/python-tortilla | 4b4f3538b293ccff218610c5a452f69d582130d4 | [
"BSD-3-Clause"
] | 1 | 2015-12-13T08:21:12.000Z | 2015-12-13T08:21:12.000Z | import json
import requests
from requests.exceptions import Timeout
from .util import meta_fix
class Donation(SalsaObject):
object = 'donation'
class Event(SalsaObject):
object = 'event'
class Group(SalsaObject):
object = 'groups'
class Supporter(SalsaObject):
object = 'supporter'
class SupporterAc... | 26.084746 | 100 | 0.585662 |
1e58286e282abcb985fa69b50248bb70d6390ed9 | 3,138 | py | Python | main.py | Qumeric/flappypython | 40f4ab00870f6e5f02ef7de74190c6a277feb034 | [
"MIT"
] | null | null | null | main.py | Qumeric/flappypython | 40f4ab00870f6e5f02ef7de74190c6a277feb034 | [
"MIT"
] | 1 | 2015-04-07T15:17:30.000Z | 2015-04-07T17:34:01.000Z | main.py | Qumeric/flappypython | 40f4ab00870f6e5f02ef7de74190c6a277feb034 | [
"MIT"
] | null | null | null | from pygame import display, font, image, init, time, event
from pygame.locals import *
from random import randrange
from GameObject import Bird, Pipe
SCORE_COLOR = (255, 255, 0)
HIGHSCORE_COLOR = (255, 165, 0)
DISPLAY_WIDTH = 320
DISPLAY_HEIGHT = 480
FONT = None
FONT_SIZE = 22
HOLE_SIZE = 50
PIPE_FREQUENCY = 50
PIP... | 25.512195 | 75 | 0.564691 |
1e5841b0b5452fe3f18e4012f65cd3755e441a4a | 950 | py | Python | schema/__init__.py | p4l1ly/automata-safa-capnp | 4aed4f30b217a979f6229db5e3c72f979d31bb76 | [
"BSD-3-Clause"
] | null | null | null | schema/__init__.py | p4l1ly/automata-safa-capnp | 4aed4f30b217a979f6229db5e3c72f979d31bb76 | [
"BSD-3-Clause"
] | null | null | null | schema/__init__.py | p4l1ly/automata-safa-capnp | 4aed4f30b217a979f6229db5e3c72f979d31bb76 | [
"BSD-3-Clause"
] | null | null | null | import os
import capnp
import operator
import sys
from importlib.abc import Loader, MetaPathFinder
from importlib.util import spec_from_loader
from pathlib import Path
from functools import reduce
capnp.remove_import_hook()
my_path = Path(os.path.dirname(os.path.abspath(__file__)))
sys.meta_path.append(_Importer())
| 25 | 73 | 0.653684 |
1e589b21bf05fda4a1eedf746c2f50a2e1830a1e | 17,283 | py | Python | queryDB.py | ElsevierSoftwareX/SOFTX-D-20-00075 | 825efe6a95011d055eaa19fabed42e9dad73b164 | [
"BSD-3-Clause"
] | 3 | 2021-09-15T03:51:14.000Z | 2022-03-05T15:36:47.000Z | queryDB.py | ElsevierSoftwareX/SOFTX-D-20-00075- | 06de316e3973b65e28ca7e047b5b1674640e7e5c | [
"BSD-3-Clause"
] | null | null | null | queryDB.py | ElsevierSoftwareX/SOFTX-D-20-00075- | 06de316e3973b65e28ca7e047b5b1674640e7e5c | [
"BSD-3-Clause"
] | 3 | 2021-07-21T10:25:59.000Z | 2022-03-19T21:16:33.000Z | #!/usr/bin/env python3
from astroquery.simbad import Simbad
from astroquery.vizier import Vizier
from cat_setup import src_localDB, src_onlineDB
from buildDB import addData, check_ldb
import sys, os
import csv
from more_itertools import locate
import argparse
import subprocess
from pathlib import Path
# for the spect... | 43.977099 | 151 | 0.525025 |
1e591f8ce49d4cfdc76a7051dbb0e79d30e622d3 | 1,690 | py | Python | celescope/tcr_fl/multi_tcr_fl.py | susucy/CeleScope | a5d9501ff8bd9dc067b9718070876acb0767a6cf | [
"MIT"
] | null | null | null | celescope/tcr_fl/multi_tcr_fl.py | susucy/CeleScope | a5d9501ff8bd9dc067b9718070876acb0767a6cf | [
"MIT"
] | null | null | null | celescope/tcr_fl/multi_tcr_fl.py | susucy/CeleScope | a5d9501ff8bd9dc067b9718070876acb0767a6cf | [
"MIT"
] | null | null | null | from celescope.__init__ import __CONDA__
from celescope.tcr_fl.__init__ import __STEPS__, __ASSAY__
from celescope.tools.Multi import Multi
if __name__ == '__main__':
main()
| 30.727273 | 82 | 0.560947 |
1e59255c7c35e3e7f82903f515a10a05864028c1 | 1,253 | py | Python | tests/orthanc/test_orthanc_patient_deleters.py | gacou54/pyorthanc | 6b67a0d58567060e2e88ae5f2d15453fa47561aa | [
"MIT"
] | 12 | 2019-02-25T04:24:39.000Z | 2022-03-22T11:43:46.000Z | tests/orthanc/test_orthanc_patient_deleters.py | gacou54/pyorthanc | 6b67a0d58567060e2e88ae5f2d15453fa47561aa | [
"MIT"
] | 5 | 2021-06-02T00:20:44.000Z | 2022-03-15T15:09:22.000Z | tests/orthanc/test_orthanc_patient_deleters.py | gacou54/pyorthanc | 6b67a0d58567060e2e88ae5f2d15453fa47561aa | [
"MIT"
] | 1 | 2020-05-11T14:57:17.000Z | 2020-05-11T14:57:17.000Z | # coding: utf-8
# author: gabriel couture
import unittest
from pyorthanc import Orthanc
from tests import setup_server
from tests.data import a_patient
| 28.477273 | 88 | 0.747007 |
1e5a603f27c754d49e48eda058d899211d90dc68 | 1,761 | py | Python | logs_manager/migrations/0001_initial.py | adwait-thattey/raygun_api | 9d5571de452fbf70d34b9583ebc42eb662292f61 | [
"MIT"
] | null | null | null | logs_manager/migrations/0001_initial.py | adwait-thattey/raygun_api | 9d5571de452fbf70d34b9583ebc42eb662292f61 | [
"MIT"
] | 7 | 2020-06-06T01:40:06.000Z | 2022-02-10T09:12:56.000Z | logs_manager/migrations/0001_initial.py | adwait-thattey/raygun_api | 9d5571de452fbf70d34b9583ebc42eb662292f61 | [
"MIT"
] | 1 | 2021-08-16T13:23:34.000Z | 2021-08-16T13:23:34.000Z | # Generated by Django 2.1.5 on 2020-07-24 05:14
from django.db import migrations, models
| 34.529412 | 114 | 0.531516 |
1e5ab18416df4205e5bf855cc62673e0bc16722c | 467 | py | Python | webhud/signaling/test/objects_test.py | eigendude/beachfronter | dd4eb5d719d93047c24cfaf32a96b291bf9056d8 | [
"Apache-2.0"
] | null | null | null | webhud/signaling/test/objects_test.py | eigendude/beachfronter | dd4eb5d719d93047c24cfaf32a96b291bf9056d8 | [
"Apache-2.0"
] | null | null | null | webhud/signaling/test/objects_test.py | eigendude/beachfronter | dd4eb5d719d93047c24cfaf32a96b291bf9056d8 | [
"Apache-2.0"
] | null | null | null | ################################################################################
#
# Copyright (C) 2020 Aclima, Inc
# This file is part of aclima-schema - https://github.com/Aclima/aclima-schema
#
# SPDX-License-Identifier: MIT
# See DOCS/LICENSING.md for more information.
#
########################################... | 27.470588 | 80 | 0.462527 |
1e5b83ffe1a421082cfb31bd3175565e924b9fe8 | 2,121 | py | Python | recommender/rest-api/globals.py | haiphucnguyen/MachineLearning | ecdc708a7f4a1a7917fd97f3374034b0f0a013aa | [
"MIT"
] | null | null | null | recommender/rest-api/globals.py | haiphucnguyen/MachineLearning | ecdc708a7f4a1a7917fd97f3374034b0f0a013aa | [
"MIT"
] | 18 | 2020-07-17T08:24:34.000Z | 2022-03-02T04:16:18.000Z | recommender/rest-api/globals.py | haiphucnguyen/MachineLearning | ecdc708a7f4a1a7917fd97f3374034b0f0a013aa | [
"MIT"
] | null | null | null | from pyspark.sql import SparkSession
from pyspark.ml.evaluation import RegressionEvaluator
from pyspark.ml.recommendation import ALS
Globals.recommendator() | 48.204545 | 125 | 0.644979 |
1e5b8c4c2a735704a76ae6bbaabad7224e52a26b | 2,873 | py | Python | print_results.py | UlianaDzhumok/dog-breed-image-classifier | e65b9853e20665eab0090c98956b0f71625cc398 | [
"MIT"
] | null | null | null | print_results.py | UlianaDzhumok/dog-breed-image-classifier | e65b9853e20665eab0090c98956b0f71625cc398 | [
"MIT"
] | null | null | null | print_results.py | UlianaDzhumok/dog-breed-image-classifier | e65b9853e20665eab0090c98956b0f71625cc398 | [
"MIT"
] | null | null | null | def print_results(results_dic, results_stats_dic, model,
print_incorrect_dogs = False, print_incorrect_breed = False):
"""
Prints summary results on the classification and then prints incorrectly
classified dogs and incorrectly classified dog breeds if user indicates
they want thos... | 54.207547 | 121 | 0.587887 |
1e5d69d46fbe2dcd9c5a3139cb2e51788974251b | 508 | py | Python | compiled/construct/expr_io_pos.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 4 | 2017-04-08T12:55:11.000Z | 2020-12-05T21:09:31.000Z | compiled/construct/expr_io_pos.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 7 | 2018-04-23T01:30:33.000Z | 2020-10-30T23:56:14.000Z | compiled/construct/expr_io_pos.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 6 | 2017-04-08T11:41:14.000Z | 2020-10-30T22:47:31.000Z | from construct import *
from construct.lib import *
expr_io_pos__all_plus_number = Struct(
'my_str' / NullTerminated(GreedyString(encoding='UTF-8'), term=b'\x00', include=False, consume=True),
'body' / FixedSized(((stream_size(_io) - stream_tell(_io)) - 2), GreedyBytes),
'number' / Int16ul,
)
expr_io_pos = Struct(... | 31.75 | 102 | 0.751969 |
1e5e463f2d8698101b4daa4b95c205a9cfcb45c4 | 1,175 | py | Python | app/services/QueryService.py | fredrik-aschehoug/KG-Enricher | 56f1ac192c2542d8412235ee6897d22278a5259e | [
"MIT"
] | null | null | null | app/services/QueryService.py | fredrik-aschehoug/KG-Enricher | 56f1ac192c2542d8412235ee6897d22278a5259e | [
"MIT"
] | null | null | null | app/services/QueryService.py | fredrik-aschehoug/KG-Enricher | 56f1ac192c2542d8412235ee6897d22278a5259e | [
"MIT"
] | null | null | null | from aiosparql.client import SPARQLClient
from typing import Union
from models.types import sparql_bindings
| 35.606061 | 109 | 0.693617 |
1e5fbb0ee05033c7efad72d8169c33b9ad7669f2 | 2,463 | py | Python | books/management/commands/email_books.py | phildini/bockus | 004508166f5b1a7c3c4d8accf32578a80379b385 | [
"MIT"
] | 3 | 2015-07-15T05:29:17.000Z | 2021-06-23T21:50:25.000Z | books/management/commands/email_books.py | phildini/bockus | 004508166f5b1a7c3c4d8accf32578a80379b385 | [
"MIT"
] | 4 | 2020-02-11T22:15:04.000Z | 2021-06-10T17:41:51.000Z | books/management/commands/email_books.py | phildini/bockus | 004508166f5b1a7c3c4d8accf32578a80379b385 | [
"MIT"
] | null | null | null | import dropbox
import json
import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.mail import EmailMessage
from allauth.socialaccount.models import SocialApp, SocialToken
from books.forms import ImportForm
from books.models import (
Book,
BookFil... | 33.283784 | 82 | 0.578157 |
1e6038d2a3f2553efb2ffd56b40294b3bf3b78f9 | 511 | py | Python | 2018/Insomni'hack teaser/Rule86/outputs/super_cipher_partial.py | birdsoup/CTF-Writeups | feaeda46a5afa3dabbfa81adcbe184f7bc24d5cb | [
"MIT"
] | 3 | 2019-03-03T00:08:19.000Z | 2021-06-09T14:20:41.000Z | 2018/Insomni'hack teaser/Rule86/outputs/super_cipher_partial.py | birdsoup/CTF-Writeups | feaeda46a5afa3dabbfa81adcbe184f7bc24d5cb | [
"MIT"
] | null | null | null | 2018/Insomni'hack teaser/Rule86/outputs/super_cipher_partial.py | birdsoup/CTF-Writeups | feaeda46a5afa3dabbfa81adcbe184f7bc24d5cb | [
"MIT"
] | 1 | 2021-06-18T08:56:05.000Z | 2021-06-18T08:56:05.000Z | #!/usr/bin/env python3
import argparse
import sys
parser = argparse.ArgumentParser()
parser.add_argument("key")
args = parser.parse_args()
RULE = [86 >> i & 1 for i in range(8)]
N_BYTES = 32
N = 8 * N_BYTES
# Bootstrap the PNRG
keystream = int.from_bytes(args.key.encode(),'little')
for i in range(N//2):
keystream... | 18.925926 | 54 | 0.626223 |
1e61c19b1fa849a545aa5955ebc1129a3e165719 | 284 | py | Python | zencad/interactive/axis.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/interactive/axis.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/interactive/axis.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from zencad.interactive.interactive_object import InteractiveObject
from OCC.Core.AIS import AIS_Axis
| 28.4 | 68 | 0.760563 |
1e61f53390c65e1afc1cca81347aa6ed53a9c8bd | 11,464 | py | Python | code/python/report_marks.py | nsob1c12/tetepy | 2defb61dea95c69747b07d7c6b3e106b604455ee | [
"BSD-3-Clause"
] | null | null | null | code/python/report_marks.py | nsob1c12/tetepy | 2defb61dea95c69747b07d7c6b3e106b604455ee | [
"BSD-3-Clause"
] | null | null | null | code/python/report_marks.py | nsob1c12/tetepy | 2defb61dea95c69747b07d7c6b3e106b604455ee | [
"BSD-3-Clause"
] | 1 | 2018-11-21T09:53:44.000Z | 2018-11-21T09:53:44.000Z | #!/usr/bin/env python
#
# This file is part of the TeTePy software
#
# Copyright (c) 2017, 2018, University of Southampton
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions ... | 42.459259 | 135 | 0.657188 |
1e6276643a563a4ed15fee529d45c22bb727a6be | 9,871 | py | Python | Python_Code/PD_Naive/naive_pd.py | TomerEven/Pocket_Dictionary | 29f906855f5e52eec61d00cb6e8fa0fb5e90a8e4 | [
"Apache-2.0"
] | 2 | 2019-12-10T03:41:02.000Z | 2021-11-14T12:30:36.000Z | Python_Code/PD_Naive/naive_pd.py | TomerEven/Pocket_Dictionary | 29f906855f5e52eec61d00cb6e8fa0fb5e90a8e4 | [
"Apache-2.0"
] | null | null | null | Python_Code/PD_Naive/naive_pd.py | TomerEven/Pocket_Dictionary | 29f906855f5e52eec61d00cb6e8fa0fb5e90a8e4 | [
"Apache-2.0"
] | 2 | 2019-12-10T03:41:07.000Z | 2020-06-02T16:57:31.000Z | from typing import *
for i in range(32):
print(i, lsm(i))
1 << 7
split_by_runs(h2)
bi(170)
int('01010101', 2)
# def ci(n:int,length)->str
bi(216)
bi(170)
bin(85)
170
~170
"0111"
7+7*16
bi(119)
s2 = '01110111'*4
h2 = [int(i) for i in s2]
h2 =
bin(-171 - 1)
h = [int(i) for i in bi(216)]
h
head = [1, 0... | 25.181122 | 96 | 0.564279 |
1e63fbcaff13f5411059c99a4d6c190d9c025da4 | 322 | py | Python | count_by_provider.py | SunshineStateDigitalNetwork/harvest_utils | 1918732da2e485d45832766245e4beaae6da5b5f | [
"MIT"
] | null | null | null | count_by_provider.py | SunshineStateDigitalNetwork/harvest_utils | 1918732da2e485d45832766245e4beaae6da5b5f | [
"MIT"
] | null | null | null | count_by_provider.py | SunshineStateDigitalNetwork/harvest_utils | 1918732da2e485d45832766245e4beaae6da5b5f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys, json
from collections import Counter
data_providers = []
with open(sys.argv[1]) as f:
rec = json.load(f)
for record in rec:
data_providers.append(record['dataProvider'])
counts = Counter(data_providers)
for item in list(counts):
print(item, ': ', counts[item])... | 17.888889 | 53 | 0.680124 |
1e676f04e361424c9b9b57dd01173e2fd0c3d4da | 1,201 | py | Python | corehq/apps/es/tests/test_utils.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | 471 | 2015-01-10T02:55:01.000Z | 2022-03-29T18:07:18.000Z | corehq/apps/es/tests/test_utils.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | 14,354 | 2015-01-01T07:38:23.000Z | 2022-03-31T20:55:14.000Z | corehq/apps/es/tests/test_utils.py | akashkj/commcare-hq | b00a62336ec26cea1477dfb8c048c548cc462831 | [
"BSD-3-Clause"
] | 175 | 2015-01-06T07:16:47.000Z | 2022-03-29T13:27:01.000Z | from datetime import date, datetime
from pytz import UTC, timezone
from ..utils import es_format_datetime
ET = timezone('US/Eastern')
| 42.892857 | 98 | 0.612823 |
1e676fac880fc5466a7425decb22605ffc682c32 | 1,072 | py | Python | tools/build_dictionary_char.py | Yasumasa/gated_word_char_rlm_ym | 0d35e5894416a531a5bee14f7df8dea38a1c8484 | [
"BSD-3-Clause"
] | 32 | 2016-07-11T00:32:27.000Z | 2022-02-27T04:21:36.000Z | tools/build_dictionary_char.py | Yasumasa/gated_word_char_rlm_ym | 0d35e5894416a531a5bee14f7df8dea38a1c8484 | [
"BSD-3-Clause"
] | 1 | 2017-08-06T19:18:23.000Z | 2017-08-14T02:12:15.000Z | tools/build_dictionary_char.py | Yasumasa/gated_word_char_rlm_ym | 0d35e5894416a531a5bee14f7df8dea38a1c8484 | [
"BSD-3-Clause"
] | 16 | 2016-08-29T08:45:55.000Z | 2020-11-03T02:44:01.000Z | """
Build a character dictionary
"""
import numpy
import cPickle as pkl
import sys
import fileinput
from collections import OrderedDict
if __name__ == '__main__':
filenames = sys.argv[1:]
assert len(filenames) > 0, "please specify at least one filename."
main(filenames)
| 25.52381 | 67 | 0.593284 |
1e69077c7c10e476b61bed366627a53116787801 | 2,815 | py | Python | SessionTools/sort_sessions.py | DynamoDS/Coulomb | 705e9a44c44ebdbe5650697b896000e8c42d8b56 | [
"MIT"
] | 3 | 2015-09-23T17:52:44.000Z | 2020-04-11T11:15:59.000Z | SessionTools/sort_sessions.py | DynamoDS/Coulomb | 705e9a44c44ebdbe5650697b896000e8c42d8b56 | [
"MIT"
] | null | null | null | SessionTools/sort_sessions.py | DynamoDS/Coulomb | 705e9a44c44ebdbe5650697b896000e8c42d8b56 | [
"MIT"
] | 1 | 2020-08-01T12:39:25.000Z | 2020-08-01T12:39:25.000Z | # This tool takes the raw usage data and splits it into session files
import gzip
import json
import base64
import sys
import traceback
import time
import random
import os
import sys
VERBOSE = True
err = 0
MAX_MEM = 1 * 1000 * 1000 * 1000
if len(sys.argv) != 2:
print "Usage: python sort_sessions.py path_to_ses... | 23.655462 | 88 | 0.580817 |
1e69c26d6ae416358faf6b8f9971b4dbfaf0f463 | 37,047 | py | Python | sfftk/unittests/test_notes.py | ssabrii/sfftk | 5cab37f1c9ecb9c2507672fd3232b1b9b5405511 | [
"Apache-2.0"
] | null | null | null | sfftk/unittests/test_notes.py | ssabrii/sfftk | 5cab37f1c9ecb9c2507672fd3232b1b9b5405511 | [
"Apache-2.0"
] | null | null | null | sfftk/unittests/test_notes.py | ssabrii/sfftk | 5cab37f1c9ecb9c2507672fd3232b1b9b5405511 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Unit tests for :py:mod:`sfftk.core.notes` package"""
from __future__ import division, print_function
import os
import shlex
import shutil
import sys
import unittest
from urllib import urlencode
import __init__ as tests
from .. import BASE_DIR
from .. import schema
fro... | 42.730104 | 138 | 0.625341 |
1e6a40545d687c3ecf51841513c392eec05aec51 | 398 | py | Python | projects/NameSorter.py | SilverBlaze109/VAMPY2017 | 68197544009aebc494b640b5d266c97ad6331c00 | [
"MIT"
] | null | null | null | projects/NameSorter.py | SilverBlaze109/VAMPY2017 | 68197544009aebc494b640b5d266c97ad6331c00 | [
"MIT"
] | null | null | null | projects/NameSorter.py | SilverBlaze109/VAMPY2017 | 68197544009aebc494b640b5d266c97ad6331c00 | [
"MIT"
] | null | null | null | import Merge_Sorting
read_filename = "/home/vampy/data/test1"
write_filename = "/home/vampy/data/test2"
fp = open(read_filename, "r")
N = int(fp.readline())
names = []
for i in range(N):
names.append(fp.readline().strip())
fp.close()
Merge_Sorting.mergesort(names)
fp = open(write_filename, "w")
fp.write("{0}\n".f... | 18.090909 | 41 | 0.675879 |
1e6d8fb3d8f40dfbf384a556f19e918e977fd462 | 252 | py | Python | api/conf/config.py | JackyCJ/flask-restful-login | 1bd31ee3da8ca667dc7592123ad5ee700dcb2595 | [
"MIT"
] | 76 | 2017-07-15T15:52:51.000Z | 2022-03-30T04:45:05.000Z | api/conf/config.py | JackyCJ/flask-restful-login | 1bd31ee3da8ca667dc7592123ad5ee700dcb2595 | [
"MIT"
] | 83 | 2019-08-10T06:58:11.000Z | 2022-03-31T16:29:37.000Z | api/conf/config.py | JackyCJ/flask-restful-login | 1bd31ee3da8ca667dc7592123ad5ee700dcb2595 | [
"MIT"
] | 23 | 2016-07-14T09:06:51.000Z | 2022-03-28T07:54:39.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
# Create a database in project and get it's path.
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(basedir, "test.db")
| 25.2 | 73 | 0.674603 |
1e6eefc3ab5404b4e42d6811569ac96399e99d1c | 755 | py | Python | src/discolight/query.py | denzel-datature/discolight | 7c8309d3f883263b2e4cae0b289f17be1d1c07ea | [
"MIT"
] | 27 | 2020-07-23T08:09:25.000Z | 2022-03-01T08:24:43.000Z | src/discolight/query.py | denzel-datature/discolight | 7c8309d3f883263b2e4cae0b289f17be1d1c07ea | [
"MIT"
] | 7 | 2020-08-05T07:26:55.000Z | 2020-12-31T04:20:40.000Z | src/discolight/query.py | denzel-datature/discolight | 7c8309d3f883263b2e4cae0b289f17be1d1c07ea | [
"MIT"
] | 6 | 2020-07-27T04:30:01.000Z | 2020-08-13T02:39:25.000Z | """A parser for YAML queries used by the Augmentor class."""
import yamale
schema = yamale.make_schema(content="""
input:
images:
loader: str()
options: map()
annotations:
loader: str()
options: map()
output:
images:
writer: str()
options: map()
annotations:
writer: str()
option... | 18.414634 | 60 | 0.651656 |
1e70a8cf3463ffe9421d2adf4f0d082d0018a938 | 1,423 | py | Python | migrations/versions/efd88a3c30a8_.py | andraune/Run4IT_BackEnd | a481427a0d1189a1f08c42e7ac1b452af6bbfc8d | [
"MIT"
] | 1 | 2022-03-29T06:11:20.000Z | 2022-03-29T06:11:20.000Z | migrations/versions/efd88a3c30a8_.py | andraune/run4it_backend | a481427a0d1189a1f08c42e7ac1b452af6bbfc8d | [
"MIT"
] | null | null | null | migrations/versions/efd88a3c30a8_.py | andraune/run4it_backend | a481427a0d1189a1f08c42e7ac1b452af6bbfc8d | [
"MIT"
] | null | null | null | """empty message
Revision ID: efd88a3c30a8
Revises: edf37629d0f4
Create Date: 2020-08-23 12:34:41.656176
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'efd88a3c30a8'
down_revision = 'edf37629d0f4'
branch_labels = None
depends_on = None
| 33.093023 | 98 | 0.697119 |
1e7303e5e2805c01c2695e6e83bc9c5498d330bd | 2,497 | py | Python | code/model/loss/loss.py | ZJU-Fangyin/KCL | 1d1002aeee785e4eb1dfc121d6cbb9cefa4e985c | [
"MIT"
] | 24 | 2021-12-04T13:44:22.000Z | 2022-03-19T08:10:19.000Z | code/model/loss/loss.py | Fangyin1994/KCL | 004f5681b77e4e75c791c909696fdb8a208501a2 | [
"MIT"
] | 3 | 2021-12-20T08:14:06.000Z | 2022-03-28T08:03:09.000Z | code/model/loss/loss.py | Fangyin1994/KCL | 004f5681b77e4e75c791c909696fdb8a208501a2 | [
"MIT"
] | 1 | 2021-12-22T09:29:55.000Z | 2021-12-22T09:29:55.000Z |
from .loss_computer import NCESoftmaxLoss
import torch.nn.functional as F
import torch.nn as nn
import torch
import logging
import pdb
logger = logging.getLogger()
# _, features = self.model(images)
# logits, labels = self.flat_loss(features)
# v = torch.logsumexp(logits, dim=1, keepdim=True) #(512,1)
# loss_vec ... | 34.205479 | 96 | 0.64998 |
1e73e5b2fe9aa6d77e943c822dde424875f561fa | 3,359 | py | Python | Script_fullBandCapture.py | gdavila/PyDocsisMon | 461bb05a732f9c20bfcca18624d266f7ff89f8f2 | [
"MIT"
] | 4 | 2019-06-27T13:49:09.000Z | 2021-07-26T05:30:04.000Z | Script_fullBandCapture.py | gdavila/PyDocsisMon | 461bb05a732f9c20bfcca18624d266f7ff89f8f2 | [
"MIT"
] | null | null | null | Script_fullBandCapture.py | gdavila/PyDocsisMon | 461bb05a732f9c20bfcca18624d266f7ff89f8f2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 15 12:16:14 2018
@author: gdavila
This is a example to get Full Band Channel information
On Docsis 3.0 Full Band Channels is a feature that allows to get detailed info
about the power distribution of the espectrum
"""
import docsisMon.cmDevices as cmDevices
from docsis... | 30.816514 | 130 | 0.533194 |
1e76a6d7201c50230ea9c60f989c6e9e8acbee75 | 398 | py | Python | examples/crack_egg.py | mkclairhong/quail | a6d6502746c853518a670d542222eb5fc2b05542 | [
"MIT"
] | 1 | 2018-05-30T15:33:26.000Z | 2018-05-30T15:33:26.000Z | examples/crack_egg.py | mkclairhong/quail | a6d6502746c853518a670d542222eb5fc2b05542 | [
"MIT"
] | 7 | 2018-06-21T13:21:22.000Z | 2018-07-24T21:20:05.000Z | examples/crack_egg.py | mkclairhong/quail | a6d6502746c853518a670d542222eb5fc2b05542 | [
"MIT"
] | 1 | 2018-06-01T17:39:48.000Z | 2018-06-01T17:39:48.000Z | # -*- coding: utf-8 -*-
"""
=============================
Crack Egg
=============================
This an example of how to crack an egg (take a slice of subjects/lists from it)
"""
# Code source: Andrew Heusser
# License: MIT
#import
import quail
#load data
egg = quail.load_example_data()
#crack egg
cracked_egg ... | 16.583333 | 79 | 0.59799 |
1e77a46aa8467b03a2158c13c41151ff7714391b | 4,674 | py | Python | misc_analysis.py | adamnahari/bch_clinical_lab_indicators_covid19_misc | 2e29c2f69678e6d4ff1c3f55150588f207afc874 | [
"MIT"
] | null | null | null | misc_analysis.py | adamnahari/bch_clinical_lab_indicators_covid19_misc | 2e29c2f69678e6d4ff1c3f55150588f207afc874 | [
"MIT"
] | null | null | null | misc_analysis.py | adamnahari/bch_clinical_lab_indicators_covid19_misc | 2e29c2f69678e6d4ff1c3f55150588f207afc874 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import pandas as pd
from statsmodels.stats.proportion import proportion_confint
from itertools import combinations
# remove patients for which we do not have any covid info
data = data[(data['MRN'].isin(pcr['MRN'])) | (data['MRN'].isin(misc['mrn']))]
data['MISCFound'] = data['MR... | 54.348837 | 326 | 0.695336 |
1e77ef009463c9c8b20da40c4cad47baa5105caf | 488 | py | Python | cython_wordle/setup.py | richardtiffin/wordle | 9bdca662f204673e8fdac6fe262f596a4c1a7971 | [
"MIT"
] | null | null | null | cython_wordle/setup.py | richardtiffin/wordle | 9bdca662f204673e8fdac6fe262f596a4c1a7971 | [
"MIT"
] | null | null | null | cython_wordle/setup.py | richardtiffin/wordle | 9bdca662f204673e8fdac6fe262f596a4c1a7971 | [
"MIT"
] | null | null | null | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules=[
Extension("BBox", ["BBox.pyx"]),
Extension("spirals", ["spirals.pyx"]),
Extension("wordle", ["wordle.pyx"]),
]
setup(
name = 'wordle',
cmdcl... | 25.684211 | 60 | 0.659836 |
1e781496e1aa125be921635999ca76ed9c8a3c2b | 4,296 | py | Python | workon/models/file.py | dalou/django-workon | ef63c0a81c00ef560ed693e435cf3825f5170126 | [
"BSD-3-Clause"
] | null | null | null | workon/models/file.py | dalou/django-workon | ef63c0a81c00ef560ed693e435cf3825f5170126 | [
"BSD-3-Clause"
] | null | null | null | workon/models/file.py | dalou/django-workon | ef63c0a81c00ef560ed693e435cf3825f5170126 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
import magic, os, urllib2
from django.core.files.storage import default_storage as storage | 41.307692 | 153 | 0.598929 |
1e7861ff4e6f1898ca9de27db75540533d4577d2 | 484 | py | Python | Python/bst/lets_trie.py | creativcoder/AlgorithmsExercise | a25895205272d17714a6d7dc37eaa2b03c126c6c | [
"MIT"
] | null | null | null | Python/bst/lets_trie.py | creativcoder/AlgorithmsExercise | a25895205272d17714a6d7dc37eaa2b03c126c6c | [
"MIT"
] | null | null | null | Python/bst/lets_trie.py | creativcoder/AlgorithmsExercise | a25895205272d17714a6d7dc37eaa2b03c126c6c | [
"MIT"
] | null | null | null | # A node is an instance of a single node in the trie tree
# given a word this Trie will trie to insrt
t = Trie('alpha')
t.traverse()
| 19.36 | 57 | 0.688017 |
1e79370c0eaab1ed491a5469eb8e029e278bec8b | 44 | py | Python | chat/__main__.py | oinqu/network-protocol-design-course | 3f190c1a5423a472e98af94e00da08a7c4718028 | [
"MIT"
] | null | null | null | chat/__main__.py | oinqu/network-protocol-design-course | 3f190c1a5423a472e98af94e00da08a7c4718028 | [
"MIT"
] | null | null | null | chat/__main__.py | oinqu/network-protocol-design-course | 3f190c1a5423a472e98af94e00da08a7c4718028 | [
"MIT"
] | null | null | null | from App import App
app = App()
app.main()
| 8.8 | 19 | 0.659091 |
1e7c1315048b3f514dcb2e813d265bec04841e19 | 293 | py | Python | demos/instance_occlsegm/instance_occlsegm_lib/__init__.py | pazeshun/jsk_apc | 0ff42000ad5992f8a31e719a5360a39cf4fa1fde | [
"BSD-3-Clause"
] | null | null | null | demos/instance_occlsegm/instance_occlsegm_lib/__init__.py | pazeshun/jsk_apc | 0ff42000ad5992f8a31e719a5360a39cf4fa1fde | [
"BSD-3-Clause"
] | 2 | 2019-04-11T05:36:23.000Z | 2019-08-19T12:58:10.000Z | demos/instance_occlsegm/instance_occlsegm_lib/__init__.py | pazeshun/jsk_apc | 0ff42000ad5992f8a31e719a5360a39cf4fa1fde | [
"BSD-3-Clause"
] | null | null | null | # flake8: noqa
# set of functions
from . import aug
from . import data
from . import geometry
from . import func
from . import image
from . import utils
from . import _io as io
# set of classes
from . import datasets
from . import models
# set of experimental modules
from . import contrib
| 16.277778 | 29 | 0.740614 |
1e7c45b57c7b1f68c58be33048ab411b59607f95 | 3,734 | py | Python | retroarch_emulationstation.py | allebb/personal-influxdb | 280be0cceb0bc00412849be4ca5ad4c7be539fc3 | [
"Apache-2.0"
] | 217 | 2020-01-07T20:25:46.000Z | 2022-03-29T06:09:58.000Z | retroarch_emulationstation.py | allebb/personal-influxdb | 280be0cceb0bc00412849be4ca5ad4c7be539fc3 | [
"Apache-2.0"
] | 16 | 2020-02-10T12:40:23.000Z | 2022-02-26T13:01:55.000Z | retroarch_emulationstation.py | allebb/personal-influxdb | 280be0cceb0bc00412849be4ca5ad4c7be539fc3 | [
"Apache-2.0"
] | 34 | 2020-01-15T15:42:20.000Z | 2022-02-22T17:29:15.000Z | #!/usr/bin/python3
# Copyright (C) 2021 Sam Steele
# 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... | 36.970297 | 169 | 0.676754 |
1e7e996369d9db95039bdf9c646f32b34e31f662 | 1,092 | py | Python | day_05/puzzles.py | electronsandstuff/Advent-of-Code-2021 | 9c23872640e8d092088dcb6d5cb845cd11d98994 | [
"BSD-3-Clause"
] | null | null | null | day_05/puzzles.py | electronsandstuff/Advent-of-Code-2021 | 9c23872640e8d092088dcb6d5cb845cd11d98994 | [
"BSD-3-Clause"
] | null | null | null | day_05/puzzles.py | electronsandstuff/Advent-of-Code-2021 | 9c23872640e8d092088dcb6d5cb845cd11d98994 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
if __name__ == '__main__':
# Process the text input
with open('input.txt') as f:
pin = f.readlines()
lines = np.array([[[int(z) for z in y.split(',')] for y in x.strip().split('->')] for x in pin])
# Generate the grid of line overlaps
print(f"Solution 1: {np.sum(genera... | 39 | 100 | 0.513736 |
1e8142af288c77ab6046cce4e5f4f27dd0d2bc03 | 269 | py | Python | tests/orientation_tests/test__repr__.py | lycantropos/rene | c73c616f3e360b994e92c950a3616a8ccb1136b9 | [
"MIT"
] | null | null | null | tests/orientation_tests/test__repr__.py | lycantropos/rene | c73c616f3e360b994e92c950a3616a8ccb1136b9 | [
"MIT"
] | null | null | null | tests/orientation_tests/test__repr__.py | lycantropos/rene | c73c616f3e360b994e92c950a3616a8ccb1136b9 | [
"MIT"
] | null | null | null | import sys
from hypothesis import given
from rene import Orientation
from . import strategies
| 19.214286 | 54 | 0.780669 |
1e8225b7ada5e1ad54098e2705b2ce6cd71e8f49 | 5,254 | py | Python | rect_creator.py | jeffreyleifer/draw_rect | 80082f53b52f5af9378f2a624024c6784ec9b565 | [
"MIT"
] | null | null | null | rect_creator.py | jeffreyleifer/draw_rect | 80082f53b52f5af9378f2a624024c6784ec9b565 | [
"MIT"
] | null | null | null | rect_creator.py | jeffreyleifer/draw_rect | 80082f53b52f5af9378f2a624024c6784ec9b565 | [
"MIT"
] | null | null | null | from PySide2.QtWidgets import QWidget
from PySide2.QtCore import Qt
from PySide2.QtCore import QPoint
from PySide2.QtWidgets import QWidget, QLabel
from PySide2.QtGui import QPainter
from PySide2.QtGui import QPixmap
from PySide2.QtGui import QPen
from draw_utils import is_adjacent, is_contained,is_intersect
... | 33.044025 | 88 | 0.604111 |
1e83dfa9c50394894ee742b2137621c5d011c5a0 | 356 | py | Python | fasttext/run.py | TheStarkor/Deep-Learning-Examples | 5174cfab823edb39ce61439fb98f2f55e23e2570 | [
"MIT"
] | null | null | null | fasttext/run.py | TheStarkor/Deep-Learning-Examples | 5174cfab823edb39ce61439fb98f2f55e23e2570 | [
"MIT"
] | null | null | null | fasttext/run.py | TheStarkor/Deep-Learning-Examples | 5174cfab823edb39ce61439fb98f2f55e23e2570 | [
"MIT"
] | null | null | null | from gensim import models
model = models.fasttext.load_facebook_model('cc.ko.300.bin')
for w, sim in model.wv.similar_by_word('', 5):
print(f'{w}: {sim}')
for w, sim in model.wv.most_similar('', topn=5):
print(f'{w}: {sim}')
print(model.wv.similarity('', ''))
print(model.wv.most_similar(positive=['', ''], ne... | 32.363636 | 77 | 0.66573 |
1e8434d13fe760e8cea23fce54f739923c5f3b0f | 6,622 | py | Python | mining_shoots_discord.py | Hofei90/stfc_mining_shoots | 1eb89c0296b203719d32ae0cbf7c15ae7ca620dc | [
"MIT"
] | null | null | null | mining_shoots_discord.py | Hofei90/stfc_mining_shoots | 1eb89c0296b203719d32ae0cbf7c15ae7ca620dc | [
"MIT"
] | null | null | null | mining_shoots_discord.py | Hofei90/stfc_mining_shoots | 1eb89c0296b203719d32ae0cbf7c15ae7ca620dc | [
"MIT"
] | null | null | null | import toml
from discord.ext import commands
import discord
import pathlib
from peewee import SqliteDatabase, fn
import db_model as db
import datetime
from dataclasses import dataclass
import matplotlib.pyplot as plt
import asyncio
SKRIPTPFAD = pathlib.Path(__file__).parent
CONFIGPFAD = SKRIPTPFAD / "config.toml"
CONF... | 30.1 | 108 | 0.598762 |
1e8540b88c0120bfb5afdddeb8fe99456df3e245 | 3,115 | py | Python | test_utils/test_utils.py | Sawrz/yeti | 1dd0653e570dc80663cd23aab1ebf61a54e44001 | [
"MIT"
] | null | null | null | test_utils/test_utils.py | Sawrz/yeti | 1dd0653e570dc80663cd23aab1ebf61a54e44001 | [
"MIT"
] | null | null | null | test_utils/test_utils.py | Sawrz/yeti | 1dd0653e570dc80663cd23aab1ebf61a54e44001 | [
"MIT"
] | null | null | null | import string
import numpy as np
from yeti.get_features.hydrogen_bonds import Triplet
from yeti.systems.building_blocks import Atom
| 38.45679 | 113 | 0.646228 |
1e85581ac31dc11f833c7a82b762a417fde73841 | 736 | py | Python | tests/analyses/conftest.py | weibullguy/ramstk | 3ec41d7e2933045a7a8028aed6c6b04365495095 | [
"BSD-3-Clause"
] | 4 | 2018-08-26T09:11:36.000Z | 2019-05-24T12:01:02.000Z | tests/analyses/conftest.py | weibullguy/ramstk | 3ec41d7e2933045a7a8028aed6c6b04365495095 | [
"BSD-3-Clause"
] | 52 | 2018-08-24T12:51:22.000Z | 2020-12-28T04:59:42.000Z | tests/analyses/conftest.py | weibullguy/ramstk | 3ec41d7e2933045a7a8028aed6c6b04365495095 | [
"BSD-3-Clause"
] | 1 | 2018-10-11T07:57:55.000Z | 2018-10-11T07:57:55.000Z | # Third Party Imports
import pytest
| 24.533333 | 37 | 0.546196 |
1e8587f831eb0191924a6fb1115988c766870ce9 | 689 | py | Python | mmhuman3d/core/conventions/keypoints_mapping/instavariety.py | ykk648/mmhuman3d | 26af92bcf6abbe1855e1a8a48308621410f9c047 | [
"Apache-2.0"
] | 472 | 2021-12-03T03:12:55.000Z | 2022-03-31T01:33:13.000Z | mmhuman3d/core/conventions/keypoints_mapping/instavariety.py | ykk648/mmhuman3d | 26af92bcf6abbe1855e1a8a48308621410f9c047 | [
"Apache-2.0"
] | 127 | 2021-12-03T05:00:14.000Z | 2022-03-31T13:47:33.000Z | mmhuman3d/core/conventions/keypoints_mapping/instavariety.py | ykk648/mmhuman3d | 26af92bcf6abbe1855e1a8a48308621410f9c047 | [
"Apache-2.0"
] | 37 | 2021-12-03T03:23:22.000Z | 2022-03-31T08:41:58.000Z | INSTAVARIETY_KEYPOINTS = [
'right_heel_openpose',
'right_knee_openpose',
'right_hip_openpose',
'left_hip_openpose',
'left_knee_openpose',
'left_heel_openpose',
'right_wrist_openpose',
'right_elbow_openpose',
'right_shoulder_openpose',
'left_shoulder_openpose',
'left_elbow_ope... | 24.607143 | 30 | 0.699565 |
1e865f0471666eee6566c8792893e373522a1f73 | 72,247 | py | Python | vaccinate/core/models.py | MoralCode/vial | cdaaab053a9cf1cef40104a2cdf480b7932d58f7 | [
"MIT"
] | null | null | null | vaccinate/core/models.py | MoralCode/vial | cdaaab053a9cf1cef40104a2cdf480b7932d58f7 | [
"MIT"
] | null | null | null | vaccinate/core/models.py | MoralCode/vial | cdaaab053a9cf1cef40104a2cdf480b7932d58f7 | [
"MIT"
] | null | null | null | from __future__ import annotations
import uuid
from datetime import datetime, timedelta
from functools import reduce
from operator import or_
from typing import Any, List, NamedTuple, Optional
import beeline
import pytz
import sentry_sdk
from django.conf import settings
from django.contrib.auth.models import User
fro... | 36.654997 | 179 | 0.648428 |
1e871e7be4f994cf1cfd89c9a4b868bc30e2a035 | 205 | py | Python | settings/settings.py | Partycode/opentfd | 2211012ccb3b96b5b48ae2ae27f874354e6ddc71 | [
"Apache-2.0"
] | null | null | null | settings/settings.py | Partycode/opentfd | 2211012ccb3b96b5b48ae2ae27f874354e6ddc71 | [
"Apache-2.0"
] | null | null | null | settings/settings.py | Partycode/opentfd | 2211012ccb3b96b5b48ae2ae27f874354e6ddc71 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
APP_PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
SESSION_FILE_PATH = os.path.join(APP_PATH, 'settings', 'opentfd_session')
| 25.625 | 73 | 0.721951 |
1e88662b9dcdea887377483da9b99fbeb0a1e2ce | 1,650 | py | Python | src/train.py | SunbirdAI/SunBERT | b73ccf5115a0303b59b27df602bfe064c8ebd6fa | [
"MIT"
] | null | null | null | src/train.py | SunbirdAI/SunBERT | b73ccf5115a0303b59b27df602bfe064c8ebd6fa | [
"MIT"
] | 1 | 2021-02-24T17:11:26.000Z | 2021-02-24T17:11:31.000Z | src/train.py | SunbirdAI/SunBERT | b73ccf5115a0303b59b27df602bfe064c8ebd6fa | [
"MIT"
] | 1 | 2021-12-10T12:27:17.000Z | 2021-12-10T12:27:17.000Z | import pandas as pd
from dataset import create_dataloader
from engine import train_fn
from model import SunBERT
from transformers import AdamW
from torch import nn
if __name__ == '__main__':
run()
| 38.372093 | 130 | 0.746667 |
1e89e5918f3ccc62e2c9d037ec970ff4354a9c3b | 4,430 | py | Python | COVID-19_Old.py | JustHarsh/Drug_Discovery-COVID-19 | 0dd941797e6a928f70f2ea706f584259ca24478f | [
"MIT"
] | 5 | 2020-05-23T13:10:51.000Z | 2021-09-07T13:56:38.000Z | COVID-19_Old.py | JustHarsh/Drug_Discovery-COVID-19 | 0dd941797e6a928f70f2ea706f584259ca24478f | [
"MIT"
] | null | null | null | COVID-19_Old.py | JustHarsh/Drug_Discovery-COVID-19 | 0dd941797e6a928f70f2ea706f584259ca24478f | [
"MIT"
] | null | null | null | # Importing all essential libraries
import os
import random
import sys
import pandas as pd
import numpy as np
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import Dropout
from keras.optimizers import RMSprop
from keras.utils.data_utils import get_fil... | 29.731544 | 93 | 0.584876 |
1e8c90529784c32fc97eee269bf1f19fcbbdd280 | 1,494 | py | Python | tests/service/test_base.py | flyinactor91/AVWX-Engine | 0d3ce2c6e962d2a3ec9db711caf9d1c94658fa80 | [
"MIT"
] | 30 | 2015-09-08T20:38:41.000Z | 2019-03-10T07:10:47.000Z | tests/service/test_base.py | sthagen/avwx-engine | af235b9d26e5495f04076ed5499cf8cd131d4efc | [
"MIT"
] | 5 | 2015-08-12T15:50:07.000Z | 2019-04-16T00:42:12.000Z | tests/service/test_base.py | sthagen/avwx-engine | af235b9d26e5495f04076ed5499cf8cd131d4efc | [
"MIT"
] | 11 | 2016-01-17T10:10:29.000Z | 2019-01-13T17:55:36.000Z | """
Service API Tests
"""
# pylint: disable=missing-class-docstring
# stdlib
from typing import Tuple
import unittest
# module
from avwx import service
BASE_ATTRS = ("url", "report_type", "_valid_types")
| 28.730769 | 66 | 0.660643 |
1e8c94240a87d0206591689e63849ac4c1ef22b0 | 1,267 | py | Python | src/main.py | DanielWieczorek/FancyReadmeBuilder | a0a91ec60a673be97d7a942ded5e1da659dda885 | [
"MIT"
] | null | null | null | src/main.py | DanielWieczorek/FancyReadmeBuilder | a0a91ec60a673be97d7a942ded5e1da659dda885 | [
"MIT"
] | null | null | null | src/main.py | DanielWieczorek/FancyReadmeBuilder | a0a91ec60a673be97d7a942ded5e1da659dda885 | [
"MIT"
] | null | null | null | """
This is a nifty little tool to create really cool looking Readme files.
Its essentially a templating tool for such. The initial steps to create a template are the following:
- create a super cool ANSI Art design for your readme.
- create a template that uses this image and defines fields where text can be inserted.... | 27.543478 | 115 | 0.767956 |
1e8dff84bf260e37d0a7da4269b967a651c8336e | 147 | py | Python | capitulo-05/ex05.py | bryan-lima/exercicios-livro-introd-prog-python-3ed | b6bc26dced9728510865704a80cb0d97f81f756b | [
"MIT"
] | 3 | 2021-11-09T17:54:10.000Z | 2022-01-30T22:32:25.000Z | capitulo-05/ex05.py | bryan-lima/exercicios-livro-introd-prog-python-3ed | b6bc26dced9728510865704a80cb0d97f81f756b | [
"MIT"
] | null | null | null | capitulo-05/ex05.py | bryan-lima/exercicios-livro-introd-prog-python-3ed | b6bc26dced9728510865704a80cb0d97f81f756b | [
"MIT"
] | null | null | null | # Reescreva o programa anterior para escrever os 10 primeiros mltiplos de 3
lastNumber = 30
n = 3
while n <= lastNumber:
print(n)
n += 3
| 18.375 | 76 | 0.687075 |
1e9151fbe802bf8cc3a1fe455244d59c40229ca9 | 15,165 | py | Python | extension/TypeFacet-RoboFont.roboFontExt/lib/tfs/common/TFSGlyph.py | charlesmchen/typefacet-robofont | 1dee6f1054cfa0cdf87a490ff017a7098f894ef2 | [
"Apache-2.0"
] | 1 | 2019-07-15T22:29:56.000Z | 2019-07-15T22:29:56.000Z | src-all/tfs/common/TFSGlyph.py | charlesmchen/typefacet-robofont | 1dee6f1054cfa0cdf87a490ff017a7098f894ef2 | [
"Apache-2.0"
] | null | null | null | src-all/tfs/common/TFSGlyph.py | charlesmchen/typefacet-robofont | 1dee6f1054cfa0cdf87a490ff017a7098f894ef2 | [
"Apache-2.0"
] | null | null | null | '''
robofont-extensions-and-scripts
TFSGlyph.py
https://github.com/charlesmchen/robofont-extensions-and-scripts
Copyright (c) 2012 Charles Matthew Chen
charlesmchen@gmail.com
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. D... | 70.208333 | 1,307 | 0.713419 |
1e91bffc137dacb98dd65fdc54a68e7adb4518df | 3,080 | py | Python | bin/soundboard_scripts/soundboard-preprocess.py | andrewmichaud/scripts | 0e79a3454ec0116a0e3ed2902b79494939050937 | [
"0BSD"
] | 1 | 2016-10-13T18:36:59.000Z | 2016-10-13T18:36:59.000Z | bin/soundboard_scripts/soundboard-preprocess.py | andrewmichaud/scripts | 0e79a3454ec0116a0e3ed2902b79494939050937 | [
"0BSD"
] | null | null | null | bin/soundboard_scripts/soundboard-preprocess.py | andrewmichaud/scripts | 0e79a3454ec0116a0e3ed2902b79494939050937 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
import json
# If you change this be sure to change it everywhere in the main ahk file too.
bank_size = 8
input_file = "soundboard_data.json"
output_file = "soundboard_data.ahk"
if __name__ == "__main__":
main()
| 29.615385 | 87 | 0.612662 |
1e93915ecdb2cdb619894439c631119916b71978 | 1,822 | py | Python | 1047.remove-all-adjacent-duplicates-in-string.py | windard/leeeeee | 0107a5f95746592ca4fe78d2b5875cf65b1910e7 | [
"MIT"
] | null | null | null | 1047.remove-all-adjacent-duplicates-in-string.py | windard/leeeeee | 0107a5f95746592ca4fe78d2b5875cf65b1910e7 | [
"MIT"
] | null | null | null | 1047.remove-all-adjacent-duplicates-in-string.py | windard/leeeeee | 0107a5f95746592ca4fe78d2b5875cf65b1910e7 | [
"MIT"
] | null | null | null | # coding=utf-8
#
# @lc app=leetcode id=1047 lang=python
#
# [1047] Remove All Adjacent Duplicates In String
#
# https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/description/
#
# algorithms
# Easy (63.77%)
# Likes: 184
# Dislikes: 18
# Total Accepted: 21.7K
# Total Submissions: 34K
# Testcase... | 23.063291 | 85 | 0.57629 |
1e941d0f1ea0bea6db578d655dff1e5ed3367636 | 781 | py | Python | sap/cf_logging/formatters/json_formatter.py | mhaas/cf-python-logging-support | 86b7e8ef35b935401bdec7da275fe4e09302988c | [
"Apache-2.0"
] | 16 | 2017-11-30T06:17:07.000Z | 2021-09-13T13:41:17.000Z | sap/cf_logging/formatters/json_formatter.py | mhaas/cf-python-logging-support | 86b7e8ef35b935401bdec7da275fe4e09302988c | [
"Apache-2.0"
] | 32 | 2017-12-01T14:48:17.000Z | 2022-02-19T04:49:55.000Z | sap/cf_logging/formatters/json_formatter.py | mhaas/cf-python-logging-support | 86b7e8ef35b935401bdec7da275fe4e09302988c | [
"Apache-2.0"
] | 7 | 2018-03-08T15:52:55.000Z | 2022-02-27T18:52:57.000Z | """ Module for the JsonFormatter """
import json
import logging
import sys
from sap.cf_logging.record.simple_log_record import SimpleLogRecord
if sys.version_info[0] == 3:
else:
| 27.892857 | 106 | 0.701665 |
1e96de784904b01afc6ec3b2c98877a952ba909a | 2,081 | py | Python | src/compas_rhino/geometry/__init__.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_rhino/geometry/__init__.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_rhino/geometry/__init__.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | """
********************************************************************************
geometry
********************************************************************************
.. currentmodule:: compas_rhino.geometry
.. rst-class:: lead
Wrappers for Rhino objects that can be used to convert Rhino geometry and data to... | 19.819048 | 97 | 0.62518 |
1e974270a6cf3fb3cecc5bb2513b8e4bc658f7b9 | 5,757 | py | Python | tests/functional_test.py | Luxxii/ProtGraph | 68c3b362e2b487403fa02cfc25d456a272004a1f | [
"BSD-2-Clause"
] | null | null | null | tests/functional_test.py | Luxxii/ProtGraph | 68c3b362e2b487403fa02cfc25d456a272004a1f | [
"BSD-2-Clause"
] | null | null | null | tests/functional_test.py | Luxxii/ProtGraph | 68c3b362e2b487403fa02cfc25d456a272004a1f | [
"BSD-2-Clause"
] | null | null | null | import os
import unittest
import protgraph
| 39.163265 | 116 | 0.657982 |
1e99fc63ab0f76d9f24c67f04cff7cdb44f433f8 | 3,444 | py | Python | v1_fastecdsa/bsgs_algo_modified.py | Chesterfield007/bsgs | dc3a7ab73ca7b385d25f7b486e8efa293c4e3bf8 | [
"MIT"
] | 55 | 2021-01-15T17:01:10.000Z | 2022-03-26T20:15:33.000Z | v1_fastecdsa/bsgs_algo_modified.py | Chesterfield007/bsgs | dc3a7ab73ca7b385d25f7b486e8efa293c4e3bf8 | [
"MIT"
] | 53 | 2021-02-14T22:17:44.000Z | 2022-01-28T17:43:59.000Z | v1_fastecdsa/bsgs_algo_modified.py | Chesterfield007/bsgs | dc3a7ab73ca7b385d25f7b486e8efa293c4e3bf8 | [
"MIT"
] | 33 | 2021-02-19T13:30:49.000Z | 2022-01-12T06:58:07.000Z | # -*- coding: utf-8 -*-
"""
@author: iceland
"""
import bit
import time
import random
import os
from fastecdsa import curve
from fastecdsa.point import Point
bs_file = 'baby_steps_table.txt'
###############################################################################
# Puzzle 46 : Privatekey Key 0x... | 32.8 | 146 | 0.525842 |
1e9b577b7f413d5ad5843da3f3b556606b15fe32 | 8,709 | py | Python | get_wiki.py | 84adam/python3-nlp | 977c79e7d207e6d49b5c50c837f454d7b13db681 | [
"MIT"
] | null | null | null | get_wiki.py | 84adam/python3-nlp | 977c79e7d207e6d49b5c50c837f454d7b13db681 | [
"MIT"
] | null | null | null | get_wiki.py | 84adam/python3-nlp | 977c79e7d207e6d49b5c50c837f454d7b13db681 | [
"MIT"
] | 3 | 2021-05-21T12:11:05.000Z | 2022-03-11T06:05:45.000Z | import bs4
import requests
from urllib.request import urlopen
from itertools import chain
from html.parser import HTMLParser
from requests import get
import os
import time
from pathlib import Path
import pandas as pd
from keras.preprocessing.text import text_to_word_sequence
# WIKI TEXT BODY SCRAPING FUNCTION
# FUNCT... | 52.463855 | 128 | 0.662303 |
1e9c3050599f663b533b1cb0a02ba2db691c8a25 | 10,680 | py | Python | submitReason.py | converj/reasonSurvey | dd40784da4b07cfeb9fd873bab820d627cb026c1 | [
"Apache-2.0"
] | null | null | null | submitReason.py | converj/reasonSurvey | dd40784da4b07cfeb9fd873bab820d627cb026c1 | [
"Apache-2.0"
] | null | null | null | submitReason.py | converj/reasonSurvey | dd40784da4b07cfeb9fd873bab820d627cb026c1 | [
"Apache-2.0"
] | null | null | null | # Import external modules
from google.appengine.ext import ndb
import json
import logging
import os
import webapp2
# Import app modules
from configuration import const as conf
import httpServer
import linkKey
import proposal
import reason
import requestForProposals
import user
import text
from text import LogMessage
... | 57.112299 | 202 | 0.71573 |
1e9c781b419e835c7eced196ef491e5128f9bbdb | 62 | py | Python | ACM-Solution/powerof2.py | wasi0013/Python-CodeBase | 4a7a36395162f68f84ded9085fa34cc7c9b19233 | [
"MIT"
] | 2 | 2016-04-26T15:40:40.000Z | 2018-07-18T10:16:42.000Z | ACM-Solution/powerof2.py | wasi0013/Python-CodeBase | 4a7a36395162f68f84ded9085fa34cc7c9b19233 | [
"MIT"
] | 1 | 2016-04-26T15:44:15.000Z | 2016-04-29T14:44:40.000Z | ACM-Solution/powerof2.py | wasi0013/Python-CodeBase | 4a7a36395162f68f84ded9085fa34cc7c9b19233 | [
"MIT"
] | 1 | 2018-10-02T16:12:19.000Z | 2018-10-02T16:12:19.000Z | exec("x=0;N=int(input());print(2**(sum()+1));"*int(input()))
| 31 | 61 | 0.532258 |
1e9d25884d2e5c0101e720dedd1422a914d3a51f | 6,921 | py | Python | utils/search_methods/improved_genetic_algorithm.py | Yzx835/AISafety | eb09551814898c7f6d86641b47faf7845c948640 | [
"MIT"
] | null | null | null | utils/search_methods/improved_genetic_algorithm.py | Yzx835/AISafety | eb09551814898c7f6d86641b47faf7845c948640 | [
"MIT"
] | null | null | null | utils/search_methods/improved_genetic_algorithm.py | Yzx835/AISafety | eb09551814898c7f6d86641b47faf7845c948640 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# coding=UTF-8
"""
@Author: WEN Hao
@LastEditors: WEN Hao
@Description:
@Date: 2021-09-09
@LastEditTime: 2022-04-17
Natural Language Adversarial Attack and Defense in Word Level
crossover
"""
from typing import NoReturn, List, Tuple
import numpy as np
from .genetic_algorithm_base import ... | 40.238372 | 146 | 0.675625 |
1ea072b732c5079452f155039380955fd1aa5f1c | 1,471 | py | Python | samEshop/main/migrations/0011_auto_20211002_1844.py | Tedd-console/Django-Ecomm | fd74af3625888b76bb7f8da6b0ae5331c71b15f9 | [
"MIT"
] | null | null | null | samEshop/main/migrations/0011_auto_20211002_1844.py | Tedd-console/Django-Ecomm | fd74af3625888b76bb7f8da6b0ae5331c71b15f9 | [
"MIT"
] | null | null | null | samEshop/main/migrations/0011_auto_20211002_1844.py | Tedd-console/Django-Ecomm | fd74af3625888b76bb7f8da6b0ae5331c71b15f9 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-10-02 15:44
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| 36.775 | 128 | 0.597553 |
1ea0fd1be68cf1a8b16e2cd75440fa8dee7e1872 | 303 | py | Python | exercices/word-count/word_count.py | gkaeso/exercism-python | 00360effcc1eceadfdf6e342ff52bd6284b9bc87 | [
"MIT"
] | null | null | null | exercices/word-count/word_count.py | gkaeso/exercism-python | 00360effcc1eceadfdf6e342ff52bd6284b9bc87 | [
"MIT"
] | null | null | null | exercices/word-count/word_count.py | gkaeso/exercism-python | 00360effcc1eceadfdf6e342ff52bd6284b9bc87 | [
"MIT"
] | null | null | null | import re
| 27.545455 | 108 | 0.643564 |
1ea33dcbed661949c9cfc5e0d749a5bbbbaa4357 | 1,595 | py | Python | tests/operations/test_set_op.py | andypalmer9669/74_series_computer | 0b8a4776b49a2380a51863634b48bcc441bf74ec | [
"MIT"
] | null | null | null | tests/operations/test_set_op.py | andypalmer9669/74_series_computer | 0b8a4776b49a2380a51863634b48bcc441bf74ec | [
"MIT"
] | 46 | 2019-02-22T16:46:02.000Z | 2020-03-08T20:26:37.000Z | tests/operations/test_set_op.py | andypalmer9669/74_series_computer | 0b8a4776b49a2380a51863634b48bcc441bf74ec | [
"MIT"
] | null | null | null | import pytest
from eight_bit_computer.operations import set_op
from eight_bit_computer.data_structures import get_machine_code_byte_template
from eight_bit_computer.exceptions import OperationParsingError
| 25.725806 | 77 | 0.676489 |
1ea38c7f548e4b34fc071140ff19d681459f019f | 5,066 | py | Python | core/model/model.py | andregri/keras-segmentation | 699043adc4dd74b97cbed3d3e5b8d8aafb03b71c | [
"Apache-2.0"
] | null | null | null | core/model/model.py | andregri/keras-segmentation | 699043adc4dd74b97cbed3d3e5b8d8aafb03b71c | [
"Apache-2.0"
] | null | null | null | core/model/model.py | andregri/keras-segmentation | 699043adc4dd74b97cbed3d3e5b8d8aafb03b71c | [
"Apache-2.0"
] | null | null | null | from tensorflow import keras
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Conv2DTranspose,\
Activation, Add
| 44.052174 | 79 | 0.603237 |
1ea3c749e4408cf0fa0ebae421190ee713d5bf51 | 10,098 | py | Python | src/models/ToothModel.py | arminnh/ma2-computer-vision | 9e931c87e097cd444ea292cdfff727636f003c36 | [
"MIT"
] | null | null | null | src/models/ToothModel.py | arminnh/ma2-computer-vision | 9e931c87e097cd444ea292cdfff727636f003c36 | [
"MIT"
] | null | null | null | src/models/ToothModel.py | arminnh/ma2-computer-vision | 9e931c87e097cd444ea292cdfff727636f003c36 | [
"MIT"
] | null | null | null | import numpy as np
import scipy.spatial.distance
from scipy import linalg
import procrustes_analysis
import util
from Landmark import Landmark
from models.CenterInitializationModel import CenterInitializationModel
| 42.970213 | 120 | 0.672509 |