added
stringdate
2024-11-18 17:59:49
2024-11-19 03:44:43
created
int64
0
2,086B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.5
source
stringclasses
1 value
text
stringlengths
258
23.4k
num_lines
int64
16
649
avg_line_length
float64
15
61
max_line_length
int64
31
179
ast_depth
int64
8
40
length
int64
101
3.8k
lang
stringclasses
1 value
sast_codeql_findings
stringlengths
2
265k
sast_codeql_findings_count
int64
0
45
sast_codeql_success
bool
1 class
sast_codeql_error
stringclasses
1 value
2024-11-19T02:31:57.173632+00:00
1,681,288,002,000
5c80d819b3d2b33b79c1948268426574dd7cb073
3
{ "blob_id": "5c80d819b3d2b33b79c1948268426574dd7cb073", "branch_name": "refs/heads/main", "committer_date": 1681288002000, "content_id": "153f35b3236dce4a9ba65e4886092a052d97e74c", "detected_licenses": [ "MIT" ], "directory_id": "849ad9512b5078d73aa2438ba0d37339759dafec", "extension": "py", "file...
2.984375
stackv2
from compas_cloud import Proxy from compas.geometry import Point p = Proxy() def move_point(point): from compas.geometry import Translation return point.transformed(Translation.from_vector([1, 0, 0])) # save the custom function to cloud # cache=True means the function will return a cache object instead of ...
33
27.85
119
10
217
python
[]
0
true
2024-11-19T02:31:57.290913+00:00
1,614,212,165,000
90560fd6a4e259c5042998108c726c258b87d0cf
3
{ "blob_id": "90560fd6a4e259c5042998108c726c258b87d0cf", "branch_name": "refs/heads/master", "committer_date": 1614212165000, "content_id": "0d0db27028bd69a734230943ae183244c2aafdef", "detected_licenses": [ "MIT" ], "directory_id": "9fef4f4e839473dabd760acf0c35d64198a7ad10", "extension": "py", "fi...
3.078125
stackv2
from tkinter import * import random from tkinter import messagebox allCoords = [] for i in range(4): for j in range(4): allCoords.append((i, j)) def f(i, j): return 4*i+j def pickNum(): l = [2, 2, 2, 2, 2, 2, 2, 2, 2, 4] return random.choice(l) class Cell(Canvas): bgs = { -1: ...
357
28.35
99
22
2,836
python
[]
0
true
2024-11-19T02:31:57.465517+00:00
1,670,499,010,000
64edf3821ae340d3007e169e98a850057cd86986
3
{ "blob_id": "64edf3821ae340d3007e169e98a850057cd86986", "branch_name": "refs/heads/master", "committer_date": 1670499010000, "content_id": "11c6e7e6a3ecec11bd2c59bc84d94a8e9ba405d0", "detected_licenses": [ "MIT" ], "directory_id": "34c6f686e81c69afa94bc6fe154723b8aa475ae6", "extension": "py", "fi...
3.109375
stackv2
import os ''' dump all .db files in path_name dir to sql ''' def db_to_sql(path_name): for dir_path, dir_names, file_names in os.walk(path_name): for file_name in file_names: if os.path.splitext(file_name)[1] == '.db': file_path = os.path.join(dir_path, file_name) ...
17
31.24
69
15
138
python
[]
0
true
2024-11-19T02:31:57.529280+00:00
1,410,361,980,000
14e1f86399b0f23f9ab8e445d4cd9f56117fc0a4
4
{ "blob_id": "14e1f86399b0f23f9ab8e445d4cd9f56117fc0a4", "branch_name": "refs/heads/master", "committer_date": 1410361980000, "content_id": "1ece8a65a7e1d05dbbeeebed9db907327647a5e0", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "7dd0790439f426bae540252f968341b0a1930a30", "extension": "p...
3.828125
stackv2
#!/usr/bin/env python3 """ Tutorial Lesson 3 ================= This is the third tutorial arrowhead program. If you read tutorial 2 you probably know that it was a simple coin-tossing program. In real applications error handling is the bulk of the boilerplate boring code that needs to be carefully managed. This is wh...
88
35.32
79
16
768
python
[]
0
true
2024-11-19T02:31:57.583684+00:00
1,679,680,310,000
2d898557aa64f9d8d551b78af6291af9aa9c22d6
3
{ "blob_id": "2d898557aa64f9d8d551b78af6291af9aa9c22d6", "branch_name": "refs/heads/main", "committer_date": 1679680310000, "content_id": "96bd2ff43c452e46855a3bcbbcad3781d9f6ed7d", "detected_licenses": [ "MIT" ], "directory_id": "e8fdf27c7d7f67ec3de4fa1d6eea2931d45dc722", "extension": "py", "file...
3.140625
stackv2
import re from typing import Dict, Iterable from pinballmap.constants import MODEL_ENDINGS punctuation_regex = re.compile(r"\W+") # any non-alphanumeric characters spaces_regex = re.compile(r"\s{2,}") # 2 or more whitespace characters def score_match( query_string: str, machine_data: Dict, query_words: Iterab...
38
30.05
75
16
290
python
[]
0
true
2024-11-19T02:31:57.723962+00:00
1,679,938,355,000
2628a04d2e7e158674814d560ca8b690b3d8fd1f
3
{ "blob_id": "2628a04d2e7e158674814d560ca8b690b3d8fd1f", "branch_name": "refs/heads/master", "committer_date": 1679938355000, "content_id": "ec0781aabf8fc1f649ffe1986997d8d0fbbf8ee4", "detected_licenses": [ "MIT" ], "directory_id": "a5bd9b7fd4ef60f8e524162abdd948867b2aed5c", "extension": "py", "fi...
2.8125
stackv2
"""Sample handler for parsing Heroku logplex drain events (https://devcenter.heroku.com/articles/log-drains#https-drains). Expects messages to be framed with the syslog TCP octet counting method (https://tools.ietf.org/html/rfc6587#section-3.4.1). This is designed to be run as a Python3.6 lambda. """ import json impo...
135
29.76
134
19
1,017
python
[]
0
true
2024-11-19T02:31:57.920497+00:00
1,531,217,976,000
74e0c6f4c61532f10639954b83d4ec15a383be20
2
{ "blob_id": "74e0c6f4c61532f10639954b83d4ec15a383be20", "branch_name": "refs/heads/master", "committer_date": 1531218134000, "content_id": "0c5695f4b37faffd73fa45f1b3f80debc6afd5cb", "detected_licenses": [ "MIT" ], "directory_id": "1b2e454eb2b3f8cd1f47f7884e02907cff7dd81a", "extension": "py", "fi...
2.359375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Basic interface to the Amazon S3 database.""" import os import uuid import boto3 import botocore import logging logger = logging.getLogger(__name__) class AmazonS3: """Basic interface to the Amazon S3 database.""" _DEFAULT_REGION_NAME = 'us-east-1' _DE...
207
39.64
99
20
1,748
python
[]
0
true
2024-11-19T02:31:58.140580+00:00
1,488,660,525,000
0e2a9b13e44d3607b8f7e79cbbec1321719320d1
3
{ "blob_id": "0e2a9b13e44d3607b8f7e79cbbec1321719320d1", "branch_name": "refs/heads/master", "committer_date": 1488660525000, "content_id": "5e187eb4306de9c3357040bff57ff19bcdb5adf9", "detected_licenses": [ "MIT" ], "directory_id": "40cb1e3d21f70fc41b7752c95e1e17bc237ded56", "extension": "py", "fi...
3.03125
stackv2
#!/usr/bin/env python import sys, os, glob from makdown2 import markdown from jinja2 import Environment, FileSystemLoader def main(): if len(sys.argv) != 3: print "Usage: %s <docs dir> <output dir>" % (sys.argv[0]) return 1 # Get a list of documents and parse their content. documents = []...
46
32.63
117
17
387
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_196b7e5a3d36c65f_261d7e83", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
2024-11-19T02:31:58.406035+00:00
1,624,993,804,000
4f68ab137725d643c36a8d2bfa075f1f61119e52
3
{ "blob_id": "4f68ab137725d643c36a8d2bfa075f1f61119e52", "branch_name": "refs/heads/main", "committer_date": 1624993804000, "content_id": "b7e5ed3c9df7a25fd62de8ca59a15c4e9a68441e", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "0fe5654fb1b8803cdd9a07c6345b7a6e6b1c35fa", "extension": "py"...
2.671875
stackv2
from enum import Enum from dataclasses import dataclass from typing import Dict, List, Union class WidgetType(Enum): SLIDER = "slider" DROPDOWN = "drop-down" @staticmethod def from_str(value: str): if value is not None: value = value.lower() if value == WidgetType.SLIDER.v...
48
22.79
79
14
270
python
[]
0
true
2024-11-19T02:31:58.761688+00:00
1,571,091,071,000
d432ad9e4d9bc06b0523f6c762746c273e658499
3
{ "blob_id": "d432ad9e4d9bc06b0523f6c762746c273e658499", "branch_name": "refs/heads/master", "committer_date": 1571091071000, "content_id": "bd428335b854927b190a7027161fa333793573a9", "detected_licenses": [ "MIT" ], "directory_id": "3cab8a70e40d4cecb939b67fe6d113a03be7731e", "extension": "py", "fi...
3.453125
stackv2
import csv from pprint import pprint def fix_int_fields(row_to_fix): int_fields = ['beer_servings','spirit_servings','wine_servings'] for int_field in int_fields: row_to_fix[int_field] = int(row_to_fix[int_field]) return row_to_fix def most_beer(drinks_list): return sorted(drinks_list, key=...
29
25.9
84
13
203
python
[]
0
true
2024-11-19T02:31:58.923791+00:00
1,487,032,485,000
06eebceca896ef75118b5053e3b41bb05450677f
2
{ "blob_id": "06eebceca896ef75118b5053e3b41bb05450677f", "branch_name": "refs/heads/master", "committer_date": 1487032485000, "content_id": "0e0fe687a7a8db437d152d77e556dcb49f9fc714", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6877868e2ea8fd3e8d8c1f44b1213ba9353a7482", "extension": "py"...
2.46875
stackv2
''' Created on Mar 23, 2014 @author: calarcon ''' import os import re import shutil import sys import logging from package.config import HorizonConfig from package.ostools import print_combo, move_file, copy_file import package.ostools def replace_string_in_dir(search, replace, path): if os.path.isdir(path): ...
159
47.67
153
22
1,729
python
[]
0
true
2024-11-19T02:31:58.977324+00:00
1,548,466,664,000
17b1ca2e622fca25e05627d5077aebe7983dfc2e
3
{ "blob_id": "17b1ca2e622fca25e05627d5077aebe7983dfc2e", "branch_name": "refs/heads/master", "committer_date": 1548466664000, "content_id": "58fd66bf421d6cf4d713dafa362ea432cdec1923", "detected_licenses": [ "MIT" ], "directory_id": "500b3ef5d324193c3f4af91d0703c54a046678c3", "extension": "py", "fi...
2.9375
stackv2
""" @author: Alfons @contact: alfons_xh@163.com @file: 17-04-Flags-Futures-ProcessPool.py @time: 18-7-29 下午2:28 @version: v1.0 """ import os import time import requests import concurrent.futures as futures BASE_URL = "http://flupy.org/data/flags/" DEST_DIR = "flags_futures_process/" FLAGS_CC = 'CN IN US ID BR PK NG...
61
21.13
85
12
377
python
[]
0
true
2024-11-19T02:31:59.183670+00:00
1,619,914,459,000
0274c0ed6f98b68ca338ca624fede137d18e8808
3
{ "blob_id": "0274c0ed6f98b68ca338ca624fede137d18e8808", "branch_name": "refs/heads/main", "committer_date": 1619914459000, "content_id": "61b45b74ba7652ffae32e282b57f3bb2d22cfdd7", "detected_licenses": [ "MIT" ], "directory_id": "08a57bc58b24594ccf1ff2c270ecba1fc503ae3d", "extension": "py", "file...
2.984375
stackv2
import pandas as pd import keras from sklearn.preprocessing import LabelEncoder, OneHotEncoder from sklearn.compose import ColumnTransformer from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split from sklearn.metrics import confusion_matrix, accuracy_score from keras.model...
73
43.52
145
11
888
python
[]
0
true
2024-11-19T02:31:59.749638+00:00
1,634,106,101,000
189d64bb6ee8d30984ba3992b977a85dd61afdf1
3
{ "blob_id": "189d64bb6ee8d30984ba3992b977a85dd61afdf1", "branch_name": "refs/heads/main", "committer_date": 1634106101000, "content_id": "b6f2cc392efd8db4f855a8386500905191fc69e5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9521975ce51d46de3e2fd23826b2fc19dbce6a68", "extension": "py", ...
2.984375
stackv2
import tensorflow as tf class ShapeChecker(): def __init__(self): # Keep a cache of every axis-name seen self.shapes = {} def __call__(self, tensor, names, broadcast=False): if not tf.executing_eagerly(): return if isinstance(names, str): names = (names,) shape = tf.shape(tensor) ...
40
27.15
68
16
274
python
[]
0
true
2024-11-19T02:32:00.088318+00:00
1,432,805,344,000
277604e90b94cc21cb4537d087065b23cfd27d49
2
{ "blob_id": "277604e90b94cc21cb4537d087065b23cfd27d49", "branch_name": "refs/heads/master", "committer_date": 1432805344000, "content_id": "c16f6888cadcdd486424e39342b9f7e2f624e8b8", "detected_licenses": [ "MIT" ], "directory_id": "db7720de879f0dba4850da0d72430a13cf4c458b", "extension": "py", "fi...
2.484375
stackv2
import urllib2 import json class HelloBlockInterface(object): def __init__(self, testnet): self.net_prefix = "testnet" if testnet else "mainnet" def connected(self): try: url = "https://%s.helloblock.io/v1/blocks/1" % self.net_prefix return bool(json.loads(urllib2.urlopen(...
54
34.48
85
18
446
python
[]
0
true
2024-11-19T02:32:00.367064+00:00
1,605,960,087,000
b089df7deb9dda884c9c6ebdb235964008b50e7a
3
{ "blob_id": "b089df7deb9dda884c9c6ebdb235964008b50e7a", "branch_name": "refs/heads/master", "committer_date": 1605960087000, "content_id": "c05298ab7c7729ad7d4e14a4cc1488e21bf44952", "detected_licenses": [ "Apache-2.0" ], "directory_id": "196ff8e8f054b1bcff1152fba7a66078d9bd3258", "extension": "py"...
2.59375
stackv2
#!/usr/bin/env python3 import sys import argparse import os from subprocess import run, PIPE ################################################################## # Main ################################################################## def main(argv): input_files = [] parser = argparse.ArgumentParser() ...
147
32.58
101
19
1,258
python
[]
0
true
2024-11-19T02:32:00.414955+00:00
1,562,242,804,000
1f8c3b089e8b9b23258a1e142b82836370b2ee56
3
{ "blob_id": "1f8c3b089e8b9b23258a1e142b82836370b2ee56", "branch_name": "refs/heads/master", "committer_date": 1562242804000, "content_id": "268f6726250e1ebe18dc4d98681091eb2f61552a", "detected_licenses": [ "MIT" ], "directory_id": "c3515b245b004f96fe4c7943c47329d7ae5f09c9", "extension": "py", "fi...
2.734375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 1 # User ile dosya paylaş # Verilen kullanıcı samba paylaşımına eklenir # 1.0 # samba # # 3 # Yagiz Kocer # yagizkocer@gmail.com # Havelsan # add_valid_user import configparser import json import sys import subprocess import re SAMBA_CONFIG_PARSER = configparser.Conf...
92
28.13
130
15
700
python
[]
0
true
2024-11-19T02:32:00.504451+00:00
1,476,352,068,000
30e131fe4e8090ef5d1d138350dbfa6c179c051f
2
{ "blob_id": "30e131fe4e8090ef5d1d138350dbfa6c179c051f", "branch_name": "refs/heads/master", "committer_date": 1476352068000, "content_id": "fb784af3dacf1e0ce9a884511de08ba0b610b707", "detected_licenses": [ "Apache-2.0" ], "directory_id": "25bbeb22089e523b4f1532296a0233530102fa8e", "extension": "py"...
2.4375
stackv2
__author__ = 'melvin' import os import pandas as pd from scipy import stats import numpy import plotly.plotly as py import plotly.graph_objs as go beaconIDs = "cQsW", "94gJ","Cvj5","cGTg", "At5a", "kpOU" data = "9ottobre.csv" outputFile = "result.csv" defaultValue=-1000.0 py.sign_in('melvinm', '97fltrwjnm') def mai...
90
35.59
109
19
889
python
[]
0
true
2024-11-19T02:32:00.671250+00:00
1,610,019,398,000
393cae25e55f19e05633df8f6cc56c0b4f30a8b5
3
{ "blob_id": "393cae25e55f19e05633df8f6cc56c0b4f30a8b5", "branch_name": "refs/heads/master", "committer_date": 1610019398000, "content_id": "828320caed0098203a02ee55cc240fdd82934001", "detected_licenses": [ "MIT" ], "directory_id": "fe1992e6a5683729d78040735d7b6b39ef9f6449", "extension": "py", "fi...
2.640625
stackv2
from collections import defaultdict from itertools import product from typing import Callable import numpy as np from scipy.stats import entropy from sklearn.preprocessing import normalize from hypergraph.network import HyperGraph, MultilayerNetwork, HyperEdge, Node from hypergraph.transition import pi_alpha, gamma, ...
142
28.01
97
15
1,121
python
[]
0
true
2024-11-19T02:32:00.728489+00:00
1,687,154,248,000
4312f698c627edbf53deb1cbea749dc780a19605
3
{ "blob_id": "4312f698c627edbf53deb1cbea749dc780a19605", "branch_name": "refs/heads/master", "committer_date": 1687154248000, "content_id": "e121e776ccc3cc989f384499f9589deb4152246f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6d09e43b6a32a75548562e6aba9848469f0f236c", "extension": "py"...
2.84375
stackv2
import asyncio import time MAX_WAIT: int = 180 class WaitBetweenConnects: def __init__(self): self.last_try: float = 0 self.wait_time = 0 async def wait(self): # wenn wir lang connected sind oder beim ersten Mal versuchen wir den reconnect gleich if time.time() - self.last_...
27
22.85
94
13
160
python
[]
0
true
2024-11-19T02:32:00.778896+00:00
1,575,976,870,000
1150535712f1eb6d7b913b5a2c244020336fe3b3
2
{ "blob_id": "1150535712f1eb6d7b913b5a2c244020336fe3b3", "branch_name": "refs/heads/master", "committer_date": 1575976870000, "content_id": "29767179d086d0e040cf3f5f0947c483392f0db2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7895ae236a178d19e6333013fd6a6dc8ffe28201", "extension": "py"...
2.46875
stackv2
import json as json_handler from balebot.models.constants.errors import Error from balebot.models.base_models.avatar import Avatar from balebot.models.base_models.group_member import GroupMember from balebot.models.base_models.jsonable import Jsonable class Group(Jsonable): def __init__(self, group_id, access_h...
74
36.07
116
15
584
python
[]
0
true
2024-11-19T02:32:00.828926+00:00
1,551,463,604,000
fdc1c6b4eb6409c8efde21fbd2168026b6fb52d0
4
{ "blob_id": "fdc1c6b4eb6409c8efde21fbd2168026b6fb52d0", "branch_name": "refs/heads/master", "committer_date": 1551463604000, "content_id": "296c323d9cdf3f963412d9d899f157cc55d37028", "detected_licenses": [ "MIT" ], "directory_id": "14e0d9e25c1119999d77ee925490aa1b24768a2a", "extension": "py", "fi...
3.5625
stackv2
import datetime def valid_in_list(collection, date): """For each item in the collection, check its valid start and end dates against the date given""" for elem in collection: if elem.valid_start is None and elem.valid_end is None: return elem elif elem.valid_start is None: ...
17
35.18
101
14
123
python
[]
0
true
2024-11-19T02:32:00.996192+00:00
1,577,810,474,000
73895a38c7b52badb801b7c1c5c223eba871628d
3
{ "blob_id": "73895a38c7b52badb801b7c1c5c223eba871628d", "branch_name": "refs/heads/master", "committer_date": 1577810474000, "content_id": "a79aeeed3a89037498986d601d04ddf72f2083ea", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "6e9169b814575122298751f4d5abdd2e9739a1f6", "extension": "p...
2.515625
stackv2
#======================================================================= # SignalValue.py #======================================================================= # Module containing the SignalValue class. import copy #----------------------------------------------------------------------- # SignalValue #------------...
267
37.18
83
21
1,825
python
[]
0
true
2024-11-19T02:32:01.178363+00:00
1,586,969,265,000
f43c73f47ad53f90ee676183422e735f5f6e424f
3
{ "blob_id": "f43c73f47ad53f90ee676183422e735f5f6e424f", "branch_name": "refs/heads/master", "committer_date": 1586969265000, "content_id": "389a5f2219ab773765fc08183cd1fe3964f552d9", "detected_licenses": [ "MIT" ], "directory_id": "5adf5fa4b86f0552a618a8bbd4482018a966a995", "extension": "py", "fi...
3.015625
stackv2
import tkinter as tk from matplotlib import pyplot as plt import os from random import random from PIL import ImageTk, Image from test import graph_create class MainWindow(tk.Frame): counter = 0 def __init__(self, *args, **kwargs): tk.Frame.__init__(self, *args, **kwargs) self.button1 = tk.Butt...
45
28.44
84
14
356
python
[]
0
true
2024-11-19T02:32:01.228154+00:00
1,685,944,301,000
312585c6c60f1c9887079175dd51d86dcd0bf915
3
{ "blob_id": "312585c6c60f1c9887079175dd51d86dcd0bf915", "branch_name": "refs/heads/master", "committer_date": 1685944301000, "content_id": "46e77c9c1a08066e1b9ab8f85f575dbaf36fce58", "detected_licenses": [ "MIT" ], "directory_id": "ec45bee420713f64d2d00a5d1c15a9a5f66a940b", "extension": "py", "fi...
3.03125
stackv2
import cv2 import numpy as np """轮廓检测""" """改了一下,忘记之前是什么样的了""" # 在200x200的图像中央放置100x100的白色方块 img = np.zeros((200, 200), dtype=np.uint8) img[50:150, 50:150] = 1 # 对图像进行二值化操作 ret, thresh = cv2.threshold(img, 100, 255, 0) # 返回 图像的轮廓 以及 他们的层次 cv2.RETR_TREE会得到图片的整体轮廓 _, contours, hierarchy = cv2.findContours(thresh, cv2.R...
22
26.23
89
8
251
python
[]
0
true
2024-11-19T02:32:01.283494+00:00
1,672,215,806,000
1cc8901a7ba539782e2ef5b4eef3506ce63520ca
3
{ "blob_id": "1cc8901a7ba539782e2ef5b4eef3506ce63520ca", "branch_name": "refs/heads/master", "committer_date": 1672215806000, "content_id": "c94b77e952ce2b21417890543b5eea52634fc820", "detected_licenses": [ "MIT" ], "directory_id": "ea65afe255ae36a3f03cc2f83375f9c96a6b9c42", "extension": "py", "fi...
2.734375
stackv2
import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium_base import SeleniumBase from user_info import U...
270
37.83
124
22
2,076
python
[]
0
true
2024-11-19T02:32:01.767542+00:00
1,618,832,319,000
fce4e27b93c23c5ac44afcd8b1ad23c667a24264
3
{ "blob_id": "fce4e27b93c23c5ac44afcd8b1ad23c667a24264", "branch_name": "refs/heads/master", "committer_date": 1618832319000, "content_id": "b8aa683442b7c0e326b7d08788f51882559db1bb", "detected_licenses": [ "MIT" ], "directory_id": "460d0867670ca0d560913bff0a6dbb262630c03d", "extension": "py", "fi...
2.953125
stackv2
from bs4 import BeautifulSoup import urllib.request import time import codecs if __name__ == '__main__': with codecs.open('stocks.csv', 'r', encoding='utf-8', errors='ignore') as f: stocks = f.readlines()[1:] interesting = [] for stock in stocks: columns = stock.split(",") name, c...
43
31.05
98
13
357
python
[]
0
true
2024-11-19T02:32:02.152131+00:00
1,565,911,138,000
803331709be0f75d99f0ae0b5cc8ab343977f831
3
{ "blob_id": "803331709be0f75d99f0ae0b5cc8ab343977f831", "branch_name": "refs/heads/master", "committer_date": 1565911138000, "content_id": "a6eed647debda714a503678cbe4f04a871907f78", "detected_licenses": [ "MIT" ], "directory_id": "ee921f2b26400293b3276922a3e5342130c73bbf", "extension": "py", "fi...
3.421875
stackv2
""" File: create_histograms.py Usage: Given a set of images, create a pair of positive and negative histograms that represent positive RGB values representing an object, and negative examples. """ __author__ = "Brent Redmon" __copyright__ = "Copyright 2019, Texas State University" __credits__ =...
97
32.38
125
14
817
python
[]
0
true
2024-11-19T02:32:02.425597+00:00
1,615,343,552,000
1501bad48b7816818be75b93013233eff90e8922
3
{ "blob_id": "1501bad48b7816818be75b93013233eff90e8922", "branch_name": "refs/heads/master", "committer_date": 1615343552000, "content_id": "d203a7cab736ef2c173b0ca96481e2f690395e05", "detected_licenses": [ "MIT" ], "directory_id": "2e8f6b40cdd1c8d89b5345ab00ea467310eeb90b", "extension": "py", "fi...
2.828125
stackv2
import re import sys import json import html import selenium import functools import operator from utils.selenium import configure_browser from utils.environ import data_dir SIC_codes = { 'banks': 6021, # SIC code for National Commercial Banks } regex_replace_chars = re.compile(r'\s|\/|\\') def replace_chars(m...
126
28.18
80
16
872
python
[]
0
true
2024-11-19T02:32:02.679196+00:00
1,624,467,514,000
aebdb460542ab9e0440048342212dd17991592bf
2
{ "blob_id": "aebdb460542ab9e0440048342212dd17991592bf", "branch_name": "refs/heads/master", "committer_date": 1624467514000, "content_id": "8859745df4bf9e0fcdcd9dfd1adb73b3328f4d8a", "detected_licenses": [ "MIT" ], "directory_id": "3b04bf0a85ad91d725279300fd5e6fd853df7142", "extension": "py", "fi...
2.359375
stackv2
import selectors import socket import types import conf as conf import ClientCommunicator def address_to_id(addr): return '{0}:{1}'.format(addr[0], addr[1]) def accept_wrapper(selector, sock): conn, addr = sock.accept() # Should be ready to read print('accepted connection from', addr) conn.setblock...
53
32.17
91
15
399
python
[]
0
true
2024-11-19T02:32:02.847984+00:00
1,605,061,615,000
8c48b27e33203c87dbec0003d60a8de4255f195d
3
{ "blob_id": "8c48b27e33203c87dbec0003d60a8de4255f195d", "branch_name": "refs/heads/master", "committer_date": 1605061615000, "content_id": "1b8ab865f0f2b395dcdb102286dbe8e547771091", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b142e381af94a2a78098ade0e8f7f8fbc4eaf8fe", "extension": "py"...
2.953125
stackv2
import remi.gui as gui from remi import start, App from remi_ext import TreeTable, SingleRowSelectionTable class MyApp(App): def __init__(self, *args): super(MyApp, self).__init__(*args) def main(self): self.wid = gui.VBox(style={'margin':'5px auto', 'padding': '10px'}) table = [('', '...
128
45.81
89
18
1,325
python
[]
0
true
2024-11-19T02:32:02.982130+00:00
1,540,667,494,000
7df76f3cd7744aef562443ac77c3d8569e43c2e5
3
{ "blob_id": "7df76f3cd7744aef562443ac77c3d8569e43c2e5", "branch_name": "refs/heads/master", "committer_date": 1540667494000, "content_id": "8678dd567db519d670dca84b6f8a196b5074d200", "detected_licenses": [ "MIT" ], "directory_id": "4b2c15f3a8e2e3e981f5ec2186e0f1b008c83127", "extension": "py", "fi...
2.9375
stackv2
import os import re import sys import time import requests from selenium import webdriver from selenium.webdriver.common.keys import Keys site = "https://9anime.to/" # There will be an option between providing the anime name(option "1" ) and the anime episode 1 page (option "2"). anime_name = "" anime_episode_page ...
100
22.78
124
14
627
python
[]
0
true
2024-11-19T02:32:03.127827+00:00
1,547,460,981,000
ac0d84b76e6dcf4c13c6b8c8fd77361f8991b45a
3
{ "blob_id": "ac0d84b76e6dcf4c13c6b8c8fd77361f8991b45a", "branch_name": "refs/heads/master", "committer_date": 1547460981000, "content_id": "e7acdde6c338f54f81b27cf7a032afffb6dbfdcf", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2ae77d8a0e12a1baa77f1bc85e4591c9dea11b76", "extension": "py"...
2.609375
stackv2
#!/usr/local/bin/python3 import os import subprocess def operate_dockers(name, list_command, delete_command): # list command print("List " + name + "....") [status, result] = subprocess.getstatusoutput(list_command) if result: # delete command delete_command = delete_command + result ...
43
26.88
74
15
290
python
[]
0
true
2024-11-19T02:32:03.252913+00:00
1,516,994,345,000
e41345d32ab70cf75d6fbf36b70fb104a7716fba
2
{ "blob_id": "e41345d32ab70cf75d6fbf36b70fb104a7716fba", "branch_name": "refs/heads/master", "committer_date": 1516994345000, "content_id": "dd6c25c9e336d39a1266479c9b318021a41df785", "detected_licenses": [ "Apache-2.0" ], "directory_id": "613cb0c1fa2fa6d3849e76bfab94a77be9898b4b", "extension": "py"...
2.46875
stackv2
#!/usr/bin/env python # -*- coding: UTF-8 -*- #version 0.1 #python version:2.6.4 #lib:lxml # import urllib2 import os import sys import re import getopt import time from urllib import urlencode import simplejson class getsubdomain(object): """docstring for getsubdomain""" def __init__(self): super (getsubdomain, ...
190
25.13
118
19
1,638
python
[]
0
true
2024-11-19T02:32:03.575280+00:00
1,629,436,416,000
3f84fcf35be35f80f086118a98a6ace1ac4c3530
3
{ "blob_id": "3f84fcf35be35f80f086118a98a6ace1ac4c3530", "branch_name": "refs/heads/main", "committer_date": 1629436416000, "content_id": "4795293a4777ee5f58a4e28d66f7c20db0d675c7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "25d51bb0d4a27786782c77f542b7cd0f60d07975", "extension": "py", ...
2.515625
stackv2
#!/usr/bin/python3 # Copyright (c) 2021 Kim Hendrikse import sys import os import parted VERY_BIG_SIZE = 10000 # Partition size in GB OS_PARTITION_SIZE = 50 total_size = 0 # # If size is not defined, then create till the end of the disk. This should be called last # def create_partition(disk, partedDevice, size = N...
78
36.67
134
15
742
python
[]
0
true
2024-11-19T02:32:03.804714+00:00
1,586,278,577,000
cec22562ff349ad83f46351b841541f6db3f1557
3
{ "blob_id": "cec22562ff349ad83f46351b841541f6db3f1557", "branch_name": "refs/heads/master", "committer_date": 1586278577000, "content_id": "9ea7ae90c8bd439688db612aa923e722a73b8918", "detected_licenses": [ "MIT" ], "directory_id": "75edf515078712a63539cdf4c571b5a89e8d42aa", "extension": "py", "fi...
2.53125
stackv2
# AndreiN, 2019 import os import torch import numpy as np import shutil import itertools import glob import re def get_training_data_path(model_dir, best=False, index=None): if best: return os.path.join(model_dir, "training_data_best.pt") if index is not None: fld = os.path.join(model_dir, "...
103
28.87
90
21
698
python
[]
0
true
2024-11-19T02:32:03.992738+00:00
1,622,402,465,000
069e888bbde3a03bdf15d9a3fc2eea8cfc666123
3
{ "blob_id": "069e888bbde3a03bdf15d9a3fc2eea8cfc666123", "branch_name": "refs/heads/master", "committer_date": 1622402465000, "content_id": "537f5dd0172516d9e593b0cd45d88e311603913e", "detected_licenses": [ "ISC" ], "directory_id": "13b91741a345c08fc3b8d982228e330e7f7c4b7e", "extension": "py", "fi...
2.6875
stackv2
""" Models for LangaugeLab Library """ from datetime import timedelta from logging import basicConfig, getLogger from django.conf import settings from django.db.models import ( CASCADE, BooleanField, CharField, DateTimeField, DurationField, FileField, ForeignKey, IntegerField, Man...
229
24.76
77
15
1,327
python
[]
0
true
2024-11-19T02:32:04.053887+00:00
1,610,594,726,000
0d6f44b86a2c7182b7aa39e3d87324d65f3c98ee
4
{ "blob_id": "0d6f44b86a2c7182b7aa39e3d87324d65f3c98ee", "branch_name": "refs/heads/master", "committer_date": 1610594726000, "content_id": "d71df7549cacf4134df840da4504ef64f6523402", "detected_licenses": [ "MIT" ], "directory_id": "74ccc2b10a8aea17542c13f57ba432d0588cf9ee", "extension": "py", "fi...
3.921875
stackv2
""" 给定一个整数数组和一个整数 k,你需要找到该数组中和为 k 的连续的子数组的个数。 示例 1 : 输入:nums = [1,1,1], k = 2 输出: 2 , [1,1] 与 [1,1] 为两种不同的情况。 说明 : 数组的长度为 [1, 20,000]。 数组中元素的范围是 [-1000, 1000] ,且整数 k 的范围是 [-1e7, 1e7]。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/subarray-sum-equals-k """ class Solution: def subarraySum(self, nums, k): ...
38
19.18
57
14
304
python
[]
0
true
2024-11-19T02:32:04.186285+00:00
1,633,282,828,000
b4f87a8437bf08473bf2763d153a3039b5be2d83
3
{ "blob_id": "b4f87a8437bf08473bf2763d153a3039b5be2d83", "branch_name": "refs/heads/master", "committer_date": 1633282828000, "content_id": "8cc99f3972c08ad186e0ee01fc89cb48fa4babfc", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "b30945eb14483621d0f198523bb268c0f4d4d080", "extension": "p...
2.515625
stackv2
from PySide2 import QtCore from .base import ComputeNode from .signal import Signal, INPUT_PLUG, OUTPUT_PLUG from .image.imageparam import ImageParam from PySide2.QtGui import QPixmap from PySide2 import QtWidgets from PIL import ImageQt class View(QtWidgets.QWidget): def __init__(self): super().__init_...
81
28.53
110
14
532
python
[]
0
true
2024-11-19T02:32:04.266351+00:00
1,591,741,444,000
0692fd5eec10fe6e598d5dacad278916dd666179
2
{ "blob_id": "0692fd5eec10fe6e598d5dacad278916dd666179", "branch_name": "refs/heads/master", "committer_date": 1591741444000, "content_id": "03a8b721562d7f4e208b819299e8c05547dd5ce5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "dbb58a75d83eaca5efe25962887f68d1b5df3ba4", "extension": "py"...
2.5
stackv2
''' Copyright 2017 New Relic, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
341
29.86
122
20
2,409
python
[]
0
true
2024-11-19T02:32:04.472754+00:00
1,693,395,423,000
6ff5f7a06c9e43e0335b63445b1fec3d1d6a774c
3
{ "blob_id": "6ff5f7a06c9e43e0335b63445b1fec3d1d6a774c", "branch_name": "refs/heads/master", "committer_date": 1693395423000, "content_id": "36836d82f616532dbe0563106b6eb8c9ebb641c6", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "5588c02756c96b94933ea7a8c76f20544ee2443b", "extension": "p...
2.5625
stackv2
import platform import os.path class Valgrind(object): is_interactive = False def __init__(self, options, suppressions=None, fail_on_errors=True, leakcheck=True ): self.options = options self.suppressions = suppressions self.leakcheck = leakcheck self.fail_on_errors = fail_on_...
81
28.6
89
14
581
python
[]
0
true
2024-11-19T02:32:04.551250+00:00
1,625,149,633,000
2be80c3b437d37b481a256b08af74550257a5c38
4
{ "blob_id": "2be80c3b437d37b481a256b08af74550257a5c38", "branch_name": "refs/heads/main", "committer_date": 1625149633000, "content_id": "894863d31b570b4c2953a44ae50421df8b33263e", "detected_licenses": [ "MIT" ], "directory_id": "b70d64aabb196a5ca5614e88712722a983b5e383", "extension": "py", "file...
3.765625
stackv2
from collections import deque def nextSmallerLeft(arr: list, pseudo_index=-1) -> list: stack = deque() result = [] for i in range(0, len(arr), 1): if len(stack) == 0: result.append(pseudo_index) elif arr[stack[-1]] > arr[i]: result.append(pseudo_index) el...
35
21.17
58
18
212
python
[]
0
true
2024-11-19T02:32:04.752720+00:00
1,507,921,114,000
6dc46c00a448dea61bcd99713381b67acf634aca
3
{ "blob_id": "6dc46c00a448dea61bcd99713381b67acf634aca", "branch_name": "refs/heads/master", "committer_date": 1507921114000, "content_id": "b3a367c99ca77ccc02193bda2d4dbee8fbba9024", "detected_licenses": [ "Unlicense" ], "directory_id": "9b368beab367f7925385ab20dd6f4b53dc424326", "extension": "py",...
3.265625
stackv2
# -*- coding: utf-8 -*- __doc__ = """ malibu.design.borgish --------------------- Borgish was designed as a more extended implementation of Alex Martelli's Borg design pattern, which aims to provide state consistency similar to a singleton design, but without the terribleness of singletons. """ class SharedState(ob...
84
28.96
78
14
537
python
[]
0
true
2024-11-19T02:32:05.448167+00:00
1,683,374,599,000
b749ec6fd633e0a208db7ca03e621361de79d262
3
{ "blob_id": "b749ec6fd633e0a208db7ca03e621361de79d262", "branch_name": "refs/heads/main", "committer_date": 1683374599000, "content_id": "fc8e09b413765e0dde4e08342a3d5cef2d7f3138", "detected_licenses": [ "Apache-2.0" ], "directory_id": "07680239288b8dabc62242381ebc02dc198f8384", "extension": "py", ...
2.671875
stackv2
################################################################################ # Copyright IBM Corporation 2021, 2022 # # 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.ap...
50
30.86
80
14
315
python
[]
0
true
2024-11-19T02:32:05.594101+00:00
1,586,264,530,000
1d100a1929e8f53c0e9f8862f6799f48553813e7
3
{ "blob_id": "1d100a1929e8f53c0e9f8862f6799f48553813e7", "branch_name": "refs/heads/master", "committer_date": 1586264530000, "content_id": "bedb1e848987c94b0b61bc433014a5f35aa31085", "detected_licenses": [ "MIT" ], "directory_id": "750c3bd9a1e1c189965b29870f64590dc9e376db", "extension": "py", "fi...
2.859375
stackv2
''' Gets the top clips from the last 24 hours/7 days/30 days/all time from a twich streamer and posts them to the targetted subreddit, if the bot has not already posted them before. The bot is setup to run daily at the user specified time. The number of top clips that can be retrieved as well as the order based on ...
106
31.27
137
14
845
python
[]
0
true
2024-11-19T02:32:05.654369+00:00
1,502,013,164,000
0400ae10fa0d6f04b727e8cb517896d2afbbd70b
3
{ "blob_id": "0400ae10fa0d6f04b727e8cb517896d2afbbd70b", "branch_name": "refs/heads/master", "committer_date": 1502013164000, "content_id": "9a093fa7723b037f090b235663b7106d8a1b6197", "detected_licenses": [ "MIT" ], "directory_id": "0a82f9d58269f35f839b49548746397e7ee1959f", "extension": "py", "fi...
2.53125
stackv2
import os.path import numpy as np import tensorflow as tf import time import sys from tensorflow.contrib.rnn import LSTMCell from tensorflow.contrib.seq2seq import TrainingHelper, dynamic_decode from tensorflow.python.layers import core as layers_core class seq2seq_model: def __init__(self, word_index_1, word_in...
213
41.71
117
22
1,950
python
[]
0
true
2024-11-19T02:32:05.711593+00:00
1,589,908,966,000
5d9d75aebaf9bbe866175fa0796e3a6d3943328d
2
{ "blob_id": "5d9d75aebaf9bbe866175fa0796e3a6d3943328d", "branch_name": "refs/heads/master", "committer_date": 1589908966000, "content_id": "12fb51555ac15abac38da058afcffb684b513e83", "detected_licenses": [ "MIT" ], "directory_id": "e81fabdd6988c787524755fac73aa9d3631fc64c", "extension": "py", "fi...
2.328125
stackv2
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import os from collections import Mapping import rhea from hestia.list_utils import to_list from polyaxon_schemas.exceptions import PolyaxonConfigurationError, PolyaxonfileError from polyaxon_schemas.specs import SPECIFICATION...
73
34.56
99
18
550
python
[]
0
true
2024-11-19T02:32:05.824998+00:00
1,633,453,962,000
ab7d63d95968031e5ff37c54ad875635855f7b4c
3
{ "blob_id": "ab7d63d95968031e5ff37c54ad875635855f7b4c", "branch_name": "refs/heads/main", "committer_date": 1633453962000, "content_id": "2bd13b606e4cf3abdc0089fb1e1dd492b0851370", "detected_licenses": [ "MIT" ], "directory_id": "68aabad716168c3490c5c6a1717b8672618a4cf1", "extension": "py", "file...
2.890625
stackv2
import pandas as pd import numpy Human_HighQuality = pd.read_csv('../DM_Res_Bio/Human_HighQuality.txt', sep='\t', header=0, names=['Sommet', 'Interaction']) # Initialisation """ L'ensemble des fonctions du DM utilisent un DataFrame pandas afin de traiter au mieux les données. Les dif...
129
39.42
115
17
1,384
python
[]
0
true
2024-11-19T02:32:05.888968+00:00
1,623,585,031,000
8f1b86dfa67647234ea8368a1bb591f72db3799b
4
{ "blob_id": "8f1b86dfa67647234ea8368a1bb591f72db3799b", "branch_name": "refs/heads/master", "committer_date": 1623585031000, "content_id": "4b18f71de7d5800508a54ce5a52e068772f7b59e", "detected_licenses": [ "MIT" ], "directory_id": "74ea373d34e69d747f5d2958414c085c57d03af0", "extension": "py", "fi...
4.09375
stackv2
class LLTreeTraversal: def __init__(self, data): self.tree = data # bfsTraversal is a recursive version of bfs traversal def bfsTraversal(self): root = self.tree queue = [] path = [] if self.tree == None: return [] queue.append(root) pat...
86
29.15
120
14
563
python
[]
0
true
2024-11-19T02:32:06.096149+00:00
1,569,299,477,000
86e76867ebccdd5007f353560f7fad7deea1aa32
2
{ "blob_id": "86e76867ebccdd5007f353560f7fad7deea1aa32", "branch_name": "refs/heads/master", "committer_date": 1569300487000, "content_id": "0c25a29f0eacdc1e45509f85befe8eb466efe9a7", "detected_licenses": [ "MIT" ], "directory_id": "f13d9e5f551fcb2e7cb239917cd5ceb2dcbf1bfd", "extension": "py", "fi...
2.421875
stackv2
''' Computes catalyst properties specific to ORR catalysts ''' import numpy as np import copy import random import os from ase.neighborlist import PrimitiveNeighborList from orr_optimizer.metal import metal from orr_optimizer.ORR import ORR_rate from orr_optimizer.orr_mkm import * from orr_optimizer.graph_theory imp...
303
39.3
173
29
2,651
python
[]
0
true
2024-11-19T02:32:07.193306+00:00
1,298,462,019,000
f6ea5ce1c46526ca79b0241d873513f178d7b290
4
{ "blob_id": "f6ea5ce1c46526ca79b0241d873513f178d7b290", "branch_name": "refs/heads/master", "committer_date": 1298462019000, "content_id": "9fb1a1999fbbb5c8bdf4889b5eb1947be15a2c2c", "detected_licenses": [ "MIT" ], "directory_id": "5d92172b8e10304ee449b901c2655945de8bf64e", "extension": "py", "fi...
3.71875
stackv2
''' Created on Jan 29, 2011 @author: Krzysztof Tarnowski (krzysztof.tarnowski@ymail.com) ''' import engine def board_to_str(board): ''' Pretty prints the game board. Args: board: A 3x3 numpy array ''' def value_to_char(value): ''' Converts constants representing players on a game ...
46
18.65
75
10
270
python
[]
0
true
2024-11-19T02:32:07.353840+00:00
1,515,515,108,000
4fda7480d5966dc68600b2828b7488ee29aee90b
3
{ "blob_id": "4fda7480d5966dc68600b2828b7488ee29aee90b", "branch_name": "refs/heads/master", "committer_date": 1515515108000, "content_id": "aabccbc502f45307192ad49b58d26a2d99530e61", "detected_licenses": [ "MIT" ], "directory_id": "f2ed5c41a1d8aa491a6a8a1c969d94684cff87c0", "extension": "py", "fi...
2.984375
stackv2
'''20180108@keyber 目的:不用key code跟第三方就能视化DB 把DB展开的工具的简易可视化工具,只用内建的sqlite3,不需要其他轮子 DB路径可以把DB file直接拖拉到console DB |_TAble |_Table |__data ''' #20180110 git pull test import sqlite3 as lite #读取db path,顺便去掉"符号 mydb = input('''2018018@keyber\n\n#enter db full path : \n''') i...
51
19.51
85
9
387
python
[]
0
true
2024-11-19T02:32:07.462558+00:00
1,605,102,249,000
8ce6b962ee00a034083e80675a59b07f241e846b
3
{ "blob_id": "8ce6b962ee00a034083e80675a59b07f241e846b", "branch_name": "refs/heads/master", "committer_date": 1605102249000, "content_id": "91e1912bfc5cbe7d74a960ae359992b5a56a9cf2", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "8fc550bde58b2b02b5a22bbd53fec63a8de9ad36", "extension": "p...
2.734375
stackv2
import numpy as np from sklearn.linear_model import Ridge class Regressor: def __init__(self): pass def fit(self, X, y): X_array = np.array([np.array(X_i) for X_i in X[:, 1]]) self.reg = Ridge(alpha=1) self.reg.fit(X_array, y) def predict(self, X): X_array = np.ar...
16
25
62
14
116
python
[]
0
true
2024-11-19T02:32:07.511571+00:00
1,562,638,970,000
67fd5338e8242e64975892837d194273cb264256
3
{ "blob_id": "67fd5338e8242e64975892837d194273cb264256", "branch_name": "refs/heads/master", "committer_date": 1562638970000, "content_id": "c185fa70a0ab6e21a89673e0467291f70298d1c3", "detected_licenses": [ "MIT" ], "directory_id": "bb4ce98c863620ae1992e789bb1412efd4991e4b", "extension": "py", "fi...
2.609375
stackv2
import json import urllib.parse import boto3 import random import string print('Loading function') s3 = boto3.client('s3') comprehendmedical = boto3.client(service_name='comprehendmedical', region_name='us-east-1') def randomString(stringLength=10): """Generate a random string of fixed length """ letters = ...
124
25.8
97
16
860
python
[]
0
true
2024-11-19T02:32:08.698529+00:00
1,623,176,915,000
cb518e64a527fa16d6787247b0004837cd778bb5
3
{ "blob_id": "cb518e64a527fa16d6787247b0004837cd778bb5", "branch_name": "refs/heads/master", "committer_date": 1623176915000, "content_id": "03400cd631f9a6228a3df34cad9804f5722b4cbf", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ac0f96945063114c4662621056227561655f429b", "extension": "py"...
2.75
stackv2
import os from termcolor import colored from queryfuzz.utils.file_operations import create_file, read_file def get_all_dl_files(path): all_files = list() for r,d,f in os.walk(path): for file in f: if file.find(".dl") != -1: all_files.append(os.path.join(r,file)) return ...
64
28.36
88
16
444
python
[]
0
true
2024-11-19T02:32:09.590157+00:00
1,609,531,733,000
18756d919bf38649a8ee3f4e9fc73cba06f4dbdd
3
{ "blob_id": "18756d919bf38649a8ee3f4e9fc73cba06f4dbdd", "branch_name": "refs/heads/master", "committer_date": 1609531733000, "content_id": "dce8b72033af268940729bd9b2b90e990b2e8b61", "detected_licenses": [ "MIT" ], "directory_id": "8f26c1bea669bf3c7a552a192fa0e55466b81ed5", "extension": "py", "fi...
2.921875
stackv2
from typing import List, Optional from .config import PRICE_POINT_MIN, PRICE_POINT_MAX from .order_book_entry import OrderBookEntry from .price_point import PricePoint from .trade import Trade class LimitOrderBook: """ A LimitOrderBook is instantiated for each symbol traded. """ def __init__(self, sy...
104
38.22
108
21
761
python
[]
0
true
2024-11-19T02:32:09.656616+00:00
1,553,328,679,000
764cb4362e6abe62c4e0af3ca627050fe52c4c08
3
{ "blob_id": "764cb4362e6abe62c4e0af3ca627050fe52c4c08", "branch_name": "refs/heads/master", "committer_date": 1553328679000, "content_id": "a4a05d7ef35c1a690b1d442c0de85d51672fb61a", "detected_licenses": [ "MIT" ], "directory_id": "145c57ad9abf669966241a66bc928572a247da56", "extension": "py", "fi...
2.984375
stackv2
import numpy as np import matplotlib.pyplot as plt from keras.datasets import mnist from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.optimizers import Adam from keras.callbacks import EarlyStopping from keras.utils import np_utils from keras.utils.visualize_util i...
111
25.06
77
11
830
python
[]
0
true
2024-11-19T02:32:09.947401+00:00
1,679,455,401,000
efe15a3703318abeef5d12ec746d3c514bc0d917
2
{ "blob_id": "efe15a3703318abeef5d12ec746d3c514bc0d917", "branch_name": "refs/heads/master", "committer_date": 1679455401000, "content_id": "5af9b9093918ff28e15bdff4c7ba322e29ba8180", "detected_licenses": [ "MIT" ], "directory_id": "bf6ad3ad009995087489b03ba2259239e212439b", "extension": "py", "fi...
2.46875
stackv2
import numpy as np from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.utils import check_random_state from ..detectors.base import BaseDetector from sklearn.utils.validation import _check_sample_weight def _check_data_params(obj, X, y, conf_score): """Extracted out of BaseHandler for WeightedBa...
61
35.64
87
15
528
python
[]
0
true
2024-11-19T02:32:10.046351+00:00
1,516,683,714,000
c6b7dc94db153baa1d2a83360e4b4d3da50cfce0
2
{ "blob_id": "c6b7dc94db153baa1d2a83360e4b4d3da50cfce0", "branch_name": "refs/heads/master", "committer_date": 1516683714000, "content_id": "cdeca3d4608800217d7f68d564298e6e4df8ea5e", "detected_licenses": [ "MIT" ], "directory_id": "a393ddd8728d08cbd007a7ffb00c3176b9b723a2", "extension": "py", "fi...
2.34375
stackv2
import requests from .YWeathermethods import YWeathermethods class YWeather: baseurl="https://query.yahooapis.com/v1/public/yql" u='f' def weatherat(self,place): self.place=place def unit(self,u): self.u=u def getweather(self): url = "%s?q=select* from weather...
22
30.73
175
16
175
python
[]
0
true
2024-11-19T02:32:10.235319+00:00
1,571,910,442,000
c45def15578ed1ea4e6847db1239c267de032cf6
3
{ "blob_id": "c45def15578ed1ea4e6847db1239c267de032cf6", "branch_name": "refs/heads/master", "committer_date": 1571910442000, "content_id": "8a97acf0a7c81d12915ff46751a3a2c19c695140", "detected_licenses": [ "MIT" ], "directory_id": "014f36db5cbbb67e64cba3f6764fa64ff230a409", "extension": "py", "fi...
2.75
stackv2
n = input() A = set(map(int, input().split())) n = int(input()) for i in range(n): cmd = input().split()[0] X = set(map(int, input().split())) if cmd == 'intersection_update': A.intersection_update(X) elif cmd == 'update': A.update(X) elif cmd == 'difference_update': A....
18
23.89
46
14
109
python
[]
0
true
2024-11-19T02:32:10.423937+00:00
1,650,490,748,000
437f62e1be0d36ac6e61a400d11e0aac901eb893
2
{ "blob_id": "437f62e1be0d36ac6e61a400d11e0aac901eb893", "branch_name": "refs/heads/master", "committer_date": 1650490748000, "content_id": "9ea123cedfa57a2e9d973da2caf9984252985b67", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2c4c3f777d94157d5a5cf8664907de1a605a1110", "extension": "py"...
2.375
stackv2
import tensorflow as tf import graphsage.models as models import graphsage.layers as layers from graphsage.aggregators import MeanAggregator, MaxPoolingAggregator, MeanPoolingAggregator, SeqAggregator, GCNAggregator flags = tf.app.flags FLAGS = flags.FLAGS class SupervisedGraphsage(models.SampleAndAggregate): ""...
126
42.33
123
18
1,141
python
[]
0
true
2024-11-19T02:32:10.478108+00:00
1,608,150,396,000
b4217526b35303b2fcf22f0b52e75ed9387327ee
3
{ "blob_id": "b4217526b35303b2fcf22f0b52e75ed9387327ee", "branch_name": "refs/heads/master", "committer_date": 1608150396000, "content_id": "5f2ac2539048a23d0be3d7ed780ddd4649df1e15", "detected_licenses": [ "MIT" ], "directory_id": "e0aae8e0a67ed8fd984681d040f752034649012e", "extension": "py", "fi...
3.15625
stackv2
import os import random import cherrypy """ This is a simple Battlesnake server written in Python. For instructions see https://github.com/BattlesnakeOfficial/starter-snake-python/README.md """ class Battlesnake(object): @cherrypy.expose @cherrypy.tools.json_out() def index(self): # This function...
338
38.2
145
20
3,138
python
[]
0
true
2024-11-19T02:32:10.668411+00:00
1,601,115,684,000
0eb5ddaadd81fccf26cd64f54384775fb5396e0f
3
{ "blob_id": "0eb5ddaadd81fccf26cd64f54384775fb5396e0f", "branch_name": "refs/heads/master", "committer_date": 1601115684000, "content_id": "947555ff43b338a7e8370446640578dad5a6fff4", "detected_licenses": [ "MIT" ], "directory_id": "7c53b1ddaabdf3f220a880913b3ee3b32ebeed54", "extension": "py", "fi...
3.078125
stackv2
import io import csv import time import dateparser from glob import glob from detectors.textDetect import TextDetector from detectors.expiryDetect import ExpiryDetector years = 256 months = 31 expiry_days = { 'milk': 1 * months, 'egg': 1.5 * months, 'cereal': 2 * years, 'condiment': 4 * years, 'br...
173
33.91
104
20
1,302
python
[]
0
true
2024-11-19T02:32:10.721149+00:00
1,688,692,142,000
8dfeff65269b2b5179340bb89b1e7af9c86eb1fe
3
{ "blob_id": "8dfeff65269b2b5179340bb89b1e7af9c86eb1fe", "branch_name": "refs/heads/main", "committer_date": 1688692142000, "content_id": "7ecc075cd7c30f5668d1fc232e4a3299283ff4c7", "detected_licenses": [ "MIT" ], "directory_id": "19fafc762b0a2461242a0a322e6ad31f7a1b7251", "extension": "py", "file...
2.65625
stackv2
from datetime import datetime import matplotlib.pyplot as plt import pathlib import inspect def annotate_plot(func): def wrapper_annotate_plot(*args, **kwargs): result = func(*args, **kwargs) plot_date_time = datetime.strftime(datetime.now(), "%Y/%m/%d %H:%M:%S") # Get the filename assisia...
21
32.19
86
12
165
python
[]
0
true
2024-11-19T02:32:10.823381+00:00
1,633,277,535,000
97b97d77a441cb9ed3fb2735cad77c199bf43fa3
2
{ "blob_id": "97b97d77a441cb9ed3fb2735cad77c199bf43fa3", "branch_name": "refs/heads/master", "committer_date": 1633277535000, "content_id": "cbe38089940e232fea33cce13f3ea10e255f674c", "detected_licenses": [ "MIT" ], "directory_id": "f27290017c143cf8358c679088e641ca48f85ece", "extension": "py", "fi...
2.453125
stackv2
"""Peewee migrations -- 030_nullable fields.py. Add not-null constraints to columns on the sub and sub_post tables that in practice cannot be null as they cause obvious application errors by violating implicit assumptions. Because these failures are so obvious this migration does not include a data migration, only th...
35
31.69
69
8
288
python
[]
0
true
2024-11-19T02:32:11.046817+00:00
1,576,830,710,000
e42f6039f6983705a2c0240c9cbdfea6b292d379
3
{ "blob_id": "e42f6039f6983705a2c0240c9cbdfea6b292d379", "branch_name": "refs/heads/master", "committer_date": 1576830710000, "content_id": "a2b3629ebc25658b70232c9238b3e9088428c60d", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "5a4890c6a05aedac43a8f61ef4f4a25493313875", "extension": "p...
2.875
stackv2
from mpl_toolkits import mplot3d import cv2 from mpl_toolkits.mplot3d import Axes3D import numpy as np import matplotlib.pyplot as plt print("Enter a char to choose variable from dataset below : ") print("\nc - Cloud moisture mixing ratio\np - Pressure\nt - Temperature") choice = input(">>> ").lower().rstrip() if choi...
67
28.7
75
19
681
python
[]
0
true
2024-11-19T02:32:11.093585+00:00
1,575,374,357,000
963422fcab37bb62f72ae0e44b89f1326447fd61
3
{ "blob_id": "963422fcab37bb62f72ae0e44b89f1326447fd61", "branch_name": "refs/heads/master", "committer_date": 1575374357000, "content_id": "793d7d3d4d34a509642c9fd75100bdd292f81636", "detected_licenses": [ "MIT" ], "directory_id": "d4d3560e2abaeed82a3925e8c7ffbb53caebf890", "extension": "py", "fi...
2.640625
stackv2
import socket,sys from subprocess import Popen, PIPE from nbstreamreader import NonBlockingStreamReader as NBSR from sys import platform import os class Communicator(object): def __init__(self): self.Socket = None self.ChildProcess = None def setSocket(self,Socket,TIMEOUT=60): self.Socket = Socket self.Sock...
118
23.45
128
19
760
python
[]
0
true
2024-11-19T02:32:11.366472+00:00
1,582,195,342,000
f7f3b848ad25cdf506ad0d37400098643e6de9de
2
{ "blob_id": "f7f3b848ad25cdf506ad0d37400098643e6de9de", "branch_name": "refs/heads/master", "committer_date": 1582195342000, "content_id": "95919d76bbc6b7d35f721b60a168ada0fa384101", "detected_licenses": [ "MIT" ], "directory_id": "a8a312fc311dc5575759a144ee01b30fe3731cc1", "extension": "py", "fi...
2.375
stackv2
#! /usr/bin/env python # -*- coding: utf-8 -*- """Make target labels for the End-to-End model (LDC97S62 corpus).""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import re from tqdm import tqdm from collections import OrderedDict from swbd.labels.ldc97s...
313
42.39
137
27
3,031
python
[]
0
true
2024-11-19T02:32:11.618860+00:00
1,571,673,380,000
2391c7796e742b66a6f5b5d77793b39f6b1091f2
3
{ "blob_id": "2391c7796e742b66a6f5b5d77793b39f6b1091f2", "branch_name": "refs/heads/master", "committer_date": 1571673380000, "content_id": "4cf18f3f3bc2dbb819702fab7e0fa52cbe8c743a", "detected_licenses": [ "MIT" ], "directory_id": "97efc4a0ae68b19135b4ca122f18c8fe5cc84df1", "extension": "py", "fi...
3.03125
stackv2
from os import listdir import os from os.path import isfile, join def has_file(path): files = [f for f in listdir(path) if isfile(join(path, f))] return len(files) > 0 def clear_folder(path): #including last '/' files = [f for f in listdir(path) if isfile(join(path, f))] for fname in files: fp...
26
32.19
74
12
214
python
[]
0
true
2024-11-19T02:32:11.730480+00:00
1,634,828,946,000
5c2c9cfd37ed6514355034984bb379d3a6bc5ea3
3
{ "blob_id": "5c2c9cfd37ed6514355034984bb379d3a6bc5ea3", "branch_name": "refs/heads/master", "committer_date": 1634828946000, "content_id": "98b6a3db9a5f83bb0dd926ea544abeb1be67135c", "detected_licenses": [ "MIT" ], "directory_id": "86da1fc3807be551ce0329b4e6f2844cc1293c79", "extension": "py", "fi...
2.546875
stackv2
""" REKINDLE reweighting as published in Tax et al., MRM 2015 Copyright Chantal Tax (taxc@cardiff.ac.uk) and Alexander Leemans (alexander@isi.uu.nl) . Python adaptation and SOLID weighting (Sairanen et al., NeuroImage 2019) implementation by Viljami Sairanen (viljami.sairanen@gmail.com). """ import numpy as np from nu...
167
50.21
144
17
2,027
python
[]
0
true
2024-11-19T02:32:11.995615+00:00
1,680,511,275,000
031d0ec3e0e037a63a84d16846379f7cdeb1798c
3
{ "blob_id": "031d0ec3e0e037a63a84d16846379f7cdeb1798c", "branch_name": "refs/heads/master", "committer_date": 1680511275000, "content_id": "ec197614a3625cf0b36e41b2a28100482a17851e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "84fcf87bc93f33ea615ec95ab0dfcba27d47b054", "extension": "p...
3.484375
stackv2
# # This file is part of FaceDancer. # """ Functionally for automatic instantiations / tracking via decorators. """ import inspect from abc import ABCMeta, abstractmethod from dataclasses import dataclass # FIXME: this should have get_identifier on it class AutoInstantiable(metaclass=ABCMeta): """ Base ...
122
34.61
100
12
877
python
[]
0
true
2024-11-19T02:32:12.485274+00:00
1,419,649,507,000
5dca05d328e385c033327a4e8b5ec9a82f4d336a
3
{ "blob_id": "5dca05d328e385c033327a4e8b5ec9a82f4d336a", "branch_name": "refs/heads/master", "committer_date": 1419649957000, "content_id": "498fd9bb5490016e585125afd1ad27c8055e668d", "detected_licenses": [ "MIT" ], "directory_id": "97c2ca10d0f8edfd8c6ffab5e30836f76e975397", "extension": "py", "fi...
2.875
stackv2
# Захват изображения с экрана и сохранение в файлы с определенным периодом. # частота # задержка перед стартом # количество # Путь к папке # стартовый номер # маска имени # TODO: # Вынести все эти объявления куда-нибудь в хорошее правильное место. # ------------------- Парсинг аргументов ---------------------------- ...
82
27.68
84
12
628
python
[]
0
true
2024-11-19T02:32:12.538803+00:00
1,508,319,068,000
4e2ce30b2a8e4ca54c3029bf7861b8efa41ffe42
3
{ "blob_id": "4e2ce30b2a8e4ca54c3029bf7861b8efa41ffe42", "branch_name": "refs/heads/master", "committer_date": 1508319068000, "content_id": "3eab8f4bf359703d93e6d83f28ccd683e31bb574", "detected_licenses": [ "Apache-2.0" ], "directory_id": "218a77c450db2e7dddba38849ecb849be4c71703", "extension": "py"...
2.6875
stackv2
from collections import defaultdict import pickle import numpy as np import argparse import random import logging import sys import math from ast import literal_eval import gym from gym import wrappers import labyrinth # noqa from labyrinth.board import get_board_reachability def print_reachability(board, position...
286
31.31
95
19
2,027
python
[]
0
true
2024-11-19T02:32:12.648064+00:00
1,627,900,069,000
a7eba01da27daaf754fe45c35fad73c8a01e9a9a
4
{ "blob_id": "a7eba01da27daaf754fe45c35fad73c8a01e9a9a", "branch_name": "refs/heads/master", "committer_date": 1627900069000, "content_id": "67897aa4327c23f9fb0a567e5be6ad64e3aedd4c", "detected_licenses": [ "MIT" ], "directory_id": "4c28558f3ca51e2821fff83f7b76973a3a428c39", "extension": "py", "fi...
3.859375
stackv2
import turtle import random COLORS = ("red", "green", "blue", "grey", "orange", "purple", "pink", "aqua") class Car(turtle.Turtle): def __init__(self, position): super().__init__() self.shape("square") self.shapesize(stretch_wid=1, stretch_len=2) self.color(random.choice(COLORS))...
19
22.79
77
11
115
python
[]
0
true
2024-11-19T02:32:12.825970+00:00
1,636,398,651,000
7cd88d57b009f1d9cdd8b0b8aa7f161c1ebdd75d
3
{ "blob_id": "7cd88d57b009f1d9cdd8b0b8aa7f161c1ebdd75d", "branch_name": "refs/heads/master", "committer_date": 1636398651000, "content_id": "e7db6840aca68cab76779eb11120c5eddb7120d1", "detected_licenses": [ "MIT" ], "directory_id": "e4e7461d012360b32779a851f8734c0a18289bf1", "extension": "py", "fi...
2.625
stackv2
# -*- coding: utf-8 -*- from collections import namedtuple from google.appengine.datastore.datastore_query import Cursor PaginationResult = namedtuple( 'PaginationResult', [ 'collection', 'prev_cursor', 'next_cursor', 'prev', 'next', ], ) class Pagination(object)...
61
30.11
99
18
386
python
[]
0
true
2024-11-19T02:32:12.892355+00:00
1,606,176,797,000
ee67072b20f2c7500bd7f9d1a832122da873d652
3
{ "blob_id": "ee67072b20f2c7500bd7f9d1a832122da873d652", "branch_name": "refs/heads/master", "committer_date": 1606176797000, "content_id": "309bf34bf4c49ebb1c309e5aeed195ca58197a99", "detected_licenses": [ "MIT" ], "directory_id": "e87b61d8d48e211f7370cd7fae2ef15ea82b593b", "extension": "py", "fi...
2.890625
stackv2
# !/usr/bin/python #coding: utf-8 import turtle as tu from turtle import Turtle import math from math import fabs AU = 149597887000 #metrów G = 6.67384808080808*10**(-11) #stała grawitacji kms = 1000 #konwersja na metry na sekundę pi = math.pi e = math.e kg = 1.0 km = 1000.0 #konwersja na metry class ffield_central...
85
20.66
117
22
672
python
[]
0
true
2024-11-19T02:32:13.088000+00:00
1,675,068,675,000
907ea9106d51b480a098fccaf6c139cd54b7da8d
3
{ "blob_id": "907ea9106d51b480a098fccaf6c139cd54b7da8d", "branch_name": "refs/heads/master", "committer_date": 1675068675000, "content_id": "b449f8fd193a0a3e248d817f2aaf80fa89d5bb11", "detected_licenses": [ "MIT" ], "directory_id": "6b989e9ed854c9c8a04fdcf3e9df7ad8922cf856", "extension": "py", "fi...
2.828125
stackv2
''' File: models.py Description: The models for the User service. ''' from user_service.user_service import db import datetime class User(db.Model): """User database model. The User database model is used to store the information related to the individual users allowing for their identification and authen...
39
33.36
93
12
288
python
[]
0
true
2024-11-19T02:32:13.556865+00:00
1,587,974,576,000
cb9432557f896ff3b27a99a89cac45450675af73
3
{ "blob_id": "cb9432557f896ff3b27a99a89cac45450675af73", "branch_name": "refs/heads/master", "committer_date": 1587974576000, "content_id": "13b52f98f1f15c3540cd81cc1c2c72c7b3756223", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7e4b6e6aa20557091f112673b936a20ed9bce0db", "extension": "py"...
3.390625
stackv2
#!/usr/bin/python3 from time import ctime,sleep # only importing desired functions from subprocess import getstatusoutput,getoutput from os import mkdir options=''' press 1 to check current date and time : Press 2 to run any command in your current os : press 3 to create a directory : press 4 to...
42
21.95
51
12
272
python
[]
0
true
2024-11-19T02:32:13.838947+00:00
1,460,266,627,000
42ddd671b747ebfff59a86331a90473e9d080967
3
{ "blob_id": "42ddd671b747ebfff59a86331a90473e9d080967", "branch_name": "refs/heads/master", "committer_date": 1460266627000, "content_id": "c1e817a3d6f7a570a7d6757c43515c7ea5903999", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e8415a37c27d5eb7fe68bdc006fbe33fb636f56c", "extension": "py"...
2.75
stackv2
""" Various Bayesian linear regression learning and prediction functions. By using the appropriate bases, this will also yield a simple implementation of the "A la Carte" GP [1]_. .. [1] Yang, Z., Smola, A. J., Song, L., & Wilson, A. G. "A la Carte -- Learning Fast Kernels". Proceedings of the Eighteenth Internati...
208
31.87
79
22
1,751
python
[]
0
true
2024-11-19T02:32:13.894559+00:00
1,460,034,323,000
247b517615f723e693894c85fe17dc3aca4c5c9a
2
{ "blob_id": "247b517615f723e693894c85fe17dc3aca4c5c9a", "branch_name": "refs/heads/master", "committer_date": 1460034323000, "content_id": "6beb3a562e65b8063c3cdee5e51b76c720700f5c", "detected_licenses": [ "MIT" ], "directory_id": "7cf36e372bf41aa68449593b1b1e42b9ae6c2731", "extension": "py", "fi...
2.4375
stackv2
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from hitcount.models import HitCountMixin from datetime import date class Administrator(models.Model): """ Admin representation in database, subclass of User """ user = models.OneToOneField(User)...
49
23.78
62
10
254
python
[]
0
true
2024-11-19T02:32:14.005816+00:00
1,501,571,106,000
d27256466a73a22e46a4b23104b60a0611d5da30
3
{ "blob_id": "d27256466a73a22e46a4b23104b60a0611d5da30", "branch_name": "refs/heads/master", "committer_date": 1501571106000, "content_id": "294306680bd4017a8033fdd0ca5feda62a4c3829", "detected_licenses": [ "MIT" ], "directory_id": "a4521908473d786e5630abef0c972151c84df7b8", "extension": "py", "fi...
2.75
stackv2
""" From S3 URL to Azure blob on Azure Function, Python 3.5.2 """ import os import json import platform import urllib.request from azure.storage.blob import BlockBlobService, ContentSettings # Check python version. message = "Using Python '{0}'".format(platform.python_version()) print(message) # Get s3 url path an...
40
24.9
89
12
238
python
[]
0
true
2024-11-19T02:32:14.170917+00:00
1,453,578,954,000
2f5daa9a4a916dd0e549def771a3b1400111ac2b
3
{ "blob_id": "2f5daa9a4a916dd0e549def771a3b1400111ac2b", "branch_name": "refs/heads/master", "committer_date": 1453578954000, "content_id": "1fad2e1af399bcea99f0848fbcd8efb3c4ba0f20", "detected_licenses": [ "MIT" ], "directory_id": "7b4a74b194385f60a554a96a39b39e96d7b0efd1", "extension": "py", "fi...
2.65625
stackv2
from bs4 import BeautifulSoup from optparse import OptionParser import requests import csv import datetime import time import sys # This script reads statistics from a VirginMedia SuperHub2 / 2ac # It will save into a .CSV file the following information # * Upstream power levels # * Downstream power levels # * D...
171
35.44
118
15
1,539
python
[]
0
true
2024-11-19T02:32:14.295210+00:00
1,685,391,425,000
db93d8d760d03a17eabf59541ad5ac436ae4c260
2
{ "blob_id": "db93d8d760d03a17eabf59541ad5ac436ae4c260", "branch_name": "refs/heads/master", "committer_date": 1685391425000, "content_id": "b36cf3eb767ddd64a7caedb5d98f39f94e5f08a9", "detected_licenses": [ "MIT" ], "directory_id": "22dd73faf634d89af74841d9491a6198a4b7c7ce", "extension": "py", "fi...
2.375
stackv2
import logging from typing import Dict, Union from canopen.node.base import BaseNode from canopen.sdo import SdoServer, SdoAbortedError from canopen.pdo import PDO, TPDO, RPDO from canopen.nmt import NmtSlave from canopen.emcy import EmcyProducer from canopen.objectdictionary import ObjectDictionary from canopen impor...
129
32.06
72
15
1,032
python
[]
0
true
2024-11-19T02:32:14.350161+00:00
1,561,944,250,000
0655a611f466ca55e45387ea5e8cace940bd8e31
3
{ "blob_id": "0655a611f466ca55e45387ea5e8cace940bd8e31", "branch_name": "refs/heads/master", "committer_date": 1561944250000, "content_id": "469e5b061cc32d73164966ae99dce24cf7627a2a", "detected_licenses": [ "MIT" ], "directory_id": "425f6b477408ec6af736b5ec23b79c00fcd9c1bc", "extension": "py", "fi...
2.625
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jun 28 16:45:56 2019 @author: Kirby Urner Coffee Shops Network business model For learning purposes. """ import numpy as np import pandas as pd import json import hashlib import random #%% # Create data section def shazam(the_str): return hashlib...
367
31.26
81
15
2,808
python
[]
0
true
2024-11-19T02:32:14.503604+00:00
1,481,160,312,000
40b57db760f76fa992655fb9fd969d7a4debacb7
3
{ "blob_id": "40b57db760f76fa992655fb9fd969d7a4debacb7", "branch_name": "refs/heads/master", "committer_date": 1481160312000, "content_id": "7a5947761441940059dd9e6b9213a8cd9eb6dd57", "detected_licenses": [ "MIT" ], "directory_id": "e0a1a77e9706f4e3ac406314139ee8cfc0ac14d9", "extension": "py", "fi...
3.21875
stackv2
from datetime import datetime, timedelta import logging class ReminderModule(): ''' An irc module that provides a simple reminder service rough draft of the command form !remind me in number [time specifier] that "string" after the right number of minutes/hours/seconds has elapsed the bo...
97
30.52
129
14
712
python
[]
0
true
2024-11-19T02:32:14.913549+00:00
1,637,859,184,000
81338e04d78a026fb052420156862e0fd3750a34
2
{ "blob_id": "81338e04d78a026fb052420156862e0fd3750a34", "branch_name": "refs/heads/main", "committer_date": 1638282816000, "content_id": "8ff1df7ed2da7656b65d0df05b00d861cf4d1979", "detected_licenses": [ "Apache-2.0" ], "directory_id": "251ff6bd2fdce90a32254a4bdeaac1a70629aabf", "extension": "py", ...
2.328125
stackv2
from typing import Optional from common.adapters.fhir_api import fhir_api # FIXME: use this function on a mapping before sending it to the analyzer def dereference_concept_map(mapping, auth_token: Optional[str]): for attribute in mapping["attributes"]: for input_group in attribute["input_groups"]: ...
23
43
86
16
210
python
[]
0
true
2024-11-19T02:32:14.970565+00:00
1,661,002,482,000
4c5805856a6ac5c5a5f2f99c563aae393d53aa15
4
{ "blob_id": "4c5805856a6ac5c5a5f2f99c563aae393d53aa15", "branch_name": "refs/heads/master", "committer_date": 1661002482000, "content_id": "0e9298ce5167008afc5ebc96488a10441347139b", "detected_licenses": [ "MIT" ], "directory_id": "96c5514fcca03b12f84d1df759754f35282efeca", "extension": "py", "fi...
3.9375
stackv2
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Fichier: sexag.py # Auteur: Marc COATANHAY """ Module python pour effectuer les calculs au format sexagesimal. """ # Import des modules # Définitions constantes et variables globales signes = {-1: "-", 1: " "} def todec(terme): """transforme un terme sexagésimal...
79
23.67
78
13
605
python
[]
0
true
2024-11-19T02:32:15.338921+00:00
1,633,368,287,000
ff972c295af50b80922e8654c78b34e26edf7531
3
{ "blob_id": "ff972c295af50b80922e8654c78b34e26edf7531", "branch_name": "refs/heads/main", "committer_date": 1633368287000, "content_id": "defe73e8951002e0e068a27be48608dbabe0bdbd", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fa72697feef44fdba1bf4e5c8064d25b65a6cb83", "extension": "py", ...
2.765625
stackv2
""" Ravel application abstractions """ import cmd import importlib import os import re import sys import time import tempfile import psycopg2 import sqlparse from sqlparse.tokens import Keyword import ravel.util from ravel.log import logger from ravel.cmdlog import cmdLogger def mk_watchcmd(db, args): """Constr...
334
33.65
142
19
2,594
python
[{"finding_id": "codeql_py/overly-permissive-file_9a6ba3848e100466_51ae583a", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ...
1
true
2024-11-19T02:32:15.402923+00:00
1,692,430,092,000
272e1ffc669d2262186e3b18d9640d817e89165a
2
{ "blob_id": "272e1ffc669d2262186e3b18d9640d817e89165a", "branch_name": "refs/heads/main", "committer_date": 1692430092000, "content_id": "b20384db2ffaac0e88c4588af48232068c1c7207", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9734c93c86c982b1ce046340bac9e53645b261b8", "extension": "py", ...
2.46875
stackv2
# -*- coding: utf-8 -*- """This file contains an Outlook search MRU Registry parser.""" from plaso.containers import events from plaso.parsers import winreg_parser from plaso.parsers.winreg_plugins import interface class OutlookSearchMRUEventData(events.EventData): """Outlook search MRU event data attribute contai...
92
35.76
78
14
819
python
[]
0
true
2024-11-19T02:32:15.455600+00:00
1,674,037,025,000
47b3c778274296187eef4798eccf6c4b3b47b6b2
3
{ "blob_id": "47b3c778274296187eef4798eccf6c4b3b47b6b2", "branch_name": "refs/heads/master", "committer_date": 1674037025000, "content_id": "991dfe5a7412898a138665546fe5ecc6803c1b72", "detected_licenses": [ "MIT" ], "directory_id": "1dd61e8bdc9b3bb50a4af891dec1a4d7d5003afa", "extension": "py", "fi...
3.390625
stackv2
import numpy as np import matplotlib.pyplot as plt import cv2 # With jupyter notebook uncomment below line # %matplotlib inline # This plots figures inside the notebook def plot_cv_img(input_image, output_image): """ Converts an image from BGR to RGB and plots """ # change color ...
48
24.62
57
11
343
python
[]
0
true
2024-11-19T02:32:15.512625+00:00
1,480,868,467,000
d8440c1dcf5eec9d50c23dd0f485b5a4c7e26744
3
{ "blob_id": "d8440c1dcf5eec9d50c23dd0f485b5a4c7e26744", "branch_name": "refs/heads/master", "committer_date": 1480868467000, "content_id": "af3dee8d193144b0cd308959ee2b971251ac8074", "detected_licenses": [ "MIT" ], "directory_id": "6a1231902c7427e6182f37b4bb4d1f7affb6aa17", "extension": "py", "fi...
2.640625
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- """ remdupes.py: Reads lines from stdin and prints non-duplicated lines to stdout """ vers_date = '2015-05-13' copyright = 'Copyright (c) 2015 Brian High' license = 'MIT' repos_url = 'https://github.com/brianhigh/amazon-search' import sys seen = set() for line in sys.stdin:...
22
21.27
77
12
135
python
[]
0
true
2024-11-19T02:32:15.695989+00:00
1,633,780,392,000
342b4b58d1d193abd48a5a9b570bba8cac5c6977
3
{ "blob_id": "342b4b58d1d193abd48a5a9b570bba8cac5c6977", "branch_name": "refs/heads/master", "committer_date": 1633780392000, "content_id": "23dbb20059e48e496675fac1738b15298e28ac18", "detected_licenses": [ "MIT" ], "directory_id": "be9d836480efbb14fb5f66895834d29fd036ee2f", "extension": "py", "fi...
3.015625
stackv2
import shodan import requests from extras import printcolor import time import sys from colorama import Fore, Back, Style SHODAN_API_KEY = 'Q4wtGdNmqnaQ267zzUb2rQztDRayEISI' api = shodan.Shodan(SHODAN_API_KEY) def vulnscan(target): target = target dnsResolve = f'https://api.shodan.io/dns/resolve?hostnames={ta...
50
34.32
93
18
458
python
[]
0
true
2024-11-19T02:32:16.045088+00:00
1,678,095,213,000
3de24e2029c3353594c4920c54a775fc3853dc74
3
{ "blob_id": "3de24e2029c3353594c4920c54a775fc3853dc74", "branch_name": "refs/heads/master", "committer_date": 1678110845000, "content_id": "c052e3deb40150bd0018e391959508f832394c01", "detected_licenses": [ "MIT" ], "directory_id": "c46873834f052eb4a65b40ea8d9e003f2600f0a0", "extension": "py", "fi...
2.84375
stackv2
"""Module for mapping ISO 639-3 to Glottolog languages and language names. The contents of ``cltk/languages/glottolog.py`` were created by this. """ import csv import os import typing from collections import OrderedDict, defaultdict from cltk.utils.data_types import Language def make_iso_glotto_map(): """Genera...
140
34.59
87
15
1,279
python
[]
0
true
2024-11-19T02:32:16.110795+00:00
1,593,226,758,000
2970135027d964dbb117c486d322cc572e17bbc1
3
{ "blob_id": "2970135027d964dbb117c486d322cc572e17bbc1", "branch_name": "refs/heads/main", "committer_date": 1593226758000, "content_id": "bfd17210d9b137d682598af0af9c281390d4d385", "detected_licenses": [ "MIT" ], "directory_id": "63650b0730f52e3883eb715622541fc6a315c9ba", "extension": "py", "file...
3.3125
stackv2
import tkinter as tk import tkinter.font as tkfont class AboutCGOL: def __init__(self): self.window = tk.Tk() self.window.title("Conway's Game of Life") self.window.geometry("800x600") self.setup_title() self.setup_game_description() self.setup_exit_button() def setup_title(self): frm_game_name = tk...
50
24.24
127
13
321
python
[]
0
true
2024-11-19T02:32:16.280036+00:00
1,446,672,194,000
7fe07b875e0a58b9e55f6b48a17a4ad3612771cf
2
{ "blob_id": "7fe07b875e0a58b9e55f6b48a17a4ad3612771cf", "branch_name": "refs/heads/master", "committer_date": 1446672194000, "content_id": "9f72f3b5c83be487d50837f1a737be5787af25dc", "detected_licenses": [ "MIT" ], "directory_id": "45992d64d88bf6f044682c90efde01573cc049f6", "extension": "py", "fi...
2.453125
stackv2
from app import db from sqlalchemy import ForeignKey from sqlalchemy.orm import relationship class Stock(db.Model): __tablename__ = 'stocks' id = db.Column(db.Integer, primary_key=True) symbol = db.Column(db.String(5), index=True, unique=True) name = db.Column(db.String(35), index=True, unique=True) exchange = ...
131
33.17
171
11
1,147
python
[]
0
true
2024-11-19T02:32:16.377522+00:00
1,522,893,969,000
0685c8249160d1e2b0d5434fc5784075b4d00c23
4
{ "blob_id": "0685c8249160d1e2b0d5434fc5784075b4d00c23", "branch_name": "refs/heads/master", "committer_date": 1522893969000, "content_id": "412298c46e10666f06ad9c854d33243e409ab346", "detected_licenses": [ "MIT" ], "directory_id": "bc3cd283f1043cf4e2acd689a15830d1e15120f6", "extension": "py", "fi...
3.609375
stackv2
""" """ def isSubstring(string, substr): if substr in string: return True return False def isRotatedSubstring(string1, string2): """ Check if string2 is a substring of string1 :param string1: :param string2: :return: """ test_string = string2 + string2 return isSubs...
28
15.96
72
10
123
python
[]
0
true
2024-11-19T02:32:16.750254+00:00
1,580,201,514,000
1c1a97168e3be6de10b9e49e9f7d7235433952f1
2
{ "blob_id": "1c1a97168e3be6de10b9e49e9f7d7235433952f1", "branch_name": "refs/heads/master", "committer_date": 1580201514000, "content_id": "b600fe13fd1bdf422537ee83cbe0c1221c062b9a", "detected_licenses": [ "MIT" ], "directory_id": "54bb9ba6d507cd25b2c2ac553665bc5fc95280d1", "extension": "py", "fi...
2.40625
stackv2
import morepath from datetime import datetime from itsdangerous import URLSafeSerializer, BadSignature from onegov.core.utils import relative_url from onegov.user import log from onegov.user.collections import UserCollection from onegov.user.errors import ExpiredSignupLinkError from onegov.user.auth.second_factor imp...
330
29.88
79
18
1,981
python
[]
0
true
2024-11-19T02:32:17.004952+00:00
1,580,212,607,000
a8615b59514fb7f75e66895bd2ca5cfe6469a2ed
4
{ "blob_id": "a8615b59514fb7f75e66895bd2ca5cfe6469a2ed", "branch_name": "refs/heads/master", "committer_date": 1580212607000, "content_id": "7ee29ea2b7fbc995eb83e6935c45bef5b9765cef", "detected_licenses": [ "MIT" ], "directory_id": "d163a009191c523fee0e29e732f864e20d3f69e9", "extension": "py", "fi...
3.546875
stackv2
from itertools import cycle, accumulate def parse(content): return list(map(int, content.strip())) def duplicate(pattern, times): patterns = [pattern] * times output = [i for l in zip(*patterns) for i in l] last = output.pop(0) output.append(last) return output def part1(numbers, phases=1)...
98
29.39
72
17
1,156
python
[]
0
true
2024-11-19T02:32:17.252697+00:00
1,557,517,116,000
8c15660b9186318bda417e53575325f63e5f8a9b
2
{ "blob_id": "8c15660b9186318bda417e53575325f63e5f8a9b", "branch_name": "refs/heads/master", "committer_date": 1557517116000, "content_id": "a80dc4b0799448e361d4492969eaa608ecdf6d34", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "3dc41f3e1b016497ec695a51fa4161e04679aed7", "extension": "p...
2.484375
stackv2
# Copyright (c) 2014, The MITRE Corporation. All rights reserved. # For license information, see the LICENSE.txt file from __future__ import absolute_import from libtaxii.common import generate_message_id from libtaxii.constants import * import libtaxii.messages_10 as tm10 import libtaxii.messages_11 as tm11 from ta...
173
41.24
118
16
1,321
python
[]
0
true
2024-11-19T02:32:17.528978+00:00
1,603,133,497,000
c935dc7af9dddb97fc1b578c09e12794fea46178
2
{ "blob_id": "c935dc7af9dddb97fc1b578c09e12794fea46178", "branch_name": "refs/heads/main", "committer_date": 1603133497000, "content_id": "48ae46c7cef76e9934e9e722e86ace4c78ca444a", "detected_licenses": [ "MIT" ], "directory_id": "b2c4ffa6c855ad37d7f543f2593490be22da208d", "extension": "py", "file...
2.4375
stackv2
from rest_framework import serializers from .models import * import datetime class BugSerializer(serializers.ModelSerializer): class Meta: model = Bug fields = "__all__" class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = '__all__' class Expe...
58
27.21
81
14
327
python
[]
0
true