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
9d82c9cb5024f9c9cf0bd3159b46b6ac35fd02c1
1,144
py
Python
src/preprocessing/CannyFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
7
2015-11-27T09:53:32.000Z
2021-01-13T17:35:54.000Z
src/preprocessing/CannyFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
src/preprocessing/CannyFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
import numpy as np import cv, cv2 try: import vigra as vi except Exception, e: pass class CannyFilter(object): # def filter(self, rgb, depth, args = {}): # img = cv.fromarray(depth, cv.CV_8UC1) # mat1 = cv.CreateMat(img.rows, img.cols, cv.CV_8UC1) # mat2 = cv.CreateMa...
27.902439
62
0.592657
9de8548126c0bb0004bd92da17ad48b3fbc94ad4
74
py
Python
pythonProj/FZPython/pyquant/libs/__init__.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/pyquant/libs/__init__.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/pyquant/libs/__init__.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
2
2019-04-10T10:05:00.000Z
2021-11-24T17:17:23.000Z
# coding: utf8 # from .loglib import logger # from .socketioclient import
18.5
29
0.756757
ae65f90e332bf1f2c4e825ef0bd9ca41429699ca
1,727
py
Python
data.py
asfer/mnist_sandbox
69be6d623e948afdf92a3ca4c7ce77f93eafc0a8
[ "MIT" ]
null
null
null
data.py
asfer/mnist_sandbox
69be6d623e948afdf92a3ca4c7ce77f93eafc0a8
[ "MIT" ]
null
null
null
data.py
asfer/mnist_sandbox
69be6d623e948afdf92a3ca4c7ce77f93eafc0a8
[ "MIT" ]
null
null
null
import array import struct import numpy as np from PIL import Image class MNIST: """ MNIST dataset is composed of digit images of size 28x28 and its labels """ def __init__(self, data_dir): self.train_data, self.train_labels = self.parse_images(data_dir + '/train-images-idx3-ubyte'), \ ...
34.54
105
0.588303
c9ba834056a8519b7c1744c6f2bf6724bc877345
61
py
Python
ex1/evento.py
renzon/oo-inpe
1b33939974f998badbeebd7bfe182070e77ef98f
[ "MIT" ]
null
null
null
ex1/evento.py
renzon/oo-inpe
1b33939974f998badbeebd7bfe182070e77ef98f
[ "MIT" ]
null
null
null
ex1/evento.py
renzon/oo-inpe
1b33939974f998badbeebd7bfe182070e77ef98f
[ "MIT" ]
null
null
null
class Evento(): def __init__(self, s): self.s = s
20.333333
26
0.540984
01165dc10d67af40d30bb37cc14258aed30e386a
1,766
py
Python
rc4.py
gamegrd/YY
39fca68d11956508fdbc094c9c319b7a7082722f
[ "Apache-2.0" ]
9
2016-10-17T04:57:47.000Z
2021-03-08T15:50:03.000Z
rc4.py
SkyblueMr/YY
39fca68d11956508fdbc094c9c319b7a7082722f
[ "Apache-2.0" ]
1
2017-10-13T09:27:34.000Z
2017-10-13T09:27:34.000Z
rc4.py
SkyblueMr/YY
39fca68d11956508fdbc094c9c319b7a7082722f
[ "Apache-2.0" ]
6
2017-06-07T01:27:42.000Z
2020-02-10T04:08:51.000Z
import binascii import hexdump class RC4: def __init__(self, key = ""): if key: self._rc4_init(key) def _rc4_init(self, key): (self.x,self.y) = (0,0) key_len = len(key) if key_len > 256 or key_len < 1: raise IndexError, 'Invalid key length' + key_len self...
40.136364
235
0.656285
6d7bc5844acf310633bdacd59548fe19e1e887dd
28,982
py
Python
qdviewer/QDViewer.py
FlorianTimm/quer2qgis
4ff6542fa9d26e4e37170b3437408f00547b7efd
[ "MIT" ]
null
null
null
qdviewer/QDViewer.py
FlorianTimm/quer2qgis
4ff6542fa9d26e4e37170b3437408f00547b7efd
[ "MIT" ]
null
null
null
qdviewer/QDViewer.py
FlorianTimm/quer2qgis
4ff6542fa9d26e4e37170b3437408f00547b7efd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ /*************************************************************************** QDViewer A QGIS plugin Querschnittsdaten anzeigen Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ ------------------- ...
46.520064
121
0.530364
096fcd42c6d9f08d5d089e2c6170449d67a02488
4,290
py
Python
deprecated/examples/simnet_bow/py_reader_generator.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
170
2020-08-12T12:07:01.000Z
2022-03-07T02:38:26.000Z
deprecated/examples/simnet_bow/py_reader_generator.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
195
2020-08-13T03:22:15.000Z
2022-03-30T07:40:25.000Z
deprecated/examples/simnet_bow/py_reader_generator.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
67
2020-08-14T02:07:46.000Z
2022-03-28T10:05:33.000Z
#!/usr/bin/python # Copyright (c) 2019 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...
39
109
0.545221
111d89dc3fa97f05216826d77249b04673a33d5f
381
py
Python
examples/seq2seq/att_all_need/__init__.py
yym6472/transformers
abd01205561e5caec167c1fbb20bccea24d7ba46
[ "Apache-2.0" ]
1
2021-12-30T05:41:37.000Z
2021-12-30T05:41:37.000Z
examples/seq2seq/att_all_need/__init__.py
yym6472/transformers
abd01205561e5caec167c1fbb20bccea24d7ba46
[ "Apache-2.0" ]
null
null
null
examples/seq2seq/att_all_need/__init__.py
yym6472/transformers
abd01205561e5caec167c1fbb20bccea24d7ba46
[ "Apache-2.0" ]
null
null
null
import att_all_need.Constants import att_all_need.Modules import att_all_need.Layers import att_all_need.SubLayers import att_all_need.Models import att_all_need.Translator import att_all_need.Optim __all__ = [ att_all_need.Constants, att_all_need.Modules, att_all_need.Layers, att_all_need.SubLayers, att_all_n...
29.307692
70
0.84252
6e79cb55306cf44f641a4fcd8e7ab51391678716
517
py
Python
Datastructures/linearSearch.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
Datastructures/linearSearch.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
Datastructures/linearSearch.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
#Linear Search class LinearSerach: def __init__(self): self.elements = [10,52,14,8,1,400,900,200,2,0] def SearchEm(self,elem): y = 0 if elem in self.elements: print("{x} is in the position of {y}".format(x = elem,y = self.elements.index(elem))) else: ...
21.541667
97
0.576402
2853cd0347b667a039186eec376666b20fb855dc
467
py
Python
Python/M01_ProgrammingBasics/L06_NestedLoops/Exercises/Solutions/P04_TrainTheTrainers.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L06_NestedLoops/Exercises/Solutions/P04_TrainTheTrainers.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L06_NestedLoops/Exercises/Solutions/P04_TrainTheTrainers.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
1
2022-02-23T13:03:14.000Z
2022-02-23T13:03:14.000Z
people = int(input()) name_doc = input() grade_sum = 0 average_grade = 0 total_grade = 0 numbers = 0 while name_doc != "Finish": for x in range(people): grade = float(input()) grade_sum += grade average_grade = grade_sum / people print(f"{name_doc} - {average_grade:.2f}.") name_doc ...
24.578947
68
0.640257
95be5f081349f73ff5bdd3615dda1dea6e95803e
218
py
Python
Algorithms/Implementation/designer_pdf_viewer.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/designer_pdf_viewer.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/designer_pdf_viewer.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import string h = list(map(int, input().strip().split(' '))) word = input().strip() L = list(string.ascii_lowercase) wi = [h[L.index(w)] for w in word] print(len(word) * max(wi))
15.571429
46
0.642202
c2864f7e6f1b9b8bc01c8cc1bc2f59a6a1c5eb5a
2,659
py
Python
resources/mechanics_lib/FixedLegsBuilder.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
7
2016-01-20T02:33:00.000Z
2021-02-04T04:06:57.000Z
resources/mechanics_lib/FixedLegsBuilder.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
null
null
null
resources/mechanics_lib/FixedLegsBuilder.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
3
2016-10-05T07:20:30.000Z
2017-11-20T10:36:50.000Z
from api.component import Component ################### # Component builder ################### c = Component() ### Subcomponents used in this assembly c.addSubcomponent("bar", "RectBeam") c.addSubcomponent("leg1", "PointedLeg") c.addSubcomponent("leg2", "PointedLeg") c.addSubcomponent("split", "SplitEdge") ### New...
35.453333
99
0.657766
b0b8286a112f6cc255d6f141cac0e14ff0ca06ff
37
py
Python
app/others/__init__.py
pushyzheng/docker-oj-web
119abae3763cd2e53c686a320af7f4f5af1f16ca
[ "MIT" ]
2
2019-06-24T08:34:39.000Z
2019-06-27T12:23:47.000Z
app/user/__init__.py
pushyzheng/docker-oj-web
119abae3763cd2e53c686a320af7f4f5af1f16ca
[ "MIT" ]
null
null
null
app/user/__init__.py
pushyzheng/docker-oj-web
119abae3763cd2e53c686a320af7f4f5af1f16ca
[ "MIT" ]
null
null
null
# encoding:utf-8 from . import views
12.333333
19
0.72973
b0362586ab24eacfd3e6ed4b0d747c1e52f21716
1,532
py
Python
src/entity/GridSampler.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
src/entity/GridSampler.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
src/entity/GridSampler.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
import numpy as np from numpy import ndarray from sklearn.neighbors import KNeighborsRegressor __all__ = ["GridSampler"] class GridSampler(object): def __init__(self, data: ndarray, longitude: ndarray, latitude: ndarray, k: int = 5): """ :param data: dbz :param longitude: ...
30.64
89
0.535901
05f54f0884c8616422ea49c91577829790703cff
3,717
py
Python
tools/generate-defines.py
lurch/Pinout2
bd3b39de2c053607b9415dd9eb0297a401ba7162
[ "CC-BY-4.0" ]
null
null
null
tools/generate-defines.py
lurch/Pinout2
bd3b39de2c053607b9415dd9eb0297a401ba7162
[ "CC-BY-4.0" ]
null
null
null
tools/generate-defines.py
lurch/Pinout2
bd3b39de2c053607b9415dd9eb0297a401ba7162
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python import json import markdown import unicodedata import re import os import time import sys lang = 'en' pins = None key_template = { 'python': '{board_name}_{name}', 'ruby': '{board_name}_{name}', 'spin': ' {board_name}_{name}', 'c': '#define {board_name}_{name}' } va...
25.458904
96
0.552596
afc4a3f0be4d9ea808205f06cf570014790fdc8d
203
py
Python
Algorithms/Sorting/CountingSort2.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Sorting/CountingSort2.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Sorting/CountingSort2.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
#coding:utf-8 from collections import Counter n = int(raw_input()) counter = Counter(raw_input().split()) ar = [] for i in xrange(100): ar += [str(i)] * counter.get(str(i), 0) print ' '.join(ar)
15.615385
43
0.630542
bb7101ada8ce544953bb0426ef09e562f84cae47
529
py
Python
pyntcloud/neighbors/r_neighbors.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
pyntcloud/neighbors/r_neighbors.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
pyntcloud/neighbors/r_neighbors.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
import numpy as np def r_neighbors(kdtree, r): """ Get indices of all neartest neighbors with a distance < r for each point Parameters ---------- kdtree: pyntcloud.structrues.KDTree The KDTree built on top of the points in point cloud r: float Maximum distance to consider a neigh...
24.045455
80
0.635161
3c873fcdcd88197cf9e2a49adb8d73709128b60d
2,571
py
Python
src/bo4e/bo/standorteigenschaften.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/bo/standorteigenschaften.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/bo/standorteigenschaften.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Standorteigenschaften class and corresponding marshmallow schema for de-/serialization """ from typing import List, Optional import attr from marshmallow import fields from bo4e.bo.geschaeftsobjekt import Geschaeftsobjekt, GeschaeftsobjektSchema from bo4e.com.standorteigenschaftenallgemein import Standor...
41.467742
196
0.801634
b1f8a1cb4b21c3994787c2e39a860fa22f68d47b
3,738
py
Python
pocketthrone/managers/filemanager.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
4
2016-06-05T16:48:04.000Z
2020-03-23T20:06:06.000Z
pocketthrone/managers/filemanager.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
pocketthrone/managers/filemanager.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
__all__ = ['FileManager'] import os from kivy.core.image import Image as CoreImage from kivy.cache import Cache # static class for accessing game paths and os methods class FileManager: _tag = "[FileManager] " _initialized = False IMAGE_FORMAT = ".png" # to be set diectly after creation root = {"game": None, "i...
26.323944
71
0.706528
3ca3476d9be341c7d55701d15be9a0ebb8d9184e
2,156
py
Python
tests/onegov/election_day/views/test_views_upload_parties.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/views/test_views_upload_parties.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/views/test_views_upload_parties.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date from tests.onegov.election_day.common import create_election_compound from tests.onegov.election_day.common import login from tests.onegov.election_day.common import upload_election_compound from tests.onegov.election_day.common import upload_party_results from tests.onegov.election_day.common...
32.666667
75
0.699443
a7362c94db122a53c8a49772b5f9f48ba739cbeb
700
py
Python
Problem Solving/Mathematics/Probability/Assignment Problem/assignment_problem.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Problem Solving/Mathematics/Probability/Assignment Problem/assignment_problem.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Problem Solving/Mathematics/Probability/Assignment Problem/assignment_problem.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from decimal import Decimal def partial(M, N, k): if k == 0: return 0 s = Decimal(1) q = Decimal(1) for i in range(min(M//k, N)): q *= Decimal(-(N-i)) / Decimal(i+1) for j in range(k): q *= Decimal((M-i*k-j)) / Decimal((N+M-i*k-1-j)) ...
18.421053
60
0.482857
59615b3836eb35dfa9694a2ef16ac67ab3458829
66,665
py
Python
UAE-main/Emarite.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
UAE-main/Emarite.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
UAE-main/Emarite.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
# ECRYPT BY Boy HamzaH # Subscribe Cok Chanel YouTube Gua Anjing # Dan Jangan Lupa Follow Github Gua exec((lambda _____, ______ : ______(eval((lambda ____,__,_ : ____.join([_(___) for ___ in __]))('',[95, 95, 105, 109, 112, 111, 114, 116, 95, 95, 40, 34, 122, 108, 105, 98, 34, 41, 46, 100, 101, 99, 111, 109, 112, 114, ...
13,333
66,563
0.734133
ab9ca67f277a91dbee47ada211bbf6c5c38e0130
4,379
bzl
Python
kythe/docs/asciidoc.bzl
wcalandro/kythe
64969a853711c228b4e3cfc3ce91b84b5bb853d7
[ "Apache-2.0" ]
1,168
2015-01-27T10:19:25.000Z
2018-10-30T15:07:11.000Z
kythe/docs/asciidoc.bzl
wcalandro/kythe
64969a853711c228b4e3cfc3ce91b84b5bb853d7
[ "Apache-2.0" ]
2,811
2015-01-29T16:19:04.000Z
2018-11-01T19:48:06.000Z
kythe/docs/asciidoc.bzl
wcalandro/kythe
64969a853711c228b4e3cfc3ce91b84b5bb853d7
[ "Apache-2.0" ]
165
2015-01-27T19:06:27.000Z
2018-10-30T17:31:10.000Z
load("@bazel_skylib//lib:shell.bzl", "shell") load("@bazel_skylib//lib:paths.bzl", "paths") AsciidocInfo = provider( doc = "Information about the asciidoc-generated files.", fields = { "primary_output_path": "Path of the primary output file beneath {resource_dir}.", "resource_dir": "File for th...
41.704762
119
0.611784
e624c79117e6ad5ea768a2205621a752851da45a
1,345
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/intro/decorator_utils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/intro/decorator_utils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/intro/decorator_utils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden import functools # handgestrickt def decorate_with_memo(func): lookup_map = dict() @functools.wraps(func) def helper(n): # MEMOIZATION: prüfe, ob vorberechnetes Ergebnis existiert if n in lookup_map: ...
20.074627
66
0.633457
fb07bb97aefdc6435635740fdd659d5ee7cf5533
646
py
Python
tests/onegov/pay/conftest.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/pay/conftest.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/pay/conftest.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import pytest import transaction from onegov.pay.models import Payment @pytest.fixture(scope='function', autouse=True) def reset_payment(): yield # during testing we need to reset the links created on the payment # model - in reality this is not an issue as we don't define the same # models over and...
23.071429
73
0.682663
fd1bb520973ae33e6e5d32eeaf2b640688ce4e41
449
py
Python
Curso-Em-Video-Python/2Exercicios/017_Catetos_e_Hipotenusa.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/017_Catetos_e_Hipotenusa.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/017_Catetos_e_Hipotenusa.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
from math import hypot co = float(input('Quanto medo o cateto oposto: ')) ca = float(input('Quanto medo o cateto adjacente: ')) hipotenusa = hypot(co, ca) '''hipotenusa = (ca**2 + co**2) ** (1/2) formula matematica print('O a soma dos quadrado dos catetos de um triângulo retângulo é igual ao quadrado de sua hipotenusa:...
44.9
136
0.703786
239f39d43572c6dd8b67d39196a62f04b93137ae
527
py
Python
IVTa/2014/ALEKSEEV_I_S/task_3_50.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/ALEKSEEV_I_S/task_3_50.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/ALEKSEEV_I_S/task_3_50.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 3. Вариант 50. # Напишите программу, которая выводит имя "Саид-Мурадзола Садриддин", и запрашивает его псевдоним. #Программа должна сцеплять две эти строки и выводить полученную строку, #разделяя имя и псевдоним с помощью тире. # Alekseev I.S. # 15.05.2016 name = "Саид-Мурадзола Садриддин" print("Герой наше...
32.9375
99
0.732448
23baafab3de4686aa7f0b8672a42c0db1845e871
256
py
Python
Problems/Stack/Easy/RemoveAllAdjacentDuplicatesInString/test_remove_duplicates.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Stack/Easy/RemoveAllAdjacentDuplicatesInString/test_remove_duplicates.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Stack/Easy/RemoveAllAdjacentDuplicatesInString/test_remove_duplicates.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from unittest import TestCase from remove_duplicates import removeDuplicates class Test(TestCase): def test_remove_duplicates(self): self.assertEqual(removeDuplicates("abbaca"), "ca") self.assertEqual(removeDuplicates("azxxzy"), "ay")
32
58
0.753906
7bca982bd072e67d2d8cbc89ef9e46683acc55dc
7,527
py
Python
backend/cctalk/tools.py
bytebang/ppvm
07a0650c618b9dd6abc7563070a80c132034f532
[ "MIT" ]
null
null
null
backend/cctalk/tools.py
bytebang/ppvm
07a0650c618b9dd6abc7563070a80c132034f532
[ "MIT" ]
null
null
null
backend/cctalk/tools.py
bytebang/ppvm
07a0650c618b9dd6abc7563070a80c132034f532
[ "MIT" ]
null
null
null
""" Provides tools for general use. Module content -------------- """ # The python-cctalk package allows one to send ccTalk messages and decode replies from a coin validator. license_text = "(C) 2011 David Schryer GNU GPLv3 or later." __copyright__ = license_text __autodoc__ = ['make_serial_object', 'drop_to_ipython...
32.868996
115
0.634649
a99ad5868185e1054df2d7b8b74429cdab82171a
1,533
py
Python
frds/mktstructure/measures/price_impact.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
1
2022-03-06T20:36:06.000Z
2022-03-06T20:36:06.000Z
mktstructure/measures/price_impact.py
mgao6767/mktstructure
5432c1bed163f838209d34b74c09629bea620ba8
[ "MIT" ]
null
null
null
mktstructure/measures/price_impact.py
mgao6767/mktstructure
5432c1bed163f838209d34b74c09629bea620ba8
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from .exceptions import * name = "PriceImpact" description = """ The price impact is 2 * q * (midpoint_5min - midpoint) / midpoint where q is the trade direction (1 for buys and -1 for sells), midpoint is bid-ask midpoint, and midpoint_5min is the bid-ask midpoint 5min later. ...
38.325
84
0.679713
a5ebb807ff741ef8001b2a69f8057b5972fd93d4
1,878
py
Python
tarefas-poo/lista-03/balde/view/interface_com_usuario.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-03/balde/view/interface_com_usuario.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-03/balde/view/interface_com_usuario.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
# -------------------------- # UFSC - CTC - INE - INE5663 # Exercício do Balde # -------------------------- # Classe que representa a interface com o usuário # from view.menu import Menu from view.paineis.painel_cria_baldes import PainelCriaBaldes from view.paineis.painel_destroi_baldes import PainelDestroiBaldes from...
32.947368
74
0.546858
93a51902285ff3561d20e3b1bfd2d2a16c459863
3,337
py
Python
2018/finals/web-mitigator/app/main.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
2018/finals/web-mitigator/app/main.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
2018/finals/web-mitigator/app/main.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
#!/usr/bin/python # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
42.782051
422
0.706023
9e13297bcad332cae21c3a3453309ecd98fd058b
956
py
Python
data/data_loader.py
florianfricke/Bachelor_Thesis_Sentiment_Analyse
aa1fa95cfbc13115ee60baaf79eab0d1940998ab
[ "MIT" ]
1
2020-06-04T13:20:45.000Z
2020-06-04T13:20:45.000Z
data/data_loader.py
florianfricke/Bachelor_Thesis_Sentiment_Analyse
aa1fa95cfbc13115ee60baaf79eab0d1940998ab
[ "MIT" ]
6
2020-06-03T18:45:11.000Z
2022-02-10T01:51:03.000Z
data/data_loader.py
florianfricke/Bachelor_Thesis_Sentiment_Analyse
aa1fa95cfbc13115ee60baaf79eab0d1940998ab
[ "MIT" ]
null
null
null
""" Created by Florian Fricke. """ import os from utilities.utilities import clean_text from os.path import join class DataLoader: def __init__(self): self._dirname = os.path.dirname(__file__) def get_data(self, filename, seperator="\t", sentiment_column_number=0, text_column_number=1): data ...
30.83871
98
0.58159
1923d29de7080a5e45efd66b8d2643600e031f38
664
py
Python
source/test/test_templatehandler.py
marctrommen/bloggenerator
5b4fed4cd12a899829261d492328dfc39a78153d
[ "MIT" ]
null
null
null
source/test/test_templatehandler.py
marctrommen/bloggenerator
5b4fed4cd12a899829261d492328dfc39a78153d
[ "MIT" ]
null
null
null
source/test/test_templatehandler.py
marctrommen/bloggenerator
5b4fed4cd12a899829261d492328dfc39a78153d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest import templatehandler class TemplateHandlerTest(unittest.TestCase): def __init__(self, *args, **kwargs): super(TemplateHandlerTest, self).__init__(*args, **kwargs) def test_getPage(self): th = templatehandler.TemplateHandler() self.assertEqual...
27.666667
75
0.746988
2709581564c8e67ff6eb7794622e5fc13124691b
4,482
py
Python
convertx/cli.py
VolkerBergen/convertx
3d11f94e5ff20b17381c626848fe26e82a5c9cb7
[ "BSD-2-Clause" ]
null
null
null
convertx/cli.py
VolkerBergen/convertx
3d11f94e5ff20b17381c626848fe26e82a5c9cb7
[ "BSD-2-Clause" ]
5
2022-01-06T20:34:22.000Z
2022-01-17T14:58:05.000Z
convertx/cli.py
VolkerBergen/convertx
3d11f94e5ff20b17381c626848fe26e82a5c9cb7
[ "BSD-2-Clause" ]
1
2022-01-05T13:17:57.000Z
2022-01-05T13:17:57.000Z
import argparse import io import os import sys from datetime import date, datetime from mammoth import convert, writers from html2text import html2text from .styles import style_mappings, style_mappings_md, check_comments def main(): argv = [arg for arg in sys.argv if not arg.startswith('--')] argv_dir = ' ...
33.699248
109
0.572735
e30c668146f5292adf9d8941078d876c3b4b49d3
5,250
py
Python
ArduinoToPiDataTransfer/PiDataReceiverGeneric.py
Robsen01/Brain_Interface
2525dc5e90bc5ac6b67f8f596fdf26a9ae6b391e
[ "Apache-2.0" ]
null
null
null
ArduinoToPiDataTransfer/PiDataReceiverGeneric.py
Robsen01/Brain_Interface
2525dc5e90bc5ac6b67f8f596fdf26a9ae6b391e
[ "Apache-2.0" ]
null
null
null
ArduinoToPiDataTransfer/PiDataReceiverGeneric.py
Robsen01/Brain_Interface
2525dc5e90bc5ac6b67f8f596fdf26a9ae6b391e
[ "Apache-2.0" ]
null
null
null
from time import sleep, time_ns import serial import serial.tools.list_ports import math ''' PiDataReceiverGeneric has everything you need to communicate with the Arduino. ''' class PiDataReceiverGeneric: ''' port must be a string like 'COM3'. Retrieve possible ports with PiDataReceiver.list_possible_ports. ...
34.313725
195
0.62419
8bc4e1cbae7913cb418e025dd446d4bbf461bd0f
46,469
py
Python
MachineTranslation/src_bak/attention/v1/machine_translation_with_attention_xrh.py
Xinrihui/DeepLearningApp
8d86b88251ee8d37358c642b1ec4a341767bfd17
[ "Apache-2.0" ]
2
2021-08-25T01:13:29.000Z
2021-10-10T14:49:59.000Z
MachineTranslation/src_bak/attention/v1/machine_translation_with_attention_xrh.py
Xinrihui/DeepLearningApp
8d86b88251ee8d37358c642b1ec4a341767bfd17
[ "Apache-2.0" ]
null
null
null
MachineTranslation/src_bak/attention/v1/machine_translation_with_attention_xrh.py
Xinrihui/DeepLearningApp
8d86b88251ee8d37358c642b1ec4a341767bfd17
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- # 适用于 tensorflow >= 2.0, keras 被直接集成到 tensorflow 的内部 # ref: https://keras.io/about/ from tensorflow.keras.layers import Bidirectional, Concatenate, Dot, Input, LSTM from tensorflow.keras.layers import RepeatVector, Dense, Lambda, Softmax, Reshape from tensorflow.keras.opti...
34.600894
128
0.586628
8bd06748bac62ea851dbcc3b99fe1b5f1ca60408
4,998
py
Python
ChunkServer.py
lihuiba/SoftSAN
1b8ab2cae92b7aac34211909b27d4ebe595275d7
[ "Apache-2.0" ]
1
2015-08-02T09:53:18.000Z
2015-08-02T09:53:18.000Z
ChunkServer.py
lihuiba/SoftSAN
1b8ab2cae92b7aac34211909b27d4ebe595275d7
[ "Apache-2.0" ]
null
null
null
ChunkServer.py
lihuiba/SoftSAN
1b8ab2cae92b7aac34211909b27d4ebe595275d7
[ "Apache-2.0" ]
2
2018-03-21T04:59:50.000Z
2019-12-03T15:54:17.000Z
import rpc, logging import messages_pb2 as msg import guid as Guid import mds, config, util import gevent.server import Backend from pytgt.tgt_ctrl import * import random class ChunkServer: def __init__(self, prefix_vol='lv_softsan_', vgname='VolGroup'): self.lvm = Backend.LVM_SOFTSAN() self.tgt = Tgt() self.p...
31.2375
130
0.726491
7bfa1761e0f14130896d9a6799049a6aae704952
394
py
Python
2015/11/look-begin-rate-table/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2015/11/look-begin-rate-table/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2015/11/look-begin-rate-table/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python import base_filters COPY_GOOGLE_DOC_KEY = '1qBD8PVaqBNYx3iyXuQmNJgGFtF7E8cysyGeiBlMMEEw' USE_ASSETS = False # Use these variables to override the default cache timeouts for this graphic # DEFAULT_MAX_AGE = 20 # ASSETS_MAX_AGE = 300 def percent(value): return unicode(round(float(value), 3...
21.888889
77
0.771574
efb9e57ba66eb8f54906265e8958d1d884c48c2e
7,084
py
Python
Packs/Cymulate/Integrations/Cymulate/Cymulate_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Cymulate/Integrations/Cymulate/Cymulate_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Cymulate/Integrations/Cymulate/Cymulate_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from Cymulate import cymulate_test, fetch_incidents, cymulate_get_incident_info, Client, CymulateModuleTypeEnum BASE_URL = 'https://api.cymulate.com/v1/' MOKE_TEST = {"success": True, "data": ["Phishing Awareness", "Web Application Firewall", "Late...
48.190476
120
0.449605
ef58a8dd9159150f5c62dc1540bb5470aed1bc7c
1,370
py
Python
kts/core/backend/io.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
18
2019-02-14T13:10:07.000Z
2021-11-26T07:10:13.000Z
kts/core/backend/io.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-02-17T14:06:42.000Z
2019-09-15T18:05:54.000Z
kts/core/backend/io.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-09-15T13:12:42.000Z
2020-04-15T14:05:54.000Z
import time import kts.core.backend.signal as rs class TextChunk(rs.Signal): def __init__(self, timestamp, text, run_id=None): self.timestamp = timestamp self.text = text self.run_id = run_id def get_contents(self): res = {'timestamp': self.timestamp, 'text': self.text} ...
21.746032
86
0.535766
08e845d836398aafaf9d487f94d2d21eb1a18a13
802
py
Python
binary-tree-right-side-view/binary-tree-right-side-view.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
binary-tree-right-side-view/binary-tree-right-side-view.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
binary-tree-right-side-view/binary-tree-right-side-view.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def rightSideView(self, root: Optional[TreeNode]) -> List[int]: if not root: return [] ...
30.846154
67
0.523691
decba192a977ffe5ba11a40e9c31065a4fe14352
11,249
py
Python
src/austria/migrations/0001_initial.py
frocentus/offenewahlen_api
71860583890f8a4c23df67f271e8f13558fa9582
[ "MIT" ]
14
2017-07-12T14:42:57.000Z
2017-09-08T20:32:53.000Z
src/austria/migrations/0001_initial.py
frocentus/offenewahlen_api
71860583890f8a4c23df67f271e8f13558fa9582
[ "MIT" ]
209
2017-07-11T21:36:01.000Z
2017-11-05T01:10:50.000Z
src/austria/migrations/0001_initial.py
OKFNat/offenewahlen-api
71860583890f8a4c23df67f271e8f13558fa9582
[ "MIT" ]
8
2017-07-15T09:40:42.000Z
2018-01-12T03:02:06.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-04-05 23:20 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
43.265385
135
0.552938
3e771eb33afa0ab45444ee8bac5a61bd72d00ef3
11,803
py
Python
Packs/Microsoft365Defender/Integrations/Microsoft365DefenderEventCollector/Microsoft365DefenderEventCollector.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
1
2021-11-02T05:36:38.000Z
2021-11-02T05:36:38.000Z
Packs/Microsoft365Defender/Integrations/Microsoft365DefenderEventCollector/Microsoft365DefenderEventCollector.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
61
2021-10-07T08:54:38.000Z
2022-03-31T10:25:35.000Z
Packs/Microsoft365Defender/Integrations/Microsoft365DefenderEventCollector/Microsoft365DefenderEventCollector.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
# pylint: disable=no-name-in-module # pylint: disable=no-self-argument import demistomock as demisto from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import from CommonServerUserPython import * # noqa from abc import ABC from typing import Any, Callable, Optional from enum import Enum fro...
32.425824
123
0.649581
e4295da2f7812b00aee90ea339be9189b4602eb0
352
py
Python
LFA/class_assembly_line.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
10
2020-12-08T20:18:15.000Z
2021-06-07T20:00:07.000Z
LFA/class_assembly_line.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
2
2021-06-28T03:42:13.000Z
2021-06-28T16:53:13.000Z
LFA/class_assembly_line.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
2
2021-01-14T19:59:20.000Z
2021-06-15T11:53:21.000Z
from utils import * from class_moore import Moore class Assembly_Line: def __init__(self, assembly_type): self.automaton = Moore(*read_7_tuple_from_data(assembly_type)) self.type = self.automaton.name def __len__(self): return self.automaton.capacity def __str__(self): re...
23.466667
70
0.704545
39adf3d80d50ee6f6c6e6afd03e42f583ec4eb69
879
py
Python
exercises/fr/test_04_12_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/test_04_12_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/test_04_12_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert len(doc1.ents) == 2, "Attendu deux entités dans le premier exemple" assert ( doc1.ents[0].label_ == "SITE_WEB" and doc1.ents[0].text == "Reddit" ), "Vérifie l'entité une dans le premier exemple" assert ( doc1.ents[1].label_ == "SITE_WEB" and doc1.ents[1].text == "P...
46.263158
83
0.631399
0806256e761da98bcded927cddb03e948b352211
9,338
py
Python
tests/services/test_event.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
tests/services/test_event.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
tests/services/test_event.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
import pytest def test_update_event_dates_with_recurrence_rule(client, seeder, utils, app): user_id, admin_unit_id = seeder.setup_base() event_id = seeder.create_event(admin_unit_id) with app.app_context(): from project.dateutils import create_berlin_date from project.models import Event ...
34.330882
148
0.668344
083497431e4ea34ae2484440e44fa0809d4e3205
2,559
py
Python
Common_Algorithms/HMM/Wordseg_02.py
xrick/WolfNLP
ff59be5a180813e7127c7eaf52db2478c20e8431
[ "MIT" ]
null
null
null
Common_Algorithms/HMM/Wordseg_02.py
xrick/WolfNLP
ff59be5a180813e7127c7eaf52db2478c20e8431
[ "MIT" ]
null
null
null
Common_Algorithms/HMM/Wordseg_02.py
xrick/WolfNLP
ff59be5a180813e7127c7eaf52db2478c20e8431
[ "MIT" ]
null
null
null
#-*-coding:utf-8 # By tostq <tostq216@163.com> # 博客: blog.csdn.net/tostq import numpy as np import hmm from hmmlearn.hmm import MultinomialHMM state_M = 4 word_N = 0 state_list = {'B':0,'M':1,'E':2,'S':3} # 获得某词的分词结果 # 如:(我:S)、(你好:BE)、(恭喜发财:BMME) def getList(input_str): outpout_str = [] if len(input_str) == 1...
25.088235
68
0.623681
f25bbeef8b86b5586bcf49e392dc55c4a785e375
913
py
Python
Algorithms/Implementation/forming_a_magic_square.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/forming_a_magic_square.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/forming_a_magic_square.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 all_cases = [[[8, 1, 6], [3, 5, 7], [4, 9, 2]], [[6, 1, 8], [7, 5, 3], [2, 9, 4]], [[4, 9, 2], [3, 5, 7], [8, 1, 6]], [[2, 9, 4], [7, 5, 3], [6, 1, 8]], [[8, 3, 4], [1, 5, 9], [6, 7, 2]], [[4, 3, 8], [9, 5, 1], [2, 7, 6]], ...
29.451613
108
0.41402
d9d103effb7ebd2fcd272e2fd1c6ce75e5453a53
8,644
py
Python
methods/transformers/src/transformers/configuration_electra.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
3
2021-07-06T20:02:31.000Z
2022-03-27T13:13:01.000Z
methods/transformers/src/transformers/configuration_electra.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
methods/transformers/src/transformers/configuration_electra.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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...
54.708861
144
0.686719
76e4aff3ee9efc9424a901af81997883bce88779
238
py
Python
FUNCTIONS CLASS 12.py
sanxy/hacktoberfest-1
913582b310688d496602e8b1bc9166cb64866e38
[ "MIT" ]
null
null
null
FUNCTIONS CLASS 12.py
sanxy/hacktoberfest-1
913582b310688d496602e8b1bc9166cb64866e38
[ "MIT" ]
null
null
null
FUNCTIONS CLASS 12.py
sanxy/hacktoberfest-1
913582b310688d496602e8b1bc9166cb64866e38
[ "MIT" ]
1
2020-09-30T18:53:05.000Z
2020-09-30T18:53:05.000Z
import mysql.connector mydb = mysql.connector.connect(host="localhost",user='root',passwd='thebeast',database='employees21') mycursor = mydb.cursor() mycursor.execute('select ename from emp1') for i in mycursor: print (i)
23.8
102
0.718487
0a464ba136340553b3e81399e9eab7ebc0939ffa
11,260
py
Python
rasa/nlu/featurizers/sparse_featurizer/lexical_syntactic_featurizer.py
chaneyjd/rasa
104a9591fc10b96eaa7fe402b6d64ca652b7ebe2
[ "Apache-2.0" ]
37
2019-06-07T07:39:00.000Z
2022-01-27T08:32:57.000Z
rasa/nlu/featurizers/sparse_featurizer/lexical_syntactic_featurizer.py
chaneyjd/rasa
104a9591fc10b96eaa7fe402b6d64ca652b7ebe2
[ "Apache-2.0" ]
209
2020-03-18T18:28:12.000Z
2022-03-01T13:42:29.000Z
rasa/nlu/featurizers/sparse_featurizer/lexical_syntactic_featurizer.py
chaneyjd/rasa
104a9591fc10b96eaa7fe402b6d64ca652b7ebe2
[ "Apache-2.0" ]
65
2019-05-21T12:16:53.000Z
2022-02-23T10:54:15.000Z
import logging from collections import defaultdict, OrderedDict from pathlib import Path import numpy as np from typing import Any, Dict, Optional, Text, List, Type, Union from rasa.nlu.tokenizers.spacy_tokenizer import POS_TAG_KEY from rasa.shared.constants import DOCS_URL_COMPONENTS from rasa.nlu.components import ...
37.161716
92
0.642007
6aadbc149a4009a745fe1c5424569f28af289cd3
295
py
Python
exercises/fr/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/fr/exc_01_08_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/fr/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("fr_core_news_sm") text = "Apple a été créée en 1976 par Steve Wozniak, Steve Jobs et Ron Wayne." # Traite le texte doc = ____ # Itère sur les entités prédites for ent in ____.____: # Affiche le texte de l'entité et son label print(ent.____, ____.____)
21.071429
78
0.715254
0a801caf4b2b74512bea3fecc7a23036652df9bc
303
py
Python
web/interceptors/ErrorInterceptor.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
2
2019-06-10T08:57:47.000Z
2021-06-12T16:22:15.000Z
web/interceptors/ErrorInterceptor.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
web/interceptors/ErrorInterceptor.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from application import app from common.libs.Helper import ops_render from common.libs.LogService import LogService @app.errorhandler(404) def error_404(e): LogService.add_error_log(str(e)) return ops_render('error/error.html', {'status': 404, 'msg': '很抱歉!您访问的页面不存在'})
27.545455
82
0.732673
86e434ce86d2a788348dd975202cf547479816c8
47,418
py
Python
nz_crawl_demo/day3/demo1.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_crawl_demo/day3/demo1.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_crawl_demo/day3/demo1.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from lxml import etree text = """ <ul class="item_con_list" style="display: block;"> <li class="con_list_item first_row default_list" data-index="0" data-positionid="3580958" data-salary="18k-25k" data-company="众禄金融" data-positionname="python工程师" data-companyid="50285" data-hrid="1509336" data-tpladword="0"> ...
26.759594
249
0.485006
86f862c37f1fc4105b32506c2611e1984f6d6818
162
py
Python
sentinel/vpn/__init__.py
allagog0x01/sentwg
52285ecf2b03c30a78901a29a7af96c8ab5764c8
[ "Apache-2.0" ]
null
null
null
sentinel/vpn/__init__.py
allagog0x01/sentwg
52285ecf2b03c30a78901a29a7af96c8ab5764c8
[ "Apache-2.0" ]
null
null
null
sentinel/vpn/__init__.py
allagog0x01/sentwg
52285ecf2b03c30a78901a29a7af96c8ab5764c8
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from .helpers import disconnect_client from .helpers import get_sessions from .helpers import update_session_data from .wireguard import wireguard
27
40
0.845679
86fb659f884277de17b93c2afa6b5604f63fec64
30,692
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/zabbix_template.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/zabbix_template.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/zabbix_template.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, sookido # 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': '1.1', 'status'...
38.557789
144
0.615893
9c18f8315105f2144d7afb8563f73d992aff655e
2,648
py
Python
tools/pythonpkg/tests/fast/arrow/test_timestamps.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
2,816
2018-06-26T18:52:52.000Z
2021-04-06T10:39:15.000Z
tools/pythonpkg/tests/fast/arrow/test_timestamps.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
1,310
2021-04-06T16:04:52.000Z
2022-03-31T13:52:53.000Z
tools/pythonpkg/tests/fast/arrow/test_timestamps.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
270
2021-04-09T06:18:28.000Z
2022-03-31T11:55:37.000Z
import duckdb import os import datetime import pytest try: import pyarrow as pa import pandas as pd can_run = True except: can_run = False class TestArrowTimestamps(object): def test_timestamp_types(self, duckdb_cursor): if not can_run: return data = (pa.array([datetime....
43.409836
249
0.604985
9c343a573df4394fcd53c5e1037b636600240360
13,378
py
Python
CodeAnalyzing/resnet.py
gian1312/suchen
df863140fd8df1ac2e195cbdfa4756f09f962270
[ "Apache-2.0" ]
null
null
null
CodeAnalyzing/resnet.py
gian1312/suchen
df863140fd8df1ac2e195cbdfa4756f09f962270
[ "Apache-2.0" ]
null
null
null
CodeAnalyzing/resnet.py
gian1312/suchen
df863140fd8df1ac2e195cbdfa4756f09f962270
[ "Apache-2.0" ]
1
2019-11-29T12:28:33.000Z
2019-11-29T12:28:33.000Z
#!/usr/bin/env python #taken from https://github.com/raghakot/keras-resnet/blob/master/resnet.py from __future__ import division import six from keras.models import Model from keras.layers import ( Input, Activation, Dense, Flatten ) from keras.layers.core import Lambda from keras.layers...
20.362253
109
0.627897
92e714dacc8acd7270c7578f9487d0faf292923f
2,324
py
Python
dataset/utils/data_deal.py
baowj-678/TC
4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6
[ "MIT" ]
null
null
null
dataset/utils/data_deal.py
baowj-678/TC
4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6
[ "MIT" ]
null
null
null
dataset/utils/data_deal.py
baowj-678/TC
4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6
[ "MIT" ]
null
null
null
""" @Description: 加载数据,保存数据 @Author: Bao Wenjie @Email: bwj_678@qq.com @Date: 2020/10/27 """ import csv import os import json class DataDeal: def __init__(self): pass @classmethod def load_data(cls, path, delimiter='\t', encoding="utf-8-sig", quotechar=None): """ 从文件读取数据\n @pa...
27.666667
83
0.527108
1363bbef712d0e4f7a4dec0992a594a5b0be200d
252
py
Python
Utils/py/naoth/setup.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/naoth/setup.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/naoth/setup.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/python from setuptools import setup setup(name='naoth', version='0.2', description='Python Utils for the NaoTH toolchain', packages=["naoth"], install_requires=[ 'protobuf', ], zip_safe=False)
19.384615
57
0.603175
bc57b27a0d51013b4cd0c8401a627b982c16ee53
1,173
py
Python
src/test/tests/simulation/domainbounds.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/simulation/domainbounds.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/test/tests/simulation/domainbounds.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: domainbounds.py # # Tests: libsim - connecting to simulation and retrieving data from it. # mesh - 3D rectilinear mesh # # Programmer: Kathleen Biagas # Date: June 17, 2014 #...
24.957447
78
0.57289
4c5d24570ac7916f7fdc26625fc48412aa89e4a5
18,542
py
Python
MAIN/STM32F405_C/NORMAL/V38/DataBase.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
MAIN/STM32F405_C/NORMAL/V38/DataBase.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
MAIN/STM32F405_C/NORMAL/V38/DataBase.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
import gc from micropython import const from PXSensor import PxHub, key, T import os import peripheral import binascii import ujson as js from machine import RTC DEBUG = False OPEN_SCENE_SHOW_TIME = const(5000) CLOSING_TIME = const(10000) CLOSE_SCENE_SHOW_TIME = const(1000) class TextColour: HEA...
55.849398
559
0.494876
4c760f5d710417b40e6a1fb33ff995e7604f586d
6,161
py
Python
lego/test.py
tipptop3d/Horst-oder-Klaus
2afda1a64b5ccace74ebc7b806a5e5501c0f12bb
[ "MIT" ]
null
null
null
lego/test.py
tipptop3d/Horst-oder-Klaus
2afda1a64b5ccace74ebc7b806a5e5501c0f12bb
[ "MIT" ]
null
null
null
lego/test.py
tipptop3d/Horst-oder-Klaus
2afda1a64b5ccace74ebc7b806a5e5501c0f12bb
[ "MIT" ]
null
null
null
""" Test File """ import asyncio import math import matplotlib.pyplot as plt import time from calculus.expression import Expression # Dummies class Port: A = 'A' B = 'B' C = 'C' class Motor: def __init__(self, port, gears=None) -> None: self.port = port self.gears = gears def ...
25.25
92
0.603311
d5da25defc8cb7cc51e2168e8bc41398ce9bc71c
1,986
py
Python
test/test_npu/test_threshold.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_threshold.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_threshold.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law...
38.192308
79
0.697382
e6da965a7373cc43a2028ac7ca1bab7e1dfec1fd
1,348
py
Python
ppyt/indicators/breakout_indicators.py
yusukemurayama/ppytrading
9804d0de870d77bf8a1c847736a636b1342d4600
[ "MIT" ]
4
2016-08-16T07:47:15.000Z
2017-12-11T10:08:47.000Z
ppyt/indicators/breakout_indicators.py
yusukemurayama/ppytrading
9804d0de870d77bf8a1c847736a636b1342d4600
[ "MIT" ]
null
null
null
ppyt/indicators/breakout_indicators.py
yusukemurayama/ppytrading
9804d0de870d77bf8a1c847736a636b1342d4600
[ "MIT" ]
2
2018-06-15T04:43:15.000Z
2020-05-02T07:47:15.000Z
# coding: utf-8 import logging import numpy as np from ppyt.indicators import IndicatorBase from ppyt.indicators.closerecenthighlow_indicators import ( CloseGtRecentHighIndicator, CloseLtRecentLowIndicator ) logger = logging.getLogger(__name__) class UpperBreakoutIndicator(IndicatorBase): """上にブレイクアウトしたかを示す指...
25.923077
70
0.669881
e6ea66ab1cd7de4fcef1f4dd4f93d7356e431820
6,103
py
Python
python_experiments/paper_figures/vldbj/draw_varying_c.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
8
2020-04-14T23:17:00.000Z
2021-06-21T12:34:04.000Z
python_experiments/paper_figures/vldbj/draw_varying_c.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
null
null
null
python_experiments/paper_figures/vldbj/draw_varying_c.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
1
2021-01-17T16:26:50.000Z
2021-01-17T16:26:50.000Z
import matplotlib.pyplot as plt from data_analysis.vldbj_data_parsing.varying_c_statistics import * from paper_figures.vldbj.draw_indexing_time_size import TICK_SIZE, LEGEND_SIZE, LABEL_SIZE, reads_d_tag, reads_rq_tag import json import itertools us_to_ms_factor = 10 ** 3 large_size_plus = 4 def get_dict(file_path):...
40.151316
117
0.600524
5dc79859d9e9acdadbcf74f50a802492149ea1d8
3,593
py
Python
fcos_core/layers/sigmoid_focal_loss_bce.py
HaoGood/MMMC
24dd4ce830efc7a8dc580735903c2a776b6a1a7b
[ "Apache-2.0" ]
3
2022-01-12T11:22:38.000Z
2022-01-27T02:28:30.000Z
fcos_core/layers/sigmoid_focal_loss_bce.py
HaoGood/MMMC
24dd4ce830efc7a8dc580735903c2a776b6a1a7b
[ "Apache-2.0" ]
null
null
null
fcos_core/layers/sigmoid_focal_loss_bce.py
HaoGood/MMMC
24dd4ce830efc7a8dc580735903c2a776b6a1a7b
[ "Apache-2.0" ]
1
2022-01-23T02:45:03.000Z
2022-01-23T02:45:03.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from torch.nn import functional as F def sigmoid_focal_loss_bce( inputs: torch.Tensor, targets: torch.Tensor, alpha: float = 0.25, gamma: float = 2.0, funcs: str = 'train', reduction: str = "sum", ) -> torch....
34.883495
83
0.601169
539e2f99665eec34798cacbc4a08edf40cebdaf5
4,245
py
Python
frappe-bench/env/lib/python2.7/site-packages/stdnum/gb/vat.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/stdnum/gb/vat.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/stdnum/gb/vat.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# vat.py - functions for handling United Kingdom VAT numbers # # Copyright (C) 2012-2015 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the Licen...
34.795082
84
0.636749
54eeee1ef2f2e2bf0363795cd01253c4393c049c
21,687
py
Python
tests/onegov/gazette/test_views_notice.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/gazette/test_views_notice.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/gazette/test_views_notice.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from freezegun import freeze_time from io import BytesIO from onegov.gazette.models import GazetteNotice from onegov.pdf.utils import extract_pdf_info from tests.onegov.gazette.common import accept_notice from tests.onegov.gazette.common import edit_notice from tests.onegov.gazette.common import edit_notice_unrestricte...
39.647166
78
0.552451
07223f6646d28bbe8361254170c56512be80ca0b
401
py
Python
PMIa/2014/KUCHERYAVENKO_A_I/task_1_38.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2014/KUCHERYAVENKO_A_I/task_1_38.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2014/KUCHERYAVENKO_A_I/task_1_38.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 1. Вариант 38. # Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Аврора Жюпен. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода. # Kucheryavenko A. I. # 17.03.2016 print("Жорж Санд более известна, как французская писа...
40.1
205
0.795511
db8ed35f7e5c7d36b8d26c3414a13e509c3b709d
13,031
py
Python
official/nlp/bert/src/dataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
1
2021-11-18T08:17:44.000Z
2021-11-18T08:17:44.000Z
official/nlp/bert/src/dataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
official/nlp/bert/src/dataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
2
2019-09-01T06:17:04.000Z
2019-10-04T08:39:45.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
53.187755
118
0.646919
37e912ce87ee8c5913f42ac0adcd81c81f7ac03a
204
py
Python
0-notes/job-search/Cracking the Coding Interview/C10SortingSearching/questions/10.9-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C10SortingSearching/questions/10.9-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C10SortingSearching/questions/10.9-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Sorted Matrix Search # Given a M x N matrix in which each row and each column is sorted in # ascending order, write a method to find an element. # time complexity: O() # space complexity: O()
22.666667
70
0.696078
53386f341aeb3359e2968df0094cb4508536cf56
11,559
py
Python
DatenbankMain.py
klnrdknt/Sephrasto
591224fe01825a169c21ebc6136533f282ce9a0b
[ "MIT" ]
15
2017-11-09T12:49:52.000Z
2022-03-06T12:18:48.000Z
DatenbankMain.py
klnrdknt/Sephrasto
591224fe01825a169c21ebc6136533f282ce9a0b
[ "MIT" ]
40
2018-02-01T21:32:01.000Z
2022-03-22T11:35:28.000Z
DatenbankMain.py
klnrdknt/Sephrasto
591224fe01825a169c21ebc6136533f282ce9a0b
[ "MIT" ]
13
2018-03-12T17:50:42.000Z
2022-03-06T12:21:41.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'DatenbankMain.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore...
57.222772
115
0.739597
fe76e00351d56b33b2ebb4f06640167dd513b4b7
2,727
py
Python
RDS/circle1_adapters_and_ports/port_openscienceframework/tests/constant.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle1_adapters_and_ports/port_openscienceframework/tests/constant.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle1_adapters_and_ports/port_openscienceframework/tests/constant.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
req = { "userId": "admin", "metadata": { "@context": [ "https://w3id.org/ro/crate/1.0/context", { "@vocab": "https://schema.org/", "osfcategory": "https://www.research-data-services.org/jsonld/osfcategory", "zenodocategory": "https:...
36.36
97
0.409974
feb872640410fc1f83718fda29c0235d78d75632
349
py
Python
Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/17.01-Custom-Iterator.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/17.01-Custom-Iterator.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/17.01-Custom-Iterator.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
class TopTen: def __init__(self): self.num = 1 def __iter__(self): return self def __next__(self): if self.num <= 10: val = self.num self.num += 1 return val else: raise StopIteration values = TopTen() print(next(values)) f...
15.863636
31
0.512894
22a659a330aa51abf44dc2d92f08f0f29ee6700f
513
py
Python
src/onegov/fsi/views/search.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/views/search.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/views/search.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.security import Personal from onegov.fsi import FsiApp from onegov.org.models import Search from onegov.org.views.search import search as search_view from onegov.org.views.search import suggestions as suggestions_view @FsiApp.html(model=Search, template='search.pt', permission=Personal) def search(se...
32.0625
69
0.80117
22df2e0e0527bd6381b3b4db13c33d2e8f7708b5
14,158
py
Python
workspace/cogrob/service_manager/model/docker_service.py
CogRob/Rorg
dbf9d849e150404c117f6f0062476d995cec7316
[ "BSD-3-Clause" ]
8
2019-05-07T02:30:58.000Z
2021-12-10T18:44:45.000Z
workspace/cogrob/service_manager/model/docker_service.py
CogRob/Rorg
dbf9d849e150404c117f6f0062476d995cec7316
[ "BSD-3-Clause" ]
1
2021-03-17T07:18:23.000Z
2021-03-17T07:18:23.000Z
workspace/cogrob/service_manager/model/docker_service.py
CogRob/Rorg
dbf9d849e150404c117f6f0062476d995cec7316
[ "BSD-3-Clause" ]
2
2019-05-21T14:15:24.000Z
2022-02-09T12:50:24.000Z
# Copyright (c) 2019, The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, thi...
37.957105
80
0.727928
43000134c8e6e3af4141bab85388c271bc0ec983
972
py
Python
Server/admin/user.py
TateYdq/DietRegimen
66c88e84b7c4d9226db1d9567d300b1c6f7344b7
[ "MIT" ]
null
null
null
Server/admin/user.py
TateYdq/DietRegimen
66c88e84b7c4d9226db1d9567d300b1c6f7344b7
[ "MIT" ]
null
null
null
Server/admin/user.py
TateYdq/DietRegimen
66c88e84b7c4d9226db1d9567d300b1c6f7344b7
[ "MIT" ]
null
null
null
import requests import json from utils.config import * ss = requests.session() def addUser(): data = json.dumps({ "token":"1wqe213", "name":"123", "age":60, "gender":"female", "user_image_path":"test", "diseases_focus":"123" }) url = URL.format(env=cur_url, te...
23.707317
75
0.585391
4318e5247f4b8d07d4dd70cfd77815483cc783dc
524
py
Python
misc/sympy_play/sympy_test.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
misc/sympy_play/sympy_test.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
misc/sympy_play/sympy_test.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
import sympy as sy from sympy.printing.pycode import pycode t = sy.Symbol("t") q1 = sy.Function("q1") q2 = sy.Function("q2") q3 = sy.Function("q3") q4 = sy.Function("q4") q5 = sy.Function("q5") q6 = sy.Function("q6") qvec = sy.Matrix([[q1(t), q2(t), q3(t), q4(t), q5(t), q6(t)]]).T l0, l1, l2, l3, l4, l5, l6, h45 = ...
22.782609
79
0.593511
4357c36b2b65963566cfb1c5dcedc1eb5e1a7ceb
5,640
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/aireos/test_aireos_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/aireos/test_aireos_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/aireos/test_aireos_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
42.727273
137
0.715071
605e5ba542465d236c99c1654f2d7138207ee55d
3,751
py
Python
research/cv/stgcn/src/utility.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/stgcn/src/utility.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/stgcn/src/utility.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.1
93
0.661157
717fc92d06d8b606ab09ed90b150aa3633d8cd8a
971
py
Python
face_sdk/api_usage/face_crop.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
1,329
2021-01-13T07:06:30.000Z
2022-03-31T07:23:39.000Z
face_sdk/api_usage/face_crop.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
115
2021-01-13T10:42:57.000Z
2022-03-28T03:57:52.000Z
face_sdk/api_usage/face_crop.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
351
2021-01-13T07:21:00.000Z
2022-03-29T14:11:39.000Z
""" @author: JiXuan Xu, Jun Wang @date: 20201015 @contact: jun21wangustc@gmail.com """ import sys sys.path.append('.') import logging mpl_logger = logging.getLogger('matplotlib') mpl_logger.setLevel(logging.WARNING) import logging.config logging.config.fileConfig("config/logging.conf") logger = logging.getLogger('api'...
32.366667
86
0.760041
e0804ce8566aa4a1f9127885216a5c7be2e727e9
180
py
Python
exercises/en/solution_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/en/solution_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/en/solution_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
# Import spaCy import spacy # Create the English nlp object nlp = spacy.blank("en") # Process a text doc = nlp("This is a sentence.") # Print the document text print(doc.text)
13.846154
32
0.705556
e0a1c10ae6390769c98af7f96fec6a9849765502
396
py
Python
exercises/ja/test_03_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/ja/test_03_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/ja/test_03_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert nlp.meta["name"] == "core_news_sm", "正しいパイプラインをロードしましたか?" assert nlp.meta["lang"] == "ja", "正しいパイプラインをロードしましたか?" assert "print(nlp.pipe_names)" in __solution__, "パイプラインの名前をプリントしましたか?" assert "print(nlp.pipeline)" in __solution__, "パイプラインをプリントしましたか?" __msg__.good( "Well do...
39.6
85
0.707071
e809a6fba093e1a6e7525660b1fc58ee55f01ea9
7,631
py
Python
nayuki_qrcodegen/qrcodegen-demo.py
TG-Techie/HackUMass0111
603344064605979b85a2e142caf7a2a7439d60f5
[ "MIT" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/third_party/qrcodegen/python/qrcodegen-demo.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2019-10-19T09:24:56.000Z
2019-10-20T05:37:06.000Z
hihope_neptune-oh_hid/00_src/v0.3/third_party/qrcodegen/python/qrcodegen-demo.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2019-10-18T14:18:28.000Z
2019-10-18T14:18:28.000Z
# # QR Code generator demo (Python 2, 3) # # Run this command-line program with no arguments. The program computes a bunch of demonstration # QR Codes and prints them to the console. Also, the SVG code for one QR Code is printed as a sample. # # Copyright (c) Project Nayuki. (MIT License) # https://www.nayuki.io/pag...
40.807487
187
0.679727
1c3ba2386427f1f11255eabaa7bd9f3ff079e2ff
604
py
Python
exercises/fr/solution_02_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/solution_02_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/solution_02_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy nlp = spacy.blank("fr") # Importe les classes Doc et Span from spacy.tokens import Doc, Span words = ["Elle", "aime", "David", "Bowie"] spaces = [True, True, True, False] # Crée un doc à partir des mots et des espaces doc = Doc(nlp.vocab, words=words, spaces=spaces) print(doc.text) # Crée un span pour...
24.16
51
0.698675
1c4b56892f8c2ec0da93fecc9edd8661dc47cbad
1,050
py
Python
examples/all_pattern.py
xinetzone/dash-tests
cd4526caa2f9d906915c31370b3487bdcef92aa4
[ "Apache-2.0" ]
1
2022-03-01T07:38:32.000Z
2022-03-01T07:38:32.000Z
examples/all_pattern.py
xinetzone/dash-tests
cd4526caa2f9d906915c31370b3487bdcef92aa4
[ "Apache-2.0" ]
12
2021-07-13T12:33:36.000Z
2021-07-14T05:25:19.000Z
examples/all_pattern.py
xinetzone/dash-book
1f624e87e2aa02c9931318918df969e44bdd2c07
[ "Apache-2.0" ]
null
null
null
from dash import dcc, html from dash.dependencies import Input, Output, State, ALL from app import app layout = html.Div([ html.Button("Add Filter", id="add-filter", n_clicks=0), html.Div(id='dropdown-container', children=[]), html.Div(id='dropdown-container-output') ]) @app.callback( Output('dropdow...
27.631579
61
0.607619
296caaca728dcc7dc00f0e5afcaeaeb1b1d89dfb
5,535
py
Python
rengine/exercises.py
noahsolomon0518/rengine
a544951c6b7dd707586cd3c4f84ddec554f1c96a
[ "MIT" ]
null
null
null
rengine/exercises.py
noahsolomon0518/rengine
a544951c6b7dd707586cd3c4f84ddec554f1c96a
[ "MIT" ]
null
null
null
rengine/exercises.py
noahsolomon0518/rengine
a544951c6b7dd707586cd3c4f84ddec554f1c96a
[ "MIT" ]
null
null
null
"""Exercise object that can effectively be utilized in workout class""" import random from statistics import mean from copy import deepcopy from typing import List, Tuple import numpy as np from rengine.config import EXERCISE_CATEGORY_DATA, EquipmentAvailable, MuscleGroup from rengine.config import ExerciseLoad, Exerc...
46.125
207
0.737308
d3c20ba30c799ad0c4ece97ff2f9f54b53c716dc
578
py
Python
pacman-termux/test/pacman/tests/fileconflict006.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/fileconflict006.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/fileconflict006.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "dir->symlink change during package upgrade (conflict)" p1 = pmpkg("pkg1", "1.0-1") p1.files = ["test/", "test/file1", "test/dir/file1", "test/dir/file2"] self.addpkg2db("local", p1) p2 = pmpkg("pkg2") p2.files = ["test/dir/file3"] self.addpkg2db("local", p2) p3...
23.12
74
0.593426
733484cdfca22c03540f2693d3d1f87f9af290b4
4,479
py
Python
shinrl/solvers/discrete_vi/_target_mixin.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
34
2021-12-09T07:12:57.000Z
2022-03-11T08:17:20.000Z
shinrl/solvers/discrete_vi/_target_mixin.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
null
null
null
shinrl/solvers/discrete_vi/_target_mixin.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
4
2021-12-11T07:48:01.000Z
2022-03-01T23:50:33.000Z
"""MixIns to compute the target value of VI-based algorithms. Author: Toshinori Kitamura Affiliation: NAIST & OSX """ from chex import Array import shinrl as srl class TargetMixIn: def target_tabular_dp(self, data: srl.DataDict) -> Array: raise NotImplementedError def target_tabular_rl(self, data: s...
32.933824
82
0.602367
7df6f040321310b7773154fbaea2f2f2ac5edd00
2,038
py
Python
official/cv/xception/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/xception/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/xception/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
35.754386
93
0.722767
b40e21f394f4b34daf2d5543856ad12c0a26c351
441
py
Python
examples/08 langDict/LangBot.py
Killerhaschen/marvin-telegram-bot
c65e890a00450ed6ed4312d93e259db0c080ef6d
[ "MIT" ]
1
2020-01-16T08:40:00.000Z
2020-01-16T08:40:00.000Z
examples/08 langDict/LangBot.py
Killerhaschen/marvin-telegram-bot
c65e890a00450ed6ed4312d93e259db0c080ef6d
[ "MIT" ]
null
null
null
examples/08 langDict/LangBot.py
Killerhaschen/marvin-telegram-bot
c65e890a00450ed6ed4312d93e259db0c080ef6d
[ "MIT" ]
1
2019-10-16T08:11:51.000Z
2019-10-16T08:11:51.000Z
import asyncio from samt import Bot, Answer, Context, Mode marv = Bot() @marv.default_answer def default(): return 'unknown', Context.get('message').text @marv.answer("/start") async def start(): return Answer('greeting', Context.get('user')) @marv.answer("Guten Tag") def guten_tag(): a = Answer('gr...
16.333333
50
0.666667
5ef3604f75bc55c135004958ca8e50533ed54c4d
5,428
py
Python
IdeaProjects/PandasProj/PandasCourse5.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
1
2018-12-30T14:07:42.000Z
2018-12-30T14:07:42.000Z
IdeaProjects/PandasProj/PandasCourse5.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
IdeaProjects/PandasProj/PandasCourse5.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
# encoding: utf-8 import pandas as pd import numpy as np # 1.2 实验知识点 # # 时间戳 Timestamp # 时间索引 DatetimeIndex # 时间转换 to_datatime # 时间序列检索 # 时间序列计算 # 二、时间序列分析介绍 # # 2.1 简介 # # 时间序列(英语:time series)是实证经济学的一种统计方法,它是采用时间排序的一组随机变量,国内生产毛额(GDP)、消费者物价指数(CPI)、股价指数、利率、汇率等等都是时间序列。时间序列的时间间隔可以是分秒(如高频金融数据),可以是日、周、月、季度、年、甚至更大的时间单位。...
24.232143
172
0.718312
6f568ef4980832456ce6c631d796eccf3dbb92df
1,365
py
Python
packages/watchmen-model/src/watchmen_model/system/data_source.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/system/data_source.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/system/data_source.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from enum import Enum from typing import List, Optional, Union from pydantic import BaseModel from watchmen_model.common import DataModel, DataSourceId, OptimisticLock, TenantBasedTuple from watchmen_utilities import ArrayHelper class DataSourceParam(DataModel, BaseModel): name: str = None value: str = None cla...
24.375
96
0.747985
6f6176605e1cf42838a610e1b32a84c5323efe5f
1,479
py
Python
covidash/data/preprocessing.py
CRitter93/covidash
9daaa8e17c2487068bfd7a7b581880ee6698cedd
[ "Apache-2.0" ]
1
2020-05-11T17:54:58.000Z
2020-05-11T17:54:58.000Z
covidash/data/preprocessing.py
CRitter93/covidash
9daaa8e17c2487068bfd7a7b581880ee6698cedd
[ "Apache-2.0" ]
null
null
null
covidash/data/preprocessing.py
CRitter93/covidash
9daaa8e17c2487068bfd7a7b581880ee6698cedd
[ "Apache-2.0" ]
null
null
null
import pandas as pd import json import numpy as np import pprint # from shapely.geometry import Polygon, Point import geopandas as gpd from tqdm import tqdm def read_json_data(json_file): with open(json_file) as json_file: json_data = json.load(json_file) return json_data def merge_hopital_with_stat...
33.613636
121
0.678161
d28f383b3b641be6fe37ff39d7878d795e95a3d2
1,651
py
Python
rawio/grouping/timestamp.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
rawio/grouping/timestamp.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
rawio/grouping/timestamp.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
# # RawIO # Copyright (c) 2021 Yusuf Olokoba. # from dateutil.parser import parse as parse_datetime from PIL import Image from typing import Callable def timestamp_similarity (max_delta_time: float=6.) -> Callable[[str, str], bool]: """ Create a similarity function which uses temporal proximity as a prox...
31.150943
113
0.667474
815caa00acc103b5561bd58e974267e4156adda5
5,387
py
Python
MA/Robot_V002b.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
MA/Robot_V002b.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
MA/Robot_V002b.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys sys.path.append("/home/pi/Documents/Robots/slcypi/MA") ### ADD PATH sys.path.append("/home/pi/Documents/Robots/slcypi/HAT_Python3") ### ADD PATH import time from time import sleep import atexit import pygame import pygame.camera from PIL import Image #from pylab import * from Tank import T...
41.75969
101
0.374234
6f9c5de3ca64f08169d537485009741bbe8b12c3
1,623
py
Python
frappe-bench/apps/erpnext/erpnext/stock/doctype/item_alternative/item_alternative.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/stock/doctype/item_alternative/item_alternative.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/stock/doctype/item_alternative/item_alternative.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document class ItemAlternative(Document): def validate(self): s...
40.575
95
0.741836
6fad16cee289abdaf9a983e71d23f92f5203a4e3
772
py
Python
main.py
jakoubek/Technotes
7748d20100706e408e1d89c841098f987d0e1492
[ "MIT" ]
null
null
null
main.py
jakoubek/Technotes
7748d20100706e408e1d89c841098f987d0e1492
[ "MIT" ]
3
2022-03-27T08:37:43.000Z
2022-03-30T15:23:46.000Z
main.py
jakoubek/Technotes
7748d20100706e408e1d89c841098f987d0e1492
[ "MIT" ]
null
null
null
def define_env(env): "Definition of the module" @env.macro def feedback(title, section, slug): email_address = f"{section}+{slug}@technotes.jakoubek.net" md = "\n\n## Feedback / Kontakt\n\n" md += f"Wenn Sie Fragen oder Anregungen zum Artikel *{title}* haben, senden Sie mir bitte ei...
42.888889
184
0.643782