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-19T02:33:02.702476+00:00
1,692,475,624,000
e106d6ce0f24ee07b1f321f317f0a02de4fdb2ad
3
{ "blob_id": "e106d6ce0f24ee07b1f321f317f0a02de4fdb2ad", "branch_name": "refs/heads/master", "committer_date": 1692475624000, "content_id": "bf80e43da6a173b9b7765c09d76541b05b0b9a44", "detected_licenses": [ "Apache-2.0" ], "directory_id": "baeebadd5786ee0e96626741da650d5c2e277b52", "extension": "py"...
2.640625
stackv2
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- from os import path from ..system.check import check from .file_path import file_path from .file_ignore_item import file_ignore_item class file_ignore(object): 'Decide whether to ignore a file based on scheme similar to ....
50
31.22
90
13
395
python
[]
0
true
2024-11-19T02:33:02.950584+00:00
1,450,961,731,000
49eb0da77df34b48f4f938634cae7d7025002a43
3
{ "blob_id": "49eb0da77df34b48f4f938634cae7d7025002a43", "branch_name": "refs/heads/master", "committer_date": 1450961731000, "content_id": "dcfd2ee2fcdc63706cff071473378faccd4a20cf", "detected_licenses": [ "MIT" ], "directory_id": "914e32b1c284914260ff38060fd7faa6bcfa00ca", "extension": "py", "fi...
3.328125
stackv2
from math import log, sqrt from pandas import DataFrame from random import random, choice from BaseBanditAlgorithm import BaseBanditAlgorithm class EpsilonGreedy(BaseBanditAlgorithm): """ Implementation of the epsilon-greedy algorithm for multi-armed bandit testing. """ def __init__(self, epsilon=0....
54
28.26
82
14
369
python
[]
0
true
2024-11-19T02:33:04.266733+00:00
1,596,789,870,000
f5e3fe713c71349e23cb0596692a4e662d5f133a
2
{ "blob_id": "f5e3fe713c71349e23cb0596692a4e662d5f133a", "branch_name": "refs/heads/master", "committer_date": 1596789870000, "content_id": "624cf06f091f032ed9b7717ad983e8cf97c306ee", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3d28a81d16dfcb66436b93c090e44430fb064ec3", "extension": "py"...
2.421875
stackv2
import numpy as np import torch import torch.nn as nn from core.distributions import Bernoulli, Categorical, DiagGaussian from core.utils import init from core.agents.models import CNNBase, MLPBase class Policy(nn.Module): def __init__(self, obs_shape, action_space, base=None, base_kwargs=None): super(Po...
81
34.51
137
18
626
python
[]
0
true
2024-11-19T02:33:04.358279+00:00
1,563,290,455,000
b5de6b49fcd27cad85d5c8e0d5f57a2a013ba78d
3
{ "blob_id": "b5de6b49fcd27cad85d5c8e0d5f57a2a013ba78d", "branch_name": "refs/heads/master", "committer_date": 1563290455000, "content_id": "49a1bb81d963314e5ab9ee3e61df8277839292be", "detected_licenses": [ "Apache-2.0" ], "directory_id": "21a101e10147dd46aac28f4157196304295ba7fd", "extension": "py"...
2.765625
stackv2
""" Created on Feb 2, 2019 @author: Peter Van Sickel Module to support executing Docker commands as defined by yaml. WARNING: Only a very limited capability is supported. The bare minimum needed to do ICP installations. """ from subprocess import call from yapl.utilities.Trace import Trace from yapl.exceptions.E...
301
28.01
109
19
2,161
python
[]
0
true
2024-11-19T02:33:04.661143+00:00
1,686,672,174,000
c08d0661018c0280798d383689802b3d6a2631ed
3
{ "blob_id": "c08d0661018c0280798d383689802b3d6a2631ed", "branch_name": "refs/heads/master", "committer_date": 1686672174000, "content_id": "e3002d6cdd6be920009cb5138347dbfbacab3a80", "detected_licenses": [ "MIT" ], "directory_id": "00390142b7420de047094688a7362f53ef21fcd9", "extension": "py", "fi...
2.890625
stackv2
import uuid from dafna.internal import * from graphviz import Source from dafna.lib.strength.strength import * class Context: def __init__(self): self.patterns = {} self.simple_patterns = {} def create_pattern(self, regular_expr, simple=False, name=None): if simple == False: ...
142
29.61
110
18
1,197
python
[]
0
true
2024-11-19T02:33:04.821809+00:00
1,601,368,797,000
75da5fc822c7212b5142bdb0b5d699829df817e2
2
{ "blob_id": "75da5fc822c7212b5142bdb0b5d699829df817e2", "branch_name": "refs/heads/master", "committer_date": 1601368797000, "content_id": "fe4e2a58fcd38094c15ac011d986c85e445bca38", "detected_licenses": [ "MIT" ], "directory_id": "3346682649bc9020673ce01f6ac88ba0210c1340", "extension": "py", "fi...
2.375
stackv2
# encoding: utf-8 """ @author: sherlock @contact: sherlockliao01@gmail.com """ import os import glob import re from .BaseDataset import BaseImageDataset class NTU_Outdoor_Night_V2(BaseImageDataset): """ NTUIndoor Reference: Dataset statistics: # identities: N/A # images: N/A (train) + N/A (q...
75
33.92
115
16
617
python
[]
0
true
2024-11-19T02:33:05.113288+00:00
1,622,391,348,000
e4a3014a160c0232c0667c774223b3bb909c8edb
3
{ "blob_id": "e4a3014a160c0232c0667c774223b3bb909c8edb", "branch_name": "refs/heads/master", "committer_date": 1622391348000, "content_id": "58de6902e7d83bd08bc7c21ae1b1648441b6b36c", "detected_licenses": [ "MIT" ], "directory_id": "e489491401d446aa0282c7e07c3eb20a11a62c27", "extension": "py", "fi...
2.703125
stackv2
from functools import partial import numpy as np import tensorflow as tf from scipy import linalg @tf.function def read_images(image_path): image = tf.io.read_file(image_path) image = tf.image.decode_jpeg(image) image = tf.cast(image, tf.float32) image = tf.keras.applications.inception_v3.preprocess_...
89
37.49
109
14
775
python
[]
0
true
2024-11-19T02:33:05.346759+00:00
1,626,970,559,000
911e6f9ad81d0136c1ae1e4aef09157eca0c2673
4
{ "blob_id": "911e6f9ad81d0136c1ae1e4aef09157eca0c2673", "branch_name": "refs/heads/main", "committer_date": 1626970559000, "content_id": "d7e9c6d20307f504ce8363a56537a0e9eaa21182", "detected_licenses": [ "MIT" ], "directory_id": "e452f89c51180487f2ed68c33ca2fed54e14a967", "extension": "py", "file...
3.78125
stackv2
# 2. Подготовка за изпит # Напишете програма, в която Марин решава задачи от изпити, докато не получи съобщение "Enough" от лектора си. # При всяка решена задача той получава оценка. Програмата трябва да приключи прочитането на данни при команда "Enough" # или ако Марин получи определения брой незадоволителни оценки. Н...
33
33.88
118
11
357
python
[]
0
true
2024-11-19T02:33:05.466857+00:00
1,644,075,171,000
e14fa78bc316bf05dc9790cc78356dc54e81e57e
3
{ "blob_id": "e14fa78bc316bf05dc9790cc78356dc54e81e57e", "branch_name": "refs/heads/master", "committer_date": 1644075171000, "content_id": "121060d6347cc0ea3c5f2a1c553656cc1a45aba5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6d43dcf261f97796430fea582c224c58dca3117e", "extension": "py"...
3.0625
stackv2
import time import requests import serial # Check serial port s = serial.Serial('COM7', 9600) url = "" HEADER = {'Content-Type': 'application/json'} while True: data = s.readline().decode('ascii').strip() # {"cas":"2018-04-01 5:34", "mv":"1234"} payload = {'cas': time.strftime("%Y-%m-%d %H:%M:%S"), ...
26
23.27
111
12
180
python
[]
0
true
2024-11-19T02:33:05.696334+00:00
1,573,553,973,000
1ea85cc89510c28250c72991fd437da20c5d5f11
3
{ "blob_id": "1ea85cc89510c28250c72991fd437da20c5d5f11", "branch_name": "refs/heads/master", "committer_date": 1573553973000, "content_id": "a24bc39e3c24cf44c04cc83e2f46a3bf9c12fb21", "detected_licenses": [ "MIT" ], "directory_id": "2cdf872caafaf0d8acefdba40a7663f122910f9a", "extension": "py", "fi...
2.84375
stackv2
# mq_x_smoke_sensor.py - print smoke level # (c) BotBook.com - Karvinen, Karvinen, Valtokari import time import botbook_mcp3002 as mcp # <1> smokeLevel = 0 def readSmokeLevel(): global smokeLevel smokeLevel = mcp.readAnalog() # <2> def main(): while True: # <3> readSmokeLevel() # <4> print("Current smoke...
25
18
58
12
164
python
[]
0
true
2024-11-19T02:33:05.853072+00:00
1,560,178,186,000
285189849bf5d394d1ebca596a119b97ee572801
3
{ "blob_id": "285189849bf5d394d1ebca596a119b97ee572801", "branch_name": "refs/heads/master", "committer_date": 1560178186000, "content_id": "87df1d942acb36ce03e310f0ccdaf52acde924ce", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a5e59c6601c9bc7a12ccd84dc6bfb9bcd967e2e2", "extension": "p...
2.59375
stackv2
import kol.Error as Error from GenericRequest import GenericRequest from kol.database import ItemDatabase from kol.manager import PatternManager from kol.util import ParseResponseUtils class MakePasteRequest(GenericRequest): "Creates meat paste, meat stacks, or dense meat stacks." def __init__(self, session, ...
28
42.54
118
13
268
python
[]
0
true
2024-11-19T02:33:05.993132+00:00
1,563,735,340,000
6d5d98cfc54784c99cfdf6ea94c753fb46a37cdc
2
{ "blob_id": "6d5d98cfc54784c99cfdf6ea94c753fb46a37cdc", "branch_name": "refs/heads/master", "committer_date": 1563735340000, "content_id": "6903d08cff1351012c937a2d5bcece8d65d1f662", "detected_licenses": [ "MIT" ], "directory_id": "ba3668454c28e6b75de9ca5e011f3f521651d72d", "extension": "py", "fi...
2.46875
stackv2
from django.db import models from django.db.models import Q # Create your models here. class Location(models.Model): Loc_name = models.CharField(max_length =30) def __str__(self): return self.Loc_name def save_Location(self): self.save() class Category(models.Model): Cat_name = model...
46
23
124
15
240
python
[]
0
true
2024-11-19T02:33:06.452182+00:00
1,532,894,857,000
f247b4d32ad38fa516274a4335abd7838b09d02c
3
{ "blob_id": "f247b4d32ad38fa516274a4335abd7838b09d02c", "branch_name": "refs/heads/master", "committer_date": 1532894857000, "content_id": "d8d2ddb756909b63ae6839a195cc2c5dde75cb29", "detected_licenses": [ "MIT" ], "directory_id": "badb13e8e1876a42b1cc64cdb409f45416ed0e11", "extension": "py", "fi...
2.5625
stackv2
from wine_env import wine_rc import argparse import os import re import sys def main() -> None: parser = argparse.ArgumentParser() parser.add_argument('bottle', help='The name of the Wine bottle, e.g. PvZ', type=is_valid_bottle) parser.add_argument('--wine', help='The path to the Wine executable to use')...
50
34.64
101
15
481
python
[]
0
true
2024-11-19T02:33:06.533084+00:00
1,511,544,217,000
536d67691352eeff6e73000898f70d9712c2b963
2
{ "blob_id": "536d67691352eeff6e73000898f70d9712c2b963", "branch_name": "refs/heads/master", "committer_date": 1511544217000, "content_id": "e7c45914afd2d35b5475761c197d186cf425b34c", "detected_licenses": [ "MIT" ], "directory_id": "30969c475868da17c45f3543a203a1ae1a48d744", "extension": "py", "fi...
2.453125
stackv2
import re import time import requests from unidecode import unidecode import pandas as pd from bs4 import BeautifulSoup from datetime import datetime, timedelta class SIVEP(): def __init__(self, username, password): self._UF_ID = { 'AC':1, 'AL':2, 'AM':3, 'AP':4, 'BA':5, 'CE':6...
131
37.27
94
18
1,356
python
[]
0
true
2024-11-19T02:33:06.632829+00:00
1,559,861,554,000
f2d459e45b44ebba2d368814045fd12cf637e9eb
4
{ "blob_id": "f2d459e45b44ebba2d368814045fd12cf637e9eb", "branch_name": "refs/heads/master", "committer_date": 1559861554000, "content_id": "596969ad205deaaacaf7b6c4d0f3d9c9e7b16e63", "detected_licenses": [ "MIT" ], "directory_id": "d1df2f4f3a84d2e6a24b9460e6ff397c25f20b63", "extension": "py", "fi...
3.5
stackv2
import collections, random ############################################################ # An algorithm that solves an MDP (i.e., computes the optimal # policy). class MDPAlgorithm: # Set: # - self.pi: optimal policy (mapping from state to action) # - self.V: values (mapping from state to best values) ...
91
41.45
110
18
852
python
[]
0
true
2024-11-19T02:33:07.644991+00:00
1,636,681,717,000
2412f955ffbbdf39df319763e7a4d92fe13d01b0
4
{ "blob_id": "2412f955ffbbdf39df319763e7a4d92fe13d01b0", "branch_name": "refs/heads/main", "committer_date": 1636681717000, "content_id": "ae3535dba4d7e13c1338b0c7c4fa9fcb327a22f2", "detected_licenses": [ "MIT" ], "directory_id": "0187448c8783d6ed3fee2f068440709daebeb49e", "extension": "py", "file...
3.703125
stackv2
class jsdict: """dictionary that can be acsessed by doing foo.bar instead of foo[bar], similarly how dicts/objects work in javascript.\n WARNING! if you put a class in this with a key that matches one of the existing functions (eg: 'clear'),\n it will be overridden with the realevent builtin function if you...
84
27.89
126
12
593
python
[]
0
true
2024-11-19T02:33:08.710941+00:00
1,551,450,380,000
776bbc7ac49ff05d3067f0a38077b581daffded7
2
{ "blob_id": "776bbc7ac49ff05d3067f0a38077b581daffded7", "branch_name": "refs/heads/master", "committer_date": 1551450380000, "content_id": "90bcb68270b9d20cee5b0a184a211ee108da58b8", "detected_licenses": [ "MIT" ], "directory_id": "05f38b04f34474138297eba1b77fea900366b90b", "extension": "py", "fi...
2.46875
stackv2
import tensorflow as tf class BehavioralCloning: def __init__(self, Policy): self.Policy = Policy self.actions_expert = tf.placeholder(tf.int32, shape=[None], name='actions_expert') actions_vec = tf.one_hot(self.actions_expert, depth=self.Policy.act_probs.shape[1], dtype=tf.float32) ...
28
39.61
109
17
250
python
[]
0
true
2024-11-19T02:33:08.765869+00:00
1,578,189,352,000
716319fb2a7e5ca0344f99aabb529c6ac8b53566
2
{ "blob_id": "716319fb2a7e5ca0344f99aabb529c6ac8b53566", "branch_name": "refs/heads/master", "committer_date": 1578189352000, "content_id": "e0e09dc0374df8819cca9075c530555da40f0f3c", "detected_licenses": [ "MIT" ], "directory_id": "36d59b5ba2b682cb54e87749860182621843da48", "extension": "py", "fi...
2.3125
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File : views.py # Date : 17.09.2019 # Author: matthieu petiteau <mpetiteau.pro@gmail.com> '''Flask views.''' import ast from flask import (jsonify, redirect, render_template, request, send_from_directory, url_for) from . import app, utils from .de...
72
24.04
67
16
435
python
[]
0
true
2024-11-19T02:33:08.978645+00:00
1,644,766,604,000
9abd98eadbdbce0f1a4669a803334fc532c8dda3
3
{ "blob_id": "9abd98eadbdbce0f1a4669a803334fc532c8dda3", "branch_name": "refs/heads/master", "committer_date": 1644766604000, "content_id": "abfe19a890198813a6255bdca33e4bed1b3ed389", "detected_licenses": [ "CC0-1.0" ], "directory_id": "782428e58cf4df3bd0f3240983392ddb10374e5e", "extension": "py", ...
2.59375
stackv2
import os from makeUtils import binaryUtils from makeUtils import msBuildUtils from makeUtils import returnCodes # since Visual studio 15.2, there is an executable, under the below given path # the vswhere.exe can be used to get a path, to the latest installed version of msbuild.exe on the machine # the existance of t...
61
49.02
159
11
730
python
[]
0
true
2024-11-19T02:33:09.046295+00:00
1,537,187,208,000
d3005eb756c90c1a79c167ffa562b791dd0fe43f
2
{ "blob_id": "d3005eb756c90c1a79c167ffa562b791dd0fe43f", "branch_name": "refs/heads/master", "committer_date": 1537187208000, "content_id": "fad159d5f130a273e0db95408698d26f40da75e3", "detected_licenses": [ "MIT" ], "directory_id": "aa15deccf22992f174fa3cbda43bbd0a53f35d1e", "extension": "py", "fi...
2.4375
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import os import cv2 import imgaug.augmenters as iaa import numpy as np from PIL import Image from torch.utils.data.dataset import Dataset IMG_EXTENSIONS = [ '.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '....
186
28.52
97
19
1,548
python
[]
0
true
2024-11-19T02:33:10.253896+00:00
1,655,261,544,000
40c2782109e7f894fa7b72951af3c8ac3c696906
3
{ "blob_id": "40c2782109e7f894fa7b72951af3c8ac3c696906", "branch_name": "refs/heads/master", "committer_date": 1655261544000, "content_id": "2f612e5277cdadfe44035402f21afb96b580cae2", "detected_licenses": [ "MIT" ], "directory_id": "4382d1d3775cf8cfd33cf66c534203f2859d45d4", "extension": "py", "fi...
3.09375
stackv2
from abc import ABCMeta, abstractmethod import pandas as pd from oolearning.model_processors.SingleUseObject import SingleUseObjectMixin class TransformerBase(SingleUseObjectMixin, metaclass=ABCMeta): """ A transformer is an object that transforms data-sets by first `fitting` an initial data-set, and saving...
124
41.52
110
14
1,102
python
[]
0
true
2024-11-19T02:33:10.407545+00:00
1,551,439,753,000
ace452b031c921eec6937e7735c790072fed5173
3
{ "blob_id": "ace452b031c921eec6937e7735c790072fed5173", "branch_name": "refs/heads/master", "committer_date": 1551439753000, "content_id": "4fdaceb03edecf3057693f659353036102c6ad26", "detected_licenses": [ "MIT" ], "directory_id": "647d3ba52054f072fa5deaab25675b9961e56eca", "extension": "py", "fi...
2.90625
stackv2
"""Wrappers for altering the functionality of the game.""" import gym from .clip_reward_env import ClipRewardEnv from .downsample_env import DownsampleEnv from .frame_stack_env import FrameStackEnv from .frameskip_env import FrameskipEnv from .penalize_death_env import PenalizeDeathEnv from .penalize_height_env import ...
68
32.04
72
11
547
python
[]
0
true
2024-11-19T02:33:10.464152+00:00
1,618,349,827,000
ba65cc4676254d5f173338635b4b530268b039d8
2
{ "blob_id": "ba65cc4676254d5f173338635b4b530268b039d8", "branch_name": "refs/heads/main", "committer_date": 1618349827000, "content_id": "bbae41f519102f83abac949ad044a1039fc3b3b7", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "29110413ad8c4ffcc703216daf9e5fcad90255a8", "extension": "py"...
2.484375
stackv2
##################################################################################################################### ## ## The module is part of SiteProf2 framework, for processing structures& sequences of biological macromolecules. ## It may not be copied without explicit permission of the author. ## Copyright: Grzeg...
418
35.83
140
22
3,136
python
[]
0
true
2024-11-19T02:33:10.521999+00:00
1,626,655,446,000
0d0b4dfdf8bd2b5555e91a90a7336140e9430b61
3
{ "blob_id": "0d0b4dfdf8bd2b5555e91a90a7336140e9430b61", "branch_name": "refs/heads/master", "committer_date": 1626655446000, "content_id": "2e74d205df392da4783e9dad0a297ac0813e7acf", "detected_licenses": [ "MIT" ], "directory_id": "626e758e3123940a9ba423b16f8a166252e26209", "extension": "py", "fi...
2.828125
stackv2
#!/usr/bin/python3 import argparse import logging #import readline # it blocks rlwrap from textwrap import dedent from os.path import isfile import sys from sym_lis3 import GlobalEnv, parse, List, lispstr def handy_input(prompt='> '): 'An `input` with 2 newline characters ending.' all_input_strings = '' ...
82
26.07
87
15
497
python
[]
0
true
2024-11-19T02:33:10.587217+00:00
1,523,115,937,000
b75a713d961914f2bece7cbb2dfdca2ad653ce18
3
{ "blob_id": "b75a713d961914f2bece7cbb2dfdca2ad653ce18", "branch_name": "refs/heads/master", "committer_date": 1523115937000, "content_id": "a51b27f6650d06a5aafe8d8190be512e5a01132a", "detected_licenses": [ "MIT" ], "directory_id": "bff8128579f95f6641c23e2455263784a7a6b76a", "extension": "py", "fi...
2.734375
stackv2
""" Created on 1 Mar 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) example JSON: {"calibrated_on": "2017-03-01", "offset": 444} """ from collections import OrderedDict from scs_core.data.datum import Datum from scs_core.data.localized_datetime import LocalizedDatetime from scs_core.data.json impor...
79
28.77
118
17
402
python
[]
0
true
2024-11-19T02:33:10.638734+00:00
1,592,612,144,000
2cd3a27833483d96855c780bbb04c50df498a6b6
3
{ "blob_id": "2cd3a27833483d96855c780bbb04c50df498a6b6", "branch_name": "refs/heads/master", "committer_date": 1592612144000, "content_id": "88fa7093ae899daca7a61ef8cea50f27ee8de4af", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a8e938307904efc803487727f470818cd5080b74", "extension": "py"...
2.9375
stackv2
import pandas as pd from pandas import read_csv import numpy as np df = read_csv('dataNormalized.csv') balanced = pd.DataFrame() # Balanced dataset dataframe bins = 1000 # 1000 of bins bin_n = 300 # 300 frames in each bin (at most) start = 0 for end in np.linspace(0, 1, num=bins): df_range = df[(np.abs...
17
33.71
89
13
179
python
[]
0
true
2024-11-19T02:33:10.821434+00:00
1,549,499,739,000
d7c16c6406749f62c57b90ac60651de6f0d977a5
3
{ "blob_id": "d7c16c6406749f62c57b90ac60651de6f0d977a5", "branch_name": "refs/heads/master", "committer_date": 1549499739000, "content_id": "a3f00d2acf157f9454e5dcb506d6a1015ef67965", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "71bb43344c0330adaea0f3858d76acf1a747e628", "extension": "p...
2.75
stackv2
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by ExopyPulses Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ---------...
99
27.7
79
20
598
python
[]
0
true
2024-11-19T02:33:10.877079+00:00
1,483,091,245,000
85d784d37113f51972d84afa54933b655049104f
3
{ "blob_id": "85d784d37113f51972d84afa54933b655049104f", "branch_name": "refs/heads/master", "committer_date": 1483091245000, "content_id": "e578a4ad8d366333fba4d17544abedb524e83e38", "detected_licenses": [ "MIT" ], "directory_id": "76d9a8efbae86c42174350317f6b194c096c8be9", "extension": "py", "fi...
3.078125
stackv2
# -*- coding: utf-8 -*- import logging import os import threading from icrawler.utils import DupFilter class Feeder(object): """Base class for feeders. Essentially a thread manager, in charge of feeding urls to parses. Attributes: url_queue: A queue storing page urls, connecting Feeder and Par...
159
32.85
82
19
1,127
python
[]
0
true
2024-11-19T02:33:10.994697+00:00
1,597,695,884,000
6e36c5aa3b27d1c171110dcf4e0e90ecabf75cbd
3
{ "blob_id": "6e36c5aa3b27d1c171110dcf4e0e90ecabf75cbd", "branch_name": "refs/heads/master", "committer_date": 1597695884000, "content_id": "1bfd48e8b6e6e6a234a9764783acb764efa99e06", "detected_licenses": [ "MIT" ], "directory_id": "839c2e829e95647b8b1968c8182e4a8665924c2e", "extension": "py", "fi...
2.59375
stackv2
import numpy as np from index_mesh import IndexMesh from combine_cells import combine_cells from util import find_local_numbering class EMIMesh(IndexMesh): def __init__(self, Nx, Ny, Nz, N): super().__init__(Nx, Ny, Nz, N) def set_up_mesh(G): "Set up vectors containing the indices of the different ...
337
31.92
106
14
3,630
python
[]
0
true
2024-11-19T02:33:11.157007+00:00
1,623,069,389,000
af6d7c6416d30accc682e9e5d907dac2607d56e1
3
{ "blob_id": "af6d7c6416d30accc682e9e5d907dac2607d56e1", "branch_name": "refs/heads/master", "committer_date": 1623069389000, "content_id": "fe11aeefc07b8cb78cf6f374725e8270862f5a2a", "detected_licenses": [ "MIT" ], "directory_id": "d4af15bfec86981d5a8690423c05aa09910967af", "extension": "py", "fi...
3.015625
stackv2
import base64 import random import string from Crypto.Cipher import AES class MundisCryptographerException(Exception): def __init__(self, dErrArguments): Exception.__init__(self, "Error: {0} | {1}".format( dErrArguments[0], dErrArguments[1] )) self.dErrArguments = dErrArgum...
46
29.48
86
14
360
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_aa38546e502b3e92_d92ca657", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ...
2
true
2024-11-19T02:33:11.223514+00:00
1,688,074,649,000
fd7efbaf132483b98f997c52133bdf6a1ec6806e
3
{ "blob_id": "fd7efbaf132483b98f997c52133bdf6a1ec6806e", "branch_name": "refs/heads/master", "committer_date": 1688074649000, "content_id": "fd61bd543fb67f59fa0e913d9b4ed1adf46c14f9", "detected_licenses": [ "MIT" ], "directory_id": "a0784b1a66a6c1a89ee8a75e32cd48d2c168931b", "extension": "py", "fi...
3.34375
stackv2
""" Parser ====== This contains methods and classes to manage parsing of code """ from copy import deepcopy from collections import namedtuple from pygments.lexers import (PythonConsoleLexer, PythonLexer, BashSessionLexer, NodeConsoleLexer) from pygments.lexers.data import YamlLexer from pygments.lexers.markup i...
267
31.88
79
17
1,955
python
[]
0
true
2024-11-19T02:33:11.338694+00:00
1,604,456,988,000
980ae70c3c4cc69f66ea67abd5d7c8d58418a87e
2
{ "blob_id": "980ae70c3c4cc69f66ea67abd5d7c8d58418a87e", "branch_name": "refs/heads/main", "committer_date": 1604456988000, "content_id": "4e40f582ca9f09ba290d955dff1bf8a98925e484", "detected_licenses": [ "MIT" ], "directory_id": "50cad523587eb9308927904b4f18e9337c006b9a", "extension": "py", "file...
2.5
stackv2
from __future__ import annotations from typing import Dict, Optional, Sequence, Tuple from exrec.core.id import ItemID, UserID from exrec.core.interface import DataFrame, LabelEncoder from exrec.preprocessing.interface import RatingDataset from sklearn.model_selection import train_test_split class RatingDatasetImpl...
230
30.53
88
16
1,579
python
[]
0
true
2024-11-19T02:33:11.465106+00:00
1,647,452,710,000
efaf9ee64e07851c0671486a1883c21d7ccdefd7
2
{ "blob_id": "efaf9ee64e07851c0671486a1883c21d7ccdefd7", "branch_name": "refs/heads/master", "committer_date": 1647452710000, "content_id": "600a3d9246d51075b452cd83fa813b144a91b38b", "detected_licenses": [ "MIT" ], "directory_id": "dcb823e295bb94de99a89dd4d69314186b9351b2", "extension": "py", "fi...
2.484375
stackv2
import argparse from eval import main parser = argparse.ArgumentParser(description='Evaluate few-shot prototypical networks') default_model_path = 'results/best_model.pt' parser.add_argument('--model.model_path', type=str, default=default_model_path, metavar='MODELPATH', help="location of pretrai...
22
53.5
120
9
268
python
[]
0
true
2024-11-19T02:33:11.881982+00:00
1,615,491,261,000
071f27f21e99bf3f817b251e08769142970d3837
2
{ "blob_id": "071f27f21e99bf3f817b251e08769142970d3837", "branch_name": "refs/heads/main", "committer_date": 1615491261000, "content_id": "0b8ac794bfa02fb91a1245f78bf34c65ac5f2e56", "detected_licenses": [ "MIT" ], "directory_id": "34f580242c360481dd8b57958f63f5d71f5114de", "extension": "py", "file...
2.375
stackv2
# -*- coding: utf-8 -*- """ Created on Sat Mar 6 17:07:43 2021 @author: Conor """ from keras.preprocessing.image import ImageDataGenerator import numpy as np import os import glob import skimage.io as io import skimage.transform as trans data_gen_args = dict(rotation_range=0.2, width_shift_range...
60
32.03
114
10
488
python
[]
0
true
2024-11-19T02:33:12.147179+00:00
1,605,489,336,000
66cf273c1f33fd69100702b4f090154c3ae43b35
4
{ "blob_id": "66cf273c1f33fd69100702b4f090154c3ae43b35", "branch_name": "refs/heads/main", "committer_date": 1605489336000, "content_id": "a44b8575b919866c93492c6a1bcfb43f5616590f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "92ba0f609a698b4497a67552d32f959580f36bdb", "extension": "py", ...
3.5
stackv2
class Player(object): name = '' points = 0 level = 1 __instance = None # make it singleton def __new__(cls): if Player.__instance is None: Player.__instance = object.__new__(cls) Player.__instance.init() return Player.__instance def init(self): ...
43
17.47
51
12
183
python
[]
0
true
2024-11-19T02:33:12.397542+00:00
1,614,348,733,000
5e21d3b1b878c9e86d27f3bb19b410a277a88414
3
{ "blob_id": "5e21d3b1b878c9e86d27f3bb19b410a277a88414", "branch_name": "refs/heads/master", "committer_date": 1614348733000, "content_id": "6a84722c1171df077f436dcf217d91a85e17ef09", "detected_licenses": [ "MIT" ], "directory_id": "ef8bd7e05d35e915b81338a7397447288a6fe703", "extension": "py", "fi...
3.21875
stackv2
import matplotlib.pyplot as plt import numpy as np from definitions import to_polar, complex_log, contour_circle, contour_rectangle theta = np.linspace(-np.pi, np.pi-0.01, 100) x1, y1 = contour_rectangle(-0.5, 0.5, 1, 1, len(theta)) u1, v1 = complex_log(x1, y1, polar=False) x2, y2 = contour_rectangle(-3, 2, 2, 3, len...
36
30.53
80
8
411
python
[]
0
true
2024-11-19T02:33:15.930132+00:00
1,609,923,461,000
390e934f10a4d03e79f9c2b28b52aad7d51647e2
3
{ "blob_id": "390e934f10a4d03e79f9c2b28b52aad7d51647e2", "branch_name": "refs/heads/master", "committer_date": 1609923461000, "content_id": "11a411238f2b7dd74dfd94e85b2db423858be1e7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1f16661414a8f07ab850cb4fe012cc6a82d7fbd1", "extension": "py"...
2.5625
stackv2
from ec.domain.service.user import UserService from ec.domain.model.user import User from injector import Injector, inject, Module, singleton, provider from ec.infra.interface.user import IUserRepository from ec.infra.memory.user import UserInMemoryRepository import uuid class UserAppService: """ アプリケーションとしての動き ...
59
27.49
87
12
362
python
[]
0
true
2024-11-19T02:43:23.545610+00:00
1,563,486,767,000
ae111ed2e235e6af968a187803047aeb64eabcd8
3
{ "blob_id": "ae111ed2e235e6af968a187803047aeb64eabcd8", "branch_name": "refs/heads/master", "committer_date": 1563486767000, "content_id": "26f2621917e9306f3c2ffeb09192869a3878bdbf", "detected_licenses": [ "MIT" ], "directory_id": "a1bcfcd9c78b8478ed0d391b251068fb1a64abd8", "extension": "py", "fi...
2.796875
stackv2
""" General methods for MT constants and MT-emulation Python classes """ import json import uuid import pika from MLLogger import BaseMLLogger LOGGER = BaseMLLogger( log_name='mt_library_logger',log_file_name='sds-mt-library') # json to Python types mapping table # key is json type, value is Python type TYPES_...
464
30.91
79
16
3,145
python
[]
0
true
2024-11-19T02:43:24.093215+00:00
1,551,297,865,000
f5fd1539b947f48b5f8c02136797034c57001ecb
3
{ "blob_id": "f5fd1539b947f48b5f8c02136797034c57001ecb", "branch_name": "refs/heads/master", "committer_date": 1551297865000, "content_id": "5ca9cec5c25dbc1bcb0891df141d6c3f97150eb2", "detected_licenses": [ "MIT" ], "directory_id": "5a475533765bb79dc9001de5da7cc9ddb7510f88", "extension": "py", "fi...
2.84375
stackv2
import os import subprocess import sys pingList = open("ADD-PATH-TO-FILE-HERE", "r") GREEN = '\033[0;32m' RED = '\033[3;31m' RESET = '\033[0;0m' for i in pingList: #It's neccessary that the IP addresses are the last bits of text on each line ipAddr = i[-15:] ipAddr = ipAddr.strip(' ') ipAddr =...
29
33
86
14
231
python
[]
0
true
2024-11-19T02:43:24.283765+00:00
1,626,180,132,000
8f26b81882bbe6df70204d7ac48983c9e59d1a63
3
{ "blob_id": "8f26b81882bbe6df70204d7ac48983c9e59d1a63", "branch_name": "refs/heads/main", "committer_date": 1626180132000, "content_id": "9caa965e95a9c1a032205d0c51afded332065d5f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6a2cbe4401a16820af0d15664aadf8e664cda38a", "extension": "py", ...
2.984375
stackv2
import json # #import numpy as np from bge import logic as gl def read_json(fichier): try: with open(fichier) as f: data = json.load(f) f.close() except: data = None print("Fichier inexistant ou impossible à lire:") return data def get_all_scenes(): """R...
182
25.98
78
18
1,531
python
[]
0
true
2024-11-19T02:43:24.903340+00:00
1,583,849,721,000
ed3a51e8efe54bf01a0759f4a14e04134ef0462c
3
{ "blob_id": "ed3a51e8efe54bf01a0759f4a14e04134ef0462c", "branch_name": "refs/heads/master", "committer_date": 1583849721000, "content_id": "ee795f3585f613d69b03b5058a7dff19af793f96", "detected_licenses": [ "MIT" ], "directory_id": "bdf26fc81d52872547748b7936ba28a662b59f4e", "extension": "py", "fi...
2.734375
stackv2
import os import requests import json class Slack(object): """Slack Api to communicate with the slack""" def __init__(self, post_url): self.post_url = post_url def get_configs(self): """Get configurations """ with open('config/config.json', 'r') as f: config = json.lo...
37
22.11
69
13
187
python
[]
0
true
2024-11-19T02:43:25.010476+00:00
1,469,618,414,000
a646d45d988f2349b4cf67cb447188ac2b04e3d9
3
{ "blob_id": "a646d45d988f2349b4cf67cb447188ac2b04e3d9", "branch_name": "refs/heads/master", "committer_date": 1469618414000, "content_id": "4e6a1af9dbee599d5014092111794fc8eeedff1d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "edea09cff7eae1d599a1a17ac9af1bf61fee6fd1", "extension": "py"...
2.984375
stackv2
# coding: utf-8 from sklearn.cluster import KMeans import numpy as np import csv # Read data set data = [] with open('../dataSets/sampleData.csv', 'rU') as csvfile: reader = csv.reader(csvfile) for line in reader: data.append([float(line[0]), float(line[1])]) x_train = np.array(data) x_test = np.arr...
22
24.91
65
13
169
python
[]
0
true
2024-11-19T02:43:25.214404+00:00
1,578,998,245,000
5cab75491b4fc0ba1252a01477c493ef249b7947
3
{ "blob_id": "5cab75491b4fc0ba1252a01477c493ef249b7947", "branch_name": "refs/heads/master", "committer_date": 1578998245000, "content_id": "da0542917a96f44f468239f5866448ba36e3cb09", "detected_licenses": [ "MIT" ], "directory_id": "fe930cb047953a75fc4f8c1a38240e9e6fb390ed", "extension": "py", "fi...
2.90625
stackv2
#!/usr/bin/env python import sys def resize(args): from PIL import Image try: # 画像ファイルを読み込む im = Image.open(args.imagefile) except IOError: print('Error: image file not found.', file=sys.stderr) return 1 try: oriantation = get_exif(im)['Orientation'] except Ke...
99
26.87
74
16
670
python
[]
0
true
2024-11-19T02:43:25.327237+00:00
1,418,342,929,000
75268fdba07fb579d8b7b2a15a58c54e4f4605e1
3
{ "blob_id": "75268fdba07fb579d8b7b2a15a58c54e4f4605e1", "branch_name": "refs/heads/master", "committer_date": 1418342929000, "content_id": "6dbe8e5b2cb88a62f04bbc769773afde61d872ee", "detected_licenses": [ "CC0-1.0" ], "directory_id": "85c618a75b722b7f3111c44262871bca4a9d0f8f", "extension": "py", ...
2.8125
stackv2
#regrid.py # to redraw the grids, to interpolate, etc """ USE: from armor import pattern from armor.geometry import regrid reload(pattern); reload(regrid) a = pattern.a ; c = pattern.c ; a.load(); c.load(); e = regrid.regrid(a,c) e.show() """ """ input: DBZ object, new_horizontal_dimension, new_vertical_dimensio...
132
33.45
99
17
1,310
python
[]
0
true
2024-11-19T02:43:25.505939+00:00
1,565,896,159,000
0d55361672af34148b42db738766f257a11e692c
3
{ "blob_id": "0d55361672af34148b42db738766f257a11e692c", "branch_name": "refs/heads/master", "committer_date": 1565896159000, "content_id": "31da5888484c4f1364b76f7aec16b63a0edea973", "detected_licenses": [ "MIT" ], "directory_id": "285b5fc9629fa1d0cdb505982e427ae065cdd2d8", "extension": "py", "fi...
2.640625
stackv2
import socket import json import os def main(): print("starting server") sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.bind("/tmp/example.sock") sock.listen(1) while True: conn, addr = sock.accept() try: f = conn.makefile('rw') for ln in f: ...
32
27.84
80
24
206
python
[]
0
true
2024-11-19T02:43:25.842178+00:00
1,658,146,001,000
83238498efe1070794ca53c959bf75789b7808fe
3
{ "blob_id": "83238498efe1070794ca53c959bf75789b7808fe", "branch_name": "refs/heads/master", "committer_date": 1658146001000, "content_id": "4e8477a3ab95fab33bbb58ab1d090bfa440884b8", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "e82b3c6000fe8e4639d6606f9d3605e75a8a5d5c", "extension": "p...
2.59375
stackv2
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 DAVY Guillaume # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
141
31.37
79
14
1,098
python
[]
0
true
2024-11-19T02:43:26.073854+00:00
1,612,111,959,000
33b78f5068f25fb29c7e16f848d71a4dfe266547
4
{ "blob_id": "33b78f5068f25fb29c7e16f848d71a4dfe266547", "branch_name": "refs/heads/master", "committer_date": 1612111959000, "content_id": "cb0fdcbb5309fe8e1e8e69e6e78099d1f56f515e", "detected_licenses": [ "MIT" ], "directory_id": "ebc0333479c8619d7494597b99c419e54f8393a2", "extension": "py", "fi...
3.59375
stackv2
# Allows direct calculation of list(product(X, repeat))[index] # Without having to create a list from the product generator def index_product(index, items, repeat=1): n_items = len(items) assert index <= n_items ** repeat, f"Index {index} out of range" prod = [0] * repeat for i in range(repeat): ...
40
26.88
86
14
289
python
[]
0
true
2024-11-19T02:43:26.124943+00:00
1,428,437,146,000
1d54cb1f9ed64098abe97dc4a664bb004dae06da
3
{ "blob_id": "1d54cb1f9ed64098abe97dc4a664bb004dae06da", "branch_name": "refs/heads/master", "committer_date": 1428437146000, "content_id": "5acceb0ecc77281ff657a3ed3e4d863d4dbb1b5d", "detected_licenses": [ "MIT" ], "directory_id": "38d0770d0682513c6e773e6e5bee132ffa9efb81", "extension": "py", "fi...
2.5625
stackv2
import os import sys import DataSource db = DataSource.DataSource() if os.path.isfile( "./cvh.db" ): db.openDB( "./cvh.db" ) else: db.buildDB( "./cvh.db" ) with open( sys.argv[1], 'r' ) as f: data = f.read() items = data.split( "<>" ) for key,item in enumerate( items ): print key, item, try: db.addWhi...
22
16.73
36
11
120
python
[]
0
true
2024-11-19T02:43:26.170407+00:00
1,623,870,740,000
c5f354709f0c38230b240d7619963f0bd84caf47
2
{ "blob_id": "c5f354709f0c38230b240d7619963f0bd84caf47", "branch_name": "refs/heads/master", "committer_date": 1623870740000, "content_id": "594a1e6626638a46ffe7adc38b12fde4bd0d9467", "detected_licenses": [ "MIT" ], "directory_id": "0d797958a0e2bd7ab3f04835c8904a4646826796", "extension": "py", "fi...
2.359375
stackv2
""" The MIT License (MIT) Copyright (c) 2016 Kyle Hollins Wray, University of Massachusetts Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without ...
142
38.6
106
23
1,411
python
[]
0
true
2024-11-19T02:43:26.446219+00:00
1,674,133,668,000
86e0e42ad85e1f60ae61516b1ce5119b90560fd2
2
{ "blob_id": "86e0e42ad85e1f60ae61516b1ce5119b90560fd2", "branch_name": "refs/heads/master", "committer_date": 1674133668000, "content_id": "2a28527337d34a2ad47155a618eb5ec0016c7435", "detected_licenses": [ "MIT" ], "directory_id": "8b7aeb654fb3ee738eabc0e2ad69524b4d9f857c", "extension": "py", "fi...
2.3125
stackv2
import os import threading import time import requests from altfe.interface.root import interRoot from app.lib.core.dl.model.dler import Dler requests.packages.urllib3.disable_warnings() class DlDler(Dler): def __init__(self, url, folder="./downloads/", name=None, dlArgs=Dler.TEMP_dlArgs, dlCacheDir=None, dlRe...
215
32.57
120
22
1,778
python
[{"finding_id": "codeql_py/request-without-cert-validation_8ec11482ca3adab2_e5b7f13a", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
1
true
2024-11-19T02:43:27.349684+00:00
1,585,165,319,000
c36ee3963a87871398a1d855e73e119bd0f4b435
3
{ "blob_id": "c36ee3963a87871398a1d855e73e119bd0f4b435", "branch_name": "refs/heads/master", "committer_date": 1585165319000, "content_id": "4707269af6aacb462924e4daa63cd36eea2a174d", "detected_licenses": [ "MIT" ], "directory_id": "a8b762e1560d81d88013be935a10f7da77b1ff09", "extension": "py", "fi...
2.53125
stackv2
import os import re import sys import torch import hashlib from progress.bar import Bar from concurrent.futures import ProcessPoolExecutor from sequence import NoteSeq, EventSeq, ControlSeq import utils import config def preprocess_midi(path): note_seq = NoteSeq.from_midi_file(path) note_seq.adjust_time(-note...
51
30.06
83
14
354
python
[]
0
true
2024-11-19T02:43:27.400977+00:00
1,602,835,692,000
3fa19675788ccd88ed8dfb70759acc21eaabe9c5
2
{ "blob_id": "3fa19675788ccd88ed8dfb70759acc21eaabe9c5", "branch_name": "refs/heads/master", "committer_date": 1602835692000, "content_id": "2eba34af4fddde92b4343788e0c9622f3bee6b97", "detected_licenses": [ "MIT" ], "directory_id": "df30c0d7f091a617614db2fa3914d59b1f31b7c6", "extension": "py", "fi...
2.5
stackv2
import datetime import os from flask import Flask from flask_sqlalchemy import SQLAlchemy app = Flask(__name__, static_folder="", static_url_path="") app.config.from_object(__name__) app.config.update( SQLALCHEMY_DATABASE_URI=os.environ.get("DATABASE_URL"), SQLALCHEMY_TRACK_MODIFICATIONS=False, ) # initializ...
40
28.52
64
12
276
python
[]
0
true
2024-11-19T02:43:27.612761+00:00
1,495,090,865,000
20fc5d68d80469c1b609f9a1890bb308988ac51a
3
{ "blob_id": "20fc5d68d80469c1b609f9a1890bb308988ac51a", "branch_name": "refs/heads/master", "committer_date": 1495090865000, "content_id": "baf36fe90b5145a06c0c4c58224b106112023c98", "detected_licenses": [ "Apache-2.0" ], "directory_id": "af3ea51bd819da8aa8b41ddb12be956ee7d73895", "extension": "py"...
3
stackv2
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
99
41.69
116
21
973
python
[]
0
true
2024-11-19T02:43:27.725075+00:00
1,559,543,546,000
4a72b294582a8f6d5b738851229b7d341a6f417f
2
{ "blob_id": "4a72b294582a8f6d5b738851229b7d341a6f417f", "branch_name": "refs/heads/master", "committer_date": 1559543546000, "content_id": "02cdb65364f1732350aa607539f8790bd09830cb", "detected_licenses": [ "MIT" ], "directory_id": "d3dfc03b9a2b4dfe1364f82245b640a489907127", "extension": "py", "fi...
2.453125
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import torch from build_vocab import Vocabulary from models import * import fire import kaldi_io from train import parsecopyfeats import tableprint as tp from contextlib import contextmanager import sys import pandas as pd # Device configuration DEVICE = torch.device('cud...
99
31.36
104
16
711
python
[]
0
true
2024-11-19T02:43:27.785738+00:00
1,689,839,489,000
077ce6b43a1778db9e6ba10d142445d42dfd893f
3
{ "blob_id": "077ce6b43a1778db9e6ba10d142445d42dfd893f", "branch_name": "refs/heads/main", "committer_date": 1689839489000, "content_id": "706c42ced550ba13a99d5361a2c0177e675c3173", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "64bf21e9b4ca104557d05dc90a70e9fc3c3544a4", "extension": "py"...
2.5625
stackv2
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2023 all rights reserved # # superclass from .Event import Event # the base class for all containers of configuration events class EventContainer(Event): """ The abstract base class of all containers of configuration events """ ...
57
20.74
75
11
269
python
[]
0
true
2024-11-19T02:43:27.889812+00:00
1,685,736,891,000
17f115b43ba7cba36215ed9627668262d6e60ece
3
{ "blob_id": "17f115b43ba7cba36215ed9627668262d6e60ece", "branch_name": "refs/heads/master", "committer_date": 1685736891000, "content_id": "605f30f808a553b8a37c9093a09b89a71d8b2fb5", "detected_licenses": [ "MIT" ], "directory_id": "f4c38268af585f149db095ffff63c4c357dbb3be", "extension": "py", "fi...
3.265625
stackv2
""" Collection of functions related to reading from local files. """ def read_token(token_file_path): """ Reads the token from the specified file's first line. """ return _read_first_line(token_file_path) def read_admin_id(admin_file_path): """ Reads the bot's admin's ID. """ return i...
25
21.2
60
12
127
python
[]
0
true
2024-11-19T02:43:27.954328+00:00
1,619,489,809,000
cac0d7f4d1733c0942bc108efe555788c171ca0a
2
{ "blob_id": "cac0d7f4d1733c0942bc108efe555788c171ca0a", "branch_name": "refs/heads/master", "committer_date": 1619489809000, "content_id": "8773b956253298dc3e25cf05243806adb0572e29", "detected_licenses": [ "Apache-2.0", "BSD-2-Clause" ], "directory_id": "e5cf5318900c0128140dafc26c8eab750246b21d",...
2.5
stackv2
#!/usr/bin/env python # Convert MSMARCO passage collection import sys import json import argparse import multiprocessing import pytorch_pretrained_bert sys.path.append('.') from scripts.data_convert.text_proc import SpacyTextParser from scripts.data_convert.convert_common import STOPWORD_FILE, BERT_TOK_OPT_HELP, BERT...
92
33.28
104
12
762
python
[]
0
true
2024-11-19T02:43:28.003472+00:00
1,543,355,926,000
717cc6dde07e189a334badd5c8d4367f0f3b69eb
4
{ "blob_id": "717cc6dde07e189a334badd5c8d4367f0f3b69eb", "branch_name": "refs/heads/master", "committer_date": 1543355926000, "content_id": "fa68845aee2968037b7c5bf86bb2a4945538943b", "detected_licenses": [ "MIT" ], "directory_id": "24f1b8b613dbbc4ed37964c7b0e21224f5105d74", "extension": "py", "fi...
4.15625
stackv2
''' objetivo - criar variáveis - usar a função print ''' # text - variável de texto name = 'Gabriela' # numbers - variável numérica age = 22 height = 1.66 # logical - verdeiro ou falso have_python_skills = True like_football = False # print - exibe no console print('name: ' + name) print('age: ' + str(age)) print...
23
17.91
55
8
130
python
[]
0
true
2024-11-19T02:43:28.125828+00:00
1,599,790,209,000
0aa23dfbf9a51fcd26d6803b56ced9e386bc7eab
3
{ "blob_id": "0aa23dfbf9a51fcd26d6803b56ced9e386bc7eab", "branch_name": "refs/heads/master", "committer_date": 1599790209000, "content_id": "cb9609d107356ca181c936746ee7c6e95ceefff9", "detected_licenses": [ "MIT" ], "directory_id": "01cbcc437e0a8310dd779e31954d8930e571b51d", "extension": "py", "fi...
3.140625
stackv2
from django.db import models # A custom Manager class which handles common operations needed when working with tickets stored in the database. class TicketManager(models.Manager): def __init__(self): # On initialization, first call the superclass constructor. super().__init__() # Create f...
118
43.53
120
17
1,094
python
[]
0
true
2024-11-19T02:43:28.319160+00:00
1,616,560,223,000
fc3f812040b79cecc2e80f28e54a4a0018cb6a3c
3
{ "blob_id": "fc3f812040b79cecc2e80f28e54a4a0018cb6a3c", "branch_name": "refs/heads/main", "committer_date": 1616560223000, "content_id": "c9a8593f33f8ceabc51abb110b9018e16a08b2b2", "detected_licenses": [ "Apache-2.0", "BSD-3-Clause", "BSD-2-Clause" ], "directory_id": "d9919eaf5fab3ec5bcaf2294...
2.5625
stackv2
# Attention-based Feature-level Distillation # Copyright (c) 2021-present NAVER Corp. # Apache License v2.0 import torch.nn as nn import torch.nn.functional as F import torch import numpy as np class nn_bn_relu(nn.Module): def __init__(self, nin, nout): super(nn_bn_relu, self).__init__() self.li...
120
35.81
119
19
1,221
python
[]
0
true
2024-11-19T02:43:28.435664+00:00
1,542,886,068,000
a7eb92a0af032f11e8bf179cf8b516c0539a6243
2
{ "blob_id": "a7eb92a0af032f11e8bf179cf8b516c0539a6243", "branch_name": "refs/heads/master", "committer_date": 1542886068000, "content_id": "dd5bccd66e452c1e14a9dadc8f44591800f61f44", "detected_licenses": [ "MIT" ], "directory_id": "6031cecfa3bc7fe82692d4638f17aa1cbfb53fb5", "extension": "py", "fi...
2.390625
stackv2
import csv import datetime import hashlib import json import logging.config import os import sqlite3 import time import tkinter import tkinter.font import CSV.table_transform import PDF.table_transformer import sqlite.export root_logger = logging.getLogger('meeting_parser') logger = logging.getLogger('meeting_parser'...
451
28.6
126
22
3,567
python
[]
0
true
2024-11-19T02:43:28.487112+00:00
1,572,912,205,000
d4321e01be3e2423ae0e47c8de452ee25454d9f3
2
{ "blob_id": "d4321e01be3e2423ae0e47c8de452ee25454d9f3", "branch_name": "refs/heads/master", "committer_date": 1572912205000, "content_id": "2ee38706e0e998a179d4b5eaed0f2984f70ad1a5", "detected_licenses": [ "MIT" ], "directory_id": "b955c769cb3102e04efa8b4dfc88bdd525ec6536", "extension": "py", "fi...
2.390625
stackv2
from brachiograph import BrachioGraph from Pde2jsonInternal import * import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(2, GPIO.OUT) flag = GPIO.PWM(2, 50) flag.start(12.5) # initialize the BrachioGraph bg = BrachioGraph(inner_arm=8, outer_arm=9...
32
19.5
49
12
216
python
[]
0
true
2024-11-19T02:43:29.298551+00:00
1,549,491,037,000
23fec1961a1efccd7415be1376c7003253288370
4
{ "blob_id": "23fec1961a1efccd7415be1376c7003253288370", "branch_name": "refs/heads/master", "committer_date": 1549491037000, "content_id": "b9ee4eb5974000bbd34334ea1df9586fc5666272", "detected_licenses": [ "MIT" ], "directory_id": "2c9f7f0afdf9c563e77006a17f925bd17b25a8b0", "extension": "py", "fi...
4.125
stackv2
#Aprimore o desafio anterior, mostrando no final: #A) A soma de todos os valores pares digitados #B) A soma dos valores da tecerceira coluna #C) O maior dos valores da segunda linha matriz = [[0,0,0], [0,0,0], [0,0,0]] maior = scol = pares = 0 for l in range(0,3): for c in range(0,3): matriz[l][c] = int(input(f'D...
28
24.86
55
14
269
python
[]
0
true
2024-11-19T02:43:29.477988+00:00
1,433,735,193,000
409aa07a4315f42bbcb04be4f0ff98e59cc5d571
3
{ "blob_id": "409aa07a4315f42bbcb04be4f0ff98e59cc5d571", "branch_name": "refs/heads/master", "committer_date": 1433735193000, "content_id": "35a3318591585a613cef462eee22b0dd37f5b1a2", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "162123fd8fac12c5aa36de62465b9b2c28fae0b8", "extension": "p...
2.609375
stackv2
"""Manifest Magics for creating a manifest file asssociated with an IPython notebook. Each of the magics creates an entry in a manifest file in memory, which is executed to build the warehouse. """ __author__ = 'eric' from IPython.core.getipython import get_ipython from IPython.core.magic import ( Magics, m...
262
25.43
80
19
1,457
python
[]
0
true
2024-11-19T02:43:29.535915+00:00
1,381,173,157,000
257ab862b7dcb7c84973376c87da4ddccbb11d28
3
{ "blob_id": "257ab862b7dcb7c84973376c87da4ddccbb11d28", "branch_name": "refs/heads/master", "committer_date": 1381173157000, "content_id": "ca0503c4214b3c399c7343f4f5c679a81e6ac02b", "detected_licenses": [ "MIT" ], "directory_id": "0cef688b1b35920be59b638ecb106a7fef91c884", "extension": "py", "fi...
2.9375
stackv2
# produces the probability distribution as a sum of three independent # pdfs from shapely.geometry import MultiLineString from shapely.geometry import Point from shapely.geometry import LineString import scipy.special as sp import scipy.stats as st import numpy as np from math import * import sphere as sph def rd(x...
126
24.4
73
18
1,172
python
[]
0
true
2024-11-19T02:43:29.592932+00:00
1,517,983,420,000
4bee814fee603a3b7a7301ed888e49afe99245d8
2
{ "blob_id": "4bee814fee603a3b7a7301ed888e49afe99245d8", "branch_name": "refs/heads/master", "committer_date": 1517983420000, "content_id": "9073177677c00b4caadcec35e16a49347da17f79", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f60fcccf0eb022038277cdc96276f745ee9101a9", "extension": "py"...
2.421875
stackv2
# -*- coding: utf-8 -*- """ Created on Fri Feb 2 15:05:45 2018 @author: mayan github: https://github.com/mjthedevil """ import sys import time import telepot from telepot.loop import MessageLoop import os os.chdir('C:/Users/mayan/Desktop/telegrambot') from dictionary import requester, definition, origin_data, relate...
37
26.59
157
16
265
python
[]
0
true
2024-11-19T02:43:29.649961+00:00
1,692,745,568,000
07151dac71769727ec7a9442bc57f7152bac4138
2
{ "blob_id": "07151dac71769727ec7a9442bc57f7152bac4138", "branch_name": "refs/heads/master", "committer_date": 1692745600000, "content_id": "d635fe3cbabdbf115c744438a11d4bd1d130d360", "detected_licenses": [ "BSD-3-Clause", "Apache-2.0" ], "directory_id": "1bb42bac177fb4e979faa441363c27cb636a43aa",...
2.375
stackv2
# Copyright 2020, Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
409
33.01
80
18
3,299
python
[]
0
true
2024-11-19T02:43:29.947379+00:00
1,469,811,826,000
688d5ff18555d74aa4e90fa4218117c7df82f900
2
{ "blob_id": "688d5ff18555d74aa4e90fa4218117c7df82f900", "branch_name": "refs/heads/master", "committer_date": 1473961516000, "content_id": "3985469757d12bb7eab9f073a79a7f32f2fa287f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "aa6fa16d21b8b09fc98226c90d9d692e2d13ab6f", "extension": "py"...
2.359375
stackv2
from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404, render from pidman.pid.models import Target, Pid from pidman.pid.ark_utils import normalize_ark def resolve_purl(request, noid): return resolve_pid(noid) def resolve_ark(request, naan, noid, qual=''): '''Resolve an AR...
69
38.71
117
12
749
python
[]
0
true
2024-11-19T02:43:30.006249+00:00
1,612,184,838,000
fea9c9c8d9ab2287f3ddba2df17519b1dc91f33f
3
{ "blob_id": "fea9c9c8d9ab2287f3ddba2df17519b1dc91f33f", "branch_name": "refs/heads/master", "committer_date": 1612184838000, "content_id": "2772c418ea98a7b0417d3e3ce8cdc10e753f897f", "detected_licenses": [ "MIT" ], "directory_id": "e2e8d2462bcd97fe94b959e8d541f9856b136357", "extension": "py", "fi...
2.515625
stackv2
# status script to identify "offline" or non-responsive behaviour of the producer and consumer. # this allows us to identify issues pretty early. # this script checks the database for the last notification timestamp (= heartbeat) by the producers/consumer. # If a producer/consumer's last heartbeat was too long ago (e....
77
32.96
130
17
704
python
[]
0
true
2024-11-19T02:43:30.134307+00:00
1,625,545,367,000
424a15691590429790a371c134f6f8674c6b96aa
3
{ "blob_id": "424a15691590429790a371c134f6f8674c6b96aa", "branch_name": "refs/heads/main", "committer_date": 1625553033000, "content_id": "af573acb5c3317e4e320aa23a073bb6b25923b6d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2fa7a9f898aaa78213b7250c41896e4f5a58fd93", "extension": "py", ...
2.578125
stackv2
redir_map = { # TF template for %{ for src, dest in domain_mapping } '${src}': '${dest}', # TF template endfor %{ endfor } } def handler(event, lambda_context): request_domain = event['requestContext']['domainName'] # test.example.com request_path = event['requestContext']['path'] # / print(f'Request:...
29
26.48
77
11
192
python
[]
0
true
2024-11-19T02:43:30.184394+00:00
1,582,744,576,000
01712c490559cac369e864a2f43b36895ec2e3c6
3
{ "blob_id": "01712c490559cac369e864a2f43b36895ec2e3c6", "branch_name": "refs/heads/master", "committer_date": 1582744576000, "content_id": "6ad8b17d9d77da3100c9e4aaf05a7593c587b887", "detected_licenses": [ "MIT" ], "directory_id": "84fdb70aa232d6debaca197fd5723c06062971f5", "extension": "py", "fi...
2.625
stackv2
import click from textx.lang import iter_languages @click.command() @click.option('-v', '--verbose', is_flag=True, default=False, help='Print description of each language.') def list_langs(verbose): """ Lists registered textX languages. """ for ep in iter_languages(): desc = "" ...
20
28.2
74
17
124
python
[]
0
true
2024-11-19T02:43:30.390775+00:00
1,621,843,309,000
6f816bc31d9d25a969a71dc01297165b6f5ccc6f
3
{ "blob_id": "6f816bc31d9d25a969a71dc01297165b6f5ccc6f", "branch_name": "refs/heads/main", "committer_date": 1621922858000, "content_id": "e2f5e343f7770b7220efb73ae61043ef3eca7b08", "detected_licenses": [ "MIT", "BSD-3-Clause" ], "directory_id": "3a6a211ea0d32405497fbd6486c490bb147e25f9", "exten...
2.859375
stackv2
from collections import MutableMapping from webob.compat import ( iteritems_, string_types, ) from webob.multidict import MultiDict __all__ = ['ResponseHeaders', 'EnvironHeaders'] class ResponseHeaders(MultiDict): """ Dictionary view on the response headerlist. Keys are normalized for ...
158
25.88
70
17
1,019
python
[]
0
true
2024-11-19T02:43:30.498148+00:00
1,564,492,103,000
63fa7589e98e982bc37d5330359f8ba7c9928a09
2
{ "blob_id": "63fa7589e98e982bc37d5330359f8ba7c9928a09", "branch_name": "refs/heads/master", "committer_date": 1564492103000, "content_id": "4e9bdad57d8442de71ab1e45bf3ce6655708da9d", "detected_licenses": [ "MIT" ], "directory_id": "726ff9baca48a7db3b36ab27fc25de1ed10d5bb9", "extension": "py", "fi...
2.453125
stackv2
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bastiaan Veelo # Copyright (c) 2016-2018 Bastiaan Veelo # # License: MIT # """This module exports the Epcomp plugin class.""" from SublimeLinter.lint import Linter, util import re import logging logger = logging.g...
96
27.06
79
13
686
python
[{"finding_id": "codeql_py/overly-large-range_f62f7b85a1ae36a0_56299565", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A...
1
true
2024-11-19T02:43:31.085648+00:00
1,573,852,915,000
ed9029a2fd55effe1bcfe0f28b90ddc7a89fcca9
4
{ "blob_id": "ed9029a2fd55effe1bcfe0f28b90ddc7a89fcca9", "branch_name": "refs/heads/master", "committer_date": 1573852915000, "content_id": "e0e4c772abe42315caef1479f4a8adb05e82068e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "467c9a080ff8a6cb71e78d1378ce1b23a23848fe", "extension": "py"...
3.9375
stackv2
# Description # 中文 # English # Given two strings, write a method to decide if one is a permutation of the other. # Have you met this question in a real interview? # Example # Example 1: # Input: "abcd", "bcad" # Output: True # Example 2: # Input: "aac", "abc" # Output: False class Solution: """ @pa...
28
18.54
83
12
159
python
[]
0
true
2024-11-19T02:43:31.322600+00:00
1,555,556,279,000
2860a14205c889eca6c8391ca9872ffe6cf4c676
3
{ "blob_id": "2860a14205c889eca6c8391ca9872ffe6cf4c676", "branch_name": "refs/heads/master", "committer_date": 1555556279000, "content_id": "d85da04b8d1e52d25430976c3c46a2144ff0a9c7", "detected_licenses": [ "MIT" ], "directory_id": "70404aa01adadae8b28a518c1a139215a9d46894", "extension": "py", "fi...
3.1875
stackv2
import pyperclip as pc from nutshell import text print(text.intro) def meme(): counter = 1 user_input = input("What would you like put in a nutshell? ") input_split = list(user_input.lower()) split_string = [] for i in input_split: if counter % 2 != 0: split_string.append(i) ...
56
23.05
65
16
314
python
[]
0
true
2024-11-19T02:43:31.449985+00:00
1,518,105,479,000
0887f605e68e0de4a39195c4722d1270a1fd7076
3
{ "blob_id": "0887f605e68e0de4a39195c4722d1270a1fd7076", "branch_name": "refs/heads/master", "committer_date": 1518105479000, "content_id": "f6f0a0a3b9bc0d8323efb49f1390740df851ce2f", "detected_licenses": [ "MIT" ], "directory_id": "584d886a7029a8ab3daf7e88a79e8dace2c08827", "extension": "py", "fi...
2.65625
stackv2
""" stategy --------- stategy template """ # Use future imports for python 3.0 forward compatibility from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import # Other imports import pandas as pd import numpy as np import matplo...
171
31.95
98
18
1,408
python
[]
0
true
2024-11-19T02:43:31.624498+00:00
1,580,132,573,000
e91735efe349d90068a165adf7c758f73aba81ca
3
{ "blob_id": "e91735efe349d90068a165adf7c758f73aba81ca", "branch_name": "refs/heads/master", "committer_date": 1580132573000, "content_id": "ad1329fe0889b2c2d07bae20fca586d61f47721f", "detected_licenses": [ "MIT" ], "directory_id": "470b3d063ec639200de58acd24c6b50466315ece", "extension": "py", "fi...
3.234375
stackv2
import numpy as np from SDAWithVectorField import VectorMath from SDAWithVectorField import Constants class WaypointHolder(object): def __init__(self, waypoints): self.waypoints = waypoints self.waypoint_index = 0 def add_waypoint(self, waypoint): if self.waypoints.size == 0: ...
54
31.26
140
15
368
python
[]
0
true
2024-11-19T02:43:31.788144+00:00
1,685,266,332,000
5d6d0b3456887f86566d4798f7fddc66167939e3
4
{ "blob_id": "5d6d0b3456887f86566d4798f7fddc66167939e3", "branch_name": "refs/heads/master", "committer_date": 1685266332000, "content_id": "88692211122d597bf277de99ac223aa3c97646da", "detected_licenses": [ "MIT" ], "directory_id": "c1267fbec95318184e7388cddf9b7085f797d514", "extension": "py", "fi...
4.15625
stackv2
# This problem was recently asked by Uber: # Given a linked list, determine if the linked list has a cycle in it. # For notation purposes, we use an integer pos which represents the zero-indexed position where the tail connects to. class ListNode(object): def __init__(self, x): self.val = x self...
39
20.97
117
11
214
python
[]
0
true
2024-11-19T02:43:31.852910+00:00
1,635,501,307,000
1687d1e09aa2674d45954a72307a986a165f5700
3
{ "blob_id": "1687d1e09aa2674d45954a72307a986a165f5700", "branch_name": "refs/heads/master", "committer_date": 1635501307000, "content_id": "bed8ff8a5902f818e68aa8ef11e3ae7c65207f3a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "01af8f1ce470ee7320a0c72e82fe95b22db95860", "extension": "py"...
3.4375
stackv2
""" EDA and Feature Engineering in Jupyter Notebook and Modeling in a Flyte Task ============================================================================ In this example, we will implement a simple pipeline that takes hyperparameters, does EDA, feature engineering (step 1: EDA and feature engineering in notebook)...
107
31.86
137
14
849
python
[]
0
true
2024-11-19T02:43:31.893669+00:00
1,525,334,572,000
33192f67f5fa108c1ce7f0bc0a68e4da18ef62ca
2
{ "blob_id": "33192f67f5fa108c1ce7f0bc0a68e4da18ef62ca", "branch_name": "refs/heads/master", "committer_date": 1525334572000, "content_id": "b902448540c64d66b7a2298c23588d6b200d5fd2", "detected_licenses": [ "MIT" ], "directory_id": "c5eabb1272a90a063eefb191be781bebb7d28786", "extension": "py", "fi...
2.34375
stackv2
# coding: utf-8 # Distributed under the terms of the MIT License. from .model import AppModel from ababe.stru.scaffold import ModifiedCell from ababe.stru.element import Specie from ababe.io.io import GeneralIO import os import numpy as np class App(AppModel): def __init__(self, infile, radius): gcell = ...
32
25.69
69
14
209
python
[]
0
true
2024-11-19T02:43:31.944983+00:00
1,508,220,921,000
15cc54cc83076e2abd249c01a10a35dfea7af44f
3
{ "blob_id": "15cc54cc83076e2abd249c01a10a35dfea7af44f", "branch_name": "refs/heads/master", "committer_date": 1508220921000, "content_id": "a550d54bbe663187c4cc6c9105eacca88cc4b6cd", "detected_licenses": [ "MIT" ], "directory_id": "205c1bd0e473f0e9aa31db1256aec5d1f5a233d4", "extension": "py", "fi...
2.890625
stackv2
#!/usr/bin/env python '''code description''' # pylint: disable = I0011, E0401, C0103, C0321 class Solution(object): '''Solution description''' def func(self, N): '''Solution function description''' if N == 0: return [] if N == 1: return [1] if N == 2: return [[1, 2], [2, 1]] ...
31
28.39
80
17
270
python
[]
0
true
2024-11-19T02:43:32.002769+00:00
1,549,618,101,000
62cbb8b2a3171f8da69940b07ab689f31ff8290f
3
{ "blob_id": "62cbb8b2a3171f8da69940b07ab689f31ff8290f", "branch_name": "refs/heads/master", "committer_date": 1549618101000, "content_id": "92b3a53b27ee97833c6320715866ea92042b68f6", "detected_licenses": [ "MIT", "Unlicense" ], "directory_id": "736dbb72bf425adda2c3d7181fc07997e34d2aa9", "extens...
2.625
stackv2
""" aiohttp asynchronous Bsoch RCP+ client For dome camera PTZ handling """ # pylint: disable=line-too-long import logging import asyncio import aiohttp class RcpException(Exception): """ Base class for all errors while communicating with RCP protocol """ pass class RcpHttpException(RcpExceptio...
277
37.23
149
17
2,640
python
[]
0
true
2024-11-19T02:43:32.340533+00:00
1,622,481,233,000
06151d447faddd036c4e2e8ab6489453ec6e16fc
3
{ "blob_id": "06151d447faddd036c4e2e8ab6489453ec6e16fc", "branch_name": "refs/heads/master", "committer_date": 1622481233000, "content_id": "22bb855b31d5cd5d1ea843703c4a2053135bc2d8", "detected_licenses": [ "MIT" ], "directory_id": "0341f6d22d598bcf43856b75d96756135b3cdffb", "extension": "py", "fi...
3.328125
stackv2
""" Program to brute-force attack an computer through ssh. From: https://null-byte.wonderhowto.com/how-to/sploit-make-ssh-brute-forcer-python-0161689/ """ import paramiko import sys import os import socket import logging DEFAULT_SSH_PORT = 22 LINE = "\n------------------------------------\n" INPUT_HOST = "[*] Ente...
119
26.19
91
18
678
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_cdfb6c202cd252a9_c5617425", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
4
true
2024-11-19T02:43:32.461869+00:00
1,660,187,902,000
894d650d244a66bec73b1b427cd34a07971e7490
4
{ "blob_id": "894d650d244a66bec73b1b427cd34a07971e7490", "branch_name": "refs/heads/master", "committer_date": 1660187902000, "content_id": "99e694faf964e6dc8ad0793c60fc06f6246a2ec3", "detected_licenses": [ "MIT" ], "directory_id": "8afb5afd38548c631f6f9536846039ef6cb297b9", "extension": "py", "fi...
3.75
stackv2
def power(a: int, n: int, r: int = None): """ Iterative version of binary exponentiation Calculate a ^ n if r is specified, return the result modulo r Time Complexity : O(log(n)) Space Complexity : O(1) """ ans = 1 while n: if n & 1: ans = ans * a ...
45
19.04
49
12
261
python
[]
0
true
2024-11-19T02:43:32.613504+00:00
1,680,052,460,000
b6fdf6ec99a8f35ac6477e8df7840b46e1a634bc
3
{ "blob_id": "b6fdf6ec99a8f35ac6477e8df7840b46e1a634bc", "branch_name": "refs/heads/master", "committer_date": 1680052547000, "content_id": "ad7cb46f70f375168d148a4c72727ce2793eb0d7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3bddb2814881bb5e4679de3d31ac0bde57b86148", "extension": "py"...
2.921875
stackv2
# coding=utf-8 # Copyright 2022 The Trax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
67
35.55
79
11
595
python
[]
0
true
2024-11-19T02:43:32.686065+00:00
1,339,616,780,000
ba401091747c5ec69c997aa6d9056a0018b9dfa2
3
{ "blob_id": "ba401091747c5ec69c997aa6d9056a0018b9dfa2", "branch_name": "refs/heads/master", "committer_date": 1339625761000, "content_id": "c396a5a6a76689456b6fe87d219a9fc1edb68bb7", "detected_licenses": [ "MIT" ], "directory_id": "a1dc46106d7313ff343e3058af71bd1a8fec0684", "extension": "py", "fi...
2.515625
stackv2
from __future__ import absolute_import from functools import wraps from time import time from .base import Manager, Metric class RecordManager(Manager): def add(self, key, value): self.storage.record(key, value) def __call__(self, key): def inner_timer(f): @wraps(f) ...
74
20.26
58
17
336
python
[]
0
true
2024-11-19T02:43:32.762539+00:00
1,614,575,211,000
d231aa317ab77030fb4a4e2298e5c361116502bb
4
{ "blob_id": "d231aa317ab77030fb4a4e2298e5c361116502bb", "branch_name": "refs/heads/master", "committer_date": 1614575211000, "content_id": "ffc94320e104a86eea7267a5e9e1a31271a91d0c", "detected_licenses": [ "MIT" ], "directory_id": "8e71ec018ab6a3f61583593ea6bbca77d4307af2", "extension": "py", "fi...
3.734375
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division, with_statement import math def shortness(name): """ Return a 0-1 score representing how short this name is. We penalize anything that has many letters or many syllables. """ score = 1 syllables = name.metaphones[0].coun...
94
35.19
78
17
925
python
[]
0
true
2024-11-19T02:43:32.925731+00:00
1,563,193,713,000
6f04c3f9bfab84aa4ce6f628a61e56c33cd90903
2
{ "blob_id": "6f04c3f9bfab84aa4ce6f628a61e56c33cd90903", "branch_name": "refs/heads/master", "committer_date": 1563193713000, "content_id": "8700600c4007aa23c8eb89e6f20f8383122229a1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a8402d1f085b7713c739da257dc7e81b65092be8", "extension": "py"...
2.4375
stackv2
import pandas as pd from sklearn.model_selection import train_test_split FEATURES = ["lepton_pT", "lepton_eta", "lepton phi", "missing_energy_magnitude", "missing_energy_phi", "jet_1_pt", "jet_1_eta", "jet_1_phi", "jet_1_btag", "jet_2_pt", "jet_2_eta", "jet_2_phi", "jet_...
19
47.05
79
12
263
python
[]
0
true
2024-11-19T02:43:33.029203+00:00
1,568,059,473,000
b5febd5972d8fc369e4e6a97fca14c0a8e93882b
3
{ "blob_id": "b5febd5972d8fc369e4e6a97fca14c0a8e93882b", "branch_name": "refs/heads/master", "committer_date": 1568059473000, "content_id": "148e85f805b686e9fe14aa40f9ea0c1de3f42a06", "detected_licenses": [ "MIT" ], "directory_id": "a23a4d61179411ba16dd5d81f92912ab27771ad7", "extension": "py", "fi...
3.34375
stackv2
import numpy as np import pickle class Agent: """ Базовые класс для взаимодействия с игрой """ def __init__(self, size: tuple = (3, 3), *args): self.size = size self.len = size[0] * size[1] def action(self, state: tuple): """ Выполнить действие при данном состоянии """ pas...
134
32.11
131
20
1,175
python
[]
0
true
2024-11-19T02:43:33.086644+00:00
1,543,072,285,000
48c375732e2ab47bd2a5bef2c5345e55a5c90bd3
3
{ "blob_id": "48c375732e2ab47bd2a5bef2c5345e55a5c90bd3", "branch_name": "refs/heads/master", "committer_date": 1543072285000, "content_id": "6dddb37ff4ce1a6a0740e0798f2ea0ee349f907e", "detected_licenses": [ "MIT" ], "directory_id": "9d9b981c7f854f01f892acd7d996538fc1bd616b", "extension": "py", "fi...
2.875
stackv2
import inspect from .syntax import get_syntax_for_scope from .encodings import to_sublime __all__ = ['new_view', 'close_view'] def new_view(window, **kwargs): """Open a new view in the given `window`, returning the :class:`~sublime.View` object. This function takes many optional keyword arguments: :a...
121
28.13
95
14
787
python
[]
0
true
2024-11-19T02:43:33.139179+00:00
1,615,741,237,000
ebed4de1b43e343ab467622ddd3f28ba07c01cf3
2
{ "blob_id": "ebed4de1b43e343ab467622ddd3f28ba07c01cf3", "branch_name": "refs/heads/main", "committer_date": 1615741237000, "content_id": "df9cd6702762e3c43d555007bed173cd9d288be1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "09d44d959a474c55feea0d5560f505db4daa059b", "extension": "py", ...
2.328125
stackv2
import copy import datetime import logging from functools import wraps from typing import Any from typing import Callable from typing import Dict from typing import List from typing import Optional from typing import Set from typing import Union import boto3 from botocore.exceptions import ClientError as BotoClientErr...
421
30.01
116
18
2,910
python
[]
0
true
2024-11-19T02:43:33.329167+00:00
1,606,828,502,000
c38d0af385bd1781ce725bd05eb989cb878f613f
2
{ "blob_id": "c38d0af385bd1781ce725bd05eb989cb878f613f", "branch_name": "refs/heads/master", "committer_date": 1606828502000, "content_id": "4c2b74aa18250b66dbe8f175999f942d8970d697", "detected_licenses": [ "MIT" ], "directory_id": "1dd15f09305104fdee1bbf30cadbdf25ae2c763e", "extension": "py", "fi...
2.421875
stackv2
import tensorflow as tf import numpy as np import cv2 import time def compute_accuracy(v_xs, v_ys): global prediction start = time.clock() y_pre = sess.run(prediction, feed_dict={xs: v_xs}) print('------', time.clock()-start, '------') correct_prediction = tf.equal(tf.argmax(y_pre, 1), tf.argmax(v...
101
30.49
87
13
1,043
python
[]
0
true
2024-11-19T02:43:33.752792+00:00
1,625,899,637,000
f188f6a373eaf699d7fb0f1761237ee48b613e1e
3
{ "blob_id": "f188f6a373eaf699d7fb0f1761237ee48b613e1e", "branch_name": "refs/heads/master", "committer_date": 1625899637000, "content_id": "6d0b2b72433763655e4bbfb1e9c9eeb1c545efe2", "detected_licenses": [ "MIT" ], "directory_id": "cbe264842df4eae3569b28ed4aae9489014ed23c", "extension": "py", "fi...
2.8125
stackv2
# backie/worker.py import json class Worker: """ Example Usage: task = AdderTask() worker = Worker(task=task) worker.start() """ def __init__(self, task) -> None: self.task = task def start(self,): while True: try: _dequeued_item...
29
29.48
89
17
187
python
[]
0
true
2024-11-19T02:43:33.921270+00:00
1,541,039,046,000
489835f6d3b64932e119f9e5251823cfbcf2755d
4
{ "blob_id": "489835f6d3b64932e119f9e5251823cfbcf2755d", "branch_name": "refs/heads/master", "committer_date": 1541039046000, "content_id": "67b6c9bdb6f5bccce7f763652a39b16d074f7a21", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0129462c821a7bebef6868a55f2db506fbd23ab6", "extension": "py"...
4.28125
stackv2
""" Sum square difference The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^2 = 55^2 = 3025 Hence the difference between the sum of the squares of the first ten natural numbers and the square of the s...
36
22.19
132
9
280
python
[]
0
true
2024-11-19T02:43:33.971638+00:00
1,635,512,884,000
c55192afb0c043c435ac273ad7a9a930a7f70dc4
3
{ "blob_id": "c55192afb0c043c435ac273ad7a9a930a7f70dc4", "branch_name": "refs/heads/main", "committer_date": 1635512884000, "content_id": "b6a9c2cb5634f96139709941bedb713ccf69cac2", "detected_licenses": [ "MIT" ], "directory_id": "b6c68ac5f627621f80c42bcb6e5e8598341b834f", "extension": "py", "file...
2.9375
stackv2
""" TODO: Fill this """ from pathlib import Path import random from wellcomeml.utils import throw_extra_import_message required_modules = 'spacy' required_extras = 'spacy' try: from spacy.training import Example from spacy.util import minibatch, compounding import spacy from spacy.kb import Knowledge...
152
32.75
98
19
1,127
python
[]
0
true
2024-11-19T02:43:34.144686+00:00
1,462,828,848,000
ad0c3da155f169a1c7ff08bc8539025f21d712df
3
{ "blob_id": "ad0c3da155f169a1c7ff08bc8539025f21d712df", "branch_name": "refs/heads/master", "committer_date": 1462828848000, "content_id": "bc603eb2dd67c00acd647d920ffb7a550d9c5642", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b63d80dd62306a71aba3c38882fd50f7e0999d8f", "extension": "py"...
3.109375
stackv2
""" Example to demonstrate the kinematics classes >>> abs(main()-27670)<1 True """ from firefish.kinematics import ( KinematicBody, KinematicSimulation) class CylinderRocket(KinematicBody): """A rocket that is a cylinder with evenly distributed mass""" def update_moi(self): radius = 0.3 ...
50
24.18
67
13
385
python
[]
0
true
2024-11-19T02:43:34.198592+00:00
1,542,931,938,000
314d224543b6400ae5a11a548232554d26b01eac
3
{ "blob_id": "314d224543b6400ae5a11a548232554d26b01eac", "branch_name": "refs/heads/master", "committer_date": 1542931938000, "content_id": "51d50d158adc37afadefc625d2973aa5c129a776", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "5dac5bc3d39d40394a7644af4801a629d2f46726", "extension": "p...
2.84375
stackv2
#!/usr/bin/env python import fnmatch import json import os import platform import shutil import vim __version__ == '2.0.0' class Config(object): """ Object representing a [.]projsync.json file (local or global). Example: .. code-block:: json { "Work Stuff": { ...
287
28.44
83
17
1,790
python
[]
0
true
2024-11-19T02:43:34.256705+00:00
1,471,338,413,000
e2a250d0397f4ce349ee8577a1a90388090d82d5
3
{ "blob_id": "e2a250d0397f4ce349ee8577a1a90388090d82d5", "branch_name": "refs/heads/master", "committer_date": 1471338413000, "content_id": "688314fc2d20c7d53caef1622726d995387ef8b5", "detected_licenses": [ "MIT" ], "directory_id": "83ed3298f5d24d0af5aff4f3827b555642e4787f", "extension": "py", "fi...
2.84375
stackv2
import operator f = open("D-small-attempt0.in", "r") g = open("clash.out", "w") if __name__ == '__main__': test_cases = int(f.readline()) for t in range(test_cases): coins_left, num_cards = f.readline().split(" ") coins_left = int(coins_left) max_levels = [] curr_levels = [] attack_levels = [] coins_req =...
64
24.33
92
18
498
python
[]
0
true
2024-11-19T02:43:34.312351+00:00
1,550,350,807,000
80c4518ebbd29eb97afc1746de1d06203766f978
3
{ "blob_id": "80c4518ebbd29eb97afc1746de1d06203766f978", "branch_name": "refs/heads/master", "committer_date": 1550350807000, "content_id": "d5ad38c37f99415a3da7887d5530493314b56a56", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8d0eeb5c1772545cea992fbb7df6f4f8838e6688", "extension": "py"...
3.140625
stackv2
""" createNumpyArrayWithCasing returns the X-Matrix for the word embeddings as well as for the case information and the Y-vector with the labels @author: Nils Reimers """ import numpy as np from GermEvalReader import normalizeWord def createNumpyArrayWithCasing(sentences, windowsize, word2Idx, label2Idx, caseLookup): ...
76
33.54
107
18
564
python
[]
0
true
2024-11-19T02:43:34.573475+00:00
1,521,457,745,000
b756ce50ac8138a464d2ac13650097c61ba7f73c
3
{ "blob_id": "b756ce50ac8138a464d2ac13650097c61ba7f73c", "branch_name": "refs/heads/master", "committer_date": 1521457745000, "content_id": "89dc6b928bf3d3a9cfff84b8e71a561cbe34af37", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d0892fbb005e5aa73076aaf822aeebca165289ae", "extension": "py"...
2.875
stackv2
""" Base classes for biomolecules """ import numpy as np from ..templates.aminoacids import templates_aa, one_to_three_aa from ..templates.glycans import templates_gl, one_to_three_gl from ..ff import compute_neighbors, LJ from ..pdbIO import _dump_pdb from ..visualization.view3d import _view3d class Biomolecule(...
117
27.45
80
15
724
python
[]
0
true