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
1c2e9da8b1410e0876c772e4e9d83e5a0a64b024
436
py
Python
src/dendrograms/dendrogram.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/dendrograms/dendrogram.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/dendrograms/dendrogram.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
# dendrogram import scipy.cluster.hierarchy as shc # Import Data df = pd.read_csv('https://raw.githubusercontent.com/selva86/datasets/master/USArrests.csv') # Plot plt.figure(figsize=(16, 10), dpi= 80) plt.title("USArrests Dendograms", fontsize=22) dend = shc.dendrogram(shc.linkage(df[['Murder', 'Assault', 'Urb...
29.066667
143
0.729358
c7dc6758888dcf6b5a87623d709380c54ae6843a
4,194
py
Python
frds/measures/func_cca.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
31
2020-06-17T13:19:12.000Z
2022-03-27T08:56:38.000Z
frds/measures/func_cca.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
null
null
null
frds/measures/func_cca.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
8
2020-06-14T15:21:51.000Z
2021-09-29T06:28:53.000Z
from math import log, sqrt, exp from typing import Tuple from scipy.optimize import fsolve from scipy.stats import norm def cca( equity: float, volatility: float, risk_free_rate: float, default_barrier: float, time_to_maturity: float, cds_spread: float, ) -> Tuple[float, float]: r"""System...
34.377049
137
0.619456
469db1decf9433d9417a1c884684e9ccb685a66c
4,901
py
Python
core/plot_data.py
NewLanded/swbt
8b8e8609cea060d6f124dc3c4bd99cb6243501dc
[ "Apache-2.0" ]
null
null
null
core/plot_data.py
NewLanded/swbt
8b8e8609cea060d6f124dc3c4bd99cb6243501dc
[ "Apache-2.0" ]
null
null
null
core/plot_data.py
NewLanded/swbt
8b8e8609cea060d6f124dc3c4bd99cb6243501dc
[ "Apache-2.0" ]
1
2019-11-28T16:29:49.000Z
2019-11-28T16:29:49.000Z
import matplotlib.pyplot as plt import matplotlib as mpl import seaborn as sns import pandas as pd def plot_data(point_data, bs_data, manual_plot_data): """ 绘图 :param point_data: 回测数据, DataFrame, 至少包含日期与开盘价, 收盘价, 最高价, 最低价, 以日期升序排序 trade_date open high low close 1 2016-01-01 10 11 ...
41.533898
152
0.665987
d3b24f937c10178693840941316f2418669c2f48
4,943
py
Python
research/cv/FaceAttribute/src/FaceAttribute/resnet18_softmax.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/FaceAttribute/src/FaceAttribute/resnet18_softmax.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/FaceAttribute/src/FaceAttribute/resnet18_softmax.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...
33.856164
92
0.629173
b43998a7beab0acd2310aa664c45a62bc7d79f81
1,635
py
Python
qr.py
Themishau/AGI_QR_CODE_PROJEKT
390bcd4d211e66f0520646591d7e542edc683ad6
[ "MIT" ]
null
null
null
qr.py
Themishau/AGI_QR_CODE_PROJEKT
390bcd4d211e66f0520646591d7e542edc683ad6
[ "MIT" ]
null
null
null
qr.py
Themishau/AGI_QR_CODE_PROJEKT
390bcd4d211e66f0520646591d7e542edc683ad6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import qrcode import os import cv2 from pyzbar.pyzbar import decode import random import sys import pandas as pd import matplotlib.pyplot as plt import numpy as np import time from IPython import get_ipython from IPython.display import display CAMERA_PORT = 1 def init_camera_settings(settings):...
23.695652
67
0.645872
c31ba3d7ee0082c112d19d5e103607edd102da19
2,139
py
Python
qmk_firmware/util/audio_generate_dac_lut.py
DanTupi/personal_setup
911b4951e4d8b78d6ea8ca335229e2e970fda871
[ "MIT" ]
2
2021-04-16T23:29:01.000Z
2021-04-17T02:26:22.000Z
qmk_firmware/util/audio_generate_dac_lut.py
DanTupi/personal_setup
911b4951e4d8b78d6ea8ca335229e2e970fda871
[ "MIT" ]
null
null
null
qmk_firmware/util/audio_generate_dac_lut.py
DanTupi/personal_setup
911b4951e4d8b78d6ea8ca335229e2e970fda871
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Copyright 2020 JohSchneider # # 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 later version. # # This progra...
31.455882
127
0.696587
c35a9ddcb10296ffbe9bc70a03ce675566e88989
2,429
py
Python
research/cv/autoaugment/src/dataset/autoaugment/ops/cutout.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
1
2021-07-03T06:52:20.000Z
2021-07-03T06:52:20.000Z
research/cv/autoaugment/src/dataset/autoaugment/ops/cutout.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
research/cv/autoaugment/src/dataset/autoaugment/ops/cutout.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
2
2019-09-01T06:17:04.000Z
2019-10-04T08:39:45.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
31.141026
78
0.590778
48b4fc9b5da754c3f4dccfc30ec868de7bd721e9
1,075
py
Python
Packs/CommonScripts/Scripts/SetAndHandleEmpty/SetAndHandleEmpty.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
null
null
null
Packs/CommonScripts/Scripts/SetAndHandleEmpty/SetAndHandleEmpty.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
null
null
null
Packs/CommonScripts/Scripts/SetAndHandleEmpty/SetAndHandleEmpty.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
null
null
null
import demistomock as demisto from CommonServerPython import * from typing import Text def get_value(value, stringify=False): if stringify: return str(value) elif not value or not isinstance(value, (Text, bytes, bytearray)): return value else: try: return json.loads(val...
25.595238
70
0.624186
d2da60aefa1a2bd7a2b7ff708b7ed467f46c8a95
4,794
py
Python
src/visitpy/visit_flow/flow/src/parser/generator.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/visitpy/visit_flow/flow/src/parser/generator.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/visitpy/visit_flow/flow/src/parser/generator.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ File: generator.py Authors: Cyrus Harrison, <cyrush@llnl.gov> Maysam Moussalem <mays...
36.59542
95
0.520025
8287a078aa5af912398a432f618ea02f75fe240c
4,003
py
Python
python/oneflow/test/modules/test_l2_normalize.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/test/modules/test_l2_normalize.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/test/modules/test_l2_normalize.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
520
2020-07-31T05:52:42.000Z
2022-03-29T02:38:11.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
31.031008
88
0.623782
7d5885bb8825541292f3f453d5964f1f6d2f1b8d
2,551
py
Python
src/onegov/core/orm/sql.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/orm/sql.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/orm/sql.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import os import psqlparse import re from onegov.core.cache import lru_cache from onegov.core.orm import types as onegov_types from sqlalchemy import text from sqlalchemy import types as sqlalchemy_types from uuid import uuid4 NESTED_TYPE = re.compile(r'(\w+)\((\w+)\)') def as_selectable(query, alias=None): ""...
25.009804
78
0.620541
7d8144cb1f65f66f7042adc2d389edc76579dfa9
763
py
Python
loadtest/trafficgen/setup.py
harrywong/evt
95985384619e0f5ff4021e8838d421ac4b4b946d
[ "BSD-3-Clause" ]
1,411
2018-04-23T03:57:30.000Z
2022-02-13T10:34:22.000Z
loadtest/trafficgen/setup.py
Zhang-Zexi/evt
e90fe4dbab4b9512d120c79f33ecc62791e088bd
[ "Apache-2.0" ]
27
2018-06-11T10:34:42.000Z
2019-07-27T08:50:02.000Z
loadtest/trafficgen/setup.py
Zhang-Zexi/evt
e90fe4dbab4b9512d120c79f33ecc62791e088bd
[ "Apache-2.0" ]
364
2018-06-09T12:11:53.000Z
2020-12-15T03:26:48.000Z
from setuptools import find_packages, setup setup( name='trafficgen', version='0.1', author='everiToken', author_email='help@everitoken.io', description='Python SDK library for everiToken', long_description=open('README.rst').read(), license='MIT', url='https://github.com/everitoken/evt...
29.346154
76
0.622543
7de58860371ba74a6517135556baa54c20edafe3
44,928
py
Python
examples/LaTeX/LaTeXParser.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
2
2020-12-25T19:37:42.000Z
2021-03-26T04:59:12.000Z
examples/LaTeX/LaTeXParser.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
6
2018-08-07T22:48:52.000Z
2021-10-07T18:38:20.000Z
examples/LaTeX/LaTeXParser.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ####################################################################### # # SYMBOLS SECTION - Can be edited. Changes will be preserved. # ####################################################################### import collections from functools import partial import os import sys from typing im...
43.70428
409
0.630475
c4cbeba6b79feb78fd58d2889d2e4d262d74438c
140
py
Python
py/jpy-integration/src/javaToPython/python/io/deephaven/jpy/integration/pylib_null_arg_test.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
55
2021-05-11T16:01:59.000Z
2022-03-30T14:30:33.000Z
py/jpy-integration/src/javaToPython/python/io/deephaven/jpy/integration/pylib_null_arg_test.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
943
2021-05-10T14:00:02.000Z
2022-03-31T21:28:15.000Z
py/jpy-integration/src/javaToPython/python/io/deephaven/jpy/integration/pylib_null_arg_test.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
29
2021-05-10T11:33:16.000Z
2022-03-30T21:01:54.000Z
sentinel = object() def some_function(x = sentinel): if x is None: return "None" if x == sentinel: return "sentinel" return x
17.5
32
0.642857
82ec0e55b2c3cd52c421f1eef9825dc42e7fb521
11,349
py
Python
dorksscan-main/dorkscan.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
dorksscan-main/dorkscan.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
dorksscan-main/dorkscan.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 os,re,requests from colorama import Fore,init from multiprocessing.dummy import Pool if os.name == "nt": os.system("cls") else: os.system("clear") init(convert=True) class settings: y = Fore.YELLOW r = Fore.RED b = Fore.BLUE def clean(): lines_seen = set() outfile = open('sites.txt', "a") infile = o...
44.332031
133
0.658208
96924245872da8da09df20251333b6a86abd16ce
1,725
py
Python
rnn/model.py
junchenfeng/diagnosis_tracing
4e26e2ad0c7abc547f22774b6c9c299999a152c3
[ "MIT" ]
null
null
null
rnn/model.py
junchenfeng/diagnosis_tracing
4e26e2ad0c7abc547f22774b6c9c299999a152c3
[ "MIT" ]
null
null
null
rnn/model.py
junchenfeng/diagnosis_tracing
4e26e2ad0c7abc547f22774b6c9c299999a152c3
[ "MIT" ]
1
2020-09-08T13:42:16.000Z
2020-09-08T13:42:16.000Z
from torch import nn from torch import ne from torch.nn.utils.rnn import pack_padded_sequence,pad_packed_sequence from torch.nn.functional import one_hot class Model(nn.Module): """ item id starts from 1 'cause 0s are paddings """ def __init__(self,num_items,hidden_size): ...
35.9375
72
0.551884
96aac300d555ae87ed93a72daf91976d50f984fc
352
py
Python
pacman-termux/test/pacman/tests/provision011.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/provision011.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/provision011.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "provision>=1.0-2 dependency (2)" p = pmpkg("pkg1", "1.0-2") p.depends = ["provision>=1.0-2"] self.addpkg(p) lp = pmpkg("pkg2", "1.0-2") lp.provides = ["provision=1.0-2"] self.addpkg2db("local", lp) self.args = "-U %s" % p.filename() self.addrule("PACMAN_RETCODE=0") self.addrule("PKG_EXIST=pkg1")...
22
52
0.65625
73ca8df3064bddab373a71d1a6b0c360619ac832
935
py
Python
cktsim/sim/views.py
Rajarshi07/cktsim
35f85a5240b940bfd0c0f5fb15cf59da57f92587
[ "MIT" ]
null
null
null
cktsim/sim/views.py
Rajarshi07/cktsim
35f85a5240b940bfd0c0f5fb15cf59da57f92587
[ "MIT" ]
null
null
null
cktsim/sim/views.py
Rajarshi07/cktsim
35f85a5240b940bfd0c0f5fb15cf59da57f92587
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect def index(request): return render(request, 'index.html') def allckts(request): return render(request, 'allckts.html') def hadd(request): return render(request,'hadd.html') def fadd(request): return render(request,'fadd.html') def hsub(request): return r...
30.16129
45
0.734759
73eba48618189793893a52bf89de49d9f12d8e80
17,346
py
Python
src/onegov/swissvotes/upgrade.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/swissvotes/upgrade.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/swissvotes/upgrade.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" Contains upgrade tasks that are executed when the application is being upgraded on the server. See :class:`onegov.core.upgrade.upgrade_task`. """ from onegov.core.orm.types import JSON from onegov.core.upgrade import upgrade_task from sqlalchemy import Column from sqlalchemy import Integer from sqlalchemy import N...
31.711152
79
0.648219
f7a3e3cdd35699fd7a31aa90675a7788ecd640da
707
py
Python
ryu/app/otherApp/lock.py
yuesir137/SDN-CLB
58b12a9412cffdf2945440528b1885c8899edd08
[ "Apache-2.0" ]
null
null
null
ryu/app/otherApp/lock.py
yuesir137/SDN-CLB
58b12a9412cffdf2945440528b1885c8899edd08
[ "Apache-2.0" ]
null
null
null
ryu/app/otherApp/lock.py
yuesir137/SDN-CLB
58b12a9412cffdf2945440528b1885c8899edd08
[ "Apache-2.0" ]
null
null
null
import fcntl import time def get_lock(state): result = False file = open('lock', 'r+') fcntl.flock(file.fileno(), fcntl.LOCK_EX) Lock = file.readline() if Lock=='True': print('other mig in progress !!!') if state == True and Lock == 'False': print('acquire lock {} at {}'.format...
24.37931
65
0.572843
f704c46b173fb645449a9542a94234ae033a96b3
5,712
py
Python
view/__init__.py
sadlll/ablog
d04b532751c297fe9cd25563d08f48e8aaee7f48
[ "Apache-2.0" ]
null
null
null
view/__init__.py
sadlll/ablog
d04b532751c297fe9cd25563d08f48e8aaee7f48
[ "Apache-2.0" ]
null
null
null
view/__init__.py
sadlll/ablog
d04b532751c297fe9cd25563d08f48e8aaee7f48
[ "Apache-2.0" ]
1
2020-09-14T07:09:34.000Z
2020-09-14T07:09:34.000Z
# coding:utf-8 import json import random import string import tornado.web import config from lib.jsdict import JsDict from model.user import User # route class Route(object): urls = [] def __call__(self, url, name=None): def _(cls): self.urls.append(tornado.web.URLSpec(url, cls, name=nam...
25.386667
107
0.605042
f753ee729c747bc8e02b5d4ea15a3a98ac9dd683
8,124
py
Python
21-fs-ias-lec/07-BackEnd/Person/Person.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
21-fs-ias-lec/07-BackEnd/Person/Person.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
21-fs-ias-lec/07-BackEnd/Person/Person.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
import sys import time sys.path.append("../Feed") sys.path.append("../lib") import crypto import feed as fe from generateJson import generate_json from Feed import Feed class Person: name = "" # name of the user id = 0 # BacNet id of the user feed = None # feed of the user (refers to Feed.py) ...
41.44898
115
0.612383
540aafacd1eef47403ad38441dc7cb2aa36cade7
251
py
Python
x/readxls/main.py
miku/lc-extra
afeb3cb5f532069be17c54d6508aa7c0c8373c2a
[ "MIT" ]
null
null
null
x/readxls/main.py
miku/lc-extra
afeb3cb5f532069be17c54d6508aa7c0c8373c2a
[ "MIT" ]
null
null
null
x/readxls/main.py
miku/lc-extra
afeb3cb5f532069be17c54d6508aa7c0c8373c2a
[ "MIT" ]
1
2020-02-04T08:09:01.000Z
2020-02-04T08:09:01.000Z
import pandas as pd # Daten laden. df = pd.read_excel("konkordanz_pica_gnd_pica_export.xls") df["Pica Sbf-Bezeichnung"] = df["Pica Sbf-Bezeichnung"].str.upper() # Ausschnitt, speichern. df[["Pica3", "Pica Sbf-Bezeichnung"]].to_excel("output.xlsx")
25.1
67
0.733068
b772807585b7f0be65f1aa4595898dd9f94796ea
1,669
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/util/StringUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/util/StringUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/util/StringUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden def check_no_duplicate_chars(input): upper_case_input = input.upper() return len(upper_case_input) == len(set(upper_case_input)) def is_palindrome_rec(input): return is_palindrome_rec_in_range(input.lower(), 0, len(i...
22.554054
71
0.654284
b77730f86af0ed31246b2f7396d14cab30ba356e
20,134
py
Python
NMC/parser/Biophysics.py
OpenSourceBrain/BlueBrainProjectShowcase
2cd8aa77342576c1a871f5d500d791f927444913
[ "MIT" ]
26
2015-08-17T19:30:52.000Z
2021-03-12T20:39:19.000Z
NMC/parser/Biophysics.py
OpenSourceBrain/BlueBrainProjectShowcase
2cd8aa77342576c1a871f5d500d791f927444913
[ "MIT" ]
9
2015-01-15T20:16:08.000Z
2017-05-18T20:53:52.000Z
NMC/parser/Biophysics.py
OpenSourceBrain/BlueBrainProjectShowcase
2cd8aa77342576c1a871f5d500d791f927444913
[ "MIT" ]
18
2015-08-17T19:30:56.000Z
2022-03-04T06:01:30.000Z
#!/usr/bin/env python """ Create an NeuroML 2.0 version of the templates stored in a json file Authors: Werner van Geit, Padraig Gleeson """ import json import logging logging.basicConfig(level=logging.DEBUG, format='%(message)s') import neuroml import neuroml.writers import neuroml.utils # pylint: di...
49.960298
162
0.470299
4d150382173551c8e8515ec0b3dfc09ab63bfa5e
235
py
Python
Nucleo/__init__.py
Jonatan966/SODA
046d8c1e7b9bac3a555526c9fe2f365c2b338aca
[ "MIT" ]
null
null
null
Nucleo/__init__.py
Jonatan966/SODA
046d8c1e7b9bac3a555526c9fe2f365c2b338aca
[ "MIT" ]
null
null
null
Nucleo/__init__.py
Jonatan966/SODA
046d8c1e7b9bac3a555526c9fe2f365c2b338aca
[ "MIT" ]
null
null
null
from .smain_Variaveis import * from .smain_Info import * from .smain_Matematica import * from .smain_Criptografia import * from .smain_Config import * from .smain_Debug import * from .smain_Quimica import * from .smain_Handler import *
29.375
33
0.8
c4272282d25b488bf957aaea24f59576bc26e3bc
427
py
Python
BITs/2014/Abdrahmanova_G_I/task_5_1.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/Abdrahmanova_G_I/task_5_1.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/Abdrahmanova_G_I/task_5_1.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 5. Вариант 1. #Напишите программу, которая бы при запуске случайным образом отображала название одного из семи чудес света. import random wonder=random.choice(["Пирамиды Гизы", "Висячие сады Семирамиды", "Олимпийская статуя Зевса", "Храм Артемиды в Эфесе", "Галикарнасский мавзолей", "Колосс Родосский", "Алексан...
53.375
190
0.775176
c47d85c1e6838759a4bc7d5ca02850f9fb1f4c04
422
py
Python
___Python/Jonas/Python/p06_persistance/m02_json.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Jonas/Python/p06_persistance/m02_json.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Jonas/Python/p06_persistance/m02_json.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
import json from p01_kennenlernen.m01_kennenlernen import teilnehmerListe # pickling / serialization / marshalling / flattening with open("teilnehmer.json", "w") as datei: json.dump(teilnehmerListe, datei, default=str) # Datumsangaben werden als string serialisiert # unpickling / deserialization / unma...
28.133333
98
0.741706
6701c779f662d98db3050ba0aafbf79cb2876702
72
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.03-set/ph-29-declear-set-with-value.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.03-set/ph-29-declear-set-with-value.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.03-set/ph-29-declear-set-with-value.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
items = {"pen", "loptop", "cellphone"} print(items, "\n", type(items))
18
38
0.597222
670ebd28ead69c62b5461e9fb939dad34f90aaf8
1,402
py
Python
lintcode/132-[DUP]-Palindrome-Partitioning-II/PalindromePartitioningII_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
lintcode/132-[DUP]-Palindrome-Partitioning-II/PalindromePartitioningII_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
lintcode/132-[DUP]-Palindrome-Partitioning-II/PalindromePartitioningII_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution: # @param s, a string # @return an integer def minCut(self, s): # write your code here n = len(s) if n < 2: return 0 isPal = [[False for j in range(n)] for i in range(n)] for d in range(n): isPal[d][d] = True for l...
28.612245
77
0.363766
675720cfa6c5c6623db4c85fdd76a0b15a72ba94
13,700
py
Python
etl/event-server/etllib.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
etl/event-server/etllib.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
etl/event-server/etllib.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
import os import uvloop import asyncio import logging from etl.core.engine import TaskContext import pandas as pd from etl.core.config import Config from etl.io_config.epic_api import EpicAPIConfig import etl.io_config.core as core import traceback import etl.load.pipelines.epic2op as loader import datetime as dt impor...
39.367816
198
0.629854
67e62d7a75f87cc95f414307138944e776ec2ff8
279
py
Python
Project Euler Qusetions 51 - 60/Project Euler Question 56.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
1
2020-02-11T02:03:02.000Z
2020-02-11T02:03:02.000Z
Project Euler Qusetions 51 - 60/Project Euler Question 56.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
Project Euler Qusetions 51 - 60/Project Euler Question 56.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
#Project Euler Question 56 #Powerful digit sum highest_sum = 1 for a in range(1, 100): for b in range(1, 100): ab = (a ** b) digit_sum = sum(int(i) for i in str(ab)) if digit_sum > highest_sum: highest_sum = digit_sum print (highest_sum)
23.25
48
0.605735
db09361d65f0e4eb0465dc738531ed5f4084cdf8
2,721
py
Python
marathon/marathon-lb/zdd_exceptions.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
511
2015-10-17T09:28:28.000Z
2022-02-20T21:58:56.000Z
marathon/marathon-lb/zdd_exceptions.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
575
2015-10-09T11:54:09.000Z
2021-11-22T20:50:19.000Z
marathon/marathon-lb/zdd_exceptions.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
411
2015-10-29T13:41:45.000Z
2022-02-11T09:27:50.000Z
""" Exit Status 1 is already used in the script. Zdd returns with exit status 1 when app is not force deleted either through argument or through prompt. Exit Status 2 is used for Unknown Exceptions. """ class InvalidArgException(Exception): """ This exception indicates invalid combination of arguments...
33.182927
74
0.663359
7a087da29649ec958c9518ed20b639939a473e3a
10,821
py
Python
bawwab/user.py
leibniz-psychology/bawwab
2e7129bf59b33c0ee22a960e7b2835888068fd1a
[ "MIT" ]
2
2021-07-06T06:00:22.000Z
2022-01-15T09:29:44.000Z
bawwab/user.py
leibniz-psychology/bawwab
2e7129bf59b33c0ee22a960e7b2835888068fd1a
[ "MIT" ]
11
2020-11-26T10:53:44.000Z
2022-03-31T09:42:51.000Z
bawwab/user.py
leibniz-psychology/bawwab
2e7129bf59b33c0ee22a960e7b2835888068fd1a
[ "MIT" ]
1
2022-01-15T09:30:46.000Z
2022-01-15T09:30:46.000Z
# Copyright 2019–2020 Leibniz Institute for Psychology # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, ...
30.226257
97
0.715091
e16e57eb54608625ef652e4799f0b355bfb2c17f
2,938
py
Python
tests/solvers/discrete_vi/discrete_vi_mixin_test.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
34
2021-12-09T07:12:57.000Z
2022-03-11T08:17:20.000Z
tests/solvers/discrete_vi/discrete_vi_mixin_test.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
null
null
null
tests/solvers/discrete_vi/discrete_vi_mixin_test.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
4
2021-12-11T07:48:01.000Z
2022-03-01T23:50:33.000Z
import chex import jax.numpy as jnp import shinrl as srl def test_build_table_mixin(): from shinrl.solvers.discrete_vi._build_table_mixin import BuildTableMixIn from shinrl.solvers.discrete_vi.config import ViConfig class MockSolver(srl.BaseSolver): @staticmethod def make_mixins(): ...
28.524272
80
0.678353
8349f759a260f6cfb66a7346d40a05de1664f2fd
993
py
Python
21-merge-two-sorted-lists/21-merge-two-sorted-lists.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
21-merge-two-sorted-lists/21-merge-two-sorted-lists.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
21-merge-two-sorted-lists/21-merge-two-sorted-lists.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def mergeTwoLists(self, list1: Optional[ListNode], list2: Optional[ListNode]) -> Optional[ListNode]: dummy = cur = ListNode(0) while(...
35.464286
104
0.477341
a1d8e6a78158d3fb7b43305785b382365855a29a
359
py
Python
test/unit/raw_test.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
test/unit/raw_test.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
test/unit/raw_test.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
# # RawIO # Copyright (c) 2021 Yusuf Olokoba. # from pytest import fixture, mark from rawio.raw import rawread @mark.parametrize("image_path", [ "test/media/raw/1.arw", "test/media/raw/2.arw", "test/media/raw/3.cr2", "test/media/raw/4.cr2", ]) def test_single_raw (image_path): image = rawrea...
19.944444
37
0.660167
1a030510e1be797d63514a6abf99678253a1065b
1,124
py
Python
other/re-risky/directors-cut/spoilers_and_source/src/gen_loader.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
other/re-risky/directors-cut/spoilers_and_source/src/gen_loader.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
other/re-risky/directors-cut/spoilers_and_source/src/gen_loader.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...
27.414634
74
0.659253
1a10415b3afb0bc2de1b1e6afb0a45088fb5e402
1,277
py
Python
listings/chapter03/albums.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
2
2021-09-20T06:16:41.000Z
2022-01-17T14:24:43.000Z
listings/chapter03/albums.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
listings/chapter03/albums.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
class Album: def __init__(self, artist, title, year, remarks = None): self.artist = artist self.title = title self.year = year self.remarks = remarks def __eq__(self, other): return self.artist == other.artist and self.title == other.title def __lt__(self, other): ...
29.022727
103
0.606891
c518117f2879e9bb0ecbace3ffa683065c1212e2
4,298
py
Python
reports/iftomm_dach/code/models/fcn.py
klawr/deepmech
61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff
[ "MIT" ]
1
2020-04-17T12:27:06.000Z
2020-04-17T12:27:06.000Z
reports/iftomm_dach/code/models/fcn.py
klawr/deepmech
61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff
[ "MIT" ]
1
2022-02-27T13:13:17.000Z
2022-02-27T13:13:17.000Z
reports/iftomm_dach/code/models/fcn.py
klawr/deepmech
61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff
[ "MIT" ]
null
null
null
""" Add a variable input layer to the beginning. The first four layers of the old model are convolutional layers and do not need to be altered in any way. After they are appended the shape of the flattened layer is determined, which is then used to determine the shape of the only hidden dense layer. The output layer is...
39.796296
125
0.670312
3d88d7924e81a5c0d7d177f1f3fbe6875643b242
7,472
py
Python
taren_gui.py
ThirtySomething/TaRen
ef09e8616c45bcb97afcea3ad4844ae6fade7525
[ "MIT" ]
null
null
null
taren_gui.py
ThirtySomething/TaRen
ef09e8616c45bcb97afcea3ad4844ae6fade7525
[ "MIT" ]
null
null
null
taren_gui.py
ThirtySomething/TaRen
ef09e8616c45bcb97afcea3ad4844ae6fade7525
[ "MIT" ]
null
null
null
''' ****************************************************************************** Copyright 2020 ThirtySomething ****************************************************************************** This file is part of TaRen. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ...
39.326316
192
0.652436
b115a89b567c07ad95985ecbbe22196b2fbc1e0d
4,839
py
Python
tests/embeddings/test_token_embedding.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
tests/embeddings/test_token_embedding.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
tests/embeddings/test_token_embedding.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
36.659091
75
0.693118
b17ce932150a7ba4c2566b2f829ec9824f9ec4da
4,035
py
Python
src/regModel.py
saeyoung/tslb
5f52646260e14f44c61a670cfc75509951e5e794
[ "MIT" ]
null
null
null
src/regModel.py
saeyoung/tslb
5f52646260e14f44c61a670cfc75509951e5e794
[ "MIT" ]
3
2020-03-24T18:18:21.000Z
2021-08-23T20:37:09.000Z
src/regModel.py
saeyoung/tslb
5f52646260e14f44c61a670cfc75509951e5e794
[ "MIT" ]
null
null
null
###################################################### # # Regression Model # ###################################################### import numpy as np import pandas as pd import random import copy import pickle from matplotlib import pyplot as plt from sklearn.linear_model import LinearRegression from numpy.linalg imp...
37.018349
153
0.586121
b183630201c682dcabb6e1a2619a8447325196fd
352
py
Python
INBa/2015/Ermashov_A_V/task_2_5.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Ermashov_A_V/task_2_5.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Ermashov_A_V/task_2_5.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача №2, Вариант 5 #Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Сюнь-цзы. Не забудьте о том, что автор должен быть упомянут на отдельной строке. #Ермашов А.В. #26.04.2016 print("В учении нельзя останавливаться\n\t\t\t\t\t\t\t\tСюнь-цзы") inp...
44
200
0.778409
b19cf2041086b66a826bdd02261f44a880a1c824
615
py
Python
measures/cosine_distance.py
ryuzakyl/tf_idf
48adffa994516df6b6321641915252e3bc2e2dfe
[ "MIT" ]
null
null
null
measures/cosine_distance.py
ryuzakyl/tf_idf
48adffa994516df6b6321641915252e3bc2e2dfe
[ "MIT" ]
null
null
null
measures/cosine_distance.py
ryuzakyl/tf_idf
48adffa994516df6b6321641915252e3bc2e2dfe
[ "MIT" ]
null
null
null
import numpy as np def cosine(x, y): """Cosine distance among two vectors. Args: x (list): The first vector. y (list): The second vector. Returns: float: The cosine distance between vectors x and y. """ # converting python lists to numpy arrays x_arr = np.array(x) ...
21.206897
59
0.627642
65e4269fd07a7451d53c4f7dc946e41e254202a0
1,634
py
Python
pratica2_2/gerenciador_recursos.py
samcost/POO
5c280407abb7aa9db1c82e52c34fd372465e8fe2
[ "MIT" ]
null
null
null
pratica2_2/gerenciador_recursos.py
samcost/POO
5c280407abb7aa9db1c82e52c34fd372465e8fe2
[ "MIT" ]
null
null
null
pratica2_2/gerenciador_recursos.py
samcost/POO
5c280407abb7aa9db1c82e52c34fd372465e8fe2
[ "MIT" ]
null
null
null
class GerenciadorRecursos: def __init__(self): self._recursos = [] def _busca_recurso(self, nome): ''' Retorna um recurso que tenha como nome o parâmetro informado. ''' for r in self._recursos: if r.nome == nome: return r else...
22.383562
58
0.501836
0291f87916b00830e64f9bfe1dc33ad631f53075
1,315
py
Python
nz_crawl_demo/day2/renren.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_crawl_demo/day2/renren.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_crawl_demo/day2/renren.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from urllib import request headers = { "User-Agent":"Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.11", "Cookie":"anonymid=k7lk0d66y5mtud; depovince=NMG; jebecookies=15f53123-f0c7-4def-89b5-0fa3944825fb|||||; _r01_=1; ick_login=aec74675-5f38-424e-88ec-16d2089c5704; taihe_bi_sdk...
87.666667
876
0.807605
029ec5d8f09e8acd18419cff8ed77777d65a97be
15,295
py
Python
src/onegov/town6/homepage_widgets.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/homepage_widgets.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/homepage_widgets.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from collections import namedtuple from onegov.event import OccurrenceCollection from onegov.form import FormCollection from onegov.org.elements import Link, LinkGroup from onegov.org.layout import EventBaseLayout from onegov.org.homepage_widgets import NewsWidget as OrgNewsWidget, \ get_lead, DirectoriesWidget a...
33.32244
79
0.440928
02f7be81604f8999249542fb46854edf6acc1c90
715
py
Python
pacman-arch/test/pacman/tests/sync141.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/sync141.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/sync141.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Sysupgrade with ignored package prevent other upgrade" lp1 = pmpkg("c_glibc", "1.0-1") lp2 = pmpkg("b_gcc-libs", "1.0-1") lp2.depends = ["c_glibc>=1.0-1"] lp3 = pmpkg("a_pcre", "1.0-1") lp3.depends = ["b_gcc-libs"] for p in lp1, lp2, lp3: self.addpkg2db("local", p) sp1 = pmpkg("c_glibc", "1.0-2"...
26.481481
74
0.655944
ac23ecb81a8cde5c04f9a0f2dfde789b58e602d0
7,052
py
Python
Utils/py/ball_detector/experiments/util.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/ball_detector/experiments/util.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/ball_detector/experiments/util.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/python import patchReader import json import os import sys import getopt import math import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as ptc import features as feat show_size = (50, 30) # width, height patch_size = (12, 12) # width, height def get_marker(x, y, c): pos = ...
28.435484
96
0.604935
ce0aac2e063f9e3d1517b0f331797e84efa31029
1,533
py
Python
ladon-server/software/src/python/kafka-file-wrapper/ChunkBucket.py
LucasRGoes/ladon-io
ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6
[ "MIT" ]
1
2018-04-29T22:33:42.000Z
2018-04-29T22:33:42.000Z
ladon-server/software/src/python/kafka-file-wrapper/ChunkBucket.py
LucasRGoes/ladon-io
ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6
[ "MIT" ]
null
null
null
ladon-server/software/src/python/kafka-file-wrapper/ChunkBucket.py
LucasRGoes/ladon-io
ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6
[ "MIT" ]
null
null
null
## IMPORTS ## import logging # Logging: provides a set of convenience functions for simple logging usage ## CLASS ## class ChunkBucket: # __init__ # -------- # Initializes an instance of ChunkBucket def __init__(self): # Creates logger self.__logger = logging.getLogger("ChunkBucket") # Creates bucket se...
20.171053
90
0.673842
ce18ded9ecf6d34b2788d05e01857f6ac97a640a
486
py
Python
fizzbuzz/test_fizzbuzz.py
tijeff/py-fizzbuzz
1a42704fcdc190fd423291d8c76f7dcce9c5f884
[ "Apache-2.0" ]
null
null
null
fizzbuzz/test_fizzbuzz.py
tijeff/py-fizzbuzz
1a42704fcdc190fd423291d8c76f7dcce9c5f884
[ "Apache-2.0" ]
null
null
null
fizzbuzz/test_fizzbuzz.py
tijeff/py-fizzbuzz
1a42704fcdc190fd423291d8c76f7dcce9c5f884
[ "Apache-2.0" ]
null
null
null
from unittest import TestCase from fizzbuzz import FizzBuzz class TestFizzBuzz(TestCase): def setUp(self): self.fizzbuzz = FizzBuzz def test_first(self): self.assertEqual("1", self.fizzbuzz.say(1)) def test_fizz_3(self): self.assertEqual("Fizz", self.fizzbuzz.say(3)) def tes...
24.3
59
0.676955
ce701b84e5f770080040ddb421b2b08b9e438ae0
161
py
Python
pages/themes/beginners/logicalExpressionsAndConditionalStatements/labs/for_loop.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
pages/themes/beginners/logicalExpressionsAndConditionalStatements/labs/for_loop.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
pages/themes/beginners/logicalExpressionsAndConditionalStatements/labs/for_loop.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
numbers = [1, 2, 3, 4, 5, 2, 4] sum = 0 for i in numbers: if i% 2 == 0: sum += i print("sum of even numbers in {} is {}".format(numbers, sum))
14.636364
61
0.503106
0b1f7ed9d9586b42354664be15bbc4b6b25de31a
548
py
Python
educa/courses/migrations/0005_auto_20171129_0120.py
alvarocneto/educa_packt
723a0e975ef5a816b6847054d558dcbb5afc3d11
[ "MIT" ]
null
null
null
educa/courses/migrations/0005_auto_20171129_0120.py
alvarocneto/educa_packt
723a0e975ef5a816b6847054d558dcbb5afc3d11
[ "MIT" ]
null
null
null
educa/courses/migrations/0005_auto_20171129_0120.py
alvarocneto/educa_packt
723a0e975ef5a816b6847054d558dcbb5afc3d11
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-29 01:20 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0004_course_students'), ] operations = ...
24.909091
115
0.658759
5024572253118a334a2d377a45b231248f07e168
5,248
py
Python
pyind/trush.py
chankane/pyind
742bc671d3552d778024662867b64e32ae9bca9d
[ "MIT" ]
null
null
null
pyind/trush.py
chankane/pyind
742bc671d3552d778024662867b64e32ae9bca9d
[ "MIT" ]
null
null
null
pyind/trush.py
chankane/pyind
742bc671d3552d778024662867b64e32ae9bca9d
[ "MIT" ]
null
null
null
def roulette(pop, sel_rate, eval_func): ftns = _calc_ftns(pop, eval_func) sel_num = _calc_sel_num(pop, sel_rate) r = np.random.rand(sel_num) * ftns.sum() return pop[(ftns.cumsum()[:, np.newaxis] < r).sum(axis=0)] def swap_idx(pop, mut_pb): #r = np.random.ranf(pop.shape) r = np.array([ ...
21.596708
88
0.511242
502e3f4efc19515690b8bc5e2cf83cd5d1fcf1ed
2,923
py
Python
Tests/test_simulations/test_XorBinarySimulation.py
savagewil/SavageML
d5aa9a5305b5de088e3bf32778252c877faec41d
[ "MIT" ]
null
null
null
Tests/test_simulations/test_XorBinarySimulation.py
savagewil/SavageML
d5aa9a5305b5de088e3bf32778252c877faec41d
[ "MIT" ]
null
null
null
Tests/test_simulations/test_XorBinarySimulation.py
savagewil/SavageML
d5aa9a5305b5de088e3bf32778252c877faec41d
[ "MIT" ]
null
null
null
import numpy as np from savageml.simulations import SimulationState from savageml.simulations import BinaryXorSimulation def test_initial_state_initialized(): simulation = BinaryXorSimulation() assert simulation.get_state() == SimulationState.INITIALIZED def test_state_after_run_completed(): simulation...
30.447917
110
0.711598
4a0652fa37fb240ac38227f0544715072c48cd9c
2,316
py
Python
SQL_python/DataBasePython/createTab.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
SQL_python/DataBasePython/createTab.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
SQL_python/DataBasePython/createTab.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
import psycopg2 #from config import config def create_tables(): commands = ( """ CREATE TABLE vendeur ( vendeur_id SERIAL PRIMARY KEY, vendeur_name VARCHAR(255) NOT NULL ) """, """ CREATE TABLE parts ( part_id SERIAL PRIMARY KEY...
24.378947
103
0.501295
4a244403a5d8e917f59000c35cf32c0f8b15ebb8
2,187
py
Python
src/classifier/classifier_training/classifier_utils.py
krangelie/bias-in-german-nlg
9fbaf50fde7d41d64692ae90c41beae61bc78d44
[ "MIT" ]
14
2021-08-24T12:36:37.000Z
2022-03-18T12:14:36.000Z
src/classifier/classifier_training/classifier_utils.py
krangelie/bias-in-german-nlg
9fbaf50fde7d41d64692ae90c41beae61bc78d44
[ "MIT" ]
null
null
null
src/classifier/classifier_training/classifier_utils.py
krangelie/bias-in-german-nlg
9fbaf50fde7d41d64692ae90c41beae61bc78d44
[ "MIT" ]
1
2021-10-21T20:22:55.000Z
2021-10-21T20:22:55.000Z
import torch import numpy as np import xgboost as xgb from sklearn.ensemble import RandomForestClassifier from src.classifier.lstm.lstm_classifier import RegardLSTM from src.classifier.sent_transformer.sbert_classifier import RegardBERT def get_classifier(model_params, model_type, n_embed, weight_vector=None, classe...
34.714286
88
0.652492
8c8b9d85c4bac8d12bf807e0df0bc6f5acd95ee9
1,442
py
Python
src/onegov/ballot/models/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/ballot/models/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/ballot/models/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" OneGov Ballot models the aggregated results of Swiss ballots and elections. It takes hints from the eCH-0110 & eCH-0155 Standards. See: `eCH-0155: Datenstandard politische Rechte \ <http://www.ech.ch/vechweb/page?p=dossier&documentNumber=eCH-0155>`_ """ from onegov.ballot.models.election import Candidate from on...
32.044444
79
0.784327
509f5c8e735ca8575422f41a198272dc6354eaf9
169
py
Python
python/python_backup/Python_Progs/PYTHON_LEGACY_PROJECTS/vowel_count.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/Python_Progs/PYTHON_LEGACY_PROJECTS/vowel_count.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/Python_Progs/PYTHON_LEGACY_PROJECTS/vowel_count.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
vowels='aeiou' ip_str="Hello,How are u doing?" ip_str=ip_str.casefold() count={}.fromkeys(vowels,0) for char in ip_str: if char in count: count[char]+=1 print(count)
18.777778
31
0.721893
e8bff75489f5cab2cac32f163d791c00554ed4ae
1,257
py
Python
reader.py
oguzdemir/MovieFetcher
53fae62bdb5abcfb4ad9bf704c6d3aa0478abcc7
[ "MIT" ]
null
null
null
reader.py
oguzdemir/MovieFetcher
53fae62bdb5abcfb4ad9bf704c6d3aa0478abcc7
[ "MIT" ]
null
null
null
reader.py
oguzdemir/MovieFetcher
53fae62bdb5abcfb4ad9bf704c6d3aa0478abcc7
[ "MIT" ]
null
null
null
import os if __name__ == "__main__": path = "Data" if path != "": if not os.path.exists(path): os.makedirs(path) os.chdir(path) list = [] for subdir, dirs, files in os.walk(os.path.abspath(path)): for dir in dirs: print dir movie_map =...
28.568182
78
0.451074
ad59d87e551e02f1b9506d15a095d61bdf95e92f
389
py
Python
python/decorator/classes_as_decorators.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/decorator/classes_as_decorators.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/decorator/classes_as_decorators.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import functools class CountCalls: def __init__(self, func): self.func = func self.num_calls = 0 def __call__(self, *args, **kwargs): self.num_calls += 1 print(f'Call {self.num_calls} of {self.func.__name__!r}') return self.func(*args, **kwargs) @CountCalls def say()...
15.56
65
0.604113
d173796022c68e934d983f6606535e1fb987e475
855
py
Python
Agent5/No simulation forward kin/trainer_Agent5.py
schigeru/Bachelorarbeit_Code
261b2552221f768e7022abc60a4e5a7d2fedbbae
[ "MIT" ]
null
null
null
Agent5/No simulation forward kin/trainer_Agent5.py
schigeru/Bachelorarbeit_Code
261b2552221f768e7022abc60a4e5a7d2fedbbae
[ "MIT" ]
null
null
null
Agent5/No simulation forward kin/trainer_Agent5.py
schigeru/Bachelorarbeit_Code
261b2552221f768e7022abc60a4e5a7d2fedbbae
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import gym from stable_baselines.common.policies import MlpPolicy from stable_baselines.common.vec_env import DummyVecEnv from stable_baselines.common.vec_env import SubprocVecEnv from stable_baselines import PPO2 from forward_kin_Agent4 import PandaRobotGymEnv import numpy as np policy_name = ...
30.535714
115
0.762573
ade9f4e531feb2b95b21b07f6444367e752a2106
97
py
Python
selfservice/apps.py
KSIUJ/erc-backend
a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3
[ "MIT" ]
null
null
null
selfservice/apps.py
KSIUJ/erc-backend
a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3
[ "MIT" ]
5
2020-10-10T00:21:37.000Z
2021-09-22T18:01:46.000Z
selfservice/apps.py
KSIUJ/erc-backend
a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SelfserviceConfig(AppConfig): name = 'selfservice'
16.166667
35
0.773196
cbaf4eaf995342baaf4e25ff18bed65a9367c497
91
py
Python
djangoForm/treasury/apps.py
lanuxos/djangoForm
4a0f02eaf27735c7eaaa4c282426cc911e2a399a
[ "MIT" ]
null
null
null
djangoForm/treasury/apps.py
lanuxos/djangoForm
4a0f02eaf27735c7eaaa4c282426cc911e2a399a
[ "MIT" ]
null
null
null
djangoForm/treasury/apps.py
lanuxos/djangoForm
4a0f02eaf27735c7eaaa4c282426cc911e2a399a
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TreasuryConfig(AppConfig): name = 'treasury'
15.166667
33
0.758242
3821e27b03ceca1c3bf03022287f04d6677d012b
697
py
Python
source/pkgsrc/devel/py-requests/patches/patch-requests_____init____.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/py-requests/patches/patch-requests_____init____.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/py-requests/patches/patch-requests_____init____.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-requests_____init____.py,v 1.8 2020/12/18 08:22:39 adam Exp $ * Add workaround for segfault of security/py-certbot on NetBSD/amd64 7.0.2 and 7.99.53. It seems that the real root cause is in security/py-OpenSSL or OpenSSL. However I do not find how to fix it. This is introduced in https://github.c...
36.684211
76
0.713056
3874baaa82668daa0d60d69935d186164c7ce80e
9,434
py
Python
algos/global_shift.py
weberja/praktikum_graphen
da3ecefdf1327078697e3787cfe19414a9ac13c4
[ "Apache-2.0" ]
1
2021-07-22T10:28:40.000Z
2021-07-22T10:28:40.000Z
algos/global_shift.py
weberja/praktikum_graphen
da3ecefdf1327078697e3787cfe19414a9ac13c4
[ "Apache-2.0" ]
null
null
null
algos/global_shift.py
weberja/praktikum_graphen
da3ecefdf1327078697e3787cfe19414a9ac13c4
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 Jan Westerhoff # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
31.238411
111
0.566038
3880b6bea4886880be4c58f17d770a234abab22a
319
py
Python
files/validators.py
m-atisa/Standard-Answer-App
28ad940925f794b1ca0cfd66f850f780aa43b4f8
[ "Apache-2.0" ]
null
null
null
files/validators.py
m-atisa/Standard-Answer-App
28ad940925f794b1ca0cfd66f850f780aa43b4f8
[ "Apache-2.0" ]
null
null
null
files/validators.py
m-atisa/Standard-Answer-App
28ad940925f794b1ca0cfd66f850f780aa43b4f8
[ "Apache-2.0" ]
null
null
null
from django.core.exceptions import ValidationError def validate_extension(value): value= str(value) if value.endswith(".csv") != True and value.endswith(".xls") != True and value.endswith(".xlsx") != True: raise ValidationError("Only csv, xls, and xlsx are supported") else: return value
39.875
110
0.680251
38c5cb767b71b1910dce7ac6dcee09cca58a3506
344
py
Python
2164-sort-even-and-odd-indices-independently/2164-sort-even-and-odd-indices-independently.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
2164-sort-even-and-odd-indices-independently/2164-sort-even-and-odd-indices-independently.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
2164-sort-even-and-odd-indices-independently/2164-sort-even-and-odd-indices-independently.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def sortEvenOdd(self, nums: List[int]) -> List[int]: odd = sorted([num for i, num in enumerate(nums) if i%2==1], reverse=True) even = sorted([num for i, num in enumerate(nums) if i%2==0], reverse=False) output = [None]*len(nums) output[::2]=even output[1::2]=o...
43
83
0.587209
2a6b93beac0a7c6f635e673696c233c146dade80
2,136
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/heads/roi_extractor.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/heads/roi_extractor.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/heads/roi_extractor.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-24T16:27:01.000Z
2022-01-24T16:27:01.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
38.142857
74
0.54073
2ac5ee7de150f79d803bc3feb38b4655eb95b12d
707
py
Python
day09/blind_auction.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
day09/blind_auction.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
day09/blind_auction.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
from blind_auction_fnc import clear_screen from blind_auction_art import logo #HINT: You can call clear() to clear the output in the console. print(logo) bids = {} bidding_finished = False while bidding_finished: name = input("What is your name?\n") price = input("How many do you want to bid? $") bids[...
22.806452
63
0.673267
2de5ee5db023f3498c77aad23b702ecb8d9f60ef
4,176
py
Python
Practice-2019-04-20/oracle.py
serge-sotnyk/nlp-practice
e38400590a3fcf140a73d6871a778b3c2115a2fe
[ "MIT" ]
3
2019-11-25T09:56:48.000Z
2021-01-18T13:18:17.000Z
Practice-2019-04-20/oracle.py
serge-sotnyk/nlp-practice
e38400590a3fcf140a73d6871a778b3c2115a2fe
[ "MIT" ]
null
null
null
Practice-2019-04-20/oracle.py
serge-sotnyk/nlp-practice
e38400590a3fcf140a73d6871a778b3c2115a2fe
[ "MIT" ]
2
2020-05-17T17:22:14.000Z
2020-09-23T08:31:46.000Z
from collections import OrderedDict from enum import Enum from itertools import zip_longest from typing import List from conllu import TokenList from conlu_reader import read_trees class Actions(Enum): SHIFT = "SHIFT" REDUCE = "REDUCE" RIGHT = "RIGHT" LEFT = "LEFT" class Oracle: ROOT = Ordered...
35.092437
97
0.521552
35d6968da2177a2fc088c946ef4f0914f67e95a0
2,103
py
Python
publ/links.py
PlaidWeb/Publ
67efc5e32bf25dbac72a83d1167de038b79db5a7
[ "MIT" ]
27
2018-11-30T21:32:26.000Z
2022-03-20T19:46:25.000Z
publ/links.py
PlaidWeb/Publ
67efc5e32bf25dbac72a83d1167de038b79db5a7
[ "MIT" ]
249
2018-09-30T07:04:37.000Z
2022-03-29T04:31:00.000Z
publ/links.py
fluffy-critter/Publ
868c5a17c605707dde4d1a95d79405301bd12f05
[ "MIT" ]
4
2019-03-01T06:46:13.000Z
2019-06-30T17:45:46.000Z
# links.py """ Functions for manipulating outgoing HTML links """ import os import re import typing from urllib.parse import urljoin from flask import request from . import entry # pylint:disable=cyclic-import from . import image, model, utils from .config import config def resolve(path: str, search_path: typing....
28.418919
99
0.65145
577b656c229f72f9a7d26212f2d362dd2cf8c4be
2,363
py
Python
research/nlp/gpt2/convert_tf_ckpt/read_weight_tf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/nlp/gpt2/convert_tf_ckpt/read_weight_tf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/nlp/gpt2/convert_tf_ckpt/read_weight_tf.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...
33.757143
86
0.665256
57d310befc003c114e8559f1bab4ab5e5e68dca8
3,767
py
Python
official/cv/yolov5/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/yolov5/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/yolov5/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...
42.806818
113
0.696576
57eaecf837603c3f68c2c815cbb87917e9a96d00
334
py
Python
exercises/es/test_02_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/test_02_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/test_02_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert ( "doc1.similarity(doc2)" or "doc2.similarity(doc1)" in __solution__ ), "¿Estás comparando la similitud entre los dos docs?" assert ( 0 <= float(similarity) <= 1 ), "El valor de la similitud debe ser de punto flotante. ¿Lo calculaste correctamente?" __msg__.good("¡...
37.111111
91
0.646707
352329d455b72ef611641e837a1ce200cedbce65
15,099
py
Python
Math-Ma-MSTAT/maketexable.py
oakoneric/mathTUD
350d53b18ea2dff9ab2e75c6e21489b20e8a4f39
[ "MIT" ]
4
2020-01-18T14:35:03.000Z
2021-11-30T00:19:53.000Z
Math-Ma-MSTAT/maketexable.py
oakoneric/mathTUD
350d53b18ea2dff9ab2e75c6e21489b20e8a4f39
[ "MIT" ]
1
2020-03-19T12:09:05.000Z
2020-03-19T12:09:05.000Z
Math-Ma-MSTAT/maketexable.py
oakoneric/mathTUD
350d53b18ea2dff9ab2e75c6e21489b20e8a4f39
[ "MIT" ]
3
2020-02-18T20:03:25.000Z
2021-11-30T00:20:26.000Z
#!/usr/bin/python3 import sys import heapq ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ*" # TODO: automatic abbreviation handling # TODO: math mode detection. E.g. for warning for \\ outside of mathmode # TODO: in warning function externalise and make more general option of # ignoring. Then usefu...
36.12201
105
0.46566
109a615869fd19c22f50768f1dc432559e6cbcb0
4,177
py
Python
weibo.py
chaodada/weibo_login
de17ff5a2f98611aa50d80cc50f7fa1aeb421c50
[ "MIT" ]
2
2020-05-14T02:42:20.000Z
2020-06-16T00:10:05.000Z
weibo.py
chaodada/weibo_login
de17ff5a2f98611aa50d80cc50f7fa1aeb421c50
[ "MIT" ]
null
null
null
weibo.py
chaodada/weibo_login
de17ff5a2f98611aa50d80cc50f7fa1aeb421c50
[ "MIT" ]
null
null
null
import base64 import re from binascii import b2a_hex from requests_toolbelt.utils import dump import requests import time import rsa class LoginWeibo(): def __init__(self,username,password): self.username=username self.password=password #session设置 self.session=requests.session() ...
38.675926
158
0.612401
f4f15b8e319d031ca6aa0fd9ed7e6dfa5532c6c3
671
py
Python
components/little_ui/example/lvgl_pytest.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
components/little_ui/example/lvgl_pytest.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
components/little_ui/example/lvgl_pytest.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
#lvgl python test case import lvgl as lv lv.init() import display display.init() draw_buf = lv.disp_draw_buf_t() buf1_1 = bytearray(51200) buf1_2 = bytearray(51200) draw_buf.init(buf1_1, buf1_2, 25600) disp_drv = lv.disp_drv_t() disp_drv.init() disp_drv.draw_buf = draw_buf disp_drv.flush_cb = display.flush disp_drv.ho...
23.137931
49
0.766021
528df69cd63a06dac71506fc6a1062d552428f42
3,613
py
Python
research/cv/glore_res200/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/glore_res200/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/glore_res200/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
40.595506
114
0.701633
0d7812bea19b31e0e9930222daad0d8922c25687
1,536
py
Python
yolov5-coreml-tflite-converter/inference-python/test_tflite.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/inference-python/test_tflite.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/inference-python/test_tflite.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
import argparse import logging from pathlib import Path from constants import RED, END_COLOR, DEFAULT_MODEL_OUTPUT_DIR from test_model import ModelTest def test_tflite(reference_model, model_dir, img_dir, verbose): logging.basicConfig(format='%(asctime)s %(message)s', datefmt="%Y-%m-%d %H:%M:%S", level=logging.I...
39.384615
117
0.655599
638ee1b45211a34d8c58b4c66700969d3538e06a
92
py
Python
2015/04/cancer-exercise-rate/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2015/04/cancer-exercise-rate/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2015/04/cancer-exercise-rate/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python COPY_GOOGLE_DOC_KEY = '16t3L-9UF_ve6fkY2cPj7YInjHmlBa487jnslXZc9fVc'
23
68
0.836957
63abbe0045a34c4b49cc4e17ebe169c04b283d57
1,861
py
Python
TestBot/test_cogs/poketcgFunctions/packs.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
TestBot/test_cogs/poketcgFunctions/packs.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
TestBot/test_cogs/poketcgFunctions/packs.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
from random import choice, choices from .sets import Set, get_set from .card import Card, get_cards_with_query from .. import log rarity_mapping = { 'Rare': 75, 'Rare ACE': 10, 'Rare BREAK': 10, 'Rare Holo': 25, 'Rare Holo EX': 12, 'Rare Holo GX': 12, 'Rare Holo LV.X': 12, 'Rare Holo Star': 8, 'Rare Holo V': ...
27.367647
78
0.677593
98920cc0a197e89a14c1a4b3e859cfffaac680f3
83
py
Python
doku/apps.py
xJasonxy/einsatzdoku
8af84446f99475519adaf803619f2c57174c517b
[ "MIT" ]
1
2020-07-09T16:53:45.000Z
2020-07-09T16:53:45.000Z
doku/apps.py
xJasonxy/Einsatzdoku
8af84446f99475519adaf803619f2c57174c517b
[ "MIT" ]
null
null
null
doku/apps.py
xJasonxy/Einsatzdoku
8af84446f99475519adaf803619f2c57174c517b
[ "MIT" ]
null
null
null
from django.apps import AppConfig class DokuConfig(AppConfig): name = 'doku'
13.833333
33
0.73494
f6953de79bec4083e188185b14bd143ca1056628
660
py
Python
Python/M01_ProgrammingBasics/L03_ConditionalStatementsAdvanced/Lab/Solutions/P13_SkiTrip.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L03_ConditionalStatementsAdvanced/Lab/Solutions/P13_SkiTrip.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L03_ConditionalStatementsAdvanced/Lab/Solutions/P13_SkiTrip.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
1
2022-02-23T13:03:14.000Z
2022-02-23T13:03:14.000Z
days = int(input()) room = input() grade = input() nights = days - 1 price = 0 if room == 'room for one person': price = nights * 18 elif room == 'apartment': if nights < 10: price = (nights * 25) * 0.7 elif 10 <= nights < 15: price = (nights * 25) * 0.65 else: price = (nights ...
20
36
0.521212
f604dba2caf981a78686d5a01f5f26b35a20df6a
6,932
py
Python
official_examples/Using_Spark_MLlib_to_Create_a_Precise_Recommendation_Application/code/trainmodelsp.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,045
2019-05-09T02:50:43.000Z
2022-03-31T06:22:11.000Z
official_examples/Using_Spark_MLlib_to_Create_a_Precise_Recommendation_Application/code/trainmodelsp.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,468
2019-05-16T00:48:18.000Z
2022-03-08T04:12:44.000Z
official_examples/Using_Spark_MLlib_to_Create_a_Precise_Recommendation_Application/code/trainmodelsp.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,077
2019-05-09T02:50:53.000Z
2022-03-27T11:05:32.000Z
# coding:utf-8 import collections import json import os from collections import OrderedDict import pyspark from pyspark.ml.evaluation import RegressionEvaluator from pyspark.mllib.recommendation import ALS, Rating from pyspark.sql.functions import expr import moxing as mox obs_path = os.getenv('TRAIN_URL') if obs_p...
37.879781
694
0.679602
f620abcecdef84b65ec748ebb7f32c469d48cf46
283
py
Python
webapp/dash_tutorial/markdown.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
webapp/dash_tutorial/markdown.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
webapp/dash_tutorial/markdown.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html app = dash.Dash() markdown_text = ''' ### Dash and Markdown A lot of text ''' app.layout = html.Div([ dcc.Markdown(children=markdown_text) ]) if __name__ == '__main__': app.run_server()
14.15
40
0.710247
212908a1d46eebd51b2b3790023d08f973db911e
1,110
py
Python
crypto/rsa-goes-skrrrahh/release/rsa-goes-skrrrahh.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
6
2021-02-18T15:07:55.000Z
2022-02-04T01:38:10.000Z
crypto/rsa-goes-skrrrahh/rsa-goes-skrrrahh.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
crypto/rsa-goes-skrrrahh/rsa-goes-skrrrahh.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
from gmpy2 import * import os, struct, time def egcd(a, b): if a == 0: return (b, 0, 1) g, y, x = egcd(b%a,a) return (g, x - (b//a) * y, y) def modinv(a, m): g, x, y = egcd(a, m) if g != 1: raise Exception("No modular inverse") return x%m def generateN(randomST): k1 = mpz_...
21.346154
57
0.547748
b49644f6edd19f62f907cf7324312242489802ef
13,123
py
Python
webserver/osm_service.py
tarent/osm_service
462f3d74d3ed16d307b65da6f24dcea5a982aacf
[ "Apache-2.0" ]
null
null
null
webserver/osm_service.py
tarent/osm_service
462f3d74d3ed16d307b65da6f24dcea5a982aacf
[ "Apache-2.0" ]
null
null
null
webserver/osm_service.py
tarent/osm_service
462f3d74d3ed16d307b65da6f24dcea5a982aacf
[ "Apache-2.0" ]
null
null
null
import json import psycopg2 class OsmService: def __init__(self, user, password, host, port, database): self.user = user self.password = password self.host = host self.port = port self.database = database self.__connectToDatabase() def __connectToDatabase(self)...
35.371968
164
0.5325
b4b00d702a4b6f48e29ecef196683e905a0eaa55
427
py
Python
exercises/es/test_01_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/test_01_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/test_01_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): import spacy.tokens import spacy.lang.en assert isinstance( nlp, spacy.lang.en.English ), "El objeto nlp debería ser un instance de la clase de inglés." assert isinstance( doc, spacy.tokens.Doc ), "¿Procesaste el texto con el objeto nlp para crear un doc?" assert...
30.5
84
0.665105
b4c035bc53f4761444f84637c83db5d37730b405
3,663
py
Python
schloesser/ex06_07/GraphWrapper.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
11
2017-04-21T11:39:55.000Z
2022-02-11T20:25:18.000Z
schloesser/ex06_07/GraphWrapper.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
69
2017-04-26T09:30:38.000Z
2017-08-01T11:31:21.000Z
schloesser/ex06_07/GraphWrapper.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
53
2017-04-20T16:16:11.000Z
2017-07-19T12:53:01.000Z
#!/usr/bin/env python ''' Wrapper class for graph-tool to compute longest shortest path to a given node. ''' from graph_tool.all import load_graph_from_csv from misc import pop_next_destination class GraphWrapper: ''' A class containing methods to read in a graph and calculate the longest shortest path to a p...
33
119
0.564838
2e9540e1da011e111d744c0d03c6d049b21e4f60
2,294
py
Python
src/aemter/views.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
1
2021-12-20T20:15:26.000Z
2021-12-20T20:15:26.000Z
src/aemter/views.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
null
null
null
src/aemter/views.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
null
null
null
from datetime import date from django.shortcuts import render, get_object_or_404, redirect from django.db.models import Q from django.core.paginator import Paginator from django.contrib import messages from .models import Organisationseinheit, Unterbereich, Funktion from mitglieder.models import MitgliedAmt # Create y...
45.88
236
0.747602
2ead1c57bd93d4b9b57eaaddb528c3da41125952
900
py
Python
IF11C/ITT/Codes/walkingLight.py
Semoxeaa/sjsaueressig.github.io
55f81360e1285b46bb67b89d16060479be297489
[ "MIT" ]
1
2021-12-13T08:07:14.000Z
2021-12-13T08:07:14.000Z
IF11C/ITT/Codes/walkingLight.py
Semoxeaa/sjsaueressig.github.io
55f81360e1285b46bb67b89d16060479be297489
[ "MIT" ]
null
null
null
IF11C/ITT/Codes/walkingLight.py
Semoxeaa/sjsaueressig.github.io
55f81360e1285b46bb67b89d16060479be297489
[ "MIT" ]
null
null
null
# import modules import time import RPi.GPIO as GPIO # setup pins GPIO.setmode(GPIO.BOARD) # GPIO.setwarnings(False) Out = [16,12,7,8,25,24,23,18] In = [5, 6, 13, 19] directionRight = True duration = 0.2 current = 0 for x in In: GPIO.setup(x, GPIO.IN) for y in Out: GPIO.setup(y, GPIO.OUT) def runLeft(): ...
20
51
0.602222
6cf7d9fdf67a892c0eb54961b10ddc9fd4aa44ea
4,025
py
Python
test/test_npu/test_network_ops/test_square.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_network_ops/test_square.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_network_ops/test_square.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...
36.590909
76
0.625342
4c8269ebf2679a5fd8e7fcd560ff6e65acf97010
7,150
py
Python
registration/api.py
shifenis/Insomniac
7c9d572b83c29049bc3075073be5549fe821a739
[ "MIT" ]
533
2020-06-01T10:40:11.000Z
2022-03-29T17:05:50.000Z
registration/api.py
shifenis/Insomniac
7c9d572b83c29049bc3075073be5549fe821a739
[ "MIT" ]
399
2020-06-01T22:01:55.000Z
2022-03-29T20:39:29.000Z
registration/api.py
shifenis/Insomniac
7c9d572b83c29049bc3075073be5549fe821a739
[ "MIT" ]
166
2020-06-01T21:51:52.000Z
2022-03-12T14:14:44.000Z
# This file provides the way of getting a phone number and an SMS confirmation code in "registration" process. # The only two methods that should be exposed from this file are "get_phone_number" and "get_confirmation_code". # You can find them at the end of this file. Choose one of ready-to-use implementations or creat...
43.333333
128
0.687133
e29175b560c9134541337481afccd848b92856db
959
py
Python
source/pkgsrc/misc/calibre/patches/patch-setup_build.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/misc/calibre/patches/patch-setup_build.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/misc/calibre/patches/patch-setup_build.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-setup_build.py,v 1.3 2018/02/01 16:05:56 wiz Exp $ Fix linking against native X. --- setup/build.py.orig 2016-09-29 10:28:31.000000000 +0000 +++ setup/build.py @@ -368,6 +368,7 @@ class Build(Command): INCLUDEPATH += {freetype} DESTDIR = {destdir} CONFIG -= create...
41.695652
130
0.584984
e2b3ade66ab184a5ca9e4e422fe93685a225fb32
2,002
py
Python
pockint-master/test.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
237
2019-04-25T07:15:07.000Z
2022-02-16T23:23:38.000Z
pockint-master/test.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
35
2019-05-29T11:35:06.000Z
2021-06-02T00:41:36.000Z
pockint-master/test.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
52
2019-05-30T15:18:53.000Z
2021-12-21T11:07:28.000Z
import unittest from utils import InputValidator class TestValidator(unittest.TestCase): def setUp(self): self.validator = InputValidator() def test_ip_validation(self): output = self.validator.validate("192.168.1.1") self.assertTrue(output[0][0]) self.assertEqual(output[0][1],...
37.074074
108
0.671329
e2b914458715a56e973763cbdd2346940f7a87fb
494
py
Python
mumath/util.py
fourpoints/mumath
f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4
[ "MIT" ]
null
null
null
mumath/util.py
fourpoints/mumath
f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4
[ "MIT" ]
null
null
null
mumath/util.py
fourpoints/mumath
f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4
[ "MIT" ]
null
null
null
from collections.abc import Iterable from itertools import chain def listify(var): if var is None: return () elif isinstance(var, str): return tuple(var.split(",")) elif isinstance(var, Iterable): return tuple(var) else: raise TypeError def peek(it, default=None): ...
19
36
0.59919
39367edfb03f363cddaf7212f04fb55c65fe1bfe
1,098
py
Python
source/pkgsrc/devel/py-pyobjc-core/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/py-pyobjc-core/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/py-pyobjc-core/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-setup.py,v 1.2 2020/05/23 07:03:41 adam Exp $ Do not add debug symbols. Do not override compiler optimiztion flags. Avoid a hack. --- setup.py.orig 2020-03-22 17:36:26.000000000 +0000 +++ setup.py @@ -56,7 +56,6 @@ def get_sdk_level(sdk): # CFLAGS for the objc._objc extension: CFLAGS = [ - "-g",...
31.371429
68
0.632058
1a9b2de093d26710433ac3586ccb2a954ba023f8
1,216
py
Python
src/test/tests/session/textannot.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/session/textannot.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/session/textannot.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: textanot.py # # Tests: mesh - 2D curvilinear, single domain # plots - Pseudocolor # # Notes: This test case uses a session file to set up a plot and create # ...
32
80
0.574013