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
f3d41c633fdccb2fe96178ecfc3ba73ac621925d
916
py
Python
backend/app/core/annotation_validator.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
null
null
null
backend/app/core/annotation_validator.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
2
2022-03-15T11:28:48.000Z
2022-03-15T11:28:58.000Z
backend/app/core/annotation_validator.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
null
null
null
from typing import Optional from shapely.geometry import LineString, LinearRing, Polygon from app.schemas.polygon_data import AnnotationData, AnnotationType from app.utils.logger import logger class AnnotationValidator: @staticmethod def check_if_annotation_is_valid(annotation_data: AnnotationData...
35.230769
89
0.707424
789cb480bf683bec6b6ae060fd68e33fd9dd0731
379
py
Python
2133-check-if-every-row-and-column-contains-all-numbers/2133-check-if-every-row-and-column-contains-all-numbers.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
2133-check-if-every-row-and-column-contains-all-numbers/2133-check-if-every-row-and-column-contains-all-numbers.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
2133-check-if-every-row-and-column-contains-all-numbers/2133-check-if-every-row-and-column-contains-all-numbers.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def checkValid(self, matrix: List[List[int]]) -> bool: n = [num+1 for num in range(len(matrix))] length = len(matrix) for i in range(length): col = [matrix[j][i] for j in range(length)] for num in n: if num not in matrix[i] or num not i...
37.9
58
0.522427
ecaff58d2099657fd78711591c06e7be53f3d0eb
120
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.9-funciton-dufault-farameter-a2.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.9-funciton-dufault-farameter-a2.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.9-funciton-dufault-farameter-a2.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
def myfnc(x, y=10, z=0): print("x =", x, "y=", y, "z =", z) x = 5 y = 6 z = 7 myfnc(x, y, z) myfnc(x, y) myfnc(x)
10.909091
38
0.433333
ecbfdca1a1d56196e84bf0bd46f85ea51f80f111
138
py
Python
robolib/util/model_uuid.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
2
2017-11-30T21:12:11.000Z
2017-12-01T07:52:43.000Z
robolib/util/model_uuid.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
14
2017-11-14T18:12:53.000Z
2018-06-03T16:07:57.000Z
robolib/util/model_uuid.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
3
2018-02-05T10:40:03.000Z
2018-02-09T09:29:19.000Z
import time def get_model_identifier(epochs: int): t = int(time.time()) t *= 1000 t += int(epochs/100) % 10000 return t
15.333333
38
0.608696
01b70907ded21213dbcf9dacc7f39794b50ca9a2
6,272
py
Python
src/doc/functions_to_plain_py.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/doc/functions_to_plain_py.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/doc/functions_to_plain_py.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
#!/usr/bin/env python # # file: functions_to_plain_py.py # author: cyrush (but most code taken from functions_to_method_doc.py) # import sys ############################################################################## # This is a hacked up version of functions_to_method_doc.py # it creates a single output file: # ...
29.037037
117
0.537946
da812b7496eaccf1c4c20430716dd81db4b03df0
570
py
Python
api/wsgi/src/devices/bpm/views.py
easyCZ/SLIP-A-2015
ad386df9c438d93ec89f68c63d3deda12d27d1ed
[ "MIT" ]
2
2020-06-08T19:17:10.000Z
2020-06-08T20:45:07.000Z
api/wsgi/src/devices/bpm/views.py
easyCZ/SLIP-A-2015
ad386df9c438d93ec89f68c63d3deda12d27d1ed
[ "MIT" ]
14
2015-10-07T09:31:50.000Z
2022-02-23T07:34:10.000Z
api/wsgi/src/devices/bpm/views.py
easyCZ/SLIP-A-2015
ad386df9c438d93ec89f68c63d3deda12d27d1ed
[ "MIT" ]
null
null
null
from devices.bpm.filters import ProductFilter from devices.bpm.models import Bpm from devices.bpm.serializers import BpmSerializer from rest_framework import filters from rest_framework import generics from rest_framework import permissions class BpmHistoryView(generics.ListCreateAPIView): serializer_class = BpmS...
35.625
74
0.807018
e501c2f518a52c4e5b250a141fcaecdb6396e49e
310
py
Python
Licence 1/I11/TP2/tp2_7_1.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I11/TP2/tp2_7_1.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I11/TP2/tp2_7_1.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
value = int(input("Entrer un entier: ")) sqrt_value = int(value ** .5) dividers_sum = 1 for i in range(2, sqrt_value + 1): if value % i == 0: dividers_sum += i + value // i if dividers_sum == value: print(value, "est un nombre parfait") else: print(value, "n'est pas un nombre parfait")
22.142857
47
0.622581
dace021a4f4bfb3ebb2ba2566aa790b704371d83
2,143
py
Python
research/cv/tsn/eval_scores.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/tsn/eval_scores.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/tsn/eval_scores.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...
38.963636
84
0.716286
c145c08b598c07c952db53044f9e00efe06166bd
1,278
py
Python
INBa/2014/Mamedov_R_A/Mamedov 6_12_1.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2014/Mamedov_R_A/Mamedov 6_12_1.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2014/Mamedov_R_A/Mamedov 6_12_1.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 6, Вариант 12 # Создайте игру, в которой компьютер загадывает название одного из восьми соборов Московского кремля, а игрок должен его угадать. # Мамедов Р.А. # 30.03.2016 import random print("Отгадайте название одного из соборов Московского кремля") print("У вас три попытки") sobor = int(input("Введите чис...
27.782609
129
0.664319
c15957459fedde081adf6aee2cf58f7b5ab77079
59
py
Python
n.py
aravindstriker6/Ipl-Score-Predictor
717598dfc2b302c452c1a5c496539108b808ac06
[ "MIT" ]
null
null
null
n.py
aravindstriker6/Ipl-Score-Predictor
717598dfc2b302c452c1a5c496539108b808ac06
[ "MIT" ]
null
null
null
n.py
aravindstriker6/Ipl-Score-Predictor
717598dfc2b302c452c1a5c496539108b808ac06
[ "MIT" ]
null
null
null
a=[0,0,0] a[1]=2 a.extend([0,0]) a.extend([1]) print(a)
11.8
16
0.508475
99d6dff2a7303ac770ad51995b1fe5072d414039
342
py
Python
src/system_cpu_temp.py
magistersart/ZTC_fork
ce72734ea575d9846b5b81f3efbfd14fa1f7e532
[ "PostgreSQL" ]
null
null
null
src/system_cpu_temp.py
magistersart/ZTC_fork
ce72734ea575d9846b5b81f3efbfd14fa1f7e532
[ "PostgreSQL" ]
null
null
null
src/system_cpu_temp.py
magistersart/ZTC_fork
ce72734ea575d9846b5b81f3efbfd14fa1f7e532
[ "PostgreSQL" ]
null
null
null
#!/usr/bin/python """ system_cpu_temp - get cpu temperature This file is part of ztc, http://bitbucket.org/rvs/ztc/ Licensed under GPL v.3 Copyright (c) 2010 Vladimir Rusinov <vladimir@greenmice.info> Copyright (c) 2011 Wrike, Inc. [http://www.wrike.com] """ from ztc.hw.cpu import CPUTemperature c = CPUTemperature()...
22.8
61
0.736842
99d7f3cf454a527d08b6aa1e53b305a6db354ded
759
py
Python
SoftUni-Projects/cookbook/recipe/views.py
dechevh/SoftwareUniversity
8be1c0c096cf385a84093265a31767afd4454476
[ "MIT" ]
null
null
null
SoftUni-Projects/cookbook/recipe/views.py
dechevh/SoftwareUniversity
8be1c0c096cf385a84093265a31767afd4454476
[ "MIT" ]
null
null
null
SoftUni-Projects/cookbook/recipe/views.py
dechevh/SoftwareUniversity
8be1c0c096cf385a84093265a31767afd4454476
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from .models import Recipe from .forms import RecipeForm def list_recipes(request): recipes = Recipe.objects.all() if request.method == 'POST': form = RecipeForm(request.POST) if form.is_valid(): form.save() else: form = Rec...
24.483871
56
0.645586
415ea4de01a5ad9eabb3ec91b40cf848304744e6
1,763
py
Python
ColoredTextInPython-main/main.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
ColoredTextInPython-main/main.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
ColoredTextInPython-main/main.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
import colorama from colorama import Fore, Back, Style colorama.init(autoreset=True) print('\033[31m' + 'some red text') print('\033[39m') # and reset to default color print() print(f"{Fore.RED}C{Fore.GREEN}O{Fore.YELLOW}L{Fore.BLUE}O{Fore.MAGENTA}R{Fore.CYAN}S{Fore.WHITE}!") print(f"{Fore.RED}Red Text") pri...
43
220
0.71696
2b653af6f50af13968f9eadad6fc2ffdf023f513
219
py
Python
tests/utils.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
126
2019-09-16T15:28:20.000Z
2022-03-20T10:57:53.000Z
tests/utils.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
54
2019-09-30T08:44:01.000Z
2022-03-20T11:10:00.000Z
tests/utils.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
11
2020-01-02T08:32:46.000Z
2022-03-20T11:10:24.000Z
import sys from contextlib import contextmanager @contextmanager def recursion_limit(n): recursion_limit = sys.getrecursionlimit() sys.setrecursionlimit(n) yield sys.setrecursionlimit(recursion_limit)
19.909091
45
0.785388
9936d4141b5d26ed50a32d946fb3d9c4be3d7c3d
830
py
Python
rospy_misc/scripts/list_failing_subscription.py
eduidl/ros-misc
feda8f6890ff12b64fb11555babe43581ca972b4
[ "Apache-2.0" ]
2
2021-09-10T06:56:51.000Z
2021-09-10T06:57:02.000Z
rospy_misc/scripts/list_failing_subscription.py
eduidl/ros-misc
feda8f6890ff12b64fb11555babe43581ca972b4
[ "Apache-2.0" ]
null
null
null
rospy_misc/scripts/list_failing_subscription.py
eduidl/ros-misc
feda8f6890ff12b64fb11555babe43581ca972b4
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function from collections import defaultdict import rosgraph def topic_type(t, pub_topics): matches = [t_type for t_name, t_type in pub_topics if t_name == t] if matches: return matches[0] return None def main(): master = rosgraph.Master('/rosnode') state = ...
23.055556
79
0.624096
5c60839dd4fcfdec98115d15521f0eba1acc4d2d
613
py
Python
agents/nets/fc.py
etigerstudio/zilong-on-fire
5144a471b2d39ea38a47d394e648de00dd13cd8b
[ "MIT" ]
2
2021-01-07T01:10:49.000Z
2022-01-21T09:37:16.000Z
agents/nets/fc.py
etigerstudio/zilong-on-fire
5144a471b2d39ea38a47d394e648de00dd13cd8b
[ "MIT" ]
null
null
null
agents/nets/fc.py
etigerstudio/zilong-on-fire
5144a471b2d39ea38a47d394e648de00dd13cd8b
[ "MIT" ]
null
null
null
from tensorflow.keras import Model from tensorflow.keras.layers import Dense, Input class FCNet(Model): def __init__(self, output_dim=3): """ Args: output_dim: 网络需要三个输出,对应3个动作的累积回报 """ super(FCNet, self).__init__() self.d1 = Dense(8, activation='relu') ...
24.52
54
0.559543
5cd8ce9448b3783e55597d4ecb009edda887bb82
833
py
Python
sca/objectO/MainMetrics.py
NazaninBayati/SCA
74e670462dd0da5e24147aab86df393b38405176
[ "MIT" ]
null
null
null
sca/objectO/MainMetrics.py
NazaninBayati/SCA
74e670462dd0da5e24147aab86df393b38405176
[ "MIT" ]
null
null
null
sca/objectO/MainMetrics.py
NazaninBayati/SCA
74e670462dd0da5e24147aab86df393b38405176
[ "MIT" ]
null
null
null
import understand import sys class Metrics: def __int__(self,db): self.db = db def DBlodb(args): db = understand.open(str(args)) return db def metric_val(self,file): self.file = file file_metric = [] metrics = self.file.metric(self.file.metrics()) ...
23.138889
72
0.531813
7a6668b107c359507231a77654f9869f952c9240
5,110
py
Python
project/views/reference_request.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
project/views/reference_request.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
project/views/reference_request.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
from flask import abort, flash, redirect, render_template, url_for from flask_babelex import gettext from flask_security import auth_required from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.sql import desc from project import app, db from project.access import ( can_request_event_reference, get_admi...
32.547771
120
0.700783
8f3dc29c7a5cecb434f6c086c735bc6d4f934523
873
py
Python
deutschland/nina/__init__.py
kiranmusze/deutschland
86d8ead3f38ad88ad66bb338b9f5a8db06992344
[ "Apache-2.0" ]
null
null
null
deutschland/nina/__init__.py
kiranmusze/deutschland
86d8ead3f38ad88ad66bb338b9f5a8db06992344
[ "Apache-2.0" ]
null
null
null
deutschland/nina/__init__.py
kiranmusze/deutschland
86d8ead3f38ad88ad66bb338b9f5a8db06992344
[ "Apache-2.0" ]
null
null
null
# flake8: noqa """ Bundesamt für Bevölkerungsschutz: NINA API Erhalten Sie wichtige Warnmeldungen des Bevölkerungsschutzes für Gefahrenlagen wie zum Beispiel Gefahrstoffausbreitung oder Unwetter per Programmierschnittstelle. # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https...
31.178571
180
0.824742
56b5e0f1db14ede585d808eb02c1a5cce3c6fd91
211
py
Python
site/public/courses/CS-1.1/Examples/ControlFlowExamples/print_vs_return.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
1
2021-08-24T20:22:19.000Z
2021-08-24T20:22:19.000Z
site/public/courses/CS-1.1/Examples/ControlFlowExamples/print_vs_return.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
site/public/courses/CS-1.1/Examples/ControlFlowExamples/print_vs_return.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
def say_hello(): return "Hello!" def add(x, y): return x + y say_hello() a = 3 b = 5 add(a, b) # This doesn't print anything result = add(a, b) print(result) # This prints the result
13.1875
40
0.57346
d920570aeeaa2d4c7d6fee0f179ecc320446f44b
443
py
Python
Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCFieldProtection/NCSCFieldProtection.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCFieldProtection/NCSCFieldProtection.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/NCSCCyberAsssessmentFramework/Scripts/NCSCFieldProtection/NCSCFieldProtection.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 args = demisto.args() cliName = args.get("cliName") name = args.get("name") new = args.get("new") old = args.get("old") selectValues = args.get("selectValues") user = args.get("user", {}) user_id = user.get("id", None) if user e...
31.642857
75
0.690745
79791d6ac89dd667f71a6881cad01a140e2f49be
150
py
Python
src/entity/__init__.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
src/entity/__init__.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
src/entity/__init__.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
from type import APV from utils.io.XLoader import get_rainy_days __all__ = [ "apv_mapper", ] apv_mapper: APV = [] rainy_days = get_rainy_days()
15
43
0.726667
ba56f098ec30042502da18d898e2c033c1a4a341
5,061
py
Python
official/nlp/lstm/infer/sdk/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/nlp/lstm/infer/sdk/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/nlp/lstm/infer/sdk/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# coding = utf-8 """ Copyright 2021 Huawei Technologies Co., Ltd Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://opensource.org/licenses/BSD-3-Clause Unless required by applicable law or agreed ...
44.787611
120
0.643944
ebf08825738000e48f44f10c43508ab35a9a2e22
146
py
Python
run.py
schmocker/pv-FHNW
5066e0bc7ce76be5d1a930b50034c746b232a9f8
[ "MIT" ]
1
2019-10-31T13:34:12.000Z
2019-10-31T13:34:12.000Z
run.py
schmocker/pv-FHNW
5066e0bc7ce76be5d1a930b50034c746b232a9f8
[ "MIT" ]
1
2019-05-27T13:03:25.000Z
2019-05-27T13:03:25.000Z
run.py
schmocker/pv-FHNW
5066e0bc7ce76be5d1a930b50034c746b232a9f8
[ "MIT" ]
null
null
null
from pvtool import create_app, Config if __name__ == "__main__": app = create_app(Config) app.run(host='0.0.0.0', port=5000, debug=True)
24.333333
50
0.684932
d1848faff779d6ef0739f0341d2cdec839ebb162
811
py
Python
pcbV10/hide_references_show_values.py
klaus-liebler/labathome
15c91238e32a123f4bd6af4a9cde80d0a91aa5d7
[ "MIT" ]
2
2022-02-07T14:25:52.000Z
2022-02-16T17:57:51.000Z
pcbV10/hide_references_show_values.py
klaus-liebler/labathome
15c91238e32a123f4bd6af4a9cde80d0a91aa5d7
[ "MIT" ]
7
2020-09-26T14:00:31.000Z
2022-01-01T10:53:17.000Z
pcbV10/hide_references_show_values.py
klaus-liebler/labathome
15c91238e32a123f4bd6af4a9cde80d0a91aa5d7
[ "MIT" ]
null
null
null
import glob import os source = glob.glob("*.kicad_pcb")[0] source_renamed=source+"-bak_move"; sourceHandle=open(source, mode="r") sourceLines = sourceHandle.read().splitlines() sourceHandle.close() targetLines=[] for line in sourceLines: if(line.find("fp_text reference")!=-1 and line.find("hide")==-1): li...
28.964286
69
0.668311
d18a3f6aa55fe482be0cb7cbcf319a740cfc355f
247
py
Python
MyTimeMaschine/urls.py
Murphy-KS/MyTimeMashine
a1cd5b17b239a556b1d234aace9b333f71ec2045
[ "MIT" ]
null
null
null
MyTimeMaschine/urls.py
Murphy-KS/MyTimeMashine
a1cd5b17b239a556b1d234aace9b333f71ec2045
[ "MIT" ]
null
null
null
MyTimeMaschine/urls.py
Murphy-KS/MyTimeMashine
a1cd5b17b239a556b1d234aace9b333f71ec2045
[ "MIT" ]
null
null
null
""" MyTimeMaschine URL Configuration """ from django.contrib import admin from django.urls import path, include from timerecorder import urls as time_app urlpatterns = [ path('admin/', admin.site.urls), path('', include(time_app)), ]
15.4375
41
0.716599
ae1c5fb423ef7ffd1e8604550f505fefc0ffaf65
941
py
Python
zugdaten/summaries/visualize_summaries.py
cfleschhut/virushack
2fe7ded0be8672b066edef7fed52573794db2ba5
[ "Apache-2.0" ]
29
2020-03-21T00:47:51.000Z
2021-07-17T15:50:33.000Z
zugdaten/summaries/visualize_summaries.py
cfleschhut/virushack
2fe7ded0be8672b066edef7fed52573794db2ba5
[ "Apache-2.0" ]
7
2020-03-21T14:04:26.000Z
2022-03-02T08:05:40.000Z
zugdaten/summaries/visualize_summaries.py
cfleschhut/virushack
2fe7ded0be8672b066edef7fed52573794db2ba5
[ "Apache-2.0" ]
13
2020-03-21T01:08:08.000Z
2020-04-08T17:21:11.000Z
from matplotlib import pyplot as plt import os import pandas as pd from datetime import datetime os.chdir(os.path.dirname(__file__)) dir, folders, files = next(os.walk("data")) master = pd.DataFrame() for f in folders: print(f) path = os.path.join(dir, f, f + ".json") df = pd.read_json(path) df = df.reset_ind...
27.676471
77
0.688629
c9b66a8180c439e1e0efaf13fb178c6ecb095b8d
3,616
py
Python
Python/Programação_em_Python_Essencial/6- Funções/funcoes_com_parametro_padrao.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Programação_em_Python_Essencial/6- Funções/funcoes_com_parametro_padrao.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Programação_em_Python_Essencial/6- Funções/funcoes_com_parametro_padrao.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
""" Funções com Parâmetro Padrão (Default Paramters) - Funções onde a passagem de parâmetro seja opcional; # Exemplo de função onde a passagem de parâmetro seja opcional print('Geek University') print() # Exemplo de função onde a passagem de parâmetro seja obrigatória def quadrado(numero): return numero ** 2 ...
19.234043
125
0.727046
093ae87a37a543fb8bcb325ee73ac36771c1cd6c
2,680
py
Python
src/binarySearch.py
ianxin/algorithm
22214b6c81bee926f5a1c74c9417b2e7edd3ceed
[ "MIT" ]
2
2018-03-13T08:59:14.000Z
2018-03-13T08:59:25.000Z
src/binarySearch.py
ianxin/Algorithm
22214b6c81bee926f5a1c74c9417b2e7edd3ceed
[ "MIT" ]
null
null
null
src/binarySearch.py
ianxin/Algorithm
22214b6c81bee926f5a1c74c9417b2e7edd3ceed
[ "MIT" ]
null
null
null
''' 经典二分法 适用于没有重复元素的有序数组 ''' def binarySearch(nums,target): if len(nums) == 0: return -1 start = 0 end = len(nums)-1 while start+1 < end: mid = (start+end)>>1 if nums[mid]>target: end = mid elif nums[mid]<target: start = mid else: ...
21.967213
87
0.529478
6da188464d490fe9cb01b1aa467936c288c89293
472
py
Python
skripte/validate.py
Ilaris-Tools/IlarisDB
9608afa0ebc69c2bbc13af939cb2c71321f5da37
[ "MIT" ]
null
null
null
skripte/validate.py
Ilaris-Tools/IlarisDB
9608afa0ebc69c2bbc13af939cb2c71321f5da37
[ "MIT" ]
4
2022-03-13T22:56:35.000Z
2022-03-16T11:33:27.000Z
skripte/validate.py
Ilaris-dev/IlarisDB
9608afa0ebc69c2bbc13af939cb2c71321f5da37
[ "MIT" ]
null
null
null
import yamale import sys import interface as db table = "kreaturen" schemaf = "kreaturen" if len(sys.argv) > 1: table = sys.argv[1] if len(sys.argv) > 2: schemaf = sys.argv[2] db.validate(table, schemaf=schemaf) # print(f"Prüfe {len(data[0][0].keys())} Kreaturen:") # schema = yamale.make_schema('../schemata/...
24.842105
58
0.684322
09fd78c8fb7793eeab43274f2ee8549f0e92762c
10,170
py
Python
etl/data_extraction/scraper.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
7
2020-04-23T20:16:11.000Z
2022-01-04T14:57:16.000Z
etl/data_extraction/scraper.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
361
2020-04-23T17:20:14.000Z
2022-03-02T11:29:45.000Z
etl/data_extraction/scraper.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
1
2021-11-29T06:02:52.000Z
2021-11-29T06:02:52.000Z
import os import sys import time import requests from lxml.html.clean import Cleaner from bs4 import BeautifulSoup from tqdm import tqdm from shared.utils import append_data_to_json, write_data_to_json from shared.logger_factory import LoggerFactory from shared.stats_collector import StatsCollector ROOT_DIR = os.pat...
38.669202
151
0.619567
28a794b84cffed658d6c69a4014f985c141fd71f
959
py
Python
pelicanconf.py
calebwatt15/wattinfosec.com
26321f66ace9456cce5d894981a2fef45c7bb610
[ "Apache-2.0" ]
null
null
null
pelicanconf.py
calebwatt15/wattinfosec.com
26321f66ace9456cce5d894981a2fef45c7bb610
[ "Apache-2.0" ]
7
2015-09-26T22:24:41.000Z
2015-12-14T19:50:37.000Z
pelicanconf.py
calebwatt15/wattinfosec.com
26321f66ace9456cce5d894981a2fef45c7bb610
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'Caleb' SITENAME = u'WattInfoSec' SITEURL = 'https://wattinfosec.com' STATIC_PATHS = ['images'] PATH = 'content' TIMEZONE = 'America/Chicago' DEFAULT_LANG = u'en' # Feed generation is usually not desired when developi...
24.589744
77
0.685089
c94593d9d74171c70b20b29837cdaa005496b45c
1,523
py
Python
backend/fakebox/models/game.py
teodorvoicencu/FakeBox
f14ca83643894d9d0761294cfce511a52401de68
[ "MIT" ]
null
null
null
backend/fakebox/models/game.py
teodorvoicencu/FakeBox
f14ca83643894d9d0761294cfce511a52401de68
[ "MIT" ]
null
null
null
backend/fakebox/models/game.py
teodorvoicencu/FakeBox
f14ca83643894d9d0761294cfce511a52401de68
[ "MIT" ]
null
null
null
import random import string from enum import IntEnum from models.player import Player class State(IntEnum): INACTIVE = 0 AWAITING_VIP = 1 AWAITING_PLAYERS = 2 ACTIVE = 3 class GameException(RuntimeError): pass class Game: def __init__(self): self.player_count = 0 self.code...
22.072464
78
0.630991
6e9ed849c7afa04181fb0e78cdad2cd2baafaf01
1,019
py
Python
GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOcoordinates.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/mActionGTOcoordinates.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/mActionGTOcoordinates.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.QtWidgets import QDockWidget from .gto_coordinate import GTOCoordinatesDockWidget class run(object): def __init__(self, id, gtoTool, config, debug): super(run, self).__init__() try: # references self.result = None ...
36.392857
107
0.609421
6eea3bce42baa722c29e1e6d9741c8879a8a14a4
1,790
py
Python
ingress/ambassador/end-to-end/grpc-service/server.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
63
2018-02-04T03:31:22.000Z
2022-03-07T08:27:39.000Z
ingress/ambassador/end-to-end/grpc-service/server.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
3
2021-03-26T00:22:50.000Z
2021-03-26T00:26:07.000Z
ingress/ambassador/end-to-end/grpc-service/server.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
40
2018-01-22T16:31:16.000Z
2022-03-08T04:40:42.000Z
#!/usr/bin/env python # Copyright 2018 Datawire. 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 b...
29.344262
117
0.746369
2854f14e8505f6de65e7019d82acee1fec94717f
750
py
Python
HW2/ssift_descriptor.py
kvswim/kv_jhu_cv
2ddf7a9d497aef116a7c043157b8631cea45000d
[ "MIT" ]
null
null
null
HW2/ssift_descriptor.py
kvswim/kv_jhu_cv
2ddf7a9d497aef116a7c043157b8631cea45000d
[ "MIT" ]
null
null
null
HW2/ssift_descriptor.py
kvswim/kv_jhu_cv
2ddf7a9d497aef116a7c043157b8631cea45000d
[ "MIT" ]
null
null
null
import cv2 import numpy import matplotlib.pyplot as plt def ssift_descriptor(feature_coords,image): """ DO NOT DO - not required for 461 Computer Vision 600.461/661 Assignment 2 Args: feature_coords (list of tuples): list of (row,col) tuple feature coordinates from image image (numpy.nd...
37.5
128
0.654667
95d4395d70e682a25d8bd10c57ef68e3570a8436
27,425
py
Python
dark.py
DARKFARID13/darkfbv3
c0c87ad70bc7b1c6d8ab5fbd72e673abcaf6d167
[ "MIT" ]
null
null
null
dark.py
DARKFARID13/darkfbv3
c0c87ad70bc7b1c6d8ab5fbd72e673abcaf6d167
[ "MIT" ]
null
null
null
dark.py
DARKFARID13/darkfbv3
c0c87ad70bc7b1c6d8ab5fbd72e673abcaf6d167
[ "MIT" ]
4
2019-09-13T12:44:21.000Z
2021-08-16T18:12:27.000Z
import marshal,zlib,base64 exec(marshal.loads(zlib.decompress(base64.b64decode("eJztvXl0Hcl1H1z9FgDvYd8JgkuDHJLgzGDfCM6AHO6khgTpB3IwwzEFN9ANoIG38XWDBEagJXvmfLFkxVpsaWJZSuRIliPbcfxZtiNZdpzY+SOxEtuK5SVSnMhz7JPkxDpJ5NjHjuNM7r1V1ct7/RaABElJ5FKvurv2rr73d2/durXAxJ8o/H8B/luXIozp8E9hScZuOnGF3VRkPMRuhmQ8zG6GZTzCbkZkPMpuRmW8it2s...
13,712.5
27,398
0.967876
95eb21d27fe2e46c2c21b486fe677a6e3ae7728b
530
py
Python
packages/watchmen-model/src/watchmen_model/admin/user.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/admin/user.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/admin/user.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from enum import Enum from typing import List from pydantic import BaseModel from watchmen_model.common import OptimisticLock, TenantBasedTuple, UserGroupId, UserId class UserRole(str, Enum): CONSOLE = 'console', ADMIN = 'admin', # noinspection SpellCheckingInspection SUPER_ADMIN = 'superadmin' class User(Ten...
22.083333
87
0.766038
c2d93470ef3b0042a42c3fe0fc16485cfdded6b0
4,839
py
Python
Calliope-Rennspiel/Python/ki-datenlogger.py
rao003/ki-in-schulen
ec7e69da6d728ce6480711b45cea0aef7796b14b
[ "MIT" ]
10
2021-05-27T15:08:45.000Z
2022-03-01T17:21:24.000Z
Calliope-Rennspiel/Python/ki-datenlogger.py
telekom/ki-in-schulen
ec7e69da6d728ce6480711b45cea0aef7796b14b
[ "MIT" ]
null
null
null
Calliope-Rennspiel/Python/ki-datenlogger.py
telekom/ki-in-schulen
ec7e69da6d728ce6480711b45cea0aef7796b14b
[ "MIT" ]
3
2021-04-08T12:44:30.000Z
2021-06-21T08:20:59.000Z
# # ki-datenlogger.py$ # # (C) 2020, Christian A. Schiller, Deutsche Telekom AG # # Deutsche Telekom AG and all other contributors / # copyright owners license this file to you under the # MIT License (the "License"); you may not use this # file except in compliance with the License. # You may obtain a copy of the Lice...
38.102362
113
0.716884
6c352abd0746db4aacc20aad40f2f4bb00cce728
5,754
py
Python
Packs/Kenna/Integrations/KennaV2/Tests_Data/ExpectedResult.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Kenna/Integrations/KennaV2/Tests_Data/ExpectedResult.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Kenna/Integrations/KennaV2/Tests_Data/ExpectedResult.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
VULNERABILITIES_SEARCH_EXPECTED = { 'Kenna.Vulnerabilities(val.ID === obj.ID)': [{ "AssetID": 1, "Connectors": [ { "DefinitionName": "Kenna", "ID": 1, "Name": "Kenna", "Vendor": "Kenna" }, { ...
33.649123
81
0.34098
66701382a94d9c172c2ab27eac1776f8d700e65f
14,122
py
Python
lab2/algorithms.py
B0mM3L6000/CI
3b55ef8e6017a596e7b22e20a16ca7659bc73204
[ "MIT" ]
1
2018-04-18T19:55:42.000Z
2018-04-18T19:55:42.000Z
lab2/algorithms.py
B0mM3L6000/CI
3b55ef8e6017a596e7b22e20a16ca7659bc73204
[ "MIT" ]
null
null
null
lab2/algorithms.py
B0mM3L6000/CI
3b55ef8e6017a596e7b22e20a16ca7659bc73204
[ "MIT" ]
null
null
null
from collections import deque from city import distance, GeoCity, Euc_2D, GeoCoord from tspparse import read_tsp_file from numpy import array import time import numpy as np import random import sys def calc_distance(tsp, city1_index, city2_index): """Calculate distance between cities by their (one-based) indices""...
34.697789
122
0.645305
dd7adc98ced04036aa32ed8efbc56c7572ea996b
295
py
Python
packages/watchmen-rest/src/watchmen_rest/prometheus.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest/src/watchmen_rest/prometheus.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest/src/watchmen_rest/prometheus.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from fastapi import FastAPI from .settings import RestSettings def install_prometheus(app: FastAPI, settings: RestSettings) -> None: from starlette_prometheus import metrics, PrometheusMiddleware app.add_middleware(PrometheusMiddleware) app.add_route(settings.PROMETHEUS_CONTEXT, metrics)
29.5
69
0.840678
664412ef2744e4283738375d3bb8c296043f7c71
2,261
py
Python
2019/beginners/crypto-caulingo/solution.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
2019/beginners/crypto-caulingo/solution.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
2019/beginners/crypto-caulingo/solution.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
#!/usr/bin/env python3 # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
57.974359
626
0.830164
9ff35063fd9c5086dbb2347a523380808aebdcfd
3,440
py
Python
yolov5-coreml-tflite-converter/tflite/tf_metadata/metadata_writer.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/tflite/tf_metadata/metadata_writer.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/tflite/tf_metadata/metadata_writer.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
import shutil import tempfile from pathlib import Path from tflite_support import flatbuffers from tflite_support import metadata as _metadata from tflite_support import metadata_schema_py_generated as _metadata_fb from constants import FULLINT8, LABELS_NAME from tf_metadata.input_metadata_writer import InputMetadata...
39.54023
117
0.674419
af1ac5a7e2452060934d5ddc31c849c5e0395c7c
929
py
Python
P8702N/usbService-fileSharing_add.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
P8702N/usbService-fileSharing_add.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
P8702N/usbService-fileSharing_add.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
import requests import impat impat.addfolder('python') from FunCom import find_between from session import login, host, cookies if login.status_code == requests.codes.ok and cookies['SESSION'] is not '': print('=~=~=~=~=~=~=~=~=~=~=~= =~=~=~=~=~=~=~=~=~=~=~=') f = requests.get('ht...
46.45
120
0.584499
bbdaa51a80709cadaf0421f1ed72bc5185643287
1,500
py
Python
analysis/plot_map.py
MeteorologieHautnah/MeteorologieHautnah
1607c25b85753f31faccfd279abd503b83c1f4ea
[ "MIT" ]
1
2022-02-17T08:24:13.000Z
2022-02-17T08:24:13.000Z
analysis/plot_map.py
MeteorologieHautnah/MeteorologieHautnah
1607c25b85753f31faccfd279abd503b83c1f4ea
[ "MIT" ]
null
null
null
analysis/plot_map.py
MeteorologieHautnah/MeteorologieHautnah
1607c25b85753f31faccfd279abd503b83c1f4ea
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Plot a map of the given input *author*: Johannes Röttenbacher """ # %% import modules import os import pandas as pd import matplotlib.pyplot as plt import cartopy.crs as ccrs import cartopy.io.img_tiles as cimgt # %% define paths data_path = "C:/Users/Johannes/Documents/MeteorologieHautnah/M...
34.883721
109
0.706667
3c90ee5984b65a0bede8f241194ff22a19ed8ade
157
py
Python
lbry/lbry/cryptoutils.py
mittalkartik2000/lbry-sdk
a07b17ec0c9c5d0a88bc730caf6ab955e0971b38
[ "MIT" ]
null
null
null
lbry/lbry/cryptoutils.py
mittalkartik2000/lbry-sdk
a07b17ec0c9c5d0a88bc730caf6ab955e0971b38
[ "MIT" ]
4
2020-10-27T21:53:05.000Z
2022-02-11T03:10:54.000Z
lbry/lbry/cryptoutils.py
braveheart12/lbry-sdk
dc709b468f9dce60d206161785def5c7ace2b763
[ "MIT" ]
null
null
null
import hashlib from cryptography.hazmat.backends import default_backend backend = default_backend() def get_lbry_hash_obj(): return hashlib.sha384()
15.7
56
0.796178
59eaea8559450fa752cb7c5487e479b93a8dcc74
1,473
py
Python
quick.py
andrevictor17/aulasRenzoEd
931d73f5d20e7a3c837f175131bf3a271c7f375f
[ "MIT" ]
null
null
null
quick.py
andrevictor17/aulasRenzoEd
931d73f5d20e7a3c837f175131bf3a271c7f375f
[ "MIT" ]
null
null
null
quick.py
andrevictor17/aulasRenzoEd
931d73f5d20e7a3c837f175131bf3a271c7f375f
[ "MIT" ]
null
null
null
import unittest def quick_sort(seq): def sort(inicio, final): if inicio >= final: return seq i_esquerda = inicio + 1 i_direita = inicio + 1 pivot = seq[inicio] while i_direita <= final: if seq[i_direita] < pivot: temp = seq[i_esquerda]...
30.6875
116
0.570265
2806a5ebdc83f4d4f81f32157b8ea29f4cb6cfe8
1,310
py
Python
loesungsvorschlaege/ml_3_kuenstliche_neuronale_netze/praxis/01/marienkaefer_raupen_beispiel.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
loesungsvorschlaege/ml_3_kuenstliche_neuronale_netze/praxis/01/marienkaefer_raupen_beispiel.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
loesungsvorschlaege/ml_3_kuenstliche_neuronale_netze/praxis/01/marienkaefer_raupen_beispiel.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import pandas as pd column_names = ["breite", "hoehe", "class"] mr_data_set = pd.read_csv("raupen_marienkaefer.csv", names=column_names, header=None) # Alle Zeilen der ersten beiden Spalten matrix_X = mr_data_set.iloc[0:20, 0:2].values # Plot vorbereiten figure = pl...
29.111111
112
0.672519
e95004360dea364f5369e1940a127ae2b084f64c
1,451
py
Python
forge/lib/utils.py
Pandinosaurus/3d-forge
d631e14a9351911c3e5612c73c1608d97ed547d2
[ "BSD-3-Clause" ]
31
2015-07-13T15:36:50.000Z
2022-02-07T21:37:51.000Z
forge/lib/utils.py
Pandinosaurus/3d-forge
d631e14a9351911c3e5612c73c1608d97ed547d2
[ "BSD-3-Clause" ]
109
2015-04-24T10:03:24.000Z
2019-04-12T13:34:01.000Z
forge/lib/utils.py
Pandinosaurus/3d-forge
d631e14a9351911c3e5612c73c1608d97ed547d2
[ "BSD-3-Clause" ]
16
2015-10-03T06:03:22.000Z
2022-03-31T08:24:37.000Z
# -*- coding: utf-8 -*- import requests import cStringIO from forge.lib.tiler import grid from forge.lib.helpers import gzipFileObject from forge.lib.boto_conn import getBucket, writeToS3 def tilePathTemplate(x, y, z): return '%s/%s/%s.terrain' % (z, x, y) def loadTileContent(baseURL, key, headers): url =...
30.87234
67
0.614059
e97fbb4ea5d7f18856311218e21d971a215d8b11
264
py
Python
monitoring/zabbix/zabbix/container-files-zabbix/config/pyzabbix.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
63
2018-02-04T03:31:22.000Z
2022-03-07T08:27:39.000Z
monitoring/zabbix/zabbix/container-files-zabbix/config/pyzabbix.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
3
2020-06-15T03:41:03.000Z
2020-06-15T03:41:04.000Z
monitoring/zabbix/zabbix/container-files-zabbix/config/pyzabbix.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
40
2018-01-22T16:31:16.000Z
2022-03-08T04:40:42.000Z
from zabbix.api import ZabbixAPI zapi = ZabbixAPI(url='http://localhost/', user='Admin', password='zabbix') hosts = zapi.host.getobjects(status=1) for host in hosts: print 'Enabling host: %s' % host['name'] zapi.host.update(hostid=host['hostid'],status=0)
37.714286
74
0.708333
f997577d1867645bc88c4922379a79b67c7bc805
951
py
Python
surface/qPanel.py
StefanSchmelz/whoGetsTheMillion
99a42b6a2e99def4faa05787b4869387d7827f86
[ "MIT" ]
null
null
null
surface/qPanel.py
StefanSchmelz/whoGetsTheMillion
99a42b6a2e99def4faa05787b4869387d7827f86
[ "MIT" ]
null
null
null
surface/qPanel.py
StefanSchmelz/whoGetsTheMillion
99a42b6a2e99def4faa05787b4869387d7827f86
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import tkinter as tk from surface.editQuestion import QuestionEditFrame from surface.editAnswer import AnswerFrame class QuestionEditPanel (tk.Frame): def __init__(self, parent=None, corr="", ff=""): tk.Frame.__init__(self, parent) self.question = QuestionEditFrame(parent) ...
35.222222
57
0.619348
349c58e76573e16d37d94db6d2147c81f5febad4
778
py
Python
jiuzhang/Nine Chapters/3 Binary Tree & Divide Conquer/py/SearchRangeinBinarySearchTree_rec.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
jiuzhang/Nine Chapters/3 Binary Tree & Divide Conquer/py/SearchRangeinBinarySearchTree_rec.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
jiuzhang/Nine Chapters/3 Binary Tree & Divide Conquer/py/SearchRangeinBinarySearchTree_rec.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param root: The root of the binary search tree. @param k1 and k2: range k1 to k2. @return: Return all keys that k1<=key<=k2 in ascending o...
23.575758
65
0.569409
b5bcc3285f78c277e572b719e601ecaeb8ea2528
25,177
py
Python
rbac/common/protobuf/user_transaction_pb2.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
75
2018-04-06T09:13:34.000Z
2020-05-18T18:59:47.000Z
rbac/common/protobuf/user_transaction_pb2.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
989
2018-04-18T21:01:56.000Z
2019-10-23T15:37:09.000Z
rbac/common/protobuf/user_transaction_pb2.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
72
2018-04-13T18:29:12.000Z
2020-05-29T06:00:33.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: user_transaction.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection ...
41.477759
1,983
0.736466
c0a2573f3972e49e6856e656d41af5a0a3eb4a6c
21,341
py
Python
Python/GuiStepscope/tdr.py
jimwaschura/Automation
f655feeea74ff22ebe44d8b68374ba6983748f60
[ "BSL-1.0" ]
null
null
null
Python/GuiStepscope/tdr.py
jimwaschura/Automation
f655feeea74ff22ebe44d8b68374ba6983748f60
[ "BSL-1.0" ]
null
null
null
Python/GuiStepscope/tdr.py
jimwaschura/Automation
f655feeea74ff22ebe44d8b68374ba6983748f60
[ "BSL-1.0" ]
null
null
null
# tdr.py # ================================================================================ # BOOST SOFTWARE LICENSE # # Copyright 2020 BitWise Laboratories Inc. # Original Author.......Jim Waschura # Contact...............info@bitwiselabs.com # # Permission is hereby granted, free of charge, to any person or organizat...
43.02621
119
0.568155
c0e47407cf71a86026bec36f3197d2bd83c187a2
169
py
Python
mitglieder/templatetags/mitglieder_extras.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
8
2019-11-26T13:34:46.000Z
2021-06-21T13:41:57.000Z
mitglieder/templatetags/mitglieder_extras.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
93
2019-12-16T09:29:10.000Z
2021-04-24T12:03:33.000Z
mitglieder/templatetags/mitglieder_extras.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
2
2020-12-03T12:43:19.000Z
2020-12-22T21:48:47.000Z
from django import template register = template.Library() @register.filter def amtszeit_ende_isnull(value): if value is None: return True return False
16.9
32
0.727811
8d04f3e6f9bcf086fffab35be798a30da6f3d73a
1,823
py
Python
pacman-arch/test/pacman/tap.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/tap.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/tap.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
# Copyright (c) 2013-2021 Pacman Development Team <pacman-dev@archlinux.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any lat...
25.676056
77
0.641799
23c7582829ab12c3406c7f53d649cbd64777b153
321
py
Python
packages/watchmen-rest-doll/src/watchmen_rest_doll/util/crypt.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest-doll/src/watchmen_rest_doll/util/crypt.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest-doll/src/watchmen_rest_doll/util/crypt.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from passlib.context import CryptContext PWD_CONTEXT = CryptContext(schemes=["bcrypt"], deprecated="auto") def crypt_password(password: str) -> str: return PWD_CONTEXT.hash(password) def verify_password(plain_password: str, hashed_password: str) -> bool: return PWD_CONTEXT.verify(plain_password, hashed_password)...
26.75
71
0.794393
f1a6da4c50496d3383ac05f3aebcd3e4ac82514c
257
py
Python
DataProcess/my_paper/some_plot.py
ZhangQiHang-98/RFID_Scirpt
0f74087add4cf16e2d201ad4f31cc1abd287db7e
[ "MIT" ]
3
2021-12-24T04:52:03.000Z
2021-12-27T02:14:49.000Z
DataProcess/my_paper/some_plot.py
ZhangQiHang-98/RFID_Scirpt
0f74087add4cf16e2d201ad4f31cc1abd287db7e
[ "MIT" ]
null
null
null
DataProcess/my_paper/some_plot.py
ZhangQiHang-98/RFID_Scirpt
0f74087add4cf16e2d201ad4f31cc1abd287db7e
[ "MIT" ]
null
null
null
# !/usr/bin/env python # -*- coding: UTF-8 -*- """ @Project :DataProcess @File :some_plot.py @Author :Zhang Qihang @Description: 进行一些绘图 @Date :2021/12/11 16:52 """ import matplotlib.pyplot as plt import numpy as np import pandas as pd
18.357143
31
0.645914
f1d2c6d3f2352801fe40c68fa6f085a785ee8854
605
py
Python
src/onegov/pay/collections/payment_provider.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/pay/collections/payment_provider.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/pay/collections/payment_provider.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.collection import GenericCollection from onegov.pay.models import PaymentProvider class PaymentProviderCollection(GenericCollection): """ Manages the payment providers. """ @property def model_class(self): return PaymentProvider def as_default(self, provider): for ot...
23.269231
66
0.65124
c87fd5fde485e6b2b001a4be151b3c071ca75c78
903
py
Python
models/__init__.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
models/__init__.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
models/__init__.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
3
2017-09-11T08:02:11.000Z
2020-04-04T08:13:23.000Z
# -*- coding: utf-8 -*- import hr_employee import sanction_type import qual_type import medical_type import hr_employee_sanction import hr_employee_decoration import hr_employee_decoration_type import hr_employee_branche import hr_employee_note import hr_employee_last_job import hr_employee_formation_module import hr_...
23.153846
35
0.904762
b54a75e24f28a0e9ddc508afa18e062b294ab31f
7,592
py
Python
__main__.py
superbe/PizDB
478e9efb4754364a3ceb48a059ec53f8e54f3cbf
[ "MIT" ]
null
null
null
__main__.py
superbe/PizDB
478e9efb4754364a3ceb48a059ec53f8e54f3cbf
[ "MIT" ]
null
null
null
__main__.py
superbe/PizDB
478e9efb4754364a3ceb48a059ec53f8e54f3cbf
[ "MIT" ]
null
null
null
from collections import Counter, deque from enum import Enum from datetime import datetime class TypeCommand(Enum): BEGIN = 0 SET = 1 GET = 2 UNSET = 3 COUNTS = 4 ROLLBACK = 5 COMMIT = 6 class Arg: def __init__(self, command_line): if command_line is None: raise V...
32.583691
117
0.562698
93fdf7cc52a530f203b1cdb063aa6bc3f57f3397
314
py
Python
exercises/en/exc_01_08_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/en/exc_01_08_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/en/exc_01_08_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import spacy nlp = spacy.load("en_core_web_sm") text = "It’s official: Apple is the first U.S. public company to reach a $1 trillion market value" # Process the text doc = ____ # Iterate over the predicted entities for ent in ____.____: # Print the entity text and its label print(ent.____, ____.____)
22.428571
98
0.72293
f576c14cbe8fa08fdba6beea51a88752f4fae49c
5,098
py
Python
mortality.py
txtData/mortality2020
625a6410e721992aac1b00313c0415e51e9f73ca
[ "Apache-2.0" ]
null
null
null
mortality.py
txtData/mortality2020
625a6410e721992aac1b00313c0415e51e9f73ca
[ "Apache-2.0" ]
null
null
null
mortality.py
txtData/mortality2020
625a6410e721992aac1b00313c0415e51e9f73ca
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns data_file = 'mortality_germany.xlsx' months = ['Jan', 'Feb', 'März', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sept', 'Okt', 'Nov', 'Dez'] days_per_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] # Ignoring that Feb has 27...
38.330827
140
0.619851
1979158d53b4ad62a061a2fde3f60a4a47d95373
985
py
Python
IVTp/2014/Shcherbakov_R_A/task_04_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTp/2014/Shcherbakov_R_A/task_04_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTp/2014/Shcherbakov_R_A/task_04_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 4. Вариант 22. # Напишите программу, которая выводит имя, под которым скрывается Самюэл # Ленгхорн Клеменс. Дополнительно необходимо вывести область интересов # указанной личности, место рождения, годы рождения и смерти (если человек # умер), вычислить возраст на данный момент (или момент смерти). Для хранения...
41.041667
94
0.784772
198cad06586f9684e306fb129bfcd08da1dccb71
1,310
py
Python
source/pkgsrc/lang/python27/patches/patch-Lib_lib2to3_pgen2_driver.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/lang/python38/patches/patch-Lib_lib2to3_pgen2_driver.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/lang/python38/patches/patch-Lib_lib2to3_pgen2_driver.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-Lib_lib2to3_pgen2_driver.py,v 1.2 2020/08/15 12:35:57 schmonz Exp $ On systems where both of the conditions 1. LD_LIBRARY_PATH does _not_ take precedence over DT_RPATH (e.g. Linux) 2. A previous libpython with the same major.minor is already installed (e.g. a previous version of this package) ho...
39.69697
82
0.735115
5fecae1253ddcf44601e4bc9d982f7f20718dc4f
130
py
Python
1374-generate-a-string-with-characters-that-have-odd-counts/1374-generate-a-string-with-characters-that-have-odd-counts.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
1374-generate-a-string-with-characters-that-have-odd-counts/1374-generate-a-string-with-characters-that-have-odd-counts.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
1374-generate-a-string-with-characters-that-have-odd-counts/1374-generate-a-string-with-characters-that-have-odd-counts.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def generateTheString(self, n: int) -> str: return "a"+"b"*(n-1) if n==1 or n%2==0 else "ab"+"c"*(n-2)
43.333333
66
0.553846
8b8fe52982940dfe35d96f2a164d7b78f4896ce2
1,925
py
Python
parallel_processing/dask_vs_multiprocessing.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
null
null
null
parallel_processing/dask_vs_multiprocessing.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
1
2021-02-11T23:44:52.000Z
2021-02-11T23:44:52.000Z
parallel_processing/dask_vs_multiprocessing.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
1
2021-12-16T01:02:23.000Z
2021-12-16T01:02:23.000Z
""" Make http requests in parallel using multiprocessing and dask Which API is nicer Timing each suggests that dask/multiprocessing, as expected, speed up the requests by running in parallel. It might be preferrable to run in an asychronos manner instead of parallel processing. """ import multiprocessing import tim...
25.328947
121
0.682078
9a1f32e767ad8f894c267a17c30384a0be82a547
2,628
py
Python
research/cv/FaceAttribute/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/FaceAttribute/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/FaceAttribute/postprocess.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...
43.081967
115
0.685693
d080d1e51ebf4c2efcb52bcc77639338c4f52626
1,200
py
Python
CodeStatistics/files/f9ff7d3f-a592-42bb-9547-93349682f7ff/django_ajax/django_ajax/urls.py
zhangyafeii/Flask
9c9a5ea282f77aabcda838796dad2411af9b519f
[ "MIT" ]
null
null
null
CodeStatistics/files/f9ff7d3f-a592-42bb-9547-93349682f7ff/django_ajax/django_ajax/urls.py
zhangyafeii/Flask
9c9a5ea282f77aabcda838796dad2411af9b519f
[ "MIT" ]
null
null
null
CodeStatistics/files/f9ff7d3f-a592-42bb-9547-93349682f7ff/django_ajax/django_ajax/urls.py
zhangyafeii/Flask
9c9a5ea282f77aabcda838796dad2411af9b519f
[ "MIT" ]
null
null
null
"""django_ajax URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-b...
37.5
77
0.7
ef75477aa72d4227f0733f9e2fc81b4022db73ef
1,488
py
Python
quant/api/hitbtc.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
7
2017-10-22T15:00:09.000Z
2019-09-19T11:45:43.000Z
quant/api/hitbtc.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
1
2018-01-19T16:19:40.000Z
2018-01-19T16:19:40.000Z
quant/api/hitbtc.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
5
2017-12-11T15:10:29.000Z
2018-12-21T17:40:58.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- import requests BASE_URL = 'https://api.hitbtc.com/api/1' TIMEOUT = 5 class PublicClient(object): def __init__(self): super(PublicClient, self).__init__() @classmethod def _build_parameters(cls, parameters): # sort the keys so we can test eas...
28.615385
74
0.593414
4bef72ef1aa952cdea3de15a87f620c06f0cc2e0
378
py
Python
dqn/utils.py
laituan245/Reinforcement-Learning-Dojo
3187621c9188d72fe593ef69ecad6d1288889a51
[ "MIT" ]
null
null
null
dqn/utils.py
laituan245/Reinforcement-Learning-Dojo
3187621c9188d72fe593ef69ecad6d1288889a51
[ "MIT" ]
null
null
null
dqn/utils.py
laituan245/Reinforcement-Learning-Dojo
3187621c9188d72fe593ef69ecad6d1288889a51
[ "MIT" ]
null
null
null
import os import numpy as np def to_grayscale(img): return np.mean(img, axis=2).astype(np.uint8) def downsample(img): return img[::2, ::2] def crop(img): return img[34:194,:] def preprocess(img): return downsample(crop(to_grayscale(img))) / 255.0 def create_dir_if_not_exists(directory): if not ...
19.894737
54
0.690476
32be8f6b888949fb639fa1d901bcfaedb22bf7b8
229
py
Python
main.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
main.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
main.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
2
2021-02-03T04:34:26.000Z
2021-02-03T06:32:48.000Z
if __name__ == '__main__': from module.app import LabelApp from PyQt5.QtWidgets import QApplication import sys app = QApplication(sys.argv) label_app = LabelApp() label_app.show() sys.exit(app.exec())
25.444444
44
0.681223
72356dddd0d1f8d1807a8e76336be29d610174a9
520
py
Python
pythonProj/FZPython/demo/backtest/backtest_run_strategy.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/demo/backtest/backtest_run_strategy.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/demo/backtest/backtest_run_strategy.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
2
2019-04-10T10:05:00.000Z
2021-11-24T17:17:23.000Z
#!/usr/bin/env python # coding: utf8 from pyquant.models.backtest import * from pyquant.strategies.temp import * @listener(Monitor) def main(): strategy = CrossOver4 sd = SymbolData(fromdate='2000-01-01') # sd.symbol = Symbol.get_stock_by_ticker('000001',index=True) sd.symbol = Symbol.get_by_ticker...
20
65
0.657692
263bc1fd0d87c325dc10c1b4d49b5c1a528fe4b3
384
py
Python
2_DeepLearning-Keras/03_Model_load_save/load_save.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
2_DeepLearning-Keras/03_Model_load_save/load_save.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
2_DeepLearning-Keras/03_Model_load_save/load_save.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
import os from tensorflow.keras.models import load_model # Save path dir_path = os.path.abspath("../DeepLearning/models") # Linux und Windows model_path_name = os.path.join(dir_path, "model.h5") model.save_weights(filepath=model_path_name) # speichern model.load_weights(filepath=model_path_name) # laden model.save(...
25.6
72
0.773438
26d8ead8f7a8ed827d4ecca23c5716e9303ab72c
758
py
Python
components/amp-utility/python/cmath.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
components/amp-utility/python/cmath.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
components/amp-utility/python/cmath.py
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
# * coding: UTF8 * """ 模块提供一些对复数有效的基本数学函数 函数 ------------------------------ """ def cos(z): """ 函数返回 ``z`` 的余弦值 """ pass def exp(z): """ 函数返回 ``z`` 的指数值 """ pass def log(z): """ 函数返回 ``z`` 的自然对数 """ pass def log10(z): """ 函数返回以 ``z`` 以10为底的对数 """ pass def...
8.813953
56
0.422164
e43e719c246c96ead425fe99e8ec2f32a6172923
18,192
py
Python
python/various/who_cov.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
python/various/who_cov.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
python/various/who_cov.py
mpsonntag/snippets
fc3cc42ea49b885c1f29c0aef1379055a931a978
[ "BSD-3-Clause" ]
null
null
null
import copy import json from datetime import datetime from os import environ, path import numpy as np import requests from matplotlib import pyplot as plt from matplotlib import rcParams from matplotlib.lines import Line2D from pandas import DataFrame as PanDataFrame OUT_DIR = path.join(environ.get("HOME"), "Chaos"...
37.050916
100
0.618788
29a3bde861006a5da4db5e5e522ef4aa4fd6e9b5
250
py
Python
Licence 2/I33/TP 1/ex_13.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 2/I33/TP 1/ex_13.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 2/I33/TP 1/ex_13.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
def recherche(L,S,p): T = [] k = 0 while k < len(L) - p: somme = L[k] i = k + 1 while i <= p + k: somme += L[i] i += 1 if somme >= S: T += [k] k += 1 return T
19.230769
25
0.3
29d723a8c90b2063bbfecdf1ebe82e2d95b82753
395
py
Python
7-assets/past-student-repos/_DS-Python/Algorithms-I-Notes-master/practice_algs/smallest_missing_element.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/_DS-Python/Algorithms-I-Notes-master/practice_algs/smallest_missing_element.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/_DS-Python/Algorithms-I-Notes-master/practice_algs/smallest_missing_element.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Find the Smallest Missing Element from a Sorted Array # Given a sorted array of distinct non-negative integers, find the smallest missing element in it. ## Examples A = [0, 1, 2, 6, 9, 11, 15] # _Output:_ The smallest missing element is 3 B = [1, 2, 3, 4, 6, 9, 11, 15] # _Output:_ The smallest missing element is ...
26.333333
98
0.681013
4b0d9835701f4a89b0cebb07e5317d1295562626
8,143
py
Python
kts/ui/fitting_report.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
18
2019-02-14T13:10:07.000Z
2021-11-26T07:10:13.000Z
kts/ui/fitting_report.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-02-17T14:06:42.000Z
2019-09-15T18:05:54.000Z
kts/ui/fitting_report.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-09-15T13:12:42.000Z
2020-04-15T14:05:54.000Z
import time from contextlib import redirect_stdout import numpy as np from IPython.display import display from kts.settings import cfg from kts.ui.components import HTMLRepr, Column, Field, Annotation, Title, InnerColumn, Row, Progress, Raw from kts.ui.plotting import Line, Plot from kts.util.formatting import format...
38.230047
174
0.583569
4b1152ff78be3bde1f10d967041f3521dd5d2407
2,204
py
Python
hisim/postprocessing/chartbase.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
12
2021-10-05T11:38:24.000Z
2022-03-25T09:56:08.000Z
hisim/postprocessing/chartbase.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
6
2021-10-06T13:27:55.000Z
2022-03-10T12:55:15.000Z
hisim/postprocessing/chartbase.py
sdickler/HiSim
09a11d99f220f7cadb3cb7b09a6fce8f147243c8
[ "MIT" ]
4
2022-02-21T19:00:50.000Z
2022-03-22T11:01:38.000Z
import os import re class Chart: """ Parent class for plots to be exported. """ months_abbrev_uppercase = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEZ'] label_months_lowercase = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'Septe...
38
151
0.473684
8a7e658c8c5ad83510a08f96a4ff42b07053032d
1,141
py
Python
app/views/models/files.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/views/models/files.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/views/models/files.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
from flask_restplus import Model, fields from .commons import paginate_model file_input = Model('File Input', { 'file_name': fields.String(required=True, description='The file name', example='test.zip'), 'file_size': fields.Integer(required=True, description='The file size', example=100), 'reversion': fiel...
51.863636
103
0.725679
8a7f2e5bd0c62fa0bc9b9054ae43ab0f561c5be6
470
py
Python
Python/Exercícios_Python/020_sorteando_uma_ordem_na_lista.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Exercícios_Python/020_sorteando_uma_ordem_na_lista.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Exercícios_Python/020_sorteando_uma_ordem_na_lista.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """020 - Sorteando uma ordem na lista Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1_V9hmwSWetHmsg7FcYRCugHiG77Dksa1 """ from random import sample a1 = input('Primeiro aluno: ') a2 = input('Segundo aluno: ') a3 = input('Terce...
27.647059
77
0.704255
8a8cac671a0d398b706f5452627b850d65cb955a
1,378
py
Python
src/apps/XMLViewer.py
wrthfl/pyopenms-tewb
f02ab0393df746846c26ed6c812964f9da355b99
[ "Zlib", "Apache-2.0" ]
1
2020-05-26T16:16:14.000Z
2020-05-26T16:16:14.000Z
src/apps/XMLViewer.py
wrthfl/pyopenms-tewb
f02ab0393df746846c26ed6c812964f9da355b99
[ "Zlib", "Apache-2.0" ]
null
null
null
src/apps/XMLViewer.py
wrthfl/pyopenms-tewb
f02ab0393df746846c26ed6c812964f9da355b99
[ "Zlib", "Apache-2.0" ]
1
2020-05-16T20:09:17.000Z
2020-05-16T20:09:17.000Z
import sys import os from PyQt5.QtWidgets import QApplication, QMainWindow, \ QDesktopWidget sys.path.append(os.getcwd()+'/../view') from ConfigView import ConfigView # noqa E402 class XMLViewer(QMainWindow): """ Widget for visualizing configuration data """ def __init__(self): QMainWi...
24.175439
59
0.601597
6a560183b1ef0dce462f8655a44c9e3a19cf5c29
694
py
Python
ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/helper.py
Jimmy01240397/balsn-2021-writeup
91b71dfbddc1c214552280b12979a82ee1c3cb7e
[ "MIT" ]
null
null
null
ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/helper.py
Jimmy01240397/balsn-2021-writeup
91b71dfbddc1c214552280b12979a82ee1c3cb7e
[ "MIT" ]
null
null
null
ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/helper.py
Jimmy01240397/balsn-2021-writeup
91b71dfbddc1c214552280b12979a82ee1c3cb7e
[ "MIT" ]
null
null
null
from subprocess import Popen, PIPE from tempfile import NamedTemporaryFile import json from typing import Tuple def run_jq(json_str: str, program: str) -> Tuple[bool, str]: with NamedTemporaryFile() as jf, NamedTemporaryFile() as pf: jf.write(json_str.encode()) jf.flush() pf.write(program....
30.173913
88
0.610951
0aed35cd41ce1a711ea4ca3acf09b20b848e24f9
4,482
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/output/analyze_teleports.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
4
2020-11-13T02:35:56.000Z
2021-03-29T20:15:54.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/output/analyze_teleports.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
9
2020-12-09T02:12:39.000Z
2021-02-18T00:15:28.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/output/analyze_teleports.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2012-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is avail...
41.5
107
0.594601
0afa85a02400cf8938748154a0ddf7482d15feac
8,905
py
Python
oneflow/python/test/ops/test_broadcast_normal.py
caishenghang/oneflow
db239cc9f98e551823bf6ce2d4395bd5c339b1c5
[ "Apache-2.0" ]
2
2021-09-10T00:19:49.000Z
2021-11-16T11:27:20.000Z
oneflow/python/test/ops/test_broadcast_normal.py
duijiudanggecl/oneflow
d2096ae14cf847509394a3b717021e2bd1d72f62
[ "Apache-2.0" ]
null
null
null
oneflow/python/test/ops/test_broadcast_normal.py
duijiudanggecl/oneflow
d2096ae14cf847509394a3b717021e2bd1d72f62
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
33.35206
88
0.623695
7c99f3043d6c48a06dfd1d04890f48ff03342326
895
py
Python
python/en/archive/practice_python/practice_python-exercise04-Divisors.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/practice_python/practice_python-exercise04-Divisors.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/practice_python/practice_python-exercise04-Divisors.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ 2018-10-23 (Tue) PRACTICE PYTHON, https://www.practicepython.org/ Exercise 4. Divisors https://www.practicepython.org/exercise/2014/02/26/04-divisors.html Create a program that asks the user for a number and then prints out a list of all the divisors of that number. (If you don...
27.121212
80
0.677095
7ca27f5517a70bee664af4083723e78d5ce1ddff
3,954
py
Python
Crossbar/crossbar_test/subscription.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
Crossbar/crossbar_test/subscription.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
Crossbar/crossbar_test/subscription.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
############################################################################### # # Copyright (C) 2014, Tavendo GmbH and/or collaborators. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redi...
38.019231
118
0.683612
7ce344966419c8cf89bb1fe145b2a6cd25246666
1,184
py
Python
simplest.py
MrDlt/Plotting_Smooth_Curve
8165ee5147823559a37782bd22fad2a3bc2b8fd4
[ "MIT" ]
null
null
null
simplest.py
MrDlt/Plotting_Smooth_Curve
8165ee5147823559a37782bd22fad2a3bc2b8fd4
[ "MIT" ]
null
null
null
simplest.py
MrDlt/Plotting_Smooth_Curve
8165ee5147823559a37782bd22fad2a3bc2b8fd4
[ "MIT" ]
null
null
null
import numpy as np from scipy.interpolate import make_interp_spline import matplotlib.pyplot as plt # Dataset x = np.array([0,45.11,54,62.89,67.33,85.78]) #设置x轴数据,以','分隔 y = np.array([0,0.06,0.09,0.12,0.14,0.23]) #设置y轴数据,需与x轴数据一一对应 X_Y_Spline = make_interp_spline(x, y) # Returns evenly spaced numbers # over a s...
35.878788
96
0.71875
86d1b0fd4e16e2acf3c8567bde476bbdd737f873
1,332
py
Python
exercises/fr/solution_03_12.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/solution_03_12.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/solution_03_12.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import json import spacy from spacy.language import Language from spacy.tokens import Span from spacy.matcher import PhraseMatcher with open("exercises/fr/countries.json", encoding="utf8") as f: COUNTRIES = json.loads(f.read()) with open("exercises/fr/capitals.json", encoding="utf8") as f: CAPITALS = json.loa...
32.487805
87
0.754505
86f0dbfec573dc7c3782b7bcdbed5d0b7dfa6f45
3,850
py
Python
bin/file_list.py
username4gh/dotfiles
6ab3e6a7eecb82f01fadfa40a961164df34af091
[ "Unlicense" ]
5
2017-04-18T20:21:06.000Z
2020-12-28T05:44:39.000Z
bin/file_list.py
username4gh/dotfiles
6ab3e6a7eecb82f01fadfa40a961164df34af091
[ "Unlicense" ]
35
2016-09-21T18:04:51.000Z
2020-03-11T02:39:20.000Z
bin/file_list.py
username4gh/dotfiles
6ab3e6a7eecb82f01fadfa40a961164df34af091
[ "Unlicense" ]
2
2018-12-17T03:16:35.000Z
2020-10-18T10:09:01.000Z
#! /usr/bin/env python3 from os import curdir, scandir from pathlib import Path import argparse import fnmatch import os import sys import time import typing DEFAULT_SKIP_LIST = ['.git', '.hg'] SkipList = typing.Optional[typing.List[str]] def scantree( path_name: str, skip_list: SkipList = None, types: str ...
31.557377
81
0.587532
d48bd946cb1176c2151dc3837370df5ba65fbfc9
1,959
py
Python
TestBot/test_cogs/poketcgFunctions/quiz.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
TestBot/test_cogs/poketcgFunctions/quiz.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
TestBot/test_cogs/poketcgFunctions/quiz.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
from .. import sql, log, BASE_PATH import requests as r from io import BytesIO from PIL import Image from random import randint import json from discord import File def generate_random_quiz(): resp = r.get(f'https://pokeapi.co/api/v2/pokemon/{randint(1, 898)}').json() return Quiz(resp['id'], resp['name']) class Qui...
22.261364
76
0.617152
9c162ac71712a2dbd33c5f38a27768f8dd44dcb5
4,693
py
Python
tensorflow/basic-rl/tutorial1/egoMouseLook.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-05-10T09:16:23.000Z
2019-05-10T09:16:23.000Z
tensorflow/basic-rl/tutorial1/egoMouseLook.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
null
null
null
tensorflow/basic-rl/tutorial1/egoMouseLook.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-10-14T07:30:18.000Z
2019-10-14T07:30:18.000Z
import time import random import shelve import pdb import cellular reload(cellular) import qlearn_mod_random as qlearn # to use the alternative exploration method #import qlearn # to use standard exploration method reload(qlearn) directions = 8 lookdist = 2 lookcells = [] for i in range(-lookdist,lo...
28.101796
93
0.54251
92ed70fd40cd537675414be7b1979d46a18a7a23
663
py
Python
11_Multiprocessing/multi_process.py
felixdittrich92/Python3
16b767465e4bdf0adc652c195d15384bb9faa4cf
[ "MIT" ]
1
2022-03-02T07:16:30.000Z
2022-03-02T07:16:30.000Z
11_Multiprocessing/multi_process.py
felixdittrich92/Python3
16b767465e4bdf0adc652c195d15384bb9faa4cf
[ "MIT" ]
null
null
null
11_Multiprocessing/multi_process.py
felixdittrich92/Python3
16b767465e4bdf0adc652c195d15384bb9faa4cf
[ "MIT" ]
null
null
null
# läuft parallel import time import math from multiprocessing import Process NUM_PROCESSES = 4 def calc(num_elements): res = 0 for i in range(num_elements): res += math.sqrt(i) print(res) def main(): processes = [] for _ in range(NUM_PROCESSES): processes.append(Process(target=...
19.5
85
0.6546
136f0c35a8a3d0ab0e3a41287fe0be17dde6b11a
7,096
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cloudscale_server_group.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cloudscale_server_group.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cloudscale_server_group.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2019, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...
29.815126
129
0.651071
16b910d61612c93b931d1b8b1bfa5df1a19972b9
3,610
py
Python
bigbench/bbseqio/test_utils.py
dimmollo/BIG-bench
f0dffeb4f16ef5489686a81e2d63362d251cda3e
[ "Apache-2.0" ]
null
null
null
bigbench/bbseqio/test_utils.py
dimmollo/BIG-bench
f0dffeb4f16ef5489686a81e2d63362d251cda3e
[ "Apache-2.0" ]
null
null
null
bigbench/bbseqio/test_utils.py
dimmollo/BIG-bench
f0dffeb4f16ef5489686a81e2d63362d251cda3e
[ "Apache-2.0" ]
null
null
null
"""Utils for BIG-bench SeqIO tests.""" import functools from absl.testing import absltest from absl.testing import parameterized from bigbench.api import task_metrics from bigbench.bbseqio import bigbench_json_paths as bb_json_paths import seqio mock = absltest.mock class BigbenchBridgeTest(parameterized.TestCase)...
36.464646
89
0.666482
d5bddbf214b5e7ff6872e7d8d45be46e0c919344
334
py
Python
etl/core/singleton.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
etl/core/singleton.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
etl/core/singleton.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
def Singleton(cls): """ The Singleton Design Pattern. Each execution of the application can only create one instance of this class """ instances = {} def getinstance(*args, **kwargs): if cls not in instances: instances[cls] = cls(*args) return instances[cls] retur...
27.833333
71
0.628743
e6e3d104565573508b96e2292a540a2784479c57
810
py
Python
source/pkgsrc/devel/meson/patches/patch-mesonbuild_dependencies_dev.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/meson/patches/patch-mesonbuild_dependencies_dev.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/meson/patches/patch-mesonbuild_dependencies_dev.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-mesonbuild_dependencies_dev.py,v 1.4 2020/04/01 14:51:05 wiz Exp $ Allow handling different versions of LLVM in pkgsrc using LLVM_CONFIG_PATH. --- mesonbuild/dependencies/dev.py.orig 2020-03-23 17:22:09.000000000 +0000 +++ mesonbuild/dependencies/dev.py @@ -201,7 +201,10 @@ class LLVMDependencyConfigTo...
42.631579
81
0.690123
fc882276b5bd51618863abf1e96f84ec80360859
1,181
py
Python
tensorflow/basic-rl/tutorial12/code/train_mountaincar_continuous_pg_baselines.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-05-10T09:16:23.000Z
2019-05-10T09:16:23.000Z
tensorflow/basic-rl/tutorial12/code/train_mountaincar_continuous_pg_baselines.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
null
null
null
tensorflow/basic-rl/tutorial12/code/train_mountaincar_continuous_pg_baselines.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-05-10T09:17:28.000Z
2019-05-10T09:17:28.000Z
import gym from baselines.vpg import vpg import tensorflow as tf env = gym.envs.make("MountainCarContinuous-v0") scaler, featurizer = vpg.preprocess(env) tf.reset_default_graph() global_step = tf.Variable(0, name="global_step", trainable=False) policy_estimator = vpg.PolicyEstimator(env, learning_rate=0.001) value_es...
33.742857
93
0.65961