added stringdate 2024-11-18 17:59:49 2024-11-19 03:44:43 | created int64 0 2,086B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.5 | source stringclasses 1
value | text stringlengths 258 23.4k | num_lines int64 16 649 | avg_line_length float64 15 61 | max_line_length int64 31 179 | ast_depth int64 8 40 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 2 265k | sast_codeql_findings_count int64 0 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T21:14:08.917708+00:00 | 1,596,893,439,000 | 908c11a549debe129b33372d14e636fce8f5e913 | 3 | {
"blob_id": "908c11a549debe129b33372d14e636fce8f5e913",
"branch_name": "refs/heads/master",
"committer_date": 1596893439000,
"content_id": "3828ce7cf928728b11af2003bf149657597ed65a",
"detected_licenses": [
"MIT"
],
"directory_id": "3173c322d473d0ef3934d0bd97008517ccccc6cf",
"extension": "py",
"fi... | 3.109375 | stackv2 | """info_specific.py
Attempts to provide some specific information about the likely cause
of a given exception.
"""
import sys
from .my_gettext import current_lang
from . import analyze_syntax
from . import analyze_type_error
from .utils import edit_distance
get_cause = {}
def register(error_name):
"""Decorato... | 230 | 29.25 | 88 | 15 | 1,635 | python | [] | 0 | true | |
2024-11-18T21:14:08.973353+00:00 | 1,613,386,854,000 | 54d15801ad4f20fb0cd47361ab19531fcf70a6f6 | 3 | {
"blob_id": "54d15801ad4f20fb0cd47361ab19531fcf70a6f6",
"branch_name": "refs/heads/main",
"committer_date": 1613386854000,
"content_id": "6ed917e07102a9526bfdda02616c4d92afbcbc95",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "d686dd84682038efe027d6ba14a77282b3786287",
"extensi... | 2.53125 | stackv2 | """ Downstream network architectures"""
# Copyright (c) 2021 Idiap Research Institute, http://www.idiap.ch/
# Written by Apoorv Vyas <apoorv.vyas@idiap.ch>
import torch
from torch import nn
from torch.nn.utils.rnn import pack_padded_sequence
import torch.nn.functional as F
from downstream.models.tdnnf import get_tdnnf... | 39 | 30.41 | 76 | 11 | 286 | python | [] | 0 | true | |
2024-11-18T21:14:09.032129+00:00 | 1,689,839,489,000 | 5a821c0d3d11b41784a63cc55ee6c5a4301f2263 | 3 | {
"blob_id": "5a821c0d3d11b41784a63cc55ee6c5a4301f2263",
"branch_name": "refs/heads/main",
"committer_date": 1689839489000,
"content_id": "c1000e011f0986bcea11510958947204d0c55fe2",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "64bf21e9b4ca104557d05dc90a70e9fc3c3544a4",
"extension": "py"... | 2.828125 | stackv2 | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2023 all rights reserved
#
class Average:
"""
The representation of the average value of a collection of nodes
"""
# value management
def getValue(self):
"""
Compute and return my value
"""
#... | 26 | 18.42 | 68 | 12 | 127 | python | [] | 0 | true | |
2024-11-18T21:14:09.205294+00:00 | 1,628,714,368,000 | 827ced7f5cff96696152d69609f26f765ebe8207 | 4 | {
"blob_id": "827ced7f5cff96696152d69609f26f765ebe8207",
"branch_name": "refs/heads/main",
"committer_date": 1628714368000,
"content_id": "477361bc95fd57eb6a7344193c5ea9309df90e80",
"detected_licenses": [
"MIT"
],
"directory_id": "031a261d890f8a0575e8ffc16066786b17e0e607",
"extension": "py",
"file... | 4.125 | stackv2 | # Aprimore o desafio anterior, mostrando no final:
# A soma de todos os valores pares digitados;
# A soma dos valores da terceira coluna;
# O maior valor da segunda linha.
listaMatriz = list()
listaLinha = list()
for linha in range(0, 3):
for coluna in range(0, 3):
listaLinha.append(int(input(f'Digite um va... | 33 | 35.42 | 84 | 15 | 392 | python | [] | 0 | true | |
2024-11-18T21:14:09.302607+00:00 | 1,427,149,395,000 | e510d89c288a60f9021d082ae05b71bcac86c42c | 2 | {
"blob_id": "e510d89c288a60f9021d082ae05b71bcac86c42c",
"branch_name": "refs/heads/master",
"committer_date": 1427149395000,
"content_id": "0f8e94b23f3a85acd945481ff1b818fb14e5e0bc",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "0cc46204ecad5144d6f5877754dd8753432db1cd",
"extension": "p... | 2.359375 | stackv2 | #!/net/kodiak/volumes/lake/shared/users/marghoob/my_env/bin/python
from __future__ import print_function
import argparse
import sys
import logging
FORMAT = '%(levelname)s %(asctime)-15s %(message)s'
logging.basicConfig(level=logging.INFO, format=FORMAT)
logger = logging.getLogger(__name__)
parser = argparse.Argument... | 211 | 32.47 | 118 | 16 | 2,595 | python | [] | 0 | true | |
2024-11-18T21:14:09.351475+00:00 | 1,642,972,676,000 | f27489c5f30e586284837d201cf4fca068c3c43e | 2 | {
"blob_id": "f27489c5f30e586284837d201cf4fca068c3c43e",
"branch_name": "refs/heads/master",
"committer_date": 1642972676000,
"content_id": "b1d59388077a8a8a2cad4557cfd231abd64b434c",
"detected_licenses": [
"MIT"
],
"directory_id": "8c4db3e2ba8b40bb0292cc026890bba814a92ea3",
"extension": "py",
"fi... | 2.453125 | stackv2 | import asyncio
from typing import Any, Mapping, Optional
from .base_handler import BaseLogstashHandler
class TCPLogstashHandler(BaseLogstashHandler):
def __init__(
self,
*,
host: str,
port: int,
level: int,
close_timeout: float,
qsize: int,
loop: as... | 52 | 28.75 | 78 | 14 | 352 | python | [] | 0 | true | |
2024-11-18T21:14:09.530727+00:00 | 1,602,942,753,000 | 0fdb9c7940b2349931509de2ef4166481e51e34b | 3 | {
"blob_id": "0fdb9c7940b2349931509de2ef4166481e51e34b",
"branch_name": "refs/heads/master",
"committer_date": 1602942753000,
"content_id": "523117ed91823345a2cd494377dc03687e6afbac",
"detected_licenses": [
"MIT"
],
"directory_id": "d7a28499f7bc408f84ca8bc8d19a867790129588",
"extension": "py",
"fi... | 2.984375 | stackv2 | import requests
import time
from bs4 import BeautifulSoup
trend_url_s = 'https://github.com/trending'
# r = requests.get(trend_url_s)
# f = open('trend.html','w')
# f.write(str(r.content))
# f.close()
f = open('trend.html', 'r')
d = f.read()
f.close()
content = d
html = BeautifulSoup(content, features='html.parser')... | 43 | 31.33 | 119 | 20 | 342 | python | [] | 0 | true | |
2024-11-18T21:14:09.659044+00:00 | 1,511,139,560,000 | b461005b0af523d13a6cbe7bb7bf6e59f4ea84c7 | 3 | {
"blob_id": "b461005b0af523d13a6cbe7bb7bf6e59f4ea84c7",
"branch_name": "refs/heads/master",
"committer_date": 1511139560000,
"content_id": "650c47ee8ad09785e069805ae1a86931ce8cf252",
"detected_licenses": [
"MIT"
],
"directory_id": "3f319dd630487eae9b9e9eb4496be7ab23c9b872",
"extension": "py",
"fi... | 3.015625 | stackv2 | """
Simulates the Raspberry Pi GPIO to some degree
v1.0: spoofs most functions to do nothing
"""
import sys
import math
import Tkinter as tk
import threading
class RepeatingTimer():
""" A Timer class that does not stop, unless you want it to.
Used to call repeating functions at defined intervals.
... | 281 | 30.47 | 113 | 20 | 2,258 | python | [] | 0 | true | |
2024-11-18T21:14:09.772692+00:00 | 1,564,630,101,000 | 3cfd0d7ce3868531a53fd12889602e08a7cea303 | 4 | {
"blob_id": "3cfd0d7ce3868531a53fd12889602e08a7cea303",
"branch_name": "refs/heads/master",
"committer_date": 1564630101000,
"content_id": "a0c99f68ecfdc0b44e530598ed7c0515604603a0",
"detected_licenses": [
"MIT"
],
"directory_id": "7ffede1fe7f0ecabc1d7af1397985df0bd68761f",
"extension": "py",
"fi... | 3.765625 | stackv2 | # -*- coding: utf-8 -*-
# @Time : 2019/7/3 15:13
# @Author : xiaoqing
# @File : 4.去掉一个数判断回文.py
# @Software: PyCharm Community Edition
class Solution(object):
def validPalindrome(self, s):
"""
:type s: str
:rtype: bool
"""
l, r = 0, len(s) - 1
while l < r:
... | 35 | 24.37 | 107 | 17 | 310 | python | [] | 0 | true | |
2024-11-18T21:14:09.890479+00:00 | 1,691,661,813,000 | 950444565c4551aee3d1d3a61d16b3144c75f9a4 | 3 | {
"blob_id": "950444565c4551aee3d1d3a61d16b3144c75f9a4",
"branch_name": "refs/heads/master",
"committer_date": 1691661813000,
"content_id": "71c2d62a29972f97355bba4bef9c80bbad5fc45b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d92feb843395968a712495b9e4c576d74139edd0",
"extension": "py"... | 3.1875 | stackv2 | # %% [markdown]
# # Transport for London Cycle Data Exploration
#
# %%
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(style="whitegrid")
plt.style.use("seaborn-whitegrid")
# %%
# Fetch data
cycle_data = pd.read_csv("TFLCycles/data/london_merged.csv")
#... | 434 | 29.7 | 129 | 17 | 3,743 | python | [] | 0 | true | |
2024-11-18T21:14:10.697580+00:00 | 1,610,788,327,000 | a2151d3a716daa45d2e610e089b8251ea3cbfbd5 | 3 | {
"blob_id": "a2151d3a716daa45d2e610e089b8251ea3cbfbd5",
"branch_name": "refs/heads/master",
"committer_date": 1610788327000,
"content_id": "d2ea38dc6090a4e4be60b5a7c857b8946bec3fdb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6185292fdf7f40fade89c6c4fed50b21f56749f6",
"extension": "py"... | 2.5625 | stackv2 | from ..broker import Broker
class PathAnalysisBroker(Broker):
controller = "path_analysis"
def create(self, **kwargs):
"""Initiates a path calculation.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:`` True
... | 328 | 30.04 | 115 | 12 | 2,275 | python | [] | 0 | true | |
2024-11-18T21:14:10.767237+00:00 | 1,488,898,361,000 | dbfdaff91af909976a5482c35858d5b3881e28f2 | 2 | {
"blob_id": "dbfdaff91af909976a5482c35858d5b3881e28f2",
"branch_name": "refs/heads/master",
"committer_date": 1488898361000,
"content_id": "3fba77d541eb6176aa2f5e17158a33c098bd6c6b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "b8cdc70c2498818f63931907a124ef23fdef7e06",
"extension": "p... | 2.328125 | stackv2 | # # # # # # # # # # # # # #
# CAPTAINHOOK IDENTIFIER #
# # # # # # # # # # # # # #
from .utils import bash, get_config_file
DEFAULT = 'off'
NO_ARG_MESSAGE = 'You must specify an argument to the grep checker.'
def grep(args, files):
return bash('grep -n -H --exclude={} {} {}'.format(get_config_file(), args, file... | 18 | 25.61 | 87 | 11 | 136 | python | [] | 0 | true | |
2024-11-18T21:14:11.010233+00:00 | 1,677,593,123,000 | e11717074c47c3c513a915bdf1781b9c73c4ef6d | 3 | {
"blob_id": "e11717074c47c3c513a915bdf1781b9c73c4ef6d",
"branch_name": "refs/heads/master",
"committer_date": 1677593123000,
"content_id": "ea008b0b340cd53a720a67285c46b564a4b7b09f",
"detected_licenses": [
"MIT"
],
"directory_id": "daec0cf5913cb945d0b72526c4890bb258acc738",
"extension": "py",
"fi... | 2.984375 | stackv2 | """This module implements useful functionality on top of the Index class,
which is not currently present in numpy"""
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import *
import numpy as np
from numpy_indexed.grouping import GroupBy, group_by
from numpy_indexed.ind... | 302 | 29.14 | 91 | 15 | 2,122 | python | [] | 0 | true | |
2024-11-18T21:14:11.221074+00:00 | 1,612,983,158,000 | f2b68acc84de9b9184c145d188a8cc8a43bc7344 | 2 | {
"blob_id": "f2b68acc84de9b9184c145d188a8cc8a43bc7344",
"branch_name": "refs/heads/main",
"committer_date": 1612983158000,
"content_id": "5e194b26bc348773bf0f987150547503eb1d5976",
"detected_licenses": [
"MIT"
],
"directory_id": "3f2c46034b98ac97aeccfea02be9ef3a57e05929",
"extension": "py",
"file... | 2.375 | stackv2 | """
@author: Viet Nguyen <nhviet1009@gmail.com>
"""
import torch
import torch.nn as nn
from torchvision.models.resnet import resnet50
from torchvision.models.mobilenet import mobilenet_v2, InvertedResidual
class Base(nn.Module):
def __init__(self):
super().__init__()
def init_weights(self):
la... | 167 | 35.14 | 113 | 18 | 1,535 | python | [] | 0 | true | |
2024-11-18T21:14:11.769981+00:00 | 1,616,518,075,000 | e64b8747876ff95233364d28e3a3d0cc67c6a28d | 3 | {
"blob_id": "e64b8747876ff95233364d28e3a3d0cc67c6a28d",
"branch_name": "refs/heads/master",
"committer_date": 1616518075000,
"content_id": "decc944aa8a71007525f52e27d5167e40a9bfa9a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d8656d25f518edf2e2019562b481a5de35469dd9",
"extension": "py"... | 2.71875 | stackv2 | import argparse
import sys
from typing import List
from monitoring.monitorlib import auth
def parse_args(argv: List[str]):
parser = argparse.ArgumentParser(description='Retrieve an access token')
parser.add_argument(
'--spec', action='store', dest='spec', type=str,
help='The auth spec for which to retrie... | 30 | 33.6 | 132 | 10 | 241 | python | [] | 0 | true | |
2024-11-18T21:14:11.817720+00:00 | 1,516,104,721,000 | 737ebf150b47a9e003593e2d0a631b6673ed50e5 | 3 | {
"blob_id": "737ebf150b47a9e003593e2d0a631b6673ed50e5",
"branch_name": "refs/heads/master",
"committer_date": 1516104721000,
"content_id": "209edc7ba775a717174e8eac428d2f04f7ef4a2b",
"detected_licenses": [
"MIT"
],
"directory_id": "501f15f1e283043f640f6ef26f8f2245e8d516eb",
"extension": "py",
"fi... | 2.921875 | stackv2 | # Mathias Punkenhofer
# code.mpunkenhofer@gmail.com
#
from pychess import pieces, moves
class Bishop(pieces.Piece):
def __init__(self, board, pos, color):
pieces.Piece.__init__(self, board, pos, color, pieces.PieceType.BISHOP)
def get_moves(self):
if self.file_pinned() or self.rank_pinned():... | 41 | 32.24 | 90 | 23 | 328 | python | [] | 0 | true | |
2024-11-18T21:14:11.873535+00:00 | 1,468,276,653,000 | b67705a41ed5421224fd0bd8317f3d57802c11ac | 2 | {
"blob_id": "b67705a41ed5421224fd0bd8317f3d57802c11ac",
"branch_name": "refs/heads/master",
"committer_date": 1468276653000,
"content_id": "54f1080cdb33d08395c7b2d94abf312a0e7e0512",
"detected_licenses": [
"MIT"
],
"directory_id": "bda6096cac11807b195dc23b4f7d050bbd5618e8",
"extension": "py",
"fi... | 2.328125 | stackv2 | # standard libraries
import os
# third-party libraries
import nbformat
import nbparameterise
from nbconvert import HTMLExporter
from nbconvert.preprocessors import ExecutePreprocessor
# ccbb libraries
from ccbbucsd.utilities.files_and_paths import get_file_name_pieces, make_file_path
__author__ = "Amanda Birmingham"... | 58 | 33.52 | 106 | 15 | 485 | python | [] | 0 | true | |
2024-11-18T21:14:11.992056+00:00 | 1,691,779,097,000 | 96428e3e85d94a08bcc52bb6231d19f61230121e | 3 | {
"blob_id": "96428e3e85d94a08bcc52bb6231d19f61230121e",
"branch_name": "refs/heads/master",
"committer_date": 1691779097000,
"content_id": "6ed176a6b00bd9358b65ec3a825aed998b0cf311",
"detected_licenses": [
"MIT"
],
"directory_id": "bc371b9238956bc00cc33654b1d68651c6edf371",
"extension": "py",
"fi... | 3.34375 | stackv2 | #!/usr/bin/env python3
import struct
from PIL import Image
PNG2_FILE = 'pic.png2'
def hex2rgb(hex_str):
"""Convert hex colors to RGB tuples."""
hex_str = hex_str.lstrip('#')
assert len(hex_str) == 6
return (
int(hex_str[0:2], 16),
int(hex_str[2:4], 16),
int(hex_str[4:6], 16)... | 53 | 20.17 | 59 | 15 | 336 | python | [] | 0 | true | |
2024-11-18T21:14:12.261848+00:00 | 1,622,717,548,000 | 6e47eec525cb7a574da170fa6e26f8b8c2005362 | 3 | {
"blob_id": "6e47eec525cb7a574da170fa6e26f8b8c2005362",
"branch_name": "refs/heads/main",
"committer_date": 1622717548000,
"content_id": "c8efb47b3b1ea19adf1afbf81a2c78ddb7bce4e9",
"detected_licenses": [
"MIT"
],
"directory_id": "696897e9785b891987deec67e563b56e1808f250",
"extension": "py",
"file... | 2.90625 | stackv2 | import tensorflow as tf
from . import common
class Masksembles2D(tf.keras.layers.Layer):
"""
:class:`Masksembles2D` is high-level class that implements Masksembles approach
for 2-dimensional inputs (similar to :class:`tensorflow.keras.layers.SpatialDropout1D`).
:param n: int, number of masks
:par... | 103 | 30.85 | 98 | 13 | 834 | python | [] | 0 | true | |
2024-11-18T21:14:12.307815+00:00 | 1,513,454,153,000 | ef8613ef60fd228a862fd87487bc348793bce80b | 2 | {
"blob_id": "ef8613ef60fd228a862fd87487bc348793bce80b",
"branch_name": "refs/heads/master",
"committer_date": 1513454153000,
"content_id": "b26e1cee3605f77104026305c16caa60891a1034",
"detected_licenses": [
"MIT"
],
"directory_id": "6e5e21b5aa92dea0d8bbd80649c0bfaccbf0f3bd",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
"""
---------------------------------------------------------------------------------------------------
File: halnode.py
Description: Provides implementation of the HALNode which is the common access point for all
hardware devices.
Author: Tim Slator
Date: ... | 80 | 26.04 | 99 | 12 | 361 | python | [] | 0 | true | |
2024-11-18T21:14:12.364905+00:00 | 1,491,571,317,000 | 2108dd2e2abab9150c9219539e320c12ef2d472e | 3 | {
"blob_id": "2108dd2e2abab9150c9219539e320c12ef2d472e",
"branch_name": "refs/heads/master",
"committer_date": 1491571317000,
"content_id": "e5f2e45370a8925469fc985a925a494e2d8d8200",
"detected_licenses": [
"MIT"
],
"directory_id": "529119e8f32a6524c69ab6b1780cec78168d1c47",
"extension": "py",
"fi... | 3.109375 | stackv2 | """
HE module: responsible for color processing for images of H&E-stained tissue samples.
"""
from __future__ import (absolute_import, division, print_function, unicode_literals)
__version__ = 0.02
__author__ = 'Vlad Popovici'
__all__ = ['rgb2he', 'rgb2he2']
import numpy as np
# from scipy.linalg import norm
# fro... | 104 | 36.58 | 91 | 15 | 1,529 | python | [] | 0 | true | |
2024-11-18T21:14:12.433603+00:00 | 1,542,449,584,000 | 030ac2489215a245565551f5f18c9c7cad60d39a | 3 | {
"blob_id": "030ac2489215a245565551f5f18c9c7cad60d39a",
"branch_name": "refs/heads/master",
"committer_date": 1542449584000,
"content_id": "837706993fe018590ad211fedbdbe3bc1a25758c",
"detected_licenses": [
"MIT"
],
"directory_id": "0a07ca9be06a96c9686f943c1e57d8fa79d30697",
"extension": "py",
"fi... | 2.703125 | stackv2 | import numpy as np
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import mean_squared_error
from sklearn import preprocessing
import csv
import sys
import itertools
studentCount = 33
questionCount = 19
sampleCount = 125
names = ['u%d' % i for i in range(studentCount)] + ['s0','s1','s2','s3',... | 186 | 25.85 | 167 | 28 | 1,435 | python | [] | 0 | true | |
2024-11-18T21:14:12.704457+00:00 | 1,561,905,151,000 | f3faef975142f2882aa895987a7aeb7aee66a81a | 3 | {
"blob_id": "f3faef975142f2882aa895987a7aeb7aee66a81a",
"branch_name": "refs/heads/master",
"committer_date": 1561905151000,
"content_id": "13b477fa4b8a3da96574941c7368e914ae7e56e4",
"detected_licenses": [
"MIT"
],
"directory_id": "8161c0e52e63b838f4833f461eb0c2a34beb0c16",
"extension": "py",
"fi... | 3.03125 | stackv2 | import math
import jieba.posseg as pseg
import codecs
from nltk.corpus import stopwords
from collections import Counter
stop_words = 'E:/demo/stop_words2.txt'
stopwords = codecs.open(stop_words,'r',encoding='gb18030').readlines()
stopwords = [ w.strip() for w in stopwords ]
#print(stopwords)
stop_flag = ['x', 'c', '... | 61 | 27.82 | 75 | 13 | 463 | python | [] | 0 | true | |
2024-11-18T21:14:12.868224+00:00 | 1,626,287,989,000 | c8c00c58573e7c8311de74e3916b19fa9604af32 | 3 | {
"blob_id": "c8c00c58573e7c8311de74e3916b19fa9604af32",
"branch_name": "refs/heads/main",
"committer_date": 1626287989000,
"content_id": "f7807141a45ae96fd22ecf52029cb3434f2f05fe",
"detected_licenses": [
"MIT"
],
"directory_id": "8c6f2b3fc0ff7bd2a4dc854654959df86c0a55ea",
"extension": "py",
"file... | 2.5625 | stackv2 | import base64
import io
import json
import logging
from typing import Any, Dict
import numpy as np
from PIL import Image
from src.app.backend.redis_client import redis_client
logger = logging.getLogger(__name__)
def make_image_key(key: str) -> str:
return f"{key}_image"
def left_push_queue(queue_name: str, ke... | 63 | 22.11 | 66 | 10 | 364 | python | [] | 0 | true | |
2024-11-18T21:14:13.113922+00:00 | 1,573,239,428,000 | b35ee7e27fd82892a1dd3599822cd12febdaf974 | 4 | {
"blob_id": "b35ee7e27fd82892a1dd3599822cd12febdaf974",
"branch_name": "refs/heads/master",
"committer_date": 1573239428000,
"content_id": "5566e69756a951407f5b289c64e5a43a173c99c0",
"detected_licenses": [
"MIT"
],
"directory_id": "1eeb013ab603d8c1a73032690f53eb7a2f116d24",
"extension": "py",
"fi... | 3.578125 | stackv2 | #!/usr/bin/env python
def ft_reduce(function_to_apply, list_of_inputs):
x1 = list_of_inputs[0]
list_of_inputs = list_of_inputs[1:]
for x2 in list_of_inputs:
x1 = function_to_apply(x1, x2)
return x1
if __name__ == '__main__':
from functools import reduce
print('real reduce:')
l = [1... | 18 | 24.83 | 49 | 11 | 149 | python | [] | 0 | true | |
2024-11-18T21:14:13.391465+00:00 | 1,591,205,474,000 | b2a10d82bdf415b285bcc6f31f79f82c233d6b65 | 4 | {
"blob_id": "b2a10d82bdf415b285bcc6f31f79f82c233d6b65",
"branch_name": "refs/heads/master",
"committer_date": 1591205474000,
"content_id": "94d3aa77c88dc44f82d8f1da94dfbd4d071d8eb5",
"detected_licenses": [
"MIT"
],
"directory_id": "6476a0481757c5ca9d5e7376dd747da3a5345e9c",
"extension": "py",
"fi... | 3.5 | stackv2 | import time
import psutil
import os
# Декоратор, замеряющий время выполнение декорируемой функции
def time_func(func):
def wapper(*args, **kwargs):
start_time = time.time()
result = func(*args, **kwargs)
end_time = time.time()
print(f'Время выполнения декорируемой функции: {end_time... | 44 | 22.84 | 84 | 12 | 291 | python | [] | 0 | true | |
2024-11-18T21:14:13.462108+00:00 | 1,620,914,656,000 | 4aa14df40045b50fdefacc0d8bee7a831d5c918a | 2 | {
"blob_id": "4aa14df40045b50fdefacc0d8bee7a831d5c918a",
"branch_name": "refs/heads/master",
"committer_date": 1620914656000,
"content_id": "6770222d1dbfdf3d8c6b9476298edd158ddebf43",
"detected_licenses": [
"MIT"
],
"directory_id": "a11e7e077f2f076aae4a3406f9737443cd2e64ba",
"extension": "py",
"fi... | 2.34375 | stackv2 | import yaml
import os
import sys
import argparse
from kubernetes import watch, client, config
from receivers.flowdock_receiver import FlowdockReceiver
from utils import ANNOTATION_ENABLED, ANNOTATION_TEAM, ANNOTATION_RECEIVER
#
# Define a specific yaml loader which substitutes environment
# vars.
#
class YamlEnvLoa... | 113 | 28.45 | 88 | 14 | 700 | python | [] | 0 | true | |
2024-11-18T21:14:13.559468+00:00 | 1,521,733,457,000 | 51209d751ac0320b3d37468be14beb65ed675986 | 2 | {
"blob_id": "51209d751ac0320b3d37468be14beb65ed675986",
"branch_name": "refs/heads/master",
"committer_date": 1521733457000,
"content_id": "8d6e5043efa9e5bf2728925dd8020fe69770bd14",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0b0ccedf376d5e9571b9150c1d707411fdbb753c",
"extension": "py"... | 2.390625 | stackv2 | """
Retrieves all the attendees with their groups, statuses, and user information
"""
from django import forms
from hackfsu_com.views.generic import ApiView
from hackfsu_com.util import acl
from hackfsu_com.util.forms import JsonField
from api.models import AttendeeStatus, Hackathon
from django.db.models import Q
... | 84 | 33.38 | 96 | 23 | 573 | python | [] | 0 | true | |
2024-11-18T21:14:14.039053+00:00 | 1,450,697,411,000 | 872c2312ce4f085ea4ebe4c948d3472d2862dc70 | 3 | {
"blob_id": "872c2312ce4f085ea4ebe4c948d3472d2862dc70",
"branch_name": "refs/heads/master",
"committer_date": 1450697411000,
"content_id": "3806f6501cf117bf2b5801abd01bbf0b170bf2a4",
"detected_licenses": [
"MIT"
],
"directory_id": "8f7edf8fc3074ba7ff331653ae1586fcd67ceb23",
"extension": "py",
"fi... | 2.640625 | stackv2 | import cv2
import sys
import cv2.xfeatures2d
import numpy as np
#contours documentation: http://docs.opencv.org/master/dd/d49/tutorial_py_contour_features.html#gsc.tab=0
SIFT_DETECTOR = cv2.xfeatures2d.SIFT_create()
#read the parameter image
image = cv2.imread(sys.argv[1])
#obtain a grayscale version
gray = cv2.cvtCo... | 60 | 29.52 | 105 | 9 | 540 | python | [] | 0 | true | |
2024-11-18T21:14:14.104399+00:00 | 1,609,958,705,000 | e1dc4458c40cb5baf723514ed1f81f5b94c302e9 | 3 | {
"blob_id": "e1dc4458c40cb5baf723514ed1f81f5b94c302e9",
"branch_name": "refs/heads/main",
"committer_date": 1609958705000,
"content_id": "d67dec095684f3c22bbd20dd56854f700f01c798",
"detected_licenses": [
"MIT"
],
"directory_id": "b1ea3dc42081b00fe9740c089982765480cfd204",
"extension": "py",
"file... | 2.6875 | stackv2 |
LOCATIONS = {
"Utqiaġvik": {
"geolocation": (70.9, -156),
"name": "Utqiaġvik and Point Barrow",
"papers": [""],
"data": {},
"description": """
<p>BW start of degradation in early 1950s mostly stable by early 2000s
(~90% IW studied stable) Kanesvs... | 50 | 36.92 | 102 | 10 | 638 | python | [] | 0 | true | |
2024-11-18T21:14:14.557023+00:00 | 1,641,946,920,000 | e89f8f6bba5ca2f1f195dac23f9062cda47d42a3 | 3 | {
"blob_id": "e89f8f6bba5ca2f1f195dac23f9062cda47d42a3",
"branch_name": "refs/heads/master",
"committer_date": 1641946920000,
"content_id": "dfe444913afb6c4fa09189ca8b61e5e054b44903",
"detected_licenses": [
"MIT"
],
"directory_id": "6702fcabfa1cb6083be119182e5c72a62cf3cb09",
"extension": "py",
"fi... | 3.28125 | stackv2 | #!/usr/bin/python
# Receives as an argument, an .mp4 file and converts it into .wav
# Implemented a way to split audio file into chunks of 30 seconds
import subprocess
import sys
import os
newFile = "source/new-audio.wav"
filePath = sys.argv[1]
def convertFileToWav(filePath):
command = "ffmpeg -i {} -ab 160k -ac... | 25 | 27.36 | 97 | 9 | 204 | python | [] | 0 | true | |
2024-11-18T21:14:14.612693+00:00 | 1,506,768,553,000 | 2b51c759b50dbf3245c8431dc22dafb99353d925 | 3 | {
"blob_id": "2b51c759b50dbf3245c8431dc22dafb99353d925",
"branch_name": "refs/heads/master",
"committer_date": 1506768553000,
"content_id": "413864982fd08c7b015c4dc6bb75ec8f5de46fec",
"detected_licenses": [
"MIT"
],
"directory_id": "d8fe787569b6bfbff06c7e70a8f0489779087b6f",
"extension": "py",
"fi... | 2.5625 | stackv2 | #system
import numpy
#resources
from python_statistics.calculate_correlation import calculate_correlation
class stage02_quantification_correlation_dependencies():
def convert_profileStr2DataList(self,profiles_I):
'''Convert a string list of profiles into a data object for plotting
INPUT:
pr... | 78 | 36.38 | 80 | 14 | 545 | python | [] | 0 | true | |
2024-11-18T21:14:14.721142+00:00 | 1,532,317,364,000 | 56e1a9edce0df41c239445517a121759b647f0db | 2 | {
"blob_id": "56e1a9edce0df41c239445517a121759b647f0db",
"branch_name": "refs/heads/master",
"committer_date": 1532317364000,
"content_id": "cf1523cb77d9d2ba6e5dcdce05d5579f6ab2e8cf",
"detected_licenses": [
"MIT"
],
"directory_id": "b5421c6958aaf5c7d5668bc2397276dcc0149da8",
"extension": "py",
"fi... | 2.375 | stackv2 | import chainer
import chainer.functions as F
import chainer.links as L
from chainer import training, datasets, iterators, optimizers
from chainer.training import extensions
import numpy as np
import os
import math
import sys
from PIL import Image
from PIL import ImageDraw
uses_device = 0 # GPU#0を使用
# GPU使用時とCPU使用時でデ... | 136 | 29.77 | 103 | 15 | 1,576 | python | [] | 0 | true | |
2024-11-18T21:14:14.902086+00:00 | 1,648,714,936,000 | 7e555051634bc075af088a5f58eb0c5aa8ffee29 | 3 | {
"blob_id": "7e555051634bc075af088a5f58eb0c5aa8ffee29",
"branch_name": "refs/heads/master",
"committer_date": 1648714936000,
"content_id": "96b6a57151fc05dff4cf63d8376d59a12e68738e",
"detected_licenses": [
"Unlicense"
],
"directory_id": "397de467115775da05ae98426bca4583711df0c6",
"extension": "py",... | 2.640625 | stackv2 | # urlimport.py
import sys
import importlib.abc
import imp
from urllib.request import urlopen
from urllib.error import HTTPError, URLError
from html.parser import HTMLParser
# Debugging
import logging
log = logging.getLogger(__name__)
# Get links from a given URL
def _get_links(url):
class LinkParser(HTMLParser):... | 227 | 32.71 | 77 | 18 | 1,748 | python | [] | 0 | true | |
2024-11-18T21:14:15.081073+00:00 | 1,621,365,508,000 | eb51ff1f6729d4cc98901dd84170e94301f23b22 | 3 | {
"blob_id": "eb51ff1f6729d4cc98901dd84170e94301f23b22",
"branch_name": "refs/heads/main",
"committer_date": 1621365508000,
"content_id": "b6189ad881b7b96c5ebfa8f33452e4121b5c6362",
"detected_licenses": [
"MIT"
],
"directory_id": "c08693a4520552c32cf6dc3ff5788ac57ad182fc",
"extension": "py",
"file... | 2.609375 | stackv2 | #https://flask-httpauth.readthedocs.io/en/latest/index.html
#https://www.youtube.com/watch?v=VW8qJxy4XcQ
from flask_httpauth import HTTPBasicAuth
from flask import Blueprint
from werkzeug.security import generate_password_hash, check_password_hash
from .models import User
import logging
#Logger Set up
logger = loggin... | 26 | 30.62 | 99 | 12 | 203 | python | [] | 0 | true | |
2024-11-18T21:14:15.139181+00:00 | 1,574,455,362,000 | 95b48e3e535b9284664df11f2c591156f11c673a | 3 | {
"blob_id": "95b48e3e535b9284664df11f2c591156f11c673a",
"branch_name": "refs/heads/master",
"committer_date": 1574455362000,
"content_id": "8c5df120931024eca2a0fed0398fd8afb17e7ac4",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "e4beb0f6f6d88c819036285041515cea5d11012f",
"extension": "p... | 2.65625 | stackv2 | #!/usr/bin/env python
import os
import sys
import argparse
import multiprocessing
from Bio.Nexus import Nexus
# this part defines the a function to run the fasta to nexus file conversion script
# first, get the gene name to use as output nexus file name
# then run the script to do the file conversion
def tonexus(elem... | 59 | 26.9 | 126 | 14 | 448 | python | [] | 0 | true | |
2024-11-18T21:14:15.412229+00:00 | 1,521,084,695,000 | 238d06443aa8b3becd50997c3ddcdd85ff68c79f | 3 | {
"blob_id": "238d06443aa8b3becd50997c3ddcdd85ff68c79f",
"branch_name": "refs/heads/master",
"committer_date": 1521084695000,
"content_id": "37f120136f0005b8cf4b50d575b3a2e551ee8208",
"detected_licenses": [
"MIT"
],
"directory_id": "d3e4af8ce555cd64613560cfd23bf839c9e70afd",
"extension": "py",
"fi... | 3.015625 | stackv2 | #!/usr/bin/env python
import requests
from random import randint
import os
import argparse
import json
from datetime import datetime
from urllib3.exceptions import MaxRetryError
# import pprint
def send_catfacts(catfacts_file, webhook_url, proxies={"http": "", "https": ""}):
""" Attempts to post to Slack webhook u... | 107 | 34.05 | 117 | 18 | 842 | python | [] | 0 | true | |
2024-11-18T21:14:15.470430+00:00 | 1,522,884,006,000 | 15e8cc1d456cc41ae26ed8b093687f31bc990300 | 3 | {
"blob_id": "15e8cc1d456cc41ae26ed8b093687f31bc990300",
"branch_name": "refs/heads/master",
"committer_date": 1522884006000,
"content_id": "c405af35ec043a59861181b90b3f1efaeff91e11",
"detected_licenses": [
"MIT"
],
"directory_id": "d726d8f3450e0cbce9c1b52ca6c632dbc3f2c04c",
"extension": "py",
"fi... | 2.640625 | stackv2 | '''
This module defines the base IPC server.
Subclass from this class to create a custom IPC server implementation.
@author: Thomas Wanderer
'''
try:
# Imports
import asyncio
import time
import textwrap
import functools
from typing import Union, Type, Optional, TypeVar, Iterable, Any
... | 398 | 40.02 | 179 | 24 | 2,914 | python | [] | 0 | true | |
2024-11-18T21:14:15.649864+00:00 | 1,498,850,362,000 | 175ebee2b3831bfd62147c27c3586aa66db69f0c | 4 | {
"blob_id": "175ebee2b3831bfd62147c27c3586aa66db69f0c",
"branch_name": "refs/heads/master",
"committer_date": 1498850362000,
"content_id": "3bab2ac89331398ec8d467929f4520dcff3573b3",
"detected_licenses": [
"MIT"
],
"directory_id": "b5c9503ad23bcc2f45c671ddc8e8eee7b06cd07d",
"extension": "py",
"fi... | 3.609375 | stackv2 | """Solution to Kata https://www.codewars.com/kata/https://www.codewars.com/kata/the-sum-of-the-first-and-the-last-prime-factor-make-chains-of-numbers/."""
def sflpf_data(val, end):
"""Return a sorted list of numbers whose first and last prime factor sum up to val."""
out = []
for n in range(4, end + 1):
... | 33 | 27.15 | 154 | 14 | 270 | python | [] | 0 | true | |
2024-11-18T21:14:15.814979+00:00 | 1,624,021,686,000 | 3a7b7f89b43a2b9978294a1e15cfbd8bdad270dd | 3 | {
"blob_id": "3a7b7f89b43a2b9978294a1e15cfbd8bdad270dd",
"branch_name": "refs/heads/main",
"committer_date": 1624021686000,
"content_id": "6fb39b8154c299c834c920c5c6ecedac507412ad",
"detected_licenses": [
"MIT"
],
"directory_id": "d525fd3f8c8aeceacbad569fa5cddbc006d8d88c",
"extension": "py",
"file... | 2.875 | stackv2 | from json_mockup.base_class import BaseClass
class Chat(BaseClass):
def __init__(self):
self.userid = None
self.messages = None
self.title = None
def set_title(self, title):
self.title = title
def set_user_id(self, id):
self.userid = id
def append_mes... | 23 | 23.35 | 44 | 11 | 115 | python | [] | 0 | true | |
2024-11-18T21:14:15.926210+00:00 | 1,538,573,812,000 | ca5a8f503d4c3eafe15e2e9f376b49ffe6e899e3 | 3 | {
"blob_id": "ca5a8f503d4c3eafe15e2e9f376b49ffe6e899e3",
"branch_name": "refs/heads/master",
"committer_date": 1538573812000,
"content_id": "59c573e7c61bea42bebfd4a2c9983764c3ad626b",
"detected_licenses": [
"MIT"
],
"directory_id": "6a1611c021533d9ddecf3676b6b5b248722d919b",
"extension": "py",
"fi... | 2.828125 | stackv2 | from django.db import models
# Create your models here.
class Location(models.Model):
'''
locations model
'''
location = models.CharField(max_length=30)
def __str__(self):
return self.location
def save_locations(self):
self.save()
def delete_locations(self):
... | 78 | 23.62 | 163 | 14 | 399 | python | [] | 0 | true | |
2024-11-18T21:14:16.689189+00:00 | 1,481,634,957,000 | a36569d84fd9fa42505a7e33520660f055a7f37d | 3 | {
"blob_id": "a36569d84fd9fa42505a7e33520660f055a7f37d",
"branch_name": "refs/heads/master",
"committer_date": 1481634957000,
"content_id": "a2c3815f3bad315097d156d3a5a56848a495b135",
"detected_licenses": [
"MIT"
],
"directory_id": "fd627eda7d01f14fe3c0a0f9340aa1fd736bb11d",
"extension": "py",
"fi... | 2.8125 | stackv2 | # -*- coding: utf-8 -*-
'''MX100Parse.py: Functions for parsing/exporting/plotting specified columns from MX100 log files
__author__ = "Jason M. Battle"
'''
import os
import re
import time
import glob
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
class MX1100():
def __init__(self):
... | 106 | 42.53 | 147 | 23 | 1,205 | python | [] | 0 | true | |
2024-11-18T21:14:16.866554+00:00 | 1,668,642,529,000 | 1a981f4e52706ea846fdd661b0ef1fdbd24023ad | 3 | {
"blob_id": "1a981f4e52706ea846fdd661b0ef1fdbd24023ad",
"branch_name": "refs/heads/master",
"committer_date": 1668642529000,
"content_id": "505cb422560c2c324854f1780c2e27495e544961",
"detected_licenses": [
"BSD-2-Clause-Views",
"BSD-2-Clause",
"Apache-2.0"
],
"directory_id": "35497e9f193dd471... | 2.78125 | stackv2 | import json
total_column_count = 16
total_row_count = 8
total_sections = 4
column_offset = 7.5
row_offset = 7.5
columns_per_section = 4
section_offset = columns_per_section*column_offset
width = (total_column_count-1)*column_offset
height = (total_row_count-1)*row_offset
start_x = -width/2
start_y = height/2
tag_id_... | 35 | 29.11 | 96 | 18 | 312 | python | [] | 0 | true | |
2024-11-18T21:14:17.139948+00:00 | 1,649,964,302,000 | a1c2a01b6812302c77cb73841bdb8c1331f52537 | 3 | {
"blob_id": "a1c2a01b6812302c77cb73841bdb8c1331f52537",
"branch_name": "refs/heads/master",
"committer_date": 1649964302000,
"content_id": "6f772b9e5a838c2c5fd802b872c62778cd5b80b0",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "6f54ce52f08806075f0445e7dd206baae96ebdca",
"extension": "p... | 2.96875 | stackv2 | import math, random, uuid, re
db.define_table('dna',
Field('name'),
Field('sequence','text'))
def random_gene(n):
return ''.join(['ATGC'[int(n+10*math.sin(n*k)) % 4] for k in range(10+n)])+'UAA'
def random_dna():
return ''.join([random_gene(random.randint(0,10)) for k in range(50)])
# if not data make s... | 31 | 31.32 | 87 | 21 | 338 | python | [] | 0 | true | |
2024-11-18T21:14:17.266327+00:00 | 1,401,489,475,000 | a278ab7878b0985f49dec01f912b1fa3da7bdc7c | 2 | {
"blob_id": "a278ab7878b0985f49dec01f912b1fa3da7bdc7c",
"branch_name": "refs/heads/master",
"committer_date": 1401489475000,
"content_id": "adbbb1699aad35d288a354801ad8f0e402d8427d",
"detected_licenses": [
"MIT"
],
"directory_id": "65107a2a7015b0543b420d2433089405f720c368",
"extension": "py",
"fi... | 2.359375 | stackv2 | """Synchronous Message Processor"""
import threading, queue
from ypage.nukleon.structs import TaskletControlBlock
from yos.tasklets import Tasklet
from ypage.nukleon import S
from ypage.nukleon.NewIDIssuer import NewIDIssuer
from ypage.apipatchers.ipcSynchronousMessage import SynchronousMessageHandler as SynchronousMes... | 94 | 38.84 | 110 | 17 | 813 | python | [] | 0 | true | |
2024-11-18T21:14:17.548275+00:00 | 1,601,492,542,000 | 769032ac8fbae7a737f137e6d830edf1f5f3ba86 | 3 | {
"blob_id": "769032ac8fbae7a737f137e6d830edf1f5f3ba86",
"branch_name": "refs/heads/master",
"committer_date": 1601492542000,
"content_id": "f644d49a7cc3f4d28f0e4b3d2d1e0b722d0af50a",
"detected_licenses": [
"MIT"
],
"directory_id": "fd7719d52c7c9378b22197704fe4dccb899aff50",
"extension": "py",
"fi... | 2.921875 | stackv2 | # Python 3.7.6
# -*- coding: utf-8 -*-
# Author: Ines Pisetta
import os
import random
import cv2
import fnmatch
import numpy as np
from tqdm import tqdm
char_list = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
len_char_list = len(char_list)
path = str(os.getcwd())
while True:
windows = input... | 112 | 25.31 | 76 | 16 | 764 | python | [] | 0 | true | |
2024-11-18T21:14:17.783937+00:00 | 1,540,731,101,000 | 834231e573c0e18945cc7645f7550bec564a9a20 | 2 | {
"blob_id": "834231e573c0e18945cc7645f7550bec564a9a20",
"branch_name": "refs/heads/master",
"committer_date": 1540731101000,
"content_id": "2c44b7451e0a89bcfdbfffc4851f3044f555133a",
"detected_licenses": [
"MIT"
],
"directory_id": "c651e2c5ec414cdc5d04ca1cce98e247352793d5",
"extension": "py",
"fi... | 2.328125 | stackv2 | #https://rstudio-pubs-static.s3.amazonaws.com/79360_850b2a69980c4488b1db95987a24867a.html
import gensim
import numpy as np
import os
from stop_words import get_stop_words
from nltk.stem.porter import PorterStemmer
from gensim import corpora, models
import tools
from tools import tokenize
path = os.getcwd() + '/' #... | 105 | 34.73 | 162 | 19 | 1,037 | python | [] | 0 | true | |
2024-11-18T21:14:17.887708+00:00 | 1,687,135,220,000 | eee007ea2351c9859117d4154b7718639ba15eaa | 3 | {
"blob_id": "eee007ea2351c9859117d4154b7718639ba15eaa",
"branch_name": "refs/heads/master",
"committer_date": 1687135220000,
"content_id": "34121f25f5e066ffa601066fbbc174f5ac56c099",
"detected_licenses": [
"MIT"
],
"directory_id": "90f9bdb537573ae3081e2a93e05cfc93b5f99612",
"extension": "py",
"fi... | 2.65625 | stackv2 | """
Geological features
"""
from ...modelling.features import BaseFeature
from ...utils import getLogger
from ...modelling.features import FeatureType
import numpy as np
logger = getLogger(__name__)
class LambdaGeologicalFeature(BaseFeature):
def __init__(
self,
function=None,
name="unnam... | 85 | 24.42 | 73 | 13 | 445 | python | [] | 0 | true | |
2024-11-18T21:14:18.162374+00:00 | 1,658,177,195,000 | 84098906d1084dbd6ecdfffbbd3065f88c31a92e | 3 | {
"blob_id": "84098906d1084dbd6ecdfffbbd3065f88c31a92e",
"branch_name": "refs/heads/master",
"committer_date": 1658177195000,
"content_id": "8f65541198ac1f5760d4412d92470e75953c1ab1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8f53f5c1888d4790e44bbb43df070dc38e3f5c60",
"extension": "py"... | 2.578125 | stackv2 | # Copyright 2021 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 law or ag... | 168 | 35.02 | 119 | 16 | 1,389 | python | [] | 0 | true | |
2024-11-18T21:14:18.212797+00:00 | 1,684,798,032,000 | 4d54da9674dfe3f59eeb2487efda00c65ede7d04 | 3 | {
"blob_id": "4d54da9674dfe3f59eeb2487efda00c65ede7d04",
"branch_name": "refs/heads/master",
"committer_date": 1684798032000,
"content_id": "2e5cc5cbdbcb44000f3e17e465510701e25a6b4f",
"detected_licenses": [
"MIT"
],
"directory_id": "fd58e4eef04a71916ce8a09662ed6bad20348e98",
"extension": "py",
"fi... | 2.953125 | stackv2 | from flask_restful.fields import Raw, MarshallingException
class Dict(Raw):
def __init__(self, cls_or_instance, **kwargs):
super(Dict, self).__init__(**kwargs)
error_msg = ("The type of the dict elements must be a subclass of "
"flask_restful.fields.Raw")
if isinstanc... | 24 | 33.5 | 75 | 14 | 168 | python | [] | 0 | true | |
2024-11-18T21:14:18.570191+00:00 | 1,598,989,437,000 | 2a5698fda57762301207ffbbfeb2ec7456a22e82 | 3 | {
"blob_id": "2a5698fda57762301207ffbbfeb2ec7456a22e82",
"branch_name": "refs/heads/master",
"committer_date": 1598989437000,
"content_id": "462ea8293ef7e0d4122d67ef47114e396e80327b",
"detected_licenses": [
"MIT"
],
"directory_id": "2d7170db2454cee312d595531404d0cf2b4e369c",
"extension": "py",
"fi... | 2.640625 | stackv2 | """pandarecipient.py implements Recipients as per https://developers.pandadoc.com/reference#new-document"""
__author__ = "Kostyantyn Ovechko"
__copyright__ = "Copyright 2020, Zxscript"
__license__ = "MIT"
__version__ = "0.0.1"
__email__ = "kos@zxscript.com"
__status__ = "Production"
class Pandarecipient:
def __i... | 41 | 23.73 | 107 | 11 | 269 | python | [] | 0 | true | |
2024-11-18T21:14:18.616458+00:00 | 1,585,798,255,000 | efc25827df1c4f9eed0fa1edf57180fa9c243fe7 | 3 | {
"blob_id": "efc25827df1c4f9eed0fa1edf57180fa9c243fe7",
"branch_name": "refs/heads/master",
"committer_date": 1585798255000,
"content_id": "9e9a506d9e720844f6f32f8275efa5113f392eb0",
"detected_licenses": [
"MIT"
],
"directory_id": "001348ee354cb40f8234b0bf4a8439d12f1078ce",
"extension": "py",
"fi... | 2.78125 | stackv2 | from PIL import Image, ImageSequence,ImageDraw,ImageFont
import os
import numpy as np
class Gif(object):
def __init__(self,filename,index=0):
self.img=Image.open(filename)
self.imgiter=ImageSequence.Iterator(self.img)
self.dir='font/'
self.check_dirs(self.dir)
self.imgs = [f... | 55 | 39.85 | 108 | 17 | 636 | python | [] | 0 | true | |
2024-11-18T21:14:18.725673+00:00 | 1,610,074,591,000 | 1a5f2cecebff5f3e2665d3c41e466c82be435a1a | 2 | {
"blob_id": "1a5f2cecebff5f3e2665d3c41e466c82be435a1a",
"branch_name": "refs/heads/main",
"committer_date": 1610074591000,
"content_id": "bac82b3d94ce47a6ae4fa274a9e42ba4acd9d3fd",
"detected_licenses": [
"MIT"
],
"directory_id": "efdf4f8d33aafb086aef350b94ce1393ae461eb5",
"extension": "py",
"file... | 2.328125 | stackv2 | import os
import pandas as pd
import matplotlib.pyplot as plt
from prep import normalize, prep_plot
comm_cols = ['productName', 'productVersion', 'timestamps',
'formatted_start_time', 'formatted_end_time', 'name', 'enSN']
comm_cols2 = ['productName', 'productVersion', 'timestamps',
'formatted... | 136 | 42.65 | 119 | 22 | 1,579 | python | [] | 0 | true | |
2024-11-18T21:14:18.907851+00:00 | 1,588,961,520,000 | 038b54bcbb459b3c33394b32db3e04783a0b20b9 | 3 | {
"blob_id": "038b54bcbb459b3c33394b32db3e04783a0b20b9",
"branch_name": "refs/heads/master",
"committer_date": 1588961520000,
"content_id": "4a1c7e529884f71c6ca1b1cc56b84a3d9d5d6b1a",
"detected_licenses": [
"MIT"
],
"directory_id": "f31b2dffda1c2ec39dd190e665663209442dd131",
"extension": "py",
"fi... | 2.9375 | stackv2 | #! /usr/bin/env python
import sys
import networkx as nx
import random
def start_cost_function(degree):
return degree
def random_edge_cost():
if random.random() < 0.8:
return 10
return 30
class Task(object):
def __init__(self, num_nodes, num_start, num_end, num_poi, discard_cost, start_cost,... | 142 | 35.37 | 131 | 19 | 1,319 | python | [] | 0 | true | |
2024-11-18T21:14:19.334795+00:00 | 1,605,932,344,000 | cea71d26d72850cf36d5d8c6ac19d973d56fb3a3 | 3 | {
"blob_id": "cea71d26d72850cf36d5d8c6ac19d973d56fb3a3",
"branch_name": "refs/heads/master",
"committer_date": 1606008201000,
"content_id": "94f923a2499cd1a9e9eb49dac6403a867291c72a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2a4228173c1206206f93bcfa18ad46dd4f9a68c0",
"extension": "py"... | 2.609375 | stackv2 | """
Plonk objects to disk!
"""
import array.array, base64, os, re
from shared.tools.meta import getDesignerContext
__copyright__ = """Copyright (C) 2020 Corso Systems"""
__license__ = 'Apache 2.0'
__maintainer__ = 'Andrew Geiger'
__email__ = 'andrew.geiger@corsosystems.com'
__all__ = ['serializeToXML', 'getResour... | 134 | 26.63 | 97 | 19 | 943 | python | [] | 0 | true | |
2024-11-18T21:14:19.453869+00:00 | 1,627,040,012,000 | 9204979f0d22742984915f9f08ba9975d87d9aad | 2 | {
"blob_id": "9204979f0d22742984915f9f08ba9975d87d9aad",
"branch_name": "refs/heads/main",
"committer_date": 1627040012000,
"content_id": "4992960125ced5e1218089141c6edf058df9b1d8",
"detected_licenses": [
"MIT"
],
"directory_id": "21e4d7057d6bce1a01d4e4d0e59e350b4a8e8e6d",
"extension": "py",
"file... | 2.328125 | stackv2 |
import numpy as np
import General
import scipy
import scipy.stats
import matplotlib.pyplot as plt
from subprocess import getoutput
importCommon()
assert getoutput("which shapemapper_mutation_counter") != ""
###############################
### Functions
###############################
def load_parsercounter(inFn):... | 301 | 34.88 | 134 | 16 | 3,595 | python | [] | 0 | true | |
2024-11-18T21:14:19.511066+00:00 | 1,621,752,887,000 | 9909492e69d6ee054c80908aadd5329b46bc7f58 | 3 | {
"blob_id": "9909492e69d6ee054c80908aadd5329b46bc7f58",
"branch_name": "refs/heads/main",
"committer_date": 1621752887000,
"content_id": "3da0106aede7344e3ae26930693623eb80bed686",
"detected_licenses": [
"MIT"
],
"directory_id": "3e94e00215240661006bd10844bcf3a30e32473b",
"extension": "py",
"file... | 2.71875 | stackv2 | """
-------------------------------------
# -*- coding: utf-8 -*-
# @Author :
nomalocaris
Giyn
HZT
# @File : diameter_error.py
# @Software: PyCharm
-------------------------------------
"""
import os
from math import log
import numpy as np
from utils import ProgressBar
def... | 136 | 34.6 | 114 | 23 | 1,372 | python | [] | 0 | true | |
2024-11-18T21:14:19.764906+00:00 | 1,627,507,364,000 | 00d5a10ad74c46b0c8fa4045972cf04961ca6eee | 2 | {
"blob_id": "00d5a10ad74c46b0c8fa4045972cf04961ca6eee",
"branch_name": "refs/heads/main",
"committer_date": 1627507364000,
"content_id": "0497a2cfb31869d5d3d4a08205c5575e5762b48c",
"detected_licenses": [
"MIT"
],
"directory_id": "8f6951c134ff0221186bd10fbb03a88e966fc6d9",
"extension": "py",
"file... | 2.453125 | stackv2 | from constants import MA_DAYS, MA_SMOOTHING, TARGET_POPULATION, TARGET_POPULATION_THRESHOLD, TOTAL_POPULATION, TOTAL_POPULATION_THRESHOLD
import csv
from datetime import datetime, timedelta
import json
import requests
from requests import RequestException
import data
from config.auth import vaccination_channel_id
fro... | 203 | 40.85 | 137 | 17 | 2,158 | python | [] | 0 | true | |
2024-11-18T21:14:19.938490+00:00 | 1,530,689,511,000 | 83b8b5c01f1c88d66af08a75c125b4c0901bbf3f | 3 | {
"blob_id": "83b8b5c01f1c88d66af08a75c125b4c0901bbf3f",
"branch_name": "refs/heads/master",
"committer_date": 1530689511000,
"content_id": "761d94d9197b614303c294044f5ac721d570721c",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "3d4206804a229f26a4dd49c6bc43908ced6d0e82",
"extension": "p... | 3.359375 | stackv2 | #
# a dictionary-like class that maintains the order of insertion
#
# based on a recipe by Igor Ghisi located at
#
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496761
#
from UserDict import DictMixin
class odict(DictMixin):
"""
>>> o = odict()
>>> o[2]=20 ; o[1]=10
>>> o.keys()
[2, 1]... | 64 | 20.72 | 64 | 12 | 436 | python | [] | 0 | true | |
2024-11-18T21:14:20.080999+00:00 | 1,530,635,439,000 | 0475f46243129e927a92bc27d8c3c7a0f7f839a6 | 2 | {
"blob_id": "0475f46243129e927a92bc27d8c3c7a0f7f839a6",
"branch_name": "refs/heads/master",
"committer_date": 1530635439000,
"content_id": "ff9e363794e95ef843745f33ded978187eec35dc",
"detected_licenses": [
"MIT"
],
"directory_id": "94daf9427b50c0a6229d90ae9ec231c96b19e972",
"extension": "py",
"fi... | 2.34375 | stackv2 | import codecs
import pdfkit
import os
import glob
import json
from pathlib import Path
from PyPDF2 import PdfFileMerger
from tqdm import tqdm
modulosIncluidos = open('modulos.json', 'r')
modulosIncluidos = json.load(modulosIncluidos)
pre_html = '<html><head><meta charset="utf-8">'
pre_html += '<script>\n'
pre_html +... | 61 | 32.66 | 103 | 15 | 587 | python | [] | 0 | true | |
2024-11-18T21:14:20.191587+00:00 | 1,526,317,818,000 | 3075a2deb6e2752e3b43d6dd07daffcc419e42b8 | 2 | {
"blob_id": "3075a2deb6e2752e3b43d6dd07daffcc419e42b8",
"branch_name": "refs/heads/master",
"committer_date": 1526317818000,
"content_id": "cfa0c79f8395b88fc7b516d287d46b0ccff8de40",
"detected_licenses": [
"MIT"
],
"directory_id": "e43c424fc5f5aa2a9a0b999ccad6c09e1fcbf124",
"extension": "py",
"fi... | 2.46875 | stackv2 | _author_ = "Marquise Cassar"
#!/usr/bin/env python
from sys import path
from die import *
import sys
import crapsResources_rc
from time import sleep
from logging import basicConfig, getLogger, DEBUG, INFO, CRITICAL
from pickle import dump, load
from os import path
from PyQt5.QtCore import pyqtSlot, QSettings, Qt, QTim... | 92 | 28.13 | 85 | 17 | 766 | python | [] | 0 | true | |
2024-11-18T21:14:20.421749+00:00 | 1,630,991,055,000 | fb53b11478397aeb1ebe987b50d81bbdf4b2054d | 3 | {
"blob_id": "fb53b11478397aeb1ebe987b50d81bbdf4b2054d",
"branch_name": "refs/heads/master",
"committer_date": 1630991055000,
"content_id": "789db93683a16c3de25c136c3c5c1f17ca9b19a5",
"detected_licenses": [
"MIT"
],
"directory_id": "239ae85839ae35d300690a3b28d5f35a84206a0e",
"extension": "py",
"fi... | 2.796875 | stackv2 | """Simple asynchronous RS232 communication mechanism for request/reply style commands"""
import logging
import time
import asyncio
import functools
from ratelimit import limits
from serial_asyncio import create_serial_connection
from .const import ASCII, CONF_EOL, CONF_THROTTLE_RATE, CONF_TIMEOUT, DEFAULT_TIMEOUT, F... | 139 | 41.42 | 108 | 20 | 1,210 | python | [] | 0 | true | |
2024-11-18T21:14:20.477420+00:00 | 1,618,590,410,000 | 577358bf4a95af27a30f2d5f0fd501d34fd87ebe | 3 | {
"blob_id": "577358bf4a95af27a30f2d5f0fd501d34fd87ebe",
"branch_name": "refs/heads/master",
"committer_date": 1618590410000,
"content_id": "0eb898137629033fc89aa4b54eb9093c873267f7",
"detected_licenses": [
"MIT"
],
"directory_id": "3580ad3815923c201852b459c0c790b35ea3fb0b",
"extension": "py",
"fi... | 2.546875 | stackv2 | from sqlalchemy import Column, DateTime, ForeignKey, Integer, String
from sqlalchemy.orm import relationship
from app.db.base_class import Base
from .association import game_console_table
class Game(Base):
"""Game model: Show basic info of games stored in database."""
name = Column(String(250), nullable=Fa... | 27 | 31.89 | 85 | 12 | 191 | python | [] | 0 | true | |
2024-11-18T21:14:20.602636+00:00 | 1,693,927,757,000 | 5a855f2f3da01973045d0bc36c4c6ea285bbbe5c | 2 | {
"blob_id": "5a855f2f3da01973045d0bc36c4c6ea285bbbe5c",
"branch_name": "refs/heads/master",
"committer_date": 1693927757000,
"content_id": "4afe27d1702bddb3404587db83d2f28a320d1dd4",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "94ca6ad1a5dd260f8a3022ddc833258c0200707f",
"extension": "p... | 2.34375 | stackv2 | from __future__ import print_function
import os
import json
import argparse
from glob import glob
from ssg.entities import profile
from ssg import build_yaml
RULE_CONTENT_FILES = (
("ansible", "fixes/ansible/{id}.yml"),
("bash", "fixes/bash/{id}.sh"),
("oval", "checks/oval/{id}.xml"),
("oval", "chec... | 98 | 28.79 | 97 | 14 | 671 | python | [] | 0 | true | |
2024-11-18T21:14:20.760733+00:00 | 1,613,877,181,000 | 429fb9d12fe7f0ac017b141623c092d16d2b9b8f | 3 | {
"blob_id": "429fb9d12fe7f0ac017b141623c092d16d2b9b8f",
"branch_name": "refs/heads/master",
"committer_date": 1613877181000,
"content_id": "ee8dc2d8557bf2d7d0e1cf2288dd7d0b2826ce3f",
"detected_licenses": [
"MIT"
],
"directory_id": "75435695feb00d407338f42aecab36baf63be93e",
"extension": "py",
"fi... | 2.5625 | stackv2 | import cased
import requests
from cased.util import log_debug
class HTTPClient:
@classmethod
def make_request(cls, method, url, api_key, data=None):
user_agent = "cased-python/{}".format(cased.VERSION)
if cased.extra_ua_data:
user_agent = user_agent + " ({})".format(cased.extra_... | 45 | 29.07 | 73 | 15 | 288 | python | [] | 0 | true | |
2024-11-18T21:14:20.812580+00:00 | 1,511,567,959,000 | a9361aa89af74162462c47edaaaebc0b729d5406 | 4 | {
"blob_id": "a9361aa89af74162462c47edaaaebc0b729d5406",
"branch_name": "refs/heads/master",
"committer_date": 1511567959000,
"content_id": "2d41a8b1b9480c07d4c6571cd58b01c9b63380b9",
"detected_licenses": [
"MIT"
],
"directory_id": "6bf336bc8d6ba061e0c707bdd8595368dee4d27b",
"extension": "py",
"fi... | 3.53125 | stackv2 | def get_ginort_char_key(char):
char_ordinal = ord(char)
if char.islower():
return 100 + char_ordinal
elif char.isupper():
return 500 + char_ordinal
elif char.isdigit():
char_digit = int(char)
if char_digit % 2 == 1:
return 700 + char_ordinal
else:
... | 21 | 20.19 | 37 | 12 | 123 | python | [] | 0 | true | |
2024-11-18T21:14:21.170210+00:00 | 1,631,565,482,000 | c82707649d48703960cfcd4148b910a9d701f32a | 3 | {
"blob_id": "c82707649d48703960cfcd4148b910a9d701f32a",
"branch_name": "refs/heads/main",
"committer_date": 1631565482000,
"content_id": "5b220d8a38bfb584360cf2bd87b0b4a29c7e0db6",
"detected_licenses": [
"MIT"
],
"directory_id": "1aa23cde9ad2401fbee52468cbf482bf3c9cffdf",
"extension": "py",
"file... | 2.5625 | stackv2 | import random
import re
from typing import Any, Mapping
import discord
from discord.ext import commands
from discord.ext.commands import Cog
from bot import BeattieBot
from context import BContext
from utils.exceptions import ResponseError
class XKCD(Cog):
def __init__(self) -> None:
with open("data/why... | 100 | 32.34 | 83 | 19 | 802 | python | [] | 0 | true | |
2024-11-18T21:14:21.379602+00:00 | 1,635,333,651,000 | 40bcf8fbce754232acc59de0a67cb3e70e46192c | 4 | {
"blob_id": "40bcf8fbce754232acc59de0a67cb3e70e46192c",
"branch_name": "refs/heads/master",
"committer_date": 1635333651000,
"content_id": "cab82a5bf06cfb10f1ae504a53af2ba4a839a0c4",
"detected_licenses": [
"MIT"
],
"directory_id": "fcb7edc7e1a01d03380d53d67bf1f7ca840427e8",
"extension": "py",
"fi... | 3.6875 | stackv2 | """
Regression Using Decision Tree, Random Tree, Bootstrap Aggregating,
and Boosting.
Copyright (c) 2020 Gabriele Gilardi
"""
import numpy as np
class BagLearner():
def __init__(self, learner, kwargs={}, bags=10, bag_factor=1, boost=False):
"""
learner Learner type
kwargs ... | 78 | 36.24 | 79 | 18 | 611 | python | [] | 0 | true | |
2024-11-18T21:14:21.605762+00:00 | 1,605,125,753,000 | d0f14a65f3c35c5fc0068e75ea05ebd2f3772d74 | 3 | {
"blob_id": "d0f14a65f3c35c5fc0068e75ea05ebd2f3772d74",
"branch_name": "refs/heads/master",
"committer_date": 1605125753000,
"content_id": "a13c017713494d004fbc46799f5ddff97ff6663d",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "39268f07fa72bda11497b77f7888d686993e8d28",
"extension": "p... | 2.890625 | stackv2 | import inspect
import warnings
from collections import namedtuple
from functools import wraps
from traceback import format_stack
import numpy as np
INTEGER_TYPES = (int, np.integer)
__all__ = ('assign_only_single_slice', 'astro_data_descriptor',
'AstroDataDeprecationWarning', 'astro_data_tag', 'deprecated... | 218 | 30.53 | 95 | 21 | 1,501 | python | [] | 0 | true | |
2024-11-18T21:14:21.904664+00:00 | 1,467,874,422,000 | e1060cc078d26af2cdd0080838b6233053da3524 | 3 | {
"blob_id": "e1060cc078d26af2cdd0080838b6233053da3524",
"branch_name": "refs/heads/master",
"committer_date": 1467874422000,
"content_id": "4da0d98809c789ed798552595cba5a08680cc952",
"detected_licenses": [
"MIT"
],
"directory_id": "bc84e78fc5b32fb5c845a13620a4cd2f8c75b525",
"extension": "py",
"fi... | 2.875 | stackv2 | ''' Open the URL which is found in the selected line '''
# example: https://forum.omz-software.com, http://www.google.de
import editor
import ui
class MyWebView(ui.View):
def __init__(self, url):
self.width, self.height = ui.get_window_size()
self.wv = ui.WebView(frame=self.bounds)
self.wv.load_url(url)
se... | 45 | 23.73 | 79 | 14 | 324 | python | [] | 0 | true | |
2024-11-18T21:14:22.176282+00:00 | 1,652,149,494,000 | 8eb62e51d939b28855b927b31b0d12ba41e196e2 | 3 | {
"blob_id": "8eb62e51d939b28855b927b31b0d12ba41e196e2",
"branch_name": "refs/heads/master",
"committer_date": 1652149494000,
"content_id": "c0b7b5bc10b767e13fbedbe1948eec24b1f2f425",
"detected_licenses": [
"MIT"
],
"directory_id": "4984a934467631ffe35dd277594184671284d5f6",
"extension": "py",
"fi... | 3.03125 | stackv2 | import sys, os
import utils
from dialogs import DialogInput
# ------------------------------------------------------------
# class UserScore
# ------------------------------------------------------------
class UserScore:
def __init__(self, mydict):
# print("mydict: {}".format(mydict))
... | 347 | 39.46 | 115 | 20 | 2,927 | python | [] | 0 | true | |
2024-11-18T21:14:22.295611+00:00 | 1,610,895,115,000 | f886af169cc595a211cac1af88b20f2234e120e7 | 3 | {
"blob_id": "f886af169cc595a211cac1af88b20f2234e120e7",
"branch_name": "refs/heads/main",
"committer_date": 1610895115000,
"content_id": "0e64f65afb99b55f36cebb4d37d3bdc020157d02",
"detected_licenses": [
"MIT"
],
"directory_id": "25db58001a0a4336513495578ede46edd16a41de",
"extension": "py",
"file... | 2.546875 | stackv2 | import sys
import json
# TODO Validate Plot Certificate.jpg exists if not ask to run
# TODO Validate both the arguments
certificateId = sys.argv[1]
totalTextFields = sys.argv[2]
totalTextFields = int(totalTextFields)
# Create Dictionary for JSON config file
data = {}
data['properties'] = []
for i in range(0, total... | 35 | 30.31 | 112 | 10 | 308 | python | [] | 0 | true | |
2024-11-18T21:14:23.081854+00:00 | 1,344,497,491,000 | e6628c9e4f3d3a098901c36f3a55c4bd93a6a5d7 | 3 | {
"blob_id": "e6628c9e4f3d3a098901c36f3a55c4bd93a6a5d7",
"branch_name": "refs/heads/master",
"committer_date": 1344497491000,
"content_id": "7c24ff19c1417e8e7dd1456cefab8832db6be047",
"detected_licenses": [
"MIT"
],
"directory_id": "2d898e86e7acf4d6b53f0a4d00476a428942a0b8",
"extension": "py",
"fi... | 2.640625 | stackv2 | """
An example script that is used to update entries. This adds
a project code 'new_project' to any entries for a given 'customer'
that doesn't have a project set.
"""
from md import MinuteDock
import datetime
def update(md):
entries = md.entries_search(date_range = (datetime.date(2012, 7, 1), datetime.date(2012, ... | 25 | 27.52 | 101 | 12 | 162 | python | [] | 0 | true | |
2024-11-18T21:14:23.265000+00:00 | 1,607,565,160,000 | e452506c036f0bb3fbbaeef3c72d0f44a618e3ae | 3 | {
"blob_id": "e452506c036f0bb3fbbaeef3c72d0f44a618e3ae",
"branch_name": "refs/heads/main",
"committer_date": 1607565160000,
"content_id": "969d1acc5dfaa0ce8d8129339ddced3cea2f5c22",
"detected_licenses": [
"MIT"
],
"directory_id": "2710c363fd5bf36965172d6c88d668a7950bf54b",
"extension": "py",
"file... | 2.828125 | stackv2 | from sklearn.neighbors import KernelDensity
from cmx import doc
import numpy as np
bandwidth = 0.1
doc @ f"""
The parameter `bandwidth={bandwidth}` is a smoothing parameter.
"""
with doc:
X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1, ], [2, 1], [3, 2]])
kde = KernelDensity(kernel="gaussian", bandwidth=... | 17 | 22.65 | 74 | 11 | 127 | python | [] | 0 | true | |
2024-11-18T21:14:23.697003+00:00 | 1,598,576,324,000 | 821add8a9d087c0232404cdee7c6b6b93e981aaf | 2 | {
"blob_id": "821add8a9d087c0232404cdee7c6b6b93e981aaf",
"branch_name": "refs/heads/master",
"committer_date": 1598576324000,
"content_id": "16416f61b6c1b20b23cfa3328e790e7d6c5ed8b9",
"detected_licenses": [
"MIT"
],
"directory_id": "48b288627d6f99e8c4b160982de456b5799ff1c3",
"extension": "py",
"fi... | 2.390625 | stackv2 | from main import db
from typing import Tuple
from ormtypes.json_pickle import JsonPickle
class Submission(db.Model):
__tablename__ = "submissions"
# 提交ID
id = db.Column(db.Integer, primary_key=True)
# 用户ID
uid = db.Column(db.Integer, index=True)
# 语言ID
language = db.Column(db.String(20))
... | 71 | 32.13 | 163 | 17 | 659 | python | [] | 0 | true | |
2024-11-18T21:14:23.748085+00:00 | 1,611,165,623,000 | f8d53ec5e246f41ec96e95a1e898049e631facca | 3 | {
"blob_id": "f8d53ec5e246f41ec96e95a1e898049e631facca",
"branch_name": "refs/heads/main",
"committer_date": 1611165623000,
"content_id": "e80c3f54bd34367436aa9eec18440ce254a8242d",
"detected_licenses": [
"MIT"
],
"directory_id": "0ed931df1c79e714db53fe6181752c6dc184379f",
"extension": "py",
"file... | 2.921875 | stackv2 | '''
Adopted from minerva-schools/EnsembleRL
'''
#Policy Gradient with REINFORCE Agent
import gym
from datetime import datetime
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import tensorflow as tf
from tensorflow.python.keras.layers import Dense, Dropout
from tensorflow.python.keras import Se... | 266 | 28.15 | 78 | 18 | 1,777 | python | [] | 0 | true | |
2024-11-18T21:14:23.814087+00:00 | 1,689,505,436,000 | 427cd75bde2588f47dcd367a21a13231b3b88ef6 | 3 | {
"blob_id": "427cd75bde2588f47dcd367a21a13231b3b88ef6",
"branch_name": "refs/heads/master",
"committer_date": 1689505436000,
"content_id": "ab116bed8cef02bce864898035ca972cb6b67df6",
"detected_licenses": [
"MIT",
"Apache-2.0",
"BSD-2-Clause"
],
"directory_id": "6115600f62091b769a124dba8730573... | 3.0625 | stackv2 | """Tooling functions for 3D geometry processing with their backward derivatives implementations."""
from typing import Callable, Tuple
import numpy as np
def qrot(q: np.ndarray, v: np.ndarray) -> np.ndarray:
assert q.ndim in [1, 2]
assert q.shape[-1] == 4
assert v.ndim == 2
assert v.shape[-1] == 3
... | 99 | 28.17 | 99 | 14 | 956 | python | [] | 0 | true | |
2024-11-18T21:14:24.326332+00:00 | 1,485,568,850,000 | 13cd6d6553fd0c5f75c4106e58a7b4e11fd9c506 | 2 | {
"blob_id": "13cd6d6553fd0c5f75c4106e58a7b4e11fd9c506",
"branch_name": "refs/heads/master",
"committer_date": 1485568850000,
"content_id": "62f8722b8367112c9a122a3635a6edc914e25d1c",
"detected_licenses": [
"MIT"
],
"directory_id": "9743d5fd24822f79c156ad112229e25adb9ed6f6",
"extension": "py",
"fi... | 2.359375 | stackv2 |
#calss header
class _SUBHEADING():
def __init__(self,):
self.name = "SUBHEADING"
self.definitions = [u'a word, phrase, or sentence that is used to introduce part of a text: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'nouns'
def run(self, obj1 = [... | 19 | 17.84 | 96 | 10 | 105 | python | [] | 0 | true | |
2024-11-18T21:14:24.694260+00:00 | 1,573,437,680,000 | 0cbc35f6a25015474e233fb42418e61b8b99d1ab | 2 | {
"blob_id": "0cbc35f6a25015474e233fb42418e61b8b99d1ab",
"branch_name": "refs/heads/master",
"committer_date": 1573437680000,
"content_id": "8dcb26de3f2d2b51ea7ad49b50aca21113457067",
"detected_licenses": [
"MIT"
],
"directory_id": "f2068be1d37cc53be37b63b83c11d420da708353",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/env python3
#############################################
## ##
## Chris Burton (c) 2019-11-11 ##
## Chris@8086.net ##
## ##
#############################################
## ... | 190 | 28.07 | 111 | 23 | 1,692 | python | [] | 0 | true | |
2024-11-18T21:14:24.952502+00:00 | 1,616,086,577,000 | 1dd7141f402b38a32265cd6bd38af8a41fa2d0c3 | 2 | {
"blob_id": "1dd7141f402b38a32265cd6bd38af8a41fa2d0c3",
"branch_name": "refs/heads/main",
"committer_date": 1616086577000,
"content_id": "37623356fc63d1c39b89da0a8f350d100b0ddaa3",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "5525c24f4dd6b466977c05e7442674c89c8003b9",
"extension": "py"... | 2.359375 | stackv2 | import itertools
import random
from typing import Set, List, Any, Dict
import pandas as pd
from autopandas_v2.generators.base import BaseGenerator
from autopandas_v2.generators.dsl.values import Fetcher
from autopandas_v2.generators.ml.traindata.exploration.iospecs import ExplorationSpec
from autopandas_v2.generators.... | 116 | 43.97 | 120 | 19 | 1,093 | python | [] | 0 | true | |
2024-11-18T21:14:25.069366+00:00 | 1,556,178,855,000 | 3705d69c6b625132ae291f56008044b7c9e2dea5 | 3 | {
"blob_id": "3705d69c6b625132ae291f56008044b7c9e2dea5",
"branch_name": "refs/heads/master",
"committer_date": 1556178855000,
"content_id": "16122a0a032ffb81dbf0bad3fa7262d3425ae7c7",
"detected_licenses": [
"MIT"
],
"directory_id": "9b3261b6b6c995f588f200a93efdb7272bd0698c",
"extension": "py",
"fi... | 2.71875 | stackv2 | import yaml
import logging
import os
def loadYaml(filename):
with open(filename, 'r') as yaml_file:
return yaml.load(yaml_file)
def dumpYaml(filename, obj):
with open(filename, 'w') as yaml_file:
yaml.dump(obj, yaml_file, default_flow_style=False)
def write(filename, content):
with open(f... | 56 | 26.3 | 59 | 13 | 408 | python | [] | 0 | true | |
2024-11-18T21:14:25.304653+00:00 | 1,488,584,833,000 | 14664f19dde901822574ea3f3250a0814857eb08 | 3 | {
"blob_id": "14664f19dde901822574ea3f3250a0814857eb08",
"branch_name": "refs/heads/master",
"committer_date": 1488584833000,
"content_id": "cae30f31bd4d60459b2386cd7569ee565f1d5163",
"detected_licenses": [
"ISC",
"CC0-1.0",
"MIT"
],
"directory_id": "bd2d0bad1282970002508bef893f064c59f15020",
... | 2.8125 | stackv2 | #!python3
#encoding:utf-8
import xmltodict
from collections import OrderedDict
from requests_oauthlib import OAuth1Session
from bs4 import BeautifulSoup
import datetime
import xml.sax.saxutils
import html
class Scraping(object):
def __init__(self):
pass
def scrape(self):
soup = BeautifulSoup(s... | 46 | 29.02 | 124 | 17 | 331 | python | [] | 0 | true | |
2024-11-18T21:14:25.357934+00:00 | 1,490,935,342,000 | dbb0b4fb312637d43a2fee099d9fd10157624a52 | 3 | {
"blob_id": "dbb0b4fb312637d43a2fee099d9fd10157624a52",
"branch_name": "refs/heads/master",
"committer_date": 1490935342000,
"content_id": "83e54a989611d08986ebf21a63bcb508acd8f54c",
"detected_licenses": [
"MIT"
],
"directory_id": "ffbf7ad6a86347a4bc2d3d1c54517c7917483bd6",
"extension": "py",
"fi... | 3.109375 | stackv2 | import pygame
import os
# ширина и высота игрового экрана
WIDTH = 640
HEIGHT = 480
# частота кадров
FPS = 60
# путь к изображениям
game_folder = os.path.dirname(__file__)
img_folder = os.path.join(game_folder, "images");
# класс для корабля игрока
class PlayerShip(pygame.sprite.Sprite):
def __init__(self):
... | 99 | 25.86 | 93 | 15 | 734 | python | [] | 0 | true | |
2024-11-18T21:14:25.464901+00:00 | 1,675,705,137,000 | a197ecc3d1305643c122bae75c371e4917a2271e | 3 | {
"blob_id": "a197ecc3d1305643c122bae75c371e4917a2271e",
"branch_name": "refs/heads/master",
"committer_date": 1675705137000,
"content_id": "6dc8c7423011a55d8913a412e4dd57e48e88cff7",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "0cf1ce708089968dcf83f667925dec2d2587bbb2",
"extension": "p... | 2.65625 | stackv2 | import os
import ntpath
#-------------------------------------------------------------------------------
def extract_rst_blobs(s_in):
s_out = []
is_rst_line = False
for line in s_in.split('\n'):
if is_rst_line:
if len(line) > 0:
if line[0] != '#':
is... | 84 | 24.12 | 130 | 16 | 501 | python | [] | 0 | true | |
2024-11-18T21:14:25.620762+00:00 | 1,634,748,730,000 | c21c1cb373d9fa8bc951490287c4ca9d01e5b30f | 4 | {
"blob_id": "c21c1cb373d9fa8bc951490287c4ca9d01e5b30f",
"branch_name": "refs/heads/main",
"committer_date": 1634748730000,
"content_id": "aacdf322ded9081b0b95530b4228c23cb663309e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5156a7de0ee4bfe44a84d9aadd17cf6591d25724",
"extension": "py",
... | 3.84375 | stackv2 | import numpy as np
# Sort an array
arr = np.array([1, 6, 2, 9, 4, 5])
print(f'unsorted array: {arr}')
arr.sort()
print(f'sorted array: {arr}')
# find unique values
arr = np.array([1, 6, 1, 2, 6, 6, 2])
print(f'original array: {arr}')
arr2 = np.unique(arr)
print(f'Unique values: {arr2}')
# Look for membership
arr3 = ... | 23 | 21.83 | 49 | 9 | 184 | python | [] | 0 | true | |
2024-11-18T21:14:25.691069+00:00 | 1,489,480,362,000 | c275dcff8e4f292287dfe0b6a7bd20e2bba214f5 | 3 | {
"blob_id": "c275dcff8e4f292287dfe0b6a7bd20e2bba214f5",
"branch_name": "refs/heads/master",
"committer_date": 1489480362000,
"content_id": "2ec2f6a643ded26edc793a13307baf9b841c166e",
"detected_licenses": [
"MIT"
],
"directory_id": "f63f206db60834641635f6b82dd2d3fdbab4f088",
"extension": "py",
"fi... | 2.96875 | stackv2 | # -*- coding: utf-8 -*-
"""
@author: zhangwenping
Created on 2017-03-10 17:12
"""
import sublime
import sublime_plugin
import string
import datetime
import os.path
class DocstringCommand(sublime_plugin.TextCommand):
def run(self, edit):
lang = parse_lang(self.view.file_name())
if lang is None:
... | 302 | 29.96 | 78 | 23 | 1,984 | python | [] | 0 | true | |
2024-11-18T21:14:26.322288+00:00 | 1,692,983,554,000 | 1f66f4bb8df5fc1fe81d89585a20a8886435f3bd | 3 | {
"blob_id": "1f66f4bb8df5fc1fe81d89585a20a8886435f3bd",
"branch_name": "refs/heads/master",
"committer_date": 1692983554000,
"content_id": "62450eae6a1d525711c3a14e3d567b3b8b763615",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "23895eba556353a116d97a3e9fa60f7ed9c9f693",
"extension": "py"... | 2.53125 | stackv2 | #MenuTitle: Build exclamdown and questiondown
# -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
__doc__ = """
Builds inverted Spanish punctuation ¡¿ for mixed and upper case.
"""
invertedGlyphNames = (
"exclamdown",
"questiondown",
"exclamdown.case",
"questiondown.case",
"e... | 87 | 29.8 | 73 | 17 | 728 | python | [] | 0 | true | |
2024-11-18T21:14:26.440529+00:00 | 1,592,579,906,000 | 648db509d96e1ae84875d3579b25d336c4e5bb27 | 3 | {
"blob_id": "648db509d96e1ae84875d3579b25d336c4e5bb27",
"branch_name": "refs/heads/master",
"committer_date": 1592579906000,
"content_id": "78f739a7e9a90bbbe943a084f5ece09601ccbd17",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "73d1869db7a69294fb8eb59627dc97eb6f838acf",
"extension": "p... | 2.53125 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
A chat bot based on asyncio and hangups
"""
import sys
import logging
from datetime import datetime, timedelta
import asyncio
import hangups
from hangups.auth import get_auth_stdin
__author__ = 'Florian Wilhelm'
__copyright__ = 'Blue Yonder'
__license__ = 'new ... | 140 | 31.61 | 74 | 17 | 1,042 | python | [] | 0 | true | |
2024-11-18T21:14:26.502798+00:00 | 1,692,026,528,000 | 8be5910e7aff5a1437a53a2cd27278633b67c587 | 2 | {
"blob_id": "8be5910e7aff5a1437a53a2cd27278633b67c587",
"branch_name": "refs/heads/master",
"committer_date": 1692026528000,
"content_id": "3db6a9d009c3720761bd1f4f9f3a8ddd015f0b9b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a960e38868b3a157179bb576ac78b0f144140ed8",
"extension": "py"... | 2.328125 | stackv2 | ###############################################################################
# Copyright (C) 2023 Habana Labs, Ltd. an Intel Company
###############################################################################
import random
import torch
import numpy as np
import scipy.ndimage
from torch.utils.data import Datase... | 235 | 37.46 | 107 | 16 | 2,187 | python | [] | 0 | true | |
2024-11-18T21:14:26.621230+00:00 | 1,534,622,960,000 | 8090bef4d2721d3b0ecddbc3b3cc946e1d24ab5b | 3 | {
"blob_id": "8090bef4d2721d3b0ecddbc3b3cc946e1d24ab5b",
"branch_name": "refs/heads/master",
"committer_date": 1534622960000,
"content_id": "08ec59408f8f369d6d880f3abfad5799c2dbc62d",
"detected_licenses": [
"MIT"
],
"directory_id": "1e166fe554efce8f09e916a57ff0690a93ace2e9",
"extension": "py",
"fi... | 3.171875 | stackv2 | import numpy as np
import hexy as hx
from hextiler.draw import make_hex_surface
class SelectionTile(hx.HexTile):
def __init__(self, axial_coordinates, border_color, radius):
self.axial_coordinates = np.array([axial_coordinates])
self.cube_coordinates = hx.axial_to_cube(self.axial_coordinates)
... | 37 | 38.38 | 100 | 14 | 331 | python | [] | 0 | true | |
2024-11-18T21:14:27.369462+00:00 | 1,568,046,189,000 | 1717622c6b83d72e922464542df329f65b130fba | 4 | {
"blob_id": "1717622c6b83d72e922464542df329f65b130fba",
"branch_name": "refs/heads/master",
"committer_date": 1568046189000,
"content_id": "3c7fefb2394dc8370df1a8c7a8739191b578e396",
"detected_licenses": [
"Unlicense"
],
"directory_id": "76027f6d013e12ca4fda95957e0cedbef1779def",
"extension": "py",... | 3.734375 | stackv2 | # CTCI 8.8
# Permutations With Dups
#-------------------------------------------------------------------------------
# My Solution
#-------------------------------------------------------------------------------
# Only generates new permutations using freq list
#-------------------------------------------------------... | 85 | 29.09 | 93 | 13 | 481 | python | [] | 0 | true | |
2024-11-18T21:14:27.631963+00:00 | 1,597,118,772,000 | f935dc35ac997ebbd25bb69068f809f05f38a888 | 2 | {
"blob_id": "f935dc35ac997ebbd25bb69068f809f05f38a888",
"branch_name": "refs/heads/master",
"committer_date": 1597118772000,
"content_id": "1855d1b18ca08b4f522a02709d84fcf929261c3f",
"detected_licenses": [
"MIT"
],
"directory_id": "badd3ef61b180c6b67603563096c550e56cbad80",
"extension": "py",
"fi... | 2.453125 | stackv2 | import importlib
from typing import Any, List, Dict
import optuna
from xfeat.types import XDataFrame
class TransformerMixin:
"""Mixin class for `xfeat.encoder`."""
def fit(self, input_df: XDataFrame) -> None:
"""Fit to data frame.
Args:
input_df (XDataFrame): Input data frame.
... | 144 | 27.78 | 70 | 14 | 851 | python | [] | 0 | true | |
2024-11-18T21:14:27.767569+00:00 | 1,603,721,714,000 | 597d510c2884dc90c1f204cbe6af682467f78128 | 3 | {
"blob_id": "597d510c2884dc90c1f204cbe6af682467f78128",
"branch_name": "refs/heads/master",
"committer_date": 1603721714000,
"content_id": "e9435e34b333036ce1cbad1a86ea42e28a80892d",
"detected_licenses": [
"MIT"
],
"directory_id": "008e1e9d883597818edb7835a1ebf14d8aeaefb6",
"extension": "py",
"fi... | 2.78125 | stackv2 | import os
import _pickle as cpickle
from argparse import ArgumentParser
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib
matplotlib.use("TkAgg") # backend so that the figure can stay in the background
def run_display_server(file, refresh):
"""
Displays the data from a... | 178 | 41.17 | 150 | 16 | 2,212 | python | [] | 0 | true | |
2024-11-18T21:14:27.986629+00:00 | 1,481,912,816,000 | 7cc77f10a55d2bacf8e9ba5f34b2916024d129c8 | 2 | {
"blob_id": "7cc77f10a55d2bacf8e9ba5f34b2916024d129c8",
"branch_name": "refs/heads/master",
"committer_date": 1481912816000,
"content_id": "c1f399a3078e2795e9b9db270dd0ddd990956fac",
"detected_licenses": [
"MIT"
],
"directory_id": "7697570e7da0fb6d2c8bc2aeb2250f5b11367f0b",
"extension": "py",
"fi... | 2.3125 | stackv2 | # ome - Object Message Expressions
# Copyright (c) 2015-2016 Luke McCarthy <luke@iogopro.co.uk>
import glob
import hashlib
import os
import sys
import time
from . import build
from . import compiler
from . import optimise
from .build_options import get_build_options_from_command
from .build_shell import BuildShell
fro... | 173 | 38.57 | 121 | 18 | 1,419 | python | [] | 0 | true | |
2024-11-18T21:14:28.334127+00:00 | 1,573,386,195,000 | 230bb0e6d65ba346d5e13866d7f39dd7d7c98cf4 | 3 | {
"blob_id": "230bb0e6d65ba346d5e13866d7f39dd7d7c98cf4",
"branch_name": "refs/heads/master",
"committer_date": 1573386195000,
"content_id": "3e0a415e0b4234bf804cdff3a7c8273edeaab253",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7c6e28e8eb79034df9393414eff9c8f1bf003d03",
"extension": "p... | 2.9375 | stackv2 | #
# Preprocessing_2.cpp
# *
#* Created on: Oct 24, 2018
# * Author: wntun (wntun.robust@gmail.com)
# *
# * It reads csv file : lat, lon, heading (radian) and converts to waypoints csv file used in autoware
# * Autoware sometimes fails to read csv waypoints file. Then, convert it to txt file format (x, y, z, velo... | 73 | 29.21 | 123 | 17 | 795 | python | [] | 0 | true | |
2024-11-18T21:14:28.382641+00:00 | 1,492,013,880,000 | 7d80fd5107bbdc65337229eb697aba9b61636793 | 2 | {
"blob_id": "7d80fd5107bbdc65337229eb697aba9b61636793",
"branch_name": "refs/heads/master",
"committer_date": 1492013880000,
"content_id": "4954a1c960e94014b9a2d7fd6580f83f066e88c7",
"detected_licenses": [
"MIT"
],
"directory_id": "f51b8af365d60a660c4ed578113c91dacf0cd5d1",
"extension": "py",
"fi... | 2.375 | stackv2 | """Data Retriever
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
from __future__ import print_function
from __future__ import absolute_import
from builtins import str
import io
import os
import sys
import csv
fr... | 227 | 35.54 | 128 | 26 | 1,980 | python | [] | 0 | true | |
2024-11-18T21:14:28.455964+00:00 | 1,680,110,386,000 | 6d27481435fe2ab75ae96aac8abadbb5c0b05801 | 4 | {
"blob_id": "6d27481435fe2ab75ae96aac8abadbb5c0b05801",
"branch_name": "refs/heads/master",
"committer_date": 1680110386000,
"content_id": "2c76150154b4d9cd65f467ee72e9ee44abddd1e7",
"detected_licenses": [
"MIT"
],
"directory_id": "a82d8b1b01f51d2eb01472078c1a1217652dbe9f",
"extension": "py",
"fi... | 3.640625 | stackv2 | '''
Demo Popup with a ColorPicker
'''
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.colorpicker import ColorPicker
from kivy.uix.popup import Popup
from kivy.uix.label import Label
class ColorPopup(App):
'''
This class represent you applicat... | 90 | 32.17 | 75 | 16 | 620 | python | [] | 0 | true | |
2024-11-18T21:14:28.506058+00:00 | 1,577,255,833,000 | 4d940ef111472da6da90cfa0b630497058f34539 | 3 | {
"blob_id": "4d940ef111472da6da90cfa0b630497058f34539",
"branch_name": "refs/heads/master",
"committer_date": 1577255833000,
"content_id": "f352a186e0186895a1e3cedcb5be132ca88c20f9",
"detected_licenses": [
"Unlicense"
],
"directory_id": "8a1814819b486733888b7dc8a09a69646071902c",
"extension": "py",... | 2.9375 | stackv2 | #! /Users/ykobayashi/.pyenv/shims/python
import argparse
import re
import sys
from typing import Optional
import mojimoji
import pyperclip
from googletrans import Translator
from translation import is_japanese
def main():
parser = argparse.ArgumentParser(description='論文を翻訳したい。')
parser.add_argument('--input... | 70 | 30.01 | 86 | 16 | 564 | python | [] | 0 | true | |
2024-11-18T21:14:28.553769+00:00 | 1,351,897,326,000 | 579e4c8a60fff7c5833a12e6f2b97fd35937877a | 3 | {
"blob_id": "579e4c8a60fff7c5833a12e6f2b97fd35937877a",
"branch_name": "refs/heads/master",
"committer_date": 1351897326000,
"content_id": "51ca90b42e23fa784770ae057e640436b85648ec",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "892efbbd60049f22c5e271a0e49f505e9f6029e1",
"extension": "p... | 3.234375 | stackv2 | """template.py - Template matching
"""
import numpy as np
from . import _template
def match_template(image, template, pad_input=False):
"""Match a template to an image using normalized correlation.
The output is an array with values between -1.0 and 1.0, which correspond
to the probability that the templ... | 81 | 34.38 | 79 | 15 | 1,072 | python | [] | 0 | true | |
2024-11-18T21:14:28.935320+00:00 | 1,627,874,038,000 | b035950eeced370c6e94481b42906c4f041b1e34 | 3 | {
"blob_id": "b035950eeced370c6e94481b42906c4f041b1e34",
"branch_name": "refs/heads/main",
"committer_date": 1627874038000,
"content_id": "81bbbbd4c29f301f836d81eba90ca95e243fef8e",
"detected_licenses": [
"MIT"
],
"directory_id": "40203e788d4060b2565dd55be40df54845a221e3",
"extension": "py",
"file... | 2.71875 | stackv2 | import torch.nn as nn
import torch
class MyLosses(object):
def __init__(self, weight=None, reduction='mean', batch_average=False, ignore_index=255, args=None):
self.ignore_index = ignore_index
self.weight = weight
self.reduction = reduction
self.batch_average = batch_average
... | 65 | 32.65 | 104 | 14 | 499 | python | [] | 0 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.