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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fb7e3b9f6548d10a07cd1a9ce796c646757c7189 | 77 | py | Python | modules/config/__init__.py | cloud441/Procerfa | 7472aeecc4eb3003e2e0f09bb0ae71f1b33e9ccf | [
"MIT"
] | null | null | null | modules/config/__init__.py | cloud441/Procerfa | 7472aeecc4eb3003e2e0f09bb0ae71f1b33e9ccf | [
"MIT"
] | null | null | null | modules/config/__init__.py | cloud441/Procerfa | 7472aeecc4eb3003e2e0f09bb0ae71f1b33e9ccf | [
"MIT"
] | null | null | null | from .label_match import label_match_dict
from .model_path import model_path
| 25.666667 | 41 | 0.87013 |
fbbe063d5f1908c4c5f8640b4b789497522fab64 | 551 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/ph-10.12-3-primel-e4.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/ph-10.12-3-primel-e4.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/ph-10.12-3-primel-e4.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | import math
def is_primel_5(n):
if n < 2:
return False
if n == 2:
return True
if n % 2 == 0:
return False
m = math.sqrt(n)
m = int(m) + 1
for x in range(3, m, 2):
if n % x == 0:
return False
return True
while True:
number = int(input("Pleas... | 19.678571 | 68 | 0.524501 |
8374d17e5114149f76c7b24f02a8c9bf85138772 | 150 | py | Python | leetcode/258-Add-Digits/AddDigits_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/258-Add-Digits/AddDigits_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/258-Add-Digits/AddDigits_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param {integer} num
# @return {integer}
def addDigits(self, num):
return num - (num - 1) / 9 * 9 if num else 0
| 25 | 52 | 0.566667 |
83b5f519998b5effacfe3342bd977652df42aa34 | 436 | py | Python | aemter/tests/test_urls.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 8 | 2019-11-26T13:34:46.000Z | 2021-06-21T13:41:57.000Z | src/aemter/tests/test_urls.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 93 | 2019-12-16T09:29:10.000Z | 2021-04-24T12:03:33.000Z | src/aemter/tests/test_urls.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 2 | 2020-12-03T12:43:19.000Z | 2020-12-22T21:48:47.000Z | from django.test import SimpleTestCase
from django.urls import reverse, resolve
from aemter.views import *
class TestUrls(SimpleTestCase):
def test_main_screen_url_resolves(self):
url = reverse('aemter:homepage')
self.assertEqual(resolve(url).func, main_screen)
"""
Template
def test_... | 24.222222 | 56 | 0.692661 |
83d8c7d409bf4a7bb130b1b4226157ebcebd3a83 | 585 | py | Python | retro/examples/trivial_random_agent_multiplayer.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | retro/examples/trivial_random_agent_multiplayer.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | retro/examples/trivial_random_agent_multiplayer.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | import retro
def main():
env = retro.make(game='Pong-Atari2600', players=2)
obs = env.reset()
while True:
# action_space will by MultiBinary(16) now instead of MultiBinary(8)
# the bottom half of the actions will be for player 1 and the top half for player 2
obs, rew, done, info = e... | 29.25 | 91 | 0.615385 |
83de0bdeba7a89d926cdfcb94e65518ef005a0e6 | 199 | py | Python | SOP/01/u11.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | SOP/01/u11.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | SOP/01/u11.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | # Uebung 11
liste = []
for i in range(1,4):
zahl = int(input("Bitte geben Sie eine positive Zahl ein: "))
if (zahl < 0):
break
liste += [zahl]
else:
for z in liste:
print(z, z**2)
| 14.214286 | 63 | 0.572864 |
f769ae6e5798456f050814a9846908c58e97ae95 | 1,590 | py | Python | source/templatehandler.py | marctrommen/bloggenerator | 5b4fed4cd12a899829261d492328dfc39a78153d | [
"MIT"
] | null | null | null | source/templatehandler.py | marctrommen/bloggenerator | 5b4fed4cd12a899829261d492328dfc39a78153d | [
"MIT"
] | null | null | null | source/templatehandler.py | marctrommen/bloggenerator | 5b4fed4cd12a899829261d492328dfc39a78153d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
class TemplateHandler(object):
def __init__(self):
aPath = os.path.realpath(__file__)
aPath = os.path.dirname(aPath)
aPath = os.path.join(aPath, "..")
aPath = os.path.normpath(aPath)
self.templatePath = os.path.join(aPath, "templates")
self.loadTe... | 26.949153 | 78 | 0.718868 |
e3ab0583f78c6d8f06bd33dce2421a3a84439bb0 | 21,622 | py | Python | MoPulseGen/Rpeaks2EcgPpg.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/Rpeaks2EcgPpg.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/Rpeaks2EcgPpg.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 14 20:47:57 2020
@author: agarwal.270a
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy import io
from scipy import signal as sig
from scipy.signal import detrend
from pathlib import Path
from simulator_for_CC import Simulator
import tensor... | 44.673554 | 153 | 0.517205 |
5843c9fbe5fc01c1f355fa2c41b9465d57b4c000 | 1,936 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v6_27/fix_recurring_order_status.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v6_27/fix_recurring_order_status.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v6_27/fix_recurring_order_status.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
for doc in (
{
"doctype": "Sales Order",
"stock_doctype": "Delivery Note",
"invoice_doctype": "Sales Invoic... | 35.851852 | 92 | 0.695248 |
4daff19542d78d053e8c95d2210738f3a769bdb6 | 2,966 | py | Python | official/cv/erfnet/src/infer.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/erfnet/src/infer.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/erfnet/src/infer.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... | 35.73494 | 84 | 0.701281 |
128107ace11d60db0ee41e6a1ca7e46f1fa3b24a | 3,306 | py | Python | official/cv/srcnn/create_dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2021-07-08T13:10:42.000Z | 2021-11-08T02:48:57.000Z | official/cv/srcnn/create_dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/srcnn/create_dataset.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... | 39.831325 | 92 | 0.653055 |
42903cd1e77bad8daa0f55f488ae09668815707b | 10,900 | py | Python | angstrom/2021/rev/lambda_lambda/chall.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2021/rev/lambda_lambda/chall.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2021/rev/lambda_lambda/chall.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | print((lambda LAMBDa: lambda LAMbDA: lambda LAMBda: lambda LAMbda: (lambda Lambda: ((lambda LAMBDA: Lambda(lambda LAMbda: LAMBDA(LAMBDA)(LAMbda)))(lambda LAMBDA: Lambda(lambda LAMbda: LAMBDA(LAMBDA)(LAMbda)))))(lambda Lambda: lambda lAMBDA: lambda lamBDA: (lambda lAmbda: lambda lAMbda: (lAMBDA if not lAmbda else Lambda... | 5,450 | 10,899 | 0.765138 |
c47a7fe28f38048d2730681d5dfccad406bac901 | 1,296 | py | Python | src/classifier/classifier_tuning/tune_transformer.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 14 | 2021-08-24T12:36:37.000Z | 2022-03-18T12:14:36.000Z | src/classifier/classifier_tuning/tune_transformer.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | null | null | null | src/classifier/classifier_tuning/tune_transformer.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 1 | 2021-10-21T20:22:55.000Z | 2021-10-21T20:22:55.000Z | from src.classifier.torch_helpers.torch_training import get_weight_vector
def suggest_sbert(model_params, trial, Y, device, n_embed, n_output):
n_hidden_lin = trial.suggest_categorical(
model_params.n_hidden_lin.name, model_params.n_hidden_lin.choices
)
n_hidden_lin_2 = trial.suggest_categorical(... | 30.139535 | 77 | 0.70679 |
678242670dc40856ab7c839772780158f12b3856 | 1,311 | py | Python | src/onegov/feriennet/views/payment_overrides.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/views/payment_overrides.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/views/payment_overrides.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity import InvoiceCollection, InvoiceItem
from onegov.core.security import Private
from onegov.feriennet import FeriennetApp
from onegov.pay import Payment, PaymentProviderCollection
from onegov.org.views.payment_provider import sync_payments
from onegov.org.views.payment import refund
@FeriennetApp.... | 30.488372 | 77 | 0.733791 |
db39d8a82ee8d6f9596aa679ccb1823e6be3676e | 1,904 | py | Python | 20-fs-ias-lec/groups/06-longFi/localEther/udp_connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/06-longFi/localEther/udp_connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/06-longFi/localEther/udp_connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import socket
import cbor2
import time
import connect
from logSync import database_transport as transport # for databases
# from logSync import transport as transport # for pcap files
class hasPackets:
def __init__(self, interface):
connect.sender(transport.get_i_have_list(), interface) # 4
prin... | 31.213115 | 109 | 0.676471 |
3f23029ff6805ec98bbd7fe752c3d521349e5f77 | 951 | py | Python | src/tools/data/DataManualExamples/CreatingCompatible/vwcurv3d.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/tools/data/DataManualExamples/CreatingCompatible/vwcurv3d.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/tools/data/DataManualExamples/CreatingCompatible/vwcurv3d.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import visit_writer
NX = 4
NY = 3
NZ = 2
# Curvilinear mesh points stored x0,y0,z0,x1,y1,z1,...
pts = (0, 0.5, 0, 1, 0, 0, 2, 0, 0,
3, 0.5, 0, 0, 1, 0, 1, 1, 0,
2, 1, 0, 3, 1, 0, 0, 1.5, 0,
1, 2, 0, 2, 2, 0, 3, 1.5, 0,
0, 0.5, 1, 1, 0, 1, 2, 0, 1,
3, 0.5, 1, 0, 1, 1, 1, 1, 1,
2, 1, 1, 3, 1, 1... | 24.384615 | 69 | 0.507886 |
45309489fe142bc580ab14bf95f943e92deda6e3 | 1,062 | py | Python | get_transcription_data.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | get_transcription_data.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | get_transcription_data.py | NickForero11/Subbler | ed528514e96ddc30d58230ff98ff0fd5216ea5de | [
"MIT"
] | null | null | null | """Module to download the transcripted data of a video.
"""
from json import dumps
from requests import post
from requests.exceptions import RequestException
from sys import exit
def get_transcription_data(job_name):
"""Downloads from AWS the transcription of a video in a JSON format with
its text and timesta... | 30.342857 | 76 | 0.663842 |
831ad6eb0428094ff7f2e1df99b825cc70955af4 | 2,435 | py | Python | sample/rpz-sensor/python3/rpz_sensor.py | yappy/RpzIrSensor | 8ff11ad594e81380975ff84e2394ff0834d380cf | [
"MIT"
] | null | null | null | sample/rpz-sensor/python3/rpz_sensor.py | yappy/RpzIrSensor | 8ff11ad594e81380975ff84e2394ff0834d380cf | [
"MIT"
] | null | null | null | sample/rpz-sensor/python3/rpz_sensor.py | yappy/RpzIrSensor | 8ff11ad594e81380975ff84e2394ff0834d380cf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
RPZ-IR-Sensor BME280 and TSL2561 Controller
Usage:
rpz_sensor.py [-l <log_file>] [-v]
rpz_sensor.py -h --help
Options:
-l <log_file> Output log file name
-v Show verbose message
-h --help Show this screen and exit
"""
import os
import csv
from bme280i2... | 25.364583 | 80 | 0.538398 |
8359c487f25b0fc1b7279b69f23ee38e0231c2bb | 2,032 | py | Python | recipes/eigen/3.3.7/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | null | null | null | recipes/eigen/3.3.7/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | 3 | 2021-02-15T08:48:16.000Z | 2021-02-24T16:35:54.000Z | recipes/eigen/3.3.7/conanfile.py | SolarFramework/conan-solar | cdb6253556c056baacaf3e5f28b595869adddb88 | [
"Apache-2.0"
] | null | null | null | from conans import ConanFile, CMake, tools
import os
from glob import glob
class LibEigenConan(ConanFile):
name = "eigen"
package_revision = ""
upstream_version = "3.3.7"
version = "{0}{1}".format(upstream_version, package_revision)
generators = "cmake"
settings = "os", "arch", "compiler", "b... | 31.261538 | 115 | 0.651575 |
55c90c994477fb94caa4044be3772bd214a3fce2 | 5,066 | py | Python | MachineTranslation/lib/data_generator/vocab_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | 2 | 2021-08-25T01:13:29.000Z | 2021-10-10T14:49:59.000Z | MachineTranslation/lib/data_generator/vocab_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | MachineTranslation/lib/data_generator/vocab_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import tensorflow as tf
from lib.data_generator.tf_data_prepare_xrh import *
from tensorflow.keras.layers import StringLookup
class Vocab:
"""
使用 python 的 dict 的 语料库词典
"""
def __init__(self, vocab_list_path, vocab_list=None, _unk_str='[UNK]'):
""... | 24.47343 | 104 | 0.557639 |
55dd296604487f7eb85bda6f25433b2fa6e0a68b | 393 | py | Python | 2015/11/look-completion-rate-table/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/11/look-completion-rate-table/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/11/look-completion-rate-table/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
import base_filters
COPY_GOOGLE_DOC_KEY = '1u0wLrEew8rJ7hoK9L_8zzDN57GR76jTtpAGGnk-j7Gg'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
def percent(value):
return unicode(round(float(value), 3)... | 23.117647 | 77 | 0.770992 |
36117aad8cce2a75a93c57d55305d86f793cdf12 | 1,101 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_2/repost_reserved_qty.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v4_2/repost_reserved_qty.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_2/repost_reserved_qty.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from erpnext.stock.stock_balance import update_bin_qty, get_reserved_qty
def execute():
for doctype in ("Sales Order Item", "Bin"):
... | 28.230769 | 95 | 0.728429 |
3624698bf43ecfbd5eb13f51a4ff331b232358e6 | 718 | py | Python | data_tests/saved__backend__py3.9/numba/class_rec_calls.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | data_tests/saved__backend__py3.9/numba/class_rec_calls.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | data_tests/saved__backend__py3.9/numba/class_rec_calls.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | # __protected__ from numba import njit
# __protected__ @njit(cache=True, fastmath=True)
def __for_method__Myclass__func(self_attr, self_attr2, arg):
if __for_method__Myclass__func(self_attr, self_attr2, arg - 1) < 1:
return 1
else:
a = __for_method__Myclass__func(
self_attr, self_a... | 34.190476 | 124 | 0.664345 |
362dd5fd9ffc747c0294c3229d46110075890ae4 | 5,070 | py | Python | test/distributed/_sharded_tensor/ops/test_binary_cmp.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 1 | 2022-01-20T03:49:23.000Z | 2022-01-20T03:49:23.000Z | test/distributed/_sharded_tensor/ops/test_binary_cmp.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | test/distributed/_sharded_tensor/ops/test_binary_cmp.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | null | null | null | # Owner(s): ["oncall: distributed"]
import sys
import torch
import torch.distributed as dist
from torch.distributed import _sharded_tensor
from torch.distributed.distributed_c10d import _get_default_group
from torch.testing._internal.common_distributed import (
requires_nccl,
skip_if_lt_x_gpu,
)
from torch.d... | 32.292994 | 112 | 0.629586 |
3d63c8798d6e8523f1b181840a49f1b77ab55be5 | 284 | py | Python | IVTp/2014/Shcherbakov_R_A/task_05_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Shcherbakov_R_A/task_05_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Shcherbakov_R_A/task_05_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 22.
# Напишите программу, которая бы при запуске случайным образом отображала
# имя одного из двух сооснователей компании Google.
# Щербаков Р.А.
# 22.05.2016
import random
name='Сергей Брин', 'Ларри Пейдж'
rand = random.randint(0,1)
input(name[rand]+"\n\nOk")
| 21.846154 | 73 | 0.739437 |
a151bae9ae445b8b8f6d6073c1fada8eac02b376 | 14,047 | py | Python | scripts/pcm_analyser.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/pcm_analyser.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/pcm_analyser.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is a script to parse NSPT data files for the PCM model.
The script looks for files containing NSPT data and collects results for
fixed lattice volume and fixed stochastic time step in two separate output
files. If several time steps epsilon are av... | 36.017949 | 80 | 0.375311 |
62cd05d872346ec1ba0f9d0d21b91fa238d1eb2f | 850 | py | Python | Externals/__init__.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | null | null | null | Externals/__init__.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | null | null | null | Externals/__init__.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | null | null | null | """External APIs"""
from collections import namedtuple
from .database import Database
from .twitter.Api import TwitterBase
from .twitter.RO import ReadOnly as TwitterReadOnly
from .twitter.RW import ReadWrite as TwitterReadWrite
def get_externals(**kwargs):
api = namedtuple('Externals', ['twitter', 'database'])
... | 31.481481 | 74 | 0.717647 |
9a87dcbb867ca9d1892259c596ad7d66202e47f8 | 8,626 | py | Python | install-resources.py | MedPhyDO/pygqa | 580b2c6028d2299790a38262b795b8409cbfcc37 | [
"MIT"
] | 3 | 2021-02-25T13:19:52.000Z | 2021-03-03T03:46:46.000Z | install-resources.py | MedPhyDO/app-skeleton | 1161736ccf356c704c6c13b17fa11aca64b17dac | [
"MIT"
] | null | null | null | install-resources.py | MedPhyDO/app-skeleton | 1161736ccf356c704c6c13b17fa11aca64b17dac | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
* https://cdnjs.com/libraries
* https://unpkg.com/#/
"""
import os
from os import path as osp
import requests
from pygments.formatters import get_formatter_by_name
ABSPATH = os.path.dirname( os.path.abspath( __file__) )
resources_path = osp.join( ABSPATH , "resources")
vendor_path = osp... | 48.189944 | 205 | 0.670531 |
9ae04efa99e098435bc1c55474c084338795ba44 | 7,776 | py | Python | zippey.py | OidaTiftla/EEC-Scripts | 4f0d18f8fdeacdfeb3fbca07b94c4f7af7b7efd5 | [
"MIT"
] | 1 | 2021-05-13T00:27:48.000Z | 2021-05-13T00:27:48.000Z | zippey.py | OidaTiftla/EEC-Scripts | 4f0d18f8fdeacdfeb3fbca07b94c4f7af7b7efd5 | [
"MIT"
] | null | null | null | zippey.py | OidaTiftla/EEC-Scripts | 4f0d18f8fdeacdfeb3fbca07b94c4f7af7b7efd5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2014, Sippey Fun Lab
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notic... | 39.075377 | 160 | 0.658436 |
4942c76c82b45d85677b85061583c76375cd15fd | 2,377 | py | Python | user/admin.py | MIXISAMA/MIS-backend | 7aaa1be773718de1beb3ce0080edca7c4114b7ad | [
"MIT"
] | null | null | null | user/admin.py | MIXISAMA/MIS-backend | 7aaa1be773718de1beb3ce0080edca7c4114b7ad | [
"MIT"
] | null | null | null | user/admin.py | MIXISAMA/MIS-backend | 7aaa1be773718de1beb3ce0080edca7c4114b7ad | [
"MIT"
] | 2 | 2020-04-20T07:26:51.000Z | 2020-04-30T11:51:54.000Z | from django.contrib import admin
from plan.models import FieldOfStudy
from .models import Student, Teacher, Tutor, CM, PM, Squad
# Register your models here.
class FieldOfStudyListFilter(admin.SimpleListFilter):
title = "专业方向"
parameter_name = "field_of_study"
def lookups(self, request, model_admin):
... | 29.345679 | 67 | 0.670172 |
772f6377ae64314c4255adf94e38762f73a9fd0d | 546 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Miscellaneous/Maximum XOR/max_xor1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Miscellaneous/Maximum XOR/max_xor1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Miscellaneous/Maximum XOR/max_xor1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the maxXor function below.
def maxXor(arr, queries):
# solve here
n = len(arr)
for query in queries:
best = max([query^arr[i] for i in range(n)])
print(best)
if __name__ == '__main__':
n = int(input())... | 16.545455 | 52 | 0.598901 |
6214315b4d6e90316b9b4661fcf73a868718d38d | 67 | py | Python | scripts/hello_world_by_aj.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_by_aj.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_by_aj.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # LANGUAGE: Python
# VERSION: Python 3.5.2
print("Hello, World")
| 13.4 | 24 | 0.671642 |
f315ee91ddbca8dc94442743f8a82ea02d322e4a | 9,120 | py | Python | venv/Lib/site-packages/pynance/tst/unit/data/test_preprocess.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 35 | 2015-03-12T04:16:14.000Z | 2020-12-17T18:10:15.000Z | venv/Lib/site-packages/pynance/tst/unit/data/test_preprocess.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 31 | 2015-03-16T21:31:04.000Z | 2021-01-26T00:12:34.000Z | venv/Lib/site-packages/pynance/tst/unit/data/test_preprocess.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 18 | 2015-09-30T10:40:26.000Z | 2021-01-25T21:20:44.000Z | """
Copyright (c) 2014, 2015 Marshall Farrier
license http://opensource.org/licenses/MIT
@author: Marshall Farrier
@contact: marshalldfarrier@gmail.com
@since: 2014-11-02
@summary: Unit tests for data module
"""
from functools import partial
import unittest
import numpy as np
import pandas as pd
import pynance as p... | 46.060606 | 109 | 0.649671 |
b2536ed6a252bf8fc5f03060db9c3269cba3df8e | 995 | py | Python | packages/watchmen-model/src/watchmen_model/analysis/pipeline_index.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/analysis/pipeline_index.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/analysis/pipeline_index.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from enum import Enum
from typing import Optional, TypeVar
from pydantic import BaseModel
from watchmen_model.common import FactorId, PipelineActionId, PipelineId, PipelineStageId, PipelineUnitId, Storable, \
TenantId, TopicId
PipelineIndexId = TypeVar('PipelineIndexId', bound=str)
c... | 28.428571 | 118 | 0.79196 |
0c06d3f70cc3ade669f946510a3533b4b3280dd6 | 4,620 | py | Python | src/onegov/gazette/utils/sogc_importer.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/utils/sogc_importer.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/utils/sogc_importer.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from lxml import etree
from onegov.chat import MessageCollection
from onegov.gazette import _
from onegov.gazette import log
from onegov.gazette.models import GazetteNotice
from onegov.gazette.utils.sogc_converter import KK01
from onegov.gazette.utils.sogc_converter import KK02
from onegov.gazette.utils.sogc_converter ... | 34.477612 | 78 | 0.618182 |
0b21c90581bd444ad65cea3c2fc34f4d2a728169 | 2,265 | py | Python | python/anyconnect.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | python/anyconnect.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | python/anyconnect.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | from os.path import isfile, exists, abspath, dirname
from os import chdir, getcwd
from startup import EnumWindows, EnumWindowsProc, foreach_window, similar, windows
from pywinauto import application
from keyboard import PressKey, ReleaseKey, VK_TAB, VK_SHIFT
from time import time, sleep
import re
import pyotp
ctok = ... | 34.846154 | 241 | 0.643709 |
0bd978a643acd027a4a6849d2ae636c499fa288f | 59 | py | Python | utils/networkCfg.py | wanglikang/zzuARTensorflow2 | 2e31108ca90f183ab93309aa481de1dd88f98a9b | [
"MIT"
] | null | null | null | utils/networkCfg.py | wanglikang/zzuARTensorflow2 | 2e31108ca90f183ab93309aa481de1dd88f98a9b | [
"MIT"
] | null | null | null | utils/networkCfg.py | wanglikang/zzuARTensorflow2 | 2e31108ca90f183ab93309aa481de1dd88f98a9b | [
"MIT"
] | null | null | null | #coding:utf-8
remoteAddress='localhost'
remoteport=10001
| 9.833333 | 25 | 0.79661 |
aca84f9e35ab7d3e29b7c95d11a66ba003f55a49 | 5,360 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_static_route.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_static_route.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_static_route.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright: (c) 2019, Ansible Project
# 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
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_collecti... | 43.577236 | 135 | 0.625 |
acaf5f2e766d1bc75d65ac3b6dbe211bf87d27d6 | 10,473 | py | Python | Packs/MicrosoftGraphIdentityandAccess/Integrations/MicrosoftGraphIdentityandAccess/MicrosoftGraphIdentityandAccess.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/MicrosoftGraphIdentityandAccess/Integrations/MicrosoftGraphIdentityandAccess/MicrosoftGraphIdentityandAccess.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/MicrosoftGraphIdentityandAccess/Integrations/MicrosoftGraphIdentityandAccess/MicrosoftGraphIdentityandAccess.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | """
An integration to MS Graph Identity and Access endpoint.
https://docs.microsoft.com/en-us/graph/api/resources/serviceprincipal?view=graph-rest-1.0
"""
import urllib3
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
# Disable insecure wa... | 34.114007 | 118 | 0.625991 |
c59330aa7ee9a15add300a976397e8e7e9029798 | 677 | py | Python | examples/myqueryset/get_/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | examples/myqueryset/get_/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | examples/myqueryset/get_/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | from django.db import models
from django.template.defaultfilters import truncatechars
# Create your models here.
class product(models.Model):
name = models.CharField(verbose_name="商品名称", max_length=50, unique=True)
price = models.DecimalField(verbose_name="商品价格", max_digits=5, decimal_places=2)
descriptio... | 39.823529 | 84 | 0.762186 |
c59c329fa5fadcc2bac73444142cb1d11c390bde | 1,696 | py | Python | src/test/tests/queries/variable_sum_volume.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/queries/variable_sum_volume.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/queries/variable_sum_volume.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: volume.py
# Tests: queries - volumes of various material selected regions
# - weighted volume of dataset with cells of different
# dimensio... | 24.57971 | 79 | 0.637972 |
c5c48fe8a0933bb844890fb074137c09d20f4bb8 | 92 | py | Python | 2014/08/feeding-america-military/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/08/feeding-america-military/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/08/feeding-america-military/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 = '1pA_jwEJxQ0sxpQFsqM-g-S6yEt2hKAdXMQ4FUD8tG88'
| 23 | 68 | 0.826087 |
768007d95347f7035c16261ad2530487086fa9c4 | 3,042 | py | Python | game1/Game.py | JordanG8/Bahr | 03911f3ac7275f46abc510cf85c8850c31572203 | [
"MIT"
] | null | null | null | game1/Game.py | JordanG8/Bahr | 03911f3ac7275f46abc510cf85c8850c31572203 | [
"MIT"
] | null | null | null | game1/Game.py | JordanG8/Bahr | 03911f3ac7275f46abc510cf85c8850c31572203 | [
"MIT"
] | null | null | null | #from Players import real_player_list Bring back when finished!!
from Players import real_player_list
defenderName = ""
# input of function - string
# output of function - the number of the defender in the players list
def defenderValidation():
defenderName = input()
i = 0
while True:
... | 32.021053 | 171 | 0.501315 |
4f13a0f2bd77684eda9b72b0296223005e748844 | 2,745 | py | Python | src/fancharts/boe_fanchart.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/fancharts/boe_fanchart.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | src/fancharts/boe_fanchart.py | Ellon-M/visualizations | 5a42c213ea8fd0597e2035778d9ae6460eb9e821 | [
"MIT"
] | null | null | null | # fancharts - BOE style
from twopiece.scale import tpnorm
import numpy as np
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
def fan(data, p):
"""Given mode, median, mean, uncertainty, and skewness by date,
and a set of quantiles, returns the values of a two-piece normal
distribution a... | 31.551724 | 82 | 0.659016 |
4fd40197673fcacd98dc4af9e0502b21c2e39794 | 3,016 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/cityreader/test_stretch.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/cityreader/test_stretch.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/01_intro_python/Sprint-Challenge--Intro-Python/src/cityreader/test_stretch.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | import unittest
from cityreader import City, cityreader, cityreader_stretch
def check_city(inp, exp):
if inp.name != exp.name:
return False
if inp.lat != exp.lat:
return False
if inp.lon != exp.lon:
return False
return True
class CityreaderTests(unittest.TestCase):
def setUp(self):... | 33.511111 | 61 | 0.593833 |
4ffe3db0ed1ad502e79175a7c3296ea0aacdce2c | 3,684 | py | Python | tools/pythonpkg/tests/fast/arrow/test_arrow_fetch_chunk.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | tools/pythonpkg/tests/fast/arrow/test_arrow_fetch_chunk.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | tools/pythonpkg/tests/fast/arrow/test_arrow_fetch_chunk.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z | import duckdb
import pytest
try:
import pyarrow as pa
can_run = True
except:
can_run = False
class TestArrowFetchChunk(object):
def test_fetch_arrow_chunk(self, duckdb_cursor):
if not can_run:
return
duckdb_cursor.execute("CREATE table t as select range a from range(3000);... | 34.429907 | 84 | 0.632736 |
8c933c7c09203454dd78959fafaa03c345afc2a5 | 459 | py | Python | GooglePlaceAPI.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | GooglePlaceAPI.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | GooglePlaceAPI.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | import os
import csv
table = ["1","2","3"]
file_name = "Test1.csv"
n = os.path.exists(file_name)
print(n)
if os.path.exists(file_name) is True:
with open(file_name, 'a') as file:
csv_writer = csv.writer(file, delimiter=',', quoting= csv.QUOTE_ALL)
csv_writer.writerows(table)
else:
with open(... | 22.95 | 76 | 0.655773 |
5093322a2356d6433bb226f3da3be234ff1a9938 | 246 | py | Python | python/data_sutram/scraper/identify_img_files.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/data_sutram/scraper/identify_img_files.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/data_sutram/scraper/identify_img_files.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from __future__ import print_function
import sys
from PIL import Image
for infile in sys.argv[1:]:
try:
with Image.open(infile) as im:
print(infile, im.format, "%dx%d" % im.size, im.mode)
except IOError:
pass
| 22.363636 | 64 | 0.638211 |
fa23115f141d7cd8372f8a88cb5a566872747d21 | 538 | py | Python | leetcode/022-Generate-Parentheses/GenParnt_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/022-Generate-Parentheses/GenParnt_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/022-Generate-Parentheses/GenParnt_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param {integer} n
# @return {string[]}
def gen(self, lcnt, rcnt):
if lcnt == 0:
return [')' * rcnt]
tmp1 = self.gen(lcnt - 1, rcnt)
res1 = ['(' + t for t in tmp1]
if lcnt <= rcnt - 1:
tmp2 = self.gen(lcnt, rcnt - 1)
res2 ... | 25.619048 | 43 | 0.442379 |
fa437318c3dde8a50d33828df757caa85a437ce8 | 31,281 | py | Python | scripts/signal_marker_processing/get_time_series.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | null | null | null | scripts/signal_marker_processing/get_time_series.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | null | null | null | scripts/signal_marker_processing/get_time_series.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is part of CbM (https://github.com/ec-jrc/cbm).
# Author : WIRNHARDT Csaba
# Credits : GTCAP Team
# Copyright : 2021 European Commission, Joint Research Centre
# License : 3-Clause BSD
import requests
import pandas as pd
import datetime
import numpy as np
import os... | 47.395455 | 193 | 0.609507 |
ad28fe13e0656bfcf56fbc4ffe731f21a026fb05 | 9,809 | py | Python | src/Sephrasto/CharakterAssistent/WizardWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/CharakterAssistent/WizardWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/CharakterAssistent/WizardWrapper.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | from PyQt5 import QtWidgets, QtCore
import os.path
import logging
from Wolke import Wolke
import lxml.etree as etree
from EinstellungenWrapper import EinstellungenWrapper
from EventBus import EventBus
from CharakterAssistent.CharakterMerger import CharakterMerger
from Hilfsmethoden import Hilfsmethoden
class Regeln(ob... | 45.623256 | 159 | 0.621674 |
ad3f7b3206d05eaad98f90943b3a201b0f5dac14 | 527 | py | Python | src/mysql.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/mysql.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/mysql.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/python
'''
MySQL script for ztc (mysql.ping item)
Connects to db and executes trivial query
Copyright (c) 2009-2011 Vladimir Rusinov <vladimir@greenmice.info>
License: GNU GPL3
This file is part of ZTC
Currently supported metrics:
* ping (float) - return number of seconds required to run simple query.... | 22.913043 | 79 | 0.70019 |
7e7c61b5cb8df67ca552c8a59988bb03f1d1777f | 3,255 | py | Python | rev/DeeP/source.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | 6 | 2021-02-18T15:07:55.000Z | 2022-02-04T01:38:10.000Z | rev/DeeP/source.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | rev/DeeP/source.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | secured = [633825300114114700748351602588L, 2596148429267413814265248164609936L, 1267650600228229401496703205275L, 2535301200456458802993406410650L, 5192296858534827628530496329219983L, 664613997892457936451903530140172168L, 1298074214633706907132624082304913L, 1267650600228229401496703205275L, 158456325028528675187087... | 465 | 2,938 | 0.905069 |
adf093b6668ecf8351f780eb1daa8694e8d60365 | 10,786 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/zabbix_valuemap.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/zabbix_valuemap.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/zabbix_valuemap.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2019, Ruben Tsirunyan <rubentsirunyan@gmail.com>
# 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': ... | 31.723529 | 137 | 0.563879 |
bc09411cd56370be43b9734dcf662c05ad0b46bc | 1,619 | py | Python | packages/watchmen-pipeline-surface/src/watchmen_pipeline_surface/data/monitor_log_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-surface/src/watchmen_pipeline_surface/data/monitor_log_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-surface/src/watchmen_pipeline_surface/data/monitor_log_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List
from fastapi import APIRouter, Depends
from watchmen_auth import PrincipalService
from watchmen_model.admin import User, UserRole
from watchmen_model.common import DataPage
from watchmen_model.pipeline_kernel import PipelineMonitorLog, PipelineMonitorLogCriteria
from watchmen_pipeline_kernel.m... | 36.795455 | 117 | 0.831995 |
cb89758f693dfa0b6ad5fedeb5d2c9906fbaaa35 | 5,543 | py | Python | main.py | caul1flower/alg | a9eaae99798df24fa611a83e7280c6ae2dde974e | [
"MIT"
] | null | null | null | main.py | caul1flower/alg | a9eaae99798df24fa611a83e7280c6ae2dde974e | [
"MIT"
] | null | null | null | main.py | caul1flower/alg | a9eaae99798df24fa611a83e7280c6ae2dde974e | [
"MIT"
] | null | null | null | import time
import random
import matplotlib.pyplot as plt
from sorting_algorithms import selection_sort, insertion_sort, merge_sort, shell_sort
from copy import deepcopy
def generate_random_arr(power):
lst = []
for _ in range(2**power):
lst.append(random.randint(0, 1000))
return lst
def generate... | 29.962162 | 96 | 0.607252 |
699e24a914d217552c8e01409bfe9e71e47e390b | 38 | py | Python | Termux-Mpv-master/termuxmpv/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Termux-Mpv-master/termuxmpv/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Termux-Mpv-master/termuxmpv/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # coding=utf-8
__version__ = "0.0.17"
| 12.666667 | 22 | 0.657895 |
356c6657d4dbdd02d93f99e6005e1d540080cb75 | 2,570 | py | Python | src/visitpy/examples/fv.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/examples/fv.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/fv.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# Test script that shows how to change a Volume plot's attributes.
#
# Modifications:
# Hank Childs, Tue May 7 09:27:44 PDT 2002
# Updated for 0.9.9. Made it use a file in the /data directory.
# Updated clipping planes to not cu... | 31.728395 | 102 | 0.585214 |
35bd3e8d57b1e3a51c0d2a20e9413a03601579b1 | 438 | py | Python | Packs/GetLicenseID/Scripts/GetLicenseID/GetLicenseID.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/GetLicenseID/Scripts/GetLicenseID/GetLicenseID.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/GetLicenseID/Scripts/GetLicenseID/GetLicenseID.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
def main():
human_readable, context_data = get_license_id()
return_outputs(human_readable, context_data)
def get_license_id():
license_id = demisto.getLicenseID()
human_readable = tableToMarkdown('Cortex XSOAR License ID', license_id, headers='License ID')
return... | 25.764706 | 97 | 0.726027 |
35e5c24420d44023da10e53325a04a81a5e92bce | 10,590 | py | Python | setup_handler.py | BigBoss1964/discord-rules | 02257a84450388ceffbad5b6bb9e28175734403f | [
"MIT"
] | 76 | 2018-02-12T15:26:16.000Z | 2020-01-14T07:22:17.000Z | setup_handler.py | BigBoss1964/discord-rules | 02257a84450388ceffbad5b6bb9e28175734403f | [
"MIT"
] | 2 | 2018-02-19T16:17:39.000Z | 2018-02-19T16:19:36.000Z | setup_handler.py | BigBoss1964/discord-rules | 02257a84450388ceffbad5b6bb9e28175734403f | [
"MIT"
] | 34 | 2018-02-12T15:26:20.000Z | 2021-05-04T04:30:05.000Z | import discord
from discord.ext.commands import Paginator
from database import ServerData, db
def is_yes_answer(text):
return text.lower() in ['y', 'yes', 'j']
async def handle_setup(message: discord.Message, client: discord.Client):
channel: discord.TextChannel = message.channel
guild: disco... | 52.425743 | 120 | 0.530689 |
57aa1d8b843b413378cae18fb86d2259759a731e | 2,748 | py | Python | Packs/CommonScripts/Scripts/ScheduleGenericPolling/ScheduleGenericPolling.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/ScheduleGenericPolling/ScheduleGenericPolling.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/ScheduleGenericPolling/ScheduleGenericPolling.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
# Returns a comma-separated string representation of a list
# Possible inputs: null, int, str, bytes, ["","",...], [int, int], 'a,b,...', '"a","b",...', '["","",...]'
def parseIds(idsArg):
if idsArg is None:
return
... | 49.071429 | 120 | 0.608079 |
351d2cb1f7b660e03838013158c064dda7935c69 | 7,104 | py | Python | official/audio/melgan/src/model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/audio/melgan/src/model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/audio/melgan/src/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... | 34.153846 | 98 | 0.584319 |
107a40468c847f41aa60249cca026bd4ee6a6ad8 | 148 | py | Python | Tests/Mock Projects/After/Headers/Other/Python.py | SDGGiesbrecht/Workspace | e16f396fffd14b0060b5d8eb1f520f6618a0af16 | [
"Apache-2.0"
] | 94 | 2017-01-18T01:39:19.000Z | 2022-03-28T13:42:51.000Z | Tests/Mock Projects/After/Headers/Other/Python.py | SDGGiesbrecht/Workspace | e16f396fffd14b0060b5d8eb1f520f6618a0af16 | [
"Apache-2.0"
] | 59 | 2017-01-29T03:25:05.000Z | 2021-12-29T04:32:42.000Z | Tests/Mock Projects/After/Headers/Other/Python.py | SDGGiesbrecht/Workspace | e16f396fffd14b0060b5d8eb1f520f6618a0af16 | [
"Apache-2.0"
] | 6 | 2017-07-11T14:32:32.000Z | 2020-07-21T03:29:57.000Z | #!...
# Python.py
#
# This source file is part of the Headers open source project.
#
# Copyright ©[Current Date] the Headers project contributors.
| 18.5 | 62 | 0.716216 |
dcb4da90e2068879d203ced062352cc245b446bb | 2,265 | py | Python | research/nlp/gpt2/convert_tf_ckpt/save_weight_ms.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/gpt2/convert_tf_ckpt/save_weight_ms.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/gpt2/convert_tf_ckpt/save_weight_ms.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... | 37.131148 | 111 | 0.699338 |
760ab34a46b2b41a71ef2a4ca3bb4fb34a58a215 | 1,288 | py | Python | dl_module/utils/dataset_func.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | 1 | 2017-11-23T13:33:13.000Z | 2017-11-23T13:33:13.000Z | dl_module/utils/dataset_func.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | dl_module/utils/dataset_func.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | from tqdm import tqdm
import numpy as np
def char_to_vocab (sentence):
vocabulary = ['а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','ъ','ы','ь','э','ю','я',
'А','Б','В','Г','Д','Е','Ё','Ж','З','И','Й','К','Л','М','Н','О','П','Р','С','Т','У'... | 46 | 150 | 0.423913 |
0d6f17691e926d82bdf72e5eb60154b4ae2bdf78 | 1,385 | py | Python | tag_1/p_4_1bis4_listenmanipulation.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_1/p_4_1bis4_listenmanipulation.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_1/p_4_1bis4_listenmanipulation.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | """
4 Listen (Tag 1)
"""
if __name__ == '__main__':
# 4.1 Füge zwei vorher festgelegte Listen zu einer zusammen und gib das Resultat aus.
A = [3, 8, 9, 2]
B = [4, 6]
print(f'{A=}, {B=}, {(A + B)=}')
# 4.2 Entferne ein bestimmtes Element aus einer vorher festgelegten Liste.
# Es sollen _alle_ V... | 35.512821 | 89 | 0.602166 |
0dc6cdffbb7ed68009047bfd15ed7a9130a80588 | 169 | py | Python | nz_django/day1/url_name_demo/front/urls.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_django/day1/url_name_demo/front/urls.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_django/day1/url_name_demo/front/urls.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from django.urls import path
from . import views
app_name = 'front'
urlpatterns = [
path('',views.index,name='index'),
path('signin/',views.login,name='login')
] | 24.142857 | 44 | 0.680473 |
10f4fb5af8cf8130334d027b27acde9e75d61197 | 2,255 | py | Python | tests/test_standorteigenschaftengas.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_standorteigenschaftengas.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_standorteigenschaftengas.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | import pytest # type:ignore[import]
from bo4e.com.marktgebietinfo import MarktgebietInfo
from bo4e.com.standorteigenschaftengas import StandorteigenschaftenGas, StandorteigenschaftenGasSchema
from tests.serialization_helper import assert_serialization_roundtrip # type:ignore[import]
example_standorteigenschaften_ga... | 39.561404 | 118 | 0.673614 |
d556a13712600d3706d91d8c486ba8f11986c586 | 6,053 | py | Python | lale/lib/lale/orderby.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 265 | 2019-08-06T14:45:43.000Z | 2022-03-30T23:57:48.000Z | lale/lib/lale/orderby.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 467 | 2019-08-08T02:01:21.000Z | 2022-03-25T16:12:00.000Z | lale/lib/lale/orderby.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 81 | 2019-08-07T19:59:31.000Z | 2022-03-31T09:11:58.000Z | # Copyright 2020 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.258242 | 157 | 0.551132 |
f6b545bb46d946ee03c8e0f34a45bbdd2b553b91 | 696 | py | Python | BITs/2014/Baybulatova_Karina_V/task_7_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Baybulatova_Karina_V/task_7_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Baybulatova_Karina_V/task_7_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 6, Вариант 3
#Создайте игру, в которой компьютер загадывает имя одной из семи птиц, доступных с первой версии игры Angry Birds, а игрок должен его угадать.
#Байбулатова К.В.
#19.03.2016
import random
Angry_Birds=('Ред', 'Чан', 'Джей', 'Бомб', 'Матильда', 'Cтелла', 'Майти')
name=random.randint(0,6)
ra... | 27.84 | 143 | 0.685345 |
1233738378cde1ff5d0d05bb85f8dd015f463114 | 898 | py | Python | get_cpu.py | ligang945/pyMisc | 3107c80f7f53ffc797b289ec73d1ef4db80f0b63 | [
"MIT"
] | null | null | null | get_cpu.py | ligang945/pyMisc | 3107c80f7f53ffc797b289ec73d1ef4db80f0b63 | [
"MIT"
] | null | null | null | get_cpu.py | ligang945/pyMisc | 3107c80f7f53ffc797b289ec73d1ef4db80f0b63 | [
"MIT"
] | null | null | null | log = 'xshell_screen.log'
merge_cnt = 1
#-------------------------------
record = 0
with open(log, 'r') as fl:
for line in fl:
if 'front_merge' in line:
record += 1
# print(record)
#-------------------------------
avg_vm = 0.0
avg_m = 0.0
avg_cpu = 0.0
n = 0
with open(log, '... | 25.657143 | 97 | 0.449889 |
c3cd52f48c91ed3906e63dc06ecee4692ca93053 | 1,636 | py | Python | test.py | dereklm12880/rssticker | d90e8c00811d67bd9fb8104bbb6ec98aae5221f4 | [
"MIT"
] | 2 | 2020-02-26T01:54:26.000Z | 2020-04-27T20:09:14.000Z | test.py | dereklm12880/rssticker | d90e8c00811d67bd9fb8104bbb6ec98aae5221f4 | [
"MIT"
] | 17 | 2020-02-29T02:43:44.000Z | 2020-04-27T20:38:44.000Z | test.py | dereklm12880/rssticker | d90e8c00811d67bd9fb8104bbb6ec98aae5221f4 | [
"MIT"
] | 8 | 2020-02-26T21:37:36.000Z | 2020-06-23T00:01:27.000Z | import tkinter as tk
import queue
import threading
def runloop(thread_queue=None):
"""
After result is produced put it in queue
"""
result = 0
for i in range(1000):
# Do something with result
result = result + 1
thread_queue.put(result)
class MainApp(tk.Tk):
def __init__(... | 27.728814 | 70 | 0.594743 |
6170e4108a421730714a4b0be951fb5b47a177e8 | 741 | py | Python | frappe-bench/env/lib/python2.7/site-packages/cli_helpers/compat.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/cli_helpers/compat.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/cli_helpers/compat.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Python 2/3 compatibility support."""
from decimal import Decimal
import sys
PY2 = sys.version_info[0] == 2
if PY2:
text_type = unicode
binary_type = str
long_type = long
int_types = (int, long)
from backports import csv
from StringIO import StringIO
from iter... | 19 | 68 | 0.703104 |
14b9d65e558fdc427a1331e8891febf514b2a777 | 12,845 | py | Python | configure.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 18 | 2017-07-24T18:08:04.000Z | 2021-05-06T06:50:22.000Z | configure.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 19 | 2018-09-25T20:42:17.000Z | 2021-11-23T21:26:18.000Z | configure.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 11 | 2018-05-05T04:49:41.000Z | 2022-02-18T17:33:13.000Z | import configparser
import json
import re
import stat
import sys
from getpass import getpass
from os import getuid, chown, chmod
from os.path import isfile
from pwd import getpwuid, getpwnam
import yaml
from blaulichtsmscontroller import BlaulichtSmsController
from hdmiceccontroller import CecMode
from sendmail impor... | 35.680556 | 109 | 0.611833 |
2e9a0f9e53f75a03dd832cebbaeddfff850b46cd | 160 | py | Python | Crawler/links/urls.py | KelvinMarques/CrawlerPagerank | fa855cf9ee878108c03828db49bbb9403c674a43 | [
"MIT"
] | null | null | null | Crawler/links/urls.py | KelvinMarques/CrawlerPagerank | fa855cf9ee878108c03828db49bbb9403c674a43 | [
"MIT"
] | null | null | null | Crawler/links/urls.py | KelvinMarques/CrawlerPagerank | fa855cf9ee878108c03828db49bbb9403c674a43 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views as v
urlpatterns = [
path('', v.getURL, name="home"),
path('Crawler', v.crawlerView, name="Crawler")
] | 22.857143 | 50 | 0.6625 |
d312b96da45009c6a66b7abd72ea463ebaa0a78a | 3,813 | py | Python | main.py | JugendForscht-CoLoS/SunDetection-NeuralNetwork | 139bcc314cf6b5b84a82b08fda8b1e4455f7cf93 | [
"MIT"
] | 4 | 2021-02-26T15:47:28.000Z | 2021-03-04T16:46:00.000Z | main.py | JugendForscht-CoLoS/SunDetection-NeuralNetwork | 139bcc314cf6b5b84a82b08fda8b1e4455f7cf93 | [
"MIT"
] | null | null | null | main.py | JugendForscht-CoLoS/SunDetection-NeuralNetwork | 139bcc314cf6b5b84a82b08fda8b1e4455f7cf93 | [
"MIT"
] | 1 | 2021-02-24T13:01:21.000Z | 2021-02-24T13:01:21.000Z | import sun_dataset.sun_dataset
from losses.losses import TverskyLoss
from model.unet import getModel
import tensorflow_datasets as tfds
import tensorflow as tf
from tensorflow.keras.metrics import FalseNegatives, FalsePositives, TruePositives, TrueNegatives
import numpy as np
import matplotlib.pyplot as plt
... | 32.042017 | 140 | 0.709153 |
6cf0ad106a4d03db66160e041b9637d2f60ccfc4 | 437 | py | Python | ___Python/Jonas/Python/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
# Zähle die Anzahl Ordner in einem Ordner (inklusive allen Unterordnern)
def count_dirs(path):
subdirs = [subdir for subdir in path.iterdir() if subdir.is_dir()] #bestimme die direkten Unterordner des Ordners path
count = 1 #zähle ersten Ordner mit
for subdir in subdirs:
... | 27.3125 | 123 | 0.700229 |
9f5719a17d5ca30c8e7db66c8af139e97a37bd15 | 248 | py | Python | day08/functions.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day08/functions.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day08/functions.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | def greet(name="Matthias"):
print(f"Hello {name}")
print("How are you")
print("How's the weather?")
greet()
def greet_with(name, location):
print(f"Hello {name} from {location}")
greet_with(location="NurMatthias", name="Bremen")
| 20.666667 | 49 | 0.66129 |
9f88165aa792a5592ce42b6a824714e48cfbb9e3 | 5,347 | py | Python | Webpage/arbeitsstunden/models.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | Webpage/arbeitsstunden/models.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | 46 | 2022-01-08T12:03:24.000Z | 2022-03-30T08:51:05.000Z | Webpage/arbeitsstunden/models.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null |
from pprint import pprint
from django.db import models
# Create your models here.
import datetime
from django.contrib.auth.models import User
# Returns the given Winter season of a year
def getCurrentSeason():
Year = datetime.datetime.now().year
temp = season.objects.get_or_create(
year = Year
)
... | 27.561856 | 105 | 0.631382 |
2cafcd5e0340ae89045d3938a24873f22bdb3c12 | 294,234 | py | Python | sepun4.py | restufts/sepun4 | 79cef3f70972029a247639b81ebcc7fd01703f7c | [
"BSD-3-Clause"
] | null | null | null | sepun4.py | restufts/sepun4 | 79cef3f70972029a247639b81ebcc7fd01703f7c | [
"BSD-3-Clause"
] | null | null | null | sepun4.py | restufts/sepun4 | 79cef3f70972029a247639b81ebcc7fd01703f7c | [
"BSD-3-Clause"
] | null | null | null | import marshal
exec(marshal.loads(b'\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00s\x1a\x00\x00\x00d\x00d\x01l\x00Z\x00e\x01e\x00\xa0\x02d\x02\xa1\x01\x83\x01\x01\x00d\x01S\x00)\x03\xe9\x00\x00\x00\x00Ns\x9e\xd1\x01\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x... | 147,117 | 294,219 | 0.774312 |
64c3c68432f4666e1bc836c42534b8226477704a | 42 | py | Python | geol/crawler/__init__.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 8 | 2018-03-09T16:44:38.000Z | 2021-04-07T11:33:30.000Z | geol/crawler/__init__.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 4 | 2020-03-24T15:34:54.000Z | 2021-06-01T21:54:33.000Z | geol/crawler/__init__.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 1 | 2020-05-13T14:30:55.000Z | 2020-05-13T14:30:55.000Z | from .foursquare_crawler import Foursquare | 42 | 42 | 0.904762 |
03c63be6c6354b7ec0a55cae7da7e04cc51f9124 | 581 | py | Python | tests/test_web_app.py | ISalimzhanov/devops_lab1 | ea9b271d5d6fed3f85b2c90f61f4a9dd13c5ece2 | [
"PSF-2.0"
] | null | null | null | tests/test_web_app.py | ISalimzhanov/devops_lab1 | ea9b271d5d6fed3f85b2c90f61f4a9dd13c5ece2 | [
"PSF-2.0"
] | null | null | null | tests/test_web_app.py | ISalimzhanov/devops_lab1 | ea9b271d5d6fed3f85b2c90f61f4a9dd13c5ece2 | [
"PSF-2.0"
] | null | null | null | from datetime import datetime, timedelta, timezone
import pytest
from flask import Response
from flask.testing import FlaskClient
from .context import web_app
@pytest.fixture
def http_client() -> FlaskClient:
yield web_app.app.test_client()
@pytest.fixture
def moscow_time() -> datetime:
yield datetime.now... | 23.24 | 64 | 0.729776 |
45e295b11c536b5948c0f9a6291e7218f04ea59e | 1,164 | py | Python | test/example_1.py | saeyoung/tslb | 5f52646260e14f44c61a670cfc75509951e5e794 | [
"MIT"
] | null | null | null | test/example_1.py | saeyoung/tslb | 5f52646260e14f44c61a670cfc75509951e5e794 | [
"MIT"
] | 3 | 2020-03-24T18:18:21.000Z | 2021-08-23T20:37:09.000Z | test/example_1.py | saeyoung/tslb | 5f52646260e14f44c61a670cfc75509951e5e794 | [
"MIT"
] | null | null | null | #############################################################
#
# Example 1. LZW compression
#
#############################################################
import sys, os
sys.path.append("../..")
sys.path.append("..")
sys.path.append(os.getcwd())
import numpy as np
import pandas as pd
import copy
import pickle
from m... | 24.765957 | 68 | 0.438144 |
b3754ef8a216e35741610d1d0f88fa5f83927b52 | 2,519 | py | Python | tasks/views.py | eliasgruenewald/Frudo | 4fec4dbc29231d3da67481e3775cecc41af507bc | [
"MIT"
] | null | null | null | tasks/views.py | eliasgruenewald/Frudo | 4fec4dbc29231d3da67481e3775cecc41af507bc | [
"MIT"
] | null | null | null | tasks/views.py | eliasgruenewald/Frudo | 4fec4dbc29231d3da67481e3775cecc41af507bc | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views import generic
from django.contrib.auth.models import User
from django.urls import reverse_lazy, reverse
from django.core.mail import EmailMessage
from django.utils import timezone
from .models import Task, ... | 35.985714 | 109 | 0.720921 |
2fe455194454d3eb71f2b53a80c2700e06d9041b | 161 | py | Python | testZip.py | wanglikang/zzuARTensorflow2 | 2e31108ca90f183ab93309aa481de1dd88f98a9b | [
"MIT"
] | null | null | null | testZip.py | wanglikang/zzuARTensorflow2 | 2e31108ca90f183ab93309aa481de1dd88f98a9b | [
"MIT"
] | null | null | null | testZip.py | wanglikang/zzuARTensorflow2 | 2e31108ca90f183ab93309aa481de1dd88f98a9b | [
"MIT"
] | null | null | null | #coding:utf-8
from utils.ZipUtil import ZipUtil
zp = ZipUtil()
zp.zip_dir('/home/wlk/PycharmProjects/testZipOutoput',100,'/home/wlk/PycharmProjects/out.zip')
| 20.125 | 94 | 0.770186 |
4424a51a95c42a077c9552d10d20870b242fc832 | 2,334 | py | Python | src/training/pytorch/symbol_detector_training.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2020-04-17T12:27:06.000Z | 2020-04-17T12:27:06.000Z | src/training/pytorch/symbol_detector_training.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2022-02-27T13:13:17.000Z | 2022-02-27T13:13:17.000Z | src/training/pytorch/symbol_detector_training.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | null | null | null | from os import path
import torch
from torch.utils.data import DataLoader, random_split
from spot import Spot
from symbol_detector_dataset import SymbolDataSet
from symbol_detector_model import SymbolDetector
annotation_file = path.join("data", "iftomm_dach_interim_01", "config.json")
data = SymbolDataSet(annotation... | 28.814815 | 81 | 0.657669 |
2be82b905dcf236f367b0e3ac86dc76ba97f2069 | 1,812 | py | Python | tests/envs/pendulum/pendulum_calc_test.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 34 | 2021-12-09T07:12:57.000Z | 2022-03-11T08:17:20.000Z | tests/envs/pendulum/pendulum_calc_test.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | null | null | null | tests/envs/pendulum/pendulum_calc_test.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 4 | 2021-12-11T07:48:01.000Z | 2022-03-01T23:50:33.000Z | import chex
import numpy.testing as npt
import pytest
from shinrl import Pendulum
@pytest.fixture
def setUp():
config = Pendulum.DefaultConfig(dA=5)
return config
def test_to_discrete_act(setUp):
from shinrl.envs.pendulum.calc import to_discrete_act
config = setUp
act = to_discrete_act(config,... | 23.230769 | 59 | 0.716336 |
34168c3a248534bc8d023a2277ec603faecf9d6c | 180 | py | Python | climbing-stairs/climbing-stairs.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | climbing-stairs/climbing-stairs.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | climbing-stairs/climbing-stairs.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def climbStairs(self, n: int) -> int:
dp=[1,2]
for _ in range(max(0, n-2)):
dp.append(dp[-1]+dp[-2])
return dp[n-1]
| 25.714286 | 41 | 0.461111 |
34300038866bcdd1e83517596eac7f076f409897 | 1,130 | py | Python | apps/grolsch/management/commands/update_prices.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | apps/grolsch/management/commands/update_prices.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | apps/grolsch/management/commands/update_prices.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | import math
from django.core import mail
from django.core.management import BaseCommand
from apps.grolsch.models import Product, UnresolvedPriceChange
from apps.grolsch.scraping import DeKlok
class Command(BaseCommand):
help = 'Updates prices of all price-tracked Grolsch products'
def handle(self, *args, **... | 33.235294 | 84 | 0.645133 |
caa4096dd6255f4e00ce2cdde5a69b8b424f23b8 | 3,330 | py | Python | IF11C/ITT/Codes/e_Werkstatttore_mit_Change_und_OPCUA_Bernhardt_ohne_Kommentare.py | Semoxeaa/sjsaueressig.github.io | 55f81360e1285b46bb67b89d16060479be297489 | [
"MIT"
] | 1 | 2021-12-13T08:07:14.000Z | 2021-12-13T08:07:14.000Z | IF11C/ITT/Codes/e_Werkstatttore_mit_Change_und_OPCUA_Bernhardt_ohne_Kommentare.py | Semoxeaa/sjsaueressig.github.io | 55f81360e1285b46bb67b89d16060479be297489 | [
"MIT"
] | null | null | null | IF11C/ITT/Codes/e_Werkstatttore_mit_Change_und_OPCUA_Bernhardt_ohne_Kommentare.py | Semoxeaa/sjsaueressig.github.io | 55f81360e1285b46bb67b89d16060479be297489 | [
"MIT"
] | null | null | null | #Version 1.1
#Erstellt am: 06.07.2021
#Ersteller: Rol
#Zweck: Werkstatttorüberwachung mit Änderungskennzeichen.
#Änderungshistory
#Verwendung
# Import Module
import RPi.GPIO as GPIO
import time
# Module für OPCUA
from random import randint
from opcua import ua, uamethod, Server
from opcua.ua import ObjectIds
impo... | 28.956522 | 129 | 0.702402 |
cad0455c39eb30b630c8dcf43e2c59e3fa9b6dcd | 1,080 | py | Python | src/onegov/gazette/views/exceptions.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/views/exceptions.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/views/exceptions.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.security import Public
from onegov.gazette import _
from onegov.gazette import GazetteApp
from onegov.gazette.layout import Layout
from webob.exc import HTTPForbidden
from webob.exc import HTTPNotFound
@GazetteApp.html(
model=HTTPForbidden, permission=Public, template='exception.pt'
)
def handle_... | 26.341463 | 77 | 0.676852 |
ca741b17817bdc1a095b74c74bcc55fbd878cb2c | 4,404 | py | Python | cracked-yc/mbf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | cracked-yc/mbf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | cracked-yc/mbf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | try:
import os
from time import sleep
from random import choice
from random import randint
from faker import Faker
except:
print("Installing....")
os.system("pip install faker")
fake = Faker("id_ID")
col = lambda code: "\x1b[1;"+str(code)+"m"
logo = """
%s _ _ %s\ \\
%s .-------. / \_> /\... | 27.185185 | 127 | 0.490463 |
8e1434a6e773739adaf1827eaafbe259639f99b0 | 4,986 | py | Python | task_1/data_retrieval/get_comments.py | strumswell/sentiment-apple-events | b6f4f7799374aba757874f5426b3a2c1bf7d29b5 | [
"MIT"
] | 1 | 2022-02-28T22:02:50.000Z | 2022-02-28T22:02:50.000Z | task_1/data_retrieval/get_comments.py | strumswell/sentiment-apple-events | b6f4f7799374aba757874f5426b3a2c1bf7d29b5 | [
"MIT"
] | null | null | null | task_1/data_retrieval/get_comments.py | strumswell/sentiment-apple-events | b6f4f7799374aba757874f5426b3a2c1bf7d29b5 | [
"MIT"
] | null | null | null | # %% Import dependencies
import praw
import pandas as pd
import config
# %% Connect with Reddit
reddit = praw.Reddit(
user_agent=config.user_agent,
client_id=config.client_id,
client_secret=config.client_secret,
username=config.username,
password=config.password,
)
# %% Get data
event_links = {... | 56.022472 | 119 | 0.724228 |
6d4945651a24406591ca5c0d6caaf520f3fd814f | 427 | py | Python | 1525-number-of-good-ways-to-split-a-string/1525-number-of-good-ways-to-split-a-string.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 1525-number-of-good-ways-to-split-a-string/1525-number-of-good-ways-to-split-a-string.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 1525-number-of-good-ways-to-split-a-string/1525-number-of-good-ways-to-split-a-string.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def numSplits(self, s: str) -> int:
length = len(s)
first, last = {}, {}
for k, v in enumerate(s):
if v not in first:
first[v] = k
last[v] = k
first_last = list(first.values())+list(last.values())
f... | 30.5 | 61 | 0.491803 |
b61636e68606de28e3ab0bcc532cac1393248c82 | 810 | py | Python | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/key_board_control.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/key_board_control.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/key_board_control.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | # control the position of a ball using the arrow keys
import simplegui
# Initialize globals
WIDTH = 600
HEIGHT = 400
BALL_RADIUS = 20
ball_pos = [WIDTH / 2, HEIGHT / 2]
# define event handlers
def draw(canvas):
canvas.draw_circle(ball_pos, BALL_RADIUS, 2, "Red", "White")
def keydown(key):
vel = 4
if ke... | 22.5 | 72 | 0.664198 |
fce3e273ca749e110a7a6460aeebbe296b6a283a | 462 | py | Python | python/concurrency/tutorial/executor.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/concurrency/tutorial/executor.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/concurrency/tutorial/executor.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import logging
import time
import concurrent.futures
def thread_function(name):
logging.info(f'Thread {name}: starting')
time.sleep(2)
logging.info(f'Thread {name}: finishing')
if __name__ == "__main__":
format = "%(asctime)s: %(message)s"
logging.basicConfig(format=format, level=logging.INFO, da... | 27.176471 | 78 | 0.709957 |
1e2b2030ac8aaf4e94648306fd1f43d494cff9b6 | 10,488 | py | Python | gateinterface.py | s9409552/PiOpener | 402762bbc81ed788cc83efee1c1f0ef8d7635be2 | [
"MIT"
] | null | null | null | gateinterface.py | s9409552/PiOpener | 402762bbc81ed788cc83efee1c1f0ef8d7635be2 | [
"MIT"
] | null | null | null | gateinterface.py | s9409552/PiOpener | 402762bbc81ed788cc83efee1c1f0ef8d7635be2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
...
'''
from flask import Flask, render_template, Response, request
import cv2
import pyaudio
import threading
import subprocess
import time
import wave
import pigpio
app = Flask(__name__)
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 44100
CHUNK = 1024
killHouseAudio ... | 29.880342 | 118 | 0.495995 |
1e949d1e651afb4f3d1629ce20631d91f28e1e2a | 3,611 | py | Python | tests/test_check.py | datumbox/model-index | a39af5f8aaa2a90b8fc7180744a855282360067a | [
"MIT"
] | 12 | 2021-02-26T08:19:00.000Z | 2022-01-26T14:00:16.000Z | tests/test_check.py | datumbox/model-index | a39af5f8aaa2a90b8fc7180744a855282360067a | [
"MIT"
] | null | null | null | tests/test_check.py | datumbox/model-index | a39af5f8aaa2a90b8fc7180744a855282360067a | [
"MIT"
] | 3 | 2021-03-19T13:51:56.000Z | 2021-08-25T05:25:52.000Z | import modelindex
import pytest
from modelindex import Metadata
from modelindex.models.Collection import Collection
from modelindex.models.CollectionList import CollectionList
from modelindex.models.Model import Model
from modelindex.models.ModelList import ModelList
from modelindex.models.Result import Result
from mod... | 32.241071 | 71 | 0.689006 |
a20b2c5e5092943182f8adef6bbba016cdab3e7a | 599 | py | Python | tools/untils.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | 15 | 2018-05-16T02:39:01.000Z | 2021-05-22T13:12:55.000Z | tools/untils.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | null | null | null | tools/untils.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | 9 | 2018-05-16T00:47:34.000Z | 2021-11-26T05:39:48.000Z | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
@File : untils.py
Description :
@Author : pchaos
date: 18-4-10
-------------------------------------------------
Change Activity:
18-4-10:
@Contact : p19992003#gmail.com
-----------------... | 19.322581 | 54 | 0.434057 |
bf7c4b9d20df232487b3f4d8249d559469754d01 | 433 | py | Python | PINp/2014/Koleganov_N_S/task_2_10.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Koleganov_N_S/task_2_10.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Koleganov_N_S/task_2_10.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 10.
# Напишите программу, которая будет выводить на экран наиболее понравившееся вам
# высказывание, автором которого является Юстиниан. Не забудьте о том, что
# автор должен быть упомянут на отдельной строке.
# Колеганов Никита Сергеевич
# 29.05.2016
print("Весьма несправедливо не принимать подарк... | 39.363636 | 96 | 0.778291 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.