added stringdate 2024-11-18 17:59:49 2024-11-19 03:44:43 | created int64 0 2,086B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.5 | source stringclasses 1
value | text stringlengths 258 23.4k | num_lines int64 16 649 | avg_line_length float64 15 61 | max_line_length int64 31 179 | ast_depth int64 8 40 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 2 265k | sast_codeql_findings_count int64 0 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T21:37:51.463577+00:00 | 1,630,082,985,000 | eda02116f74a0b6f80355f4ace9faca36f8fd5c9 | 3 | {
"blob_id": "eda02116f74a0b6f80355f4ace9faca36f8fd5c9",
"branch_name": "refs/heads/main",
"committer_date": 1630082985000,
"content_id": "09af81cdf24ed589a253bc809b3e756470ef7aeb",
"detected_licenses": [
"MIT"
],
"directory_id": "13e3ae598474fdc6ef6e6240e71bb63f9ed814e1",
"extension": "py",
"file... | 3.03125 | stackv2 | ###########################################
##Tags processing
##in its own script
##which no longer takes six hours to run!
###########################################
import pandas as pd
import datetime
def main():
print("Start script:", datetime.datetime.now())
tags = load_tags()
tags = combine_count(tag... | 73 | 35.63 | 129 | 18 | 634 | python | [] | 0 | true | |
2024-11-18T21:37:51.571787+00:00 | 1,541,695,682,000 | c381b7b48c30e9b2f6b7657c25fca678bb47998d | 3 | {
"blob_id": "c381b7b48c30e9b2f6b7657c25fca678bb47998d",
"branch_name": "refs/heads/master",
"committer_date": 1541695682000,
"content_id": "5c138803b7cb719700aa5af07aa9885e28b50c2b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8a83bdab1ed28b8eafcb911bea02e6b2605d7752",
"extension": "p... | 2.6875 | stackv2 | from gym_minigrid.extendedminigrid import *
from gym_minigrid.register import register
class UnsafeEnv(ExMiniGridEnv):
"""
Unsafe grid environment, no obstacles, sparse reward
"""
def __init__(self, size=8):
super().__init__(
grid_size=size,
max_steps=4 * size * size,
... | 72 | 24.43 | 86 | 14 | 493 | python | [] | 0 | true | |
2024-11-18T21:37:51.866754+00:00 | 1,633,608,546,000 | ff70083dd05621d9332459225641650ae5825284 | 2 | {
"blob_id": "ff70083dd05621d9332459225641650ae5825284",
"branch_name": "refs/heads/master",
"committer_date": 1633608546000,
"content_id": "6cefc561c576ce69be36770d5a615c1c7e61ea1a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f8641f1fdaa03e2ec69dee6d4a28919b790d9201",
"extension": "py"... | 2.34375 | stackv2 | from datetime import datetime
import scrapy
from crawler.items import Concert
class MetalStormSpider(scrapy.Spider):
name = 'metalstorm'
allowed_domains = ['metalstorm.net']
start_urls = ['http://www.metalstorm.net/events/events.php']
def parse(self, response):
events = response.css('div[id... | 43 | 37.53 | 129 | 18 | 378 | python | [] | 0 | true | |
2024-11-18T21:37:52.047406+00:00 | 1,559,533,184,000 | dd0da097092ed370016eab45f2dde7a1ea02b5c4 | 3 | {
"blob_id": "dd0da097092ed370016eab45f2dde7a1ea02b5c4",
"branch_name": "refs/heads/master",
"committer_date": 1559533184000,
"content_id": "813324d52c34cf70e4e682a68affd5046c4b0e27",
"detected_licenses": [
"Python-2.0"
],
"directory_id": "305d9b24ce12f6efec948cc0eb007562d4ae0586",
"extension": "py"... | 2.9375 | stackv2 | from itertools import product
from string import ascii_letters, ascii_uppercase, digits
from hashlib import md5
import json
def build_medallion_table():
medallion_table = {}
# # medallion X555
# prod = list(product(ascii_uppercase, digits, digits, digits))
# prod_string = [''.join(element) for elemen... | 62 | 32.03 | 99 | 18 | 503 | python | [] | 0 | true | |
2024-11-18T21:37:52.343418+00:00 | 1,355,033,049,000 | 5eff8fd026af696d837ad4e2a9dbbd9a1882cf2e | 3 | {
"blob_id": "5eff8fd026af696d837ad4e2a9dbbd9a1882cf2e",
"branch_name": "refs/heads/master",
"committer_date": 1355033049000,
"content_id": "036c33824e89a8384083b8357d776b1ad11de61a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "742fd4b695d68092c5f0cdce2ec8e2c034ab6baf",
"extension": "py"... | 2.546875 | stackv2 |
def ToNumpyMat(player_results, training_set):
import numpy as np
ret = np.array([result.FullFeatureVector() +
training_set.GetTrainingLabels(result, 1)
for result in player_results], dtype=float)
whitened_ret = np.nan_to_num(whiten(ret))
return whitened_ret
def ... | 120 | 39.26 | 80 | 18 | 1,077 | python | [] | 0 | true | |
2024-11-18T21:37:52.488205+00:00 | 1,608,401,662,000 | e9654ce42a5d6d6f278fa783a9ea61f27b02aa7c | 3 | {
"blob_id": "e9654ce42a5d6d6f278fa783a9ea61f27b02aa7c",
"branch_name": "refs/heads/main",
"committer_date": 1608401662000,
"content_id": "5ff2da1151708267ae0586b99d0d3e708ba2ab20",
"detected_licenses": [
"MIT"
],
"directory_id": "d374b389d609f348e89ea2a01ae3a11624190144",
"extension": "py",
"file... | 3.15625 | stackv2 | import random
from copy import deepcopy
from itertools import groupby
import numpy as np
from scipy.ndimage import rotate
from rendering.ConsoleColours import ConsoleColours
from rendering.display_board import display_board
from rendering.render_table_row import render_table_row
from rendering.display_user_input_menu i... | 271 | 26.85 | 136 | 18 | 1,842 | python | [] | 0 | true | |
2024-11-18T21:37:52.542605+00:00 | 1,597,489,505,000 | 3ebc5e784b84aad9ca789b3f9d90b2d7d4e378ad | 3 | {
"blob_id": "3ebc5e784b84aad9ca789b3f9d90b2d7d4e378ad",
"branch_name": "refs/heads/master",
"committer_date": 1597644372000,
"content_id": "caafb192cfa5da2d324cba8d00c19bcf54e0dd88",
"detected_licenses": [
"MIT"
],
"directory_id": "f2cc023a7f788907b2970b73d3a41d7dea2f39b1",
"extension": "py",
"fi... | 2.828125 | stackv2 | import base64
from functools import singledispatch
import cv2
import numpy as np
import tensorflow as tf
from xplainer.backend.utils.model import get_size
@singledispatch
def get_base64png(image) -> str:
"""
:param image: image path, numpy array or tensor
:return: given image encoded in base64 png, incl... | 79 | 31.32 | 116 | 14 | 653 | python | [] | 0 | true | |
2024-11-18T21:37:53.018572+00:00 | 1,575,405,967,000 | 68889b8a94cb19c3c5e2c6762a21f8ce6a0f11d8 | 3 | {
"blob_id": "68889b8a94cb19c3c5e2c6762a21f8ce6a0f11d8",
"branch_name": "refs/heads/master",
"committer_date": 1575405967000,
"content_id": "0cdbea276ddb88b5ac776f38c17f3d065590b074",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "6fd26735b9dfd1d3487c1edfebf9e1e595196168",
"extension": "p... | 3.015625 | stackv2 | #!/usr/bin/python3
import operator
wires = {}
queue = []
operations = {
'AND': operator.and_,
'OR': operator.or_,
'NOT': operator.invert,
#'XOR': operator.xor,
'LSHIFT': operator.lshift,
'RSHIFT': operator.rshift
}
def parse(expr, dest):
if ' ' not in expr:
if expr.isdigit():
... | 62 | 23.32 | 52 | 17 | 370 | python | [] | 0 | true | |
2024-11-18T21:37:53.076174+00:00 | 1,685,343,633,000 | 18eb330e491ecefff83d988e63b6ecf16d504576 | 3 | {
"blob_id": "18eb330e491ecefff83d988e63b6ecf16d504576",
"branch_name": "refs/heads/master",
"committer_date": 1685343633000,
"content_id": "b04f5c38266a47830f76e433c8d30d4ce9a29930",
"detected_licenses": [
"MIT"
],
"directory_id": "b9fbd8a5e1ef625d2606d9c97504af6b8aa8393a",
"extension": "py",
"fi... | 2.765625 | stackv2 | import common
from collections import deque
from ast import literal_eval
lines = common.read_file().splitlines()
droplets = set()
for line in lines:
droplets.add(literal_eval('('+line+')'))
# part 1
acc = 0
for d in droplets:
acc += len([n for n in common.neighbors_ortho(d) if n not in droplets])
print(acc... | 61 | 24.79 | 75 | 16 | 435 | python | [] | 0 | true | |
2024-11-18T21:37:53.139650+00:00 | 1,693,260,790,000 | cab8378951920bc915598ba2d4ac9e6bd1ec06b2 | 3 | {
"blob_id": "cab8378951920bc915598ba2d4ac9e6bd1ec06b2",
"branch_name": "refs/heads/master",
"committer_date": 1693260790000,
"content_id": "0125f2aa52478453b885002ab7b44dc88afc38cf",
"detected_licenses": [
"MIT"
],
"directory_id": "0d2d772dae2333f6a8b38d427a80043aef568b2c",
"extension": "py",
"fi... | 2.796875 | stackv2 | from __future__ import annotations
from enum import Enum, auto
class SchedulerRole(Enum):
"""
Specifies what the scheduler should be doing when it's running.
Values:
* ``scheduler``: processes due schedules, but won't run jobs
* ``worker``: runs due jobs, but won't process schedules
* ``bot... | 90 | 23.21 | 88 | 8 | 505 | python | [] | 0 | true | |
2024-11-18T21:46:26.098994+00:00 | 1,626,720,962,000 | f3b8fa5cec976d45c3597b944a52006ee6433a01 | 2 | {
"blob_id": "f3b8fa5cec976d45c3597b944a52006ee6433a01",
"branch_name": "refs/heads/main",
"committer_date": 1626720962000,
"content_id": "323e4352dd4b045d200dd4d6ea1a8ca5009eea1c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "666e247add0a69d0f7bc505d02e35ad6f38d5ea4",
"extension": "py",
... | 2.46875 | stackv2 | from typing import Dict, Any, Union, Optional, Tuple
from aim.engine.utils import contexts_equal
class Trace(object):
def __init__(self, repo, metric, name: str, context: Optional[list] = None):
self.repo = repo
self.metric = metric
self.name = name
self.data = []
self.tmp... | 69 | 31.48 | 105 | 17 | 465 | python | [] | 0 | true | |
2024-11-18T21:46:26.151378+00:00 | 1,545,275,243,000 | ef6ed91c2bfe2d47ae960a875b27cb86195aa11a | 3 | {
"blob_id": "ef6ed91c2bfe2d47ae960a875b27cb86195aa11a",
"branch_name": "refs/heads/master",
"committer_date": 1545275243000,
"content_id": "040695f078a29f4dcd4c7e95f523e7fe18a99513",
"detected_licenses": [
"MIT"
],
"directory_id": "5fbbf672572c8bf3ad2f582dbbb1ae370bd46c0d",
"extension": "py",
"fi... | 2.640625 | stackv2 | # lights
from appJar import gui
import time
app=gui()
app.addRadioButton("song", "Killer Queen")
app.addRadioButton("song", "Paradise City")
app.addRadioButton("song", "Parklife")
def press(name):
print (name)
app.thread(animate)
app.addStatusbar()
app.setStatusbar('status...')
app.addButton('test', press)
#here ... | 36 | 24.42 | 74 | 13 | 255 | python | [] | 0 | true | |
2024-11-18T21:46:26.201343+00:00 | 1,584,021,361,000 | def420217f64683309db6f241c3e33402cfe0d9f | 2 | {
"blob_id": "def420217f64683309db6f241c3e33402cfe0d9f",
"branch_name": "refs/heads/master",
"committer_date": 1584021361000,
"content_id": "5f50a1c34ea88f14dc78eeaf35f8d66631471e3b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "403ea844714d301af7778b68862e37008ac06b27",
"extension": "py"... | 2.328125 | stackv2 | """
IRIS Module Data Access Object
PROJECT: BaoAI Backend
AUTHOR: henry <703264459@qq.com>
WEBSITE: http://www.baoai.co
COPYRIGHT: Copyright © 2016-2020 广州源宝网络有限公司 Guangzhou Yuanbao Network Co., Ltd. ( http://www.ybao.org )
LICENSE: Apache-2.0
CREATEDATE: 2019-08-23 16:18:40
"""
from app import db
from .model import... | 255 | 32.82 | 156 | 21 | 1,988 | python | [] | 0 | true | |
2024-11-18T21:46:26.393833+00:00 | 1,620,328,269,000 | 6e1f4e61ce1d71dc9fb3b7e4a65526b5976ab08c | 4 | {
"blob_id": "6e1f4e61ce1d71dc9fb3b7e4a65526b5976ab08c",
"branch_name": "refs/heads/main",
"committer_date": 1620328269000,
"content_id": "748766a7fbfab4fb23ff75b05f7f09fd7e6c1262",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "910567ec6f5d04946e82aa1c908bd12f6f3d9af3",
"extension": "py",
... | 3.515625 | stackv2 | # NOTE: There is a rare error where log.out may contain a non utf-encoded character.
# Simply rerun the experiment if this happens.
import numpy as np
latencies = []
with open('log.out') as log:
line = log.readline()
while line != '': # The EOF char is an empty string
# Extract the latency and its u... | 32 | 36.78 | 91 | 20 | 294 | python | [] | 0 | true | |
2024-11-18T21:46:26.459674+00:00 | 1,561,992,570,000 | ee4057fb38920099dc8bd7cb22cf3458a716100d | 3 | {
"blob_id": "ee4057fb38920099dc8bd7cb22cf3458a716100d",
"branch_name": "refs/heads/master",
"committer_date": 1561992570000,
"content_id": "910d5091862dd13b92e85978629f9525e650ec0d",
"detected_licenses": [
"Unlicense"
],
"directory_id": "37a2327c01a6c86437f49371f3f6955fe905ff64",
"extension": "py",... | 3.171875 | stackv2 | from abc import ABC, abstractmethod
import numpy as np
class Dataset(ABC):
@abstractmethod
def __getitem__(self, idx):
raise NotImplementedError
@abstractmethod
def __len__(self):
raise NotImplementedError
class DataLoader:
class SingleIterable:
def __init__(self, datas... | 62 | 26.81 | 72 | 17 | 351 | python | [] | 0 | true | |
2024-11-18T21:58:55.816260+00:00 | 1,441,453,524,000 | 18cb4e68677221aff1785e8f17d859be6b21e071 | 3 | {
"blob_id": "18cb4e68677221aff1785e8f17d859be6b21e071",
"branch_name": "refs/heads/master",
"committer_date": 1441453524000,
"content_id": "9b5ce8c39d5ab22945dcdc8b74f79b007dcc454f",
"detected_licenses": [
"MIT"
],
"directory_id": "5bc9f5097f63344326165e45e748fdb86baa6253",
"extension": "py",
"fi... | 2.625 | stackv2 | #coding=utf-8
'''
Created on 2015年5月6日
@author: hzwangzhiwei
'''
from app import app
@app.context_processor
def ext_jinja2_processor():
'''
ps:扩展jinja2的内置方法
'''
def str_sub(s, start, end, suffix = None):
'''
str_sub;字符串截断
'''
if suffix:
return s[start:end] +... | 40 | 18 | 91 | 13 | 224 | python | [] | 0 | true | |
2024-11-18T21:58:55.863660+00:00 | 1,584,990,242,000 | c7be10be4f612df20fd5a7ad1278e88bcc234d0e | 3 | {
"blob_id": "c7be10be4f612df20fd5a7ad1278e88bcc234d0e",
"branch_name": "refs/heads/master",
"committer_date": 1584990242000,
"content_id": "ddb2eb47e708f85a7885bbc02726b60833b18d36",
"detected_licenses": [
"MIT"
],
"directory_id": "aa1fc5f92aa63924bb225604db967312b9ef3cf5",
"extension": "py",
"fi... | 3 | stackv2 | #!/usr/bin/env python
#
# Generate/update a XLSX BOM from a KiCad generic netlist
#
"""
@package
Generate/update a XLSX BOM.
Components are sorted by ref and grouped by value with same footprint
Fields are (if exist)
'Ref', 'Qty', 'Value', 'Footprint', 'Description', 'MPN', ...
Command line:
... | 274 | 30.31 | 103 | 19 | 2,180 | python | [] | 0 | true | |
2024-11-18T21:58:55.929798+00:00 | 1,692,974,239,000 | 16482536626a306b36af570b5e2b5952f8905d19 | 3 | {
"blob_id": "16482536626a306b36af570b5e2b5952f8905d19",
"branch_name": "refs/heads/main",
"committer_date": 1692974239000,
"content_id": "8729cdce3e0da97b8ff1bc3bff4708f4d9d1ddd6",
"detected_licenses": [
"Apache-2.0",
"BSD-2-Clause"
],
"directory_id": "6bb45c5892b4c9692dcc44116fb73dc9e7ab90ff",
... | 2.90625 | stackv2 | """Feature engineers the credit dataset."""
import logging
import numpy as np
import pandas as pd
import os
logger = logging.getLogger()
logger.setLevel(logging.INFO)
if __name__ == "__main__":
logger.info("Starting preprocessing.")
input_data_path = os.path.join("/opt/ml/processing/input", "german_credit_da... | 52 | 29.75 | 99 | 14 | 376 | python | [] | 0 | true | |
2024-11-18T21:58:56.097390+00:00 | 1,580,158,101,000 | 002866b0bec95c1ccd163e436ada8523527f39b7 | 2 | {
"blob_id": "002866b0bec95c1ccd163e436ada8523527f39b7",
"branch_name": "refs/heads/master",
"committer_date": 1580158101000,
"content_id": "b41b6d0596025d930c319a05e685ae67cc7bfb1e",
"detected_licenses": [
"MIT"
],
"directory_id": "c750326bc365f3a687d3ed9dabd35e18b50dde3e",
"extension": "py",
"fi... | 2.421875 | stackv2 | import io
import os
import string
import random
from os import path
from threading import Thread
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from notion.block import ImageBlock
from notion.client import Notio... | 175 | 24.77 | 103 | 22 | 1,042 | python | [] | 0 | true | |
2024-11-18T21:58:56.213172+00:00 | 1,623,687,221,000 | b283cd9148a38b0643bd7f2abf15812306c03811 | 2 | {
"blob_id": "b283cd9148a38b0643bd7f2abf15812306c03811",
"branch_name": "refs/heads/master",
"committer_date": 1623687221000,
"content_id": "49bb819e93cb03463060ae075e47f62a652e987e",
"detected_licenses": [
"MIT"
],
"directory_id": "6e950c1fba01e1332f6f436db665b33fecc1466f",
"extension": "py",
"fi... | 2.3125 | stackv2 | import argparse
import numpy as np
from time import time
from data_loader import load_data
from train import train
import os
import mysql.connector
np.random.seed(555)
parser = argparse.ArgumentParser()
# movie
# parser.add_argument('--dataset', type=str, default='movie', help='which dataset to use')
# parser.add_ar... | 90 | 46.34 | 120 | 14 | 1,071 | python | [] | 0 | true | |
2024-11-18T21:58:56.487690+00:00 | 1,586,188,651,000 | 5a0905f849313821684204a38e874d1f8db71a57 | 4 | {
"blob_id": "5a0905f849313821684204a38e874d1f8db71a57",
"branch_name": "refs/heads/master",
"committer_date": 1586188651000,
"content_id": "c3b99d85ffdcc7335c7b193d1c188a5dd4f18813",
"detected_licenses": [
"MIT"
],
"directory_id": "ec6fbe25fd41fd7f09209c43c2af7cb0f7adba32",
"extension": "py",
"fi... | 3.6875 | stackv2 | from abc import ABC, abstractmethod
class TextProvider(ABC):
"""An abstract proxy to a collection of text resources.
TextProvider is the base class for any concrete class that exposes a
`resources` generator and a `get_text` method. A Genius object, for
example, is also a TextProvider: i... | 52 | 36.63 | 78 | 11 | 416 | python | [] | 0 | true | |
2024-11-18T21:58:56.666852+00:00 | 1,543,168,142,000 | b2d2395b67bac4943d18a37c70faf08db402591d | 2 | {
"blob_id": "b2d2395b67bac4943d18a37c70faf08db402591d",
"branch_name": "refs/heads/master",
"committer_date": 1543168142000,
"content_id": "bd619a5edc5aabbec3c371fdf3943061223b60ba",
"detected_licenses": [
"MIT"
],
"directory_id": "bd85c4a11c68dc5bfb1e1a53565e3529049c8a2a",
"extension": "py",
"fi... | 2.5 | stackv2 | #!/usr/bin/env python3
# Export Greek LaTeX text from Jupyter Notebooks
# Author: Marios Papachristou
# Usage: jupyter nbconvert foo.ipynb --to latex --stdout | jupyter-greek-latex.py >result.tex
import sys
import os
this_dir, this_filename = os.path.split(__file__)
with open(os.path.join(this_dir, 'delimiter.aux... | 19 | 26 | 93 | 11 | 140 | python | [] | 0 | true | |
2024-11-18T21:58:57.119678+00:00 | 1,642,370,935,000 | 3f314d3c5cd5171921d9c6a6a89a5deedf9e9880 | 2 | {
"blob_id": "3f314d3c5cd5171921d9c6a6a89a5deedf9e9880",
"branch_name": "refs/heads/master",
"committer_date": 1642370935000,
"content_id": "28654b6058e5fb1b08eec9e04d03852a53289c7a",
"detected_licenses": [
"MIT"
],
"directory_id": "b2da9483da24f0b7f0e19c3d88a824ca2a31f41c",
"extension": "py",
"fi... | 2.484375 | stackv2 | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
def pulsar_dataset(dir='pulsar_stars.csv'):
df = pd.read_csv(dir)
X = df.drop(['target_class'], axis = 1)
y = df['target_class'].values
feature_names = list(X.... | 24 | 28.42 | 102 | 10 | 192 | python | [] | 0 | true | |
2024-11-18T21:58:57.175940+00:00 | 1,612,469,465,000 | 4606fa6f98629b9a259e3b1d349a82f6d5932a0a | 2 | {
"blob_id": "4606fa6f98629b9a259e3b1d349a82f6d5932a0a",
"branch_name": "refs/heads/master",
"committer_date": 1612469465000,
"content_id": "9d4e4c422acf7f6deba1b22ec9242ddc867f4eb6",
"detected_licenses": [
"MIT"
],
"directory_id": "ae73bc511ade5cc523547a68ca97a8b9d8e99274",
"extension": "py",
"fi... | 2.484375 | stackv2 | import transaction
from flask import session
def add_regex(regex: str):
session['new_regex'] = regex
session.setdefault('regexes', []).append(regex)
def get_regexes():
return session.setdefault('regexes', [])
def remove_regex(regex: str):
session['regexes'] = list(filter(lambda r: r != regex, sess... | 30 | 22.6 | 87 | 13 | 175 | python | [] | 0 | true | |
2024-11-18T21:58:57.244320+00:00 | 1,622,449,007,000 | 43113ab5d7730a6feb6946d735b9d8e06aaa361f | 2 | {
"blob_id": "43113ab5d7730a6feb6946d735b9d8e06aaa361f",
"branch_name": "refs/heads/main",
"committer_date": 1622449007000,
"content_id": "648843ac84b315d5fbe8b58662b6f806d6161b6c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2fd14caa8bc6d2f9a1d9f6732423d4b8153d3845",
"extension": "py",
... | 2.359375 | stackv2 | from pgdrive.constants import TerminationState
from pgdrive.envs.pgdrive_env import PGDriveEnv
from pgdrive.utils import PGConfig
from pgdrive.utils.math_utils import clip
class SafePGDriveEnv(PGDriveEnv):
def default_config(self) -> PGConfig:
config = super(SafePGDriveEnv, self).default_config()
... | 139 | 36.56 | 111 | 17 | 1,197 | python | [] | 0 | true | |
2024-11-18T21:58:58.099206+00:00 | 1,688,128,634,000 | 982dbd1a8d5042161f5e1d024ec71f1da993caba | 2 | {
"blob_id": "982dbd1a8d5042161f5e1d024ec71f1da993caba",
"branch_name": "refs/heads/master",
"committer_date": 1688129837000,
"content_id": "f663c6d5cbd8dedf4d1a78a5c157669943ca8044",
"detected_licenses": [
"MIT"
],
"directory_id": "c64e5dd721aacf116f9538fdc285d5740cc43179",
"extension": "py",
"fi... | 2.421875 | stackv2 | import datetime
import json
import re
from urllib.parse import urlencode
from bs4 import BeautifulSoup
from .. import Crawler, Feeder, ImageDownloader, Parser
from .filter import Filter
class GoogleFeeder(Feeder):
def get_filter(self):
search_filter = Filter()
# type filter
def format_t... | 205 | 35.47 | 119 | 22 | 1,753 | python | [] | 0 | true | |
2024-11-18T21:58:58.163146+00:00 | 1,501,777,075,000 | c33680a2110ddd628ea9e0fbef017ebec0d7d944 | 3 | {
"blob_id": "c33680a2110ddd628ea9e0fbef017ebec0d7d944",
"branch_name": "refs/heads/master",
"committer_date": 1501777075000,
"content_id": "2483675614ac494748ae78d0935fd83922a89550",
"detected_licenses": [
"MIT"
],
"directory_id": "e3ceda50d6bcad5b097205b12f724222a95ce593",
"extension": "py",
"fi... | 3.015625 | stackv2 | """
Utility functions
"""
from __future__ import print_function
import datetime
import os
import sys
# pylint: disable=import-error
import yaml
def module_exists(module_name):
"""
Does the specified module exist?
:param module_name:
:return: boolean
"""
try:
__import__(module_name)
... | 131 | 20.14 | 95 | 15 | 661 | python | [] | 0 | true | |
2024-11-18T21:58:58.374607+00:00 | 1,615,166,661,000 | 02e0eb97f7e259074f23b329f62813bc75089b35 | 4 | {
"blob_id": "02e0eb97f7e259074f23b329f62813bc75089b35",
"branch_name": "refs/heads/master",
"committer_date": 1615166661000,
"content_id": "dc1a2a02090282b397c0621ad88b7f3b4645bec9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a74b980fd95d5d810315f181449fc9d1710e6923",
"extension": "py"... | 3.515625 | stackv2 | """helper for time\n
UTCTime:
UTCTime values take the form of either "YYMMDDhhmm[ss]Z" or "YYMMDDhhmm[ss](+|-)hhmm".
The first form indicates (by the literal letter "Z") UTC time. The second form indicates
a time that differs from UTC by plus or minus the hours and minutes represented by the final "hhmm".
These form... | 123 | 33.76 | 101 | 15 | 1,307 | python | [] | 0 | true | |
2024-11-18T21:58:58.503044+00:00 | 1,607,718,788,000 | e228718e3b40f22df8dde0fb833fff2219b17aa9 | 3 | {
"blob_id": "e228718e3b40f22df8dde0fb833fff2219b17aa9",
"branch_name": "refs/heads/main",
"committer_date": 1607718788000,
"content_id": "3f15ac7b9722f32c0c77190920cbe0e4aa26f2b5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0e2e64a23f65a1925e14a47e745b29b925a38701",
"extension": "py",
... | 2.75 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 24 17:27:32 2020
@author: wchhuang
"""
import networkx as nx
import numpy as np
from louvain import louvain_partition, plot_partitions_FR
import networkx.algorithms.shortest_paths.weighted as spw
import matplotlib.pyplot as plt
from matplotlib import cm
import loadcsv
impo... | 205 | 35.23 | 100 | 19 | 1,940 | python | [] | 0 | true | |
2024-11-18T21:58:58.658667+00:00 | 1,607,664,318,000 | 8a49bea4182531415473d49997c2b953685015dd | 3 | {
"blob_id": "8a49bea4182531415473d49997c2b953685015dd",
"branch_name": "refs/heads/master",
"committer_date": 1607665552000,
"content_id": "97eaeda821f49786991355543516a511bb46c960",
"detected_licenses": [
"MIT"
],
"directory_id": "d2dc242930a69774fee51a7e3f7c112557e7540f",
"extension": "py",
"fi... | 2.765625 | stackv2 | import argparse
import hashlib
import onnx
import onnx.numpy_helper
def weights_hash(filename):
model = onnx.load(filename)
for initializer in model.graph.initializer:
data = onnx.numpy_helper.to_array(initializer)
sha1 = hashlib.sha1(data.tobytes()).hexdigest()
print(f"{initializer.n... | 25 | 24.16 | 82 | 14 | 140 | python | [] | 0 | true | |
2024-11-18T21:58:58.973708+00:00 | 1,517,140,122,000 | 8a087eac261b106acc9d2fae5ba8ade498751ba9 | 3 | {
"blob_id": "8a087eac261b106acc9d2fae5ba8ade498751ba9",
"branch_name": "refs/heads/master",
"committer_date": 1517140122000,
"content_id": "d99355c160292df2b678338384aeaf12d08e0271",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a595b9a7ef78b669206a6708f54f1e32a2e8ed77",
"extension": "py"... | 3.109375 | stackv2 | '''
import sklearn
from sklearn import svm
import random
from random import shuffle
import numpy as np
file1 = open("iris.data", "r")
temp_counter = 0
pattern_temp = []
pattern = []
correct_class = []
for line in file1.readlines():
line=line.split(',')
pattern_temp.append([])
for i in range(len(l... | 141 | 25.42 | 76 | 12 | 947 | python | [] | 0 | true | |
2024-11-18T21:58:59.044908+00:00 | 1,548,962,394,000 | f2ddec07bb28bc28738bf4958e59da5b593af826 | 3 | {
"blob_id": "f2ddec07bb28bc28738bf4958e59da5b593af826",
"branch_name": "refs/heads/master",
"committer_date": 1548962394000,
"content_id": "8f9d0172d11ff725a9f9b2e1fd7f5869c52431ab",
"detected_licenses": [
"MIT"
],
"directory_id": "a9aa200fb14b909e66f7011056627f77c9bec3b0",
"extension": "py",
"fi... | 2.734375 | stackv2 | import numpy as np
from mpl_toolkits.mplot3d import axes3d, Axes3D # <-- Note the capitalization!
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import os
# Inspired from: http://gouthamanbalaraman.com/blog/volatility-smile-heston-model-calibration-quantlib-python.html
def visualize_vol_surface_helper(X... | 52 | 43.5 | 114 | 14 | 617 | python | [] | 0 | true | |
2024-11-18T21:58:59.364647+00:00 | 1,617,825,433,000 | 9aeca9a4dbf652ded2db7f564d082795877320e4 | 2 | {
"blob_id": "9aeca9a4dbf652ded2db7f564d082795877320e4",
"branch_name": "refs/heads/master",
"committer_date": 1617825433000,
"content_id": "989a78adff2cbacac3af520f36bef8a7a6270466",
"detected_licenses": [
"Python-2.0",
"MIT"
],
"directory_id": "fd1b2397180e55356aee7cb3964421292188f3df",
"exten... | 2.421875 | stackv2 | from dataclasses import dataclass, field
from typing import Collection, Iterable, Optional, Sequence, Set
from di.core.element import Element
from di.utils.graph import DirectionalGraph, DirectionalGraphEdge
@dataclass
class Module:
name: Optional[str] = None
elements: Set[Element] = field(default_factory=se... | 75 | 24.87 | 69 | 14 | 419 | python | [] | 0 | true | |
2024-11-18T21:58:59.423947+00:00 | 1,679,431,093,000 | c15c4dd66b8c63932986db4539aee1df157aaff0 | 4 | {
"blob_id": "c15c4dd66b8c63932986db4539aee1df157aaff0",
"branch_name": "refs/heads/master",
"committer_date": 1679431093000,
"content_id": "cc0e940f8649e5c53c0f8bd972b8452f82858df9",
"detected_licenses": [
"MIT"
],
"directory_id": "addd8e48c2ce753a1d1205eab0742e1c7b1e7acb",
"extension": "py",
"fi... | 3.5 | stackv2 | import enum
class Suit:
def __init__(self, name, symbol):
self.name = name
self.symbol = symbol
def __eq__(self, other):
if other == None:
return False
if self.name == other.name and self.symbol == other.symbol:
return True
else:
... | 40 | 23.85 | 98 | 13 | 281 | python | [] | 0 | true | |
2024-11-18T21:58:59.696791+00:00 | 1,599,067,006,000 | 69c676fe2e5d411fb58f676d98c23b5ea14d78d5 | 3 | {
"blob_id": "69c676fe2e5d411fb58f676d98c23b5ea14d78d5",
"branch_name": "refs/heads/master",
"committer_date": 1599067006000,
"content_id": "9db2a0e996add6da1fd1ab5d4a8bd61e10bebc09",
"detected_licenses": [
"MIT"
],
"directory_id": "034f6c6a3d85d76ebf3872bf1a32118ced739dc6",
"extension": "py",
"fi... | 2.84375 | stackv2 | import json
import os
from pathlib import Path
class Data:
def __init__(self):
super().__init__()
self.data = {}
self.dirname = os.path.dirname(__file__)
self.length = 0
self.savepath = "../../data/raw/"
self.tracker = []
def getLength(self):
return se... | 63 | 24.94 | 59 | 17 | 350 | python | [] | 0 | true | |
2024-11-18T21:58:59.859596+00:00 | 1,582,303,264,000 | 52ad2093bbd2bb0a17ffd6cd0d425253ac601641 | 2 | {
"blob_id": "52ad2093bbd2bb0a17ffd6cd0d425253ac601641",
"branch_name": "refs/heads/master",
"committer_date": 1582303264000,
"content_id": "4348d2be55933a271435f2ac92ce11d41314aafc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "31d7b49742e1d6e6463248bbf257e0e9de271a18",
"extension": "py"... | 2.40625 | stackv2 | # emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 et:
"""
.. _pap2:
=========================================
Discrete decoding
=========================================
Decode ROIs from Rubin et al. (2017).
"""
##################################... | 87 | 33.43 | 92 | 12 | 681 | python | [] | 0 | true | |
2024-11-18T21:59:00.012915+00:00 | 1,617,000,519,000 | a329909305a2161b106f9bc96d80c6c6ecdee44f | 3 | {
"blob_id": "a329909305a2161b106f9bc96d80c6c6ecdee44f",
"branch_name": "refs/heads/main",
"committer_date": 1617000519000,
"content_id": "9f5b091f7e1213688a9c9e680faf83827e681c91",
"detected_licenses": [
"MIT"
],
"directory_id": "502a2a60e2c55a232a8f0dac872d6ff136b6c3eb",
"extension": "py",
"file... | 3.078125 | stackv2 | #!/usr/bin/env python
"""Audit postcodes."""
import xml.etree.cElementTree as ET
import pprint
round_rock_postcodes = set(['78626', '78634', '78681', '78717', '78660', '78728', '78664', '78665', '78628'])
not_post_code = set()
checked_postcode = set()
# ************************************** audit_postcodes() **... | 112 | 36.01 | 123 | 21 | 966 | python | [] | 0 | true | |
2024-11-18T21:59:00.079593+00:00 | 1,607,045,356,000 | a5e65dcd4eb15216982c729858e0f32efce4568c | 2 | {
"blob_id": "a5e65dcd4eb15216982c729858e0f32efce4568c",
"branch_name": "refs/heads/master",
"committer_date": 1607045356000,
"content_id": "6a8b3b80640f727df01c0f50f3ee940aac30963d",
"detected_licenses": [
"MIT"
],
"directory_id": "32f5b3e8299f01bb421e2e2aa324c3f883af1dcf",
"extension": "py",
"fi... | 2.359375 | stackv2 | from untwisted.network import SuperSocket
from untwisted.client import Client, CONNECT
from untwisted.sock_writer import SockWriter, DUMPED
from untwisted.sock_reader import SockReader
from socket import socket, AF_INET, SOCK_STREAM
from untwisted.core import die
from untwisted import core
def setup(con, msg):
Soc... | 41 | 28.51 | 63 | 11 | 298 | python | [] | 0 | true | |
2024-11-18T21:59:00.270903+00:00 | 1,623,052,181,000 | 1d9577e7134198f40bc979352cb0e62086b201fc | 3 | {
"blob_id": "1d9577e7134198f40bc979352cb0e62086b201fc",
"branch_name": "refs/heads/main",
"committer_date": 1623052181000,
"content_id": "e29a70662e6f6bd7bc35c41cec5d8bccc7e1d521",
"detected_licenses": [
"MIT"
],
"directory_id": "e4bcab4ddabb53c6d94541058b4a2a1bde5fefd2",
"extension": "py",
"file... | 3.171875 | stackv2 | import pandas as pd
df = pd.read_csv('forbes_billionaires.csv')
def list_to_dict(attributes, list):
dict = {}
i = 0
for attribute in attributes:
dict[attribute] = list[i]
i += 1
return dict
# print(list_to_dict(df.columns, df.values[0]))
forbes_billionaires_list = list(map(lambda x... | 21 | 21.1 | 87 | 12 | 123 | python | [] | 0 | true | |
2024-11-18T21:59:00.317092+00:00 | 1,625,164,274,000 | 8bcf36ffe1ffa86e9736f91c110db2e74a5f3d89 | 2 | {
"blob_id": "8bcf36ffe1ffa86e9736f91c110db2e74a5f3d89",
"branch_name": "refs/heads/master",
"committer_date": 1625164274000,
"content_id": "b3f245e947f5c22cf5accbe226bd04a4b03de33a",
"detected_licenses": [
"MIT"
],
"directory_id": "fe538c6c273a5d6e228c6e4612a598973ab3af0a",
"extension": "py",
"fi... | 2.34375 | stackv2 | import argparse
import json
import numpy as np
from evaulate_pt import *
from evaulate_pt import Config as cg_pt
from evaulate_tf import DatasetGeneratorTF, TfModel
from evaulate_tf import Config as cg
from evaulate_sst import *
def argp():
parser = argparse.ArgumentParser(description='Script to train pytorch s... | 86 | 36.92 | 158 | 17 | 735 | python | [] | 0 | true | |
2024-11-18T21:59:00.497280+00:00 | 1,562,152,809,000 | d1cc70b039bb324c1fbbb3dbeec0a39694c49465 | 2 | {
"blob_id": "d1cc70b039bb324c1fbbb3dbeec0a39694c49465",
"branch_name": "refs/heads/master",
"committer_date": 1562152809000,
"content_id": "672058f089461f7fb4ae5dba29f80048ca8b13d2",
"detected_licenses": [
"BSD-3-Clause",
"BSD-2-Clause"
],
"directory_id": "1662b1cc718aaa441ee9cc555bc7cc2be1f1f326... | 2.46875 | stackv2 | import torch
import torch.nn as nn
from torch.nn import init
import functools
import pdb
'''
This Network is designed for Few-Shot Learning Problem.
'''
###############################################################################
# Functions
##################################################################... | 253 | 28.54 | 140 | 20 | 2,201 | python | [] | 0 | true | |
2024-11-18T21:59:00.598329+00:00 | 1,457,886,478,000 | bda31dc4752eed2d6915f09825fda0ce24688eca | 3 | {
"blob_id": "bda31dc4752eed2d6915f09825fda0ce24688eca",
"branch_name": "refs/heads/master",
"committer_date": 1457886478000,
"content_id": "9becb09f373812ff27118d7dcbae6d34f395e4bb",
"detected_licenses": [
"MIT"
],
"directory_id": "f3bc0ed93b5311a3f61eb5726b855abc797d3885",
"extension": "py",
"fi... | 3.03125 | stackv2 | # -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
from sklearn.feature_extraction import DictVectorizer
from sklearn.preprocessing import StandardScaler
import random
class DataFrameDictVectorizer():
def __init__(self):
self.vec = None
self.cols = None
def _transformation(self, s... | 97 | 33.15 | 90 | 15 | 868 | python | [] | 0 | true | |
2024-11-18T21:59:00.712631+00:00 | 1,628,057,469,000 | 6823b8717b297098bd59627aa9dfa1ff9889c61c | 3 | {
"blob_id": "6823b8717b297098bd59627aa9dfa1ff9889c61c",
"branch_name": "refs/heads/master",
"committer_date": 1628057469000,
"content_id": "d9233cf924983e9f6ee77b6df8147b6a72f728aa",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "95fddd71d1936b6ef4c4bb31dd5ef2523fdca676",
"extension": "p... | 3.296875 | stackv2 | # Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
"""
This shows a table editor which has column-specific context menus.
The demo is a simple baseball scoring system, which lists each player and
their current batting statistics. After a given player has an at bat, you
right-click on the table cell correspo... | 162 | 30.85 | 78 | 15 | 1,144 | python | [] | 0 | true | |
2024-11-18T21:59:00.863360+00:00 | 1,554,807,352,000 | 90eb87b78954cba0eeef37707a9c7bc0b0c2265b | 3 | {
"blob_id": "90eb87b78954cba0eeef37707a9c7bc0b0c2265b",
"branch_name": "refs/heads/master",
"committer_date": 1554807352000,
"content_id": "5ab42126a0a53a41b3a014f8d45fe22e607c16e7",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "38229aa087adbf1152eff19f9fa9ee73b06821f1",
"extension": "p... | 2.640625 | stackv2 |
class UserDeleteMixin:
class Meta:
abstract = True
@classmethod
def clean_instance(cls, info, instance, errors):
user = info.context.user
if instance == user:
cls.add_error(errors, 'id', 'You cannot delete your own account.')
elif instance.is_superuser:
... | 34 | 28.91 | 78 | 14 | 219 | python | [] | 0 | true | |
2024-11-18T21:59:01.137022+00:00 | 1,599,129,987,000 | c4ae7f98cf5c0236750943330ebd72ed3bfc3cd3 | 2 | {
"blob_id": "c4ae7f98cf5c0236750943330ebd72ed3bfc3cd3",
"branch_name": "refs/heads/master",
"committer_date": 1599129987000,
"content_id": "837256bceb629a95358e4af916702a7db87c30a1",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "9b1750656bb5501996ef023809e8add942e49946",
"extension": "p... | 2.390625 | stackv2 | import sys
import logging
import re
import importlib.util
import runpy
from typing import List
from pathlib import Path
import click
from tiepy import __version__
from tiepy.check import Issue
from tiepy.check.overrides import OverridesChecker
_s3_path_re = re.compile(r"s3://(.+?)/(.+)?$")
@click.command()
@click... | 57 | 21.53 | 96 | 14 | 314 | python | [] | 0 | true | |
2024-11-18T21:59:01.388803+00:00 | 1,436,205,514,000 | 2584feeaf97d5d1441ffac875a03538f05413931 | 3 | {
"blob_id": "2584feeaf97d5d1441ffac875a03538f05413931",
"branch_name": "refs/heads/master",
"committer_date": 1436205514000,
"content_id": "af1a5453c53a897ae33ee0e8e71a1b00bf0bc331",
"detected_licenses": [
"MIT"
],
"directory_id": "8336506033cf7d7167e7f911529890a8056eef37",
"extension": "py",
"fi... | 2.78125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os.path
import sys
import argparse
import tempfile
import subprocess
import re
import warnings
newline_re = re.compile(r'([\n\t]+)$')
ending_re = re.compile(r'( +)([\n\t]+)$')
bits_per_char = 7
binary_format = '{:0%db}' % bits_per_char
def get_message(editor=None... | 169 | 30.38 | 78 | 17 | 1,248 | python | [] | 0 | true | |
2024-11-18T21:59:01.452226+00:00 | 1,601,739,771,000 | 14efe4028054b802b67890f711dac21669837ddd | 3 | {
"blob_id": "14efe4028054b802b67890f711dac21669837ddd",
"branch_name": "refs/heads/master",
"committer_date": 1601739771000,
"content_id": "966863cfc9c1401b294ca7bc11905673230a3a2e",
"detected_licenses": [
"MIT"
],
"directory_id": "32e63a555fddecd5365854d4d509e8f6c10389f6",
"extension": "py",
"fi... | 3.28125 | stackv2 | '''
Make a Python script that sends an email to a Gmail User.
Finally convert it to a bomb.
The script will qualify as a bomb if it is able to send 50 emails to the user.
'''
import smtplib
def send_email():
# Enter your login credentials below
username = 'sendanonymous90'
password = '*******'
FROM ... | 35 | 23.74 | 87 | 9 | 237 | python | [] | 0 | true | |
2024-11-18T21:59:01.686715+00:00 | 1,626,271,869,000 | c6e41cc49317bc6a8e7efef0482e880cacd5b36a | 3 | {
"blob_id": "c6e41cc49317bc6a8e7efef0482e880cacd5b36a",
"branch_name": "refs/heads/main",
"committer_date": 1626271869000,
"content_id": "b621edc261b99f5511157dcd02ec2809235f3c3d",
"detected_licenses": [
"MIT",
"BSL-1.0"
],
"directory_id": "69b35849cf3fb33170eff146dc590f5fdf909ad7",
"extension"... | 2.9375 | stackv2 | # MIT License
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP.
#
# haGroups : High Availability (HA) appliance groups
def get_ha_groups(self) -> dict:
"""Get all appliances paired in HA configuration
.. list-table::
:header-rows: 1
* - Swagger Section
- Method
... | 105 | 31.66 | 71 | 15 | 920 | python | [] | 0 | true | |
2024-11-18T21:59:01.936108+00:00 | 1,693,497,978,000 | 6e80f8793ba9c5d211f3c95a7aff65240ae102a4 | 2 | {
"blob_id": "6e80f8793ba9c5d211f3c95a7aff65240ae102a4",
"branch_name": "refs/heads/master",
"committer_date": 1693497978000,
"content_id": "53c37b38650b1f4f492b1e82480f40e12de18607",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f926b3e6ce2716d6360013c2e8cecb2b1fcc6b16",
"extension": "py"... | 2.3125 | stackv2 | """
Module defines clone feature
"""
import hashlib
from contextlib import contextmanager
from multiprocessing import Process
from typing import Union
from twindb_backup import INTERVALS, LOG, MBSTREAM_BINARY, XBSTREAM_BINARY
from twindb_backup.configuration import TwinDBBackupConfig
from twindb_backup.destination.ssh... | 341 | 32.86 | 105 | 18 | 2,796 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_18210dc5b16ae813_9ec20af8", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | |
2024-11-18T21:59:02.014271+00:00 | 1,628,803,250,000 | 7fc5e64f1007af1ebf07e638b08b9e8251a03f53 | 3 | {
"blob_id": "7fc5e64f1007af1ebf07e638b08b9e8251a03f53",
"branch_name": "refs/heads/master",
"committer_date": 1628803250000,
"content_id": "80f9ef84c9aac837ab7baf529f216ccd0729bcd2",
"detected_licenses": [
"MIT"
],
"directory_id": "a692d1c708cc2c5c01574388576c43c635482f9c",
"extension": "py",
"fi... | 2.875 | stackv2 | # MIT License
#
# Copyright (c) 2021 Ferhat Geçdoğan All Rights Reserved.
# Distributed under the terms of the MIT License.
#
# lyricpys - song lyrics engine interpreter (implementation of lyricpps)
# -----------------------------------------
# lyricpys uses tree to store datas instead of plain-text parsing.
#
# github... | 193 | 26.9 | 89 | 22 | 1,430 | python | [] | 0 | true | |
2024-11-18T21:59:02.256006+00:00 | 1,614,008,212,000 | f4b77dd04ce913a3ccd23e7e4ea4e39683e7061a | 3 | {
"blob_id": "f4b77dd04ce913a3ccd23e7e4ea4e39683e7061a",
"branch_name": "refs/heads/master",
"committer_date": 1614008212000,
"content_id": "1118bf3204f035c4cffa5f4447caf289b2fbf805",
"detected_licenses": [
"MIT"
],
"directory_id": "913e24ea110f839c73363bc1aac9673e561fa5f8",
"extension": "py",
"fi... | 2.546875 | stackv2 | import numpy as np
import torch
from rlkit.torch.data_management.normalizer import TorchFixedNormalizer
from rlkit.torch.networks import TanhMlpPolicy, FlattenMlp
class TdmNormalizer(object):
def __init__(
self,
env,
vectorized,
normalize_tau=False,
max... | 223 | 32.28 | 79 | 18 | 1,596 | python | [] | 0 | true | |
2024-11-18T21:59:02.755862+00:00 | 1,534,408,875,000 | 60a7b27daf2487809b6213582d32f981a2deb44e | 3 | {
"blob_id": "60a7b27daf2487809b6213582d32f981a2deb44e",
"branch_name": "refs/heads/master",
"committer_date": 1534408875000,
"content_id": "88fd0f73c89f44ff395a9f6cebd0fc94a0532ac7",
"detected_licenses": [
"MIT"
],
"directory_id": "022128a505c878c271597fb86c8356ac68bcb887",
"extension": "py",
"fi... | 2.84375 | stackv2 | #!/usr/bin/env python
import pdf2image
from PIL import Image
import numpy as np
import sys, os
def process_pdf(filename,path=""):
if len(path) > 0 and path[len(path)-1] != "/":
path = path + "/"
filename = path + filename
images = pdf2image.convert_from_path(filename)
new_images = []
# set window size and thre... | 153 | 31.97 | 120 | 19 | 1,548 | python | [] | 0 | true | |
2024-11-18T21:59:02.812107+00:00 | 1,484,002,342,000 | 624bdd993d62f1a4b9170ebd43324542a7cf5ad9 | 2 | {
"blob_id": "624bdd993d62f1a4b9170ebd43324542a7cf5ad9",
"branch_name": "refs/heads/master",
"committer_date": 1484002342000,
"content_id": "2aa65a8bfcf4bc739eda31eeb3936b0c21172f33",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c9896a387cccea77458dccca7fc492cbe0bb4313",
"extension": "py"... | 2.453125 | stackv2 | # Copyright 2016 IBM All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 350 | 43.28 | 175 | 27 | 3,077 | python | [] | 0 | true | |
2024-11-18T21:59:02.981877+00:00 | 1,509,363,262,000 | fb73ef5683f6261aa7362158f716c3678c3033d6 | 3 | {
"blob_id": "fb73ef5683f6261aa7362158f716c3678c3033d6",
"branch_name": "refs/heads/master",
"committer_date": 1509363262000,
"content_id": "f997ea8aedf620c697315cacdb55fc708533cd16",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a1dce04838e2a4aa85e8a98459ae384aa00911bc",
"extension": "p... | 2.671875 | stackv2 | import struct
from data_specification.data_specification_executor_functions \
import DataSpecificationExecutorFunctions as Dsef
from data_specification import exceptions, constants
from data_specification.enums import commands
import traceback
class DataSpecificationExecutor(object):
""" Used to execute a d... | 205 | 41.2 | 79 | 19 | 1,645 | python | [] | 0 | true | |
2024-11-18T21:59:03.099681+00:00 | 1,523,954,692,000 | c64c93f22144812badcc26bbe942fe8405797e53 | 3 | {
"blob_id": "c64c93f22144812badcc26bbe942fe8405797e53",
"branch_name": "refs/heads/master",
"committer_date": 1523954692000,
"content_id": "f4c1b11d926b9e074d2daf95c35686d90776c457",
"detected_licenses": [
"MIT"
],
"directory_id": "153f617c4442be71d9c96ff03ceb532b0b5efdb9",
"extension": "py",
"fi... | 2.5625 | stackv2 | from . import util
def add_rm_parser(subparsers):
parser = subparsers.add_parser('rm', help="list files in data or output storage")
parser.add_argument('files', metavar='file', help='uri/path to file(s) to remove', nargs='+')
parser.set_defaults(run=run_rm)
def run_rm(args):
for uri in args.files:
... | 34 | 38.26 | 97 | 15 | 285 | python | [] | 0 | true | |
2024-11-18T21:59:03.279322+00:00 | 1,604,311,173,000 | fecc69a47efb94c8706052fe2a27b5369e0e7ddf | 3 | {
"blob_id": "fecc69a47efb94c8706052fe2a27b5369e0e7ddf",
"branch_name": "refs/heads/master",
"committer_date": 1604311173000,
"content_id": "1cb875e4b6b50045166b85472bcdb3c270e48146",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b27e0c502b9b2e90c26c6b39a02f7f36aadc60bb",
"extension": "py"... | 2.578125 | stackv2 | import pickle
import tensorflow as tf
from imbDRL.metrics import classification_metrics, network_predictions
from imbDRL.train.bandit import TrainBandit
class TrainCustomBandit(TrainBandit):
"""Class for the bandit training environment."""
def collect_metrics(self, X_val, y_val):
"""Collects metrics... | 35 | 37.17 | 82 | 15 | 295 | python | [] | 0 | true | |
2024-11-18T21:59:04.421201+00:00 | 1,692,991,113,000 | f39e09d708e38d7b1e66d317eb8999f8e0393c16 | 3 | {
"blob_id": "f39e09d708e38d7b1e66d317eb8999f8e0393c16",
"branch_name": "refs/heads/master",
"committer_date": 1692991113000,
"content_id": "12388a1f7de5f3740d0023002b3e552e6bf9c2e7",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "bf681fbd7edbf4f8f1e0b20cbd09b362f777c9c3",
"extension": "p... | 2.703125 | stackv2 | """
Torch utilities to fit friction model coefficients to data.
The coordinate change approach is adapted from:
Sutanto, Giovanni, Austin S Wang, Yixin Lin, Mustafa Mukadam, Gaurav S
Sukhatme, Akshara Rai, and Franziska Meier.
"Encoding Physical Constraints in Differentiable Newton-Euler Algorithm"
https://arx... | 270 | 27.02 | 78 | 16 | 1,911 | python | [] | 0 | true | |
2024-11-18T21:59:04.605093+00:00 | 1,611,864,598,000 | f6bb1e83bbbba86962bc8924c4e5fda30c9f5b61 | 3 | {
"blob_id": "f6bb1e83bbbba86962bc8924c4e5fda30c9f5b61",
"branch_name": "refs/heads/master",
"committer_date": 1611864598000,
"content_id": "ef23f50862649058411fbeba57117ef29ef4cd67",
"detected_licenses": [
"MIT"
],
"directory_id": "b75d725ad5529b840ead1f0c48b092a56e01937f",
"extension": "py",
"fi... | 3.3125 | stackv2 | # -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
from thompsonlib.common.colors import randomColor
''' Fit function library '''
class FitFunc:
def __init__(self, name, args, helpStr="", latexFormula=""):
self.name = name
self.args = args
self.helpStr = helpStr
self.latexFo... | 188 | 36.04 | 164 | 18 | 2,563 | python | [] | 0 | true | |
2024-11-18T21:59:04.768264+00:00 | 1,583,022,451,000 | e0960c394aec3d39c5b3533392f483fbae980cb7 | 4 | {
"blob_id": "e0960c394aec3d39c5b3533392f483fbae980cb7",
"branch_name": "refs/heads/master",
"committer_date": 1583022451000,
"content_id": "a208972922d5502efd0f240191fa314939592766",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "fa81450cac3bddf68eb5ca940cce1bed24d4a8ed",
"extension": "py",
... | 4.25 | stackv2 | print(type(3))
x = 3
print("x =", x, "and is of type:", type(x))
x = 3.14159265
print("x =", x, "and is of type:", type(x))
x = "Hi there"
print("x =", x, "and is of type:", type(x))
x = True
print("x =", x, "and is of type:", type(x))
x = (2, 3, 4, 5)
print("x =", x, "and is of type:", type(x))
x = [2, 3, 4, 5]
... | 192 | 16.77 | 56 | 11 | 1,294 | python | [] | 0 | true | |
2024-11-18T21:59:04.826778+00:00 | 1,538,883,679,000 | 65f0aa57450b3edf6cd8aa1d2e636d3935c6b389 | 3 | {
"blob_id": "65f0aa57450b3edf6cd8aa1d2e636d3935c6b389",
"branch_name": "refs/heads/master",
"committer_date": 1538883679000,
"content_id": "f28ad9cfc0a67499b54294468c9bf695b6f00c06",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "c539a7ff5451e730b7d3ab298023555f6e6d0361",
"extension": "p... | 2.90625 | stackv2 | import numpy as np
from sklearn.cluster import MiniBatchKMeans as _MiniBatchKMeans
from sklearn.utils.validation import check_is_fitted
from .base import BaseOutlierDetector
__all__ = ['MiniBatchKMeans']
class MiniBatchKMeans(BaseOutlierDetector):
"""Outlier detector using K-means clustering.
Parameters
... | 138 | 31.04 | 79 | 14 | 1,085 | python | [] | 0 | true | |
2024-11-18T21:59:04.931433+00:00 | 1,549,989,567,000 | ad24775b09b12fe87a50272518e8b4e8e266c27c | 3 | {
"blob_id": "ad24775b09b12fe87a50272518e8b4e8e266c27c",
"branch_name": "refs/heads/master",
"committer_date": 1549989567000,
"content_id": "cf3400a0a9226eb42c4169f15c9c58e102641100",
"detected_licenses": [
"MIT"
],
"directory_id": "88a1eb9e038fed34617cde04a3b526600fa311b4",
"extension": "py",
"fi... | 3.140625 | stackv2 | """
{
"author": "Yucheng Huang",
"difficulty": "easy",
"link": "https://leetcode.com/problems/palindrome-number/description/",
"beats": 0.0935,
"category": ["string"],
"tags": ["palindrome"],
"questions": []
}
"""
"""
思路
- 反向构造palindrome,再对比
"""
class Solution:
def isPalindrome(self, ... | 31 | 17.81 | 75 | 12 | 170 | python | [] | 0 | true | |
2024-11-18T21:59:05.104838+00:00 | 1,568,478,874,000 | 2b5a9c66ddfd2cd574498df0a76de666a4c67992 | 2 | {
"blob_id": "2b5a9c66ddfd2cd574498df0a76de666a4c67992",
"branch_name": "refs/heads/master",
"committer_date": 1568478874000,
"content_id": "92b9ed26294977fd290cbca393f072b2e6a7edc1",
"detected_licenses": [
"MIT"
],
"directory_id": "27afb15f9a00223651d287bd186bdbf26035e656",
"extension": "py",
"fi... | 2.453125 | stackv2 | """All global variables and triggers are grouped here"""
from data_containers.special_cases import SituationalData
from data_containers.our_possessions import OurPossessionsData
from data_containers.ungrouped_data import OtherData
class MainDataContainer(SituationalData, OurPossessionsData, OtherData):
"""This is... | 28 | 40.61 | 74 | 10 | 249 | python | [] | 0 | true | |
2024-11-18T21:59:05.176674+00:00 | 1,602,507,576,000 | f6efbc7ad4087a3e6fe8abd03287cb6dcdabc08a | 3 | {
"blob_id": "f6efbc7ad4087a3e6fe8abd03287cb6dcdabc08a",
"branch_name": "refs/heads/master",
"committer_date": 1602507576000,
"content_id": "327717683e7df86b55fc45bd6ce156df0e9988ee",
"detected_licenses": [
"MIT"
],
"directory_id": "3a7b381c6bb4de73fdbb0a128aa54383baef869a",
"extension": "py",
"fi... | 2.890625 | stackv2 | import os
import csv
import cv2
import numpy as np
import sklearn
from keras.models import Model
from scipy import ndimage
from nvidia_model import nvidia_net
EPOCHS = 5
BATCH_SIZE = 32
TRAIN_SPLIT = 0.8
ANGLE_CORRECTION = 0.2 # radians
def main():
# Read the data
# Each sample contains the three images and ... | 105 | 33.19 | 120 | 13 | 848 | python | [] | 0 | true | |
2024-11-18T21:59:05.288802+00:00 | 1,465,460,698,000 | a02549c09165fb6d2b64a2a08f33606c03f6de34 | 3 | {
"blob_id": "a02549c09165fb6d2b64a2a08f33606c03f6de34",
"branch_name": "refs/heads/master",
"committer_date": 1465460698000,
"content_id": "7d7da8ca2015ff01708c85c3279938dd93a6eeeb",
"detected_licenses": [
"MIT"
],
"directory_id": "7f68d398bedd89ef41a1c1d68af57d5b9219034a",
"extension": "py",
"fi... | 3.1875 | stackv2 | from examples.top_results import print_top_results
from examples.search_wikipedia import search_wikipedia
from examples.count_match import x_vs_y_count_match
from examples.imdb_id import imdb_id_for_movie
def showcase_all_examples():
separator = '\n------------------\n'
##### EXAMPLE 1: Top Results for "Testi... | 34 | 22.94 | 67 | 8 | 192 | python | [] | 0 | true | |
2024-11-18T21:59:05.426679+00:00 | 1,442,084,083,000 | 8215217ec14bb1b8738649f4f4eab6523f8e7459 | 3 | {
"blob_id": "8215217ec14bb1b8738649f4f4eab6523f8e7459",
"branch_name": "refs/heads/master",
"committer_date": 1442084083000,
"content_id": "1c7f0d2453e1c325c7fcf6652dee824e269e7608",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d3e6c52420a5db183867a8547d235f0d075cdf00",
"extension": "py"... | 2.765625 | stackv2 | #!/usr/env python
# -*- coding: utf-8 -*-
# fantasycalculator_ff_projections.py
from bs4 import BeautifulSoup
import json
import logging
import memcache
import pprint
import re
from urllib2 import Request, urlopen, URLError, HTTPError
def get(url):
mc = memcache.Client(['127.0.0.1:11211'], debug=0)
content =... | 116 | 29.16 | 130 | 15 | 955 | python | [] | 0 | true | |
2024-11-18T21:59:05.794525+00:00 | 1,611,173,658,000 | 6ab6259e1ebbf6ce9e3e45a46d8c0d53bca2f4e3 | 3 | {
"blob_id": "6ab6259e1ebbf6ce9e3e45a46d8c0d53bca2f4e3",
"branch_name": "refs/heads/main",
"committer_date": 1611173658000,
"content_id": "b7d1402d34372772b6972b52b2f5fc2f0c303123",
"detected_licenses": [
"MIT"
],
"directory_id": "cb2dd3d55a4f7c88fd6324e7ac3a8343a6d2f1c0",
"extension": "py",
"file... | 2.953125 | stackv2 | import os
import pandas as pd
import numpy as np
from sklearn.preprocessing import StandardScaler
DATA_PATH = os.path.join(os.path.dirname(__file__), '../data')
def load_data(filename, data_path=DATA_PATH, separator=';', filetype='csv', skiprows=0):
file_path = os.path.join(data_path, filename)
data = None
if fil... | 68 | 30.03 | 117 | 13 | 548 | python | [] | 0 | true | |
2024-11-18T21:59:05.849129+00:00 | 1,585,025,427,000 | b24af35ed3dd61f97679a5142ffaf630da0df23e | 3 | {
"blob_id": "b24af35ed3dd61f97679a5142ffaf630da0df23e",
"branch_name": "refs/heads/master",
"committer_date": 1585025427000,
"content_id": "6ea0a868581d4284ed781be42c2a513dc651179f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "be5c86e8fe3f5836b7d2097dd5272c72b5b28f15",
"extension": "py"... | 3.28125 | stackv2 | class Solution:
def isValid(self, s: str) -> bool:
stack = []
d = ["()", "[]", "{}"]
for i in range(0, len(s)):
stack.append(s[i])
if len(stack) >= 2 and stack[-2] + stack[-1] in d:
stack.pop()
stack.pop()
return len(stack) == 0... | 17 | 24.53 | 62 | 14 | 118 | python | [] | 0 | true | |
2024-11-18T21:59:05.920010+00:00 | 1,524,882,907,000 | 8a61417d139cbb23bd9bf49f418577c108153cdd | 3 | {
"blob_id": "8a61417d139cbb23bd9bf49f418577c108153cdd",
"branch_name": "refs/heads/master",
"committer_date": 1524882907000,
"content_id": "13c31da58052049a3a3cf2b16c43f8da4df0f7de",
"detected_licenses": [
"MIT"
],
"directory_id": "edf79f6964b15ea61faa9ecd70871d1ce776eda2",
"extension": "py",
"fi... | 3.34375 | stackv2 | import logging
import math
# Create and configure logger
LOG_FORMAT = "%(levelname)s %(asctime)s - %(message)s"
logging.basicConfig(filename = "logging.log",level = logging.DEBUG,
format = LOG_FORMAT, filemode = 'w')
logger = logging.getLogger()
# Test the logger
logger.info("our fist message")
def quadratic_form... | 38 | 21.24 | 67 | 11 | 237 | python | [] | 0 | true | |
2024-11-18T21:59:05.984953+00:00 | 1,490,202,832,000 | 8152bb811bce8729733464b89b7691064609ae40 | 2 | {
"blob_id": "8152bb811bce8729733464b89b7691064609ae40",
"branch_name": "refs/heads/master",
"committer_date": 1490202832000,
"content_id": "aabe5f08c0eefe62d90818dac2ded81ae52ff2a6",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "8c013c69af27c5358af39cb9162f71841479418c",
"extension": "p... | 2.40625 | stackv2 | #!/usr/bin/python
'''
Created on Jul 20, 2011
@author: Calder
'''
import Tkinter
from Tkinter import *
import Tkconstants
import tkFileDialog
import tkMessageBox
import sys
import os
class SEARCH_GUI(Tkinter.Frame):
'''
classdocs
'''
def __init__(self, root):
'''
Constructor
... | 50 | 21.96 | 121 | 16 | 273 | python | [] | 0 | true | |
2024-11-18T21:59:06.037034+00:00 | 1,693,234,070,000 | 923e1b7826197dcbf08f1f6bbb3b78b1d2ce6962 | 3 | {
"blob_id": "923e1b7826197dcbf08f1f6bbb3b78b1d2ce6962",
"branch_name": "refs/heads/master",
"committer_date": 1693234070000,
"content_id": "2696075180809f7789e866806b458b42f013757d",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "c43b5835b4499f4e6d6fa4efda9546dc67ae0767",
"extension": "p... | 2.609375 | stackv2 | #!/usr/bin/env python
"""
Plot quadrature points for the given geometry and integration order.
"""
from __future__ import absolute_import, print_function
import sys
sys.path.append('.')
from argparse import ArgumentParser
import sfepy.postprocess.plot_quadrature as pq
helps = {
'geometry' :
'reference element... | 78 | 38.9 | 74 | 12 | 680 | python | [] | 0 | true | |
2024-11-18T21:59:06.160366+00:00 | 1,633,125,135,000 | 5c2d868651e107b613ea9fe6b662789e5dfb5f4c | 4 | {
"blob_id": "5c2d868651e107b613ea9fe6b662789e5dfb5f4c",
"branch_name": "refs/heads/main",
"committer_date": 1633125135000,
"content_id": "e45c68b5f64fac1cfe6af563765a90213a6b8118",
"detected_licenses": [
"MIT"
],
"directory_id": "51f6443116ef09aa91cca0ac91387c1ce9cb445a",
"extension": "py",
"file... | 3.59375 | stackv2 | cont = 0
mediaIdade = 0
maiorIdade = 0
nomeMaisVelho = ''
for c in range(0, 4):
nome = str(input('nome: ')).strip().upper()
idade = int(input('Idade: '))
sexo = str(input('Sexo: ')).strip().upper()
if sexo == 'F':
cont += 1
mediaIdade += idade
if c == 0 and sexo in 'M':
maiorIda... | 22 | 28.77 | 66 | 15 | 209 | python | [] | 0 | true | |
2024-11-18T21:59:06.393901+00:00 | 1,600,177,789,000 | 0a45fda3b7bbd00aab84612231acd1776213a20f | 3 | {
"blob_id": "0a45fda3b7bbd00aab84612231acd1776213a20f",
"branch_name": "refs/heads/master",
"committer_date": 1600177789000,
"content_id": "0e636b1ae78f77763132c6d427aa3245d0cbb24f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4bcc89581f3aab87825b39af587d605614b5b713",
"extension": "py"... | 2.703125 | stackv2 |
from confluent_kafka import Producer
import csv, json
def delivery_report(err, msg):
if err is not None:
print('Message delivery failed: {}'.format(err))
else:
print('Message delivered to {} [{}]'.format(msg.topic(), msg.partition()))
p = Producer({'bootstrap.servers': 'localhost:9'})
topi... | 28 | 28.18 | 89 | 14 | 203 | python | [] | 0 | true | |
2024-11-18T21:59:06.512719+00:00 | 1,553,280,581,000 | cb5847d1efe589dc61dc2030b22e7b2c6758e5ef | 3 | {
"blob_id": "cb5847d1efe589dc61dc2030b22e7b2c6758e5ef",
"branch_name": "refs/heads/master",
"committer_date": 1553280581000,
"content_id": "abf9e731f08ab2a08e105f0a1b42ff44015e7b3e",
"detected_licenses": [
"MIT"
],
"directory_id": "870f114f075b41371a2bc3f345a656ba601e914a",
"extension": "py",
"fi... | 2.640625 | stackv2 | from jinja2 import Markup
from datetime import datetime
class momentjs(object):
def __init__(self, timestamp):
self.timestamp = timestamp
def render(self, format):
return Markup("<script>\ndocument.write(moment(\"%s\").local().%s);\n</script>" % (self.timestamp.strftime("%Y-%m-%dT%H:%M:%S Z"), ... | 27 | 40.33 | 147 | 15 | 281 | python | [] | 0 | true | |
2024-11-18T21:59:06.609008+00:00 | 1,566,585,373,000 | f69afd35cd1c807c15abf970a48028c686419c7f | 3 | {
"blob_id": "f69afd35cd1c807c15abf970a48028c686419c7f",
"branch_name": "refs/heads/master",
"committer_date": 1566585373000,
"content_id": "6a3f7f33acd3c84df98cbcf00ee3e56d7fda5088",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "10d73e186df7ff67f4889d8e3e54af8097f9c74e",
"extension": "py"... | 2.578125 | stackv2 | import cv2
import numpy as np
import torch
from albumentations.core.transforms_interface import DualTransform
from PIL import Image
def minmax_normalize(img, norm_range=(0, 1), orig_range=(0, 255)):
# range(0, 1)
norm_img = (img - orig_range[0]) / (orig_range[1] - orig_range[0])
# range(min_value, max_val... | 125 | 34.3 | 109 | 16 | 1,162 | python | [] | 0 | true | |
2024-11-18T21:59:06.858800+00:00 | 1,597,899,805,000 | bcf39ce8c167e6c72800cd3249d0f1a967c1a58c | 3 | {
"blob_id": "bcf39ce8c167e6c72800cd3249d0f1a967c1a58c",
"branch_name": "refs/heads/master",
"committer_date": 1597899805000,
"content_id": "d7743b828a36247b8d58054f1f1603c3421296c3",
"detected_licenses": [
"MIT"
],
"directory_id": "e3c8fb8f731795ab4042374b555f493ab4948690",
"extension": "py",
"fi... | 2.859375 | stackv2 | # dev_cog.py
from discord.ext import commands
import discord
class DevCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name='load', hidden=True)
@commands.is_owner()
async def dev_load(self, ctx, *, cog: str):
"""Load cog. Full dot path required (ex: cogs.roll_cog)"""
s... | 72 | 34.51 | 89 | 17 | 670 | python | [] | 0 | true | |
2024-11-18T21:59:06.901852+00:00 | 1,338,400,995,000 | 54c345918cd86bcdb8443c453c72f59f7ebc0a92 | 2 | {
"blob_id": "54c345918cd86bcdb8443c453c72f59f7ebc0a92",
"branch_name": "refs/heads/master",
"committer_date": 1338400995000,
"content_id": "fc8cf2687c9a3220e421f3b1f16d9a8e0cf55744",
"detected_licenses": [
"MIT"
],
"directory_id": "c376fbbee49364f9498bc41850dfb4d09b90b5c1",
"extension": "py",
"fi... | 2.453125 | stackv2 | from movie.models import Movie
import urllib as urllib
import urllib2,json
import os,glob
from django.template import defaultfilters
import unicodedata
author_list = []
BASE='http://api.rottentomatoes.com/api/public/v1.0/'
KEY='mz7z7f9zm79tc3hcaw3xb85w'
movieURL=BASE+'movies.json'
def main():
print('starting.')... | 173 | 36.99 | 141 | 18 | 1,532 | python | [] | 0 | true | |
2024-11-18T21:59:07.076636+00:00 | 1,545,893,614,000 | babe939ed0d616e2d07d8b217bbdf928cfde1205 | 3 | {
"blob_id": "babe939ed0d616e2d07d8b217bbdf928cfde1205",
"branch_name": "refs/heads/master",
"committer_date": 1545893614000,
"content_id": "ac50087889cfb394b47895a6b09669ea1df3280d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ea63a873703f6419d1122cf18171646fbc084a6c",
"extension": "py"... | 2.578125 | stackv2 | import argparse
import datetime
import json
import logging
import requests
import urllib3
from tabulate import tabulate
import config
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
logging.basicConfig(
level=logging.INFO,
format='[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - '... | 111 | 43.2 | 130 | 22 | 1,096 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9a98dbfaf1d72ac1_c5242933", "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-18T21:59:07.206809+00:00 | 1,563,956,250,000 | 95bcab7be6f1043876ecb1c45c05b98374874404 | 2 | {
"blob_id": "95bcab7be6f1043876ecb1c45c05b98374874404",
"branch_name": "refs/heads/master",
"committer_date": 1563956250000,
"content_id": "c081bfd9fa62aa17c37afa1ebb3bdde94c09cf62",
"detected_licenses": [
"MIT"
],
"directory_id": "5652391452f59d28d6c8fd95640494d1b4bc4822",
"extension": "py",
"fi... | 2.4375 | stackv2 | import matplotlib.pyplot as plt
from visualize.helpers.colors import color_rainbow
from visualize.helpers.data import load_pickle, save_file
data = load_pickle("G:/Prive/MIJN-Documenten/TU/62-Stage/20180103/run2-1us/data.pkl")
# normalize
colors = color_rainbow(len(data))
fig, ax = plt.subplots(2, 1)
fig.suptitle('N... | 34 | 34.91 | 85 | 14 | 371 | python | [] | 0 | true | |
2024-11-18T21:59:07.374796+00:00 | 1,586,499,410,000 | c3fa095c71f2ab10f991c5807b7685dbb0ca17f3 | 3 | {
"blob_id": "c3fa095c71f2ab10f991c5807b7685dbb0ca17f3",
"branch_name": "refs/heads/master",
"committer_date": 1586499410000,
"content_id": "d063e4963e317c570ff94ddd2c49e1b62da7c205",
"detected_licenses": [
"MIT"
],
"directory_id": "c1551488f58893d38221c692208ee07af7d30d09",
"extension": "py",
"fi... | 2.640625 | stackv2 | #! /usr/bin/env python3
import collections
import json
import os
import pprint
import sys
def pct_diff(a, b):
return (a - b) / b
def get_best_pct_diff(a, b):
return round(100 * min(filter(lambda d: d > -0.8, (pct_diff(bi, ai) for (ai, bi) in zip(a, b)))), 3)
def get_best_val_pair(a, b):
m, n = 0, 100... | 78 | 30.38 | 117 | 19 | 637 | python | [] | 0 | true | |
2024-11-18T21:59:07.561409+00:00 | 1,683,093,394,000 | fd4d64fa7b3d2e3d645c239e3126bbe92b41682d | 3 | {
"blob_id": "fd4d64fa7b3d2e3d645c239e3126bbe92b41682d",
"branch_name": "refs/heads/master",
"committer_date": 1683093394000,
"content_id": "d07fd8dec81f16c3baf300549c09d7bdc7283b9d",
"detected_licenses": [
"MIT"
],
"directory_id": "0a6e8fa9c433672834e107c20e885664f12cc89d",
"extension": "py",
"fi... | 2.96875 | stackv2 | #!/usr/bin/env python
###############################################################################
#
# convdbpacked2ascii.py - Convert PTTableauPacked tableaux db to ASCII format
#
# File: convdbpacked2ascii.py
# Author: Alex Stivala
# Created: July 2008
#
#
# Usage:
# convdbpacked2ascii.py inputdb > outputfi... | 108 | 24.96 | 79 | 18 | 729 | python | [] | 0 | true | |
2024-11-18T21:59:07.912832+00:00 | 1,463,213,433,000 | 8956941242b4cd78a8977456ba4aa28e9b973569 | 3 | {
"blob_id": "8956941242b4cd78a8977456ba4aa28e9b973569",
"branch_name": "refs/heads/master",
"committer_date": 1463213433000,
"content_id": "4f3425e52c49b60be7ee5cc3f680d5423f0745d2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e86b96c1fadf30c317487f89a05e560508fd2ed1",
"extension": "py"... | 2.625 | stackv2 | import json
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
from pymongo import MongoClient
from datetime import datetime
with open('auth.json') as auth_file:
auth_data = json.load(auth_file)
ckey = auth_data['ckey']
csecret = auth_data['csecret']
atoken = aut... | 59 | 23.32 | 80 | 16 | 360 | python | [] | 0 | true | |
2024-11-18T21:59:08.549736+00:00 | 1,635,953,973,000 | c97184f75f4a3cded7eec91a730c918b6a68d466 | 2 | {
"blob_id": "c97184f75f4a3cded7eec91a730c918b6a68d466",
"branch_name": "refs/heads/main",
"committer_date": 1635953973000,
"content_id": "2614b94f17e15863822f6b78fda5267b6cb66406",
"detected_licenses": [
"ISC"
],
"directory_id": "273e265998a8da7ead38cfb89ebc953bcda3e3e3",
"extension": "py",
"file... | 2.328125 | stackv2 | from resource_lists import rsc_get, rsc_compare, rsc_add, rsc_update, rsc_delete
import resource_lists
from sdk.color_print import c_print
def sync(tenant_sessions: list, addMode: bool, upMode: bool, delMode: bool, logger):
'''
Accepts a list of tenant session objects.
Syncs resource lists by adding u... | 75 | 37.89 | 101 | 14 | 686 | python | [] | 0 | true | |
2024-11-18T21:59:08.651932+00:00 | 1,597,975,458,000 | fc989dcf33a3ab1c113c77360aa1addcda3ef022 | 4 | {
"blob_id": "fc989dcf33a3ab1c113c77360aa1addcda3ef022",
"branch_name": "refs/heads/master",
"committer_date": 1597975458000,
"content_id": "8d063f804d9e703344c3a531769e60adaf3fa63f",
"detected_licenses": [
"MIT"
],
"directory_id": "56e34b864df9135b062dec9f6ff865b005e0c035",
"extension": "py",
"fi... | 4.125 | stackv2 | class TrieNode(object):
def __init__(self):
self.is_word = False
self.children = {}
class Trie(object):
def __init__(self):
self.root = TrieNode()
def add(self, word):
"""
Add `word` to trie
"""
current_node = self.root
for char in word:
... | 49 | 26.12 | 99 | 15 | 311 | python | [] | 0 | true | |
2024-11-18T21:59:08.771243+00:00 | 1,644,048,404,000 | 0ac0e819880efefd3507ffbf42d626625c1bc73f | 3 | {
"blob_id": "0ac0e819880efefd3507ffbf42d626625c1bc73f",
"branch_name": "refs/heads/master",
"committer_date": 1644048404000,
"content_id": "e304d13b2162a10e92c1fff785e9e614b707c66a",
"detected_licenses": [
"MIT"
],
"directory_id": "e3a947ccd8e0529153091dadb5b07373aab3f0c0",
"extension": "py",
"fi... | 3.375 | stackv2 | #!/usr/bin/python3
# coding: utf-8
#
# 出題元
# 麻布中学校 2020年 入試問題 算数 問2-2 解法
import math
import matplotlib.pyplot as plt
import matplotlib.patches as patches
def main():
fig = plt.figure(figsize=(6.4, 6.4))
ax = fig.add_subplot(111)
x1 = math.sqrt(0.5)
y1 = x1
y2 = y1 / 2.0
x2 = math.sqrt(1.0 - y2... | 65 | 48.58 | 134 | 12 | 1,312 | python | [] | 0 | true | |
2024-11-18T21:59:09.141658+00:00 | 1,622,109,821,000 | e8ff65e2188cbd497036d407ff4c46ba23fbdf8a | 2 | {
"blob_id": "e8ff65e2188cbd497036d407ff4c46ba23fbdf8a",
"branch_name": "refs/heads/master",
"committer_date": 1622109821000,
"content_id": "bb6dc7ad19c74168d291f373c69c5da06d2a0878",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "7358367bcbbcce9a520e9c76d9655f2468f68d8e",
"extension": "py",
... | 2.5 | stackv2 | import argparse
from os.path import basename, abspath
from apertium.quality import Statistics
from apertium.quality.html import Webpage
#TODO add piping for great interfacing
class UI(object):
def __init__(self):
ap = argparse.ArgumentParser(
description="Generate webpage and related files.")
ap.add_argument... | 31 | 27.52 | 64 | 15 | 208 | python | [] | 0 | true | |
2024-11-18T21:59:10.104307+00:00 | 1,677,063,960,000 | b0c523daba8927205bd88572ea8f1a545599cefa | 3 | {
"blob_id": "b0c523daba8927205bd88572ea8f1a545599cefa",
"branch_name": "refs/heads/master",
"committer_date": 1677063960000,
"content_id": "fde9c4a879894b2ec52d006c7a16af3793520869",
"detected_licenses": [
"MIT"
],
"directory_id": "e518bdfa2c68cfc281265ff5f92696bbd53aa331",
"extension": "py",
"fi... | 2.921875 | stackv2 | import contextlib
import os
import shutil
import tempfile
def ensure_dir(path):
dir = os.path.dirname(path)
if not os.path.exists(dir):
os.makedirs(dir)
@contextlib.contextmanager
def temp_dir():
tmp_dir = tempfile.mkdtemp()
try:
yield tmp_dir
finally:
shutil.rmtree(tmp_d... | 29 | 20.14 | 47 | 12 | 143 | python | [] | 0 | true | |
2024-11-18T21:59:10.290500+00:00 | 1,608,242,450,000 | f92149744bf67ef972a59d72456a5a5cf8e15020 | 4 | {
"blob_id": "f92149744bf67ef972a59d72456a5a5cf8e15020",
"branch_name": "refs/heads/master",
"committer_date": 1608242450000,
"content_id": "9278b61e8a010adde98247949f58af15b1199337",
"detected_licenses": [
"MIT"
],
"directory_id": "9da8754002fa402ad8e6f25659978bd269bbcec8",
"extension": "py",
"fi... | 3.53125 | stackv2 | import math
def bcof(x, y):
a = math.factorial(x)
b = math.factorial(y)
c = math.factorial(x - y) # that appears to be useful to get the correct result
return a // (b * c)
def F(n, k):
return bcof(n + 1, k + 1)
class CodeforcesTask840ASolution:
def __init__(self):
self.result = ''... | 44 | 23.59 | 84 | 14 | 306 | python | [] | 0 | true | |
2024-11-18T21:59:10.515719+00:00 | 1,689,090,243,000 | eb59a90d83c344a118ae04e7a77adceb54af0d37 | 2 | {
"blob_id": "eb59a90d83c344a118ae04e7a77adceb54af0d37",
"branch_name": "refs/heads/master",
"committer_date": 1689090243000,
"content_id": "e1838cefc4859c3370b80d952c160cb620dd1796",
"detected_licenses": [],
"directory_id": "4ff4ced17c568e9a4ec3ba3b65b5fe220e43840d",
"extension": "py",
"filename": "mod... | 2.40625 | stackv2 | # Copyright (c) 2013 The SAYCBridge Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from builtins import map
from builtins import zip
from z3b import enum
import core.suit as suit
import z3
_honor_names = ('ace', 'king', 'queen', 'ja... | 297 | 37.89 | 114 | 19 | 3,436 | python | [] | 0 | true | |
2024-11-18T21:59:10.692211+00:00 | 1,680,723,624,000 | 927bc0011b3260e5a71c43ebb0e7bd006f8d4d8a | 3 | {
"blob_id": "927bc0011b3260e5a71c43ebb0e7bd006f8d4d8a",
"branch_name": "refs/heads/master",
"committer_date": 1680723624000,
"content_id": "273dffa248003dc537daeee1b44244678ea7f73c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "77fd60c4b7e7885b2ec4ca5203edf9489f6f37dc",
"extension": "p... | 2.984375 | stackv2 | #!/usr/bin/env python3
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
from __future__ import print_function # Python 2/3 compatibility
__doc__ = """
Example showing how to use the parcel generator.
We load an image with ROI definitions and calculate th... | 44 | 26.41 | 80 | 9 | 346 | python | [] | 0 | true | |
2024-11-18T21:59:10.804518+00:00 | 1,605,424,759,000 | 97ce03bd2f1ce6a9c5b6225610ded0a40d3a5061 | 2 | {
"blob_id": "97ce03bd2f1ce6a9c5b6225610ded0a40d3a5061",
"branch_name": "refs/heads/main",
"committer_date": 1605424759000,
"content_id": "f9909ef7f3dc44dd56b5247b78bf6337ee60fad7",
"detected_licenses": [
"MIT"
],
"directory_id": "72b0445aded10ed5ca1dc2c24bdad7b07a71cd92",
"extension": "py",
"file... | 2.5 | stackv2 | #-*-coding:utf8-*-
import os,appuifw,e32,graphics
from key_codes import EKeyLeftArrow
class FileManager:
def __init__(self):
self.lock=e32.Ao_lock()
self.dir_stack=[]
self.__path__=''
self.current_dir=['C','E']
def chn(self,x):
return x.decode('utf8')
def rn(self,x):... | 62 | 37.56 | 99 | 18 | 559 | python | [] | 0 | true | |
2024-11-18T21:59:11.181612+00:00 | 1,677,742,267,000 | ce2c1198df9f96401804d3cbd102f2661e3a29e8 | 3 | {
"blob_id": "ce2c1198df9f96401804d3cbd102f2661e3a29e8",
"branch_name": "refs/heads/master",
"committer_date": 1677742267000,
"content_id": "ff6acbc3a22616d8d0640117b2542c004125fb08",
"detected_licenses": [
"MIT"
],
"directory_id": "adf253ebc9c3bb326a727d87ba2e071ded76d608",
"extension": "py",
"fi... | 2.640625 | stackv2 | import os
from subprocess import call
import sys
import re
import multiprocessing as mp
import string
import shutil
configure_flags = "no-shared"
cflags = "-fPIC"
base_openssl_version = "1.1.1"
def is_python3_or_higher():
return sys.version_info.major >= 3
def get_openssl_filename(ver):
return "openssl-" + ... | 134 | 27.75 | 150 | 14 | 936 | python | [] | 0 | true | |
2024-11-18T21:59:11.296960+00:00 | 1,548,213,105,000 | 333b115b9618dd604dc52ac263749b83be98152f | 2 | {
"blob_id": "333b115b9618dd604dc52ac263749b83be98152f",
"branch_name": "refs/heads/master",
"committer_date": 1548213105000,
"content_id": "2d3af31e06b8a56f1fa91cb03975b14776599666",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "99d7b0b6337e89a6f769ec19da34b51f6c735b0b",
"extension": "py"... | 2.421875 | stackv2 | from github import Github, RateLimitExceededException, GithubException
import private
import threading
from custom_parser import parse_code, pick_mode
from base64 import b64decode
from time import sleep, time
from store import add_data, setup
legal_languages = ["C++", "python", "C", "java", "swift", "javascript", "kot... | 132 | 38.89 | 146 | 23 | 1,147 | python | [] | 0 | true | |
2024-11-18T21:59:11.362951+00:00 | 1,544,673,833,000 | 6308b3f05a64edba87a1b93d57795476bb62fe44 | 2 | {
"blob_id": "6308b3f05a64edba87a1b93d57795476bb62fe44",
"branch_name": "refs/heads/master",
"committer_date": 1544673833000,
"content_id": "26c56116fcdea8dbbd221b36906ffe05e6e125f1",
"detected_licenses": [
"MIT"
],
"directory_id": "939837cb10cb8ec61160af1fab3b5a37242fae6b",
"extension": "py",
"fi... | 2.484375 | stackv2 | import numpy as np
import pickle
from homework4.problem_4 import sample_train_dt
from homework4.problem_4 import plot_dt_mLeaf
if __name__ == "__main__":
X = np.genfromtxt('data/X_train.txt', delimiter=None)
Y = np.genfromtxt('data/Y_train.txt', delimiter=None)[:, np.newaxis]
raw_data = np.concatenate((X, ... | 34 | 38.09 | 104 | 13 | 361 | python | [] | 0 | true | |
2024-11-18T21:59:11.435716+00:00 | 1,676,139,610,000 | d48871f43b2ab18934e1deeb72fb6b981efadcb3 | 3 | {
"blob_id": "d48871f43b2ab18934e1deeb72fb6b981efadcb3",
"branch_name": "refs/heads/master",
"committer_date": 1676139610000,
"content_id": "d7d7d7ebce1003bb4f83bbaf3f2f5c6dd46e32ae",
"detected_licenses": [
"MIT"
],
"directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9",
"extension": "py",
"fi... | 2.71875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2017 Carlos Jenkins <carlos@jenkins.co.cr>
#
# 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/lice... | 149 | 25.32 | 78 | 14 | 972 | python | [] | 0 | true | |
2024-11-18T21:59:11.487228+00:00 | 1,541,342,212,000 | c46fbe337ee3d2badf2d172641142490d74d06e2 | 3 | {
"blob_id": "c46fbe337ee3d2badf2d172641142490d74d06e2",
"branch_name": "refs/heads/master",
"committer_date": 1541342212000,
"content_id": "d760db7c638672b327643f2e77e5b30fe876e9ef",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9c63904937d14c4ed0b87369773b92c1794d2832",
"extension": "py"... | 3.1875 | stackv2 | from pprint import pprint
import logging
import sys
import traceback
from itertools import repeat
from collections import Counter
import time
import json
from pymongo import MongoClient
from pymongo.son_manipulator import SONManipulator
class KeyAndIntTransform(SONManipulator):
"""Transforms keys going to a dat... | 245 | 30.8 | 93 | 18 | 1,598 | python | [] | 0 | true | |
2024-11-18T21:59:11.675411+00:00 | 1,527,206,522,000 | 1bd270c86dd3872940826b1e050136e0b6604f71 | 3 | {
"blob_id": "1bd270c86dd3872940826b1e050136e0b6604f71",
"branch_name": "refs/heads/master",
"committer_date": 1527206522000,
"content_id": "28d04e661e2f9a5dce3cb7f005a7b21b1312f3ac",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "52b17383556c615f6e9ea8888efbfc3c0bfbe726",
"extension": "py"... | 3 | stackv2 | #-----------------------------------------------------------------------------#
# memlock.py #
# #
# Copyright (c) 2017-2018, Rajiv Bakulesh Shah, original author. #
... | 137 | 33.12 | 79 | 21 | 989 | python | [] | 0 | true | |
2024-11-18T21:59:11.836764+00:00 | 1,540,670,245,000 | f6e1ae3f71d5d588dfd47840fbec25c061121763 | 3 | {
"blob_id": "f6e1ae3f71d5d588dfd47840fbec25c061121763",
"branch_name": "refs/heads/master",
"committer_date": 1540670245000,
"content_id": "b72f401b39f49520f506b10ced9f3e9616691a01",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1ba572cc3528c0f3d2d5d8249cd7d9928c6318a7",
"extension": "py"... | 2.625 | stackv2 | # coding: utf-8
'''
Setup and configuration launch modes for easier installation.
'''
import os
import pip
import json
import shutil
import tempfile
from subprocess import Popen, PIPE
from ..utils import trying
from .. import __home__
from .api import launcher
@launcher('init',
description="Install canvas's depend... | 131 | 26.95 | 128 | 20 | 935 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_732d3fc8b3152c97_737c7b32", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | |
2024-11-18T21:59:11.893441+00:00 | 1,589,708,070,000 | 388728a7b86d592a0c3de92f1f2ddb26cfaaebed | 3 | {
"blob_id": "388728a7b86d592a0c3de92f1f2ddb26cfaaebed",
"branch_name": "refs/heads/master",
"committer_date": 1589708070000,
"content_id": "bbbaabf7bbb8a7b801e3ab403e35afa9126ae1a1",
"detected_licenses": [
"MIT"
],
"directory_id": "7ed5a71eec86d8330ffbd15ff111a687650f9426",
"extension": "py",
"fi... | 2.828125 | stackv2 | import numpy as np
# from skimage.transform import resize
MEAN_RGB = [0.485 * 255, 0.456 * 255, 0.406 * 255]
STDDEV_RGB = [0.229 * 255, 0.224 * 255, 0.225 * 255]
MAP_INTERPOLATION_TO_ORDER = {
'nearest': 0,
'bilinear': 1,
'biquadratic': 2,
'bicubic': 3,
}
def center_crop_and_resize(image, image_size... | 44 | 26.64 | 89 | 13 | 376 | python | [] | 0 | true | |
2024-11-18T21:59:12.182350+00:00 | 1,530,731,075,000 | 30ae0886e45e6b826bce80a6f8fadaf3256d1a47 | 4 | {
"blob_id": "30ae0886e45e6b826bce80a6f8fadaf3256d1a47",
"branch_name": "refs/heads/master",
"committer_date": 1530731075000,
"content_id": "164e07d19eaa27de0ef8629b83518fe9a6b152aa",
"detected_licenses": [
"MIT"
],
"directory_id": "10add947e9519a5869b078b34699812b6520331a",
"extension": "py",
"fi... | 3.8125 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'wro00708'
#1
def ex1(number):
message = {0:"zero", 1:"jeden", 2:"dwa", 3:"trzy", 4:"cztery", 5:"pięć", 6:"sześć", 7:"siedem", 8:"osiem",
9:"dziwięć", 10:"dziesięć", 11:"jedenaście", 12:"dwanaście", 13:"trzynaście", 14:"czternaście",
... | 71 | 28.48 | 136 | 18 | 765 | python | [] | 0 | true | |
2024-11-18T21:59:12.678847+00:00 | 1,599,053,689,000 | 92306603376729cd13de2bbe79aadc024b245c22 | 3 | {
"blob_id": "92306603376729cd13de2bbe79aadc024b245c22",
"branch_name": "refs/heads/master",
"committer_date": 1599053689000,
"content_id": "a5727788910515a4ba5e6a4bacd3bcc51f29d531",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5fe72bb13baf3649058ebe11aa86ad4fc56c69ed",
"extension": "py"... | 3.1875 | stackv2 | import os
import time
import string
import pickle
from operator import itemgetter
from nltk.corpus import stopwords as sw
from nltk.corpus import wordnet as wn
from nltk import wordpunct_tokenize
from nltk import WordNetLemmatizer
from nltk import sent_tokenize
from nltk import pos_tag
from sklearn.pipeline import P... | 257 | 31.58 | 100 | 17 | 1,888 | python | [] | 0 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.