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
0c3eba736f647bf4da4d0331426a996dececb82e
662
py
Python
globals/browsers.py
adblockplus/web.adblockplus.org
c2c570ce4f4296afc3577afe233c6b23b128f206
[ "MIT" ]
9
2016-01-29T18:05:29.000Z
2021-10-06T04:21:55.000Z
globals/browsers.py
adblockplus/web.adblockplus.org
c2c570ce4f4296afc3577afe233c6b23b128f206
[ "MIT" ]
9
2015-04-06T19:03:32.000Z
2019-05-28T13:34:55.000Z
globals/browsers.py
adblockplus/web.adblockplus.org
c2c570ce4f4296afc3577afe233c6b23b128f206
[ "MIT" ]
18
2015-04-06T17:42:31.000Z
2021-10-06T04:26:29.000Z
browsers = [ { 'id': 'chrome', 'name': 'Chrome' }, { 'id': 'chromium', 'name': 'Chromium' }, { 'id': 'firefox', 'name': 'Firefox' }, { 'id': 'safari', 'name': 'Safari' }, { 'id': 'msie', 'name': 'Internet Explorer' }, { 'id': 'mse...
13.791667
32
0.380665
a76cedf207ceaf1dba4e55be50b4825c950cf26b
282
py
Python
python_gui_tkinter/Tkinter/TkinterCourse/31_img.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python_gui_tkinter/Tkinter/TkinterCourse/31_img.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python_gui_tkinter/Tkinter/TkinterCourse/31_img.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
from tkinter import * canvas_width = 1200 canvas_height = 700 master = Tk() canvas = Canvas(master, width=canvas_width, height=canvas_height) canvas.pack() img = PhotoImage(file="python1.png") canvas.create_image(20,20, anchor=NW, image=img) mainloop()
16.588235
48
0.687943
ac6c41a6e70911398c2e4b2ef3e3cdf63f92af8e
284
py
Python
pacman-arch/test/pacman/tests/epoch001.py
Maxython/pacman-for-termux
3b208eb9274cbfc7a27fca673ea8a58f09ebad47
[ "MIT" ]
23
2021-05-21T19:11:06.000Z
2022-03-31T18:14:20.000Z
source/pacman-6.0.1/test/pacman/tests/epoch001.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
11
2021-05-21T12:08:44.000Z
2021-12-21T08:30:08.000Z
source/pacman-6.0.1/test/pacman/tests/epoch001.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Sysupgrade with a sync package having higher epoch" sp = pmpkg("dummy", "1:1.0-1") self.addpkg2db("sync", sp) lp = pmpkg("dummy", "1.1-1") self.addpkg2db("local", lp) self.args = "-Su" self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_VERSION=dummy|1:1.0-1")
21.846154
71
0.68662
5a743522463540cb50f845c916172aa0aeb13ce3
1,156
py
Python
src/python3_learn_video/object_introduce.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/python3_learn_video/object_introduce.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/python3_learn_video/object_introduce.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
""" 对象 = 属性 + 方法 """ class Turtle: # Python 中的类名约定以大写字母开头 """关于类的一个简单例子""" # 属性 color = 'green' weight = 10 legs = 4 shell = True mouth = '大嘴' # 方法 def climb(self): print('我正在很努力的向前爬....') def run(self): print('我正在快速的向前跑.....') def bite(self)...
13.6
51
0.439446
b2d8c07d3c9158693e0174a80f7ca8a486fcee1e
5,573
py
Python
Packs/CircleCI/Integrations/CircleCI/CircleCI_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CircleCI/Integrations/CircleCI/CircleCI_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CircleCI/Integrations/CircleCI/CircleCI_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import io import json import pytest from typing import Tuple, Dict from CircleCI import Client, circleci_workflows_list_command, circleci_artifacts_list_command, \ circleci_workflow_jobs_list_command, circleci_workflow_last_runs_command, DEFAULT_LIMIT_VALUE from CommonServerPython import CommandResults fake_clien...
55.73
118
0.499372
336f1b7a21506cfec58038472545773c94776183
6,053
py
Python
source/pkgsrc/devel/gyp/patches/patch-pylib_gyp_generator_make.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/gyp/patches/patch-pylib_gyp_generator_make.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/gyp/patches/patch-pylib_gyp_generator_make.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-pylib_gyp_generator_make.py,v 1.4 2014/08/25 13:20:12 fhajny Exp $ Force platform libtool na Darwin, see https://code.google.com/p/gyp/issues/detail?id=354&q=libtool Also, don't try to use thin archives on NetBSD, they appear not to work ("ar t <archive>" says "Malformed archive"). --- pylib/gyp/gener...
48.424
181
0.660995
682006cc2da0265d494def28096008e59c9efc4d
257
py
Python
AFluentPython/process_thread/multiprocess.py
RoboCuper-hujinlei/AI-Job
cf7a081d59700d75f0f2dc73b6d5130863796f01
[ "Apache-2.0" ]
null
null
null
AFluentPython/process_thread/multiprocess.py
RoboCuper-hujinlei/AI-Job
cf7a081d59700d75f0f2dc73b6d5130863796f01
[ "Apache-2.0" ]
null
null
null
AFluentPython/process_thread/multiprocess.py
RoboCuper-hujinlei/AI-Job
cf7a081d59700d75f0f2dc73b6d5130863796f01
[ "Apache-2.0" ]
null
null
null
""" python multiprocessing 跨平台多进程模块 """ from multiprocessing import Process import os def run_proc(name): print(f'Run child process {name}: ({os.getpid()})...') # run_proc('th1') if __name__ == '__main__': print(f'Parent process: {os.getpid()}')
18.357143
58
0.673152
68478ff3680d97ad6b7fff54608144d9b26e853e
2,047
py
Python
backend/products/views.py
saulhappy/drf
5e62da54cdf0f0fead742c891d34e7eacd488a1b
[ "MIT" ]
null
null
null
backend/products/views.py
saulhappy/drf
5e62da54cdf0f0fead742c891d34e7eacd488a1b
[ "MIT" ]
null
null
null
backend/products/views.py
saulhappy/drf
5e62da54cdf0f0fead742c891d34e7eacd488a1b
[ "MIT" ]
null
null
null
from requests import request from rest_framework import generics, permissions from api.mixins import StaffEditorPermissionMixin, UserQuerySetMixin from products.models import Product from products.serializers import ProductSerializer class ProductDetailAPIView( UserQuerySetMixin, generics.RetrieveAPIView, StaffEd...
29.666667
77
0.740107
04587c005a73d1b54891b78c8cea19137fd9377b
2,001
py
Python
Calculation/calculation_with_D.py
Tocha4/-Displacement--Chromatography
0baf4f9e2d23b39f610217b048d799c6403a259e
[ "MIT" ]
2
2020-11-25T07:53:48.000Z
2021-09-19T14:19:51.000Z
Calculation/calculation_with_D.py
Tocha4/-Displacement--Chromatography
0baf4f9e2d23b39f610217b048d799c6403a259e
[ "MIT" ]
null
null
null
Calculation/calculation_with_D.py
Tocha4/-Displacement--Chromatography
0baf4f9e2d23b39f610217b048d799c6403a259e
[ "MIT" ]
null
null
null
import time import numpy as np from column_01 import Column from pump_01 import Pump from sample_01 import Sample from interaction_01 import Interaction from calculation_current import Simu import os print(os.listdir()) if 'functions_with_D' in os.listdir(): from functions_with_D import Functions else: from C...
31.761905
101
0.616692
501d4569b58f1c43016a07aee0dd51437c1d48ce
351
py
Python
exercises/pt/solution_02_10_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/solution_02_10_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/solution_02_10_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy nlp = spacy.load("pt_core_news_md") doc = nlp("Visitamos um excelente restaurante. Em seguida fomos a um ótimo bar.") # Crie partições para "excelente restaurante" e "ótimo bar" span1 = doc[2:4] span2 = doc[10:12] print(span1) print(span2) # Obtenha a similaridade das partições similarity = span1.simil...
21.9375
81
0.754986
a8778a2d8f225995842a7529f1610fcb2971dcff
501
py
Python
doc/examples/packages/package_cythran/package_cythran/calcul.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/examples/packages/package_cythran/package_cythran/calcul.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/examples/packages/package_cythran/package_cythran/calcul.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
import numpy as np from transonic import boost, Type, Array, NDim, set_backend_for_this_module set_backend_for_this_module("pythran") T = Type(np.int32, np.float64, np.float32) A = Array[T, NDim(2)] @boost def laplace(image: A): """Laplace operator in NumPy for 2D images.""" laplacian = ( image[:-2...
21.782609
75
0.588822
a8ae472868a80064b156a405655f56ad60391a28
433
py
Python
Webpage/blog/forms.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
Webpage/blog/forms.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
46
2022-01-08T12:03:24.000Z
2022-03-30T08:51:05.000Z
Webpage/blog/forms.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
from django import forms from django.forms import ModelForm from django.core.exceptions import ValidationError from django.forms import fields from django.utils.translation import ugettext_lazy as _ from phonenumber_field.formfields import PhoneNumberField from tinymce.widgets import TinyMCE from .models import blogPo...
25.470588
57
0.789838
508b6d222804fc63d4cc0b8698c950410b3c8c75
2,578
py
Python
frds/measures/func_bank_z_score.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
31
2020-06-17T13:19:12.000Z
2022-03-27T08:56:38.000Z
frds/measures/func_bank_z_score.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
null
null
null
frds/measures/func_bank_z_score.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
8
2020-06-14T15:21:51.000Z
2021-09-29T06:28:53.000Z
import numpy as np def z_score(roa: float, capital_ratio: float, past_roas: np.ndarray) -> float: r"""Z-score A measure of bank insolvency risk, defined as: $$ \text{Z-score} = \frac{\text{ROA}+\text{CAR}}{\sigma_{\text{ROA}}} $$ where $\text{ROA}$ is the bank's ROA, $\text{CAR}$ is the ban...
48.641509
138
0.653607
ba066e403d0a2fcc3e236db9bda922b65a5fae78
1,650
py
Python
handler/GenericApiHandler.py
wchming1987/Tumbler
e309771779c8eb44e685adbb691a428d29009e05
[ "Apache-2.0" ]
null
null
null
handler/GenericApiHandler.py
wchming1987/Tumbler
e309771779c8eb44e685adbb691a428d29009e05
[ "Apache-2.0" ]
null
null
null
handler/GenericApiHandler.py
wchming1987/Tumbler
e309771779c8eb44e685adbb691a428d29009e05
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding=utf-8 -*- import json from tornado.web import RequestHandler, HTTPError import pymongo FORM_REPRESENTATION = '' JSON_REPRESENTATION = 'application/json' HTTP_BAD_REQUEST = 400 HTTP_FORBIDDEN = 403 HTTP_NOT_FOUND = 404 class GenericApiHandler(RequestHandler): """ The purpose...
31.730769
90
0.600606
ba29ca9bbdfa4034dfe13b1f64ea12d30bbf4923
3,446
py
Python
7-assets/past-student-repos/LambdaSchool-master/m7/74a1/day2.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/LambdaSchool-master/m7/74a1/day2.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/LambdaSchool-master/m7/74a1/day2.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Problem 1: Two Sum class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ # Given an array of integers, return indices of the two numbers such that they add up to a specific target. # You ...
30.767857
201
0.548172
2cfb8a9e6c36a1c557b03fb7463c8e214fbe1449
92
py
Python
2014/09/table-state-debt-protections/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2014/09/table-state-debt-protections/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2014/09/table-state-debt-protections/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 = '1UfWWQPek40kyjAu13zIbNkvUjUxsyDHw-xvFAZZjsLA'
23
68
0.836957
d70a2d0e05afce86a65eb5c0c7b0b4b335355c51
628
py
Python
Interview Preparation Kits/Interview Preparation Kit/Sorting/Sorting: Bubble Sort/bubble_sort.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/Sorting/Sorting: Bubble Sort/bubble_sort.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Interview Preparation Kits/Interview Preparation Kit/Sorting/Sorting: Bubble Sort/bubble_sort.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys # Complete the countSwaps function below. def countSwaps(a): n = len(a) count = 0 for i in range(n): for j in range(n-1): if a[j] > a[j+1]: tmp = a[j] a[j] = a[j+1] a...
18.470588
53
0.506369
d15f8f420c6ec1a3e00d5a89ac3ae1f28d487841
394
py
Python
Versuch3/task1.1.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch3/task1.1.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch3/task1.1.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
1
2022-01-06T12:47:53.000Z
2022-01-06T12:47:53.000Z
from TekTDS2000 import * scope = TekTDS2000() # Einlesen vom Channel 1 und vom Channel 2 scope.saveCsv(filename='versuch3/kleinerLautsprecher/100.csv', ch=1) scope.saveCsv(filename='100_2.csv', ch=2) # Einlesen der Frequenz und der Periode frequency = scope.getFreq(1) period = scope.getPeriod(1) # Ausgeben der Frequ...
26.266667
68
0.766497
0f05a017ee32868d8d4019d8110cff01aedb2524
8,457
py
Python
research/cv/siamRPN/src/evaluation.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/siamRPN/src/evaluation.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/siamRPN/src/evaluation.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...
41.053398
117
0.554097
0e5f207e1c579d7f5fa8a8929dfe91a057ab4b6e
2,604
py
Python
examples/text_correction/ernie-csc/export_model.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
examples/text_correction/ernie-csc/export_model.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
examples/text_correction/ernie-csc/export_model.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# -*- coding: UTF-8 -*- # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
40.6875
156
0.622888
70d5ff9cb1047424cb3978c8a7246c8748053807
1,073
py
Python
apps/quiver/migrations/0004_analyticsserviceexecution.py
IT-PM-OpenAdaptronik/Webapp
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
2
2017-12-17T21:28:22.000Z
2018-02-02T14:44:58.000Z
apps/quiver/migrations/0004_analyticsserviceexecution.py
IT-PM-OpenAdaptronik/Webapp
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
118
2017-10-31T13:45:09.000Z
2018-02-24T20:51:42.000Z
apps/quiver/migrations/0004_analyticsserviceexecution.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
null
null
null
# Generated by Django 2.0 on 2019-04-26 12:24 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
38.321429
139
0.665424
70db54441aa54b5c1826421c2524a53b1fb554a1
5,083
py
Python
src/pfun/functions.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
126
2019-09-16T15:28:20.000Z
2022-03-20T10:57:53.000Z
src/pfun/functions.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
54
2019-09-30T08:44:01.000Z
2022-03-20T11:10:00.000Z
src/pfun/functions.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
11
2020-01-02T08:32:46.000Z
2022-03-20T11:10:24.000Z
import functools import inspect from typing import Any, Callable, Generic, Tuple, TypeVar from .immutable import Immutable A = TypeVar('A') B = TypeVar('B') C = TypeVar('C') def identity(v: A) -> A: """ The identity function. Just gives back its argument Example: >>> identity('value') '...
22.793722
78
0.540822
1debc1d832e5bb7b7bbae724c08f377029080340
1,631
py
Python
hisim/components/transformer.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
12
2021-10-05T11:38:24.000Z
2022-03-25T09:56:08.000Z
hisim/components/transformer.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
6
2021-10-06T13:27:55.000Z
2022-03-10T12:55:15.000Z
hisim/components/transformer.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
4
2022-02-21T19:00:50.000Z
2022-03-22T11:01:38.000Z
# Owned from hisim.component import Component, SingleTimeStepValues, ComponentInput, ComponentOutput from hisim import loadtypes as lt from hisim.simulationparameters import SimulationParameters class Transformer(Component): TransformerInput = "Input1" TransformerInput2 = "Optional Input1" TransformerOutpu...
49.424242
142
0.761496
aaa226c57c900244d0bdf47c3c39dd9ba552ab93
948
py
Python
7-assets/past-student-repos/LambdaSchool-master/m7/71e1/hashtables/ex1/ex1_tests.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/LambdaSchool-master/m7/71e1/hashtables/ex1/ex1_tests.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/LambdaSchool-master/m7/71e1/hashtables/ex1/ex1_tests.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
import unittest from ex1 import get_indices_of_item_weights class TestEx1(unittest.TestCase): def test_ex1_1(self): weights_1 = [9] answer_1 = get_indices_of_item_weights(weights_1, 1, 9) self.assertTrue(answer_1 is None) def test_ex1_2(self): weights_2 = [4, 4] answe...
27.882353
64
0.630802
aac65c2443408dd44a2a1ed03cb6be2dea43106e
1,530
py
Python
bearpi-hm_nano-oh_flower/00_src/bearpi-hm_nano_oh_fun/build/lite/setup.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/build/lite/setup.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.3/build/lite/setup.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2020 Huawei Device 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 ...
31.22449
74
0.668627
9309c40fc73d55bbb646a2a5a468f4242b2a94a5
167
py
Python
furniture_store/furniture_store/web/validators.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
1
2022-03-03T10:16:14.000Z
2022-03-03T10:16:14.000Z
furniture_store/furniture_store/web/validators.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
furniture_store/furniture_store/web/validators.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
from django.core.exceptions import ValidationError def validate_min_price(value): if value <= 0: raise ValidationError('Price must be positive number!')
23.857143
63
0.742515
17be761c0fc0d7ada774d93be4698867fc568651
1,612
py
Python
official/cv/c3d/src/tools/ckpt_convert.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/c3d/src/tools/ckpt_convert.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/c3d/src/tools/ckpt_convert.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...
35.043478
79
0.707196
17fbd1cbc70a96f19c45d1dd0f121bad2c6d6e97
3,243
py
Python
python/readJson.py
Greakz/mdh-cmake-cubevis
6c64ec0e14dcdd07e69fa1f018aa7954eeeaf173
[ "MIT" ]
null
null
null
python/readJson.py
Greakz/mdh-cmake-cubevis
6c64ec0e14dcdd07e69fa1f018aa7954eeeaf173
[ "MIT" ]
5
2021-08-24T11:09:54.000Z
2021-08-24T21:14:15.000Z
python/readJson.py
Greakz/mdh-cmake-cubevis
6c64ec0e14dcdd07e69fa1f018aa7954eeeaf173
[ "MIT" ]
null
null
null
def readConstants(constants_list): constants = [] for attribute, value in constants_list.items(): constants.append({"name": attribute, "cname": "c_" + attribute, "value": value}) return constants def readClocks(clocks_lists): clocks = {"par": [], "seq": []} for attribute, value in clocks_...
47.691176
115
0.5609
a4e0d84eac4640d28599a5d7e6360fd28fbdebd6
529
py
Python
python_lib/OmegaExpansion/onionI2C.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
2
2019-09-25T13:39:22.000Z
2019-09-26T10:06:13.000Z
python_lib/OmegaExpansion/onionI2C.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
44
2019-09-25T14:35:48.000Z
2021-08-20T17:26:12.000Z
python_lib/OmegaExpansion/onionI2C.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
8
2019-09-25T13:53:07.000Z
2022-02-24T19:23:44.000Z
import random class OnionI2C(object): def __init__(self): print('[orange]I2C: init onionI2C') def writeByte(self, devAddress, address, value): print('[orange]I2C: write to device "%x" on address 0x%02x the value 0x%02x' % (devAddress, address, value)) def readBytes(self, devAddress, address, size): print('[...
31.117647
116
0.705104
a4e8793b7f82209247b7bd8e0a4d05c0afe7a245
145
py
Python
Beginner/03. Python/qr-coder/qrcoder.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
3
2021-03-16T16:44:04.000Z
2021-06-07T17:32:51.000Z
Beginner/03. Python/qr-coder/qrcoder.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
null
null
null
Beginner/03. Python/qr-coder/qrcoder.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
2
2020-10-12T15:58:02.000Z
2020-10-20T05:31:11.000Z
import pyqrcode, sys data = sys.argv[1] for ch in enumerate(data): qrch = pyqrcode.create(ch[1]) qrch.png('./qrs/'+str(ch[0])+'.png', scale=6)
24.166667
46
0.655172
3505121efb46dfcafb96e1279683a59f1bb111fb
885
py
Python
volley/concurrency.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
8
2022-02-24T14:59:24.000Z
2022-03-31T04:37:55.000Z
volley/concurrency.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
3
2022-02-27T17:08:52.000Z
2022-03-18T13:11:01.000Z
volley/concurrency.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
2
2022-02-24T15:03:07.000Z
2022-03-15T03:12:00.000Z
import asyncio import contextvars import functools from typing import Any, Awaitable, Callable from volley.util import FuncEnvelope async def run_in_threadpool(func: Callable[..., Any], *args: Any) -> Any: loop = asyncio.get_event_loop() child = functools.partial(func, *args) context = contextvars.copy_c...
27.65625
78
0.683616
35422aee7b446637d87eafdf2812c2c57a976621
3,884
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/icx/test_icx_ping.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_ping.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_ping.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_collect...
44.643678
129
0.679712
52cf303b394a69fea65dd94904d08bb4f6c8a0e6
916
py
Python
Algorithms/Sorting/QuickSortInPlace.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Sorting/QuickSortInPlace.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Sorting/QuickSortInPlace.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
#coding:utf-8 n = int(raw_input()) ar = map(int, raw_input().split()) def quick_sort_lomuto(ar, low, high): if high-low < 1: return p = ar[high] i = low for j in xrange(low, high): if ar[j] < p: ar[j], ar[i] = ar[i], ar[j] i += 1 ar[i], ar[high] = p, ...
19.489362
41
0.426856
d82eb559660e77f85696bcdf9d0fabea7101652f
1,316
py
Python
src/service/MeteorologyService.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
src/service/MeteorologyService.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
src/service/MeteorologyService.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
from concurrent.futures.process import ProcessPoolExecutor from datetime import datetime from dateutil.relativedelta import relativedelta from type import PathLike from utils.db.dao import MeteorologyDao, StationDao from utils.io.JLoader import read_j from utils.io.XLoader import get_j_files_list __all__ = ["extract...
28.608696
82
0.708207
52092148ede78d0d5d858723a5f8ca2efafdcd29
1,961
py
Python
workshop_petstagram/workshop_petstagram/main/views/pet_photos.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
1
2022-03-03T10:16:14.000Z
2022-03-03T10:16:14.000Z
workshop_petstagram/workshop_petstagram/main/views/pet_photos.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
workshop_petstagram/workshop_petstagram/main/views/pet_photos.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from workshop_petstagram.main.forms import EditPetPhotoForm, AddPetPhotoForm from workshop_petstagram.main.models import PetPhoto from workshop_petstagram.main.templatetags.profiles import has_profile def add_pet_photo(request): if not has_profile(): return r...
24.209877
76
0.648649
876c927fe69abadda45b0210c40e8cfb5884958d
22,978
py
Python
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/test_data/constants.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/test_data/constants.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/GetFailedTasks/test_data/constants.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
INCIDENTS_RESULT = [ {'ModuleName': 'InnerServicesModule', 'Brand': 'Builtin', 'Category': 'Builtin', 'ID': '', 'Version': 0, 'Type': 1, 'Contents': { 'ErrorsPrivateDoNotUse': None, 'data': [ { 'CustomFields': {'dbotpredictionprobability': 0, ...
73.178344
120
0.400296
876e608ab1ad7269c5b3143258735f34b8ee792d
6,885
py
Python
Paddle_Industry_Practice_Sample_Library/nlp_projects/event_extraction/ernie/train.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-12T06:52:43.000Z
2022-01-12T06:52:43.000Z
Paddle_Industry_Practice_Sample_Library/nlp_projects/event_extraction/ernie/train.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
null
null
null
Paddle_Industry_Practice_Sample_Library/nlp_projects/event_extraction/ernie/train.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
48.485915
186
0.719971
5e84984ae0f06d786328916607bcc1625391072b
562
py
Python
Python/B6-4Digit_Anzeige/4Digit_AnzeigeV1.py
frankyhub/Calliope
335f0ef5ca9bcf57e14166319501ec9086bc09bf
[ "MIT" ]
null
null
null
Python/B6-4Digit_Anzeige/4Digit_AnzeigeV1.py
frankyhub/Calliope
335f0ef5ca9bcf57e14166319501ec9086bc09bf
[ "MIT" ]
null
null
null
Python/B6-4Digit_Anzeige/4Digit_AnzeigeV1.py
frankyhub/Calliope
335f0ef5ca9bcf57e14166319501ec9086bc09bf
[ "MIT" ]
null
null
null
_4digit: grove.TM1637 = None def on_forever(): global _4digit if input.button_is_pressed(Button.A): _4digit = grove.create_display(DigitalPin.C16, DigitalPin.C17) _4digit.bit(1, 3) basic.pause(1000) _4digit.bit(2, 3) basic.pause(1000) _4digit.bit(3, 3) ...
26.761905
71
0.571174
0de689074f3d0903c9e424541e0d4a0beb6145f1
704
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v6_0/fix_outstanding_amount.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_0/fix_outstanding_amount.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v6_0/fix_outstanding_amount.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.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt def execute(): for dt, party_field, account_field in ((...
44
86
0.738636
df66648f74dafed3138c1218f750827e93a15a4f
1,536
py
Python
contest_server/pjkiserver/storage/database.py
amrohendawi/AlphaZero-implementation
42103e63308ba256208b6dd6ddcbef2e797e9932
[ "MIT" ]
null
null
null
contest_server/pjkiserver/storage/database.py
amrohendawi/AlphaZero-implementation
42103e63308ba256208b6dd6ddcbef2e797e9932
[ "MIT" ]
null
null
null
contest_server/pjkiserver/storage/database.py
amrohendawi/AlphaZero-implementation
42103e63308ba256208b6dd6ddcbef2e797e9932
[ "MIT" ]
null
null
null
from pymongo import MongoClient from pymongo.errors import ConnectionFailure from collections.abc import MutableMapping class DatabaseDictionary(MutableMapping): ''' A persistent dictionary, which only accepts str keys. It is based and reliant on a mongoDB ''' def __init__(self, url='localhost', p...
31.346939
78
0.66276
10ffea6e650097420cba320c4e53e75a1cbfa21f
3,103
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/losses/actbert_loss.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/losses/actbert_loss.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/losses/actbert_loss.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-03-07T10:51:21.000Z
2022-03-07T10:51:21.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
40.828947
110
0.651305
80271e9a71149f2c4d6cbfc01bfb28367b274d91
670
py
Python
challenges/blackrock/stock_grants.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
challenges/blackrock/stock_grants.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
challenges/blackrock/stock_grants.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
import sys def test(): N = 12 rating = [6, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5] min = [2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3] res = 53 res_list = [7, 1, 2, 3, 4, 4, 4, 5, 5, 6, 7] N = int(sys.stdin.readline()) rating = list(map(int, sys.stdin.readline().split())) min_num_shares = list(map(int, sys.stdin.r...
30.454545
80
0.574627
d548fc4da25b7c6af8763df016af13aa1a9964e2
287
py
Python
koissu-master/movement.py
jaakaappi/archived-projects
be1f754eca7c1434f3a363b0ea8ebcd190a42436
[ "MIT" ]
null
null
null
koissu-master/movement.py
jaakaappi/archived-projects
be1f754eca7c1434f3a363b0ea8ebcd190a42436
[ "MIT" ]
3
2021-03-10T13:18:31.000Z
2021-05-11T09:20:11.000Z
koissu-master/movement.py
jaakaappi/archived-projects
be1f754eca7c1434f3a363b0ea8ebcd190a42436
[ "MIT" ]
null
null
null
import redis from gpiozero import LED from time import sleep r = redis.StrictRedis(host='localhost', port=6379, db=0) p = r.pubsub() p.subscribe('move') led = LED(2) while True: message = p.get_message() if message: led.on() sleep(5) led.off() sleep(1)
16.882353
56
0.630662
1272611f7036314ac6792ab0e628f710b4806159
317
py
Python
exercises/ja/exc_03_06.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/ja/exc_03_06.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/ja/exc_03_06.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import spacy # カスタムコンポーネントを定義 def length_component(doc): # docの長さを取得 doc_length = ____ print(f"この文章は {doc_length} トークンの長さです。") # docを返す ____ # 小サイズの日本語モデルを読み込む nlp = spacy.load("ja_core_news_sm") # パイプラインの最初にコンポーネントを追加し、パイプラインの名前を表示 ____.____(____) print(nlp.pipe_names) # テキストを処理 doc = ____
15.095238
43
0.725552
c3ac35dc4575989fa92ffea6fb532c848ca3c735
638
py
Python
src/caesar-brute-force.py
hacker-school/Kryptografie
de033d435ca5bbb908968596dfa8d12c26317167
[ "CC0-1.0" ]
null
null
null
src/caesar-brute-force.py
hacker-school/Kryptografie
de033d435ca5bbb908968596dfa8d12c26317167
[ "CC0-1.0" ]
null
null
null
src/caesar-brute-force.py
hacker-school/Kryptografie
de033d435ca5bbb908968596dfa8d12c26317167
[ "CC0-1.0" ]
null
null
null
#!/usr/local/bin/python3 """ Demo für einen Brute-Force-Angriff auf eine Caesar-Verschlüsslung HackerSchool 2020 """ def caesar(text, schluessel): """ Verschluesselt klartext durch Verschiebung der Buchstaben um schluessel gemaess Caesaren-Verschluesselung. """ chiffre = "" alphabet = "ABCDEFG...
25.52
65
0.673981
6180bc91ed5d948cc391d9b617aeea57c95d2e2f
9,700
py
Python
pytest/andinotcp/test_tcp.py
andino-systems/andinopy
28fc09fbdd67dd690b9b3f80f03a05c342c777e1
[ "Apache-2.0" ]
null
null
null
pytest/andinotcp/test_tcp.py
andino-systems/andinopy
28fc09fbdd67dd690b9b3f80f03a05c342c777e1
[ "Apache-2.0" ]
null
null
null
pytest/andinotcp/test_tcp.py
andino-systems/andinopy
28fc09fbdd67dd690b9b3f80f03a05c342c777e1
[ "Apache-2.0" ]
null
null
null
# _ _ _ # / \ _ __ __| (_)_ __ ___ _ __ _ _ # / _ \ | '_ \ / _` | | '_ \ / _ \| '_ \| | | | # / ___ \| | | | (_| | | | | | (_) | |_) | |_| | # /_/ \_\_| |_|\__,_|_|_| |_|\___/| .__/ \__, | # |_| |___/ # by Jakob Groß import os import sy...
35.144928
94
0.559072
145bf8f33506af3436b279951420b57309f70547
1,881
py
Python
src/onegov/event/models/occurrence.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/event/models/occurrence.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/event/models/occurrence.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import datetime from icalendar import Calendar as vCalendar from icalendar import Event as vEvent from onegov.core.orm import Base from onegov.core.orm.mixins import TimestampMixin from onegov.core.orm.types import UUID from onegov.event.models.mixins import OccurrenceMixin from pytz import UTC from sedat...
33.589286
77
0.679957
148cf3455ad4b2a5da7b6d2039c42f57a3fd5de9
769
py
Python
___Python/Thomas/pycurs_180625/p02_datenstrukturen/m01_temperatur.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Thomas/pycurs_180625/p02_datenstrukturen/m01_temperatur.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Thomas/pycurs_180625/p02_datenstrukturen/m01_temperatur.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
celsius = [0.7, 2.1, 4.2, 8.2, 12.5, 15.6, 16.9, 16.3, 13.6, 9.5, 4.6, 2.3] #Durschnittstemperaturen Bielefeld # Liste Umrechnung in Fahrenheit erzeugen (FOR-Schleife) wertefahrenheit = [] for wertecelsius in celsius: wertefahrenheit.append(round((wertecelsius*1.8)+32, 2)) # F = C*1.8 + 32 C = (F-32)/1.8...
40.473684
111
0.715215
dce32a847718277eaf7bd48272a69f797dc47f06
3,894
py
Python
scrapers/scrape_sg.py
AryaVashisht/covid_19
0c734615a1190a5b2fff4697f47731ef2b8b6918
[ "CC-BY-4.0" ]
null
null
null
scrapers/scrape_sg.py
AryaVashisht/covid_19
0c734615a1190a5b2fff4697f47731ef2b8b6918
[ "CC-BY-4.0" ]
null
null
null
scrapers/scrape_sg.py
AryaVashisht/covid_19
0c734615a1190a5b2fff4697f47731ef2b8b6918
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python3 import csv from io import StringIO import re from bs4 import BeautifulSoup import scrape_common as sc # hospitalized url_hospitalized = 'https://stada.sg.ch/covid/C19_Faelle_hospitalisiert.html' soup = BeautifulSoup(sc.download(url_hospitalized, silent=True), 'html.parser') dd_hosp = sc.DayData...
35.4
180
0.686954
b4e026119906125ce08226b14d48784a13373c72
568
py
Python
_dev/license-retrival-mock-server/src/routers/auth.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
_dev/license-retrival-mock-server/src/routers/auth.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
_dev/license-retrival-mock-server/src/routers/auth.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
from fastapi import APIRouter, Form from pydantic import BaseModel router = APIRouter(prefix="/auth", tags=["Auth"]) class AuthResponse(BaseModel): """ Response model for get_license_package """ access_token: str token_type: str expires_in: int scope: str @router.post("", response_model=AuthRes...
25.818182
51
0.621479
d32f2610b782a381e4bd41b423fd3f38295718ca
4,294
py
Python
fix-alignment.py
Dia-B/polymul-z2mx-m4
7b4cde2ba913557f28397b03dfcc7cfaeda06295
[ "CC0-1.0" ]
34
2019-02-15T05:11:49.000Z
2022-03-23T08:00:29.000Z
Cortex-M_Implementation_KEM/Cortex-M4/src/m4-striding/fix-alignment.py
cothan/SABER
4743134da0e4a695491b6c2de60e17f21d2d241f
[ "Unlicense" ]
8
2020-04-09T12:33:42.000Z
2022-03-07T20:08:41.000Z
Cortex-M_Implementation_KEM/Cortex-M4/src/m4-striding/fix-alignment.py
cothan/SABER
4743134da0e4a695491b6c2de60e17f21d2d241f
[ "Unlicense" ]
10
2020-03-09T15:09:50.000Z
2022-03-23T08:00:18.000Z
from collections import defaultdict import sys import subprocess import argparse """ This script widens ARMv7-M instructions in-place to 32-bit if required. It will accept two 16 bit instructions on the same 4-byte data line, but will expand 16 bit instructions to 32 bit if that ensures alignment for subsequent 32 bi...
34.910569
162
0.574057
2c9e4d46f2895b2625c441497e08218c5cac4356
73,996
py
Python
src/visuanalytics/server/db/queries.py
Biebertal-mach-mit-TV/Data-Analytics
70cda2393e61f7ca0a1a4a5965646e908bd0faa9
[ "MIT" ]
1
2020-11-27T17:26:27.000Z
2020-11-27T17:26:27.000Z
src/visuanalytics/server/db/queries.py
Biebertal-mach-mit-TV/Data-Analytics
70cda2393e61f7ca0a1a4a5965646e908bd0faa9
[ "MIT" ]
85
2021-01-02T11:38:59.000Z
2021-07-26T07:13:47.000Z
src/visuanalytics/server/db/queries.py
Biebertal-mach-mit-TV/Data-Analytics
70cda2393e61f7ca0a1a4a5965646e908bd0faa9
[ "MIT" ]
1
2021-04-19T06:50:53.000Z
2021-04-19T06:50:53.000Z
import json import os import shutil import io import re import time import humps import copy from base64 import b64encode, encodebytes from copy import deepcopy from PIL import Image from visuanalytics.server.db import db from visuanalytics.util.config_manager import get_private, set_private, assert_private_exists fr...
40.926991
265
0.651981
64807514a800a3035596e5d01efed8b8b9e33aff
7,364
py
Python
tuta/model/backbones.py
PseudoLabs-Demo/TUTA_table_understanding
d0f3fe2f15c56a5ea9f593b210296f170fc74558
[ "MIT" ]
36
2021-06-15T01:04:27.000Z
2022-03-19T16:36:54.000Z
tuta/model/backbones.py
PseudoLabs-Demo/TUTA_table_understanding
d0f3fe2f15c56a5ea9f593b210296f170fc74558
[ "MIT" ]
6
2021-09-03T11:29:36.000Z
2021-12-15T11:33:57.000Z
tuta/model/backbones.py
PseudoLabs-Demo/TUTA_table_understanding
d0f3fe2f15c56a5ea9f593b210296f170fc74558
[ "MIT" ]
8
2021-11-03T04:32:36.000Z
2022-02-02T13:43:47.000Z
# -*- coding: utf-8 -*- """ Backbones of Pre-training Models (from input to last hidden-layer output) """ import torch import torch.nn as nn import model.embeddings as emb import model.encoders as enc class Backbone(nn.Module): def __init__(self, config): super(Backbone, self).__init__() ...
44.361446
124
0.655622
375866ce992114d014302f3769e14a9b6d44e134
1,091
py
Python
Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/01_uebung_lueckentext/22_uebung_lueckentext.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/01_uebung_lueckentext/22_uebung_lueckentext.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/01_uebung_lueckentext/22_uebung_lueckentext.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
# 22_uebung_lueckentext.py # In diesem Übungsbeispiel geht es darum Inhalte in Strings mit von dem Benutzer angegebenen Stringwerten zu ersetzen # Der Text wird aus einem File extrahiert und beinhaltet einen lückenhaften Text in welchem zu ersetzende Werte mit NOMEN, ADJEKTIV, VERB gekennzeichnet sind. import os, re...
24.795455
159
0.707608
37974ce1f38c1df69cba4c51ff69e981d6cdcca5
1,059
py
Python
data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_constraint.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
38
2018-02-24T02:33:52.000Z
2020-03-03T23:17:04.000Z
data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_constraint.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
385
2018-02-21T16:53:13.000Z
2020-03-04T00:52:40.000Z
data-pipeline/src/data_pipeline/datasets/gnomad_v2/gnomad_v2_constraint.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
13
2020-05-01T13:03:54.000Z
2022-02-28T13:12:57.000Z
import hail as hl def prepare_gnomad_v2_constraint(path): ds = hl.read_table(path) # Don't need the information in globals for the browser ds = ds.select_globals() # Select relevant fields ds = ds.select( # ID transcript_id=ds.transcript, gene_id=ds.gene_id, # Exp...
23.533333
59
0.595845
80d213377b292e640046d4ebd0e3f1da7b67fb03
66,279
py
Python
OFROD-main/Ofrod.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
OFROD-main/Ofrod.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
OFROD-main/Ofrod.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
#Compiled By Raka Andrian import marshal exec(marshal.loads('c\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00@\x00\x00\x00sp\x03\x00\x00y\xb0\x00d\x00\x00d\x01\x00l\x00\x00Z\x00\x00d\x00\x00d\x01\x00l\x01\x00Z\x01\x00d\x00\x00d\x01\x00l\x02\x00Z\x02\x00d\x00\x00d\x01\x00l\x03\x00Z\x03\x00d\x00\x00d\x01\x00l\x04\x00Z\x...
16,569.75
66,237
0.748276
039e52111c90723aebbd1f70afb6aac22ebd8187
1,087
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v4_0/create_price_list_if_missing.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_0/create_price_list_if_missing.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v4_0/create_price_list_if_missing.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils.nestedset import get_root_of def execute(): # setup not complete if not frappe.db.sql("""select ...
30.194444
74
0.734131
2066c8d39c1df13a482f93785ddd8ecab22faca8
1,207
py
Python
src/test_unet.py
tuanminh3395/gr-bone-age
248c929d75e9d88dc9fa102ea11f4eae1e0f3157
[ "MIT" ]
null
null
null
src/test_unet.py
tuanminh3395/gr-bone-age
248c929d75e9d88dc9fa102ea11f4eae1e0f3157
[ "MIT" ]
null
null
null
src/test_unet.py
tuanminh3395/gr-bone-age
248c929d75e9d88dc9fa102ea11f4eae1e0f3157
[ "MIT" ]
null
null
null
import numpy as np from keras.models import Model from data_unet import load_test_data, desired_size from train_unet import preprocess, batch_size import os from skimage.io import imsave from constants import mask_raw_path, get_unet print('-'*30) print('Loading and preprocessing test data...') print('-'*30) imgs_test,...
27.431818
75
0.730737
6406694116160953f2f9538a3a833a116f31c961
8,500
py
Python
bets/forms.py
Thames1990/BadBatBets
8dffb69561668b8991bf4103919e4b254d4ca56a
[ "MIT" ]
null
null
null
bets/forms.py
Thames1990/BadBatBets
8dffb69561668b8991bf4103919e4b254d4ca56a
[ "MIT" ]
null
null
null
bets/forms.py
Thames1990/BadBatBets
8dffb69561668b8991bf4103919e4b254d4ca56a
[ "MIT" ]
null
null
null
from django import forms from django.core.exceptions import ValidationError from django.utils import timezone from .models import ChoiceBet, DateBet from .util import create_choices from ledger.models import Account from profiles.models import ForbiddenUser class ChoiceBetCreationForm(forms.ModelForm): class Me...
37.946429
119
0.640353
ff5b26b516499285945eef1f432205d908264405
1,739
py
Python
haas_lib_bundles/python/docs/examples/solar_street_lamp/haas506/code/yuanda_htb485.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/solar_street_lamp/haas506/code/yuanda_htb485.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/solar_street_lamp/haas506/code/yuanda_htb485.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
import ustruct class HTB485(object): def __init__(self, mbObj, devAddr): self.mbObj = mbObj self.devAddr = devAddr def getHumidity(self): if self.mbObj is None: raise ValueError("invalid modbus object.") value = bytearray(4) ret = self.mbObj.readHol...
35.489796
77
0.598045
92311f2e2b58ac2083d59f134f408c5e06c2e09a
265
py
Python
showcase11/com/aaron/scan_port_example.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
showcase11/com/aaron/scan_port_example.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
2
2021-03-25T22:00:07.000Z
2022-01-20T15:51:48.000Z
showcase11/com/aaron/scan_port_example.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
# -*- codiing:utf-8 -*- """ scan port example pip install port-scanner """ __author__="aaron.qiu" import os if __name__=='__main__': my_target = portscanner.Target("example.com") my_target.scan(min=1, max=100, timeout=0.01) my_target.report(all=True)
18.928571
49
0.686792
92942f910127b90360068e98568ff32c14d65a26
863
py
Python
exercises/en/test_02_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/en/test_02_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/en/test_02_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert ( "import Doc, Span" in __solution__ or "import Span, Doc" in __solution__ ), "Did you import the Doc and Span correctly?" assert doc.text == "I like David Bowie", "Did you create the Doc correctly?" assert span.text == "David Bowie", "Did you create the span correctly?" a...
47.944444
80
0.653534
a60e18ef434f690ad4ed8f93952168aa16c0810b
1,028
py
Python
haas_lib_bundles/python/docs/examples/smart_fan/esp32/code/fan.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/smart_fan/esp32/code/fan.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/smart_fan/esp32/code/fan.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
from driver import PWM class Fan(object): def __init__(self, pwmObj,data=None): self.pwmObj = None if not isinstance(pwmObj, PWM): raise ValueError("parameter is not an PWM object") self.pwmObj = pwmObj if data is not None: self.data = data self...
27.052632
62
0.532101
a6515768876861b3dca850a779c2dc12e5cddce9
861
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v6_20x/remove_customer_supplier_roles.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_20x/remove_customer_supplier_roles.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v6_20x/remove_customer_supplier_roles.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc("buying", "doctype", "request_for_quotation_supplier") frappe.reload_doc("buying", "doctype", "request_for_quotation_item") frappe.reload_doc("buying", "doctype", "request_for_quotation") frappe.reload_doc("projects", "doctype",...
35.875
85
0.70964
1bd3dbdc1cc7eaf5089a486ae1be33c3ead7d270
717
py
Python
python/en/_pandas/my_example/pd_read_csv_df_to_numpy.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_pandas/my_example/pd_read_csv_df_to_numpy.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_pandas/my_example/pd_read_csv_df_to_numpy.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
''' Read a dataframe into a numpy array. ''' import os import numpy as np import pandas as pd if __name__ == '__main__': dir_input = 'input' filename = 'example.csv' file = os.path.join( dir_input, filename ) df = pd.read_csv( file, header=0 ) data_np = df.to_numpy() ...
29.875
74
0.447699
847223b8683037e6c728e510a594e0c5d05adb56
652
py
Python
tools/legacy/pac-man/plugins/postinstall/rename.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
2
2020-03-18T18:23:27.000Z
2020-08-02T15:59:16.000Z
tools/legacy/pac-man/plugins/postinstall/rename.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
5
2019-07-07T16:47:47.000Z
2020-08-10T16:20:00.000Z
tools/legacy/pac-man/plugins/postinstall/rename.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
1
2022-02-16T14:59:12.000Z
2022-02-16T14:59:12.000Z
import os import json def canExecute(postInstallValue): if postInstallValue == "postinstall.rename.json": return True return False def execute(postInstallScriptPath, destDir): with open(postInstallScriptPath, "r") as scriptFile: config = json.loads(scriptFile.read()) for originalNa...
31.047619
95
0.647239
ca00080a41a5070ee582e1ebaa9aa121277f0813
4,532
py
Python
official/cv/yolov3_resnet18/ascend310_quant_infer/post_quant.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/yolov3_resnet18/ascend310_quant_infer/post_quant.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/yolov3_resnet18/ascend310_quant_infer/post_quant.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.464286
116
0.69594
b69cdb79a058f81d31bcaf29627ccc737fe4a071
350
py
Python
Prediction/collision.py
Nivram710/Seretra
dc7a509ff37e07ea4688a87ab89d13783299c069
[ "Apache-2.0" ]
2
2018-04-12T14:24:33.000Z
2020-09-16T07:03:28.000Z
Prediction/collision.py
Nivram710/Seretra
dc7a509ff37e07ea4688a87ab89d13783299c069
[ "Apache-2.0" ]
null
null
null
Prediction/collision.py
Nivram710/Seretra
dc7a509ff37e07ea4688a87ab89d13783299c069
[ "Apache-2.0" ]
null
null
null
from vec2 import Vec2 import time # Needs constant time step def find_collision(o1, o2, threshold): current_time = int(round(time.time() * 1000)) for pos1, pos2 in zip(o1, o2): if pos1[1] < current_time and pos2[1] < current_time: continue if Vec2.distance(pos1[0], pos2[0]) < thres...
26.923077
61
0.631429
b6a58014cb2c1dd285a64c4c67e47d0323b569b8
250
py
Python
python/coursera_python/MICHIGAN/WEB/week4/shr.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/MICHIGAN/WEB/week4/shr.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/MICHIGAN/WEB/week4/shr.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
import urllib2 from bs4 import BeautifulSoup page = urllib2.urlopen(raw_input("Enter URL: ")) soup = BeautifulSoup(page, "html.parser") spans = soup('span') numbers = [] for span in spans: numbers.append(int(span.string)) print sum(numbers)
16.666667
48
0.72
fceb2a52211da9a8c0aa8ef0042f78ffe7faaac0
8,590
py
Python
book/_build/jupyter_execute/docs/001_zielsetzung.py
tom-tubeless/wwg-digitales-miteinander
d9391046a7ed12b91b538b937993161c67d77d68
[ "CC0-1.0" ]
null
null
null
book/_build/jupyter_execute/docs/001_zielsetzung.py
tom-tubeless/wwg-digitales-miteinander
d9391046a7ed12b91b538b937993161c67d77d68
[ "CC0-1.0" ]
null
null
null
book/_build/jupyter_execute/docs/001_zielsetzung.py
tom-tubeless/wwg-digitales-miteinander
d9391046a7ed12b91b538b937993161c67d77d68
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # Zielsetzung # # ## Medien im Wandel # # Die Digitalisierung unseres Alltags hat weitreichende Folgen für das Leben und Lernen unserer Schüler:Innen. # Kontinuierliche Änderungen in der digitalen Medienlandschaft versteht das Wim-Wenders-Gymnasium als Chance, sogenannte neue ...
96.516854
373
0.824563
a2165aa6951d3a430dc2edfe07654812be40c3b8
12,033
py
Python
solutions/pedestrian_search/webserver/src/utils/metric.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-01-11T18:40:22.000Z
2021-01-11T18:40:22.000Z
solutions/pedestrian_search/webserver/src/utils/metric.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/pedestrian_search/webserver/src/utils/metric.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import math import numpy as np import logging from torch.nn.parameter import Parameter from torch.autograd import Variable from milvus import Milvus, IndexType, MetricType, Status client = Milvus(host='192.168.1.85', port='19666') logger = logging.get...
39.19544
200
0.648799
bfba49096c7692d2b35980349ffd844d144b37b8
260
py
Python
02_Python/exceptions.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
02_Python/exceptions.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
02_Python/exceptions.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
import sys try: x = int(input("X:")) y = int(input("Y:")) except ValueError: print("Error: invalid input.") sys.exit(1) try: result = x / y except ZeroDivisionError: print("Error: Could not divide by 0.") sys.exit(1) print(result)
17.333333
42
0.607692
78322d4575ef60a29998c49fc307987e022760d3
492
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v8_0/move_perpetual_inventory_setting.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/v8_0/move_perpetual_inventory_setting.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v8_0/move_perpetual_inventory_setting.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(): frappe.reload_doctype('Company') enabled = frappe.db.get_single_value("Accounts Settings", "auto_accounting_for_stock...
37.846154
92
0.768293
784d84323ab8c5da74c358fca266206b63129f3a
1,875
py
Python
code/python/portscanner.py
Grasshoppeh/road2oscp
a5beb41af4430b2099835db80d6290e3504d0626
[ "MIT" ]
null
null
null
code/python/portscanner.py
Grasshoppeh/road2oscp
a5beb41af4430b2099835db80d6290e3504d0626
[ "MIT" ]
null
null
null
code/python/portscanner.py
Grasshoppeh/road2oscp
a5beb41af4430b2099835db80d6290e3504d0626
[ "MIT" ]
null
null
null
#!/bin/python3 __author__ = 'Richard Ellis' __credits__ = 'Heath Adams' __version__ = '1.0' #My first take on a quick port scanning script in python. Goal was the practice the usage of the socket library. I already had previosu knowlegdge of python. #Areas that could be improved are an argument to # - scan the searc...
37.5
157
0.719467
bd7279f7dcdddd83bc8a0d9881d161c50adc033f
147
py
Python
triNum.py
mrmayurs4/Hacktoberfest-2020
f2bc129bd8574d5870b9595a019bff3baddeaf73
[ "MIT" ]
null
null
null
triNum.py
mrmayurs4/Hacktoberfest-2020
f2bc129bd8574d5870b9595a019bff3baddeaf73
[ "MIT" ]
null
null
null
triNum.py
mrmayurs4/Hacktoberfest-2020
f2bc129bd8574d5870b9595a019bff3baddeaf73
[ "MIT" ]
null
null
null
n = int(input("Enther i for ith Triangular number")) triNum = ((n**2)+n)/2 print ("The {}nt Triangular Number is {}".format(str(n), str(triNum)))
49
70
0.646259
e509aa82982c8c6591ee46e853299876de698333
362
py
Python
DeepRTS/python/_py_game_arguments.py
Yigit-Arisoy/deep-rts
a5ed2c29b76789830df9f7075480c7229ccf0f4d
[ "MIT" ]
1
2020-01-08T22:20:37.000Z
2020-01-08T22:20:37.000Z
DeepRTS/python/_py_game_arguments.py
Yigit-Arisoy/deep-rts
a5ed2c29b76789830df9f7075480c7229ccf0f4d
[ "MIT" ]
1
2021-11-11T18:39:56.000Z
2021-11-11T22:15:59.000Z
DeepRTS/python/_py_game_arguments.py
Yigit-Arisoy/deep-rts
a5ed2c29b76789830df9f7075480c7229ccf0f4d
[ "MIT" ]
null
null
null
from DeepRTS import python from DeepRTS import Engine class GameArguments: def __init__( self, game_map, n_players, engine_config, gui_config ): self.game_map = game_map self.n_player = n_players self.engine_config = engine_c...
21.294118
42
0.59116
e559c2d3f0ef2f9a97c31a62af4c951e19f364d6
2,386
py
Python
research/3d/DeepLM/ba_core/io.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/3d/DeepLM/ba_core/io.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/3d/DeepLM/ba_core/io.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...
39.766667
101
0.612741
009951fbfdb6f0ee94d6da4c7549b09484f8dd68
2,298
py
Python
GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOuis.py
msgis/swwat-gzp-template
080afbe9d49fb34ed60ba45654383d9cfca01e24
[ "MIT" ]
3
2019-06-18T15:28:09.000Z
2019-07-11T07:31:45.000Z
GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOuis.py
msgis/swwat-gzp-template
080afbe9d49fb34ed60ba45654383d9cfca01e24
[ "MIT" ]
2
2019-07-11T14:03:25.000Z
2021-02-08T16:14:04.000Z
GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOuis.py
msgis/swwat-gzp-template
080afbe9d49fb34ed60ba45654383d9cfca01e24
[ "MIT" ]
1
2019-06-12T11:07:37.000Z
2019-06-12T11:07:37.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- from PyQt5.QtGui import * from PyQt5.QtWidgets import QToolBar,QDockWidget def run(id, gtotool, config, debug): try: #read config toolbars_hideall = config.get('toolbars_hideall',False) toolbars = config.get('toolbars',[]) menus_hideall = c...
35.90625
88
0.58181
dae43e027cc58c09a9ba624be8d3475605035bce
4,368
py
Python
parser.py
kevinxin90/emv
97c6edd1f7055bd19ffed857d5f2c925ab518019
[ "Apache-2.0" ]
null
null
null
parser.py
kevinxin90/emv
97c6edd1f7055bd19ffed857d5f2c925ab518019
[ "Apache-2.0" ]
null
null
null
parser.py
kevinxin90/emv
97c6edd1f7055bd19ffed857d5f2c925ab518019
[ "Apache-2.0" ]
null
null
null
import os import re import requests from collections import defaultdict from biothings.utils.dataload import dict_sweep, value_convert_to_number, unlist, open_anyfile class DictQuery(dict): """Parse nested dictionary """ def get(self, path, default=None): """Extract value from dictionary based on...
35.225806
94
0.581731
97773a4d3d3a4700454d47c168040a1528d9ef1b
143
py
Python
Online-Judges/CodingBat/Python/String-02/String_2-05-end_other.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/CodingBat/Python/String-02/String_2-05-end_other.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/CodingBat/Python/String-02/String_2-05-end_other.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def end_other(a, b): a = a.lower() b = b.lower() if a[-(len(b)):] == b or a == b[-(len(a)):]: return True return False
20.428571
48
0.454545
c182cadfa61e971b84daba5d58d73de313bad748
1,083
py
Python
template_prototype/optimise-images.py
rustbridge/rbb
de097a67d34a1c73fd832832877fa81d2cac7b65
[ "Apache-2.0" ]
null
null
null
template_prototype/optimise-images.py
rustbridge/rbb
de097a67d34a1c73fd832832877fa81d2cac7b65
[ "Apache-2.0" ]
null
null
null
template_prototype/optimise-images.py
rustbridge/rbb
de097a67d34a1c73fd832832877fa81d2cac7b65
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import glob, os, subprocess, sys status, _ = subprocess.getstatusoutput('convert -h') if status != 1: print("`convert` not found. ImageMagick is required to to optimise images.") print("<http://www.imagemagick.org/index.php>") sys.exit() for filename in glob.glob('assets/img/*.ori...
29.27027
120
0.635272
de0807ded9a250b399a256259a8a5bb97ec944b7
342
py
Python
exercises/ja/test_01_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/ja/test_01_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/ja/test_01_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): import spacy.tokens import spacy.lang.en assert isinstance( nlp, spacy.lang.en.English ), "nlpオブジェクトはEnglishクラスのインスタンスでなければなりません" assert isinstance(doc, spacy.tokens.Doc), "テキストをnlpオブジェクトで処理してdocを作成しましたか?" assert "print(doc.text)" in __solution__, "doc.textをプリントしましたか?" ...
28.5
79
0.707602
e75bcb4f291b3ac4953a67fb89624c78a72246cb
1,379
py
Python
deprecated/benchmark/collective/utils/timer.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
170
2020-08-12T12:07:01.000Z
2022-03-07T02:38:26.000Z
deprecated/benchmark/collective/utils/timer.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
195
2020-08-13T03:22:15.000Z
2022-03-30T07:40:25.000Z
deprecated/benchmark/collective/utils/timer.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
67
2020-08-14T02:07:46.000Z
2022-03-28T10:05:33.000Z
#copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # #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 l...
32.833333
73
0.685279
8217bf14566c840cdb0a8ca5a97a8e83e6cd9793
10,719
py
Python
hihope_neptune-oh_hid/00_src/v0.1/test/developertest/src/core/config/config_manager.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.1/test/developertest/src/core/config/config_manager.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.1/test/developertest/src/core/config/config_manager.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding=utf-8 # # Copyright (c) 2020 Huawei Device 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...
37.479021
79
0.536711
d4523603323d200479e760b2e51a2da82022b0b2
62,034
py
Python
app/qa/field.py
MePyDo/pygqa
61cde42ee815968fdd029cc5056ede3badea3d91
[ "MIT" ]
3
2021-02-25T13:19:52.000Z
2021-03-03T03:46:46.000Z
app/qa/field.py
MedPhyDO/pygqa
580b2c6028d2299790a38262b795b8409cbfcc37
[ "MIT" ]
null
null
null
app/qa/field.py
MedPhyDO/pygqa
580b2c6028d2299790a38262b795b8409cbfcc37
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = "R. Bauer" __copyright__ = "MedPhyDO - Machbarkeitsstudien des Instituts für Medizinische Strahlenphysik und Strahlenschutz am Klinikum Dortmund im Rahmen von Bachelor und Masterarbeiten an der TU-Dortmund / FH-Dortmund" __credits__ = ["R.Bauer", "K.Loot"] __license__ = "MIT" __ver...
37.146108
209
0.500709
2e81440dd46d0cd50a514576859b4698c9217588
431
py
Python
examples/simple_slider.py
xinetzone/dash-tests
cd4526caa2f9d906915c31370b3487bdcef92aa4
[ "Apache-2.0" ]
1
2022-03-01T07:38:32.000Z
2022-03-01T07:38:32.000Z
examples/simple_slider.py
xinetzone/dash-tests
cd4526caa2f9d906915c31370b3487bdcef92aa4
[ "Apache-2.0" ]
12
2021-07-13T12:33:36.000Z
2021-07-14T05:25:19.000Z
examples/simple_slider.py
xinetzone/dash-book
1f624e87e2aa02c9931318918df969e44bdd2c07
[ "Apache-2.0" ]
null
null
null
from dash import dcc, html from dash.dependencies import Input, Output from app import app layout = html.Div([ dcc.Slider( id='my-slider', min=0, max=20, step=0.5, value=10, ), html.Div(id='slider-output-container') ]) @app.callback( Output('slider-output-cont...
18.73913
50
0.600928
d84a679d8e874a13fb60c7fa45f4303f7f11d004
2,012
py
Python
getarq.py
neviim/gt6db
f30d741f7722c4a086fbeaaf1995eeb61d63612e
[ "MIT" ]
null
null
null
getarq.py
neviim/gt6db
f30d741f7722c4a086fbeaaf1995eeb61d63612e
[ "MIT" ]
null
null
null
getarq.py
neviim/gt6db
f30d741f7722c4a086fbeaaf1995eeb61d63612e
[ "MIT" ]
null
null
null
#!/usr/bin env python3 import os import csv import json import pymongo from pymongo import MongoClient # mongodb def get_db(): client = MongoClient('localhost:27017') db = client.gt6db return db def add_dados(db, data): db.countries.insert(data) def get_country(db): return db.countries.find_one...
28.338028
96
0.567097
d8e1a1fa2188a997b036d4bbc5e9a957ed8233a4
860
py
Python
graph_network/util/debug_logger.py
stevezheng23/graph_network_tf
b48a43453c2731f253bfe5a61e0b6339f4fc9f99
[ "Apache-2.0" ]
39
2019-02-23T07:55:43.000Z
2021-05-25T12:39:54.000Z
graph_network/util/debug_logger.py
stevezheng23/graph_network_tf
b48a43453c2731f253bfe5a61e0b6339f4fc9f99
[ "Apache-2.0" ]
3
2019-07-29T08:11:25.000Z
2021-03-23T05:22:29.000Z
graph_network/util/debug_logger.py
stevezheng23/graph_network_tf
b48a43453c2731f253bfe5a61e0b6339f4fc9f99
[ "Apache-2.0" ]
7
2019-03-17T02:30:45.000Z
2020-03-03T22:11:06.000Z
import codecs import os.path import time import numpy as np import tensorflow as tf __all__ = ["DebugLogger"] class DebugLogger(object): """debug logger""" def __init__(self, output_dir): """initialize debug logger""" if not tf.gfile.Exists(output_dir): ...
31.851852
92
0.601163
9917ac0d082d36b23fe420d60e5928b9a417ba5f
607
py
Python
Algorithms/Implementation/Strange_Counter.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Algorithms/Implementation/Strange_Counter.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Algorithms/Implementation/Strange_Counter.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/strange-code/problem?utm_campaign=challenge-recommendation&utm_medium=email&utm_source=24-hour-campaign starting = 3 index = 1 # time and value seperated by 2 min time,value = [],[] for i in range(1,40+1): time.append(index) # time value.append(starting) # value inde...
23.346154
143
0.655684
510562c861d3b8be08b435039d847a01d0c6f9e9
504
py
Python
pacman-arch/test/pacman/tests/upgrade060.py
Maxython/pacman-for-termux
3b208eb9274cbfc7a27fca673ea8a58f09ebad47
[ "MIT" ]
23
2021-05-21T19:11:06.000Z
2022-03-31T18:14:20.000Z
source/pacman-6.0.1/test/pacman/tests/upgrade060.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
11
2021-05-21T12:08:44.000Z
2021-12-21T08:30:08.000Z
source/pacman-6.0.1/test/pacman/tests/upgrade060.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Try to upgrade two packages which would break deps" lp1 = pmpkg("pkg1") lp1.depends = ["pkg2=1.0"] self.addpkg2db("local", lp1) lp2 = pmpkg("pkg2", "1.0-1") self.addpkg2db("local", lp2) p1 = pmpkg("pkg1", "1.1-1") p1.depends = ["pkg2=1.0-1"] self.addpkg(p1) p2 = pmpkg("pkg2", "1.1-1") self.addpk...
22.909091
71
0.64881
5a8d2479547a3e600faddf97ee8eb1ce9ec3ffd9
47,904
py
Python
projects/g4h2-graduation-project/src/backends/scf_functions/tests.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g4h2-graduation-project/src/backends/scf_functions/tests.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g4h2-graduation-project/src/backends/scf_functions/tests.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
import base64 import json import logging import unittest from hashlib import md5 from io import BytesIO from typing import Any, AnyStr, Dict, Tuple from unittest import mock from conf import settings import handler_upload_img_to_cos import handler_trigger_submit_img_to_ocr import handler_submit_img_to_ocr ...
39.754357
120
0.580995
8f8a05f5a652b9df487255b02ea590c7b3aba108
5,873
py
Python
vb_simulation_pkgs/pkg_vb_sim/scripts/node_service_server_vacuum_gripper_ur5_1.py
ROBODITYA/Eyantra-2021-Vargi-Bots
f1c6a82c46e6e84486a4832b3fbcd02625849447
[ "MIT" ]
1
2021-07-13T07:05:29.000Z
2021-07-13T07:05:29.000Z
vb_simulation_pkgs/pkg_vb_sim/scripts/node_service_server_vacuum_gripper_ur5_1.py
TejasPhutane/Eyantra-2021-Vargi-Bots
ab84a1304101850be8c0f69cfe6de70d53c33189
[ "MIT" ]
1
2021-06-05T07:58:03.000Z
2021-06-05T07:58:03.000Z
vb_simulation_pkgs/pkg_vb_sim/scripts/node_service_server_vacuum_gripper_ur5_1.py
ROBODITYA/Eyantra-2021-Vargi-Bots
f1c6a82c46e6e84486a4832b3fbcd02625849447
[ "MIT" ]
null
null
null
#! /usr/bin/env python import rospy from gazebo_ros_link_attacher.srv import Attach, AttachRequest, AttachResponse from pkg_vb_sim.srv import vacuumGripper from pkg_vb_sim.srv import vacuumGripperRequest from pkg_vb_sim.srv import vacuumGripperResponse from pkg_vb_sim.msg import LogicalCameraImage class VacuumGrip...
36.478261
169
0.664907
2d087b8caa7fb2725c6b94af865cdc71a28aada9
374
py
Python
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/16.01-Duck-Typing.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/16.01-Duck-Typing.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/16.01-Duck-Typing.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
class PyCharm: def execute(self): print("Compiling") print("Running") class MyCharm: def execute(self): print("Spell Check") print("Convention Check") print("Compiling") print("Running") class Laptop: def code(self, ide): ide.execute() ide = PyCh...
14.96
33
0.574866
d976f71c3429044648411f53a4225fe77bd37af7
4,804
py
Python
research/audio/tacotron2/src/utils/audio.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/audio/tacotron2/src/utils/audio.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/audio/tacotron2/src/utils/audio.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...
26.688889
78
0.652998
d68b937d64634350f10e5a80efa8219f50052d65
492
py
Python
nz_django/day6/uploadfile_demo/front/models.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_django/day6/uploadfile_demo/front/models.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_django/day6/uploadfile_demo/front/models.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from django.db import models from django.core import validators # Create your models here. class Article(models.Model): title = models.CharField(max_length=100) content = models.TextField() # thumbnail = models.FileField(upload_to='files',validators=[validators.FileExtensionValidator(['jpg','png','jpeg','gi...
61.5
147
0.739837
ba4bc26e98e57af372fb515bdb45ba79fe152105
812
py
Python
doc/for_dev/scikit-image/future/_moments_cy.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/for_dev/scikit-image/future/_moments_cy.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/for_dev/scikit-image/future/_moments_cy.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
import numpy as np from transonic import boost, Array @boost(wraparound=False, cdivision=True, nonecheck=False) def moments_hu(nu: "float64[:,:]"): hu: Array[np.float64, "1d", "C"] = np.zeros((7,), dtype=np.float64) t0: np.float64 = nu[3, 0] + nu[1, 2] t1: np.float64 = nu[2, 1] + nu[0, 3] q0: np.floa...
29
71
0.487685
301855013a9ca88d3c9c384b1bb74f9680987796
3,127
py
Python
main.py
J-CIC/Label_Propagation
02997bb463e1021d4de354b270d0c7bbd93817ca
[ "MIT" ]
3
2018-07-17T12:19:44.000Z
2019-04-25T14:00:59.000Z
main.py
J-CIC/Label_Propagation
02997bb463e1021d4de354b270d0c7bbd93817ca
[ "MIT" ]
null
null
null
main.py
J-CIC/Label_Propagation
02997bb463e1021d4de354b270d0c7bbd93817ca
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import random from scipy.misc import comb def cal_distance(vec1,vec2): return np.sum(np.square(vec1 -vec2)) def generate_weight_graph(graph_array,max_id,a): weight_graph = np.zeros((max_id,max_id)) for i in range(0,max_id): for j in range(i,max_id): ...
29.224299
104
0.60985
2324767c83fb836178aa06d842e9fd67e06c402d
1,515
py
Python
05_Simulatoren/02_FilterSimulator/main.py
Pluscrafter/SHARKSKY
f3d5e96c9f4cd25e4c03537f1f8d9b9756042dac
[ "MIT" ]
3
2019-11-28T23:18:23.000Z
2019-12-02T14:01:02.000Z
05_Simulatoren/02_FilterSimulator/main.py
Pluscrafter/SHARKSKY
f3d5e96c9f4cd25e4c03537f1f8d9b9756042dac
[ "MIT" ]
null
null
null
05_Simulatoren/02_FilterSimulator/main.py
Pluscrafter/SHARKSKY
f3d5e96c9f4cd25e4c03537f1f8d9b9756042dac
[ "MIT" ]
1
2019-12-02T14:34:11.000Z
2019-12-02T14:34:11.000Z
from matplotlib import pyplot as plt import numpy as np import math def digital_low_pass(cutoff_frequency, input): # https://en.wikipedia.org/wiki/Low-pass_filter#Simple_infinite_impulse_response_filter fc = 2 * math.pi * cutoff_frequency alpha = (fc * dt) / (1 + fc * dt) output = [0] * len(input) ...
21.041667
91
0.625743
88d4a2cb2099524d7d8ef471cf73c188d6f7c268
640
py
Python
leetcode/376-Wiggle-Subsequence/WiggleSubseq.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/376-Wiggle-Subsequence/WiggleSubseq.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/376-Wiggle-Subsequence/WiggleSubseq.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution(object): def wiggleMaxLength(self, nums): """ :type nums: List[int] :rtype: int """ if len(nums) < 2: return len(nums) res = 0 for i in xrange(1, len(nums) - 1): if nums[i] == nums[i + 1]: nums[i + 1], nu...
27.826087
63
0.392188
4e158cb5dce9aa1a051fd9fadfe515b346835558
450
py
Python
spider/Config_defect.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
spider/Config_defect.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
2
2021-03-31T18:54:16.000Z
2021-12-13T19:49:08.000Z
spider/Config_defect.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # got文件、MongoDB数据库和Redis数据库配置文件 import os import sys import pymongo import redis def get_noau_config(): # got文件 if sys.version_info[0] < 3: import got else: import got3 as got # MongoDB数据库 client = pymongo.MongoClient(os.environ['MONGOHOST'], 27017) db =...
18.75
72
0.651111