added
stringdate
2024-11-18 17:59:49
2024-11-19 03:44:43
created
int64
0
2,086B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.5
source
stringclasses
1 value
text
stringlengths
258
23.4k
num_lines
int64
16
649
avg_line_length
float64
15
61
max_line_length
int64
31
179
ast_depth
int64
8
40
length
int64
101
3.8k
lang
stringclasses
1 value
sast_codeql_findings
stringlengths
2
265k
sast_codeql_findings_count
int64
0
45
sast_codeql_success
bool
1 class
sast_codeql_error
stringclasses
1 value
2024-11-18T21:14:44.964547+00:00
1,634,768,532,000
4c9d7ce37f6c45166b59931d62dbd7194b7cafe4
3
{ "blob_id": "4c9d7ce37f6c45166b59931d62dbd7194b7cafe4", "branch_name": "refs/heads/main", "committer_date": 1634768532000, "content_id": "ec6908c0f60dd345553d081b6f536094718ef9b0", "detected_licenses": [ "MIT" ], "directory_id": "f725c1b0c63f9eb9bbd9307ecb2a55f148b0b136", "extension": "py", "file...
2.796875
stackv2
# -*- coding: utf-8 -*- """ Created on Wed Jul 28 13:55:56 2021 @author: alex """ import numpy as np import matplotlib.pyplot as plt import imageio from skimage.util import montage from scipy.optimize import nnls def calc_t2_signal(TE,T2,S0): ''' Parameters ---------- TE : (float) Single echo time ...
147
32.2
101
18
1,411
python
[]
0
true
2024-11-18T21:14:45.075939+00:00
1,615,900,282,000
4bcfa2e1a6eeffc2e1f471d66a2573d2e8cdf85d
2
{ "blob_id": "4bcfa2e1a6eeffc2e1f471d66a2573d2e8cdf85d", "branch_name": "refs/heads/master", "committer_date": 1615900282000, "content_id": "1817ec61cb5aa18cd602575ded6d46e26a328bee", "detected_licenses": [ "MIT" ], "directory_id": "70450f0c551adf47b450468e424f4f90bebfb58d", "extension": "py", "fi...
2.4375
stackv2
import os, numpy from icecube import icetray, dataclasses, dataio from I3Tray import * from copy import deepcopy def convert_omkey(key): try: string = int(key.split(',')[0]) om = int(key.split(',')[1]) omkey = icetray.OMKey(string, om) return omkey except ValueError: ice...
165
44.24
138
21
1,732
python
[]
0
true
2024-11-18T21:14:45.593453+00:00
1,604,099,980,000
f11e86d33a8602dc0386dedde4904ab8d419ce1b
2
{ "blob_id": "f11e86d33a8602dc0386dedde4904ab8d419ce1b", "branch_name": "refs/heads/master", "committer_date": 1604099980000, "content_id": "0ae5327fd1d0e411b29ab998a2527cd911d56377", "detected_licenses": [ "MIT" ], "directory_id": "9706a96ef8727d0923bf63dff3458999b7b30671", "extension": "py", "fi...
2.375
stackv2
import os from typing import List, Tuple import ants_ai.training.neural_network.encoders.encoders as enc from ants_ai.training.neural_network.sequences.data_structs import GameIndex, LoadedIndex, DatasetType from ants_ai.training.neural_network.sequences.file_system_sequence import FileSystemSequence import numpy as n...
86
52.98
107
18
993
python
[]
0
true
2024-11-18T21:14:45.819749+00:00
1,379,965,504,000
2fea6382a59fc2b742bc4b691f790d1a3e50ff15
3
{ "blob_id": "2fea6382a59fc2b742bc4b691f790d1a3e50ff15", "branch_name": "refs/heads/master", "committer_date": 1379965504000, "content_id": "3b7f6672f27fde347982348a420baee38e3dcd29", "detected_licenses": [ "MIT" ], "directory_id": "7035396d70a68faed5631bee025008fa9098ce41", "extension": "py", "fi...
2.84375
stackv2
""" REMINDERS: - When manipulating a page, if you are wiping it, remember to clear your views registered live_regions with erase_regions - When using dialogs, remember to reset the LiveView's last_click_time so it doesn't think the focusing back on the view after you click ok is another click. """ import uui...
484
36.58
110
23
3,749
python
[]
0
true
2024-11-18T21:14:45.943928+00:00
1,514,957,845,000
90500b37e46f59408f15e6af7f9ab6ac8be699ea
3
{ "blob_id": "90500b37e46f59408f15e6af7f9ab6ac8be699ea", "branch_name": "refs/heads/master", "committer_date": 1514957845000, "content_id": "e025875e78e2daabe1b9ea6979f1566642df30d8", "detected_licenses": [ "MIT" ], "directory_id": "0e3a65003d90f2d34cd7caf650c8ab39c8e6f440", "extension": "py", "fi...
2.671875
stackv2
import sys,os import requests from bs4 import BeautifulSoup import re import json import copy import random def store(filename,data): with open(filename, 'w') as json_file: json_file.write(json.dumps(data)) def fetch(baseUrl,id_list,data): template=copy.deepcopy(data["configs"][0]) data['config...
83
24.48
120
16
587
python
[]
0
true
2024-11-18T21:14:46.005842+00:00
1,372,136,256,000
7bda73872a160cae8e408f9501afedfec4107d37
4
{ "blob_id": "7bda73872a160cae8e408f9501afedfec4107d37", "branch_name": "refs/heads/master", "committer_date": 1372136256000, "content_id": "4d9e5d777eb0054fd1720b244b22b0bc8bf26a49", "detected_licenses": [ "MIT" ], "directory_id": "7900cab0c058905120a41bfec8e897691029944e", "extension": "py", "fi...
3.734375
stackv2
import sys def find_intersection(list1, list2): """Returns the intersection of the two given lists. Lists are comma separated strings. """ list1 = list1.split(',') list2 = list2.split(',') output = [] for elem in list1: if elem in list2: output.append(elem) return ...
24
20.04
55
11
122
python
[]
0
true
2024-11-18T21:14:46.079747+00:00
1,563,459,494,000
d1df8d40660287e24c03a57cb1c3346ff0338ae2
2
{ "blob_id": "d1df8d40660287e24c03a57cb1c3346ff0338ae2", "branch_name": "refs/heads/master", "committer_date": 1563459494000, "content_id": "d2edfb47a930ff8487b192bc7e1373abf8a54a72", "detected_licenses": [ "MIT" ], "directory_id": "cb6b04b64fc977195831d6910d0af07053b3e30a", "extension": "py", "fi...
2.328125
stackv2
# -*- coding: utf-8 -*- from typing import List, Union import pandas as pd from zvt.domain import SimAccount, TradingLevel, Order from zvt.reader.reader import DataReader class AccountReader(DataReader): def __init__(self, the_timestamp: Union[str, pd.Timestamp] = None, start_t...
65
37.26
105
14
510
python
[]
0
true
2024-11-18T21:14:46.131569+00:00
1,692,773,342,000
65cfc45682c3045ba388e0f00e1fea93bf68db6a
2
{ "blob_id": "65cfc45682c3045ba388e0f00e1fea93bf68db6a", "branch_name": "refs/heads/main", "committer_date": 1692773342000, "content_id": "951372b56a6e78b540bf7ad3c948f4a46bd0e499", "detected_licenses": [ "MIT" ], "directory_id": "3edb8e25f34b67361bc1010cedff3d79e34e5be0", "extension": "py", "file...
2.4375
stackv2
import torch import torch.nn.functional as F def cxywh2xy(bboxes): cxy = bboxes[...,:2] hwh = bboxes[...,2:]/2 minxy = cxy-hwh maxxy = cxy+hwh return torch.cat([minxy,maxxy],dim=-1) def xy2cxywh(bboxes): wh = bboxes[...,2:]-bboxes[...,:2] cxy = (bboxes[...,2:]+bboxes[...,:2])/2 return ...
104
28.72
90
13
1,117
python
[]
0
true
2024-11-18T21:14:46.178377+00:00
1,684,482,176,000
e1326e824e360e5ec81befcb78afa507fc24b750
3
{ "blob_id": "e1326e824e360e5ec81befcb78afa507fc24b750", "branch_name": "refs/heads/master", "committer_date": 1684482176000, "content_id": "3694480a5198361dc7dd476d317888960c285242", "detected_licenses": [ "MIT" ], "directory_id": "ad0857eaba945c75e705594a53c40dbdd40467fe", "extension": "py", "fi...
3.25
stackv2
# Title: 절대값 힙 # Link: https://www.acmicpc.net/problem/11286 import sys from heapq import heappop, heappush sys.setrecursionlimit(10 ** 6) read_single_int = lambda: int(sys.stdin.readline().strip()) def solution(ops: list): q = [] for op in ops: if op == 0: print(heappop(q)[1] if q el...
32
16.22
59
15
167
python
[]
0
true
2024-11-18T20:10:31.283760+00:00
1,585,633,111,000
7ba1b16af7f79282b58951ca16e64e8b56e81cc9
3
{ "blob_id": "7ba1b16af7f79282b58951ca16e64e8b56e81cc9", "branch_name": "refs/heads/master", "committer_date": 1585633111000, "content_id": "4c12d48bed69320257d5a41e9471bc4649fda8db", "detected_licenses": [ "MIT" ], "directory_id": "9200fee8f6f78700f4e75e4d43e60a6733f7f6ec", "extension": "py", "fi...
2.984375
stackv2
# -*- coding: utf-8 -*- """ File check_label_file.py @author:ZhengYuwei """ import os import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn.metrics import confusion_matrix def plot_confusion_matrix(y_true, y_pred, labels, title='Confusion matrix', is_save=False): ...
73
32.59
91
16
762
python
[]
0
true
2024-11-18T20:10:31.399875+00:00
1,391,061,805,000
a2283a2ac2e1978da9ad4a9a399c15d55624375d
3
{ "blob_id": "a2283a2ac2e1978da9ad4a9a399c15d55624375d", "branch_name": "refs/heads/master", "committer_date": 1391061805000, "content_id": "1825618c8c4dfc6ef80dfe197b209936c937b80a", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "818a1909e6664e5dfa67f67c8a6f9de83fe54833", "extension": "p...
3.34375
stackv2
''' Classifier for the Variant filter script. Authors: Bernie Pope, Danny Park, Fabrice Odefrey, Tu Nguyen-Dumont. ''' # The classify function decides if a particular variant from the # variant list should be kept or binned (discarded). It returns # a classification of the variant which can be used to # determine if ...
55
44.04
116
14
604
python
[]
0
true
2024-11-18T20:10:31.452567+00:00
1,464,083,404,000
81371fe2c0c1f41cd28c51ca7e9501b2a9f73f7d
3
{ "blob_id": "81371fe2c0c1f41cd28c51ca7e9501b2a9f73f7d", "branch_name": "refs/heads/master", "committer_date": 1464083404000, "content_id": "290591280368068bd5fe1b16228749e350678580", "detected_licenses": [ "MIT" ], "directory_id": "d976c1b1a51cec898e6265378bb7f4a647ff75a3", "extension": "py", "fi...
2.859375
stackv2
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors import LinkExtractor from hackernews_scrapy.items import HackerNewsItem class HackerNewsSpider(CrawlSpider): name = "hackernews" allowed_domains = ["ycombinator.com"] start_urls = [ "https://news.ycombinator.co...
27
31
101
16
206
python
[]
0
true
2024-11-18T20:10:31.555956+00:00
1,562,953,857,000
737410aac86fc975150aac9560912a2e9defccb0
3
{ "blob_id": "737410aac86fc975150aac9560912a2e9defccb0", "branch_name": "refs/heads/master", "committer_date": 1562953857000, "content_id": "7a37d911ec33d5d464eafe5ba201c33d47f117d5", "detected_licenses": [ "MIT" ], "directory_id": "cda629e9ba9d5fca7fc208060368d61543c44a84", "extension": "py", "fi...
2.8125
stackv2
""" For a given GOI, returns the specific AA level mutations found On a per-cell basis. """ import numpy as np from . import VCF # comes from Kamil Slowikowski import os import csv import pandas as pd import sys import itertools import warnings import click warnings.simplefilter(action='ignore', category=FutureWarni...
321
27.62
120
20
2,744
python
[]
0
true
2024-11-18T20:10:31.609073+00:00
1,618,063,903,000
a3e82586d61b62b97d1cc42073322dbd89334765
3
{ "blob_id": "a3e82586d61b62b97d1cc42073322dbd89334765", "branch_name": "refs/heads/main", "committer_date": 1618063903000, "content_id": "29be464c1c1674439aec011c349512b69f9e56b9", "detected_licenses": [ "MIT" ], "directory_id": "b1322c8e3db134d9ae4e44be7597c30d5a67c084", "extension": "py", "file...
3.234375
stackv2
import numpy as np import pandas as pd from matplotlib.figure import Figure from datetime import datetime # How much x label to appear in the x axis(tick + 1) tick = 5 def custplot(ax, df, chartType="", timeline=""): # Plot vertical lines and boxes xticklabelList = np.array([]) if timeline == "week" or ti...
117
30.94
83
14
1,094
python
[]
0
true
2024-11-18T20:10:31.772255+00:00
1,596,569,061,000
1cb3c6c1f5024706793e25ab87f5915dae4746fe
2
{ "blob_id": "1cb3c6c1f5024706793e25ab87f5915dae4746fe", "branch_name": "refs/heads/master", "committer_date": 1596569061000, "content_id": "e37db56470d2f8b7a4a6f36cda349b330efe3174", "detected_licenses": [ "MIT" ], "directory_id": "f207586e34b37b13ee6012ea08f174e302fa0078", "extension": "py", "fi...
2.359375
stackv2
import copy import numpy as np from scipy import special as special from scipy.special import logsumexp from mimo.abstraction import Distribution from mimo.mixtures.full import MixtureOfGaussians from mimo.distributions.bayesian import CategoricalWithDirichlet from mimo.distributions.bayesian import CategoricalWithS...
416
32.06
106
23
3,220
python
[]
0
true
2024-11-18T20:10:31.835003+00:00
1,552,448,327,000
e91a95375d9665f503a7bbf8e7d041049afa25e1
2
{ "blob_id": "e91a95375d9665f503a7bbf8e7d041049afa25e1", "branch_name": "refs/heads/master", "committer_date": 1552448327000, "content_id": "f3704263938f34cc400d3dc4ddf84d131ffbc8c3", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "3093dcbcb998bd2caa1cbda28a25d30bc5a26af3", "extension": "p...
2.453125
stackv2
import copy import json from functools import reduce import yaml from foxylib.tools.log.logger_tools import LoggerToolkit, FoxylibLogger class JToolkit: @classmethod def jkey_v2json(cls, l, v_IN): j_OUT = reduce(lambda j, k: {k: j}, reversed(l), v_IN) return j_OUT @classmethod def d...
105
24.2
90
15
689
python
[]
0
true
2024-11-18T20:10:31.941124+00:00
1,527,086,987,000
c1c746a2d586159cc6fcbcea2dfe42b32a425018
2
{ "blob_id": "c1c746a2d586159cc6fcbcea2dfe42b32a425018", "branch_name": "refs/heads/master", "committer_date": 1527086987000, "content_id": "cfda6da9c64d165f282d14c4177a1bf86302cb59", "detected_licenses": [ "MIT" ], "directory_id": "ff6b45c290db6adeda94e4be839cf6f5a4d2f8bb", "extension": "py", "fi...
2.4375
stackv2
import logging from six.moves.queue import Empty, Queue from flask import current_app, request from fluent import sender class Fluentd(object): def __init__(self, app=None): self.app = app if app is not None: self.init_app(app) # Send events after every request finishes ...
53
30.17
74
15
337
python
[]
0
true
2024-11-18T20:10:32.064595+00:00
1,681,125,874,000
6df72d0496166e8d933e6eae3bca4785e193af8f
4
{ "blob_id": "6df72d0496166e8d933e6eae3bca4785e193af8f", "branch_name": "refs/heads/master", "committer_date": 1681125874000, "content_id": "f808237669d2259c22fda08fc91a1d9e81cc7c0e", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "9c2c3d918043b3bc9fcefffc9d2fe5fc0ca82bb4", "extension": "p...
3.5
stackv2
import os import os.path import copy NOT_APPLICABLE = 'n/a' def expandFileName(filename): """Expand environment variable in a file name. If the input file name begins with either a Unix-style or IRAF-style environment variable (e.g. $lref/name_dqi.fits or lref$name_dqi.fits respectively), this routi...
86
28.13
78
22
583
python
[]
0
true
2024-11-18T20:10:32.116721+00:00
1,571,581,840,000
845bece664337d93a59c042ffc13843adf14f8e9
3
{ "blob_id": "845bece664337d93a59c042ffc13843adf14f8e9", "branch_name": "refs/heads/master", "committer_date": 1571581840000, "content_id": "b9171382179c7e91c95397c7745e95425f3ca179", "detected_licenses": [ "MIT" ], "directory_id": "8d445c91a2d8893374d6c943f34b00309d728122", "extension": "py", "fi...
3.359375
stackv2
# AES 256 encryption/decryption using pycrypto library import base64 import hashlib from Crypto.Cipher import AES from Crypto import Random class aes(object): """docstring for aes""" def __init__(self, key): self.key = hashlib.sha256(key.encode("utf-8")).digest() self.BLOCK_SIZE = 16 s...
41
30.66
127
19
342
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_6ddb959e3516cd96_93a20d67", "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-18T20:10:32.266708+00:00
1,418,413,799,000
27568a5722da2b559a162cd7819c556b4eb45248
4
{ "blob_id": "27568a5722da2b559a162cd7819c556b4eb45248", "branch_name": "refs/heads/master", "committer_date": 1418413799000, "content_id": "40a9efadaaebe4baadce4b15c9354962351c646f", "detected_licenses": [ "MIT" ], "directory_id": "7ba61d52f235e9089a64d2462ca3dcc2f284fb5b", "extension": "py", "fi...
3.734375
stackv2
from fractions import gcd class Fraction: def __init__(self, nominator, denominator): self.nominator = nominator self.denominator = denominator # least common multiple @staticmethod def lcm(a, b): absolute_value = abs(a * b) greatest_common_divisor = gcd(a, b) ...
63
28.13
71
13
473
python
[]
0
true
2024-11-18T20:10:32.403216+00:00
1,622,408,002,000
dcca292432bd92d9003ba3de7bde2acf32ce2cb9
3
{ "blob_id": "dcca292432bd92d9003ba3de7bde2acf32ce2cb9", "branch_name": "refs/heads/main", "committer_date": 1622408002000, "content_id": "cf59f199b08ca5b585201bf0c78fe78ebf06c0b2", "detected_licenses": [ "MIT" ], "directory_id": "c5d78eb310ccc5e4eb397132bd2105ec0c077b1d", "extension": "py", "file...
3.015625
stackv2
"""Model testing and validation""" import matplotlib.pyplot as plt import numpy as np import time def validate_model(model_generator, datasets_generator, epochs=50, loss_name="mean_squared_error", measure_name="val_mean_squared_error", \ print_summary=True): """K-fold validation of model""" ...
210
37.64
139
14
1,817
python
[]
0
true
2024-11-18T20:10:32.523656+00:00
1,622,688,625,000
3449f1d5ea193bc76991f8760c550c3f65162bfd
2
{ "blob_id": "3449f1d5ea193bc76991f8760c550c3f65162bfd", "branch_name": "refs/heads/main", "committer_date": 1622688625000, "content_id": "b5cb25a353f72e9b6184711355017927be38cc83", "detected_licenses": [ "MIT" ], "directory_id": "cc880a44a227b8be20991b654990640c7c5b5fc4", "extension": "py", "file...
2.40625
stackv2
import matplotlib.pyplot as plt import numpy as np import torch import pandas as pd import torch.nn as nn import torch.optim as optim from torch.autograd import Variable from copy import deepcopy from sklearn.metrics import roc_auc_score import pickle import sklearn.preprocessing as preprocessing import numpy as np fro...
326
35.98
152
17
3,284
python
[]
0
true
2024-11-18T20:10:32.579435+00:00
1,399,581,832,000
de4385d88c01e8876a9414ef7d62d377fa6b4955
3
{ "blob_id": "de4385d88c01e8876a9414ef7d62d377fa6b4955", "branch_name": "refs/heads/master", "committer_date": 1399581832000, "content_id": "4714b7c79ae570759cf02dc4c2fbf72b0f07fb28", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "ed4bb60ad6c0a6e78f7a5bf368e1be8a1edab993", "extension": "p...
2.828125
stackv2
""" Form span utility. (C) Copyright 2014 Stuart McMillan, Useful Automation """ import re import six from django.core import validators DEFAULT_CHARS_PER_SPAN = 5 DEFAULT_MAX_SPAN = 12 class FormSpanMixin(object): """Bootstrap form utility which adds file class spanN (indicating field length)""" LENGTH_RE =...
103
43.36
97
25
939
python
[]
0
true
2024-11-18T20:10:32.639877+00:00
1,512,126,329,000
84404a99897d925d4fd4b80125bfcb68b100cc45
2
{ "blob_id": "84404a99897d925d4fd4b80125bfcb68b100cc45", "branch_name": "refs/heads/master", "committer_date": 1512126329000, "content_id": "19f8b81cffc42c60c559069d09b80ce75de1f6dc", "detected_licenses": [ "MIT" ], "directory_id": "f1027de90ca3b07dee4c8729e00e59f225f1baff", "extension": "py", "fi...
2.421875
stackv2
from robot import RobotArm import numpy as np import time import vrep import decimal import utility import decimal def status(title, ra): print("") print(title) print("Is object held> ", ra.is_object_held()) print("Is object in bin> ", ra.is_object_in_bin()) print("------------------------>") ra...
75
19.48
85
9
492
python
[]
0
true
2024-11-18T20:10:32.738191+00:00
1,643,343,399,000
cbc4effb0c0f71875349a3af82627b374a8e36df
4
{ "blob_id": "cbc4effb0c0f71875349a3af82627b374a8e36df", "branch_name": "refs/heads/master", "committer_date": 1643343399000, "content_id": "48ef123738adb9347b635bcfc23829bcc45be74a", "detected_licenses": [ "MIT" ], "directory_id": "151df28f762e690aa1b437f3d123d54eca99b379", "extension": "py", "fi...
4.15625
stackv2
""" An image is represented by an m x n integer grid image where image[i][j] represents the pixel value of the image. You are also given three integers sr, sc, and newColor. You should perform a flood fill on the image starting from the pixel image[sr][sc]. To perform a flood fill, consider the starting pixel, plus a...
72
35.67
120
14
712
python
[]
0
true
2024-11-18T20:10:32.919302+00:00
1,536,914,244,000
e4869dd67c0e3f338deba0ad4738bed7809b36f0
3
{ "blob_id": "e4869dd67c0e3f338deba0ad4738bed7809b36f0", "branch_name": "refs/heads/master", "committer_date": 1536914244000, "content_id": "19a585d2cddd12e8d760ede6c879a6afb676e568", "detected_licenses": [ "MIT" ], "directory_id": "2118bed8a4a11d6e093fccb5b619582fca263c1e", "extension": "py", "fi...
3.34375
stackv2
months = [ 'January', 'February', 'March', 'Aprill', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ] endings =['st','nd','rd']+17*['th']+['st','nd','rd']+7*['th']+['st'] year =raw_input('year:') month =raw_input('month(1-12):') day =raw...
30
16.77
68
11
172
python
[]
0
true
2024-11-18T20:10:33.040400+00:00
1,691,513,950,000
acca5b2cdb28742dd629314d0c8f504e6f52d5c1
3
{ "blob_id": "acca5b2cdb28742dd629314d0c8f504e6f52d5c1", "branch_name": "refs/heads/main", "committer_date": 1691513950000, "content_id": "37c32e00d041f59a65fa7d43c273b590e448699d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1684e493bcdae4279c3ce0d0b34b02d58444d3f9", "extension": "py", ...
2.625
stackv2
# # Copyright (c) 2022 Intel Corporation # # 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 i...
43
29.56
83
13
296
python
[]
0
true
2024-11-18T20:10:33.089596+00:00
1,462,214,820,000
e5c9f43fa857e2bdc0b57b0630713b89c4b718e6
3
{ "blob_id": "e5c9f43fa857e2bdc0b57b0630713b89c4b718e6", "branch_name": "refs/heads/master", "committer_date": 1462214820000, "content_id": "5af241bcfcccd07ae87951054bd605f301a0e860", "detected_licenses": [ "MIT" ], "directory_id": "872d6a0658d56a7be280c9f2ca033a6217e25b7b", "extension": "py", "fi...
3.03125
stackv2
# -*- coding: utf-8 -*- import scrapy from astronomy_scraper.items import DayConditions import re class WeatherSpider(scrapy.Spider): name = "weather" allowed_domains = ["http://www.timeanddate.com/"] start_urls = ( 'http://www.timeanddate.com/weather/usa/new-york', ) def parse(self, respo...
21
35.9
121
13
210
python
[]
0
true
2024-11-18T20:10:33.205672+00:00
1,604,558,221,000
5bf30c82dedccf70399de0bdaf63a503ed02fe6f
4
{ "blob_id": "5bf30c82dedccf70399de0bdaf63a503ed02fe6f", "branch_name": "refs/heads/master", "committer_date": 1604558221000, "content_id": "a34947e4608b0b2c6f7bb29525935b3173662879", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d7b8e2af96c10ea6dc80ef69ca4e25c19e9ce310", "extension": "py"...
3.5625
stackv2
a_set = {2, 3, 4, 5, 6, 196} print(a_set) print(3 in a_set) print(31 in a_set) print() b_set = {4, 5, 6, 900} print(a_set.union(b_set)) print(a_set.intersection(b_set)) print(a_set.difference(b_set)) print(a_set.symmetric_difference(b_set)) print() print(b_set.symmetric_difference(a_set)) print(b_set.symmetric_differ...
49
17.02
77
8
350
python
[]
0
true
2024-11-18T20:10:33.357621+00:00
1,588,601,869,000
202bfd65a96a65d2ce2fc966c5cbdedc8a429538
3
{ "blob_id": "202bfd65a96a65d2ce2fc966c5cbdedc8a429538", "branch_name": "refs/heads/master", "committer_date": 1588601869000, "content_id": "8a4836decd90e2309e5e6da43b74de57d229e885", "detected_licenses": [ "MIT" ], "directory_id": "45deb4da94224d749966e54461822928115c9dcf", "extension": "py", "fi...
3.390625
stackv2
# Data Preprocessing Template # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd '''# Importing the dataset dataset = pd.read_csv('Data.csv') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, 3].values # Splitting the dataset into the Training set and Test set from skl...
63
26.43
95
8
432
python
[]
0
true
2024-11-18T20:10:33.457176+00:00
1,687,184,603,000
c6d0d79b2cf920f25b9bb639719b760dabab7ce6
3
{ "blob_id": "c6d0d79b2cf920f25b9bb639719b760dabab7ce6", "branch_name": "refs/heads/master", "committer_date": 1687184603000, "content_id": "0abbcfefab17bdfe77d1d3a7a8ecde0e5322525a", "detected_licenses": [ "MIT" ], "directory_id": "4372fd7fc45e7e28febc242566d8c650d271f7c8", "extension": "py", "fi...
2.765625
stackv2
import pandas import tables import logging try: from tqdm import tqdm except ImportError: tqdm = lambda x, **kwargs: x logger = logging.getLogger(__name__) class SyntenyScorer(object): def __init__(self, h5_handle, genome, windowsize=10): self.h5_handle = h5_handle self.genome = genome ...
102
46.94
132
20
1,250
python
[]
0
true
2024-11-18T20:10:33.569440+00:00
1,511,275,588,000
038035421f67d83d8501133e9d278109e01d9789
3
{ "blob_id": "038035421f67d83d8501133e9d278109e01d9789", "branch_name": "refs/heads/master", "committer_date": 1511275588000, "content_id": "8d0534fa2bf37b75f11e088cc85bbb506afc0132", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ffa0f47b7115812fc21ebbc2d03126ef806de82d", "extension": "py"...
2.546875
stackv2
from copy import deepcopy from typing import Any, Dict from keras import backend as K from keras import initializers, activations from overrides import overrides from ...common.params import pop_choice from ...tensors.backend import apply_feed_forward from ...tensors.similarity_functions import similarity_functions f...
165
48.81
108
17
1,737
python
[]
0
true
2024-11-18T20:10:33.628612+00:00
1,452,090,387,000
4cd405be708b40b21a2bc494c4d7177aa52dd536
2
{ "blob_id": "4cd405be708b40b21a2bc494c4d7177aa52dd536", "branch_name": "refs/heads/master", "committer_date": 1452090387000, "content_id": "265770cf5efe31a0bccdec5234abd548c6e37a0d", "detected_licenses": [ "MIT" ], "directory_id": "47c9490dd95a0c06b601dd34365cd7e198c4c288", "extension": "py", "fi...
2.34375
stackv2
from time import time from errbot import BotPlugin, botcmd, webhook import pytumblr class MarxBot(BotPlugin): """Your daily dose of Marx""" min_err_version = '1.6.0' tumblr_client = None poll_interval = 60 * 15 class NotConfiguredError(Exception): pass def activate(self): su...
64
33.72
79
13
473
python
[]
0
true
2024-11-18T20:10:33.742269+00:00
1,528,154,375,000
87a9170df1e0a7c9a4634cd6d19d26150934df8f
2
{ "blob_id": "87a9170df1e0a7c9a4634cd6d19d26150934df8f", "branch_name": "refs/heads/master", "committer_date": 1528154375000, "content_id": "831e59ea76532fa15d8cfcb0878f7aa89f75bd26", "detected_licenses": [ "MIT" ], "directory_id": "5ba1feb2a5b1476ee7c893300445693c30cd9998", "extension": "py", "fi...
2.40625
stackv2
import praw import datetime import tweepy #Check apps.twitter.com for consumer key, consumer secret, #access token, and acess token secret #check http://dev.twitter.com/apps for more info on these keys consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" twitterAuth = tweepy.OAuthHandler(...
29
29.28
112
13
211
python
[]
0
true
2024-11-18T20:10:33.809140+00:00
1,638,449,008,000
b54bd77edcfa12b60f126e9560a4e4d9459a07b0
3
{ "blob_id": "b54bd77edcfa12b60f126e9560a4e4d9459a07b0", "branch_name": "refs/heads/master", "committer_date": 1638449008000, "content_id": "74e1aea3dd610ff29db6f480a67711ad1daff9a6", "detected_licenses": [ "MIT" ], "directory_id": "19d93813cff4c210ceb77128516d4b8bc8c81b76", "extension": "py", "fi...
3.375
stackv2
import os class inputLine: def __init__(self, min, max, criteria, password): self.min = min self.max = max self.criteria = criteria self.password = password def IsCountBetweenCriteria(self): cnt = self.password.count(self.criteria) if cnt >= self.min and cnt <= self.max: return True ...
43
27.58
133
17
328
python
[]
0
true
2024-11-18T20:10:33.870985+00:00
1,583,514,141,000
5b83246a2543f20eb4aef35573e19f558df4a8ed
3
{ "blob_id": "5b83246a2543f20eb4aef35573e19f558df4a8ed", "branch_name": "refs/heads/master", "committer_date": 1583514141000, "content_id": "e96c7a33d1994ee302917ecef498974066023fd6", "detected_licenses": [ "MIT" ], "directory_id": "ce340425d9fe5a2ba6a533629f607dbb7ad479a1", "extension": "py", "fi...
3.15625
stackv2
''' Created on 26 nov. 2018 @author: david ''' import logging import time from sensor.attitude import AttitudeSensor logging.basicConfig(level=logging.DEBUG) print("Press CTRL+C to finish") sensor = AttitudeSensor(channel=1) sensor.start() try: calibTime = 30 logging.info("Starting magnetometer calibra...
37
18.62
93
12
178
python
[]
0
true
2024-11-18T20:10:34.104862+00:00
1,600,518,080,000
9636c9fb46c06d3ea15c081e86ba2868f4cd7ca9
3
{ "blob_id": "9636c9fb46c06d3ea15c081e86ba2868f4cd7ca9", "branch_name": "refs/heads/master", "committer_date": 1600518080000, "content_id": "e3393809592189235b7b900d7d5d0b1f752cdb46", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8954a550561a008a07f3b1c2617685db9b303841", "extension": "py"...
3.1875
stackv2
import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers """This module demonstrates keras api and shows that the saved model should reproduce the same results as the presaved model. https://www.tensorflow.org/guide/keras/train_and_evaluate#training_evaluation_from_tfdata_datasets ""...
124
32.31
114
12
1,029
python
[]
0
true
2024-11-18T20:10:34.338440+00:00
1,442,933,892,000
1345d9c1511c10ba6561f716dc78290aca5dc640
2
{ "blob_id": "1345d9c1511c10ba6561f716dc78290aca5dc640", "branch_name": "refs/heads/master", "committer_date": 1442933892000, "content_id": "841e9874a15db5aca644d9193f8d6ee5ec9e14b0", "detected_licenses": [ "MIT" ], "directory_id": "7925bff6582db37fbd4c52300736dcb1ebdcff00", "extension": "py", "fi...
2.390625
stackv2
##input: /Users/metagenomics/Documents/Databases/uniprot_tremble.dat or uniprot_sprot.dat import sys import os from Bio import SeqIO uniprot = open(sys.argv[1], "rU") for record in SeqIO.parse(uniprot, "swiss"): id = record.id taxa = record.annotations['taxonomy'] #if record.annotations['taxonomy'] >1: # domain ...
18
25.94
89
8
154
python
[]
0
true
2024-11-18T20:10:34.390443+00:00
1,677,201,496,000
45d48a62c7fcb6451f60d47802503aed0d7337cb
2
{ "blob_id": "45d48a62c7fcb6451f60d47802503aed0d7337cb", "branch_name": "refs/heads/master", "committer_date": 1677201496000, "content_id": "4c157b21b790ace88e04fd7e9900cb5d3f845d6f", "detected_licenses": [ "BSD-3-Clause", "BSD-2-Clause" ], "directory_id": "245c57a44cf7239595b4883567a264bf60713049...
2.3125
stackv2
'''class Tool, class InstallMethod, and related subclasses and methods''' __author__ = "dpark@broadinstitute.org,irwin@broadinstitute.org" import collections import json import operator import os import re import logging import tempfile import shutil import shlex import subprocess import util.file import util.misc f...
185
27.72
106
17
1,128
python
[]
0
true
2024-11-18T20:10:34.559836+00:00
1,561,801,764,000
abaeae7b2e2889b15eef4799291db9beaf07806e
3
{ "blob_id": "abaeae7b2e2889b15eef4799291db9beaf07806e", "branch_name": "refs/heads/master", "committer_date": 1561801764000, "content_id": "00022335f4e998c475cffcf7a99c83cef5b7b71c", "detected_licenses": [ "MIT" ], "directory_id": "97d123306ed743f131263bda49f309fabcf33e78", "extension": "py", "fi...
2.8125
stackv2
from node import Node from ops import Relu from ops import VariableOp from ops import Mult from ops import Add from ops import Sub from ops import PlaceholderOp import numpy as np np.random.seed(42) class Sequential: def __init__(self): pass def __add_node(op, name, parents=[], variable_type='none', is_trainable...
159
28.89
114
16
1,299
python
[]
0
true
2024-11-18T20:10:34.804495+00:00
1,506,457,164,000
841f42450ca97762577f8e3b284ec1c5576e742c
3
{ "blob_id": "841f42450ca97762577f8e3b284ec1c5576e742c", "branch_name": "refs/heads/master", "committer_date": 1506457164000, "content_id": "ace48edc34812d81b11826082f0a934af0300caf", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4e66c94b362a39e93483025e4e9098f7d8a40d71", "extension": "py"...
3.25
stackv2
# -*- coding: utf-8 -*- __author__ = 'Dmitriy.Dakhnovskiy' import ast from .abstract_source_parser import AbstractSourceParser class PythonSourceParser(AbstractSourceParser): def __init__(self, source): """ :param source: исходный код """ super().__init__(source) @staticmeth...
76
26.89
88
16
473
python
[]
0
true
2024-11-18T20:10:34.997727+00:00
1,688,968,658,000
787a41a449879797f928e3c6c11e0e171d399e6b
2
{ "blob_id": "787a41a449879797f928e3c6c11e0e171d399e6b", "branch_name": "refs/heads/master", "committer_date": 1688968658000, "content_id": "39c7ee9bdc3ea411c4c124348f7b37c84994f9a6", "detected_licenses": [ "MIT" ], "directory_id": "bc2ccaed5cf0367d196cedeef51d4b89db310db0", "extension": "py", "fi...
2.390625
stackv2
import pylab as plt def pylab_style(paper=False): # list of avaliable parameters # https://matplotlib.org/stable/tutorials/introductory/customizing.html#the-default-matplotlibrc-file params = { "boxplot.boxprops.linewidth": 10.0, "figure.figsize": [8, 5], "figure.titlesize": 20, ...
48
33.44
105
10
487
python
[]
0
true
2024-11-18T20:10:35.115444+00:00
1,409,777,933,000
aca419578d38775a2b3f8e6b7e37bfe8ca9d7afd
3
{ "blob_id": "aca419578d38775a2b3f8e6b7e37bfe8ca9d7afd", "branch_name": "refs/heads/master", "committer_date": 1409777933000, "content_id": "1b2cbe96f65cf43e5ca8c4901388e8b5fad9e1ff", "detected_licenses": [ "MIT", "BSD-3-Clause", "Python-2.0", "BSD-2-Clause" ], "directory_id": "3569dffb117...
2.546875
stackv2
# /usr/bin/env python2.7 # -*- coding: utf-8 -*- """ myip created by hgschmidt on 03.12.12, 21:53 CET Copyright (c) 2012 otype """ import logging import tornado.ioloop import tornado.web import tornado.options import tornado.httpserver from tornado import web # LOGGING PARAMETERS # # LOG_FORMAT =...
103
23.25
99
19
615
python
[{"finding_id": "codeql_py/log-injection_e642b2dfa415fd2e_3ee3460b", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno...
1
true
2024-11-18T20:10:35.910047+00:00
1,402,806,219,000
a7e4f4cc3696067a2aaaafba17bc61572e2c76d5
3
{ "blob_id": "a7e4f4cc3696067a2aaaafba17bc61572e2c76d5", "branch_name": "refs/heads/master", "committer_date": 1402806219000, "content_id": "f8416bc652154d2b3ee846e0ee51d3e73f738c5a", "detected_licenses": [ "MIT" ], "directory_id": "4d8e2dbc570415059c271556415c22789094b5af", "extension": "py", "fi...
2.53125
stackv2
# coding: utf-8 from os.path import join as path_join, getmtime from sh import rsync import os import subprocess as sp def isfile(filename, mode='rb'): try: with open(filename, mode): return True except IOError: pass return False def rm_files(files_list, raise_on_error=Fals...
38
18.55
48
12
172
python
[]
0
true
2024-11-18T20:10:35.981096+00:00
1,496,023,692,000
49a4f658ae2a92740e13217d333eabbbaab38f84
3
{ "blob_id": "49a4f658ae2a92740e13217d333eabbbaab38f84", "branch_name": "refs/heads/master", "committer_date": 1496023692000, "content_id": "4244d412ec118e8d5d661ffb2c98f4ba986f2e98", "detected_licenses": [ "MIT" ], "directory_id": "31cc1eb7fe334b963a9a56fd63c79cf6382778da", "extension": "py", "fi...
3.1875
stackv2
# interrupt-based distance measurement with median filtering # remember to use GPIO.cleanup() import RPi.GPIO as GPIO import time class ultrasonic(): def __init__(self, echoPin, trigPin): # Pin definitions self.GND = 6 # only for reference self.ECHO = echoPin self.TRIG = trigPin ...
41
26.34
60
12
269
python
[]
0
true
2024-11-18T20:10:36.407663+00:00
1,613,405,869,000
ea6252293c8a248f23b98fc56ce8737fbdc7c7ee
3
{ "blob_id": "ea6252293c8a248f23b98fc56ce8737fbdc7c7ee", "branch_name": "refs/heads/main", "committer_date": 1613405869000, "content_id": "9428ae1af31ce683a78d674559d1c9a7a5ed92b6", "detected_licenses": [ "MIT" ], "directory_id": "404573518af29790b3c9c1884f5ae64aa5062070", "extension": "py", "file...
3.03125
stackv2
import random import requests import BitVector as bit API_URL = 'http://cryptlygos.pythonanywhere.com' #DON'T CHANGE THIS my_id = 24775 #ATTN: Change this into your id number endpoint = '{}/{}/{}'.format(API_URL, "poly", my_id ) response = requests.get(endpoint) a = 0 b = 0 if response.ok: res = respo...
62
20.34
67
10
403
python
[]
0
true
2024-11-18T20:10:36.517628+00:00
1,681,799,580,000
1d1e31a39a8ee82729c114bb7e1b1eeef70b92a6
3
{ "blob_id": "1d1e31a39a8ee82729c114bb7e1b1eeef70b92a6", "branch_name": "refs/heads/main", "committer_date": 1681799580000, "content_id": "097863e805be0405eb8a8d7a80af658973b11475", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "f7a64dbde3be55048389e6b161d0515bf4ddc77f", "extension": "py"...
2.65625
stackv2
# https://arxiv.org/pdf/1301.1071.pdf "Direct TSQR" import sys import numpy as np import cupy as cp import time from parla import Parla from parla.cpu import cpu from parla.cuda import gpu from parla.array import clone_here from parla.function_decorators import specialized from parla.tasks import * ROWS = 500000 # M...
174
29.09
119
15
1,524
python
[]
0
true
2024-11-18T20:10:36.570821+00:00
1,633,779,306,000
3fb1b84636b1141248db33635cb400c895ea5da0
3
{ "blob_id": "3fb1b84636b1141248db33635cb400c895ea5da0", "branch_name": "refs/heads/master", "committer_date": 1633779306000, "content_id": "f63aed950a4a76789ebc9561f275760e8f7df198", "detected_licenses": [ "MIT" ], "directory_id": "f0f687dd2d6789b860afc2ce972564d68fe6601c", "extension": "py", "fi...
3.296875
stackv2
from tkinter import * import math from PIL import Image, ImageTk FIELDS = ('insert radiation of sphere','mark distance between spheres centre') def calculate(entries): r = float(entries['insert radiation of sphere'].get()) d = float(entries['mark distance between spheres centre'].get()) new_r = math.sqrt...
54
26.24
78
13
403
python
[]
0
true
2024-11-18T20:10:36.800831+00:00
1,544,330,106,000
38d03c6ac1985bda489196d021a4f7c8693110ba
3
{ "blob_id": "38d03c6ac1985bda489196d021a4f7c8693110ba", "branch_name": "refs/heads/master", "committer_date": 1544330106000, "content_id": "40a52bc0019e38f6f2ace00c875b2c4e2c13ac8d", "detected_licenses": [ "MIT" ], "directory_id": "3182430b1610b619cf2a3779718abe481cf99950", "extension": "py", "fi...
2.84375
stackv2
import mysql.connector from mysql.connector import Error class DatabaseHandler: def __init__(self): try: self.conn = mysql.connector.connect(host='localhost', database='annotation', user='root', password='') if self.conn.is_connected(): print("database is connected") ...
20
33.3
114
14
131
python
[]
0
true
2024-11-18T20:10:36.955142+00:00
1,561,161,782,000
66142ee5a1c283227b7f8b7d5dcd630d82a599ec
3
{ "blob_id": "66142ee5a1c283227b7f8b7d5dcd630d82a599ec", "branch_name": "refs/heads/master", "committer_date": 1561161782000, "content_id": "1066ca214eca6b1fb3aeee84769a93b77d43b107", "detected_licenses": [ "MIT" ], "directory_id": "96afcfa239ef923358d1fe7c96ccaaf40dcefdf5", "extension": "py", "fi...
2.953125
stackv2
"""Implementation of neural style transfer. The style of the reference image is imposed onto the target image. This is the original implementation of neural style transfer proposed by Leon Gatys et al. 2015. It is preferable to run this script on GPU, for speed. Parts of this implementation are adapted from Google's ...
405
34.46
143
15
3,321
python
[]
0
true
2024-11-18T20:10:37.555002+00:00
1,648,939,287,000
8a581c15935c71fb9aa8086c788b55a09a7f760c
3
{ "blob_id": "8a581c15935c71fb9aa8086c788b55a09a7f760c", "branch_name": "refs/heads/master", "committer_date": 1648939287000, "content_id": "0a2486eb5e17fe1e3751e4d7fe9ff7332ae19fb0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d1173b24964d25106e013eb5b4578fef85c3a0e9", "extension": "py"...
2.625
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import deepnlpf.log as log class Util(object): def __init__(self): pass def openfile_json(self, path_file): try: with open(path_file, "r") as data: return json.load(data) except Exception as err: ...
65
26.63
62
17
378
python
[]
0
true
2024-11-18T20:10:37.714914+00:00
1,651,665,706,000
5e8109ee51a02cc64458c0dfcd57379b76dd5f98
3
{ "blob_id": "5e8109ee51a02cc64458c0dfcd57379b76dd5f98", "branch_name": "refs/heads/master", "committer_date": 1651665706000, "content_id": "6453e7b236a87f1be2ce6004e4bedc9bf656cdf1", "detected_licenses": [ "MIT" ], "directory_id": "25c95966eed54fe9a7399aef1f2bee95eca4e7cb", "extension": "py", "fi...
3.40625
stackv2
from enum import Enum, auto # Standard enum class MyEnum(Enum): A = 'a' B = 'b' # Enum with custom objects as values class Value: def __init__(self, value): self.value = value def __str__(self): return self.value class CustomObjectEnum(Enum): A = Value(1) B = Value('B') ...
40
16.18
63
11
184
python
[]
0
true
2024-11-18T20:10:37.886969+00:00
1,629,255,275,000
09d60b0cb898f0d930f70c8e4ab6f154a24f64f3
3
{ "blob_id": "09d60b0cb898f0d930f70c8e4ab6f154a24f64f3", "branch_name": "refs/heads/main", "committer_date": 1629255275000, "content_id": "42d610d0c60b3dce7248e0baa7d4252c9e2e750b", "detected_licenses": [ "MIT" ], "directory_id": "35f534d95b04700b11ff96536257c3de6504b655", "extension": "py", "file...
2.65625
stackv2
import fnmatch from datetime import * import itertools from math import sqrt import numpy as np from sklearn.cluster import KMeans from sklearn.metrics import confusion_matrix, balanced_accuracy_score, precision_score from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassif...
57
30.56
101
16
410
python
[]
0
true
2024-11-18T20:10:38.073411+00:00
1,692,024,876,000
dceacc88b1348338106d04a5be748cb25e90f929
2
{ "blob_id": "dceacc88b1348338106d04a5be748cb25e90f929", "branch_name": "refs/heads/main", "committer_date": 1692024876000, "content_id": "9af77bc367e30e548282561662531a52b65c7756", "detected_licenses": [ "MIT" ], "directory_id": "a70ad4b89501c39d6a9e20355bb50d8e12e53773", "extension": "py", "file...
2.40625
stackv2
from importlib import import_module from celery import shared_task import asyncio from django.conf import settings from feedreader.functions.feedupdate import FeedsUpdater from feedreader.models import Feed from feedreader.functions import find_favicon import logging logger = logging.getLogger(__name__) @shared_...
61
26.61
82
13
370
python
[]
0
true
2024-11-18T20:10:38.207915+00:00
1,589,065,875,000
eea44f23ffd53bdaff542b0acec4740bb2605915
3
{ "blob_id": "eea44f23ffd53bdaff542b0acec4740bb2605915", "branch_name": "refs/heads/master", "committer_date": 1589065875000, "content_id": "16159703ddc3ce542ffc8dde18acec432b7caafb", "detected_licenses": [ "MIT" ], "directory_id": "2dd90463a4a3e16788c2139696add927fb6fc376", "extension": "py", "fi...
3.03125
stackv2
from pyautogui import alert, password from src.util import lock_user_account import requests import time class Locker(object): def __init__(self, host, token): self.__host = host self.__token = token def get_offline_message(self): # Informa que o servidor não está funcionando. ...
93
29.71
107
18
593
python
[]
0
true
2024-11-18T20:10:38.261416+00:00
1,478,512,582,000
92c94e8346731c564706419b3d572f8995baea55
3
{ "blob_id": "92c94e8346731c564706419b3d572f8995baea55", "branch_name": "refs/heads/master", "committer_date": 1478512582000, "content_id": "1f009a5d18bdc147071b2b83f75f0e96106a6cbb", "detected_licenses": [ "MIT" ], "directory_id": "5583ac672d249a827e0d3ae162d220114e100f80", "extension": "py", "fi...
2.859375
stackv2
# -*- coding: utf-8 -*- import hashlib import requests from xml.etree import ElementTree from aws_requests_auth.aws_auth import AWSRequestsAuth def create_bucket(host, bucketName, accessKey, secretKey): """ Create a bucket. @param host: S3/Cleversafe host @param bucketName: Bucket name @param acc...
203
35.82
125
14
1,676
python
[]
0
true
2024-11-18T20:10:38.436775+00:00
1,690,675,108,000
a837382e57717bfefdce14c314fd0a8a1ec2d2bd
2
{ "blob_id": "a837382e57717bfefdce14c314fd0a8a1ec2d2bd", "branch_name": "refs/heads/master", "committer_date": 1690675108000, "content_id": "9e396d24faa02192bd27275e03d627afa03b2bff", "detected_licenses": [ "MIT" ], "directory_id": "84d8b10d5f8be3b84d0629d45fce4f75e7b45082", "extension": "py", "fi...
2.5
stackv2
from glob import glob import os from pprint import pprint names = [] for svg_fp in glob("/Users/mlevental/dev_projects/makslevental.github.io/images/memory_planning/*.svg"): # if "small_bert" in svg_fp: # svg_fp = svg_fp.replace("small_bert", "smallbert") # model_name, strat = os.path.split(svg_fp)[-...
62
38.08
135
15
710
python
[]
0
true
2024-11-18T20:10:38.667019+00:00
1,675,463,248,000
1140a08b54057318516441917dea42d0f56ecb0e
2
{ "blob_id": "1140a08b54057318516441917dea42d0f56ecb0e", "branch_name": "refs/heads/master", "committer_date": 1675463248000, "content_id": "adc7be5e35077416bb72c4ab74c8db5d903bdf84", "detected_licenses": [ "Apache-2.0" ], "directory_id": "01a4e25806f12087c1cae5db25696cad997e17a9", "extension": "py"...
2.375
stackv2
# # Description: This example brings up a previously built EnXR router, # executes some show commands and parses via cAAs/TCL and # parsergen/Python, with differences in the parse results # shown. import os from pyats.easypy import run def main(): # Find the examples/tests d...
35
35.63
70
12
316
python
[]
0
true
2024-11-18T20:10:38.836282+00:00
1,687,154,248,000
0c49ff8881bf35b6384a76cf9c2472fc1d366de3
2
{ "blob_id": "0c49ff8881bf35b6384a76cf9c2472fc1d366de3", "branch_name": "refs/heads/master", "committer_date": 1687154248000, "content_id": "c0dd6ec5b0744d5bdb34b1407da6a054f4229145", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6d09e43b6a32a75548562e6aba9848469f0f236c", "extension": "py"...
2.359375
stackv2
from typing import Dict, Type from HABApp.core.const.json import load_json from .events import OpenhabEvent, \ ItemStateEvent, ItemStateUpdatedEvent, ItemStateChangedEvent, ItemCommandEvent, ItemAddedEvent, \ ItemUpdatedEvent, ItemRemovedEvent, ItemStatePredictedEvent, \ GroupStateUpdatedEvent, GroupStateC...
46
40.43
111
13
438
python
[]
0
true
2024-11-18T20:10:39.017419+00:00
1,537,345,724,000
30ed7163583c7e656db739c856a4e0027e406957
3
{ "blob_id": "30ed7163583c7e656db739c856a4e0027e406957", "branch_name": "refs/heads/master", "committer_date": 1537345724000, "content_id": "e19b568924338de1effe863750c666635e68362a", "detected_licenses": [ "Unlicense" ], "directory_id": "bc9096935c61b10c8c156406e4649fd4a7d46028", "extension": "py",...
2.515625
stackv2
from django.db import models class Person(models.Model): first_name = models.CharField(max_length=40, null=False) last_name = models.CharField(max_length=40, null=False) description = models.TextField() avatar = models.ImageField(upload_to="media/", null=True) class Address(models.Model): """ ...
49
36.63
79
10
392
python
[]
0
true
2024-11-18T20:10:39.077629+00:00
1,616,134,621,000
a87ec33eaa8c715d3700e5ae5833ca6edf0f231a
2
{ "blob_id": "a87ec33eaa8c715d3700e5ae5833ca6edf0f231a", "branch_name": "refs/heads/master", "committer_date": 1616134621000, "content_id": "b25824b670d8751c054295d36e6c5f0a9b1f04fa", "detected_licenses": [ "MIT" ], "directory_id": "062069a8f1f13a49439bc25a3abafa011a7fcdea", "extension": "py", "fi...
2.375
stackv2
class BdApiError(IOError): pass def mute_error(func): def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except Exception: pass return wrapper def log_error(func): import logging logger = logging.getLogger('BdPan') def wrapper(*args, **k...
28
19.14
43
14
123
python
[]
0
true
2024-11-18T20:10:39.139437+00:00
1,429,789,540,000
ee3a3603b6235c633589246703132a4cc17222f6
3
{ "blob_id": "ee3a3603b6235c633589246703132a4cc17222f6", "branch_name": "refs/heads/master", "committer_date": 1429789540000, "content_id": "66d80eb95091b10203e891308047953f8a833f93", "detected_licenses": [ "MIT" ], "directory_id": "19c40c08e6908054b73355bba69794e7083c206a", "extension": "py", "fi...
2.78125
stackv2
from decimal import Decimal, ROUND_HALF_DOWN import requests import json from qsforex.event.event import TickEvent from qsforex.data.price import PriceHandler class StreamingForexPrices(PriceHandler): def __init__( self, domain, access_token, account_id, pairs, events_queue ): self.d...
80
39.9
89
23
742
python
[]
0
true
2024-11-18T20:10:39.310617+00:00
1,448,866,520,000
4d1228288fa14136b704827a6b76873671b985ff
2
{ "blob_id": "4d1228288fa14136b704827a6b76873671b985ff", "branch_name": "refs/heads/master", "committer_date": 1448871740000, "content_id": "824400b3992ed4f21540d35f2a31befa9d7b7d1f", "detected_licenses": [ "MIT" ], "directory_id": "218623be0476d2eda498b9e979478eb9865eb221", "extension": "py", "fi...
2.359375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Usage: python apk_launcher.py <apk file> # import sys import os import subprocess import re import command_util from optparse import OptionParser from sys import stderr from sys import stdout # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- # # command line arg...
55
25.87
79
13
426
python
[]
0
true
2024-11-18T20:10:39.366390+00:00
1,623,246,379,000
d08d9f89745109526be1b519f4d65c438124fdb0
3
{ "blob_id": "d08d9f89745109526be1b519f4d65c438124fdb0", "branch_name": "refs/heads/main", "committer_date": 1623246379000, "content_id": "e181764d41711789e85c7c89c7d18ad3d10fc22f", "detected_licenses": [ "MIT" ], "directory_id": "d3aaed8298a6c9a0564ee53e1401f8e118d9662c", "extension": "py", "file...
3.359375
stackv2
from timeit import default_timer as timer from functools import wraps from inspect import getframeinfo, stack, getargspec def ctimeit(function): """ A custom decorator for timing a function Usage: Simply add: @ctimeit before a function definition Example: @ctimeit ...
49
27.59
92
18
328
python
[]
0
true
2024-11-18T20:10:39.430393+00:00
1,580,287,626,000
3e92ac93c33a5c99b3ef7efb55df5ecce20e2807
3
{ "blob_id": "3e92ac93c33a5c99b3ef7efb55df5ecce20e2807", "branch_name": "refs/heads/master", "committer_date": 1580287626000, "content_id": "376463088522468ff532607d242a8e1d66a87b1d", "detected_licenses": [ "MIT" ], "directory_id": "1d44e2d1eceb3800276d38f38cbda613b50fc4ca", "extension": "py", "fi...
3.09375
stackv2
from ycyc.ycollections.heap import Heap class SerialListItem(object): def __init__(self, sn, value): self.sn = sn self.value = value class SerialList(object): def __init__(self, sn=0, reverse=False): self.next_sn = sn self.heap = Heap(cmp_attrs=["sn"], reverse=False) def...
40
24.62
57
16
228
python
[]
0
true
2024-11-18T20:10:39.641056+00:00
1,625,160,965,000
6b51f71551f397e55a35e6fcc7ea8c37419789fa
3
{ "blob_id": "6b51f71551f397e55a35e6fcc7ea8c37419789fa", "branch_name": "refs/heads/master", "committer_date": 1625160965000, "content_id": "fd9f501b976ccc065617179dd3fa4be9e73db76d", "detected_licenses": [ "MIT" ], "directory_id": "2a7edf6063fd5c4f1372ffaf2bffc5339ccab74e", "extension": "py", "fi...
2.546875
stackv2
from __future__ import print_function import os.path import pickle import pyttsx3 from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request import os import playsound from gtts import gTTS import datetime import pytz import spac...
297
33.29
122
23
2,442
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_673d79ec966abf0f_5cd72e75", "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-18T20:10:39.771618+00:00
1,688,462,636,000
2c97dcd37324354e1efa8ee2110e4663e3603fd4
3
{ "blob_id": "2c97dcd37324354e1efa8ee2110e4663e3603fd4", "branch_name": "refs/heads/master", "committer_date": 1688462636000, "content_id": "8f27ff0dca5b8e956d14f7b0043cc34ae498431e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a7cfc888250e38b5fbde527d6ec714140548d129", "extension": "p...
2.546875
stackv2
"""PASPAL implementation (in Python, based on the original MATLAB). Copyright 2009-2010 Sofia Mosci and Lorenzo Rosasco (Matlab implementation) Copyright 2018 Federico Tomasi (Python implementation) """ from __future__ import print_function, division from itertools import combinations import numpy as np from scipy ...
251
31.46
118
18
2,346
python
[]
0
true
2024-11-18T20:10:40.005048+00:00
1,632,422,493,000
0fcad28464e4b41b453a98038cd268c6406b88ec
3
{ "blob_id": "0fcad28464e4b41b453a98038cd268c6406b88ec", "branch_name": "refs/heads/main", "committer_date": 1632422493000, "content_id": "7df882d0879ec9dcb170e1006718f9971eb341c6", "detected_licenses": [ "MIT" ], "directory_id": "96e8b6024075e425254d324b6eb20e11b4b87a70", "extension": "py", "file...
3.28125
stackv2
# -*- coding: utf-8 -*- """TextAnaly1.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1zen1h2ly517z9HEwTFdksGymM_CPfYEC """ import nltk from nltk import sent_tokenize,word_tokenize nltk.download('punkt') text= "Hello iam doing text analytics her...
68
17.47
77
9
359
python
[]
0
true
2024-11-18T20:10:40.106724+00:00
1,667,240,910,000
98d64befaf7044edf6502110639a28c0b1061f98
4
{ "blob_id": "98d64befaf7044edf6502110639a28c0b1061f98", "branch_name": "refs/heads/master", "committer_date": 1667240910000, "content_id": "98b00153efc9e074ef09b72722b6f7fc870fdc65", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9d5ffeb26d7ff6305c85c35057a074e55a7296d7", "extension": "py"...
3.9375
stackv2
# Given an array nums of integers, return how many of them contain an even number of digits. # Example 1: # Input: nums = [12,345,2,6,7896] # Output: 2 # Explanation: # 12 contains 2 digits (even number of digits). # 345 contains 3 digits (odd number of digits). # 2 contains 1 digit (odd number of digits). # 6...
43
21.58
92
11
327
python
[]
0
true
2024-11-18T20:10:40.259567+00:00
1,519,164,056,000
2310513ea34ee18675a9e0138f458cbe5884acc4
3
{ "blob_id": "2310513ea34ee18675a9e0138f458cbe5884acc4", "branch_name": "refs/heads/master", "committer_date": 1519164056000, "content_id": "6258ba5f0c3b1614e7b5b2490765fb29c0cd6e34", "detected_licenses": [ "MIT" ], "directory_id": "e169fd5ea9e79bb3be21e7148900eae700778a50", "extension": "py", "fi...
2.6875
stackv2
import os import sys import subprocess as sp from pathlib import PurePath PARSER_PATH = sys.modules[__name__].__file__ def geojson_to_topojson(infile,outfile): """ geojson_to_topojson converts a geojson file into a topojson file. This function uses [https://github.com/topojson/topojson-server](https://git...
23
33.43
113
13
207
python
[]
0
true
2024-11-18T20:10:40.363420+00:00
1,513,239,259,000
a52f4e390950d4c557e3c0103017a965cf61d3b6
3
{ "blob_id": "a52f4e390950d4c557e3c0103017a965cf61d3b6", "branch_name": "refs/heads/master", "committer_date": 1513239259000, "content_id": "10022bfb2dcb46d091f88fffba6fd5bb5b0df26a", "detected_licenses": [ "MIT" ], "directory_id": "110bff45691ab83612b5573a49b445abe6db87e9", "extension": "py", "fi...
3.125
stackv2
import sys ''' The below is only needed for Bayesian Optimization on Luis' Machine. Ignore and comment out if it causes problems. ''' path = "/home/luis/Documents/Harvard_School_Work/Spring_2015/cs181/assignments/practicals/prac4/practical4-code/" if path not in sys.path: sys.path.append(path) ''' End Bayesian '''...
72
30.62
113
12
489
python
[]
0
true
2024-11-18T20:10:40.420529+00:00
1,630,321,760,000
9447dd0fce3f6668ebbaa40d820123eb55560395
2
{ "blob_id": "9447dd0fce3f6668ebbaa40d820123eb55560395", "branch_name": "refs/heads/main", "committer_date": 1630321760000, "content_id": "105d30199e1df06fcd5ab3185dbaf77aab59716c", "detected_licenses": [ "MIT" ], "directory_id": "a4d90752c3af106270f63a277f380115acd55164", "extension": "py", "file...
2.375
stackv2
import torchvision.datasets as dset import torchvision.transforms as transforms from torch.utils.data import DataLoader import matplotlib.pyplot as plt import torchvision.utils from torch import optim from Config import * from ContrastiveLoss import * from SiameseNetwork import * from SiameseNetworkDataset import * imp...
75
40.67
148
18
729
python
[]
0
true
2024-11-18T20:10:40.995046+00:00
1,491,415,110,000
c251ab0391c5d0bcad009c89ef049c9ff0432782
3
{ "blob_id": "c251ab0391c5d0bcad009c89ef049c9ff0432782", "branch_name": "refs/heads/master", "committer_date": 1491415110000, "content_id": "430a23fd10c18592aea0f46c2df1f1e73fec3911", "detected_licenses": [ "MIT" ], "directory_id": "cbe03fadf9998859b928c61d8e4502b45873623f", "extension": "py", "fi...
2.65625
stackv2
# coding=utf-8 """Wait for all subtasks have done. """ import tornado import tornado.locks from tornado.concurrent import Future class ProcessWaiter(tornado.locks._TimeoutGarbageCollector): def __init__(self): super(ProcessWaiter, self).__init__() self._value = 0 def __repr__(self): ...
62
31.74
103
19
452
python
[]
0
true
2024-11-18T20:10:41.098571+00:00
1,510,247,223,000
cfdcc73d7fa05bbeba9af3eb69b32d7f5b430614
4
{ "blob_id": "cfdcc73d7fa05bbeba9af3eb69b32d7f5b430614", "branch_name": "refs/heads/master", "committer_date": 1510247223000, "content_id": "9216037582c5203d89a5f4be500cb8a569752261", "detected_licenses": [ "MIT" ], "directory_id": "74988651d8e70163c3c834599fcd631972f73c02", "extension": "py", "fi...
3.5
stackv2
#!/usr/bin/env python 3 # -*- coding: utf-8 -*- ### # Name: Andrew_Papilion # Student ID: 2265916 # Email: papil103@mail.chapman.edu # Course: PHYS220/MATH220/CPSC220 Fall 2017 # Assignment: Classwork_04 ### import math import numpy as np import math import numpy as np def gen_gaussian_list(a, b, n=1000): dx ...
67
26.72
76
14
547
python
[]
0
true
2024-11-18T20:10:42.063362+00:00
1,622,364,750,000
50114972a046b5ff2e4543b1ff655441d44b78bc
3
{ "blob_id": "50114972a046b5ff2e4543b1ff655441d44b78bc", "branch_name": "refs/heads/main", "committer_date": 1622364750000, "content_id": "e5d979fb3fa8e379cd23b394e73d717e06b3e2a8", "detected_licenses": [ "MIT" ], "directory_id": "2b059e66517881a619ceae9cff7400e14cb25411", "extension": "py", "file...
3.25
stackv2
from typing import List class Solution: def searchRange(self, nums: List[int], target: int) -> List[int]: def findIndex(isLeft): left = 0 right = len(nums) while left < right: mid = left + (right - left)//2 if nums[mid...
32
26.12
74
16
214
python
[]
0
true
2024-11-18T20:10:42.128594+00:00
1,608,741,560,000
771ca5460d426ee6849dfaaa80cc629ed5999fcc
3
{ "blob_id": "771ca5460d426ee6849dfaaa80cc629ed5999fcc", "branch_name": "refs/heads/master", "committer_date": 1608741560000, "content_id": "5a1642b83a8fc3054c9b4093dc4512c956547f52", "detected_licenses": [ "CC0-1.0" ], "directory_id": "58cc38c8e3c8c9006692667ab5ef3ab86bd90ed5", "extension": "py", ...
3.015625
stackv2
""" authors: Adam Villarreal depending on your environment you may need to install: pandas>=1.0.3 numpy>=1.18 sqlalchemy>=1.3 tqdm>=4.44 psycopg2>=2.8 matplotlib>=3.1 seaborn==0.9 """ import sqlalchemy import numpy as np import pandas as pd import matplotlib.pyplot as plt #Connecting to the Database Server username...
104
35.31
151
13
1,065
python
[]
0
true
2024-11-18T20:10:42.386996+00:00
1,490,659,469,000
5b6dd20d7dc0601b67fe4932a9293665ec02d869
2
{ "blob_id": "5b6dd20d7dc0601b67fe4932a9293665ec02d869", "branch_name": "refs/heads/master", "committer_date": 1490659469000, "content_id": "30dc6ab055f72016e83cbda25eb782ec2391a1af", "detected_licenses": [ "MIT" ], "directory_id": "f0db275fb5a4f4c1600cf884be6fb9edddf594f5", "extension": "py", "fi...
2.328125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' transit.py ---------- The TRAPPIST-1 transit model class. ''' from __future__ import division, print_function, absolute_import #, unicode_literals import numpy as np import pysyzygy as ps import everest import os TRAPPIST_DAT = os.path.join(os.path.dirname(os.path.ab...
187
32.53
153
20
2,280
python
[]
0
true
2024-11-18T20:10:42.453428+00:00
1,624,220,533,000
7412d7da38d7429f47a6a7abf491f158e6055c17
3
{ "blob_id": "7412d7da38d7429f47a6a7abf491f158e6055c17", "branch_name": "refs/heads/master", "committer_date": 1624220533000, "content_id": "26cd38cbc0f605bf777acb321e24d60d99116bfe", "detected_licenses": [ "MIT" ], "directory_id": "f28c2e25a2b101c339aa752014287a1f9e3b5545", "extension": "py", "fi...
2.71875
stackv2
from bin.classes.class_system import * from bin.input import input_vars from bin.revised_simplex_with_ETA import revised_simplex_with_ETA from bin.canonical_form import canonical_form from bin.make_standardized_form import make_standardized_form from bin.print_ import * from bin.dual_simplex import dual_simplex from bi...
36
26.83
110
14
247
python
[]
0
true
2024-11-18T20:10:42.748509+00:00
1,608,007,305,000
b4f26187f17256e8b640b68427e2c37f3360ead2
3
{ "blob_id": "b4f26187f17256e8b640b68427e2c37f3360ead2", "branch_name": "refs/heads/main", "committer_date": 1608007305000, "content_id": "9277b4b0341188f38d2e8aa557377a51be71200c", "detected_licenses": [ "MIT" ], "directory_id": "9974e520c1135f362d707f87a009431fd74717a5", "extension": "py", "file...
3.0625
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 7 00:45:09 2020 @author: yanglingqin Description: o Read from the listings csv file of rating, subway and tourist attractions data. o Plot box plot of rating~subway and rating~tourist attraction. """ import pandas as pd import seabor...
42
21.52
94
11
266
python
[]
0
true
2024-11-18T20:10:42.804070+00:00
1,600,648,639,000
239ddecdc2c228db3ce8e3e8270eb1e7ce63551e
2
{ "blob_id": "239ddecdc2c228db3ce8e3e8270eb1e7ce63551e", "branch_name": "refs/heads/master", "committer_date": 1600648639000, "content_id": "16e3db5b92c417980e2703a71ec81f2e2a77f573", "detected_licenses": [ "MIT" ], "directory_id": "dae95c2ea64fa10e5495b6abb981e204bfe8b4af", "extension": "py", "fi...
2.5
stackv2
import pandas as pd import torch import numpy as np import transformers from transformers import AutoModel, BertTokenizerFast, AdamW, BertModel import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split import torch.nn as nn import tensorflow from keras import Input, Model from keras.layers im...
95
34.28
160
10
851
python
[]
0
true
2024-11-18T20:10:42.991627+00:00
1,618,940,886,000
f5ccb8dbec71e451b6cf546d47e2b32afa0778da
3
{ "blob_id": "f5ccb8dbec71e451b6cf546d47e2b32afa0778da", "branch_name": "refs/heads/main", "committer_date": 1618940886000, "content_id": "162d0cbed223548108f4a97cee6a5f1fdfa5a96c", "detected_licenses": [ "MIT" ], "directory_id": "4f9f608670adfe2a8b7b87afd1c35f6f24514652", "extension": "py", "file...
2.546875
stackv2
import csv import os from datetime import datetime from typing import List from data_set_dimension_reductioner.classes.data_class.dimension_reduction_result import DimensionReductionResult from data_set_dimension_reductioner.classes.dimension_reduction_statistics_reporter.statistic_reporter import \ DimensionReduc...
29
44.14
113
14
249
python
[]
0
true
2024-11-18T20:10:43.073861+00:00
1,590,715,742,000
9bcff7658c32a5b0a104658c70b71c0e924207a6
3
{ "blob_id": "9bcff7658c32a5b0a104658c70b71c0e924207a6", "branch_name": "refs/heads/master", "committer_date": 1590715742000, "content_id": "6965f6f8b64307244027676510911f91b7a17824", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "8a6104c025242590ac659ae9dd7488bc9faac053", "extension": "p...
2.75
stackv2
'''Plot Stimuli from NWB files''' from pathlib import Path import os import sys from pynwb import NWBHDF5IO import cv2 import numpy as np import re def plotStimuli(nwbFilePath): # Input Path Here #nwbFilePath = ('V:/LabUsers/chandravadian/NWB Data/p/P9HMH_NOID5.nwb') #session = 'P9HMH_NOID5.nwb' # 'P42H...
80
26.27
106
13
575
python
[]
0
true
2024-11-18T20:10:43.124500+00:00
1,611,094,657,000
80b9588daf1de48689cc9cbd663637e3d0b2e2d5
3
{ "blob_id": "80b9588daf1de48689cc9cbd663637e3d0b2e2d5", "branch_name": "refs/heads/master", "committer_date": 1611094657000, "content_id": "83ea445475cdbaad735fe700378c25d2dd705549", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b660237a088048f879ca3fb76a98b6a562abe062", "extension": "py"...
2.59375
stackv2
from .base_patterns import Pattern from .pattern_containers import register_pattern_json import autograd.numpy as np import copy import itertools import json import scipy as osp from scipy import sparse def _unconstrain_array(array, lb, ub): # Assume that the inputs obey the constraints, lb < ub and # lb <= a...
367
33.45
79
18
2,924
python
[]
0
true
2024-11-18T20:10:43.301682+00:00
1,688,416,464,000
3539d7927b65d1f1a42159da7db2f9719b713256
2
{ "blob_id": "3539d7927b65d1f1a42159da7db2f9719b713256", "branch_name": "refs/heads/master", "committer_date": 1688416464000, "content_id": "14442a84c66debbede0c72bc7e6b4a4e1c5c1ccc", "detected_licenses": [], "directory_id": "5231c6307a055e21c31d4366c5a2af8dba487caa", "extension": "py", "filename": "mpi...
2.359375
stackv2
#!/usr/bin/env python3 import numpy as np import pandas as pd import re import gzip import argparse from collections import defaultdict import subprocess import os import tempfile def samtools_mpileup(bam_file, fasta, region=None, regions_bed=None, variant_ids=None, output_extra=None, prefix=None...
336
36.93
110
24
3,217
python
[]
0
true
2024-11-18T20:10:46.731769+00:00
1,512,626,647,000
08586fa305334b8f4a7e38e1655a5bf61dd40024
3
{ "blob_id": "08586fa305334b8f4a7e38e1655a5bf61dd40024", "branch_name": "refs/heads/master", "committer_date": 1512626647000, "content_id": "5948b1fa2ed28bbc5cfe9265562a60f1524d243e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0ba6abd94c6000566ee0751ca6557c006355578d", "extension": "py"...
2.78125
stackv2
# -*- coding:utf-8 -*- import unittest import multiprocessing import time from a_1 import * from b_1 import * from parametic import * class TestOne(ParametrizedTestCase): def test_a(self): i = 1 print("proc1 send***: %s" % (i)) self.param.send(i) time.sleep(5) print("do so...
56
25.32
84
13
383
python
[]
0
true
2024-11-18T20:10:46.856494+00:00
1,690,979,144,000
a1dd330729af0e10e28000c4071d1f3756fea6fa
3
{ "blob_id": "a1dd330729af0e10e28000c4071d1f3756fea6fa", "branch_name": "refs/heads/master", "committer_date": 1690979144000, "content_id": "018539abc235a6d8c2f2ef2825e71174d443638d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3d063af394b4b55ea49ded7915d0793602015859", "extension": "py"...
2.6875
stackv2
""" Load data from Companies House from a dump file or an id file. """ import requests import time import json import sys import sling.flags as flags import sling.crawl.chs as chs flags.define("--ids", help="File with list of company numbers to load", default=None, metavar="FILE...
111
24.48
65
13
659
python
[]
0
true
2024-11-18T20:10:47.698796+00:00
1,683,902,021,000
42b9a030fa984d70ed1a8212e942e15553cee8e9
4
{ "blob_id": "42b9a030fa984d70ed1a8212e942e15553cee8e9", "branch_name": "refs/heads/master", "committer_date": 1683902021000, "content_id": "d5bbb268b2d3bf8e05503a7c543ec079b81cfd9a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "19da55d3d1d822ec4c991ebc26e14203ef6fd035", "extension": "py"...
3.75
stackv2
""" 一个有名的按摩师会收到源源不断的预约请求,每个预约都可以选择接或不接。在每次预约服务之间要有休息时间,因此她不能接受相邻的预约。 给定一个预约请求序列,替按摩师找到最优的预约集合(总预约时间最长),返回总的分钟数。 示例 1: 输入: [1,2,3,1] 输出: 4 解释: 选择 1 号预约和 3 号预约,总时长 = 1 + 3 = 4。 示例 2: 输入: [2,7,9,3,1] 输出: 12 解释: 选择 1 号预约、 3 号预约和 5 号预约,总时长 = 2 + 9 + 1 = 12。 示例 3: 输入: [2,1,4,5,3,1,1,3] 输出: 12 解释: 选择 1 号预约、 3 号预约、 5 号预约和 8 号...
37
20.59
64
14
380
python
[]
0
true
2024-11-18T20:10:47.745764+00:00
1,626,150,650,000
987f0384e927b5f1f7b311945b22d52d7d42dd77
2
{ "blob_id": "987f0384e927b5f1f7b311945b22d52d7d42dd77", "branch_name": "refs/heads/master", "committer_date": 1626150650000, "content_id": "f7dc6b899633dd0ae8e974776b1b3ea8d10a6248", "detected_licenses": [ "BSD-3-Clause", "BSD-2-Clause" ], "directory_id": "20c2d07e67cf153a433d0b094c1706b8a5616521...
2.359375
stackv2
# Copyright: (c) 2021, Edwin G. W. Peters from demodulator.demodulator_base import Demodulator as Demodulator_base class Demodulator(Demodulator_base): def uploadAndFindCarrier(self,samples): """ Performs: thresholding -- remove large spikes of interference uploadToGPU --...
20
29.2
72
9
144
python
[]
0
true
2024-11-18T20:10:47.921346+00:00
1,522,710,638,000
6946a5fb8de4d0f03f032cff0e02874f21dd4470
3
{ "blob_id": "6946a5fb8de4d0f03f032cff0e02874f21dd4470", "branch_name": "refs/heads/master", "committer_date": 1522710638000, "content_id": "7a2809b5dd63e5516ed2f42db42d07f656cb3b44", "detected_licenses": [ "MIT" ], "directory_id": "4059f9624e23c5eb8db7f688317aa18a883a9087", "extension": "py", "fi...
2.703125
stackv2
import os import numpy as np def load_data(data_path, prefix = "_train"): imgs_train = np.load(os.path.join(data_path, "imgs"+prefix+".npy"), mmap_mode="r", allow_pickle=False) msks_train = np.load(os.path.join(data_path, "msks"+prefix+".npy"), mmap_mode="r", allow_pickle=False) return imgs_train, m...
45
26.24
78
14
412
python
[]
0
true
2024-11-18T20:10:48.090055+00:00
1,596,397,594,000
0048b91b0d82e5155c88f09613a86e2125bc4668
2
{ "blob_id": "0048b91b0d82e5155c88f09613a86e2125bc4668", "branch_name": "refs/heads/master", "committer_date": 1596397594000, "content_id": "3674ecdf663c467ab9933a0b38fe5fe88a31d455", "detected_licenses": [ "MIT" ], "directory_id": "1e6dafa2fc46f8e6ddab04f671a5ce76d7a10033", "extension": "py", "fi...
2.5
stackv2
import json as _json import pathlib as _pathlib import requests_oauthlib as _requests_oauthlib def oauth( consumer_key: str, consumer_secret: str, token_value: str, token_secret: str, ) -> _requests_oauthlib.OAuth1: return _requests_oauthlib.OAuth1( client_key = consumer_key, client_s...
49
25
58
17
314
python
[]
0
true
2024-11-18T20:10:48.291826+00:00
1,615,749,923,000
e6030a6144c8a6968e4cfc717454f009b7c102f0
3
{ "blob_id": "e6030a6144c8a6968e4cfc717454f009b7c102f0", "branch_name": "refs/heads/master", "committer_date": 1615749923000, "content_id": "86f5230cb8739819da352461caeecea58fcc45b8", "detected_licenses": [ "Zlib" ], "directory_id": "d84bcc6b37482d078a738456756e948639cb5360", "extension": "py", "f...
2.8125
stackv2
import math import os from matplotlib import pyplot as plt distribution_names = { "shuffled_16_values_int": "Shuffled (16 values)", "shuffled_int": "Shuffled", "all_equal_int": "All equal", "ascending_int": "Ascending", "descending_int": "Descending", "pipe_organ_int": "Pipe organ", "pus...
84
35.14
139
18
884
python
[]
0
true
2024-11-18T20:10:48.402812+00:00
1,590,548,166,000
22509bbe1ab91a1f7d895254d7372b206c8b0ec7
3
{ "blob_id": "22509bbe1ab91a1f7d895254d7372b206c8b0ec7", "branch_name": "refs/heads/master", "committer_date": 1590548166000, "content_id": "3ee20175cd15d485911c29056f886c3cdca5ad6b", "detected_licenses": [ "MIT" ], "directory_id": "3014d0408b05e2ebcbf7d9a08e5a1c7208a5110e", "extension": "py", "fi...
2.59375
stackv2
# -*- coding: utf-8 -*- import os import datetime import copy import collections from queue import Queue from abc import ABC, abstractmethod import numpy as np import torch from torch import nn from tensorboardX import SummaryWriter def train_local_mp(net, local_epochs, rnd, q, policy, w_d): """For multiprocessing...
125
35.88
100
17
1,040
python
[]
0
true
2024-11-18T20:10:48.503475+00:00
1,553,486,302,000
5a1caf77157834c7d810afdeeba389925ade2427
3
{ "blob_id": "5a1caf77157834c7d810afdeeba389925ade2427", "branch_name": "refs/heads/master", "committer_date": 1553486302000, "content_id": "2def10fc3e0d009739e51797b641b4c8bd14c00e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "49aa27e9f1bf3efa1f6fdd54556124647fac972c", "extension": "py"...
3.21875
stackv2
from math import fabs class Node: def __init__(self, val): self.val = val self.next = None carry, result, diffNode = 0, None, None def getSizeOfList(head): if not head: return 0 count = 0 p = head while p: count += 1 p = p.next return count def pus...
94
19.29
46
12
553
python
[]
0
true
2024-11-18T20:10:48.619102+00:00
1,626,826,976,000
ebde10ecd5cd7b861b32e403d4801143cadc94b4
4
{ "blob_id": "ebde10ecd5cd7b861b32e403d4801143cadc94b4", "branch_name": "refs/heads/main", "committer_date": 1626826976000, "content_id": "8b0b9c958dcc22258022ba91fcfb3ec882b6da11", "detected_licenses": [ "MIT" ], "directory_id": "ca3a49676cdf1016b2d729f0432b451d35b7a281", "extension": "py", "file...
3.84375
stackv2
def fruit_distribution(s,n): """ In this task, you will be given a string that represents a number of apples and oranges that are distributed in a basket of fruit this basket contains apples, oranges, and mango fruits. Given the string that represents the total number of the oranges and apples an...
49
30.12
115
12
430
python
[]
0
true
2024-11-18T20:10:48.681744+00:00
1,572,616,107,000
9b4a694de015639f344fd8803cc6717f621c309b
2
{ "blob_id": "9b4a694de015639f344fd8803cc6717f621c309b", "branch_name": "refs/heads/master", "committer_date": 1572616107000, "content_id": "f199e6b25e73f6edcb784ea08ab25ce1bfacedcb", "detected_licenses": [ "MIT" ], "directory_id": "1da87e0507cf12804a58cc47232ed59c357d90f8", "extension": "py", "fi...
2.328125
stackv2
import logging import boto3 from botocore.exceptions import ClientError import os,sys,threading,time class CTRANSCRIBE(): def __init__(self): pass def initialize(self,server,access_key,access_secret): ACCESS_KEY = access_key SECRET_KEY = access_secret try: if 'aws' in server: self.s3_client = boto3...
148
30.34
146
16
1,195
python
[]
0
true
2024-11-18T20:10:48.737287+00:00
1,543,418,786,000
ecc604d0c0dedadddbdd80c7280dbd8cef6c300e
2
{ "blob_id": "ecc604d0c0dedadddbdd80c7280dbd8cef6c300e", "branch_name": "refs/heads/master", "committer_date": 1543418786000, "content_id": "1bc916ac253b8fdfa4dfdb27370986e2da0dbd5f", "detected_licenses": [ "CC0-1.0", "MIT" ], "directory_id": "79ab6eb5a37b345c3c377008001003f35abe5475", "extensio...
2.34375
stackv2
# -*- coding: utf-8 -*- # Copyright (c) 2017 RS Components Ltd # SPDX-License-Identifier: MIT License """ Interface for PmodGyro. .. note:: """ import RPi.GPIO as gpio from time import sleep import spidev CAP = 'SPI' PHY = '2x6' READ = 0x80 CTRL_REG1 = 0x20 CTRL_REG2 = 0x21 CTRL_REG3 = 0x22 CTRL_REG4 = 0x23 CTRL_RE...
141
24.07
83
15
1,180
python
[]
0
true
2024-11-18T20:10:48.924934+00:00
1,493,353,966,000
7d50859c000358f91d2c72836c780932d524e68c
2
{ "blob_id": "7d50859c000358f91d2c72836c780932d524e68c", "branch_name": "refs/heads/master", "committer_date": 1493353966000, "content_id": "8d86432c485b5b21fe79925406221dd36556d0d9", "detected_licenses": [ "MIT" ], "directory_id": "24866e043eb794df96a358bf6eedf353038c844c", "extension": "py", "fi...
2.453125
stackv2
import handlers routes = [ ("/", "SimpleHandler"), ("/vote", "VoteHandler"), ("/result", "ResultHandler"), ] class AppRoutes(object): def __init__(self, app): self.handlers = [] for route, handler_name in routes: handler_class = getattr(handlers, handler_name) ...
18
25.61
85
16
101
python
[]
0
true
2024-11-18T20:10:48.993379+00:00
1,519,967,147,000
633c9230807f8a2fcb61f14db2ec0986fa8b8d99
3
{ "blob_id": "633c9230807f8a2fcb61f14db2ec0986fa8b8d99", "branch_name": "refs/heads/master", "committer_date": 1519967147000, "content_id": "25ad6df815164dbd5d90f45e89f82e13c8c7850d", "detected_licenses": [ "MIT" ], "directory_id": "900dac4c57f71f7ec9171178efa31bd95c29b002", "extension": "py", "fi...
2.65625
stackv2
# -*- coding: utf-8 -*- """ Learning rate assemble. Author: Kai JIN Updated: 2017-07-23 """ import tensorflow as tf def configure_lr(config, global_step): """Configures the learning rate. Args: config: config.train.lr global_step: The global_step tensor. Returns: A `Tensor` representing the ...
87
26.95
74
12
536
python
[]
0
true
2024-11-18T20:10:49.079674+00:00
1,456,057,179,000
9af083ad1188082edb4c3ea2cfa4a2049e188178
3
{ "blob_id": "9af083ad1188082edb4c3ea2cfa4a2049e188178", "branch_name": "refs/heads/master", "committer_date": 1456057179000, "content_id": "512199f659433131dc3345c2461aa12b93d6efb8", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "d36f0d7e5fab499cb392f7efe1940761fc117ea2", "extension": "p...
2.546875
stackv2
from sqlalchemy import Column, String, DateTime, Integer, create_engine from sqlalchemy.ext.declarative import declarative_base engine = create_engine('sqlite:///slack-archives.db') engine.echo = False Base = declarative_base() class Message(Base): __tablename__ = 'messages' id = Column(Integer(), primary_k...
20
33.35
71
10
157
python
[]
0
true
2024-11-18T20:10:49.208267+00:00
1,599,062,880,000
f4c63e16ce559b2bd00a46946e1996268b0d57e0
3
{ "blob_id": "f4c63e16ce559b2bd00a46946e1996268b0d57e0", "branch_name": "refs/heads/master", "committer_date": 1599062880000, "content_id": "bedfe6d0bfeff798b43e57656c202941bc78e5fa", "detected_licenses": [ "MIT" ], "directory_id": "7c990fa2088c1f9afadf920eba1f6367ab14b8fa", "extension": "py", "fi...
2.828125
stackv2
""" Author: Faidon Mitzalis Edited from VL-BERT impelementation Generates json file for training set with caption/images/frcnn for multi30k dataset """ import os import json import random from tqdm import tqdm captions_en = [] captions_de = [] # **************** # Step 1: Read all files filepath_en = '../train.en' f...
37
24.16
83
11
231
python
[]
0
true