hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ac8b3c487af57a6afbdefecaf31f450c8169a949 | 3,288 | py | Python | python/oneflow/test/modules/test_fused_self_attention.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_fused_self_attention.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_fused_self_attention.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 31.314286 | 88 | 0.648418 |
ce0e92ccb339725d965c2b1d3ffb27d15b82aea8 | 21,804 | py | Python | bp-revok/python/bin/build/lib/configargparse/configargparse.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | null | null | null | bp-revok/python/bin/build/lib/configargparse/configargparse.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | null | null | null | bp-revok/python/bin/build/lib/configargparse/configargparse.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | 3 | 2017-04-07T12:02:22.000Z | 2020-03-23T12:11:55.000Z | import argparse
from collections import OrderedDict
import os
import re
import sys
import types
if sys.version_info >= (3, 0):
from io import StringIO
else:
from StringIO import StringIO
__version__ = "0.9"
ACTION_TYPES_THAT_DONT_NEED_A_VALUE = {argparse._StoreTrueAction,
argparse._Store... | 42.420233 | 98 | 0.589892 |
022b1c2846a166d6cb292a7a609c4c2f03952ce1 | 10,007 | py | Python | python_project/python/test_prj/test.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | python_project/python/test_prj/test.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | python_project/python/test_prj/test.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
#coding=utf-8
def plot():
import numpy as np
import matplotlib.pyplot as plt
plt.figure(1) # 创建图表1
plt.figure(2) # 创建图表2
ax1 = plt.subplot(211) # 在图表2中创建子图1
ax2 = plt.subplot(212) # 在图表2中创建子图2
x = np.linspace(0, 3, 100)
for i in xrange(5):
plt.figure(1) # ... | 24.347932 | 79 | 0.561207 |
024239e3a130b68fa9b0d8e595a4ad5147f60d32 | 381 | py | Python | script_1_beech.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | 1 | 2021-04-23T19:47:51.000Z | 2021-04-23T19:47:51.000Z | script_1_beech.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | null | null | null | script_1_beech.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | null | null | null | from fanpy import Formind
home_dir = '/p/project/hai_deep_c/project_data/forest-carbon-flux/'
model_path = home_dir
par_file_name='beech'
project_path= home_dir + 'formind_sim/sim_100ha_42_0/'
num_sim = 1
print(model_path)
print(project_path)
print(par_file_name)
model = Formind(model_path, project_path, par_file_n... | 25.4 | 67 | 0.800525 |
02478450bc7e64fc83b1e60985fe076817016c07 | 3,322 | py | Python | Packs/GreyNoise/Integrations/GreyNoise_Community/GreyNoise_Community_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/GreyNoise/Integrations/GreyNoise_Community/GreyNoise_Community_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/GreyNoise/Integrations/GreyNoise_Community/GreyNoise_Community_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import json
import GreyNoise_Community
from test_data.input_data import ( # type: ignore
get_ip_reputation_score_data,
test_module_data,
ip_reputation_command_data,
get_ip_context_data_data,
)
class DummyResponse:
"""
Dummy Response object of requests.response for unit testing.
... | 35.340426 | 119 | 0.721553 |
5a0801feac0a301ddede0dacb5d5d26e24bb4960 | 1,624 | py | Python | src/test/tests/databases/Cale.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/Cale.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/Cale.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: Cale.py
#
# Tests: mesh - 2D, structured, single domain
# plots - Pseudocolor, FilledBoundary
#
# Programmer: Brad Whitlock
# Date: Wed Oct 10 11:46:45 PDT 2007
#
# Mo... | 24.984615 | 78 | 0.572044 |
5a695d5a30c756cf8ebd550bbab2e49f6c47408a | 3,691 | py | Python | packages/watchmen-storage-oracle/src/watchmen_storage_oracle/data_source_oracle.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-oracle/src/watchmen_storage_oracle/data_source_oracle.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-oracle/src/watchmen_storage_oracle/data_source_oracle.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List, Optional
from cx_Oracle import makedsn, SessionPool, SPOOL_ATTRVAL_WAIT
from sqlalchemy import create_engine
from sqlalchemy.engine import Engine
from sqlalchemy.pool import NullPool
from watchmen_model.common import DataModel
from watchmen_model.system import DataSource, DataSourceParam
from... | 30.758333 | 104 | 0.764292 |
0bb21f6cb6f567a0f7f1b69479de18348dcd47af | 212 | py | Python | src/server/wsgi.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | src/server/wsgi.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | src/server/wsgi.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | import os
import sys
curr_path = os.path.dirname(os.path.abspath(__file__))
src_path = os.path.abspath(os.path.join(curr_path, "../"))
sys.path.append(src_path)
from server import create_app
app = create_app()
| 21.2 | 58 | 0.754717 |
f00b5de973d8e522bb416c41d850d0f72a574575 | 214 | py | Python | Crashkurs Python/08_Listen.py | slogslog/Kurzgeschichten-in-CSharp | 3918c4174220e558cdeeada0edac941811418b93 | [
"Unlicense"
] | 2 | 2019-03-15T20:48:34.000Z | 2019-04-22T15:24:09.000Z | Crashkurs Python/08_Listen.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | null | null | null | Crashkurs Python/08_Listen.py | slogslog/Coding-Kurzgeschichten | 9b08237038147c6c348d4cf4c69567178e07dd1d | [
"Unlicense"
] | null | null | null | a = [3, 5, -2, 8, 12, 0, -1]
print(a)
a.append(20)
print(a)
a.remove(8)
print(a)
a.pop(2)
print(a)
a.insert(1, 40)
print(a)
pos = a.index(0)
print(pos)
print(a[:pos])
print(a[pos+1:])
a.reverse();
print(a)
| 8.56 | 28 | 0.570093 |
651ef3a1f47a6e961b83639d64f11bbe0ecac2ae | 3,503 | py | Python | python_experiments/paper_figures/tkde/data_legacy/dynamic_time_mem.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/paper_figures/tkde/data_legacy/dynamic_time_mem.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/paper_figures/tkde/data_legacy/dynamic_time_mem.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | from data_analysis.parallel_statistics.err_mem_size_statistics import prlp_tag, rlp_tag, mem_size_tag
from paper_figures.tkde.data_legacy.static_data_loader import *
def get_algorithm_indexing_time_lst(tag):
if tag is vldbj_reasd_tag:
return [0.00522976, 0.00612305, 0.00374263, 0.00103439, 0.00722572, 0.0... | 46.092105 | 107 | 0.655438 |
0b0eb9f1b6a48b69c02108930acc1f4f0cc43401 | 5,328 | py | Python | adni_dataset.py | bsolano/Alzheimer-Resnets | b7b4f0d240f932513ef3427924894358b87dd68f | [
"MIT"
] | 3 | 2020-04-01T08:13:31.000Z | 2020-10-30T01:01:41.000Z | adni_dataset.py | bsolano/Alzheimer-Resnets | b7b4f0d240f932513ef3427924894358b87dd68f | [
"MIT"
] | null | null | null | adni_dataset.py | bsolano/Alzheimer-Resnets | b7b4f0d240f932513ef3427924894358b87dd68f | [
"MIT"
] | 1 | 2021-01-27T11:46:49.000Z | 2021-01-27T11:46:49.000Z | import torch
import torchvision
import pydicom as dcm
import itertools
import re
import csv
import numpy as np
from pathlib import Path
from typing import Any, Callable, cast, Dict, List, Optional, Tuple
class ADNI_Dataset(torch.utils.data.Dataset):
def __init__(self, data_dir='ADNI', class_names=['CN','SMC','EMCI... | 32.096386 | 112 | 0.553116 |
c59ed4b7753b206ffef14c9de27b83af9525ae96 | 403 | py | Python | PYTHON/Numpy/concatenate.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Numpy/concatenate.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Numpy/concatenate.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import numpy
n, m = [], []
arr = list(map(int, input().strip().split(' ')))
N, M, P = arr[0], arr[1], arr[2]
for _ in range(N):
arr = list(map(int, input().strip().split(' ')))
n.append(arr)
for _ in range(M):
arr = list(map(int, input().strip().split(' ')))
m.append(arr)
na = n... | 22.388889 | 52 | 0.57072 |
a896f053414c15f11372b3d2d6d798a6640090e0 | 316 | py | Python | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/21.Comments.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/21.Comments.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/21.Comments.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | # this class represent my world
# need to write something
# still not found any related data
# final line
"""
this is treated
as Documentation
Not a good way to write multiline
comment...
"""
def login():
print("Checking....") # login method.
def process():
print("Processing") # this is a dummy line
| 15.8 | 47 | 0.683544 |
a89fc8c51b58e133110a6a83a50e563194cf58f1 | 27,614 | py | Python | MachineTranslation/src_bak/seq2seq/v2(Eager execution)/nmt_seq2seq_v2_integrated_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | 2 | 2021-08-25T01:13:29.000Z | 2021-10-10T14:49:59.000Z | MachineTranslation/src_bak/seq2seq/v2(Eager execution)/nmt_seq2seq_v2_integrated_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | MachineTranslation/src_bak/seq2seq/v2(Eager execution)/nmt_seq2seq_v2_integrated_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# 适用于 tensorflow >= 2.0, keras 被直接集成到 tensorflow 的内部
# ref: https://keras.io/about/
from tensorflow.keras.layers import Layer, Input, LSTM, TimeDistributed, Bidirectional, Dense, Lambda, Embedding, Dropout, \
Concatenate, RepeatVector
from tensorflow.keras.optimizers im... | 32.221704 | 157 | 0.628558 |
4f83f91561ec05f6874b4ac77ab78e3fcd8b5ae0 | 5,195 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/panos_set.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/panos_set.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/panos_set.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2018, Jasper Mackenzie <jasper.mackenzie@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publis... | 30.922619 | 113 | 0.666795 |
96fb4211c82c186a20ee14a7e1fd6734f93efc86 | 4,969 | py | Python | yahoo.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | yahoo.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | yahoo.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/python2
#coding=utf-8
import os,sys,time,datetime,random,hashlib,re,cookielib,urllib,json
os.system("rm -rf .txt")
for n in range(999):
pf=random.randint(1, 999)
sys.stdout = open(".txt", "a")
print(pf)
sys.stdout.flush()
try:
import mechanize,requests
except ImportEr... | 31.05625 | 164 | 0.474341 |
4fc7d3514c53aa68de75301dc1c2f85619671999 | 112 | py | Python | scripts/hello_world_vhemt.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_vhemt.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_vhemt.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # LANGUAGE: Python3.6
# AUTHOR: Luca Valentini
# GITHUB: https://github.com/vhemt
print('!dlrow ,olleH'[::-1])
| 18.666667 | 34 | 0.678571 |
4fce749f17cf117474b20d59a26314a5440cc6ae | 3,948 | py | Python | GoogleResultScraper.py | yykk3322/Name-to-Kana-converter | 428895e4b4a73da910a031c3ae7a541919e8dbb9 | [
"MIT"
] | null | null | null | GoogleResultScraper.py | yykk3322/Name-to-Kana-converter | 428895e4b4a73da910a031c3ae7a541919e8dbb9 | [
"MIT"
] | null | null | null | GoogleResultScraper.py | yykk3322/Name-to-Kana-converter | 428895e4b4a73da910a031c3ae7a541919e8dbb9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import time
import random
if sys.version_info[0] > 2:
from http.cookiejar import LWPCookieJar
from urllib.request import Request, urlopen
from urllib.parse import quote_plus, urlparse, parse_qs
else:
from cookielib import LWPCookieJar
from urllib import ... | 33.457627 | 121 | 0.637031 |
8c7042ab7fb76f17d7a1c5a6d887097b60883e2d | 2,998 | py | Python | Hack.lu/2020/right-spot/run.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Hack.lu/2020/right-spot/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Hack.lu/2020/right-spot/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/env python3
import zlib
import sys
import os
import subprocess
import io
import bz2
import sys
from flag import flag
COMPRESSED_LIMIT = 2**20 # 1 MB compressed
DECOMPRESSED_LIMIT = 30*2**20 # 30 MB uncompressed
EXPECTED_STRING = b"pwned!\n"
NUM_TESTS = 4
def compress(data):
if len(data) > DE... | 31.557895 | 126 | 0.645764 |
e8c55476d0f9efdf90716903b1d2360fe008b5d5 | 6,506 | py | Python | addition_module/DMUE/models/resnet_ibn_multibranch.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | addition_module/DMUE/models/resnet_ibn_multibranch.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | addition_module/DMUE/models/resnet_ibn_multibranch.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | import math
import torch
import torch.nn as nn
class IBN(nn.Module):
def __init__(self, planes):
super(IBN, self).__init__()
half1 = int(planes/2)
self.half = half1
half2 = planes - half1
self.IN = nn.InstanceNorm2d(half1, affine=True)
self.BN = nn.BatchNorm2d(half2... | 34.606383 | 160 | 0.569628 |
ad8eec49dcd1002ccfe7cd1b7d782406353886a2 | 8,765 | py | Python | Liquid-experiments/topology_aware/launcher.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | 2 | 2021-08-30T14:12:09.000Z | 2022-01-20T02:14:22.000Z | Liquid-experiments/topology_aware/launcher.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | Liquid-experiments/topology_aware/launcher.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | import random
def train(jm=None, api=None, seed=2020, case=None):
pass
def test(jm=None, api=None, seed=2020, case=''):
cases = [
"single-random-resnet50", "single-random-vgg16", "single-random-inception3", "multi-random",
"single-spread-resnet50", "single-spread-vgg16", "single-spread-inception3", ... | 22.474359 | 115 | 0.55425 |
7e179df4f79d83479b38bae711d76944549754c3 | 545 | py | Python | SoSe-21/Code-Vorlesungen/VL-4/try-except.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Code-Vorlesungen/VL-4/try-except.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Code-Vorlesungen/VL-4/try-except.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null |
# Festlegen der Abbruchbedingung
ungueltige_eingabe = True
# Starten der While-Schleife
while ungueltige_eingabe:
# Versuche Nutzereingabe zu erhalten
try:
alter = int(input("Bitte geben Sie Ihr Alter ein: "))
if alter >= 18:
print("Dein Alter ist", alter, ".")
unguelti... | 28.684211 | 70 | 0.644037 |
7ee75c90460b9fe4a083dcd3fdc5ce9f90437563 | 182 | py | Python | utils/HTTPUtils.py | mase5/tazweb | 5db94020b9f27d7287eb1d59c58992cd2cf70821 | [
"MIT"
] | null | null | null | utils/HTTPUtils.py | mase5/tazweb | 5db94020b9f27d7287eb1d59c58992cd2cf70821 | [
"MIT"
] | null | null | null | utils/HTTPUtils.py | mase5/tazweb | 5db94020b9f27d7287eb1d59c58992cd2cf70821 | [
"MIT"
] | null | null | null | '''
@author: M.D.W
'''
from urllib.request import *
def post(url, data=None):
req = Request(url, data)
rsp = urlopen(req)
return rsp.read()
def unpack(d):
return d
| 14 | 28 | 0.604396 |
adcfb893865848931974689bc70ddf9a00795644 | 984 | py | Python | exercises/de/test_03_12.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_03_12.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_03_12.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
len(nlp.pipeline) == 1 and nlp.pipe_names[0] == "countries_component"
), "Hast du die Komponente korrekt hinzugefügt?"
assert Span.has_extension(
"capital"
), "Hast du die Span-Erweiterung korrekt registriert?"
ext = Span.get_extension("capital")
assert (
... | 37.846154 | 81 | 0.646341 |
cbe7a09f14ac02bac48d1eaccd9a0b0fbd09e55b | 4,540 | py | Python | solutions/pic_search/webserver/src/app.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2020-03-10T07:43:08.000Z | 2020-03-10T07:43:08.000Z | solutions/pic_search/webserver/src/app.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/pic_search/webserver/src/app.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | import os
import os.path as path
import logging
from common.config import DATA_PATH, DEFAULT_TABLE
from common.const import UPLOAD_PATH
from common.const import input_shape
from common.const import default_cache_dir
from service.train import do_train
from service.search import do_search
from service.count import do_cou... | 30.266667 | 113 | 0.685683 |
382026924f22c6ed8e1681336d3726525efeb813 | 417 | py | Python | 3_Functions/function_attributes.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 3_Functions/function_attributes.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 3_Functions/function_attributes.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | def grow_list(val, my_list=None, a=4, b=True):
if my_list:
my_list.append(val)
else:
my_list = [val]
return my_list
my_func = grow_list
print(my_func, type(my_func))
# gibt alle magic methods der Funktion aus
# print(dir(grow_list))
# Funktions Attribute
print(grow_list.__defaults__)
prin... | 23.166667 | 46 | 0.736211 |
aa568acec8e7e5fb5d396f68a47aacae99e4e349 | 1,219 | py | Python | zencad/geom/sweep_law.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/geom/sweep_law.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/geom/sweep_law.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from OCC.Core.GeomFill import GeomFill_Frenet, GeomFill_EvolvedSection, GeomFill_CorrectedFrenet, GeomFill_CurveAndTrihedron
from OCC.Core.Law import Law_Constant
class LawFunction:
def __init__(self, law):
self.law = law
def Law(self):
return self.law
class LawSection:
def __init__(sel... | 20.661017 | 124 | 0.702215 |
2ac000a9b0bd463a8a211c3a064e937389cbde47 | 341 | py | Python | data-pipeline/src/data_pipeline/datasets/gnomad_v3/gnomad_v3_mitochondrial_coverage.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | data-pipeline/src/data_pipeline/datasets/gnomad_v3/gnomad_v3_mitochondrial_coverage.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | data-pipeline/src/data_pipeline/datasets/gnomad_v3/gnomad_v3_mitochondrial_coverage.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import hail as hl
from data_pipeline.data_types.locus import x_position
def prepare_mitochondrial_coverage(coverage_path):
coverage = hl.read_table(coverage_path)
coverage = coverage.annotate(xpos=x_position(coverage.locus))
coverage = coverage.select("xpos", "mean", "median", "over_100", "over_1000")
... | 24.357143 | 81 | 0.759531 |
2ad6781e138464ec8fd4044f06551a28be298c4e | 4,217 | py | Python | src/onegov/org/views/form_export.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/form_export.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/form_export.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from onegov.core.orm.types import UUID
from onegov.core.security import Private
from onegov.form import FormDefinition
from onegov.form import FormRegistrationWindow
from onegov.form import FormSubmission
from onegov.form import FormSubmissionCollection
from onegov.org import _
from ... | 29.697183 | 79 | 0.660896 |
6322d8f153f2a8d894555b4a0a5866b4e26c099e | 419 | py | Python | 5_Closures_and_Decorators/closures.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 5_Closures_and_Decorators/closures.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 5_Closures_and_Decorators/closures.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | # Closure: innere Funktion einer Funktion
# A closure is an inner function that has access to variables
# in the local scope of the outer function
import time
def outer_fn(message):
outer_message = "Outer: " + message
current_time = time.time()
def inner_fn():
print("Inner: '" + outer_message +... | 24.647059 | 62 | 0.675418 |
2d607a31f8211484a9b873afd308f04696d051a7 | 3,528 | py | Python | official/cv/crnn/src/metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/crnn/src/metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/crnn/src/metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 35.28 | 102 | 0.595522 |
2ddb86bd6314da03e42176eb27e3cfa6239504a4 | 326 | py | Python | Chapter2_Python/Functions.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter2_Python/Functions.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter2_Python/Functions.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | def list_max(my_list):
result = my_list[0]
for i in range(1, len(my_list)):
if my_list[i] > result:
result = my_list[i]
return result
l1 = [-2, 1, 2, -10, 22, -10]
l1_max = list_max(l1)
print(l1_max)
l2 = [-20, 123, 112, -10, 22, -120]
l2_max = list_max(l2)
print(l2_... | 18.111111 | 37 | 0.546012 |
fa9731b1a4dc6a95058d9ec7084f3514b45fa245 | 1,809 | py | Python | tests/test_preisgarantie.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_preisgarantie.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_preisgarantie.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from datetime import datetime, timezone
import pytest # type:ignore[import]
from bo4e.com.preisgarantie import Preisgarantie, PreisgarantieSchema
from bo4e.com.zeitraum import Zeitraum
from bo4e.enum.preisgarantietyp import Preisgarantietyp
from tests.serialization_helper import assert_serialization_roundtrip # typ... | 35.470588 | 96 | 0.615257 |
fae13ab4e86deebf007bec9486600f16bda3459b | 1,156 | py | Python | Algorithms/Implementation/climbing_the_leaderborad.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/climbing_the_leaderborad.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/climbing_the_leaderborad.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from collections import Counter, OrderedDict
def bin_search(num, s_key, lo, hi):
if hi < lo:
return lo
mid = (lo + hi) // 2
if num > s_key[mid]:
return bin_search(num, s_key, lo, mid - 1)
else:
return bin_search(num, s_key, mid + 1, hi)
def ge... | 25.688889 | 73 | 0.599481 |
87fff9cbb985965aef6631d72157b1acd9d261ff | 9,847 | py | Python | rengine/workouts.py | noahsolomon0518/rengine | a544951c6b7dd707586cd3c4f84ddec554f1c96a | [
"MIT"
] | null | null | null | rengine/workouts.py | noahsolomon0518/rengine | a544951c6b7dd707586cd3c4f84ddec554f1c96a | [
"MIT"
] | null | null | null | rengine/workouts.py | noahsolomon0518/rengine | a544951c6b7dd707586cd3c4f84ddec554f1c96a | [
"MIT"
] | null | null | null | from rengine.exercises import (
Exercise,
ExerciseFromTypePreset,
StrengthExercise,
pick_random_exercise,
)
import pandas as pd
from rengine.config import (
TIME_BASED_CONDITIONS,
EquipmentAvailable,
ExerciseLoadValues,
ExerciseType,
ExerciseLoad,
ExerciseTypeValues,
MuscleGr... | 34.310105 | 173 | 0.637758 |
355f0b5d27a05de9fcd98c340e8890a3a128e794 | 92 | py | Python | 2014/09/leso-category-spending/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/09/leso-category-spending/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/09/leso-category-spending/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '0AqjLQISCZzBkdHc0dE1FUVdMSHJsVkpTYUZ1TTRYMUE'
| 23 | 68 | 0.847826 |
57cca5a60a7cd304bff2c4a3d9f81bdbe39d80c3 | 753 | py | Python | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_una.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_una.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_una.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício Processa Números
# --------------------------
# Classe responsável por obter unir duas listas de números.
from view.paineis.painel_abstrato import PainelAbstrato
from model.processa_numeros import una
class PainelUna(PainelAbstrato):
def __init... | 37.65 | 111 | 0.648074 |
17fcf293b814d4b1e923936bbfba6197dc180d5d | 1,400 | py | Python | Algorithms/2_Implementation/66.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | 1 | 2021-11-25T13:39:30.000Z | 2021-11-25T13:39:30.000Z | Algorithms/2_Implementation/66.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | Algorithms/2_Implementation/66.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/two-pluses/problem
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'twoPluses' function below.
#
# The function is expected to return an INTEGER.
# The function accepts STRING_ARRAY grid as parameter.
#
def twoPluses(grid, r=[]):
f... | 26.415094 | 137 | 0.538571 |
101f7b1767e3c9b4f1e37b4e5ccdb3995fa4c2a7 | 422 | py | Python | PMIa/2015/KOLOV_A_A/task_3_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/KOLOV_A_A/task_3_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/KOLOV_A_A/task_3_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3. Вариант 14.
# Напишите программу, которая выводит имя "Вильгельм Аполлинарий Костровицкий", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире
# Kolov A.A
# 27.04.2016
name = "Вильгельм Аполлинарий Костровицкий"
alia... | 42.2 | 219 | 0.751185 |
52e604cd975c455d6657d9ba634e814e7205ba41 | 13,788 | py | Python | bigbench/api/results.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | bigbench/api/results.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | bigbench/api/results.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 30.572062 | 88 | 0.663621 |
eacc978399656fa7aeb169e1cc25a535ecf37eb2 | 1,139 | py | Python | Pwn2Win/2021/pwn/accessing_the_truth/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Pwn2Win/2021/pwn/accessing_the_truth/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Pwn2Win/2021/pwn/accessing_the_truth/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | #!/usr/bin/python3 -u
import random
import string
import subprocess
import tempfile
def random_string(n):
return ''.join(random.choice(string.ascii_lowercase) for _ in range(n))
def check_pow(bits):
r = random_string(10)
print(f"hashcash -mb{bits} {r}")
solution = input("Solution: \n").strip()
if ... | 29.205128 | 75 | 0.561896 |
d81a9aff2f08a790932eec7382f4ddb26f6f967c | 1,015 | py | Python | test_plots.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | test_plots.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | test_plots.py | raswz/wifionice | 67f1fa7a6b396afe7a447a4d10adbc64dcbcdd4f | [
"CC-BY-4.0"
] | null | null | null | import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
ax = plt.axes()
data = pd.read_parquet(r'c:\users\Ronja\Documents\GitHub\wifionice\wifionice.parquet') #Importiert die WifionIce.parquet-Datei
y = data['gps_breite'][::100] # Setzt die Breitenkoordinaten aus der Datei als x-Variable
x = data... | 46.136364 | 159 | 0.759606 |
87222a86c0f6621bc1f58c51edfbe17bda44a910 | 5,475 | py | Python | packages/watchmen-meta/src/watchmen_meta/console/report_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/console/report_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/console/report_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import List, Optional, Union
from watchmen_meta.common import AuditableShaper, LastVisitShaper, UserBasedTupleService, UserBasedTupleShaper
from watchmen_model.chart import Chart
from watchmen_model.common import ConnectedSpaceId, DataPage, GraphicRect, Pageable, ParameterJoin... | 36.993243 | 113 | 0.766393 |
5ec94c768f862eb6c0a2aaab55174b0754e470f1 | 631 | py | Python | ParsingAndScraping/kinopoisk/parce_this.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T13:06:11.000Z | 2021-06-23T13:06:11.000Z | ParsingAndScraping/kinopoisk/parce_this.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T21:21:52.000Z | 2021-06-23T21:21:52.000Z | ParsingAndScraping/kinopoisk/parce_this.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T19:14:19.000Z | 2021-06-28T19:14:19.000Z | from requests_html import HTMLSession
from bs4 import BeautifulSoup
from fake_useragent import UserAgent
def parse_this(parsing_url, headers_without_useragent, bs_find_name, bs_find_class):
url = parsing_url
headers = headers_without_useragent
headers['User-Agent'] = UserAgent().chrome
session = HT... | 28.681818 | 84 | 0.724247 |
5ecd4fc66f4af05f367d34ae772522e05633592a | 1,541 | py | Python | readwriteexample/com/aaron/readexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | readwriteexample/com/aaron/readexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | readwriteexample/com/aaron/readexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""write showcase"""
__author__ = "aaron.qiu"
import os
def read_file():
"""
r Open file for reading
w Open file for writing (will truncate file)
b binary more
r+ open file for reading and writing
a+ open file for reading and writing (appends to end)
... | 26.568966 | 75 | 0.606749 |
df43c273af04e773876e1619f1fe259c459cd5d6 | 2,275 | py | Python | simple-sklearn-demo/test13/trueConditionTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-07-05T03:42:17.000Z | 2019-07-05T03:42:17.000Z | simple-sklearn-demo/test13/trueConditionTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | null | null | null | simple-sklearn-demo/test13/trueConditionTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-06-24T05:56:55.000Z | 2019-06-24T05:56:55.000Z | """
预测结果 Predicted Condition
正确标记 True Condition
都为真, 称作真正例TP True Positive
都为假, 称作真反例TN True Negative
若预测为真, 但正确为假, 称作伪正例 FP False Positive
若预测为假, 但正确为真, 称作伪反例 TN True Negative
精确率 Precision
预测结果为正例的结果中, 真正例的比率, 即 TP / (TP + FP), 预测的准确率
召回率 Recall
真实结果为正例的结果中, 真正例的比率, 即 TP / (TP + FN), 预测的覆盖率
F1-score
F1 = (2 * 精确率... | 28.797468 | 105 | 0.612747 |
33c76cb31583a42dd6208c619b665b385a998854 | 2,136 | py | Python | src/bo4e/com/tagesvektor.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/com/tagesvektor.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/com/tagesvektor.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Tagesvektor class and corresponding marshmallow schema for de-/serialization
"""
import datetime
from typing import List
import attr
from marshmallow import fields
from bo4e.com.com import COM, COMSchema
from bo4e.com.zeitreihenwertkompakt import Zeitreihenwertkompakt, ZeitreihenwertkompaktSchema
# pyli... | 35.016393 | 177 | 0.733614 |
1d0fc0f6b9323cc3e56aac80b065f676d3225662 | 2,666 | py | Python | crypto/chainfunc/release/source.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | 6 | 2021-02-18T15:07:55.000Z | 2022-02-04T01:38:10.000Z | crypto/chainfunc/release/source.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | crypto/chainfunc/release/source.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | import random
import hashlib
def menu():
banner ='''
_/ _/
_/_/_/ _/_/_/ _/_/_/ _/_/_/
_/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/ _/
_/_/_//_// _/ _/_/_/ _/ _/ _/
_/ ... | 23.385965 | 88 | 0.34096 |
1d867ab3e8d1ccea9f246a5ee4181d1c37b30b63 | 865 | py | Python | BITs/2014/Kozlov_A_D/task_4_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_4_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_4_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 4. Вариант 11.
#Напишите программу, которая выводит имя, под которым скрывается Йоханнес Бруфельдт. Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти). Для хранения всех необхо... | 48.055556 | 439 | 0.775723 |
7f37ab15cab3ce6f07b4735aec15e97246f4d589 | 1,332 | py | Python | 2018/quals/re-android/solve.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/quals/re-android/solve.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/quals/re-android/solve.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 28.340426 | 80 | 0.668168 |
7f9b4402260f9bd03a7aef262bcefd4fbebdfcc6 | 508 | py | Python | angstrom/2019/misc/TI-1337/ti1337.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2019/misc/TI-1337/ti1337.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2019/misc/TI-1337/ti1337.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/env python3
del __builtins__.__import__
__builtins__.print("Welcome to the TI-1337! You can use any math operation and variables with a-z.")
_c = ""
_l = __builtins__.input("> ")
while _l != "":
# division -> floor division
_l = _l.replace("/", "//")
_c += _l+"\n"
_l = __builtins__.input("> "... | 31.75 | 100 | 0.663386 |
f6f34822dfa686205a973ddcdbea3c639761138e | 1,382 | py | Python | corus/sources/lenta.py | accplan/corus | bec51a7618ff446410bd235fb317cacbd1c19e70 | [
"MIT"
] | null | null | null | corus/sources/lenta.py | accplan/corus | bec51a7618ff446410bd235fb317cacbd1c19e70 | [
"MIT"
] | null | null | null | corus/sources/lenta.py | accplan/corus | bec51a7618ff446410bd235fb317cacbd1c19e70 | [
"MIT"
] | null | null | null |
from corus.record import Record
from corus.io import (
load_gz_lines,
load_bz2_lines,
parse_csv,
skip_header
)
class LentaRecord(Record):
"""
Class for Lenta.Ru Dataset v1.0
"""
__attributes__ = ['url', 'title', 'text', 'topic', 'tags']
def __init__(self, url, title, text, topic,... | 20.028986 | 70 | 0.613603 |
c3dc9a48430dbc337faa1ac4895b7563883584e2 | 2,384 | py | Python | test/test_npu/test_network_ops/test_adaptive_avg_pool3d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_adaptive_avg_pool3d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_adaptive_avg_pool3d_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 35.58209 | 89 | 0.669463 |
4ee21bdb6e8d8c10fb9cd579d02677ee027d7683 | 3,264 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/metrics/ava_metric.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 5 | 2022-01-30T07:35:58.000Z | 2022-02-08T05:45:20.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/metrics/ava_metric.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-14T02:33:28.000Z | 2022-01-14T02:33:28.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/metrics/ava_metric.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-24T16:27:01.000Z | 2022-01-24T16:27:01.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 34.357895 | 76 | 0.61489 |
1443291df69808b78146a74cff9823ddbee0ec72 | 18,999 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cs_network.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cs_network.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cs_network.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '... | 29.547434 | 101 | 0.624612 |
d365de841f1ce929964281f274c9fc5e93e987d3 | 2,125 | py | Python | simple-sklearn-demo/test8/titanicTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-07-05T03:42:17.000Z | 2019-07-05T03:42:17.000Z | simple-sklearn-demo/test8/titanicTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | null | null | null | simple-sklearn-demo/test8/titanicTest.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-06-24T05:56:55.000Z | 2019-06-24T05:56:55.000Z | """
思路:
目标是找出拟合模型, 找出拟合模型的前提是得到特征值(指标)和目标值(标签)
1. 获取数据后, 需要将数据处理成可拟合的形式, 包括:
1.1. 缺失值处理
1.2. 类别 -> 字典one-hot编码
2. 数据集划分成样本和测试集
3. 标准化
4. 模型评估
"""
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn.feature_extraction import DictVectorizer
from skle... | 33.730159 | 120 | 0.589176 |
1a9f63810f7637e820114f370074cb9d3d895e17 | 322 | py | Python | website/apps/gallery/admin.py | stahlnow/stahlnow | 265dd46c54f68173071d1c86218201d6e618ceeb | [
"MIT"
] | 1 | 2017-03-14T08:08:31.000Z | 2017-03-14T08:08:31.000Z | website/apps/gallery/admin.py | stahlnow/stahlnow | 265dd46c54f68173071d1c86218201d6e618ceeb | [
"MIT"
] | null | null | null | website/apps/gallery/admin.py | stahlnow/stahlnow | 265dd46c54f68173071d1c86218201d6e618ceeb | [
"MIT"
] | null | null | null | from django.contrib import admin
from gallery.models import Gallery, Image
class ImageAdmin(admin.ModelAdmin):
readonly_fields = ('image_tag',)
list_display = ('image', 'image_tag', 'gallery', 'created')
ordering = ('gallery', 'created')
admin.site.register(Image, ImageAdmin)
admin.site.register(Galler... | 24.769231 | 63 | 0.729814 |
2011ee42048ed15dd0d4a4c4e30df77e9ea0eb82 | 361 | py | Python | T1/09_mesh_subdivision/shapes/__init__.py | tetov/MAS-1920 | e5cfe4afbc7c0e80c6adfd139624d028c0ca4bfb | [
"MIT"
] | 3 | 2019-09-15T17:40:35.000Z | 2020-11-07T01:47:29.000Z | T1/09_mesh_subdivision/shapes/__init__.py | tetov/MAS-1920 | e5cfe4afbc7c0e80c6adfd139624d028c0ca4bfb | [
"MIT"
] | 1 | 2019-09-17T22:59:19.000Z | 2019-09-17T22:59:19.000Z | T1/09_mesh_subdivision/shapes/__init__.py | MAS-dfab/MAS-1920 | 93abb09b072b9a061496bc8a30bdce481a8735c5 | [
"MIT"
] | 8 | 2019-09-16T18:47:20.000Z | 2019-10-15T17:08:08.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .shape import Shape
from .box import Box
from .cylinder import Cylinder
from .cone import Cone
from .polyhedron import Polyhedron
from .sphere import Sphere
from .torus import Torus
__all__ = [name for na... | 25.785714 | 62 | 0.808864 |
b37f6528d9a309b8a9a0d7d915c14d1c8101c082 | 6,504 | py | Python | official/cv/Deepsort/src/deep/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/Deepsort/src/deep/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/Deepsort/src/deep/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 42.233766 | 115 | 0.729244 |
b3a4c94dcd971137a62d67a635d1112954cd978a | 244 | py | Python | lib/util/PathFinding/a_star_heuristics.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 5 | 2018-02-06T22:48:34.000Z | 2020-01-07T20:19:05.000Z | lib/util/PathFinding/a_star_heuristics.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 11 | 2018-01-31T21:47:49.000Z | 2018-04-21T16:42:52.000Z | lib/util/PathFinding/a_star_heuristics.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 2 | 2020-06-18T05:40:03.000Z | 2022-02-02T03:46:30.000Z | def manhattan_distance(c1,c2):
return abs(c1[0] - c2[0]) + abs(c1[1] - c2[1])
def euclidean_distance(c1,c2):
return ((c1[0]-c2[0])**2 + (c1[1]-c2[1])**2)**.5
def chebyshev_distance(c1,c2):
return max(abs(c1[0] - c2[1]), abs(c1[1] - c2[1])) | 30.5 | 51 | 0.602459 |
b3a8ee12607b1b283eec117edaab2b4912f741a5 | 557 | py | Python | exercises/pt/test_02_05_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_02_05_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/test_02_05_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert (
"from spacy.tokens import Doc" in __solution__
), "Você fez a importação da classe Doc corretamente?"
assert (
len(spaces) == 6
), "Parece que o número de espaços não coincide com o número de palavras..."
assert all(isinstance(s, bool) for s in spaces), "Os espaç... | 46.416667 | 99 | 0.644524 |
b3dfb93802e61f94f2b7eb0a67c9b41f9316dfda | 2,164 | py | Python | src/visitpy/examples/time_varying_annot.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/examples/time_varying_annot.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/examples/time_varying_annot.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | ###############################################################################
# Function: UpdateMaxAnnotation
#
# Purpose: Example of a utility method to be called from various callbacks to
# update a specifically named text annotation object, 'maxAnnot' with
# the result of a Query("Max")
#
# Pr... | 43.28 | 79 | 0.606285 |
806b877a848f7e3a1ef054afc53bb8f9462c0890 | 302 | py | Python | SHELL/2021/crypto/Subsi/script.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | SHELL/2021/crypto/Subsi/script.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | SHELL/2021/crypto/Subsi/script.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ{}_1234567890'
key = 'QWERTPOIUYASDFGLKJHZXCVMNB{}_1234567890'
text = <flag>
def encrypter(text,key):
encrypted_msg = ''
for i in text:
index = alpha.index(i)
encrypted_msg += key[index]
# print(encrypted_msg)
return encrypted_msg
| 23.230769 | 49 | 0.682119 |
b3283e96652d0dabb9acab659d991a45d57a18d3 | 5,732 | py | Python | src/bo4e/com/rechnungsposition.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/com/rechnungsposition.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/com/rechnungsposition.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Rechnungsposition class and corresponding marshmallow schema for de-/serialization
"""
from datetime import datetime
from typing import Optional
import attr
from marshmallow import fields
from marshmallow_enum import EnumField # type:ignore[import]
from bo4e.com.betrag import Betrag, BetragSchema
from b... | 45.133858 | 189 | 0.760991 |
b345f256fb9dab8595e6ac1da2343cba4408a35e | 423 | py | Python | python/en/_numpy/organize_this/test_numpy.hamming_example_01.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/organize_this/test_numpy.hamming_example_01.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/organize_this/test_numpy.hamming_example_01.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | """
test_numpy.hamming_example_01.py
This is an example code for numpy.hamming
https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html
"""
from numpy.fft import fft, fftshift
import numpy as np
import matplotlib.pyplot as plt
window = np.hamming(51)
plt.plot(window)
#[<matplotlib.lines.Line2D object a... | 23.5 | 71 | 0.775414 |
b350719a243eb992dded43c274d5e7b100160bf2 | 771 | py | Python | Interview Preparation Kits/1 Week Preparation Kit/Day 2/Lonely Integer/lonely_integer.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/1 Week Preparation Kit/Day 2/Lonely Integer/lonely_integer.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/1 Week Preparation Kit/Day 2/Lonely Integer/lonely_integer.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import math
import os
import random
import re
import sys
from collections import Counter
#
# Complete the 'lonelyinteger' function below.
#
# The function is expected to return an INTEGER.
# The function accepts INTEGER_ARRAY a as parameter.
#
def get_key(my_dict, val):
for key, value in... | 16.76087 | 52 | 0.639429 |
44567e69e34db44b636df2baa96eb60ea79f631d | 127 | py | Python | examples/react.py | MeleiDigitalMedia/ChemoLab | b27421a836d76de88b23845f6c808d4429925702 | [
"MIT"
] | null | null | null | examples/react.py | MeleiDigitalMedia/ChemoLab | b27421a836d76de88b23845f6c808d4429925702 | [
"MIT"
] | null | null | null | examples/react.py | MeleiDigitalMedia/ChemoLab | b27421a836d76de88b23845f6c808d4429925702 | [
"MIT"
] | null | null | null | import chemolab as cl
e1 = cl.Element(cl.element_data.CARBON)
e2 = cl.Element(cl.element_data.OXYGEN)
cl.IonicBond(e1, e2) | 25.4 | 40 | 0.748031 |
a65a84d0b194cb2e47b7186b6b01e83e0a42a367 | 1,840 | py | Python | projects/g4h1-wsn/src/wsn/message.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h1-wsn/src/wsn/message.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g4h1-wsn/src/wsn/message.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | from typing import List
from uuid import uuid4, UUID
class BaseMessage(object):
"""基础消息(所有其它消息的基类)
最简单的消息,除了 data 没有其它任何属性
"""
data: str
def __init__(self, data: str = ''):
"""
:param data: 消息内容
"""
self.data = data
def copy(self):
ret... | 25.205479 | 97 | 0.567935 |
a6896da9098628072e6ff94530bbd201a0d88262 | 3,479 | py | Python | bildungslogin-plugin/bildungslogin_plugin/models.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | bildungslogin-plugin/bildungslogin_plugin/models.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | bildungslogin-plugin/bildungslogin_plugin/models.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import annotations
from enum import Enum
from pydantic import BaseModel, Field, conlist, constr, validator
from typing import Dict, List, Optional
NonEmptyMaxLenStr = constr(min_length=1, max_length=255)
class AssignmentStatus(str, Enum):
# keep this in sync with python-b... | 40.929412 | 100 | 0.680368 |
5b3eb73c0e183680b22da250eec4abbfb91b621e | 798 | py | Python | c8ydata/checkkeys.py | goflo/c8y-ng1-modules-patch | 8e500ffee8ee2de35752efd47afb083404125665 | [
"Apache-2.0"
] | null | null | null | c8ydata/checkkeys.py | goflo/c8y-ng1-modules-patch | 8e500ffee8ee2de35752efd47afb083404125665 | [
"Apache-2.0"
] | null | null | null | c8ydata/checkkeys.py | goflo/c8y-ng1-modules-patch | 8e500ffee8ee2de35752efd47afb083404125665 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import os
import json
checkedLocale = "de"
dictionary = {}
for root, dirs, files in os.walk("locales"):
for file in files:
if file.endswith(".json"):
file = os.path.join(root, file)
with open(file) as jsonf:
translations = json.load(jsonf)[checkedL... | 36.272727 | 96 | 0.506266 |
5b8f81bfcdec5e7178c6c7d92cd41f3e5e3c2b5f | 6,890 | py | Python | src/config_db/ska_sdp_config/cli.py | rtobar/sdp-prototype | 9f1527b884bf80daa509a7fe3722160c77260f4f | [
"BSD-3-Clause"
] | 2 | 2019-07-15T09:49:34.000Z | 2019-10-14T16:04:17.000Z | src/config_db/ska_sdp_config/cli.py | rtobar/sdp-prototype | 9f1527b884bf80daa509a7fe3722160c77260f4f | [
"BSD-3-Clause"
] | 17 | 2019-07-15T14:51:50.000Z | 2021-06-02T00:29:43.000Z | src/config_db/ska_sdp_config/cli.py | ska-telescope/sdp-configuration-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 1 | 2019-10-10T08:16:48.000Z | 2019-10-10T08:16:48.000Z | """
Command line utility for accessing SKA SDP configuration.
Usage:
sdpcfg [options] (get|watch) <path>
sdpcfg [options] [watch] (ls|list) [values] [-R] <path>
sdpcfg [options] delete [-R] <path>
sdpcfg [options] (create|update) <path> <value>
sdpcfg [options] edit <path>
sdpcfg [options] process <workflo... | 29.570815 | 79 | 0.577068 |
5bec461d8b2e70574a7e61aeea2db0eb1133e694 | 7,877 | py | Python | Packs/CommonScripts/Scripts/ListUsedDockerImages/ListUsedDockerImages_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/ListUsedDockerImages/ListUsedDockerImages_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/ListUsedDockerImages/ListUsedDockerImages_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | """ListUsedDockersImages for Cortex XSOAR - Unit Tests file
Pytest Unit Tests: all functions names must start with "test_"
More details: https://xsoar.pan.dev/docs/integrations/unit-testing
"""
INTEGRATION = '''
{
"configurations":[
{
"brand": "",
"id": "no-integration-script-con... | 28.748175 | 112 | 0.448902 |
cae4148f39c71d0d402d5015dd455fe82dd8d83e | 1,951 | py | Python | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section3ConditionalsLoopsFunctionsAndABitMore/23DataValidation.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | 1 | 2022-02-02T21:56:08.000Z | 2022-02-02T21:56:08.000Z | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section3ConditionalsLoopsFunctionsAndABitMore/23DataValidation.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | 27 | 2020-06-27T23:25:59.000Z | 2022-02-27T20:40:56.000Z | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section3ConditionalsLoopsFunctionsAndABitMore/23DataValidation.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | null | null | null | # Followed along with the video.
data_valid = False
while data_valid == False:
grade1 = float ( input("Type the grade of the first test.\nThe grade must be between 0 and 10: ") )
if grade1 < 0 or grade1 > 10:
print("** Please make sure the grade is between 0 and 10. **")
continue
else:
... | 37.519231 | 173 | 0.659149 |
1b354a451bc42efaeabec0b8acc375c92d57b900 | 149 | py | Python | refex/__init__.py | d-e-h-i-o/legal-reference-extraction | a9f7793124818d5710315f75e52b077a232acccf | [
"MIT"
] | 19 | 2018-11-28T07:21:13.000Z | 2022-01-22T07:24:56.000Z | refex/__init__.py | d-e-h-i-o/legal-reference-extraction | a9f7793124818d5710315f75e52b077a232acccf | [
"MIT"
] | 4 | 2019-03-15T13:29:30.000Z | 2021-03-02T20:40:35.000Z | refex/__init__.py | d-e-h-i-o/legal-reference-extraction | a9f7793124818d5710315f75e52b077a232acccf | [
"MIT"
] | 12 | 2019-05-18T18:44:39.000Z | 2022-02-02T13:23:34.000Z | __version__ = '0.2.0'
# Available placeholders: uuid (attributes of RefMarker)
MARKER_OPEN_FORMAT = '[ref=%(uuid)s]'
MARKER_CLOSE_FORMAT = '[/ref]'
| 24.833333 | 56 | 0.724832 |
1b8a9a4af35607f42a549af4f1ca3f62ceffc6ad | 50,930 | py | Python | Packs/Safewalk/Integrations/SafewalkManagement/SafewalkManagement.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Safewalk/Integrations/SafewalkManagement/SafewalkManagement.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Safewalk/Integrations/SafewalkManagement/SafewalkManagement.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import urllib3
from CommonServerPython import *
urllib3.disable_warnings()
class Client(BaseClient):
def get_transactionlog(self, page, search, locked) -> Dict[str, Any]:
if page is None:
page = 1
p_search = ""
if search is not None and search != '':
... | 31.168911 | 111 | 0.657923 |
1b8c825d09c464bba7b4da39009816fc09c9be12 | 1,911 | py | Python | bot/webapp/app.py | devtools4me/ticker-analyzer | 7073e6255ff491edd45e3ccc63d5113f16098862 | [
"Apache-2.0"
] | null | null | null | bot/webapp/app.py | devtools4me/ticker-analyzer | 7073e6255ff491edd45e3ccc63d5113f16098862 | [
"Apache-2.0"
] | null | null | null | bot/webapp/app.py | devtools4me/ticker-analyzer | 7073e6255ff491edd45e3ccc63d5113f16098862 | [
"Apache-2.0"
] | null | null | null | import re
from flask import Flask, request
import telegram
from credentials import bot_token, bot_user_name, URL
import yfinance as yf
global bot
global TOKEN
TOKEN = bot_token
bot = telegram.Bot(token=TOKEN)
app = Flask(__name__)
@app.route('/{}'.format(TOKEN), methods=['GET', 'POST'])
def respond():
update = ... | 31.327869 | 233 | 0.643119 |
846b972ffe2672b44065176fef1cc9c6de5b9a5e | 76 | py | Python | EasyCleg/__init__.py | bitsofishan/EasyCleg | ace2d5e7f47a58300fe8391553081e1b17fc807c | [
"MIT"
] | null | null | null | EasyCleg/__init__.py | bitsofishan/EasyCleg | ace2d5e7f47a58300fe8391553081e1b17fc807c | [
"MIT"
] | null | null | null | EasyCleg/__init__.py | bitsofishan/EasyCleg | ace2d5e7f47a58300fe8391553081e1b17fc807c | [
"MIT"
] | null | null | null | from EasyCleg.regres import regres
from EasyCleg.classify import classify
| 25.333333 | 39 | 0.842105 |
ca3893d4297bc86595e403d126c2850b81cc4de6 | 2,908 | py | Python | Algorithms/Sort_Algorithms/Tree_Sort/TreeSort.py | hussamEL-Hwary/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 18 | 2016-11-01T04:00:36.000Z | 2021-09-13T14:26:35.000Z | Algorithms/Sort_Algorithms/Tree_Sort/TreeSort.py | JEERU/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 60 | 2016-10-11T14:50:47.000Z | 2016-10-31T11:05:01.000Z | Algorithms/Sort_Algorithms/Tree_Sort/TreeSort.py | JEERU/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 87 | 2016-09-08T05:04:50.000Z | 2016-10-30T19:19:53.000Z | class Node:
def __init__(self,info): #constructor of class
self.info = info #information for node
self.left = None #left leef
self.right = None #right leef
self.level = None #level none defined
def __str__(self):
return str(self.info) #return as string... | 23.451613 | 61 | 0.469051 |
b6189d26f08b2fe7854b669971fda4a1d53eb98b | 3,317 | py | Python | hisim/components/price_signal.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | hisim/components/price_signal.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | hisim/components/price_signal.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | 1 | 2022-03-13T16:15:36.000Z | 2022-03-13T16:15:36.000Z | # Owned
from hisim import component as cp
from hisim.simulationparameters import SimulationParameters
from hisim import loadtypes as lt
__authors__ = "Johanna Ganglbauer"
__copyright__ = "Copyright 2021, the House Infrastructure Project"
__credits__ = ["Noah Pflugradt"]
__license__ = "MIT"
__version__ = "0.1"
__maint... | 38.126437 | 111 | 0.618028 |
1ed3e446ed20ad141f21afaf5b89d0724b19e033 | 2,387 | py | Python | core/tests/test_models.py | Taythaytu0905/Django_Advance | e63e34787d3c3a648c2f434a8c99d81e347b7b6a | [
"MIT"
] | null | null | null | core/tests/test_models.py | Taythaytu0905/Django_Advance | e63e34787d3c3a648c2f434a8c99d81e347b7b6a | [
"MIT"
] | null | null | null | core/tests/test_models.py | Taythaytu0905/Django_Advance | e63e34787d3c3a648c2f434a8c99d81e347b7b6a | [
"MIT"
] | null | null | null | from unittest.mock import patch
from django.contrib.auth import get_user_model
from django.test import TestCase
from core import models
User = get_user_model()
def sample_user(email='do@gmail.com', password='testcase'):
return get_user_model().objects.create_user(email, password)
class ModelTest(TestCase):
... | 32.256757 | 76 | 0.652702 |
94d302c827ce4aff3e1a2b9038b8c9d3d8983c79 | 39 | py | Python | scripts/hello_world_new.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_new.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_new.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # This is Python!
print "Hello World"
| 9.75 | 19 | 0.692308 |
44d3cad5283dd3a19ac44c76c8403a79d180285b | 11,627 | py | Python | python_playground/data/localPush.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_playground/data/localPush.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_playground/data/localPush.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | # local push algorithm for single-pair
from MC_simrank import *
DIRECTORY = "./datasets/experiments/"
DIR = DIRECTORY + "push_residuals/"
# @profile
def synchron_local_push_max_r(g, pair, error=0.001, c=0.6, is_async=False, max_iter=30000, \
residual_recorder=None):
'''
the maxi... | 36.334375 | 129 | 0.530145 |
78785178c14d0f4e00bda9226991d3cceb747ef0 | 1,983 | py | Python | src/datasets/washington.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 2 | 2018-04-27T09:02:15.000Z | 2019-04-19T19:12:13.000Z | src/datasets/washington.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 1 | 2019-04-19T19:13:08.000Z | 2021-02-22T21:29:55.000Z | src/datasets/washington.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | null | null | null | import torch
import torch.utils.data
import torchvision
from glob import glob
import json
import os
from pathlib import Path, PurePath
import random
from PIL import Image
from zipfile import ZipFile
import torchvision.transforms as transforms
import numpy as np
class Washington(torch.utils.data.Dataset):
name = ... | 30.045455 | 110 | 0.617247 |
78d0f7ef484d310200d066b63441f497e241feb1 | 12,209 | py | Python | packages/watchmen-storage-mssql/src/watchmen_storage_mssql/where_build.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-mssql/src/watchmen_storage_mssql/where_build.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-mssql/src/watchmen_storage_mssql/where_build.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import date, datetime, time
from decimal import Decimal
from typing import Any, Callable, List, Tuple
from sqlalchemy import and_, case, func, literal, literal_column, or_, Table, text
from watchmen_storage import as_table_name, ask_decimal_fraction_digits, ask_decimal_integral_digits, \
ColumnNameLite... | 45.55597 | 113 | 0.757884 |
ecb9c1d54bfcfac0d181a4ff3b9039b4345bca2b | 344 | py | Python | BITs/2014/Borsheva_ V_O/task_2_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Borsheva_ V_O/task_2_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Borsheva_ V_O/task_2_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #задача 2,вариант6.
#Программа, выводящая любимое высказывание,автором которого является Иисус Христос
#Борщёва В.О
#02.03.2016
print("Не убивай; не прелюбодействуй; не кради; не лжесвидетельствуй; почитай отца и мать; и: люби ближнего твоего, как самого себя.")
print("\t\t\t\t Христос")
input("нажм... | 34.4 | 135 | 0.726744 |
174165b001fcdfdf30825b394e99fe6852615712 | 37 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/common/exception.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/common/exception.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/common/exception.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | class DqcException(Exception):
pass
| 12.333333 | 30 | 0.810811 |
bd7fdbd3b8a43cad4d770316158b4e5f8c96257c | 168 | py | Python | Exercicios/ex09-3b.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/ex09-3b.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/ex09-3b.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | #calculo da area do quadrado
lado = float(input('Insira comprimento do lado do quadrado: '))
area = lado**2
msg = 'A area do quadrado é {}'
print(msg.format(area))
| 16.8 | 63 | 0.690476 |
da4de9567d4a63437b561b1a2544301949cb190d | 1,064 | py | Python | leetcode/302-Smallest-Rectangle-Enclosing-Black-Pixels/MinRectEnclosingBlackPixels.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/302-Smallest-Rectangle-Enclosing-Black-Pixels/MinRectEnclosingBlackPixels.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/302-Smallest-Rectangle-Enclosing-Black-Pixels/MinRectEnclosingBlackPixels.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def minArea(self, image, x, y):
"""
:type image: List[List[str]]
:type x: int
:type y: int
:rtype: int
"""
m, n = len(image), len(image[0])
visited = [[False for j in range(n)] for i in range(m)]
region = [y, x, y, x]
... | 28.756757 | 79 | 0.43515 |
009e8c768aea7889a04dd04c2c185d4ac4fe82bb | 6,152 | py | Python | src/onegov/feriennet/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity import Activity, ActivityCollection, Booking, Occasion
from onegov.core.security import Public, Private, Personal
from onegov.core.security.rules import has_permission_logged_in
from onegov.feriennet import FeriennetApp
from onegov.feriennet.collections import NotificationTemplateCollection
from on... | 34.954545 | 79 | 0.758127 |
97c652cbf2961ac9ed212670ec2824deaa022280 | 2,745 | py | Python | test/test_tag21.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | test/test_tag21.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | test/test_tag21.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | from unittest import TestCase
from unittest.mock import MagicMock
from os.path import exists, pardir, join, abspath, dirname
from os import environ
PROJEKT_ORDNER = abspath(join(dirname(__file__), pardir))
VENV_ORDNER = join(PROJEKT_ORDNER, "venv")
try:
from pyventskalender import tag21_loesung as heute
clas... | 42.230769 | 130 | 0.671038 |
c13f8be6e311149f8fe5437c6010fdfb92603eae | 3,865 | py | Python | etl/transforms/primitives/df/pandas_utils.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | etl/transforms/primitives/df/pandas_utils.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | etl/transforms/primitives/df/pandas_utils.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | import pandas as pd
import numpy as np
# Expand a list within a column to a single item in the list per row
# (duplicate all other items in the row)
def unlistify_pandas_column(df, column):
col_idx = check_column_name(df, column)
# Helper function to expand and repeat the column col_idx
def expand_and_rep... | 33.608696 | 90 | 0.582406 |
99d3300356386a431b6605167e754e0bc3f7adcc | 1,812 | py | Python | plugins/tff_backend/api/installations.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/api/installations.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/api/installations.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 GIG Technology NV
#
# 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... | 42.139535 | 111 | 0.799117 |
82220d1ad1e67046a95ebd5082f7eb0b879392b2 | 22,651 | py | Python | python/en/archive/dropbox/miscellaneous_python_files/functions4nlp-list_input.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/functions4nlp-list_input.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/functions4nlp-list_input.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import logging
import math
import numpy as np
import pandas as pd
import regex
from collections import Counter
from tensorflow.keras.preprocessing.text import Tokenizer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.feature_ex... | 46.799587 | 151 | 0.573396 |
ec03dbc71bc50f5af4a27c951b767ffb5150db48 | 5,868 | py | Python | NucleusDataset_mod.py | ramesh152/SegmentationExperiment | b52dbc57759c086155e79c6621e6d25a4db0e974 | [
"Apache-2.0"
] | 2 | 2019-06-12T13:53:00.000Z | 2020-04-29T13:11:12.000Z | NucleusDataset_mod.py | ramesh152/SegmentationExperiment | b52dbc57759c086155e79c6621e6d25a4db0e974 | [
"Apache-2.0"
] | 1 | 2019-12-10T12:23:06.000Z | 2019-12-10T12:23:06.000Z | NucleusDataset_mod.py | ramesh152/SegmentationExperiment | b52dbc57759c086155e79c6621e6d25a4db0e974 | [
"Apache-2.0"
] | 1 | 2020-08-05T18:12:24.000Z | 2020-08-05T18:12:24.000Z | from torch.utils.data import Dataset
from torch.utils.data import DataLoader
import os
import torch
import torch.nn.functional as F
import torch.optim as optim
from torchvision import transforms
import torch.nn as nn
import numpy as np
import cv2
import os.path as osp
from glob import glob
from tqdm import tqdm
c... | 36.90566 | 120 | 0.57771 |
2e27945da34d33ef01a8a325b1d3bdf735b32fee | 4,915 | py | Python | tests/shared/capturelog.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/shared/capturelog.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/shared/capturelog.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | # borrowed from https://bitbucket.org/memedough/pytest-capturelog/
# adjusted to our needs (namely, we don't want the log displayed
# when the test fails)
import logging
import py
import pytest
class CaptureLogPlugin(object):
"""Attaches to the logging module and captures log messages for each test.
"""
... | 29.608434 | 78 | 0.652492 |
2e5e385754066e473b97d98250868bbc81c3752f | 224 | py | Python | exercises/pt/exc_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | # Importe a biblioteca spaCy
import ____
# Crie um objeto nlp do Alemão
nlp = ____
# Processe o texto (equivalente ao português: "Atenciosamente")
doc = nlp("Liebe Grüße!")
# Imprima o texto do documento
print(____.text)
| 18.666667 | 63 | 0.741071 |
cf05a2a05f242e338dae577743e5b585c12b03c6 | 4,897 | py | Python | project/api/event_list/resources.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/api/event_list/resources.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/api/event_list/resources.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask import make_response
from flask_apispec import doc, marshal_with, use_kwargs
from project import db
from project.access import access_or_401, login_api_user_or_401
from project.api import add_api_resource
from project.api.event.schemas import EventListRequestSchema, EventListResponseSchema
from project.api.... | 30.993671 | 85 | 0.669185 |
cf19c9a9d26dfe5db29d7f93558a4f82bd50e65f | 7,568 | py | Python | MachineTranslation/src_bak/seq2seq/v1(Session execution)/lib/bleu_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | 2 | 2021-08-25T01:13:29.000Z | 2021-10-10T14:49:59.000Z | MachineTranslation/src_bak/seq2seq/v2(Eager execution)/lib/bleu_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | MachineTranslation/src_bak/seq2seq/v2(Eager execution)/lib/bleu_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
from collections import *
import numpy as np
from nltk.translate.bleu_score import sentence_bleu, corpus_bleu
class BleuScore:
"""
评价指标 Bleu
Author: xrh
Date: 2019-12-20
ref:
1.BLEU: a Method for Automatic Evaluation of Machine Translation
2.h... | 30.516129 | 153 | 0.547569 |
cf1ebdff956eac81309d7275e0b3ee3bab2f2729 | 874 | py | Python | src/onegov/file/models/file_message.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/file/models/file_message.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/file/models/file_message.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.chat import Message
from sqlalchemy.orm import object_session
class FileMessage(Message):
__mapper_args__ = {
'polymorphic_identity': 'file'
}
@classmethod
def log_signature(cls, file, signee):
cls.bound_messages(object_session(file)).add(
channel_id=file.id,
... | 26.484848 | 58 | 0.544622 |
d88a469a4fb57ba63bde539da2065ff63c6045d1 | 959 | py | Python | Python/plotClAlpha.py | guillaumetousignant/euler3D | 7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae | [
"MIT"
] | 1 | 2019-02-11T00:45:37.000Z | 2019-02-11T00:45:37.000Z | Python/plotClAlpha.py | guillaumetousignant/euler3D | 7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae | [
"MIT"
] | null | null | null | Python/plotClAlpha.py | guillaumetousignant/euler3D | 7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae | [
"MIT"
] | null | null | null | import os
import numpy as np
import math
import string
import matplotlib
import matplotlib.pyplot as plt
class plotClAlpha(object):
#Plot Cl vs Alpha graph
def __init__(self, npAngleOfAttack, npAerodynamicCl):
print("plotClAlpha.....................................................");
... | 36.884615 | 83 | 0.517205 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.