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 sequence | 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 sequence | 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 sequence | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8a78745915eb3a4aaf90865a024b4d8bafd46ca7 | 5,151 | py | Python | research/gnn/sgcn/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/gnn/sgcn/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/gnn/sgcn/postprocess.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 a... | 48.140187 | 117 | 0.644729 |
0a10152195fb9a20741a86fb44035860fed300f4 | 12,017 | py | Python | Packs/Pwned/Integrations/PwnedV2/PwnedV2.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Pwned/Integrations/PwnedV2/PwnedV2.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Pwned/Integrations/PwnedV2/PwnedV2.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
''' IMPORTS '''
import re
import requests
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' GLOBALS/PARAMS '''
VENDOR = 'Have I Been Pwned? V2'
MAX_RETRY_ALLOWED = demisto.params().get('max_retry_time', -1)
API_KEY = demisto.params().get('api_key')
USE_SS... | 34.042493 | 120 | 0.659732 |
0a8fdb2b5cc10e441111eda628478417245011ef | 5,283 | py | Python | official/cv/c3d/src/c3d_model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/c3d/src/c3d_model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/c3d/src/c3d_model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.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... | 40.638462 | 100 | 0.570509 |
7c2f595fee4e21dc84c6666b03b2174e6d5731e0 | 8,108 | py | Python | tensorforce/tests/test_model_save_restore.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | tensorforce/tests/test_model_save_restore.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | tensorforce/tests/test_model_save_restore.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | 1 | 2019-11-29T12:28:33.000Z | 2019-11-29T12:28:33.000Z | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import unittest
import pytest
from tensorforce import TensorForceError
from tensorforce.core.networks import LayeredNetwork
from tensorforce.models import DistributionModel
from tensorforce.tests.minimal_test ... | 39.940887 | 119 | 0.662309 |
7c2f74f5570ad8ece2d2a501cd63b62951484c2c | 844 | py | Python | guid.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 1 | 2015-08-02T09:53:18.000Z | 2015-08-02T09:53:18.000Z | guid.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | null | null | null | guid.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 2 | 2018-03-21T04:59:50.000Z | 2019-12-03T15:54:17.000Z | import random
import messages_pb2 as msg
def assign(x, y):
x.a=y.a; x.b=y.b; x.c=y.c; x.d=y.d
def isZero(x):
return (x.a==0 and x.b==0 and x.c==0 and x.d==0)
def setZero(x):
x.a=0; x.b=0; x.c=0; x.d=0
def toStr(x):
return "%08x-%08x-%08x-%08x" % (x.a, x.b, x.c, x.d)
def toTuple(x):
return (x.a,... | 19.181818 | 55 | 0.562796 |
861c79331c252b7937573a42f8e033c57c978cd9 | 6,138 | py | Python | oneflow/python/test/ops/test_l1loss.py | wanghongsheng01/framework_enflame | debf613e05e3f5ea8084c3e79b60d0dd9e349526 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/test/ops/test_l1loss.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-06-16T08:37:50.000Z | 2021-06-16T08:37:50.000Z | oneflow/python/test/ops/test_l1loss.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.000Z | """
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... | 33.540984 | 99 | 0.665689 |
865144cd196eb39a73555fc643c117d083a615cc | 744 | py | Python | Buta Nicolae/threads.py | RazvanBalau/parallel-2020 | bd9c0dea6cc70e167320f64632d7a235522dfdb3 | [
"MIT"
] | null | null | null | Buta Nicolae/threads.py | RazvanBalau/parallel-2020 | bd9c0dea6cc70e167320f64632d7a235522dfdb3 | [
"MIT"
] | null | null | null | Buta Nicolae/threads.py | RazvanBalau/parallel-2020 | bd9c0dea6cc70e167320f64632d7a235522dfdb3 | [
"MIT"
] | 23 | 2020-01-15T15:02:39.000Z | 2020-01-15T17:23:03.000Z | import threading
from multiprocessing import Queue
results = []
results2 = []
def take_numbers(q):
print('Enter the numbers:')
for i in range(0,3):
num1 = int(input('Enter first number: '))
num2 = int(input('Enter second number: '))
q.put(num1)
q.put(num2)
def add_num(q):
... | 20.666667 | 54 | 0.606183 |
d4c7b73306f8c0594f64a791f8292624d0ac8d82 | 11,237 | py | Python | Tests/Marketplace/prepare_public_index_for_private_testing.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Tests/Marketplace/prepare_public_index_for_private_testing.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Tests/Marketplace/prepare_public_index_for_private_testing.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import time
import os
import sys
import shutil
import json
import argparse
from zipfile import ZipFile
from contextlib import contextmanager
from datetime import datetime
from Tests.private_build.upload_packs_private import download_and_extract_index, update_index_with_priced_packs, \
extract_packs_artifacts
from T... | 48.021368 | 129 | 0.707128 |
be04c82cd5f62929d01752841a8ec17a1254d468 | 291 | py | Python | exercises/pt/exc_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/exc_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/exc_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | # Importar a classe da língua inglesa (English) e criar um objeto nlp
from ____ import ____
nlp = ____
# Processar o texto
doc = ____("I like tree kangaroos and narwhals.")
# Selecionar o primeiro token
first_token = doc[____]
# Imprimir o texto do primeito token
print(first_token.____)
| 22.384615 | 69 | 0.75945 |
0775eae440b3ed8a8de73f26dfbbc57343a6323d | 6,670 | py | Python | text_selection/analyse_zenon_scrape.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | text_selection/analyse_zenon_scrape.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | text_selection/analyse_zenon_scrape.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import csv
import furl
import json
import re
import sys
from collections import defaultdict
def filter_records_without_url(records: []) -> []:
return [r for r in records if any(r.get("urls"))]
def build_furl(url: str) -> furl.furl:
try:
... | 40.670732 | 192 | 0.669715 |
07a919ed87f13258649cbf2c9c6e2971a4de419e | 5,568 | py | Python | AI_Engine_Development/Feature_Tutorials/07-AI-Engine-Floating-Point/Utils/GenerationLib.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | 1 | 2022-03-09T06:15:43.000Z | 2022-03-09T06:15:43.000Z | AI_Engine_Development/Feature_Tutorials/07-AI-Engine-Floating-Point/Utils/GenerationLib.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | null | null | null | AI_Engine_Development/Feature_Tutorials/07-AI-Engine-Floating-Point/Utils/GenerationLib.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2020–2021 Xilinx, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 33.341317 | 119 | 0.541667 |
9c5ca9cec48517b47b0e018883a0875e922d1924 | 4,921 | py | Python | 2018/finals/pwn-gdb-as-a-service/web_challenge/challenge/gaas.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/finals/pwn-gdb-as-a-service/web_challenge/challenge/gaas.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/finals/pwn-gdb-as-a-service/web_challenge/challenge/gaas.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/env python3
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 27.960227 | 104 | 0.710018 |
b930187de467bdc99d38231d4b217f6589a62613 | 2,039 | py | Python | starteMessung.py | jkerpe/TroubleBubble | 813ad797398b9f338f136bcb96c6c92186d92ebf | [
"MIT"
] | null | null | null | starteMessung.py | jkerpe/TroubleBubble | 813ad797398b9f338f136bcb96c6c92186d92ebf | [
"MIT"
] | null | null | null | starteMessung.py | jkerpe/TroubleBubble | 813ad797398b9f338f136bcb96c6c92186d92ebf | [
"MIT"
] | 1 | 2021-08-09T14:57:57.000Z | 2021-08-09T14:57:57.000Z | from datetime import datetime
from pypylon import pylon
import nimmAuf
import smbus2
import os
import argparse
import bestimmeVolumen
from threading import Thread
import time
programmstart = time.time()
# Argumente parsen (bei Aufruf im Terminal z.B. 'starteMessung.py -n 100' eingeben)
ap = argparse.ArgumentParser(de... | 34.559322 | 169 | 0.703776 |
b978fbbcd4002601ca1e2723cae4385002e671d8 | 2,063 | py | Python | src/onegov/translator_directory/models/language.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/models/language.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/models/language.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from uuid import uuid4
from sqlalchemy import Index, Column, Text, Table, ForeignKey
from sqlalchemy.orm import object_session
from onegov.core.orm import Base
from onegov.core.orm.types import UUID
spoken_association_table = Table(
'spoken_lang_association',
Base.metadata,
Column(
'translator_i... | 25.469136 | 79 | 0.650994 |
b9b2dd8fc97fddaaa64ec64957043ee8e8088e39 | 615 | py | Python | frappe-bench/apps/erpnext/erpnext/non_profit/doctype/member/member.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/non_profit/doctype/member/member.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/non_profit/doctype/member/member.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
from frappe.contacts.address_and_contact import load_address_and_contact
class Member(Docum... | 29.285714 | 72 | 0.786992 |
0ec1afd2facbda8f3febe8ca1dc7c71fb6558f04 | 1,993 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/meta/external_writer_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/meta/external_writer_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/meta/external_writer_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Optional
from watchmen_auth import PrincipalService
from watchmen_data_kernel.cache import CacheService
from watchmen_data_kernel.common import DataKernelException
from watchmen_data_kernel.external_writer import find_external_writer_create, register_external_writer_creator
from watchmen_meta.common... | 41.520833 | 110 | 0.831912 |
16abab9c314c051765ffd991fb6c764e6cf24cb5 | 235 | py | Python | solutions/pic_search/webserver/src/service/theardpool.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/service/theardpool.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/pic_search/webserver/src/service/theardpool.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2020-04-03T05:24:47.000Z | 2020-04-03T05:24:47.000Z | import threading
from concurrent.futures import ThreadPoolExecutor
from service.train import do_train
def thread_runner(thread_num, func, *args):
executor = ThreadPoolExecutor(thread_num)
f = executor.submit(do_train, *args)
| 26.111111 | 49 | 0.795745 |
4c0f174360fe29201e22d16e102aa2c61bad20f2 | 262 | py | Python | production/pygsl-0.9.5/testing/__init__.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | production/pygsl-0.9.5/testing/__init__.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/testing/__init__.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | """
Here you find either new implemented modules or alternate implementations
of already modules. This directory is intended to have a second implementation
beside the main implementation to have a discussion which implementation to
favor on the long run.
"""
| 37.428571 | 78 | 0.80916 |
5de70a07393091d4b0d1b81bb83f4335c31b6482 | 3,329 | py | Python | Plot/src/test/java/io/deephaven/db/plot/example_plots/PlottingPQ.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | Plot/src/test/java/io/deephaven/db/plot/example_plots/PlottingPQ.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 1 | 2022-03-03T21:24:40.000Z | 2022-03-03T21:24:54.000Z | Plot/src/test/java/io/deephaven/db/plot/example_plots/PlottingPQ.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | import deephaven.TableTools as tt
import deephaven.Plot as plt
t = tt.emptyTable(50)\
.update("X = i + 5", "XLow = X -1", "XHigh = X + 1", "Y = Math.random() * 5", "YLow = Y - 1", "YHigh = Y + 1", "USym = i % 2 == 0 ? `AAPL` : `MSFT`")
p = plt.plot("S1", t, "X", "Y").lineColor("black").show()
p2 = plt.plot("S1"... | 37.829545 | 153 | 0.578252 |
5df79191a02e9cdc36eab83fa9b24e2f2d9fe213 | 7,695 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/apache_libcloud-0.15.1-py2.7.egg/libcloud/test/test_connection.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | libcloud/test/test_connection.py | elastacloud/libcloud | f3792b2dca835c548bdbce0da2eb71bfc9463b72 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | libcloud/test/test_connection.py | elastacloud/libcloud | f3792b2dca835c548bdbce0da2eb71bfc9463b72 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more§
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Li... | 36.995192 | 94 | 0.624172 |
f8d46f993d25bd7f9f34660f23bf18928f5a3963 | 5,672 | py | Python | module/classification_package/src/utils.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2022-01-03T14:00:17.000Z | 2022-01-03T14:00:17.000Z | module/classification_package/src/utils.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | null | null | null | module/classification_package/src/utils.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2021-12-21T09:50:53.000Z | 2021-12-21T09:50:53.000Z | import numpy as np
import logging
import numbers
import torch
import math
import json
import sys
from torch.optim.lr_scheduler import LambdaLR
from torchvision.transforms.functional import pad
class AverageMeter(object):
"""Computes and stores the average and current value"""
def __init__(self):
sel... | 33.761905 | 117 | 0.653738 |
5d1d5be9e9e0382909fb3777ed89becc272c0e93 | 767 | py | Python | Kapitel_1/_1_public_private.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_1/_1_public_private.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_1/_1_public_private.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | # --- Klassendeklaration mit Konstruktor --- #
class PC:
def __init__(self, cpu, gpu, ram):
self.cpu = cpu
self.gpu = gpu
self.__ram = ram
# --- Instanziierung einer Klasse ---#
# --- Ich bevorzuge die Initialisierung mit den Keywords --- #
pc_instanz = PC(cpu='Ryzen 7', gpu='RTX2070Super'... | 29.5 | 89 | 0.684485 |
5d66ef032fbd2dcf091b5ffde482a5d596613146 | 1,940 | py | Python | bin/write2cly.py | docdiesel/smartmetertools | 3b7449c7a9069696af078631aa5440f53d0f57bc | [
"MIT"
] | 1 | 2019-05-30T08:28:31.000Z | 2019-05-30T08:28:31.000Z | bin/write2cly.py | docdiesel/smartmetertools | 3b7449c7a9069696af078631aa5440f53d0f57bc | [
"MIT"
] | null | null | null | bin/write2cly.py | docdiesel/smartmetertools | 3b7449c7a9069696af078631aa5440f53d0f57bc | [
"MIT"
] | null | null | null | #!/usr/bin/python3
## write2cly.py - reads json (generated by sml_reader.py) from stdin
## - writes values to Corlysis time series InfluxDB
##
## Writes data from smart meter to time series database (InfluxDB)
## at Corlysis.com [1]. You need to configure your database and token
## in the config secti... | 25.526316 | 71 | 0.652062 |
53df3216d619040fc2551d1e35eda4fe2e177604 | 3,868 | py | Python | WifiEnigma/BattleAI/question.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | WifiEnigma/BattleAI/question.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | WifiEnigma/BattleAI/question.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | import mysql.connector
import random
from voice import synthetize_voice, delete_wav
def AllQuestionAI(id_theme):
i = 0
#CONNEXION A LA BDD
conn = mysql.connector.connect(host="localhost",
user="phpmyadmin", password="Vince@Mysql1997",
... | 31.447154 | 140 | 0.520941 |
54e3b8446107d9bccd2d0bc314395d7a3117387b | 7,069 | py | Python | src/resources/clients/python_client/visitstate.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/resources/clients/python_client/visitstate.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/resources/clients/python_client/visitstate.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import sys
class RPCType(object):
CloseRPC = 0
DetachRPC = 1
AddWindowRPC = 2
DeleteWindowRPC = 3
SetWindowLayoutRPC = 4
SetActiveWindowRPC = 5
ClearWindowRPC = 6
ClearAllWindowsRPC = 7
OpenDatabaseRPC = 8
CloseDatabaseRPC = 9
Acti... | 34.651961 | 54 | 0.660914 |
4ad523fc14942dd490ad41c526c6171f60967ac3 | 476 | py | Python | Backend/models/risklayerPrognosis.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/models/risklayerPrognosis.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/models/risklayerPrognosis.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | from db import db
class RisklayerPrognosis(db.Model):
__tablename__ = 'risklayer_prognosis'
datenbestand = db.Column(db.TIMESTAMP, primary_key=True, nullable=False)
prognosis = db.Column(db.Float, nullable=False)
# class RisklayerPrognosisSchema(SQLAlchemyAutoSchema):
# class Meta:
# strict ... | 28 | 76 | 0.72479 |
ab2add18b201d727e235b13fba3fa52b34c35680 | 404 | py | Python | TreeModelLib/BelowgroundCompetition/__init__.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | TreeModelLib/BelowgroundCompetition/__init__.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | TreeModelLib/BelowgroundCompetition/__init__.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 8 15:25:03 2018
@author: bathmann
"""
from .BelowgroundCompetition import BelowgroundCompetition
from .SimpleTest import SimpleTest
from .FON import FON
from .OGSWithoutFeedback import OGSWithoutFeedback
from .OGSLargeScale3D import OGSLargeScale3... | 25.25 | 58 | 0.799505 |
dbcc6f4ccb0dabce5252e1dd4108228b2c863f99 | 721 | py | Python | web/web-lemonthinker/src/app/app.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 2 | 2021-08-09T17:08:12.000Z | 2021-08-09T17:08:17.000Z | web/web-lemonthinker/src/app/app.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | web/web-lemonthinker/src/app/app.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | 1 | 2021-10-09T16:51:56.000Z | 2021-10-09T16:51:56.000Z | from flask import Flask, request, redirect, url_for
import os
import random
import string
import time # lemonthink
clean = time.time()
app = Flask(__name__)
chars = list(string.ascii_letters + string.digits)
@app.route('/')
def main():
return open("index.html").read()
@app.route('/generate', methods=['POST'])
de... | 28.84 | 79 | 0.653259 |
91da549f96f9ccca48e20a796a48546be83febae | 206 | py | Python | exercises/ja/exc_03_16_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/exc_03_16_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/exc_03_16_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("ja_core_news_sm")
text = (
"チックフィレイはジョージア州カレッジパークに本社を置く、"
"チキンサンドを専門とするアメリカのファストフードレストランチェーンです。"
)
# トークナイズのみ行う
doc = nlp(text)
print([token.text for token in doc])
| 17.166667 | 42 | 0.73301 |
f482d9773506167246440d9307b62395f61caa1a | 2,353 | py | Python | ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/problems/astmath.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/problems/astmath.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/problems/astmath.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | from problem import Problem
from typing import Any, Tuple
from random import randint
import ast
import json
def gen_num():
return str(randint(1, 9))
def gen_op():
return "+-*/"[randint(0, 3)]
def gen_expr(depth):
if randint(0, depth) == 0:
l = gen_expr(depth + 1)
r = gen_expr(depth + 1... | 37.349206 | 800 | 0.592435 |
beaa8784fc43c71bc8bb5120744ac9a157c4e2a7 | 2,387 | py | Python | PathPlanning/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | PathPlanning/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | PathPlanning/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | 1 | 2020-09-25T18:31:34.000Z | 2020-09-25T18:31:34.000Z | from planning_framework import path
import cv2 as cv
import numpy as np
import argparse
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser(description="Path Planning Visualisation")
parser.add_argument(
"-n",
"--n_heuristic",
default=2,
help="Heuristic for A* Algorithm (default = 2). 0 f... | 26.820225 | 86 | 0.607038 |
fe7996f8bc015e9c1e0a7458bde9909f14df8fbf | 316 | py | Python | ScapyDoS-main/simp.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | ScapyDoS-main/simp.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | ScapyDoS-main/simp.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from scapy.all import *
src = input("Source IP: ")
target = input("Target IP: ")
i=1
while True:
for srcport in range(1, 65535):
ip = IP(src=src, dst=target)
tcp = TCP(sport=srcport, dport=80)
pkt = ip / tcp
send(pkt, inter= .0001)
print("Packet Sent ", i)
i=i+1 | 22.571429 | 42 | 0.550633 |
a3b8b5beaa0f8d8ecd98462fe75b978547dc1472 | 4,248 | py | Python | Python X/Dictionaries in python.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Dictionaries in python.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Dictionaries in python.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# dictionaries, look-up tables & key-value pairs\n",
"# d = {} OR d = dict()\n",
"# e.g. d = {\"George\": 24, \"Tom\": 32}\n",
"\n",
"d = {}\n",
"\n"
]
},
{
"cell_typ... | 18.88 | 354 | 0.439266 |
4367a493fbe503c8a8ff6c69a39f88b75c5407aa | 125 | py | Python | kts/core/types.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/core/types.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/core/types.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | from typing import Union
import pandas as pd
from kts.core.frame import KTSFrame
AnyFrame = Union[pd.DataFrame, KTSFrame]
| 15.625 | 40 | 0.792 |
717864c0c5586a731d9e7b34b779d6af81159c7a | 4,509 | py | Python | slcyGeneral.py | mirrorcoloured/slcypi | c47975b3523f770d12a521c82e2dfca181e3f35b | [
"MIT"
] | null | null | null | slcyGeneral.py | mirrorcoloured/slcypi | c47975b3523f770d12a521c82e2dfca181e3f35b | [
"MIT"
] | null | null | null | slcyGeneral.py | mirrorcoloured/slcypi | c47975b3523f770d12a521c82e2dfca181e3f35b | [
"MIT"
] | null | null | null | # Python 2.7.1
import RPi.GPIO as GPIO
from twython import Twython
import time
import sys
import os
import pygame
APP_KEY='zmmlyAJzMDIntLpDYmSH98gbw'
APP_SECRET='ksfSVa2hxvTQKYy4UR9tjpb57CAynMJDsygz9qOyzlH24NVwpW'
OAUTH_TOKEN='794094183841566720-BagrHW91yH8C3Mdh9SOlBfpL6wrSVRW'
OAUTH_TOKEN_SECRET='d0Uucq2dkSHrFHZGLM1... | 30.883562 | 94 | 0.635174 |
71ad91d94d2021895fed2197ad1e1027179c068d | 5,844 | py | Python | oneflow/python/test/ops/test_object_bbox_scale.py | caishenghang/oneflow | db239cc9f98e551823bf6ce2d4395bd5c339b1c5 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/test/ops/test_object_bbox_scale.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/test/ops/test_object_bbox_scale.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.000Z | """
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... | 32.287293 | 88 | 0.688912 |
1ce550dcd34ad1e54a6bb3af57029219d257f4d1 | 742 | py | Python | source/blog/migrations/0004_postcomments.py | JakubGutowski/PersonalBlog | 96122b36486f7e874c013e50d939732a43db309f | [
"BSD-3-Clause"
] | null | null | null | source/blog/migrations/0004_postcomments.py | JakubGutowski/PersonalBlog | 96122b36486f7e874c013e50d939732a43db309f | [
"BSD-3-Clause"
] | null | null | null | source/blog/migrations/0004_postcomments.py | JakubGutowski/PersonalBlog | 96122b36486f7e874c013e50d939732a43db309f | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.0.5 on 2018-07-02 19:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('blog', '0003_blogpost_author'),
]
operations = [
migrations.CreateModel(
name='Po... | 30.916667 | 115 | 0.58221 |
1cecb4c2f3b6f24c919644faa0e058b12f679c06 | 273 | py | Python | src/flocker/blueprints/red/__init__.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | src/flocker/blueprints/red/__init__.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | src/flocker/blueprints/red/__init__.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | import os
from flask import Blueprint, render_template
def create_bp():
bp_red = Blueprint('red', __name__, url_prefix='/red')
@bp_red.route('/index/')
@bp_red.route('/')
def index():
return render_template('red/index.html')
return bp_red | 22.75 | 58 | 0.652015 |
1c073d575249e6f524c3e4fa1ac84edb0ff05cc7 | 984 | py | Python | UAS/UAS 11 & 12/main.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 11 & 12/main.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 11 & 12/main.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | #Main Program
from Class import Barang
import Menu
histori = list()
listBarang = [
Barang('Rinso', 5000, 20),
Barang('Sabun', 3000, 20),
Barang('Pulpen', 2500, 20),
Barang('Tisu', 10000, 20),
Barang('Penggaris', 1000, 20)
]
while True:
print('''
Menu
1. Tampilkan Barang
2. Tambahkan Barang
3. Ta... | 20.93617 | 37 | 0.645325 |
98d7520f9994f6836e73faaf42f63009eee0dc64 | 697 | py | Python | project/cli/event.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/cli/event.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/cli/event.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import click
from flask.cli import AppGroup
from project import app, db
from project.dateutils import berlin_tz
from project.services.event import (
get_recurring_events,
update_event_dates_with_recurrence_rule,
)
event_cli = AppGroup("event")
@event_cli.command("update-recurring-dates")
def update_recurrin... | 24.034483 | 72 | 0.746055 |
End of preview. Expand in Data Studio
- Downloads last month
- 5