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.34 | source stringclasses 1
value | text stringlengths 259 23.5k | num_lines int64 16 648 | avg_line_length float64 15 60.9 | 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 276k | sast_codeql_findings_count int64 0 33 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T18:05:43.388874+00:00 | 1,567,036,262,000 | 912041d1cee909d29a9b46991268ac30470556ff | 3 | {
"blob_id": "912041d1cee909d29a9b46991268ac30470556ff",
"branch_name": "refs/heads/master",
"committer_date": 1567036262000,
"content_id": "c6d2536833fc35c3e025cd9d5cea56298f7fe360",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ca5fc43049f94a794d90a561fd8126f02b603599",
"extension": "p... | 2.5625 | stackv2 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2016-2017 by I3py 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.
# ----------------... | 90 | 28.24 | 79 | 16 | 535 | python | [] | 0 | true | |
2024-11-18T18:05:43.651051+00:00 | 1,515,988,614,000 | 3c76f351fc6cfd2597b6e8471e52ac18606ae091 | 2 | {
"blob_id": "3c76f351fc6cfd2597b6e8471e52ac18606ae091",
"branch_name": "refs/heads/master",
"committer_date": 1515988614000,
"content_id": "472cbf590142d1d67a62dfdc14e3622b830d60a2",
"detected_licenses": [
"MIT"
],
"directory_id": "ef5bec8d5d6875b3124b87ab799141377b969ffe",
"extension": "py",
"fi... | 2.328125 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
class Item(models.Model):
'''
An item for loan
'''
item_type = models.CharField(max_length=30, blank=False)
location = models.CharField(max_length=30, blank=Fals... | 34 | 39.44 | 102 | 10 | 300 | python | [] | 0 | true | |
2024-11-18T18:05:43.726888+00:00 | 1,610,109,030,000 | ee5c70ca3ae2e11037aba30e5e217e520133016b | 3 | {
"blob_id": "ee5c70ca3ae2e11037aba30e5e217e520133016b",
"branch_name": "refs/heads/master",
"committer_date": 1610109030000,
"content_id": "c7214a1d9e46a6d41202bffcb1bb62dea93f5df0",
"detected_licenses": [
"Apache-2.0",
"Python-2.0"
],
"directory_id": "e75e87f4114edf2e769e1502134a4f866f28ca78",
... | 2.796875 | stackv2 | from .base import BaseAPI
from ..metadata import CurveType
from ..parser.timeseries import parse_timeseries
# Tuple of supported values for Curve.curve_type in the time series API
CURVE_TYPES = (CurveType.TIMESERIES, CurveType.SCENARIO_TIMESERIES)
class TimeseriesAPI(BaseAPI):
"""
Time series API operations... | 66 | 38.68 | 88 | 12 | 595 | python | [] | 0 | true | |
2024-11-18T18:05:43.895243+00:00 | 1,619,674,139,000 | c814a34864a4158acf4e1abbbb583376f3efad66 | 3 | {
"blob_id": "c814a34864a4158acf4e1abbbb583376f3efad66",
"branch_name": "refs/heads/master",
"committer_date": 1619674139000,
"content_id": "8b45c9393b96c8f7482a7754a3078e8eb2a7bbc4",
"detected_licenses": [
"MIT"
],
"directory_id": "4790aa158050f52b2f0fa990467774c5276b4bc8",
"extension": "py",
"fi... | 2.640625 | stackv2 | import numpy as np
import torch
import torch.nn.functional as F
def sample_gumbel(shape, eps=1e-10):
"""
NOTE: Stolen from https://github.com/YongfeiYan/Gumbel_Softmax_VAE/blob/master/gumbel_softmax_vae.py
Sample from Gumbel(0, 1)
based on
https://github.com/ericjang/gumbel-softmax/blob/3c858492... | 201 | 30.78 | 118 | 16 | 1,799 | python | [] | 0 | true | |
2024-11-18T18:05:44.180405+00:00 | 1,487,096,748,000 | f66444c9b20297e96d451b5216019f2f5e1608a2 | 3 | {
"blob_id": "f66444c9b20297e96d451b5216019f2f5e1608a2",
"branch_name": "refs/heads/master",
"committer_date": 1487096748000,
"content_id": "8d9ac11787edbcb15bd3b63115a95a1be7e3836b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "1ef0b40be50ab0094b8bdf493dddbc1b2e8935cb",
"extension": "p... | 3.046875 | stackv2 | #!/usr/bin/env python3
"""This example shows how to use the Thermo3 Click wrapper of the LetMeCreate
library.
It reads the temperature from the sensor and exits.
The Thermo3 Click must be inserted in Mikrobus 1 before running this program.
"""
from letmecreate.core import i2c
from letmecreate.core.common import MI... | 27 | 20.67 | 77 | 9 | 164 | python | [] | 0 | true | |
2024-11-18T18:05:44.243598+00:00 | 1,616,379,521,000 | e499f5a96555c30d62ba84e6a2a828f038b81458 | 4 | {
"blob_id": "e499f5a96555c30d62ba84e6a2a828f038b81458",
"branch_name": "refs/heads/master",
"committer_date": 1616379521000,
"content_id": "fd1fd060ee4d78f53d8ddd4c089fe6243cc28c26",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ec93898c4792f3eb920eaa0159cced2cc6d5274d",
"extension": "p... | 3.703125 | stackv2 | # shuffle file and rename
import os
from random import shuffle
# Function to rename multiple files
def main():
num = []
for count in range(200):
if count < 10:
dst = "00" + str(count) + ".jpg"
num.append(dst)
elif count < 100 and count > 9:
dst = "0" ... | 31 | 25.06 | 61 | 15 | 205 | python | [] | 0 | true | |
2024-11-18T18:05:44.308384+00:00 | 1,578,981,575,000 | 8d0411d1a3851550c8d731400213ff48f1c3b0c7 | 2 | {
"blob_id": "8d0411d1a3851550c8d731400213ff48f1c3b0c7",
"branch_name": "refs/heads/master",
"committer_date": 1578981575000,
"content_id": "e86b6be15675ecfb59b4c74485893d83221a5f43",
"detected_licenses": [
"MIT"
],
"directory_id": "8142e588999503979e1cd9d1989cdd43dc9417d6",
"extension": "py",
"fi... | 2.390625 | stackv2 | from evkit.models.taskonomy_network import TaskonomyDecoder
from tlkit.utils import SINGLE_IMAGE_TASKS, TASKS_TO_CHANNELS, FEED_FORWARD_TASKS
import torch
import torch.nn.functional as F
def softmax_cross_entropy(inputs, target, weight=None, cache={}, size_average=None, ignore_index=-100,
reduce=None... | 235 | 47.47 | 151 | 20 | 2,680 | python | [] | 0 | true | |
2024-11-18T18:05:44.364393+00:00 | 1,611,199,867,000 | ee5b19626616ec7568a5cb774bc5a76529f3c51e | 3 | {
"blob_id": "ee5b19626616ec7568a5cb774bc5a76529f3c51e",
"branch_name": "refs/heads/main",
"committer_date": 1611199867000,
"content_id": "18f2c7b9a15197f4a4144413fbc6b994a8d3c99f",
"detected_licenses": [
"MIT"
],
"directory_id": "6803e1834d76c7a9c1fd2484bbfb438615c341a2",
"extension": "py",
"file... | 2.921875 | stackv2 | from more_itertools import split_at
grps = split_at(map(str.rstrip, open('d22.txt')), pred=lambda e: e == '')
grps = list(grps)
grp1 = list(map(int, grps[0][1:]))
grp2 = list(map(int, grps[1][1:]))
FIRST_DECK_WON = 0
SECOND_DECK_WON = 1
old_print=print
print=lambda *args: None
def match(grp1, grp2, depth=0):
memo... | 61 | 34.2 | 87 | 17 | 668 | python | [] | 0 | true | |
2024-11-18T18:05:44.494368+00:00 | 1,636,657,919,000 | fa744d53462754fe0a60b43129fa4253a93b8640 | 2 | {
"blob_id": "fa744d53462754fe0a60b43129fa4253a93b8640",
"branch_name": "refs/heads/main",
"committer_date": 1636657919000,
"content_id": "0e1e3551fdc51aeacbd45c453caf0fe56abd7d37",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d29ad540b82d834509697f65b98ccd54514bb51d",
"extension": "py",
... | 2.453125 | stackv2 | #!/usr/local/bin/python
# -*- coding:utf-8 -*-
import os
import logging
import time
import atexit
import json
import random
from threading import Timer
import paho.mqtt.client as mqtt
logging.basicConfig(level=logging.INFO)
bpmThreshold = int(os.getenv("BPM_THRESHOLD", "80"))
mqttRetryPeriod = int(os.getenv("MQTT_RET... | 94 | 24.07 | 85 | 18 | 526 | python | [] | 0 | true | |
2024-11-18T18:05:44.612828+00:00 | 1,692,088,231,000 | ea424e926ccd447792ed52f737b5a7a6c624043a | 2 | {
"blob_id": "ea424e926ccd447792ed52f737b5a7a6c624043a",
"branch_name": "refs/heads/master",
"committer_date": 1692088231000,
"content_id": "4a7bb7a8e088e4cbe8723325ef44f7da19e4de8b",
"detected_licenses": [
"MIT"
],
"directory_id": "586c97e81b448d9f4c1525205eaccc727f789ee7",
"extension": "py",
"fi... | 2.328125 | stackv2 | "Bit of a floating module, I guess to avoid circular dependencies. Needs to be reconciled somehow."
from . import bluegreen, bluegreen_v2, context_handler, cloudformation
def concurrency_for(stackname, concurrency_name):
"""concurrency default is to perform updates one machine at a time.
Concurrency can be:
... | 31 | 35.45 | 117 | 14 | 245 | python | [] | 0 | true | |
2024-11-18T18:05:45.004802+00:00 | 1,553,968,313,000 | 3d4e3f0ca608cdd90cf10c1b9ff48162f1894a9c | 3 | {
"blob_id": "3d4e3f0ca608cdd90cf10c1b9ff48162f1894a9c",
"branch_name": "refs/heads/master",
"committer_date": 1553968313000,
"content_id": "a401326a18810b96c3f274a9ca12b3d5b36fbe8f",
"detected_licenses": [
"MIT"
],
"directory_id": "8f501d223fa7942a7994cd5b7788626386bbe1ea",
"extension": "py",
"fi... | 2.765625 | stackv2 | # source: https://github.com/django/django/blob/master/django/utils/crypto.py
"""
Django's standard crypto functions and utilities.
"""
import hashlib
import hmac
import random
import time
from .encoding import force_bytes
# Use the system PRNG if possible
try:
random = random.SystemRandom()
using_sysrandom ... | 51 | 31.86 | 80 | 11 | 389 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_5c97c29f46b37af3_d1c117d7", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecu... | 1 | true | |
2024-11-18T18:05:45.157547+00:00 | 1,430,934,893,000 | 9936379ea8ae076b9b0c4ce5b322d8a12497e38a | 2 | {
"blob_id": "9936379ea8ae076b9b0c4ce5b322d8a12497e38a",
"branch_name": "refs/heads/master",
"committer_date": 1431212320000,
"content_id": "92a5167070c5a64bd70518f188bd927997a14043",
"detected_licenses": [
"MIT"
],
"directory_id": "7492f373430262e8ba95c4cc52517ed23107dc67",
"extension": "py",
"fi... | 2.359375 | stackv2 | from formatter import Formatter
from textwrap import dedent
from socket import AF_INET, AF_INET6, inet_pton, error as socket_error
def try_inet_pton(af, ip):
try:
inet_pton(af, ip)
return True
except socket_error:
return False
class _DNSFormatter(Formatter):
filters = {
... | 139 | 29.15 | 85 | 20 | 851 | python | [] | 0 | true | |
2024-11-18T18:05:45.216591+00:00 | 1,520,583,750,000 | 7b396ee7a42a3d6d13a2ce05911851c1a7280a99 | 2 | {
"blob_id": "7b396ee7a42a3d6d13a2ce05911851c1a7280a99",
"branch_name": "refs/heads/master",
"committer_date": 1520587886000,
"content_id": "834c4ebd683a9b3093dc1ad00ad760381f8f8b35",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "16a223d5cb6a96e1b6a9aa84636670fa7ddf7fda",
"extension": "py"... | 2.453125 | stackv2 | # -*- coding: utf-8 -*-
"""
CRUD operation for environment model
"""
from DB.api import database
from DB import exception
from DB.models import Environment
from DB.api import dbutils as utils
RESP_FIELDS = ['id', 'resource', 'resource_id', 'temperature', 'humidity', 'pressure', 'uv_index', 'created_at']
SRC_EXISTED_F... | 58 | 34.57 | 112 | 13 | 463 | python | [] | 0 | true | |
2024-11-18T18:05:45.285112+00:00 | 1,656,655,324,000 | a1276ef6fdb8b15fbc036f607af938a8167a8e55 | 2 | {
"blob_id": "a1276ef6fdb8b15fbc036f607af938a8167a8e55",
"branch_name": "refs/heads/master",
"committer_date": 1656655324000,
"content_id": "3a1c19d1fff76ffb23b49e8d8e650ef5b7d3353f",
"detected_licenses": [
"MIT"
],
"directory_id": "17887c1493c24e232de6ed65f4a7a1a715dad5de",
"extension": "py",
"fi... | 2.390625 | stackv2 | " Userman: User handlers. "
import json
import logging
import tornado.web
import pycountry
import requests
from . import constants
from . import settings
from . import utils
from .saver import DocumentSaver
from .requesthandler import RequestHandler
class UserSaver(DocumentSaver):
doctype = constants.USER
... | 366 | 37.25 | 84 | 18 | 2,806 | python | [] | 0 | true | |
2024-11-18T18:05:45.516829+00:00 | 1,555,971,647,000 | 802f1ee328eed72d7ebaefc238221a6e2473c2a0 | 3 | {
"blob_id": "802f1ee328eed72d7ebaefc238221a6e2473c2a0",
"branch_name": "refs/heads/master",
"committer_date": 1555971647000,
"content_id": "839d3604c6ec26c623a189a8fa3d34686739a921",
"detected_licenses": [
"MIT"
],
"directory_id": "3487e0a57626fb77b5e7a2b8ca05967d091bfd46",
"extension": "py",
"fi... | 2.875 | stackv2 | """
"""
import logging
from flask import request
class RequestFormatter(logging.Formatter):
def format(self, record):
record.url = request.url
record.remote_addr = request.remote_addr
return super().format(record)
def fmt(method: str, username: str, description: str) -> str:
"""
... | 30 | 21.67 | 71 | 11 | 156 | python | [] | 0 | true | |
2024-11-18T18:05:45.845735+00:00 | 1,546,505,158,000 | 3a16caa3024ddf7a923ceb439c9222a19d791635 | 4 | {
"blob_id": "3a16caa3024ddf7a923ceb439c9222a19d791635",
"branch_name": "refs/heads/master",
"committer_date": 1546505158000,
"content_id": "fe1b402847974895a719e2409dad259e001e7416",
"detected_licenses": [
"MIT"
],
"directory_id": "8bec264dedd43697074890e3e4ac2368f007dae4",
"extension": "py",
"fi... | 3.609375 | stackv2 | import csv
def adresswriter(name,email):
with open('data.csv', 'a+') as csvfile:
filewriter = csv.writer(csvfile, delimiter=',',quotechar='|', quoting=csv.QUOTE_MINIMAL)
filewriter.writerow([name, email])
x=0
while 1==1:
em=input('enter email address: ')
nm=input('enter name/names... | 16 | 25.06 | 96 | 12 | 114 | python | [] | 0 | true | |
2024-11-18T18:05:45.896623+00:00 | 1,459,329,252,000 | 6332ead8e3decd5eb3750b8a88834aa153641bce | 2 | {
"blob_id": "6332ead8e3decd5eb3750b8a88834aa153641bce",
"branch_name": "refs/heads/master",
"committer_date": 1459329252000,
"content_id": "af7fee61b0d5426e89b929f3901a907d2549829d",
"detected_licenses": [
"MIT"
],
"directory_id": "1d63cf9c51f14b70940263150cd93e3896c2ae55",
"extension": "py",
"fi... | 2.421875 | stackv2 | # -*- coding: utf-8 -*-
## @package ivf.datasets.threed_model
#
# ivf.datasets.threed_model utility package.
# @author tody
# @date 2016/02/18
import os
from ivf.datasets.datasets import datasetRootDir, subDirectory, datasetFiles, datasetFileNames
def shapeDatasetDir():
return os.path.join(dataset... | 44 | 25.98 | 94 | 11 | 282 | python | [] | 0 | true | |
2024-11-18T18:05:46.003289+00:00 | 1,622,992,309,000 | 8040661275f659e441d8d8ed5d98cb211cfd746e | 2 | {
"blob_id": "8040661275f659e441d8d8ed5d98cb211cfd746e",
"branch_name": "refs/heads/master",
"committer_date": 1622992309000,
"content_id": "2e87b042e559de792219aa4c9b318e1d4b55f78e",
"detected_licenses": [
"MIT"
],
"directory_id": "16b56c2b25126fd11a9e191f79473d13c33e6013",
"extension": "py",
"fi... | 2.34375 | stackv2 | import argparse
import os
from rxnebm.data.preprocess import clean_smiles, prep_crem, prep_nmslib, smi_to_fp
def parse_args():
"""This is directly copied from trainEBM.py"""
parser = argparse.ArgumentParser("trainEBM.py")
parser.add_argument(
"--train_from_scratch",
help="Whether to train ... | 160 | 28.11 | 87 | 12 | 1,127 | python | [] | 0 | true | |
2024-11-18T18:05:46.316567+00:00 | 1,680,854,992,000 | 28acc4967de2f8d78443da54b955b2829bc6956a | 2 | {
"blob_id": "28acc4967de2f8d78443da54b955b2829bc6956a",
"branch_name": "refs/heads/master",
"committer_date": 1680854992000,
"content_id": "4d2cb48436d0ccb9e065fc11bbf615ca06821d73",
"detected_licenses": [
"MIT"
],
"directory_id": "c9fe7a29cceffeed3823609b5f4b2dfe401c2e19",
"extension": "py",
"fi... | 2.453125 | stackv2 | from pyecharts import options as opts
from pyecharts.charts import Bar
from pyecharts.faker import Faker
c = (
Bar()
.add_xaxis(Faker.choose())
.add_yaxis("商家A", Faker.values())
.add_yaxis("商家B", Faker.values())
.set_global_opts(
title_opts=opts.TitleOpts(title="Bar-Y 轴 formatter"),
... | 16 | 27.19 | 88 | 17 | 123 | python | [] | 0 | true | |
2024-11-18T18:05:47.825342+00:00 | 1,523,226,785,000 | d92bff9d07c93b4bf2cb825a0b311a0f571da528 | 3 | {
"blob_id": "d92bff9d07c93b4bf2cb825a0b311a0f571da528",
"branch_name": "refs/heads/master",
"committer_date": 1523226785000,
"content_id": "7a17779f3b0ab3aa1b6654552ffcf1072539d160",
"detected_licenses": [
"MIT"
],
"directory_id": "d91b9e75b6832aa8998c6acd7d61f150fa08f23e",
"extension": "py",
"fi... | 3.09375 | stackv2 | '''
Owner - Rawal Shree
Email - rawalshreepal000@gmail.com
Github - https://github.com/rawalshree
'''
import math
global plain
global cipher
global Success
Success = False
plain = ""
cipher = ""
class Railfence:
def setKey(self, key):
global Success
try:
self.key = int(key)
... | 66 | 22.71 | 85 | 19 | 346 | python | [] | 0 | true | |
2024-11-18T18:05:47.942427+00:00 | 1,693,585,381,000 | ba30087c38abe46c4dc4415c1a63caaf047b5422 | 3 | {
"blob_id": "ba30087c38abe46c4dc4415c1a63caaf047b5422",
"branch_name": "refs/heads/main",
"committer_date": 1693585381000,
"content_id": "fcda9904a9e9694b8e8a4952261b2681baa39a3e",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "d51f530078404a24f1844b53b037bbfed238a784",
"extensi... | 2.5625 | stackv2 | # This code is a sample only. Not for use in production.
#
# Author: Katreena Mullican
# Contact: mullicak@amazon.com
#
import boto3
import os
import json
s3 = boto3.client('s3')
rekognition = boto3.client('rekognition')
dynamodb = boto3.client('dynamodb')
def handler(event, context):
bucket_name = (os.environ['B... | 56 | 30.29 | 116 | 16 | 397 | python | [] | 0 | true | |
2024-11-18T18:05:48.482099+00:00 | 1,633,365,751,000 | bbefe569b43449a354c0f0f39fc14435447c2456 | 3 | {
"blob_id": "bbefe569b43449a354c0f0f39fc14435447c2456",
"branch_name": "refs/heads/main",
"committer_date": 1633365751000,
"content_id": "324904ce1c6219304616d7ef816834d92dec3937",
"detected_licenses": [
"MIT",
"MIT-0"
],
"directory_id": "97cfb911dd043a130a5467aceb4726bdd3ef5c4b",
"extension": ... | 2.765625 | stackv2 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
# CloudWatch Custom Widget sample: simple debugger, displays form and parameters passed to widget
import json
import os
DOCS = """
## Custom Widget Debugger
A simpler "debugger" custom widget that prints out:
* the L... | 75 | 34.57 | 159 | 10 | 648 | python | [] | 0 | true | |
2024-11-18T18:05:48.540417+00:00 | 1,616,777,238,000 | 768cf9044f56568dd13f1f85b888f28e1c866a05 | 2 | {
"blob_id": "768cf9044f56568dd13f1f85b888f28e1c866a05",
"branch_name": "refs/heads/master",
"committer_date": 1616777238000,
"content_id": "28db1e9337930026c4341405595326ba923c402f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c7739a60eac9492e4b34f062ccd495955ccc9531",
"extension": "py"... | 2.40625 | stackv2 | # -*- coding: utf-8 -*-
# This file is part of the Ingram Micro Cloud Blue Connect connect-cli.
# Copyright (c) 2019-2021 Ingram Micro. All Rights Reserved.
import json
import subprocess
import click
def continue_or_quit():
while True:
click.echo('')
click.echo("Press 'c' to continue or 'q' to q... | 34 | 27.85 | 80 | 16 | 241 | python | [] | 0 | true | |
2024-11-18T18:05:48.758111+00:00 | 1,580,765,531,000 | d4312ef8c150274407c0e4854c1de02e54551411 | 4 | {
"blob_id": "d4312ef8c150274407c0e4854c1de02e54551411",
"branch_name": "refs/heads/master",
"committer_date": 1580765531000,
"content_id": "1335b966db57c4859ac7768080db7b96935d44fa",
"detected_licenses": [
"MIT"
],
"directory_id": "2575ee8d1deff4f24b2dc10a392def0647f3a323",
"extension": "py",
"fi... | 3.59375 | stackv2 | # Solving the 2-SUM problem using a hash table
# prints out the number of target sums t in a given range that have at least one pair of numbers adding up to it
from tqdm import tqdm
h = {}
with open('2sum.txt', 'r') as doc:
for line in doc:
h[int(line)] = 1
c = 0
for t in tqdm(range(-10000, 10001)):
... | 18 | 22.61 | 112 | 11 | 132 | python | [] | 0 | true | |
2024-11-18T18:05:48.834403+00:00 | 1,605,371,254,000 | fe0ea0c87e90612db5a6624c3317b7ca97d31d0a | 3 | {
"blob_id": "fe0ea0c87e90612db5a6624c3317b7ca97d31d0a",
"branch_name": "refs/heads/main",
"committer_date": 1605371254000,
"content_id": "3b88a5d19bcd5467e8414d5ba19790618bb9c499",
"detected_licenses": [
"MIT"
],
"directory_id": "ab4f947fa7d70247a3a71b557c1dcb9de4da232f",
"extension": "py",
"file... | 3.3125 | stackv2 | import pygame as pg
class Display:
"""
docstring
"""
def __init__(self, game, screen_width, screen_height, offset_height, background_color):
self.screen_height = screen_height
self.screen_width = screen_width
self.screen = pg.display.set_mode((screen_width, screen_height))
... | 35 | 40.69 | 114 | 17 | 306 | python | [] | 0 | true | |
2024-11-18T18:05:49.936607+00:00 | 1,543,693,800,000 | 9fe6f61b04a321be9e7ea0318a488ccb8faf3608 | 3 | {
"blob_id": "9fe6f61b04a321be9e7ea0318a488ccb8faf3608",
"branch_name": "refs/heads/master",
"committer_date": 1543693800000,
"content_id": "d497ea43363e9a4a6a373fd45e7f54930340d0ad",
"detected_licenses": [
"MIT"
],
"directory_id": "2314eedcc18cb6915241b9f01cf6b37aab3dd580",
"extension": "py",
"fi... | 2.859375 | stackv2 | #!/usr/bin/env python3
from ev3dev2.utility.global_variable import *
def degrees_sollevatore(direction, degrees):
# comandi per il sollevatore
command = 1
# conversion = 8600
if direction is UP:
command = -1
return command*degrees*24
def degrees_braccio(direction, degrees):
# comand... | 36 | 23.08 | 58 | 11 | 241 | python | [] | 0 | true | |
2024-11-18T18:05:50.236363+00:00 | 1,486,398,951,000 | 61ffdc477f0ecc2b6c07b3616e7042bc8e68f905 | 2 | {
"blob_id": "61ffdc477f0ecc2b6c07b3616e7042bc8e68f905",
"branch_name": "refs/heads/master",
"committer_date": 1486398951000,
"content_id": "35e82aa8efe4e5103e720972d8ec213a833c170c",
"detected_licenses": [
"ISC"
],
"directory_id": "e781a2a5dbd55bf7591fec9efb50b3bc3bad5167",
"extension": "py",
"fi... | 2.328125 | stackv2 | import uuid
from django.db import models
from ckeditor.fields import RichTextField
from django.utils.translation import ugettext_lazy as _
class AgeCategories(object):
choices = (
('default', _('Default')),
('children', _('Children')),
('young', _('Young')),
('adults', _('Adults')... | 138 | 30.4 | 115 | 11 | 902 | python | [] | 0 | true | |
2024-11-18T18:05:50.435877+00:00 | 1,632,236,428,000 | c07cc5f5412176eb9a5a9ee266c8c34e3363267d | 3 | {
"blob_id": "c07cc5f5412176eb9a5a9ee266c8c34e3363267d",
"branch_name": "refs/heads/main",
"committer_date": 1632236428000,
"content_id": "40254bbd782cebf888602efbcbafda1a4f93f1e8",
"detected_licenses": [
"MIT"
],
"directory_id": "e93c6e93f612bca7f192adf539b4f489ad114ab5",
"extension": "py",
"file... | 2.625 | stackv2 | # ---- Worker application --------------------------------
import json
import os
import pika
from CaptureThread import CaptureThread
from PortscanThread import PortscanThread
from TracerouteThread import TracerouteThread
CAPTURE = "capture"
PORTSCAN = "portscan"
TRACEROUTE = "traceroute"
if os.geteuid() != 0:
... | 84 | 27.55 | 92 | 13 | 574 | python | [] | 0 | true | |
2024-11-18T18:05:50.494597+00:00 | 1,600,457,101,000 | cc71e14c4713664a632c671fd7c0cf4949920d0c | 3 | {
"blob_id": "cc71e14c4713664a632c671fd7c0cf4949920d0c",
"branch_name": "refs/heads/master",
"committer_date": 1600457101000,
"content_id": "06c4f4e947ff23b5c316f3fc9d3ff2755fad8197",
"detected_licenses": [
"MIT"
],
"directory_id": "202d5846883e772a5ffc96f7ee72878c11b6b7cf",
"extension": "py",
"fi... | 2.875 | stackv2 | import numpy
import argparse
import os
import time
import dlib
import cv2 as cv
from math import hypot
from face import face_tracker
# Descripción para argumentos del script
parser = argparse.ArgumentParser(description = 'Image Convolution')
parser.add_argument('-f','--file', default="", help="Introduce file name.")
... | 127 | 45.95 | 136 | 17 | 1,788 | python | [] | 0 | true | |
2024-11-18T18:05:50.786093+00:00 | 1,425,253,712,000 | e5af85924f64e5cd20cb4634d93cd34727db9ef4 | 3 | {
"blob_id": "e5af85924f64e5cd20cb4634d93cd34727db9ef4",
"branch_name": "refs/heads/master",
"committer_date": 1425253712000,
"content_id": "dc44476f8f2550a6c47e17db2b6c9b10a75475de",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "769fb250df521e23a045940ad41b14d4e0b8d835",
"extension": "p... | 2.90625 | stackv2 | from rdflib.graph import Graph
import os
class Store(object):
def attach_directory(self, dirname):
"""Attach to a directory containing RDF files
and deliver data from there"""
self.graph = Graph()
self.basedir = dirname
for dirpath, _, filenames in os.walk(dirname):
... | 22 | 29.32 | 86 | 19 | 128 | python | [] | 0 | true | |
2024-11-18T18:05:50.891605+00:00 | 1,674,337,881,000 | a1d4e937240c69fa96324322c0525f937a87e6a7 | 3 | {
"blob_id": "a1d4e937240c69fa96324322c0525f937a87e6a7",
"branch_name": "refs/heads/master",
"committer_date": 1674337881000,
"content_id": "d89f33ca7a413fe1b1336e1fa59e3c8e77de92bf",
"detected_licenses": [
"MIT"
],
"directory_id": "d5d1e33f783568205d7883059fcd40a68c10a7f1",
"extension": "py",
"fi... | 2.625 | stackv2 | from django.core.management.base import BaseCommand, CommandError
from django.core.exceptions import ObjectDoesNotExist
from trainer.models import Rule, User
import re
class Command(BaseCommand):
help = 'Reads update rule set vom kommaregeln.csv'
def add_arguments(self, parser):
# Named (optional) arg... | 59 | 42.49 | 137 | 20 | 544 | python | [] | 0 | true | |
2024-11-18T18:05:50.995077+00:00 | 1,681,380,941,000 | e318ef477e6416a2771f439d3ccca329e22e093b | 3 | {
"blob_id": "e318ef477e6416a2771f439d3ccca329e22e093b",
"branch_name": "refs/heads/master",
"committer_date": 1681380941000,
"content_id": "ac6bb68abe5cfe57022afe0a29bb34005b6b4d36",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "af84dbfbdca0ee1a354924881b6578c37a66efcf",
"extension": "py"... | 2.828125 | stackv2 | # _*_ coding:utf8 _*_
import numpy as np
import pandas as pd
import tensorflow as tf
import sys
#import ncf.metrics
import metrics
class NCF(object):
def __init__(self, embed_size, user_size, item_size, lr,
optim, initializer, loss_func, activation_func,
regularizer_rate, iterat... | 227 | 44.54 | 87 | 16 | 2,121 | python | [] | 0 | true | |
2024-11-18T18:05:51.110968+00:00 | 1,616,895,046,000 | 8423c4bedaae40da0e6d2c2b43c48f56b89c5965 | 3 | {
"blob_id": "8423c4bedaae40da0e6d2c2b43c48f56b89c5965",
"branch_name": "refs/heads/master",
"committer_date": 1616895046000,
"content_id": "021e70692c5f2184c7f31c5af6a41e9a4edd76f2",
"detected_licenses": [
"MIT"
],
"directory_id": "2f5784360ec61fb19d28ca4d115c967ab415ee3d",
"extension": "py",
"fi... | 2.8125 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 3 01:56:34 2021
@author: Clauber
"""
import socket
#obj de conexão
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
print("Socket criado com socesso!")
host = 'localhost'
port = 5432
#fazendo a ligação a partir do host e da porta do host
s.bind((host, port))
mensage... | 24 | 26.92 | 88 | 13 | 209 | python | [] | 0 | true | |
2024-11-18T18:05:51.163839+00:00 | 1,613,149,366,000 | d287c681a0f37bd86150a1f567579bdd0faf790a | 4 | {
"blob_id": "d287c681a0f37bd86150a1f567579bdd0faf790a",
"branch_name": "refs/heads/main",
"committer_date": 1613149366000,
"content_id": "efd89e6d6665463231e2f25b858433bb8e13635e",
"detected_licenses": [
"MIT"
],
"directory_id": "a9edcd7c994d0ba4a10be1bebd4d91600337483b",
"extension": "py",
"file... | 3.859375 | stackv2 | from collections import defaultdict
class UGraph:
"""Constructs an undirected weighted graph."""
def __init__(self):
self.graph = defaultdict(list)
def add_edge(self, src: int, dest: int, w: int) -> None:
"""Add weighted edges between source and destination vertices.
:pa... | 35 | 28.66 | 81 | 11 | 248 | python | [] | 0 | true | |
2024-11-18T18:05:51.327859+00:00 | 1,605,611,951,000 | 3379b7bf8c895c1db53f826ee6b01d695c771ecb | 3 | {
"blob_id": "3379b7bf8c895c1db53f826ee6b01d695c771ecb",
"branch_name": "refs/heads/master",
"committer_date": 1605611951000,
"content_id": "c6533c22e590309dc2d05c216acfdfcf160affbc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "05a3a2e348f2c452e48ea331b4c5effc18543128",
"extension": "py"... | 2.75 | stackv2 | import numpy as np
import torch
import torch.utils.data as data
from torch.utils.data import DataLoader
from utils import train
class DirectionalLinearDataset(data.Dataset):
def __init__(self,
v,
num_samples=10000,
sigma=3,
epsilon=1,
... | 151 | 39.08 | 100 | 17 | 1,218 | python | [] | 0 | true | |
2024-11-18T18:05:51.617780+00:00 | 1,598,241,307,000 | eb57e4f1d5091808917207f41e715581d3336e27 | 4 | {
"blob_id": "eb57e4f1d5091808917207f41e715581d3336e27",
"branch_name": "refs/heads/master",
"committer_date": 1598241307000,
"content_id": "9322317e181b1e0888b7b65df44e8faa774e820c",
"detected_licenses": [
"MIT"
],
"directory_id": "973fc8ee2cde8a7379cc49ee216b96e8b3d173d4",
"extension": "py",
"fi... | 3.734375 | stackv2 | import os
import re
from operator import itemgetter
def get_clean_col_and_delimiter(file_path):
"""
detect delimiter in text file by glancing at first row
:param file_path: path of text file (str)
:return:
number of delimiters that are detected (int)
delimiter (str)
"""
first_... | 45 | 27.89 | 114 | 15 | 306 | python | [] | 0 | true | |
2024-11-18T18:05:51.739998+00:00 | 1,563,480,494,000 | c361e9d07137271c12584cfd09f0345a994daa93 | 3 | {
"blob_id": "c361e9d07137271c12584cfd09f0345a994daa93",
"branch_name": "refs/heads/master",
"committer_date": 1563480494000,
"content_id": "2a7fe80f59976e8fd14f16295693dbf692472883",
"detected_licenses": [
"MIT"
],
"directory_id": "d7f7c31da748f0b7d02646fc26315c479035822d",
"extension": "py",
"fi... | 2.546875 | stackv2 | from models import ChordDesc
import asyncio, aiohttp
from urllib.parse import quote
from lxml import html
import logging
HTTP_OK = 200
JGUITAR_BASE_URL = 'https://jguitar.com'
JGUITAR_SEARCH_URL_FMT = JGUITAR_BASE_URL + '/chordsearch?chordsearch={}'
async def _get_chord_image_urls(client: aiohttp.ClientSession, cho... | 39 | 30.21 | 81 | 13 | 319 | python | [] | 0 | true | |
2024-11-18T18:05:51.782526+00:00 | 1,633,726,686,000 | 3a6d8286d4d20bf8768da44caf705aa605abdc20 | 2 | {
"blob_id": "3a6d8286d4d20bf8768da44caf705aa605abdc20",
"branch_name": "refs/heads/main",
"committer_date": 1633726686000,
"content_id": "d29153fc0cfdf84211c4815513f890665658cb6d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c7b3f765302d4737ae8bc6e3973bce900d0a93cd",
"extension": "py",
... | 2.453125 | stackv2 | import pyaudio
import threading
import time
import argparse
import wave
import torchaudio
import torch
import numpy as np
from neuralnet.dataset import get_featurizer
from threading import Event
class Listener:
def __init__(self, sample_rate=8000, record_seconds=2):
self.chunk = 1024
self.sample_... | 155 | 33.76 | 98 | 17 | 1,221 | python | [] | 0 | true | |
2024-11-18T18:05:51.834545+00:00 | 1,462,411,624,000 | cf54a28b454191968d424270b14794bdf4c83365 | 2 | {
"blob_id": "cf54a28b454191968d424270b14794bdf4c83365",
"branch_name": "refs/heads/master",
"committer_date": 1462411624000,
"content_id": "9f667026d03e5e368767c3dcf424cf6df14db21f",
"detected_licenses": [
"MIT"
],
"directory_id": "6071f5f8c3bb1e0b6ecc280664058cf74e0e93e1",
"extension": "py",
"fi... | 2.484375 | stackv2 | import pdb
def readit(filename):
data = open(filename, 'r+')
line = data.readline()
i=1
event_log = {}
while line != '':
if 'event' in line:
line = data.readline()
line = data.readline()
line = data.readline()
line = data.readline()
event = []
while (line.find('event') == -1) & (line.find('sum... | 65 | 30.69 | 131 | 18 | 666 | python | [] | 0 | true | |
2024-11-18T18:05:51.893426+00:00 | 1,627,356,144,000 | 0e0c4b7fa36f3a02ffa8eda95febeb7d2d92704a | 2 | {
"blob_id": "0e0c4b7fa36f3a02ffa8eda95febeb7d2d92704a",
"branch_name": "refs/heads/master",
"committer_date": 1627356144000,
"content_id": "d076586c733abd1d56e4332b4acebfd4b0049418",
"detected_licenses": [
"MIT"
],
"directory_id": "917b080572da1d0572bd7322080962aae96c3534",
"extension": "py",
"fi... | 2.34375 | stackv2 | from typing import Any, Dict, Sequence, List
from ...base import Component
class Banner(Component):
def __init__(self, data: Dict[str, Any], *args: Any, **kwargs: Any):
"""From https://github.com/wpscanteam/wpscan/blob/master/app/views/json/core/banner.erb"""
super().__init__(data, *args, **kwarg... | 34 | 33.91 | 98 | 16 | 271 | python | [] | 0 | true | |
2024-11-18T18:05:52.011974+00:00 | 1,512,495,654,000 | 66e2f97893448058da44f94b9fe7bbe49c289692 | 2 | {
"blob_id": "66e2f97893448058da44f94b9fe7bbe49c289692",
"branch_name": "refs/heads/master",
"committer_date": 1512496294000,
"content_id": "a60712a4aa2b2ef2643052a13d8fd0ad25620334",
"detected_licenses": [
"MIT"
],
"directory_id": "5a49a78056a7f3bb7d5b4560eccaca878c58e999",
"extension": "py",
"fi... | 2.484375 | stackv2 | # coding=utf-8
import json
import h5py
def get_weights_from_hdf5_group(hfg):
layer_names = [n.decode('utf8') for n in hfg.attrs['layer_names']]
weight_dict = dict()
for name in layer_names:
g = hfg[name]
weight_names = [n.decode('utf8') for n in g.attrs['weight_names']]
weight_val... | 27 | 33.52 | 87 | 17 | 259 | python | [] | 0 | true | |
2024-11-18T18:05:52.066530+00:00 | 1,454,423,768,000 | 3ab9a582339c814f2fba0bef3e604bfb9c60abbe | 3 | {
"blob_id": "3ab9a582339c814f2fba0bef3e604bfb9c60abbe",
"branch_name": "refs/heads/master",
"committer_date": 1454423768000,
"content_id": "10fb2ae5eee7e9c0f2784e3e971476c5d7dd744c",
"detected_licenses": [
"MIT"
],
"directory_id": "178e21d6a361dd487eece27c22da6ccd9f301b29",
"extension": "py",
"fi... | 2.609375 | stackv2 |
class ServiceBase(object):
@classmethod
def balance(cls, address, confirmations=0):
"""
Returns the amount of satoshis on the address
with the specified number of confirmations.
"""
raise NotImplementedError
@classmethod
def block_height(cls):
"""
... | 32 | 24.38 | 65 | 9 | 161 | python | [] | 0 | true | |
2024-11-18T18:05:52.300596+00:00 | 1,599,152,646,000 | 9185695cb36d6614095277825baed9bb945a49c2 | 2 | {
"blob_id": "9185695cb36d6614095277825baed9bb945a49c2",
"branch_name": "refs/heads/master",
"committer_date": 1599152646000,
"content_id": "048a36508be52d7c1697a055f4fb3d12039a6fca",
"detected_licenses": [
"MIT"
],
"directory_id": "3bc4d9a4f7744126cf5af8b56c75ec188476f6aa",
"extension": "py",
"fi... | 2.390625 | stackv2 |
# Import Packages
import pandas as pd
import os
import sklearn as sk
import numpy as np
import pickle
from imblearn.over_sampling import ADASYN
from sklearn.metrics import roc_curve, auc
# Global Vars
pathto_data = '/app_io'
pathto_spacefeats = os.path.join(pathto_data, 'spatial_features_model', 'output')
pathto_damd... | 238 | 37.82 | 126 | 15 | 2,175 | python | [] | 0 | true | |
2024-11-18T18:05:52.498081+00:00 | 1,593,938,040,000 | 2386e5e1498d5ac316dfe03f00238fe6f5fdec0e | 3 | {
"blob_id": "2386e5e1498d5ac316dfe03f00238fe6f5fdec0e",
"branch_name": "refs/heads/master",
"committer_date": 1593938040000,
"content_id": "bfef4c5a6ab43512ac748fdf963ca240b0731615",
"detected_licenses": [
"MIT"
],
"directory_id": "4a51dbd36a7527f46a08fb7adb48a2d90ad609ef",
"extension": "py",
"fi... | 2.6875 | stackv2 | from logging import getLogger
from aksdp.data import Data
from typing import List
logger = getLogger(__name__)
class DataSet:
def __init__(self):
self.data = {}
def put(self, name: str, d: Data) -> "DataSet":
self.data[name] = d
return self
def get(self, name: str) -> Data:
... | 38 | 22.18 | 51 | 14 | 216 | python | [] | 0 | true | |
2024-11-18T18:05:52.617084+00:00 | 1,476,037,242,000 | 0acc49e559e06c08df282259fac3f695c55fdb6c | 3 | {
"blob_id": "0acc49e559e06c08df282259fac3f695c55fdb6c",
"branch_name": "refs/heads/master",
"committer_date": 1476037242000,
"content_id": "1eb498fc81bd1ad4ac93767b0868c3de78be1898",
"detected_licenses": [
"MIT"
],
"directory_id": "c085578abc19db18ee0766e1f9598d79a3acdbe1",
"extension": "py",
"fi... | 2.796875 | stackv2 | class Solution(object):
def firstMissingPositive(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
# num[i] should be in the pos num[i]-1
# swap the value in the nums,
# find the first value that not math the position
n=len(nums)
for i in ... | 22 | 29.18 | 72 | 16 | 166 | python | [] | 0 | true | |
2024-11-18T18:05:52.674483+00:00 | 1,531,211,461,000 | 7ce15ebed5b8709782d0403aa525b9323ae22506 | 2 | {
"blob_id": "7ce15ebed5b8709782d0403aa525b9323ae22506",
"branch_name": "refs/heads/master",
"committer_date": 1531211461000,
"content_id": "2f66cfffe9898b7675fd3634f8673f61ed7eed93",
"detected_licenses": [
"MIT"
],
"directory_id": "ae67de8d37d282662af4b54b85a636a941d500e4",
"extension": "py",
"fi... | 2.5 | stackv2 | import socket
addr=("0.0.0.0",8080)
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.bind(addr)
s.listen(1)
resp=b"HTTP/1.1 200 OK\r\n\
Content-Length: 16\r\n\
Connection: close\r\n\
Content-Type: text/html;charset=UTF-8\r\n\r\n... | 16 | 27.5 | 80 | 9 | 135 | python | [{"finding_id": "codeql_py/bind-socket-all-network-interfaces_d5abebf82ff61976_1e4c1ea8", "tool_name": "codeql", "rule_id": "py/bind-socket-all-network-interfaces", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "'0.0.0.0' binds a socket to all interfaces.", "remediation": "", "locati... | 1 | true | |
2024-11-18T18:05:52.742398+00:00 | 1,531,154,284,000 | 15ff8d6b919e830c6c33ea6ac3732e7584ea5016 | 3 | {
"blob_id": "15ff8d6b919e830c6c33ea6ac3732e7584ea5016",
"branch_name": "refs/heads/master",
"committer_date": 1531154284000,
"content_id": "07764d8cb8857f3a231e4f738031b0f5cbaedcd2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c2fd7c80105757cb12536cea3769a2f7385c59e9",
"extension": "py"... | 3.09375 | stackv2 | import tensorflow as tf
import iris_data
def my_model_fn(features, labels, mode, params):
net = tf.feature_column.input_layer(features, params['feature_columns'])
for units in params['hidden_units']:
net = tf.layers.dense(net, units, activation=tf.nn.relu)
logits = tf.layers.dense(net, params['n_... | 83 | 33.95 | 106 | 13 | 725 | python | [] | 0 | true | |
2024-11-18T18:05:52.808562+00:00 | 1,609,334,173,000 | b6438e3b17f3d66597f60b00e942008b77a569f0 | 3 | {
"blob_id": "b6438e3b17f3d66597f60b00e942008b77a569f0",
"branch_name": "refs/heads/main",
"committer_date": 1609334173000,
"content_id": "945f7c9548f64ee4feb4d80f9def95f1e2f1e988",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e77e8d389a70754c85393c1967bae0632a33df20",
"extension": "py",
... | 2.984375 | stackv2 | from socket import socket, AF_INET, SOCK_DGRAM, inet_aton, inet_ntoa
import random, time
import threading, queue
from socketserver import ThreadingUDPServer
lock = threading.Lock()
def bytes_to_addr(bytes):
return inet_ntoa(bytes[:4]), int.from_bytes(bytes[4:8], 'big')
def addr_to_bytes(addr):
return inet_... | 85 | 31.22 | 99 | 16 | 654 | python | [] | 0 | true | |
2024-11-18T18:05:52.919914+00:00 | 1,625,584,497,000 | 7d79c06f8af3e0bcfa88e9703b177b44978569de | 2 | {
"blob_id": "7d79c06f8af3e0bcfa88e9703b177b44978569de",
"branch_name": "refs/heads/master",
"committer_date": 1625584497000,
"content_id": "162fc4cf197c00de108895d7889162b40d2c8cc9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "279c70e0c1ee0625bf0940d6644def5c6f294c43",
"extension": "py"... | 2.34375 | stackv2 | import re
try: # py3
from configparser import ConfigParser
except ImportError: # py2
from ConfigParser import ConfigParser
import xml.etree.ElementTree as ET
import http.client
import urllib.error
import urllib.request
from flask import current_app, request
from .exceptions import ConfigurationError
TOPO... | 114 | 30.61 | 112 | 19 | 777 | python | [] | 0 | true | |
2024-11-18T18:05:53.099545+00:00 | 1,615,570,653,000 | 3dbdf19c41d0a3c8bf8952a5c4728c43ab6bb1bc | 3 | {
"blob_id": "3dbdf19c41d0a3c8bf8952a5c4728c43ab6bb1bc",
"branch_name": "refs/heads/master",
"committer_date": 1615570653000,
"content_id": "d530fdb150fa8d121ffb412c5ddd8825e6f03bc4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b47c136e077f5100478338280495193a8ab81801",
"extension": "py"... | 3.03125 | stackv2 | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import busio
import board
from digitalio import DigitalInOut, Direction
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
from adafruit_epd.epd import Adafruit_EPD
from adafruit_epd.ssd167... | 113 | 27.47 | 84 | 11 | 937 | python | [] | 0 | true | |
2024-11-18T18:05:53.174930+00:00 | 1,581,513,533,000 | 24b553f57a5dd7a2519f6f66b75b56969e6948f5 | 3 | {
"blob_id": "24b553f57a5dd7a2519f6f66b75b56969e6948f5",
"branch_name": "refs/heads/master",
"committer_date": 1581513533000,
"content_id": "c570f4581aea4cc30d8e0f7a7b5a0ff5cf14d43d",
"detected_licenses": [
"MIT"
],
"directory_id": "f375f786dc428aaff33ee03d119fc12206d64090",
"extension": "py",
"fi... | 2.6875 | stackv2 | # -*- coding=utf-8 -*-
# author: zhihua.ye@spreadtrum.com
import os
import re
import errno
from datetime import datetime
# 1. utils to handle android logs like main.log, radio.log, kernel.log
# 2. find pid by keyword
# 3. line grep
class logutils():
def __init__(self):
pass
class dotdict(dict):
... | 136 | 26.32 | 135 | 17 | 1,084 | python | [] | 0 | true | |
2024-11-18T18:05:53.405037+00:00 | 1,443,451,769,000 | 09241a8dcfd749ddd2bb20e0604c048ebb6a5213 | 3 | {
"blob_id": "09241a8dcfd749ddd2bb20e0604c048ebb6a5213",
"branch_name": "refs/heads/master",
"committer_date": 1443451769000,
"content_id": "e746a3b3df03bf9f382ccf5493eddfc0f2ef9ecd",
"detected_licenses": [
"MIT"
],
"directory_id": "7e15cd59e7250b01e8b8576b9c1aa8f07d03e923",
"extension": "py",
"fi... | 2.890625 | stackv2 | #!/usr/bin/python3
import argparse,json,os,re,socket,sys,urllib.request
def init_argparse():
parser = argparse.ArgumentParser(description='convert cryptocurrencies conveniently.', usage=os.path.basename(sys.argv[0]) + ' amount [currency] [-p ...]')
parser.add_argument('amount', help='coin amount to convert',... | 82 | 32.56 | 159 | 17 | 715 | python | [] | 0 | true | |
2024-11-18T18:05:53.566174+00:00 | 1,631,804,733,000 | f249c3b4b8cc2c9cbc4c3d8293db5350142d8ae5 | 3 | {
"blob_id": "f249c3b4b8cc2c9cbc4c3d8293db5350142d8ae5",
"branch_name": "refs/heads/master",
"committer_date": 1631804733000,
"content_id": "c204d4cca1573eeaf5cce1a502be6e044e537c97",
"detected_licenses": [
"MIT"
],
"directory_id": "3ea7aafa53581f4dc9fc81293606e170b26c2ea2",
"extension": "py",
"fi... | 2.890625 | stackv2 | import urllib
import json
import datetime
class Api:
"""
Class for interacting with satoshidice.com API.
"""
def __init__(self, secret):
"""
Initialization
Secret required to use the API. (it's shown in the address bar on satoshidice.com).
"""
self.secret = secr... | 80 | 34.39 | 172 | 15 | 620 | python | [] | 0 | true | |
2024-11-18T18:05:53.745723+00:00 | 1,603,578,637,000 | ea65c1be3bd8d832bccce8257d0b474cba4412e4 | 3 | {
"blob_id": "ea65c1be3bd8d832bccce8257d0b474cba4412e4",
"branch_name": "refs/heads/master",
"committer_date": 1603578637000,
"content_id": "94d50f41ada59919a5027d282d3702d391e2e4b3",
"detected_licenses": [
"MIT"
],
"directory_id": "7ca5ea25937d86768e85ac5fe865d832fa854574",
"extension": "py",
"fi... | 2.875 | stackv2 | # Copyright (c) 2019 CloudZero, Inc. All rights reserved.
# Licensed under the MIT License. See LICENSE file in the project root for full license information.
import os
def zipdir(path, ziph):
"""
Zip a folder
Args:
path (str): path to zip
ziph: zipfile handle
Returns:
"""
f... | 22 | 23.73 | 100 | 17 | 138 | python | [] | 0 | true | |
2024-11-18T18:05:53.886832+00:00 | 1,514,819,429,000 | 360ee762aee9a172e998864ffe800eb47944b45b | 2 | {
"blob_id": "360ee762aee9a172e998864ffe800eb47944b45b",
"branch_name": "refs/heads/master",
"committer_date": 1514819429000,
"content_id": "de0cc0d573d2a9d26887c60b416eb7d3793d2e74",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "087ba04bd4fae34a3f90b002b6fcb736728a4467",
"extension": "py"... | 2.421875 | stackv2 | from typing import List, Dict, Any
from collections import defaultdict, deque
from itertools import tee
import pandas as pd
import numpy as np
import numba as nb
from copy import deepcopy
from functools import reduce
class op:
@staticmethod
def mul(a, b): return a * b
def sub(a, b): return a - b
de... | 176 | 24.82 | 127 | 19 | 1,075 | python | [] | 0 | true | |
2024-11-18T18:05:54.062125+00:00 | 1,605,063,512,000 | c6803f5bb7300cbee09cdc72acfdc9985c5fb174 | 3 | {
"blob_id": "c6803f5bb7300cbee09cdc72acfdc9985c5fb174",
"branch_name": "refs/heads/master",
"committer_date": 1605063512000,
"content_id": "bb7a2f6a057ca8caa50d6d916bf85a3701930242",
"detected_licenses": [
"MIT"
],
"directory_id": "e420df53b38fb201a47cf5939c0309c96af40e61",
"extension": "py",
"fi... | 2.71875 | stackv2 | # !python3
# coding=utf-8
import datetime
import os
import smtplib
import sys
import email.message
import bs4
import requests
from config import emailAddr
from config import password
from config import smtpLibary
from config import smtpPort
# Release Objects
class Release(object):
artist = ""
album = ""
... | 170 | 25.85 | 160 | 16 | 1,155 | python | [] | 0 | true | |
2024-11-18T18:05:54.381871+00:00 | 1,386,823,480,000 | 252060d218a62ef896cc120eac59e50f6a6dc109 | 2 | {
"blob_id": "252060d218a62ef896cc120eac59e50f6a6dc109",
"branch_name": "refs/heads/master",
"committer_date": 1386818483000,
"content_id": "ed40e8fabd8b97f62a0760d1e345fcdcac9756d3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "36d3f3c20ab073cd4d21775515cd19a65fbba017",
"extension": "py"... | 2.34375 | stackv2 | # Copyright 2013 Rackspace Australia
#
# 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 writi... | 139 | 39.42 | 78 | 23 | 1,143 | python | [] | 0 | true | |
2024-11-18T18:05:54.616127+00:00 | 1,691,894,832,000 | 2fb3db923d922f4e0d4b8316d760ff4d1f3b546d | 3 | {
"blob_id": "2fb3db923d922f4e0d4b8316d760ff4d1f3b546d",
"branch_name": "refs/heads/master",
"committer_date": 1691894832000,
"content_id": "9a8f8061959171431e83d0a62b1a57fd32847924",
"detected_licenses": [
"MIT"
],
"directory_id": "b2bcf07493b5a1bbfb7e29c7f13ac0b380cefead",
"extension": "py",
"fi... | 2.984375 | stackv2 | # 1d grid approixmation to beta binomial model
# https://github.com/aloctavodia/BAP
import superimport
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
import pyprobml_utils as pml
def posterior_grid(heads, tails, grid_points=100):
grid = np.linspace(0, 1, grid_points)
prior = n... | 39 | 25.1 | 66 | 9 | 295 | python | [] | 0 | true | |
2024-11-18T18:05:54.848616+00:00 | 1,552,157,765,000 | dc30647053966c0f9fcae39accdf029467b1470d | 4 | {
"blob_id": "dc30647053966c0f9fcae39accdf029467b1470d",
"branch_name": "refs/heads/master",
"committer_date": 1552157765000,
"content_id": "1ab7cda388facafd7357119793ca9288099b92dd",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7bd0954e956993df19d833810f9d71b60e2ebb9a",
"extension": "py"... | 3.59375 | stackv2 | # -*- coding: utf-8 -*-
"""
Numerical Utilities
===================
.. autofunction:: linear_interpolate
.. autofunction:: annotate_inverses
.. autofunction:: yield_bits_on
.. autofunction:: _generate_bitfill
"""
from __future__ import division, print_function, unicode_literals
def linear_interpolate(start, finish... | 64 | 29.94 | 116 | 15 | 554 | python | [] | 0 | true | |
2024-11-18T18:05:54.914761+00:00 | 1,539,055,515,000 | 980ff2efbba59a79a6d9293b3dd145a2715e19ca | 3 | {
"blob_id": "980ff2efbba59a79a6d9293b3dd145a2715e19ca",
"branch_name": "refs/heads/master",
"committer_date": 1539055515000,
"content_id": "f24393657bcc159f754851c32ecdc67c9d27554d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8a73b06a0109b808d908dd15bfca575c2cde50ba",
"extension": "py"... | 3.078125 | stackv2 | # -*- coding:utf-8 -*-
import pandas as pd
from sklearn import model_selection
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import AdaBoostClassifier
from sklearn.ensemble import ExtraTreesClassifier
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.tree import Decision... | 129 | 49.89 | 119 | 14 | 1,632 | python | [] | 0 | true | |
2024-11-18T18:05:55.136965+00:00 | 1,573,560,004,000 | 5b7c4c4f30b138f05d5e4fd627708c16d32cfbbd | 2 | {
"blob_id": "5b7c4c4f30b138f05d5e4fd627708c16d32cfbbd",
"branch_name": "refs/heads/master",
"committer_date": 1573560004000,
"content_id": "8c2cda7edafcf77aa47374bfb42c81fdf4e54ce2",
"detected_licenses": [
"MIT"
],
"directory_id": "e2312cf255388e3430f645d3accd5f8d29126dbd",
"extension": "py",
"fi... | 2.421875 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
import getpass
import argparse
from cymod import ServerGraphLoader
if __name__ == "__main__":
intro_string = (
"Process cypher (graph database) query files and load "
+ "into specified neo4j database."
)
pa... | 64 | 26.2 | 86 | 10 | 386 | python | [] | 0 | true | |
2024-11-18T18:05:55.246166+00:00 | 1,657,390,380,000 | dfdbab317ffa3b29e94e2c2e170bb41d630eec72 | 2 | {
"blob_id": "dfdbab317ffa3b29e94e2c2e170bb41d630eec72",
"branch_name": "refs/heads/main",
"committer_date": 1657390380000,
"content_id": "c109cd2fd026f8414ae5d53012232891f107e2a6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "74a2da6daa4fb7acc42e7eb2f1aa2a3fcd983a53",
"extension": "py",
... | 2.328125 | stackv2 | # -*- test-case-name: openid.test.test_fetchers -*-
"""
This module contains the HTTP fetcher interface and several implementations.
"""
__all__ = [
'fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse',
'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError', 'HTTPError'
]
import urllib.request
i... | 493 | 31.21 | 79 | 19 | 3,533 | python | [] | 0 | true | |
2024-11-18T18:05:55.423167+00:00 | 1,581,619,000,000 | 246e844949acd4968ebb78b90a3bca67acd591f2 | 3 | {
"blob_id": "246e844949acd4968ebb78b90a3bca67acd591f2",
"branch_name": "refs/heads/master",
"committer_date": 1581619000000,
"content_id": "2573fe238b9dfbc1d7e9af9d5dfc15cb12ea5b52",
"detected_licenses": [
"MIT"
],
"directory_id": "2f47eb2060a5b3e36b321089155ca7a199768205",
"extension": "py",
"fi... | 2.59375 | stackv2 | import tensorflow as tf
import numpy as np
def conv1d(name, input_dim, output_dim, filter_size, inputs, stride=1, he_init=True, biases=True, dilation=1, pad_mode='SAME', pad_val='CONSTANT', variables_on_cpu=True):
with tf.variable_scope(name):
# ignoring mask_type from original code
def uniform_i... | 119 | 38.85 | 170 | 20 | 1,090 | python | [] | 0 | true | |
2024-11-18T18:05:55.520411+00:00 | 1,622,710,133,000 | 4b535a278c9da537ac5209d2755111b9016ad8c2 | 4 | {
"blob_id": "4b535a278c9da537ac5209d2755111b9016ad8c2",
"branch_name": "refs/heads/main",
"committer_date": 1622710133000,
"content_id": "2de211c05cfd096525bb3e28ceb62d130c410650",
"detected_licenses": [
"Unlicense"
],
"directory_id": "3b998b300a1cf0a7c369193f0478f5ca2120607f",
"extension": "py",
... | 4.09375 | stackv2 | #How many words of three or more letters, including plurals, can you make from the five letters, using each letter only once?
#No foreign words or words beginning with a capital are allowed. there's at least one five letter word.
import json
def getLettersInput():
stringOfLetters = input("Enter The Letters You Wer... | 68 | 34.28 | 125 | 12 | 584 | python | [] | 0 | true | |
2024-11-18T18:05:55.571942+00:00 | 1,635,237,461,000 | 984914efa753c33628c2b066358bcdd60cb20610 | 3 | {
"blob_id": "984914efa753c33628c2b066358bcdd60cb20610",
"branch_name": "refs/heads/main",
"committer_date": 1635237461000,
"content_id": "117269e6e224ebcadae9e641d6d2974479d5cd1a",
"detected_licenses": [
"MIT"
],
"directory_id": "39491c042d79100bd8b8c3004016c89ef6610a6c",
"extension": "py",
"file... | 2.9375 | stackv2 | from sklearn import datasets, metrics
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import numpy as np
def classes():
digits = datasets.load_digits()
print(digits.DESCR)
print(f'digits data:\n {digits.data},\n len: {len(digits.data)}')
print(f'digits target:\n ... | 298 | 25.19 | 113 | 15 | 2,191 | python | [] | 0 | true | |
2024-11-18T18:05:56.044170+00:00 | 1,486,668,271,000 | 503503ca77386d7ad226326d25fcb3c96f7f2b8e | 3 | {
"blob_id": "503503ca77386d7ad226326d25fcb3c96f7f2b8e",
"branch_name": "refs/heads/master",
"committer_date": 1486668271000,
"content_id": "8048eed32403f9de7e81c67432f8bff406690966",
"detected_licenses": [
"MIT"
],
"directory_id": "d728338358b7acc7a40c4717417a81bfd0088e5c",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/env python3.6
#CONFIGURATION################################################
#STORAGE CONFIG
configpath = ""
scanstorage = ""
#SAFETY GUARD CONFIG
safetyguard = True
#Input min value in percent for cloning file override safety guard.
#Backup will be aborted if change counter passes this value.
minwarnin... | 473 | 27.42 | 90 | 29 | 3,794 | python | [] | 0 | true | |
2024-11-18T18:05:56.113761+00:00 | 1,403,876,945,000 | 69d15854d58d471e11e19c7152c066562ce2e6b6 | 2 | {
"blob_id": "69d15854d58d471e11e19c7152c066562ce2e6b6",
"branch_name": "refs/heads/master",
"committer_date": 1403876945000,
"content_id": "cf36f3f4b9a1b14d963fa388af51eec03d4486a9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9ff881e88a8923af8876cbcf34c33eba65f5108c",
"extension": "py"... | 2.484375 | stackv2 | from gui_items import *
from objects.xml.xml_step import Step
class ActionPanel:
def __init__(self, display):
self.steps = []
self.display = display
# new ACTION panel (textbox met draaien, knop voor het uitvoeren van de draaien)
self.panel = self.display.gui_items.add_panel(450,... | 127 | 41.96 | 120 | 19 | 1,305 | python | [] | 0 | true | |
2024-11-18T18:05:56.648176+00:00 | 1,545,931,719,000 | fc0949aa1275bd14e54240114d51bb001db5a6ff | 3 | {
"blob_id": "fc0949aa1275bd14e54240114d51bb001db5a6ff",
"branch_name": "refs/heads/master",
"committer_date": 1545931719000,
"content_id": "fa090408038afad87d4057955150e19ee0e7a0a7",
"detected_licenses": [
"MIT"
],
"directory_id": "8f3ece39f63d3b054d62e4d5baa28617ab77c8b4",
"extension": "py",
"fi... | 2.671875 | stackv2 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import datetime
import numpy as np
import matplotlib as mpl
mpl.use("Agg")
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
def timestamp():
return datetime.datetime.now().strftime(... | 69 | 30.07 | 137 | 19 | 645 | python | [] | 0 | true | |
2024-11-18T18:05:57.172680+00:00 | 1,603,140,408,000 | dcdaacfbaa49ba874cf8659d0db6cb18e2c32f5a | 3 | {
"blob_id": "dcdaacfbaa49ba874cf8659d0db6cb18e2c32f5a",
"branch_name": "refs/heads/master",
"committer_date": 1603140408000,
"content_id": "cd464d40036949b49516bf1efcc2ae4047286df5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a3e96a4590202902a8b6c42bb044372931f1c909",
"extension": "py"... | 2.8125 | stackv2 | """This module provides static information from the AkWarm Energy Library
and from TMY3 files.
When this module is imported, it reads data from files in the
'data' directory located in this folder and reads some remotely stored
data files via HTTP requests. The data is stored as module-level
variables and made availa... | 240 | 36.9 | 123 | 14 | 2,358 | python | [] | 0 | true | |
2024-11-18T18:05:57.414037+00:00 | 1,628,413,537,000 | 529d238b6116af44156b15b8247062b43ba42d3f | 3 | {
"blob_id": "529d238b6116af44156b15b8247062b43ba42d3f",
"branch_name": "refs/heads/master",
"committer_date": 1628413537000,
"content_id": "28c4d99ea01a3837120553060f0f037f9c951c99",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "be55991401aef504c42625c5201c8a9f14ca7c3b",
"extension": "py"... | 3.484375 | stackv2 | # encoding: utf-8
"""
@version: v1.0
@author: Richard
@license: Apache Licence
@contact: billions.richard@qq.com
@site:
@software: PyCharm
@time: 2019/10/1 14:43
"""
"""
给定二叉搜索树的根结点 root,返回 L 和 R(含)之间的所有结点的值的和。
二叉搜索树保证具有唯一的值。
示例 1:
输入:root = [10,5,15,3,7,null,18], L = 7, R = 15
输出:32
示例 2:
输入:root = ... | 63 | 17.87 | 65 | 13 | 442 | python | [] | 0 | true | |
2024-11-18T18:05:57.468709+00:00 | 1,622,282,343,000 | 14f40b85ce7b3bb49f7d03413f3ecd642dd9f788 | 3 | {
"blob_id": "14f40b85ce7b3bb49f7d03413f3ecd642dd9f788",
"branch_name": "refs/heads/master",
"committer_date": 1622282343000,
"content_id": "2306c8ba4f430bed2493183c345f3129a5ff1ff0",
"detected_licenses": [
"MIT"
],
"directory_id": "095171a5be2f59a51ac81d7150489e9f2cb1a74e",
"extension": "py",
"fi... | 3.078125 | stackv2 | import io, os
from google.cloud import vision
from Nutrition import get_food, traduzione
import csv
import re
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = r"API_key\\Vision_key.json"
client = vision.ImageAnnotatorClient()
file_name = r"Immagini\\Cibo.png"
### Cose da scartare come sottostringa###
no_food = ["Food"... | 81 | 27.41 | 84 | 15 | 573 | python | [] | 0 | true | |
2024-11-18T18:05:57.515247+00:00 | 1,468,295,893,000 | c73d3e7066b96575595f2f1a6c248b401b619175 | 2 | {
"blob_id": "c73d3e7066b96575595f2f1a6c248b401b619175",
"branch_name": "refs/heads/master",
"committer_date": 1468295893000,
"content_id": "73ffb2feacf4cfa1afe6e30179e7ee53e40417d3",
"detected_licenses": [
"MIT"
],
"directory_id": "9540905f89036fe28834f6e2ada10205caa1a244",
"extension": "py",
"fi... | 2.40625 | stackv2 | __author__ = "Nicole"
# This script should be used to fill the pokemon_caught table for the first time to indicate
# that the pokemon are not caught yet.
import sqlite3
conn = sqlite3.connect('..//database/pokedex.sqlite3')
c = conn.cursor();
c.execute("delete from " + "pokemon_caught")
c.execute("delete from " + "... | 16 | 29.31 | 92 | 8 | 126 | python | [] | 0 | true | |
2024-11-18T18:05:57.639639+00:00 | 1,509,542,127,000 | 1624c4387534dfc6bd8353d87de3cd32427f3459 | 3 | {
"blob_id": "1624c4387534dfc6bd8353d87de3cd32427f3459",
"branch_name": "refs/heads/main",
"committer_date": 1509542127000,
"content_id": "81e00557b4688c143b61d49af8a7268a97d5e66b",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "f9d50d72f90168aedf6981bf884b65a008774c80",
"extension": "py"... | 2.875 | stackv2 | # Copyright © 2017 Zandr Martin
# 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 limitation
# the rights to use, copy, modify, merge, publish, distribut... | 175 | 25.71 | 78 | 22 | 1,069 | python | [] | 0 | true | |
2024-11-18T18:05:57.755312+00:00 | 1,544,328,070,000 | 000ee41831acdccbbcd7d63490b751b5e33c309a | 4 | {
"blob_id": "000ee41831acdccbbcd7d63490b751b5e33c309a",
"branch_name": "refs/heads/master",
"committer_date": 1544328070000,
"content_id": "671124555d310b0e9493ae16bfb4e612c019be0e",
"detected_licenses": [
"MIT"
],
"directory_id": "176c904f3ea5ec115198e22bfe2e0d9ee68e0ad6",
"extension": "py",
"fi... | 3.640625 | stackv2 | #!/usr/bin/env python
import re
def is_nice_string1(string):
vowels = "aeiou"
vowel_count = 0
for vowel in vowels:
vowel_count += string.count(vowel)
if vowel_count < 3:
return False
regex = re.compile(r'.*([a-z])\1.*')
if not regex.match(string):
return False
ban... | 50 | 21.62 | 45 | 10 | 294 | python | [] | 0 | true | |
2024-11-18T18:05:58.150585+00:00 | 1,565,113,945,000 | c9a83db14205881560cd57f19da3eece83bdc550 | 3 | {
"blob_id": "c9a83db14205881560cd57f19da3eece83bdc550",
"branch_name": "refs/heads/master",
"committer_date": 1565113945000,
"content_id": "a64e2c780f1e70445f48a0b969d1d588afff3671",
"detected_licenses": [
"MIT"
],
"directory_id": "921c4d4ab8288c30f33aa9b99e4fb07918e6c467",
"extension": "py",
"fi... | 3.171875 | stackv2 | import numpy as np
import sympy.vector as vec
from .utilities.validation import validate_input_numeric
from .utilities.geometry import ndarray_to_vector
from . import materials
from .systems import GCS
class Source(object):
"""
Source is a base class for all optical source classes.
:param material: an in... | 184 | 33.27 | 123 | 21 | 1,420 | python | [] | 0 | true | |
2024-11-18T18:05:58.353142+00:00 | 1,612,455,926,000 | 9846b9cd5111d3467b5e8274a8ee6541395bde51 | 2 | {
"blob_id": "9846b9cd5111d3467b5e8274a8ee6541395bde51",
"branch_name": "refs/heads/master",
"committer_date": 1612455926000,
"content_id": "d2e602081c7e0f239997f600186bdc7bdb512d53",
"detected_licenses": [
"MIT"
],
"directory_id": "a63df125c6adacbe369f4088b0f4ba21ddb2994e",
"extension": "py",
"fi... | 2.453125 | stackv2 | from pygame import mouse
from .commons import miniature
from .commons import message
from .commons import button
class Menu(miniature):
"""Class render and draw menu
Arguments:
screen -- Main diesplay surface
"""
def __init__(self, *args):
super().__init__(*args)
self.... | 38 | 25.45 | 70 | 13 | 241 | python | [] | 0 | true | |
2024-11-18T18:05:58.611109+00:00 | 1,546,151,271,000 | a40009afc2fe45b0a0a8f30471896d9849ffc57d | 4 | {
"blob_id": "a40009afc2fe45b0a0a8f30471896d9849ffc57d",
"branch_name": "refs/heads/master",
"committer_date": 1546151271000,
"content_id": "a85ca994b5aa1f1663511c84f08cdee0e07ddd3f",
"detected_licenses": [
"MIT"
],
"directory_id": "46d721d8ccc4c70b440320f634b32969a937fd61",
"extension": "py",
"fi... | 3.75 | stackv2 | #!/usr/bin/env python3
# Simple types
boolean = True and False
string = 'Hello World!'
integer = 0
complex = 0j
float = 0.0
none = None
print('Simple:', string)
# Sequences
list = [1, 'a', 0.0]
tuple = (1, 'a', 0.0)
dictionary = {
'key1': 'value 1',
'key2': 'value 2'
}
immutable_set = set(['a', 'b'])
for item i... | 76 | 16.75 | 55 | 9 | 398 | python | [] | 0 | true | |
2024-11-18T18:05:58.858841+00:00 | 1,512,579,339,000 | 6f34cc872c1ab543bca3c9b907be9aba77c80fd5 | 3 | {
"blob_id": "6f34cc872c1ab543bca3c9b907be9aba77c80fd5",
"branch_name": "refs/heads/master",
"committer_date": 1512579339000,
"content_id": "04d63eaed1e4799994a767c8e3cde534555d4e84",
"detected_licenses": [
"MIT"
],
"directory_id": "69190e914331e3b7dc7604fc7d34b14bb8ec8906",
"extension": "py",
"fi... | 2.53125 | stackv2 | from RedmineAPI.Utilities import FileExtension, create_time_log
import shutil
import os
from RedmineAPI.Access import RedmineAccess
from RedmineAPI.Configuration import Setup
from Utilities import CustomKeys, CustomValues
class Automate(object):
def __init__(self, force):
# create a log, can be written... | 139 | 50.22 | 140 | 21 | 1,557 | python | [] | 0 | true | |
2024-11-18T18:05:58.909943+00:00 | 1,624,203,457,000 | c26afd5e4f503e25d630084c4beb05ff7b2bd0f4 | 3 | {
"blob_id": "c26afd5e4f503e25d630084c4beb05ff7b2bd0f4",
"branch_name": "refs/heads/master",
"committer_date": 1624203457000,
"content_id": "cd37c6980f1353d71d1ce3bc572a55e3aeec6405",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "22f8cb2c5b35f01966aa725b2ec6e409812cac83",
"extension": "p... | 2.984375 | stackv2 | """Usage: dim_reduction.py --img_dir=img_dir
dim_reduction.py --help | -help | -h
Perform dimension reduction of images in a directory
Arguments:
img_dir directory of training images for dimension reduction
Options:
-h --help -h
"""
import time
from docopt import docopt
from pathlib import Path
i... | 110 | 33.68 | 113 | 18 | 1,021 | python | [] | 0 | true | |
2024-11-18T18:05:59.194311+00:00 | 1,390,868,064,000 | 2e342de8784ee0019f7da910841e3c5b7fdfc583 | 3 | {
"blob_id": "2e342de8784ee0019f7da910841e3c5b7fdfc583",
"branch_name": "refs/heads/master",
"committer_date": 1390868064000,
"content_id": "cf6bf0e6adc72e27fc447fddcbe9a2ed579d86b4",
"detected_licenses": [
"MIT"
],
"directory_id": "e98f784fd88136bf776eb418c566d81243522452",
"extension": "py",
"fi... | 2.53125 | stackv2 | import sys
import functools
import datetime
from pprint import pformat
from webob import Request, Response, exc
from user import User
from session import Session
import bivouac
def action(func):
'''MVC @action decorator as a WSGI application.
'''
def replacement(self, environ, start_response):
... | 137 | 24.18 | 83 | 15 | 709 | python | [] | 0 | true | |
2024-11-18T18:05:59.467354+00:00 | 1,630,477,700,000 | cead443a937fd8593b31b0a255933cbd69a11865 | 3 | {
"blob_id": "cead443a937fd8593b31b0a255933cbd69a11865",
"branch_name": "refs/heads/main",
"committer_date": 1630477700000,
"content_id": "7e70f010aed2ca087f0b52b7ba5e229e50789ff8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e430931d3bafa53adfb5a0809f10a13d13b2d458",
"extension": "py",
... | 2.59375 | stackv2 |
import time
import json
from server import Server, result_save
# Read network
def load_network():
with open('./Input/network.json', 'r', encoding='utf8') as fp:
network = json.load(fp)
return network
# Read parameters
def load_peremiters():
with open('./Input/peremiters.json', 'r', encoding='utf... | 79 | 37.38 | 144 | 21 | 694 | python | [] | 0 | true | |
2024-11-18T18:05:59.689045+00:00 | 1,612,207,487,000 | 1652afc299e4e88e9fa64fe870d8acd2331929ca | 3 | {
"blob_id": "1652afc299e4e88e9fa64fe870d8acd2331929ca",
"branch_name": "refs/heads/main",
"committer_date": 1612207487000,
"content_id": "c7dfc294ab9a0ee518344a27b8e84859b7d4217e",
"detected_licenses": [
"MIT"
],
"directory_id": "cdc23b30c887d8475de7a3f8048d97e9032cc453",
"extension": "py",
"file... | 3.078125 | stackv2 | from typing import Callable
from functools import wraps
class Connector():
def connected(self) -> bool:
raise NotImplementedError
def connect(self):
raise NotImplementedError
def close(self):
raise NotImplementedError
def reconnect(recoverable_exception: Exception):
def recon... | 30 | 24.57 | 52 | 15 | 133 | python | [] | 0 | true | |
2024-11-18T18:05:59.811923+00:00 | 1,483,082,437,000 | 333399b19ad2759e7e7d1eb7d757240453c25d31 | 2 | {
"blob_id": "333399b19ad2759e7e7d1eb7d757240453c25d31",
"branch_name": "refs/heads/master",
"committer_date": 1483082437000,
"content_id": "387546a7335fb0da3cd34cd6b8958292f3165e10",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "abbc75e085aa87128beab6e77bd1deeecc63d2b2",
"extension": "py"... | 2.328125 | stackv2 | import bpy
import glob
import numpy as np
import sys
import time
############################################### User control area ###############################################
# Note: If you would like to look at the filters in the 3D convolutional layers, change three_dimensions to True
# or other to False if you... | 210 | 35.58 | 138 | 25 | 2,033 | python | [] | 0 | true | |
2024-11-18T18:06:00.036290+00:00 | 1,479,134,645,000 | 598e8ba3be388977afbb1b296fbfc75ddc5dd2a1 | 2 | {
"blob_id": "598e8ba3be388977afbb1b296fbfc75ddc5dd2a1",
"branch_name": "refs/heads/master",
"committer_date": 1479134645000,
"content_id": "2d82ca545c75b71ce480aec97fe273bba1f1bef0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c6602f6bd5eba814ab0038c58489ccf2d5ab4c41",
"extension": "py"... | 2.375 | stackv2 | """
This source is the process of transferring to see the Android of the log in StackDriver of GCP.
By working with https://hub.docker.com/r/shikajiro/xmpp_gcm/
Android -> GCM -> XMPP -> StackDriver
To achieve the flow.
"""
import logging
import json
import os
from xmppgcm import GCM, XMPPEvent
from google.cloud impor... | 56 | 27.36 | 95 | 9 | 421 | python | [] | 0 | true | |
2024-11-18T18:06:00.095573+00:00 | 1,664,727,274,000 | f98ff1536f939456c78e211ea4121f87cdeff20a | 3 | {
"blob_id": "f98ff1536f939456c78e211ea4121f87cdeff20a",
"branch_name": "refs/heads/master",
"committer_date": 1664727274000,
"content_id": "021a7d3e3ba7454642ff9d263d555871212a1c76",
"detected_licenses": [
"MIT"
],
"directory_id": "c4dd7def4d1a2744b3aa0b3ddbf0bea24c521aa4",
"extension": "py",
"fi... | 2.921875 | stackv2 | import PyPDF2, os
#get all pdf files from directory
pdf_files=[filename for filename in os.listdir('.') if filename.endswith('.pdf')]
#sort filenames
pdf_files.sort()
count_merged_files = 0
pdfWriter = PyPDF2.PdfFileWriter()
#copy each pdf file to the final output file
for filename in pdf_files:
print(f'Merging \'... | 30 | 27.43 | 81 | 10 | 217 | python | [] | 0 | true | |
2024-11-18T18:06:00.349183+00:00 | 1,592,291,030,000 | 9ea54ae4c590f4199e1d99b096429cbb0f1fb704 | 4 | {
"blob_id": "9ea54ae4c590f4199e1d99b096429cbb0f1fb704",
"branch_name": "refs/heads/master",
"committer_date": 1592291030000,
"content_id": "9dcbbd296612a5efc0257d563e0bdbb440a7103a",
"detected_licenses": [
"MIT"
],
"directory_id": "18c5d373e52fab2f0541f0b2b3fda5043910732b",
"extension": "py",
"fi... | 3.984375 | stackv2 | # 用户输入两个正整数,求他们的最小公倍数。
num1 = eval(input("请输入第一个数字: "))
num2 = eval(input("请输入第二个数字: "))
if num1<= 0 or num2 <= 0:
print("两个数必须是正整数")
exit(0)
if num1>num2:
max=num1
min=num2
else:
max=num2
min=num1
for i in range(1,min+1):
numtemp=max*i
if numtemp % min == 0:
numresult=nu... | 22 | 15.73 | 32 | 9 | 144 | python | [] | 0 | true | |
2024-11-18T18:06:00.406206+00:00 | 1,612,890,618,000 | 587399dfc107d6b6e9e4f89db62b44ad454f4b68 | 2 | {
"blob_id": "587399dfc107d6b6e9e4f89db62b44ad454f4b68",
"branch_name": "refs/heads/master",
"committer_date": 1612890618000,
"content_id": "dbd8a1d3dab5c18e925f0d77f94a698660831af7",
"detected_licenses": [
"MIT"
],
"directory_id": "355b4d758c2ff092f712ce94b0a4093dca352357",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import logging
import tensorflow as tf
from invoke import run, exceptions
log = logging.getLogger('biomedbert')
log.setLevel(logging.INFO)
def fine_tune_re(re_dataset: str, re_dataset_no: str, model_dir: str, model_type: str, bucket_name: str,
... | 62 | 41.21 | 117 | 13 | 687 | python | [] | 0 | true | |
2024-11-18T18:06:00.458625+00:00 | 1,611,605,318,000 | a02298e2d7f53746fba252e49d71b05fb1c9cb54 | 2 | {
"blob_id": "a02298e2d7f53746fba252e49d71b05fb1c9cb54",
"branch_name": "refs/heads/master",
"committer_date": 1611605318000,
"content_id": "42fd304e56fb47ec8b825138f0b5bc910fa9e4f5",
"detected_licenses": [
"ISC"
],
"directory_id": "2b8a258ba9e4c61efa87a7bdcde3f3584254bd5f",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/env python
"""Exploit script for mars-express."""
import subprocess
import sys
import os
import pwn
pwn.context.log_level = "info"
pwn.context.terminal = ["tmux", "splitw", "-p", "75"]
BINARY = "../src/mars-express"
HOST = "vulnbox-test.faust.ninja"
PORT = 8888
GDB_COMMANDS = []
MENU = """What do you... | 144 | 21.17 | 98 | 13 | 957 | python | [] | 0 | true | |
2024-11-18T18:06:00.586719+00:00 | 1,543,807,607,000 | 5b600e26c80de888cb9cf80573cbb7f529d0fe05 | 3 | {
"blob_id": "5b600e26c80de888cb9cf80573cbb7f529d0fe05",
"branch_name": "refs/heads/master",
"committer_date": 1543807607000,
"content_id": "f2f3939d7d28dc0a1b8dc33522c2f56253e96c54",
"detected_licenses": [
"MIT"
],
"directory_id": "4a9127d0008240f9c8e1113476ca2ed215854537",
"extension": "py",
"fi... | 2.71875 | stackv2 | import pika
import json
def send(method, data):
connection = pika.BlockingConnection(pika.ConnectionParameters(host='rabbitmq'))
channel = connection.channel()
exchange_name = 'app'
routing_key = method
channel.exchange_declare(exchange=exchange_name, exchange_type='topic', durable=True)
channel.basic_p... | 20 | 27.85 | 87 | 12 | 136 | python | [] | 0 | true | |
2024-11-18T18:06:00.784979+00:00 | 1,541,589,066,000 | bcfba9e8fb4eab0c89fd45ae8dc69cedc971f100 | 3 | {
"blob_id": "bcfba9e8fb4eab0c89fd45ae8dc69cedc971f100",
"branch_name": "refs/heads/master",
"committer_date": 1541589066000,
"content_id": "b5a6da18f9cd6cfc5b29734cc7979e866acd167f",
"detected_licenses": [
"MIT"
],
"directory_id": "7b3fa36473d517d63a7c3bc14f910b44288ed5b9",
"extension": "py",
"fi... | 2.84375 | stackv2 | import inspect
import os
from PIL import Image, ImageDraw, ImageFont
import numpy as np
import time
import math
import random
def safeInt(ss):
return int(float(ss))
class BBX:
def __init__(self):
pass
def str2bbx(self, str):
chrs = str.split(' ')
self.name = chrs[0]
se... | 246 | 30.59 | 145 | 18 | 2,105 | python | [] | 0 | true | |
2024-11-18T18:06:00.846198+00:00 | 1,541,197,566,000 | 895b73a6c2280147adbe9e055fe09bdcdb3f5882 | 2 | {
"blob_id": "895b73a6c2280147adbe9e055fe09bdcdb3f5882",
"branch_name": "refs/heads/master",
"committer_date": 1541197566000,
"content_id": "a499dfdae91475e5fa68c7cc28b4df27c3f51147",
"detected_licenses": [
"MIT"
],
"directory_id": "71f322591b5984027d92ea52a2d13a0c3c60b808",
"extension": "py",
"fi... | 2.421875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 25 05:24:53 2018
@author: nn
"""
import os
import yaml
import tensorflow as tf
import numpy as np
import cv2
from . import base_loader
#def init(self, num)
def get_decord_func(shape):
def decord(example):
features = tf.parse_single_examp... | 203 | 30.4 | 88 | 20 | 1,655 | python | [] | 0 | true | |
2024-11-18T18:06:00.978461+00:00 | 1,505,465,037,000 | 37301a318a970dd1ba5fc2fe1341e41e0a22b41e | 3 | {
"blob_id": "37301a318a970dd1ba5fc2fe1341e41e0a22b41e",
"branch_name": "refs/heads/master",
"committer_date": 1505465037000,
"content_id": "2595c943a901bdcd884dba1326f1e5366e3b4017",
"detected_licenses": [
"MIT"
],
"directory_id": "b1178e697feee81b974ac2d65faa73e10c6c0a38",
"extension": "py",
"fi... | 2.8125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# audioVisualization.py
#
# MIT License
#
# Copyright (c) 2017 Jean Vincent
#
# 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 restrict... | 76 | 35.33 | 88 | 12 | 726 | python | [] | 0 | true | |
2024-11-18T18:06:01.032695+00:00 | 1,693,595,165,000 | 7ce41b7c9cca190cabf3dae74296cdd6d41c2685 | 2 | {
"blob_id": "7ce41b7c9cca190cabf3dae74296cdd6d41c2685",
"branch_name": "refs/heads/main",
"committer_date": 1693595165000,
"content_id": "a9f83dedeb7ccb67d8a2ccfcedea22119d9f9b29",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f54290f045fd150f9be640bf8ab4a91f6b9ae3e3",
"extension": "py"... | 2.453125 | stackv2 | """
This module contains historical deprecations that the Evennia launcher
checks for.
These all print to the terminal.
"""
import os
def check_errors(settings):
"""
Check for deprecations that are critical errors and should stop
the launcher.
Args:
settings (Settings): The Django settings f... | 181 | 42.95 | 99 | 13 | 1,755 | python | [] | 0 | true | |
2024-11-18T18:06:02.141825+00:00 | 1,617,739,981,000 | aa912a2b72d18711edcf4095ba884fb12311ddc0 | 2 | {
"blob_id": "aa912a2b72d18711edcf4095ba884fb12311ddc0",
"branch_name": "refs/heads/main",
"committer_date": 1617739981000,
"content_id": "65850f646dce567d4fe97bd6311000cbc446a1e8",
"detected_licenses": [
"MIT"
],
"directory_id": "301731fae40ed5426e86a6e17a3f5b3dc07316ab",
"extension": "py",
"file... | 2.46875 | stackv2 | # -*- coding: utf-8 -*-
#!pip install fasttext
import fasttext
import pandas as pd
import re
import numpy as np
from numpy import array
from sklearn.externals import joblib
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
tokenizer = joblib.load("/content/drive/My Drive/Complete_dataset/models... | 46 | 25.52 | 98 | 15 | 311 | python | [] | 0 | true | |
2024-11-18T18:06:02.201590+00:00 | 1,614,181,199,000 | 545d720dba0dd6614ae4efca30a881398dd9001b | 3 | {
"blob_id": "545d720dba0dd6614ae4efca30a881398dd9001b",
"branch_name": "refs/heads/master",
"committer_date": 1614181199000,
"content_id": "004e358587352f44d2bb9541052c0f2b4addac0c",
"detected_licenses": [
"MIT",
"Python-2.0"
],
"directory_id": "50008b3b7fb7e14f793e92f5b27bf302112a3cb4",
"exten... | 3.1875 | stackv2 | import unittest
import types
class BrokenTest(unittest.TestCase.failureException):
def __repr__(self):
name, reason = self.args
return '%s: %s: %s works now' % (
(self.__class__.__name__, name, reason))
def broken_test_XXX(reason, *exceptions):
'''Indicates a failing (or erroneous)... | 82 | 34.96 | 78 | 18 | 626 | python | [] | 0 | true | |
2024-11-18T18:06:02.252388+00:00 | 1,608,557,697,000 | 3054934136b078311cd7cb03154364ec20d14bfa | 3 | {
"blob_id": "3054934136b078311cd7cb03154364ec20d14bfa",
"branch_name": "refs/heads/master",
"committer_date": 1608557697000,
"content_id": "7b40ba0dab867de21b545e3364e008d2089357eb",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "c033a814d418b10d1c8a3f739c410a1cf8f8d212",
"extension": "p... | 2.78125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import MySQLdb
def readInput(inputFile):
newlines = []
with open(inputFile,"r") as f:
lines = f.readlines()
for line in lines:
fileName = line.split(",")[0]
dataKey = line.split(",")[1]
result = getTaskId(dataKey)
newlines.append(line.strip()+","+str(res... | 45 | 19.64 | 61 | 16 | 273 | python | [] | 0 | true | |
2024-11-18T18:06:02.377871+00:00 | 1,623,088,503,000 | 9ac7ce05ffbd808cd0ad08ac4776c349f3050d53 | 3 | {
"blob_id": "9ac7ce05ffbd808cd0ad08ac4776c349f3050d53",
"branch_name": "refs/heads/main",
"committer_date": 1623088503000,
"content_id": "083a6c96e102b7acfb051f0ffccb8a5ea3e95e8f",
"detected_licenses": [
"MIT"
],
"directory_id": "0ab260fe2bc6cdf9d589210068e61bc2b88f68c4",
"extension": "py",
"file... | 2.75 | stackv2 | # -*- coding: utf-8 -*-
"""
Low speed DAQ example
Created on Mon Jun 7 10:54:38 2021
https://github.com/ni/nidaqmx-python
@author: crtjur
"""
import nidaqmx
import time
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
def readdaq(channel):
# create task
task = nida... | 110 | 21.01 | 83 | 11 | 691 | python | [] | 0 | true | |
2024-11-18T18:06:02.437547+00:00 | 1,595,917,220,000 | e3165e0cbe7814a3ea52c1b3564aee5cd9fe9479 | 3 | {
"blob_id": "e3165e0cbe7814a3ea52c1b3564aee5cd9fe9479",
"branch_name": "refs/heads/master",
"committer_date": 1595917220000,
"content_id": "711abc45b7ee974559e7711cfe553a1a57bbe57f",
"detected_licenses": [
"MIT"
],
"directory_id": "920d38ce7dfa16574b3b8b360743abd545134aae",
"extension": "py",
"fi... | 2.96875 | stackv2 | # --------------
# --------------
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# code starts here
df=pd.read_csv(path)
# print(df.head())
df.dropna(inplace=True)
df=df[df['Country']=='United Kingdom']
def check(x):
if x[0]=='C':
return True
df['Return']=check... | 115 | 23.49 | 94 | 12 | 741 | python | [] | 0 | true | |
2024-11-18T18:06:02.738012+00:00 | 1,600,703,731,000 | 3a06c3591f90eb02a7119d7a64ac4ee26a9e3fa2 | 3 | {
"blob_id": "3a06c3591f90eb02a7119d7a64ac4ee26a9e3fa2",
"branch_name": "refs/heads/master",
"committer_date": 1600703731000,
"content_id": "1edfa28c756a8990de2dfd7509b9a58eaad13b04",
"detected_licenses": [
"MIT"
],
"directory_id": "cef6b4714280f68aa14e2ae9b4c200f06bf5f0c9",
"extension": "py",
"fi... | 2.609375 | stackv2 | #!python3
import winreg
# to convert UTC to local time
from datetime import datetime, timedelta
import struct
import re
def listToDict(lstA, lstB):
zippedLst = zip(lstA, lstB)
op = dict(zippedLst)
return op
def parse_MRUListEx(mrulist):
size = (len(mrulist)) / 4
struct_arg = "<%sI" % (size)
pr... | 67 | 26.55 | 139 | 15 | 468 | python | [] | 0 | true | |
2024-11-18T18:06:02.922741+00:00 | 1,693,152,455,000 | 03a2aace105aebd452a87d6b9fadc7c1ae2f31e5 | 3 | {
"blob_id": "03a2aace105aebd452a87d6b9fadc7c1ae2f31e5",
"branch_name": "refs/heads/main",
"committer_date": 1693152455000,
"content_id": "8c38e3ce9d4dde0ca7d7726065efaf351a1a391a",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e75c5412063078c9ea3e7c71a8dc7a2026083a34",
"extension": "py"... | 2.8125 | stackv2 | import numpy as np
__all__ = ["lombscargle_mbflex"]
def lombscargle_mbflex(
t,
y,
bands,
frequency,
dy=None,
nterms_base=1,
nterms_band=1,
reg_base=None,
reg_band=1e-6,
regularize_by_trace=True,
center_data=True,
):
if (nterms_base == 0) and (nterms_band == 0):
... | 127 | 29.45 | 106 | 20 | 1,047 | python | [] | 0 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.