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
79001ee9162781fa713e5a90e03281765088a3a3
1,976
py
Python
backend/apps/iamstudent/models_persistent_filter.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
2
2020-03-28T13:56:39.000Z
2020-03-29T10:16:12.000Z
backend/apps/iamstudent/models_persistent_filter.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
76
2020-03-27T21:53:04.000Z
2020-03-30T20:27:43.000Z
backend/apps/iamstudent/models_persistent_filter.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
null
null
null
from datetime import datetime import uuid from django.db import models import django.forms as forms import django_filters.fields as filter_fields from apps.ineedstudent.models import Hospital from .filters import StudentJobRequirementsFilter from .models import * # noqa: F401, F403 from .models import COUNTRY_CODE_...
34.666667
93
0.730263
e3e356c48fbf3b13f2f7d71b38f42fc35a7df8e3
599
py
Python
PYTHON/Collections/collections_OrderedDict.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Collections/collections_OrderedDict.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Collections/collections_OrderedDict.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from functools import reduce from collections import OrderedDict if __name__ == '__main__': N = int(input()) item_and_price = OrderedDict() for _ in range(N): temp = input().split() item_name = reduce(lambda x, y: str(x) + ' ' + str(y), temp) i...
29.95
74
0.601002
5444ab8e411c3d5b5488349d9c36fb0547d68060
205
py
Python
Jahr 2/KI/Titanic/main.py
BackInBash/Technikerschule
6e30654417732fae065e36a40789866ccca6aa7e
[ "MIT" ]
2
2021-01-20T16:16:41.000Z
2022-01-12T15:37:53.000Z
Jahr 2/KI/Titanic/main.py
BackInBash/Technikerschule
6e30654417732fae065e36a40789866ccca6aa7e
[ "MIT" ]
2
2020-06-17T21:55:24.000Z
2021-09-08T20:40:41.000Z
Jahr 2/KI/Titanic/main.py
BackInBash/Technikerschule
6e30654417732fae065e36a40789866ccca6aa7e
[ "MIT" ]
1
2020-12-28T13:03:34.000Z
2020-12-28T13:03:34.000Z
import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv('Titanic_891.csv') for x in df.index: if df.loc[x, "Survived"] == 0: df.drop(x, inplace = True) df.plot(x = 'Age') plt.show()
15.769231
35
0.653659
b725262ffa5edeaddf98718032339f646e625e14
641
py
Python
source/pkgsrc/graphics/py-imaging/patches/patch-PIL_IcnsImagePlugin.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/graphics/py-imaging/patches/patch-PIL_IcnsImagePlugin.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/graphics/py-imaging/patches/patch-PIL_IcnsImagePlugin.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-PIL_IcnsImagePlugin.py,v 1.1 2014/09/07 09:37:46 spz Exp $ Icns DOS fix -- CVE-2014-3589 from https://github.com/python-pillow/Pillow/commit/205e056f8f9b06ed7b925cf8aa0874bc4aaf8a7d --- PIL/IcnsImagePlugin.py.orig 2009-11-01 00:44:11.000000000 +0000 +++ PIL/IcnsImagePlugin.py @@ -115,6 +115,8 @@ class...
37.705882
92
0.628705
3f79edb5bc7c40e26b081cad842275d6a2527280
12,283
py
Python
tests/parser/test_load_languages_from_csv.py
OrangeUtan/babelbox
3dd01e078aea8aa352ff5606179d5e1e09f4b827
[ "MIT" ]
2
2021-03-18T04:34:23.000Z
2021-03-23T17:35:07.000Z
tests/parser/test_load_languages_from_csv.py
OrangeUtan/babelbox
3dd01e078aea8aa352ff5606179d5e1e09f4b827
[ "MIT" ]
null
null
null
tests/parser/test_load_languages_from_csv.py
OrangeUtan/babelbox
3dd01e078aea8aa352ff5606179d5e1e09f4b827
[ "MIT" ]
null
null
null
import csv import inspect import logging import unittest.mock from pathlib import Path from re import match from typing import Type, cast from unittest.mock import MagicMock, patch import pytest from _pytest.logging import LogCaptureFixture import babelbox def mock_open(*args, **kwargs): m = unittest.mock.mock_...
33.468665
117
0.479525
3fa82f1aa5a616dbe3e98ad3af38a28b79d0982c
278
py
Python
sakf/app/sakf/test.py
spdir/sakf
9a07c5f90765201a42d524dc6d4554f4ccd3c750
[ "Apache-2.0" ]
null
null
null
sakf/app/sakf/test.py
spdir/sakf
9a07c5f90765201a42d524dc6d4554f4ccd3c750
[ "Apache-2.0" ]
null
null
null
sakf/app/sakf/test.py
spdir/sakf
9a07c5f90765201a42d524dc6d4554f4ccd3c750
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from sakf.app.sakf import base class Test1Handler(base.BaseHandlers): def get(self, *args, **kwargs): return self.write('get') def post(self, *args, **kwargs): a = self.get_argument('tp', None) print(a) return self.write('post')
18.533333
38
0.629496
4d5f959c26a9c48e936caec2eb2416dc27a5d582
518
py
Python
V14 Tomographie/foo.py
Ninilini/FP-Bachelor
0ca4d45efb211278793d1667731b09d35cfc94aa
[ "MIT" ]
1
2019-11-27T07:01:08.000Z
2019-11-27T07:01:08.000Z
V14 Tomographie/foo.py
Ninilini/FP-Bachelor
0ca4d45efb211278793d1667731b09d35cfc94aa
[ "MIT" ]
null
null
null
V14 Tomographie/foo.py
Ninilini/FP-Bachelor
0ca4d45efb211278793d1667731b09d35cfc94aa
[ "MIT" ]
1
2022-02-20T09:24:16.000Z
2022-02-20T09:24:16.000Z
# coding: utf-8 import numpy as np import matplotlib.pyplot as plt import pandas as pd from IPython import embed counts = np.genfromtxt('data/Alu_leer/alu_l_2.Spe', skip_header=12, skip_footer=17) leer = counts error_leer = np.sqrt(counts) x = np.li...
25.9
67
0.65444
4d6edfa668d2783b25161209c74a0aaf1c93209f
712
py
Python
tests/onegov/file/test_utils.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/file/test_utils.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/file/test_utils.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.utils import module_path from onegov.file.utils import content_type_from_fileobj, word_count def test_content_type_from_fileobj(): def fixture(name): return module_path('tests.onegov.file', f'fixtures/{name}') def content_type(name): with open(fixture(name), 'rb') as f: ...
28.48
67
0.688202
4d8d4b41f2d016a8f58cc3a79fa671f5cda3a5e6
382
py
Python
algorithms/bit_manipulation/maximising_xor.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
algorithms/bit_manipulation/maximising_xor.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
algorithms/bit_manipulation/maximising_xor.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
#!/usr/bin/python3 def maxXor(l, r): x = l ^ r if x == 0: return 0 ret = 1 print(x) while ret <= x: print(ret) ret <<= 1 return ret - 1 def maxXorBrute(l, r): return max(A ^ B for A in range(l, r + 1) for B in range(l, r + 1)) if __name__ == '__main__': # l = ...
17.363636
71
0.484293
1500a83c1722b95cb058817bfa70f47b0cfb2119
405
py
Python
showcase9/com/aaron/mydict.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
showcase9/com/aaron/mydict.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
2
2021-03-25T22:00:07.000Z
2022-01-20T15:51:48.000Z
showcase9/com/aaron/mydict.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
# -*- codiing:utf-8 -*- """ seft define override dict """ __author__="aaron.qiu" class Dict(dict): def __init__(self,**kw): super().__init__(**kw) def __getattr__(self, key): try: return self[key] except KeyError: raise AttributeError(r"'Dict' object has no att...
21.315789
78
0.575309
12db2b015cbb696ba42193814da02cac44a81c72
1,298
py
Python
LibMS/libapp/urls.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
2
2021-05-31T13:11:50.000Z
2021-06-05T04:37:51.000Z
LibMS/libapp/urls.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
null
null
null
LibMS/libapp/urls.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
null
null
null
from django.urls import path from libapp import views from django.conf.urls import url urlpatterns = [ path('', views.index, name="index"), path('index/', views.index, name="index"), path('login/', views.login, name='login'), path('register/', views.register, name='register'), path('logout/', views...
37.085714
82
0.673344
c401be8376ce4adc77f390d3c61a60c663b19bf6
2,075
py
Python
backend/tests/integration/test_ncku_tainan.py
SeanGau/vaccinate
f3d7388c666ee466da570e8c17bbe1f2caee912f
[ "MIT" ]
39
2021-05-01T03:36:44.000Z
2021-11-16T13:29:21.000Z
backend/tests/integration/test_ncku_tainan.py
SeanGau/vaccinate
f3d7388c666ee466da570e8c17bbe1f2caee912f
[ "MIT" ]
50
2021-04-28T10:57:07.000Z
2021-08-19T05:13:07.000Z
backend/tests/integration/test_ncku_tainan.py
SeanGau/vaccinate
f3d7388c666ee466da570e8c17bbe1f2caee912f
[ "MIT" ]
19
2021-05-02T04:25:02.000Z
2021-07-11T04:34:16.000Z
import unittest import os from Parsers.ncku_tainan import * from hospital_types import AppointmentAvailability, HospitalAvailabilitySchema class TestNckuTainan(unittest.TestCase): def test_both_full(self) -> None: with open("backend/tests/saved_pages/ncku_tainan_full.html") as html_file: expe...
43.229167
87
0.672771
c45124f2d798d88308d1285d963b00f73616b154
1,000
py
Python
lib/download-truezip.py
docfetcher/DocFetcher
42f2accd840edc5059060447ed3536aa4d54b5d3
[ "Apache-2.0" ]
24
2018-07-22T13:02:53.000Z
2022-02-02T16:45:29.000Z
lib/download-truezip.py
docfetcher/DocFetcher
42f2accd840edc5059060447ed3536aa4d54b5d3
[ "Apache-2.0" ]
null
null
null
lib/download-truezip.py
docfetcher/DocFetcher
42f2accd840edc5059060447ed3536aa4d54b5d3
[ "Apache-2.0" ]
5
2018-12-29T10:38:03.000Z
2021-02-06T15:29:03.000Z
#!/usr/bin/python import urllib2, os, os.path as osp ''' Description: This is a helper script for downloading the latest TrueZIP release from http://search.maven.org. The downloaded files are stored under the current directory. ''' version = raw_input("Please enter TrueZIP version number (x.x.x): ") root = "http://s...
25
80
0.682
bee3711fc4f14d254cbdaeb273155d45d7c74cd2
316
py
Python
Practice/Kmp_test.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
22
2018-08-07T06:55:10.000Z
2021-06-12T02:12:19.000Z
Practice/Kmp_test.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
28
2020-03-04T23:47:22.000Z
2022-02-26T18:50:00.000Z
Practice/Kmp_test.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
4
2019-11-09T15:41:26.000Z
2021-10-10T08:56:57.000Z
a = "ABCABD" nx = [0] * (len(a) + 1) i, j = 0, -1 nx[0] = -1 while i < len(a): if j == -1 or a[i] == a[j]: i, j = i + 1, j + 1 nx[i] = j else: j = nx[j] for i in range(0, len(a) + 1): print(i, nx[i]) if nx[i] == -1: continue print(a[0: nx[i]], a[i - nx[i]: i])
16.631579
39
0.370253
8310fac2fcbb054f8b9e817dc3ef7d6b9b29f487
14,642
py
Python
src/predict.py
misogil0116/Biscotti
010ef0f29fbd5d33c9870ce249f1a9824f3471c4
[ "Apache-2.0" ]
10
2018-01-11T01:15:15.000Z
2020-06-22T15:03:31.000Z
src/predict.py
misogil0116/Biscotti
010ef0f29fbd5d33c9870ce249f1a9824f3471c4
[ "Apache-2.0" ]
null
null
null
src/predict.py
misogil0116/Biscotti
010ef0f29fbd5d33c9870ce249f1a9824f3471c4
[ "Apache-2.0" ]
null
null
null
import argparse import numpy as np import pandas as pd import cv2 from keras import backend as K from keras.callbacks import ModelCheckpoint from keras.models import Model from keras.layers import Input from keras.layers import Conv2D, MaxPooling2D, UpSampling2D, LeakyReLU, BatchNormalization, Activation # from keras....
43.064706
124
0.604357
7fee3d7bddb428a5bff586b29ac4bd66233a51a0
1,966
py
Python
AD/trainner_balance.py
junchenfeng/diagnosis_tracing
4e26e2ad0c7abc547f22774b6c9c299999a152c3
[ "MIT" ]
null
null
null
AD/trainner_balance.py
junchenfeng/diagnosis_tracing
4e26e2ad0c7abc547f22774b6c9c299999a152c3
[ "MIT" ]
null
null
null
AD/trainner_balance.py
junchenfeng/diagnosis_tracing
4e26e2ad0c7abc547f22774b6c9c299999a152c3
[ "MIT" ]
1
2020-09-08T13:42:16.000Z
2020-09-08T13:42:16.000Z
# -*- coding: utf-8 -*- from torch import tensor from torch import cuda from torch import optim from torch.nn.utils import clip_grad_value_ from model import Model from dataloader import read_data,DataLoader,DataLoader_balanced from sklearn.model_selection import train_test_split from sklearn.metrics import auc...
33.322034
89
0.607325
3d2f9931a84e19e2b2351f49ac0ab7f5242d082b
330
py
Python
Licence 1/I11/TP3/tp3_5.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I11/TP3/tp3_5.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I11/TP3/tp3_5.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
choice = input("Chiffrement ( E ) ncode ou Dechiffrement ( D ) ecode ? ") key = int(input("Cle de chiffrement ? ")) text = input("Texte ? ") cypher = "" if choice == "D": key *= -1 i = 0 while i < len(text): if text[i] == " ": cypher += " " else: cypher += chr(ord(text[i]) + key) i += 1 print("Chiffre :"...
22
73
0.548485
b81b0de921ac912d759cafa31ef64032fb68eafa
380
py
Python
Algorithms/Implementation/breaking_the_records.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/breaking_the_records.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/breaking_the_records.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 def getRecord(S): h, l = S[0], S[0] h_cnt, l_cnt = 0, 0 for s in S: if s > h: h_cnt += 1 h = s elif s < l: l_cnt += 1 l = s return [h_cnt, l_cnt] n = int(input().strip()) s = list(map(int, input().strip().split(' ')...
20
46
0.455263
3df7063bf75add3619d01fb73d880ce1427b16ee
3,041
gyp
Python
node-caffe/binding.gyp
silklabs/silk
08c273949086350aeddd8e23e92f0f79243f446f
[ "MIT" ]
172
2016-06-07T09:02:34.000Z
2022-03-18T07:43:55.000Z
node-caffe/binding.gyp
silklabs/silk
08c273949086350aeddd8e23e92f0f79243f446f
[ "MIT" ]
24
2016-06-08T08:09:39.000Z
2017-09-08T04:15:51.000Z
node-caffe/binding.gyp
silklabs/silk
08c273949086350aeddd8e23e92f0f79243f446f
[ "MIT" ]
37
2016-06-08T16:56:14.000Z
2021-10-05T09:49:08.000Z
{ 'variables': { 'library_type%': 'loadable_module', }, 'targets': [ { 'target_name': 'caffe', 'type': '<(library_type)', 'sources': [ 'src/caffe.cpp' ], 'variables': { 'has_gpu': '<!(if which nvidia-smi; then echo true; else echo false; fi)', }, '...
36.202381
131
0.445248
b18b34b42f74f4d7cb258cd3dc6e69cebb525afa
720
py
Python
nlp2go/preload.py
voidful/nlp2go
c83cd96a5618ef3f95f6c5174071cba711003761
[ "Apache-2.0" ]
25
2020-02-20T14:25:58.000Z
2022-01-05T03:32:37.000Z
nlp2go/preload.py
voidful/nlp2go
c83cd96a5618ef3f95f6c5174071cba711003761
[ "Apache-2.0" ]
3
2020-10-21T15:03:39.000Z
2020-10-21T15:03:48.000Z
nlp2go/preload.py
voidful/nlp2go
c83cd96a5618ef3f95f6c5174071cba711003761
[ "Apache-2.0" ]
1
2020-09-15T15:22:49.000Z
2020-09-15T15:22:49.000Z
import argparse from collections import defaultdict import json from nlp2go import parse_args from nlp2go.model import Model def main(arg=None): global model_dict model_dict = defaultdict(dict) args, others_arg = parse_args(arg) if args.get('model', None): Model(args.get('model'), args.get(...
24.827586
90
0.629167
499a78c80fd564c192cc9661a372d3010affba7a
569
py
Python
Fortgeschrittenenpraktikum/Protokolle/V21_Optisches_Pumpen/Python/Messdaten.py
smjhnits/Praktikum
92c9df3ee7dfa2417f464036d18ac33b70765fdd
[ "MIT" ]
2
2019-03-07T08:55:36.000Z
2019-04-22T18:13:03.000Z
Fortgeschrittenenpraktikum/Protokolle/V21_Optisches_Pumpen/Python/Messdaten.py
smjhnits/Praktikum
92c9df3ee7dfa2417f464036d18ac33b70765fdd
[ "MIT" ]
null
null
null
Fortgeschrittenenpraktikum/Protokolle/V21_Optisches_Pumpen/Python/Messdaten.py
smjhnits/Praktikum
92c9df3ee7dfa2417f464036d18ac33b70765fdd
[ "MIT" ]
2
2017-10-27T13:26:43.000Z
2018-01-13T09:12:24.000Z
import numpy as np from pint import UnitRegistry u = UnitRegistry() Q_ = u.Quantity frequenz = Q_(np.array([101, 210, 300, 400, 502, 600, 700, 800, 904, 1001]), 'kHz') I_one_seven = Q_(np.array([0, 29, 31, 53, 93, 105, 128]), 'mA') I_eight_ten_1 = Q_(np.array([126, 140, 148]), 'mA') I_eight_ten_2 = Q_(np.array([164,...
29.947368
97
0.59051
621b002e4bf7c94c1b13037e9b207156cdc819fb
1,524
py
Python
src/process_luminocity.py
Haus4/studienarbeit-stau
10921f8850df67c797cf174b42fbc5dcec257251
[ "MIT" ]
2
2018-10-16T08:09:13.000Z
2019-02-18T13:33:11.000Z
src/process_luminocity.py
Haus4/studienarbeit-stau
10921f8850df67c797cf174b42fbc5dcec257251
[ "MIT" ]
7
2019-02-28T18:10:44.000Z
2019-03-04T21:09:03.000Z
src/process_luminocity.py
Haus4/studienarbeit-stau
10921f8850df67c797cf174b42fbc5dcec257251
[ "MIT" ]
1
2020-04-05T08:53:13.000Z
2020-04-05T08:53:13.000Z
import os import cv2 import numpy import image_utils def parseImageWithMask(img, mask, show, name): target = img.copy() image_utils.applyMask(target, mask) target = cv2.cvtColor(target, cv2.COLOR_BGR2GRAY) colorThreshold = 40 notBlack = numpy.sum(target > 0) countAbove = numpy.sum(target >...
26.275862
70
0.602362
65709219998695d50019fa4834772fafd9e36577
1,261
py
Python
src/server/bo/Projecttype.py
muenstermannmarius/ElectionSystem
a6e60d9147423787e869587b808def4771f89cb7
[ "RSA-MD" ]
null
null
null
src/server/bo/Projecttype.py
muenstermannmarius/ElectionSystem
a6e60d9147423787e869587b808def4771f89cb7
[ "RSA-MD" ]
null
null
null
src/server/bo/Projecttype.py
muenstermannmarius/ElectionSystem
a6e60d9147423787e869587b808def4771f89cb7
[ "RSA-MD" ]
null
null
null
from server.bo.NamedBusinessObject import NamedBusinessObject class Projecttype(NamedBusinessObject): """Realization of an examplary Projecttype Class. """ def __init__(self): super().__init__() self._ect = 0 self._sws = 0 def get_ect(self): """Reads out of the ECTs....
28.659091
126
0.603489
b210d3b067646c54dede42bece73016f5c71389e
5,734
py
Python
wz/tsv-editor.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/tsv-editor.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/tsv-editor.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ ui/tsv-editor.py Last updated: 2021-10-08 Gui editor for Tab-Separated-Value files. =+LICENCE================================= Copyright 2021 Michael Towers Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Lice...
33.928994
79
0.586327
b22c4bac5f9f5760b453b81dc8d89e28b40d8757
249
py
Python
test/testProcess.py
WuNull/findmovie
29d3ef6fe2282f48be57780f5e8366de1d3479a6
[ "Apache-2.0" ]
1
2019-11-26T07:03:06.000Z
2019-11-26T07:03:06.000Z
test/testProcess.py
WuNull/findmovie
29d3ef6fe2282f48be57780f5e8366de1d3479a6
[ "Apache-2.0" ]
null
null
null
test/testProcess.py
WuNull/findmovie
29d3ef6fe2282f48be57780f5e8366de1d3479a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from multiprocessing.pool import ThreadPool import time def process(i): print(i) # time.sleep(1) return pool = ThreadPool(processes=20) pool.map(process, (i for i in ['a','b','c','d'])) pool.close()
17.785714
50
0.626506
a28a01ab6c8a39f661aa1ccbf87166a13dd7b89b
5,055
py
Python
recipes/gettext/0.20.1/conanfile.py
SolarFramework/conan-solar
cdb6253556c056baacaf3e5f28b595869adddb88
[ "Apache-2.0" ]
null
null
null
recipes/gettext/0.20.1/conanfile.py
SolarFramework/conan-solar
cdb6253556c056baacaf3e5f28b595869adddb88
[ "Apache-2.0" ]
3
2021-02-15T08:48:16.000Z
2021-02-24T16:35:54.000Z
recipes/gettext/0.20.1/conanfile.py
SolarFramework/conan-solar
cdb6253556c056baacaf3e5f28b595869adddb88
[ "Apache-2.0" ]
null
null
null
from conans import ConanFile, AutoToolsBuildEnvironment, VisualStudioBuildEnvironment, tools import os import shutil import glob class GetTextConan(ConanFile): name = "gettext" description = "An internationalization and localization system for multilingual programs" topics = ("conan", "gettext", "intl", "...
41.097561
134
0.60633
0c073c9a25099d75bc01fc1d580bb376fc5c95f9
326
py
Python
read-after-writeRfid.py
machigattan/Wortschatz
171ba76bebdfd5feaa41e3aa0d07d73988c72c9a
[ "MIT" ]
null
null
null
read-after-writeRfid.py
machigattan/Wortschatz
171ba76bebdfd5feaa41e3aa0d07d73988c72c9a
[ "MIT" ]
null
null
null
read-after-writeRfid.py
machigattan/Wortschatz
171ba76bebdfd5feaa41e3aa0d07d73988c72c9a
[ "MIT" ]
null
null
null
# https://pimylifeup.com/raspberry-pi-rfid-rc522/ simple script from pimylifeup that can read tags import RPi.GPIO as GPIO GPIO.setwarnings(False) from mfrc522 import SimpleMFRC522 reader = SimpleMFRC522() try: id, text = reader.read() print('UID:', id) print('Vocab:', text) finally: GPIO.cleanup(...
19.176471
98
0.699387
a7475063dfc6e6d25668a204e9cd8f662441380a
715
py
Python
python/celery/implement/backie/broker.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/celery/implement/backie/broker.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/celery/implement/backie/broker.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
# backie/broker.py import redis # pip install redis class Broker: """ use redis as our broker This implements a basic FIFO queue using redis. """ def __init__(self): host = 'localhost' port = 6379 password = None self.redis_instance = redis.StrictRedis( ...
27.5
77
0.627972
a76b20c8c6b2153c7571717c10dac7ddd50ff04a
3,659
py
Python
python/en/archive/dropbox/miscellaneous_python_files/temp2.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/miscellaneous_python_files/temp2.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/miscellaneous_python_files/temp2.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
def filter_unknown_vocab_from( self, df_text, df_vocab, max_token_length, verbose=False, debug=False, dummy=False ): ''' Note there're many duplicate reviews AFTER the preprocessing. These duplicates should be removed. df_text['review'].shape (19128,) df_t...
47.519481
121
0.582673
ce39a967000cbea3fb6e8ca29ca1012e8c569c42
10,771
py
Python
indl/model/recurrent.py
SachsLab/indl
531d2e0c2ee765004aedc553af40e258262f86cb
[ "Apache-2.0" ]
1
2021-02-22T01:39:50.000Z
2021-02-22T01:39:50.000Z
indl/model/recurrent.py
SachsLab/indl
531d2e0c2ee765004aedc553af40e258262f86cb
[ "Apache-2.0" ]
null
null
null
indl/model/recurrent.py
SachsLab/indl
531d2e0c2ee765004aedc553af40e258262f86cb
[ "Apache-2.0" ]
null
null
null
__all__ = ['GenerativeRNN'] import tensorflow as tf from tensorflow.python.framework import tensor_shape from tensorflow.python.keras import backend as K from tensorflow.python.keras.utils import generic_utils from tensorflow.python.util import nest from tensorflow.python.keras.layers.recurrent import _standardize_ar...
49.635945
119
0.602915
02017c2b8ba7a9709f2f0d23ab2b7dadf8e5e52f
2,211
py
Python
test/defense/ckks/test_core.py
luoshenseeker/AIJack
4e871a5b3beb4b7c976d38060d6956efcebf880d
[ "MIT" ]
24
2021-11-17T02:16:47.000Z
2022-03-27T01:04:08.000Z
test/defense/ckks/test_core.py
luoshenseeker/AIJack
4e871a5b3beb4b7c976d38060d6956efcebf880d
[ "MIT" ]
9
2021-12-03T06:09:27.000Z
2022-03-29T06:33:53.000Z
test/defense/ckks/test_core.py
luoshenseeker/AIJack
4e871a5b3beb4b7c976d38060d6956efcebf880d
[ "MIT" ]
5
2022-01-12T09:58:04.000Z
2022-03-17T09:29:04.000Z
def test_sigma(): import numpy as np from aijack.defense import CKKSEncoder M = 8 scale = 1 << 20 encoder = CKKSEncoder(M, scale) b = np.array([1, 2, 3, 4]) p = encoder.sigma_inverse(b) b_reconstructed = encoder.sigma(p) np.testing.assert_array_almost_equal(b, b_reconstructed, dec...
24.296703
86
0.587517
e8f304659ee63e631aba9517207afb2644a74599
246
py
Python
rpc-test-server.py
lihuiba/SoftSAN
1b8ab2cae92b7aac34211909b27d4ebe595275d7
[ "Apache-2.0" ]
1
2015-08-02T09:53:18.000Z
2015-08-02T09:53:18.000Z
rpc-test-server.py
lihuiba/SoftSAN
1b8ab2cae92b7aac34211909b27d4ebe595275d7
[ "Apache-2.0" ]
null
null
null
rpc-test-server.py
lihuiba/SoftSAN
1b8ab2cae92b7aac34211909b27d4ebe595275d7
[ "Apache-2.0" ]
2
2018-03-21T04:59:50.000Z
2019-12-03T15:54:17.000Z
import logging, gevent.server import rpc, mds_mock logging.basicConfig(level=logging.DEBUG) server=mds_mock.MDS() service=rpc.RpcService(server) framework=gevent.server.StreamServer(('0.0.0.0', 2345), service.handler) framework.serve_forever()
24.6
72
0.800813
0435fa9560607fe61e77c9c9649386c7c007c770
1,680
py
Python
Dialog/bin/dialog.py
xd23fe39/python-sandbox
91f649a1efcfe895a2e5e9d8322458955d56a445
[ "Apache-2.0" ]
null
null
null
Dialog/bin/dialog.py
xd23fe39/python-sandbox
91f649a1efcfe895a2e5e9d8322458955d56a445
[ "Apache-2.0" ]
2
2019-12-27T00:10:39.000Z
2021-10-03T09:43:20.000Z
Dialog/bin/dialog.py
xd23fe39/python-sandbox
91f649a1efcfe895a2e5e9d8322458955d56a445
[ "Apache-2.0" ]
1
2021-10-03T09:34:58.000Z
2021-10-03T09:34:58.000Z
#!/usr/bin/python ## -*- coding: utf-8 -*- import random ########################################################################## # Application Data Structure (Dialog Application) # Liste mit Farben Colors = ["rot", "grün", "blau", "gelb"] # Daten für Dialog-Anwendung AppData = { "ID": "201912240050", "...
31.111111
139
0.508929
50080ccb4b75ececa6c5ef4f7e37244abe7fd70d
3,200
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/module_utils/remote_management/lxca/common.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/ansible/module_utils/remote_management/lxca/common.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/ansible/module_utils/remote_management/lxca/common.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by # Ansible still belong to the author of the module, and may assign their # own license to the complete wo...
33.333333
118
0.715
502cc6fc96f4d3d3e934d5151a517c2776b92953
3,646
py
Python
Terminagent/Manager.py
flikkes/intelligente_agenten
340ca9b9d98b4525b330292f16444e106dec9d66
[ "MIT" ]
null
null
null
Terminagent/Manager.py
flikkes/intelligente_agenten
340ca9b9d98b4525b330292f16444e106dec9d66
[ "MIT" ]
null
null
null
Terminagent/Manager.py
flikkes/intelligente_agenten
340ca9b9d98b4525b330292f16444e106dec9d66
[ "MIT" ]
null
null
null
import socket import tkinter import threading import time import json from tkinter import * from tkinter import messagebox from Calendar import Calendar class Manager: HOST = '127.0.0.1' # Standard loopback interface address (localhost) PORT = 65430 # Port to listen on (non-privileged ports are > 1023...
33.759259
110
0.608886
acf1901afeca266d1384d52e1d61ec2b6f29f41d
707
py
Python
7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/oop/test_oop2.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/LambdaSchool-master/m6/61c1/src/oop/test_oop2.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/01_intro_python/Sprint-Challenge--Intro-Python/src/oop/test_oop2.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
import unittest from oop2 import * class Oop2Tests(unittest.TestCase): def setUp(self): self.ground_vehicle = GroundVehicle() self.motorcycle = Motorcycle() def test_motorcycle_inheritance(self): self.assertTrue(isinstance(self.motorcycle, GroundVehicle)) def test_ground_vehicle_num_wheels(self): ...
27.192308
63
0.759547
8c5ff15104e143bfeed791cedf28df95163888e7
3,229
py
Python
research/cv/vit_base/src/net_config.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/vit_base/src/net_config.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/vit_base/src/net_config.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...
27.364407
78
0.677919
4ff1c0fae7d40a6c51cf1b361a397c17e5c29359
2,138
py
Python
rbac/ledger_sync/deltas/decoding.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
75
2018-04-06T09:13:34.000Z
2020-05-18T18:59:47.000Z
rbac/ledger_sync/deltas/decoding.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
989
2018-04-18T21:01:56.000Z
2019-10-23T15:37:09.000Z
rbac/ledger_sync/deltas/decoding.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
72
2018-04-13T18:29:12.000Z
2020-05-29T06:00:33.000Z
# Copyright 2019 Contributors to Hyperledger Sawtooth # # 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 ...
36.862069
84
0.732928
50a792acca1b028efdad3c1bede3fab94a417f44
373
py
Python
nz_django/day8/user_demo2/front/forms.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_django/day8/user_demo2/front/forms.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_django/day8/user_demo2/front/forms.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from django import forms from django.contrib.auth import get_user_model #这个方法功能获取当前项目的用户模型 #读取settings文件中的 AUTH_USER_MODEL = 'front.User' #front.User 就是我们自定义的用户模型 class LoginForm(forms.ModelForm): telephone = forms.CharField(max_length=11) remember = forms.IntegerField(required=False) class Meta: m...
33.909091
65
0.753351
fa724da803817bbe3260115f42a3d71c73245d35
875
py
Python
Algorithms/DynamticProgramming/Equal.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/DynamticProgramming/Equal.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/DynamticProgramming/Equal.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
#coding:utf-8 T = int(raw_input()) for _ in xrange(T): N = int(raw_input()) ar = sorted(map(int, raw_input().split())) count = 0 dis = 0 start = 1 if N >= 3 and ((ar[1]-ar[0]) % 5 == 3 or (ar[1]-ar[0]) % 5 == 4) and ar[1] == ar[2]: tamp = ar[2] count = ((ar[1]-ar[0])/5 + 1...
23.026316
88
0.369143
0e90e063d81f6adace60c3f0c4aced968ca7b692
293
py
Python
packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from .date_range import compute_date_range from .disabled_rules import disabled_rules from .enum_service import enum_service from .rows_count_mismatch_with_another import rows_count_mismatch_with_another from .rows_not_exists import rows_not_exists from .rules_controller import run_all_rules
41.857143
78
0.897611
7d2302bd376a72ce65ce634a29b050ad70e12b22
2,299
py
Python
hypercut/urlcut/views.py
UnoYakshi/HyperCut
dc1dc2ad4383b69d2833e94f205959e5fe079971
[ "MIT" ]
null
null
null
hypercut/urlcut/views.py
UnoYakshi/HyperCut
dc1dc2ad4383b69d2833e94f205959e5fe079971
[ "MIT" ]
5
2021-03-30T13:49:59.000Z
2021-09-22T19:19:10.000Z
hypercut/urlcut/views.py
UnoYakshi/HyperCut
dc1dc2ad4383b69d2833e94f205959e5fe079971
[ "MIT" ]
null
null
null
""" Handles URL pairs functionality: - creation: creates a URL pair with URL to shorten and usage limit to provided - removing: removes a URL pair - detailing: displays complete a URL pair's info - redirecting: uses short URLs (hashes) to redirect to full URLs - listing: paginated and sorted """ from django.views impo...
32.842857
115
0.68856
1dd620541497cd7ae5f9becb0f8089747a60f656
153
py
Python
py/jpy-integration/src/javaToPython/python/io/deephaven/jpy/proxy_close_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/proxy_close_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/proxy_close_test.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
29
2021-05-10T11:33:16.000Z
2022-03-30T21:01:54.000Z
class SomeClass: def __init__(self): self.closed = False def get_closed(self): return self.closed def close(self): self.closed = True
17
23
0.673203
0e063b035e2201dc89e4a9e7e03f19b8d267937a
1,049
py
Python
python/oneflow/framework/runtime_mode.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
oneflow/python/framework/runtime_mode.py
duijiudanggecl/oneflow
d2096ae14cf847509394a3b717021e2bd1d72f62
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
oneflow/python/framework/runtime_mode.py
duijiudanggecl/oneflow
d2096ae14cf847509394a3b717021e2bd1d72f62
[ "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...
24.97619
76
0.752145
389fa978029c1c4047c25ec8c7454f85ef38c737
583
py
Python
ACM/python/douban/210914/python.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
1
2019-05-22T07:12:34.000Z
2019-05-22T07:12:34.000Z
ACM/python/douban/210914/python.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
3
2021-12-10T01:13:54.000Z
2021-12-14T21:18:42.000Z
ACM/python/douban/210914/python.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
null
null
null
from bs4 import BeautifulSoup import numpy as np def test_fun(fun, a, b): fun(a) def has_tag(var): print("执行了参数,var={}".format(var)) return True if __name__ == '__main__': # soup = BeautifulSoup("<div class='black'>data</div><div class='black'>number</div><div class='red'>text</div>", # ...
23.32
117
0.542024
aa9da09528273b7c75d6cd544aa765c7d196ec38
29,204
py
Python
src/Sephrasto/UI/CharakterInventar.py
Ilaris-Tools/Sephrasto
8574a5b45da8ebfa5f69a775066fd3136da1c718
[ "MIT" ]
1
2022-02-02T16:15:59.000Z
2022-02-02T16:15:59.000Z
src/Sephrasto/UI/CharakterInventar.py
Ilaris-Tools/Sephrasto
8574a5b45da8ebfa5f69a775066fd3136da1c718
[ "MIT" ]
1
2022-01-14T11:04:19.000Z
2022-01-14T11:04:19.000Z
src/Sephrasto/UI/CharakterInventar.py
lukruh/Sephrasto
8574a5b45da8ebfa5f69a775066fd3136da1c718
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'CharakterInventar.ui' # # Created by: PyQt5 UI code generator 5.15.6 # # 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 Qt...
56.378378
131
0.714868
aad08df6620f353415d09ff65b77d2cad24b7ed4
197
py
Python
Algorithms/Sorting/counting_sort_1.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Sorting/counting_sort_1.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Sorting/counting_sort_1.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 n = int(input().strip()) ar = list(map(int, input().strip().split(' '))) counter = [0] * 100 # 0 ~ 99 for a in ar: counter[a] += 1 print(' '.join(map(str, counter)))
17.909091
47
0.558376
2ac83dbac4c5e14d7b6b376ae31f9f6f4c8bb91a
3,483
py
Python
src/onegov/people/cli.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/people/cli.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/people/cli.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import click import transaction from collections import OrderedDict from onegov.core.cli import command_group from onegov.core.cli import abort from onegov.people.models import Person from openpyxl import load_workbook from openpyxl import Workbook cli = command_group() @cli.command('clear') @click.option('--dry-r...
25.057554
79
0.602354
2ae6633cfb089bbf329464a9f88d1668adc0fd1d
241
py
Python
tmp/var_annot/simple.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
tmp/var_annot/simple.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
tmp/var_annot/simple.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
import numpy as np from transonic import Type, NDim, Array, boost T = Type(np.float64, np.complex128) N = NDim(1) A = Array[T, N] @boost def func(a: A): i: int n: int = a.shape[0] for i in range(n): a[i] = a[i] + 1.
14.176471
46
0.572614
2d942ad3b37cf341e23474a2ef2bc9d0cea6d0ed
372
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/intro/intro_numpy_flip.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/intro/intro_numpy_flip.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/intro/intro_numpy_flip.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden import numpy as np numbers = np.array([[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]) print(np.flip(numbers, 1)) numbers2 = np.array([[1, 1, 1, 1], [2, 2, 2, 2], ...
21.882353
50
0.47043
2dbd752ee1cf066343c2741e2c6e7779514a90a3
2,943
py
Python
util/ap/py/Knapsack01.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-04-07T15:08:53.000Z
2016-04-07T15:08:53.000Z
util/ap/py/Knapsack01.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
util/ap/py/Knapsack01.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
''' You can run it directly to see results. ''' def knapsack01(sizes, vals, S): # aux[i][s] is the maximal value given the first (i-1) items under the size limitation: s aux = [[-1 for _ in range(S + 1)] for _ in vals] for i in range(len(vals)): for s in range(S + 1): if i == 0: ...
25.591304
93
0.450561
935aa9b6f1c2cd3a3c6c4ea08fc7e465fb9f28fc
341
py
Python
crawlab/tasks/deploy.py
anhilo/crawlab
363f4bf7a4ccc192a99850998c1bd0fc363832a1
[ "BSD-3-Clause" ]
1
2019-08-20T14:26:39.000Z
2019-08-20T14:26:39.000Z
crawlab/tasks/deploy.py
anhilo/crawlab
363f4bf7a4ccc192a99850998c1bd0fc363832a1
[ "BSD-3-Clause" ]
9
2019-05-24T03:53:09.000Z
2022-02-26T10:53:48.000Z
crawlab/tasks/deploy.py
anhilo/crawlab
363f4bf7a4ccc192a99850998c1bd0fc363832a1
[ "BSD-3-Clause" ]
1
2019-11-08T08:12:40.000Z
2019-11-08T08:12:40.000Z
import os import sys from datetime import datetime import requests from celery.utils.log import get_logger from config import PROJECT_DEPLOY_FILE_FOLDER, PROJECT_LOGS_FOLDER from db.manager import db_manager from .celery import celery_app import subprocess logger = get_logger(__name__) @celery_app.task def deploy_...
17.947368
66
0.829912
936a0a94a15239f3a62b823af2d3babde41ffcde
13,883
py
Python
Quasinewton-Verfahren.py
StefanStoermer/Bachelorarbeit
c7c79f5c799a35b334c8010afd1537f97a586719
[ "MIT" ]
null
null
null
Quasinewton-Verfahren.py
StefanStoermer/Bachelorarbeit
c7c79f5c799a35b334c8010afd1537f97a586719
[ "MIT" ]
null
null
null
Quasinewton-Verfahren.py
StefanStoermer/Bachelorarbeit
c7c79f5c799a35b334c8010afd1537f97a586719
[ "MIT" ]
null
null
null
from CG import * from Funktionsklasse import * import random from tkinter import * # global variables for calculating************************************************************************************** dim = 0 listOfFunctions = [] listOfFunctionsChoosen = [] numbersOfFunctionsNotChoosen = [] x = np.zeros...
31.058166
121
0.576172
faa27f9fb4cb28649b8bd961b2b4e6571733a175
792
py
Python
0-notes/job-search/Cracking the Coding Interview/C10SortingSearching/questions/10.10-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C10SortingSearching/questions/10.10-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C10SortingSearching/questions/10.10-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Rank from Stream # Imagine you are reading in a stream of integers. # Periodically, you wish to be able to look up the rank off a number x, # the number of values less than or equal to x. # Implement the data structures and algorithms to support these operations. # That is, implement the method track(int x), wh...
36
76
0.67803
87972953a3724f8023cacfaeb487f174f0cb7a57
3,692
py
Python
official/recommend/tbnet/src/embedding.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/recommend/tbnet/src/embedding.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/recommend/tbnet/src/embedding.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...
48.578947
100
0.656284
ea0d83c03629bb60c2a6db84d9dc41052ba3bcd3
730
py
Python
Hackerrank_problems/Simple Text Editor/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
Hackerrank_problems/Simple Text Editor/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
Hackerrank_problems/Simple Text Editor/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
"""Use a stack/list 'previous_states' to save the last state of the string before apply the operation. """ if __name__ == '__main__': S = '' previous_states = [] total_operations = int(input()) for _ in range(total_operations): operation_line = input().split() operation = int(operation_l...
30.416667
52
0.539726
aa30d2f740367d5593cd2a997941884086f7e43d
506
py
Python
exercises/de/test_01_03_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/de/test_01_03_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/de/test_01_03_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert ( doc.text == "Ich mag niedliche Katzen und Faultiere." ), "Bist du dir sicher, dass du den Text korrekt verarbeitet hast?" assert ( niedliche_katzen == doc[2:4] ), "Bist du dir sicher, dass du die korrekte Span für niedliche_katzen ausgewählt hast?" assert ( ...
42.166667
106
0.679842
352b25ca2f23e23b5ca5a1135ac4cfa93636d00a
6,984
py
Python
session5/wxIdeenBox.py
NeumannSven/pyshb_programmierkurs
518da3766dff36e938b36c49d410edb52c0cb32c
[ "MIT" ]
2
2019-10-26T12:47:05.000Z
2020-07-07T16:36:19.000Z
session5/wxIdeenBox.py
NeumannSven/pyshb_programmierkurs
518da3766dff36e938b36c49d410edb52c0cb32c
[ "MIT" ]
null
null
null
session5/wxIdeenBox.py
NeumannSven/pyshb_programmierkurs
518da3766dff36e938b36c49d410edb52c0cb32c
[ "MIT" ]
4
2020-02-28T13:43:05.000Z
2020-12-02T10:39:46.000Z
import wx import json class IdeenBox(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, title=title, size=(1000, 500)) self.MainSizer = wx.BoxSizer(wx.VERTICAL) self.TopSizer = wx.BoxSizer(wx.HORIZONTAL) self.IdeenListe = wx.ListCtrl(self, style=wx.LC_...
42.327273
82
0.6061
5e18631a52b4b36d2a1e973792a13f188cb926d7
670
py
Python
src/get_images.py
misogil0116/Biscotti
010ef0f29fbd5d33c9870ce249f1a9824f3471c4
[ "Apache-2.0" ]
10
2018-01-11T01:15:15.000Z
2020-06-22T15:03:31.000Z
src/get_images.py
misogil0116/Biscotti
010ef0f29fbd5d33c9870ce249f1a9824f3471c4
[ "Apache-2.0" ]
null
null
null
src/get_images.py
misogil0116/Biscotti
010ef0f29fbd5d33c9870ce249f1a9824f3471c4
[ "Apache-2.0" ]
null
null
null
import requests import time def main(): with open("debug/urls_txt.txt", "r") as f: data = f.readlines() urls = data[-1000:] # import ipdb; ipdb.set_trace() for url in urls: id, url = url.split("\t") url = url.replace("\n", "") params = {'User-Agent' : "Mozilla/5.0 (Windows NT 10.0;...
29.130435
143
0.571642
dc271429c6e3424466a20759094f9428c29bddfb
705
py
Python
settings/__init__.py
Yoann-Renard/Dimension-Y-DesktopApp
f2c6d4834338e88fb536cdd57d9c95e07079aed1
[ "MIT" ]
null
null
null
settings/__init__.py
Yoann-Renard/Dimension-Y-DesktopApp
f2c6d4834338e88fb536cdd57d9c95e07079aed1
[ "MIT" ]
null
null
null
settings/__init__.py
Yoann-Renard/Dimension-Y-DesktopApp
f2c6d4834338e88fb536cdd57d9c95e07079aed1
[ "MIT" ]
null
null
null
from pygame import display # ## ### #### WINDOW #### WINDOW #### WIN_WIDTH = 1300 WIN_HEIGHT = 800 CAPTION = "Dimension Y" # ## ### #### INGAME WINDOWS #### INGAME WINDOWS #### USER_INFO_WIN_HEIGHT = 100 # ## ### #### RUNNING #### RUNNING #### FPS = 60 # ## ### #### REQUEST #### REQUEST #### HOST = "http://192.168...
13.823529
47
0.582979
762c96ff1869c25644781abee9c401db7ed7e4b1
1,368
py
Python
modeling/head/danet.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
2
2020-12-22T08:40:05.000Z
2021-03-30T08:09:44.000Z
modeling/head/danet.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
modeling/head/danet.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
########################################################################### # Created by: CASIA IVA # Email: jliu@nlpr.ia.ac.cn # Copyright (c) 2018 ########################################################################### from __future__ import division import torch.nn as nn import torch.nn.functional as F from mod...
35.076923
96
0.567251
10c5532f75d63901a339695882ce32fbe55a283e
2,007
py
Python
Python/Programação_em_Python_Essencial/6- Funções/kwargs.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Programação_em_Python_Essencial/6- Funções/kwargs.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Programação_em_Python_Essencial/6- Funções/kwargs.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
""" **kwargs Poderíamos chamar este parâmetro de **xis, mas por convenção chamamos de **kwargs Este é só mais um parâmetro, mas diferente do *args que coloca os valores extras em um tupla, o **kwargs exige que utilizemos parâmetros nomeados, e transforma esses parâmetros extras em um dicionário. # Exemplo def cor...
25.405063
85
0.691579
10f76d096d394aaf216b56340905932e14ce007a
61
py
Python
src/standard_module/sys_module.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/standard_module/sys_module.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/standard_module/sys_module.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ sys.argv """
7.625
23
0.47541
639224e40281db83a7dee8f8066fd355b9e51516
1,043
py
Python
Python/PeopleCycle/remaining_people.py
boneskewer69/ifis
926323f60bf8eac55ccc67b6f6e536fe19c6b4c2
[ "MIT" ]
null
null
null
Python/PeopleCycle/remaining_people.py
boneskewer69/ifis
926323f60bf8eac55ccc67b6f6e536fe19c6b4c2
[ "MIT" ]
null
null
null
Python/PeopleCycle/remaining_people.py
boneskewer69/ifis
926323f60bf8eac55ccc67b6f6e536fe19c6b4c2
[ "MIT" ]
null
null
null
class PeopleCycle: def __init__(self, amount_people): self.people = [] self.people_next_gen = [] self.amount_of_people = amount_people self.count_generation = 0 def fill(self): for i in range(0, self.amount_of_people): self.people.append(i) def print_cu...
26.74359
64
0.563758
9882a6496fa5e04dc4d6d62c308e6c2bc698230e
486
py
Python
PINp/2015/ZATERIN_V_D/task_6_13.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2015/ZATERIN_V_D/task_6_13.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2015/ZATERIN_V_D/task_6_13.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Создайте игру, в которой компьютер загадывает название одного из двух #спутников Марса, а игрок должен его угадать. import random sputnik = random.randint(1,2) if sputnik == 1: sputnik="фобос" elif sputnik ==2: sputnik="деймес" print("Угадай спутник Марса: ") otvet = input("\n ВВеди слово: ") while(otvet != cvet): ...
30.375
71
0.716049
98a94236c0115d8bdf6d6fa502ebb3e9e7948210
1,879
py
Python
plugins/tff_backend/api/audit.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
null
null
null
plugins/tff_backend/api/audit.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
178
2017-08-02T12:58:06.000Z
2017-12-20T15:01:12.000Z
plugins/tff_backend/api/audit.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
2
2018-01-10T10:43:12.000Z
2018-03-18T10:42:23.000Z
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
44.738095
117
0.780202
f6c1c17cdaeeaea0c902739006cd022fbdc239ec
45
py
Python
20-hs-redez-sem/groups/05-decentGames/src/Exceptions.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-hs-redez-sem/groups/05-decentGames/src/Exceptions.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-hs-redez-sem/groups/05-decentGames/src/Exceptions.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
class FileAlreadyExists(Exception): pass
15
35
0.777778
63f955fa7520de204b51be9316c4a109efbc4e63
1,345
py
Python
Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/redfish/delete_handler.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/redfish/delete_handler.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/redfish/delete_handler.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# Copyright (C) Microsoft Corporation. All rights reserved. # 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. import par...
37.361111
98
0.742007
122f87f126ddb07f86297d85ac59780e891e926e
588
py
Python
exercises/es/test_03_09_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/test_03_09_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/test_03_09_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert Token.has_extension( "is_country" ), "¿Registraste la extensión en el token?" ext = Token.get_extension("is_country") assert ext[0] == False, "¿Añadiste correctamente el valor por defecto?" country_values = [False, False, True, False] assert [ t._.is_country fo...
36.75
75
0.659864
c3b578b399972ed2e3c8c962c12fa20ef4b94233
44,809
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/demand/demand-o1-prefstar.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
4
2020-11-13T02:35:56.000Z
2021-03-29T20:15:54.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/demand/demand-o1-prefstar.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
9
2020-12-09T02:12:39.000Z
2021-02-18T00:15:28.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/demand/demand-o1-prefstar.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others. # SUMOPy module # Copyright (C) 2012-2017 University of Bologna - DICAM # This program and the accompanying materials are made available under the # terms of the Eclipse Public ...
42.594106
130
0.556607
1419d1e9454f8a898f3445a9cf85022dfdb9782a
3,318
py
Python
quant/markets/_bitfinex.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
7
2017-10-22T15:00:09.000Z
2019-09-19T11:45:43.000Z
quant/markets/_bitfinex.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
1
2018-01-19T16:19:40.000Z
2018-01-19T16:19:40.000Z
quant/markets/_bitfinex.py
doubleDragon/QuantBot
53a1d6c62ecece47bf777da0c0754430b706b7fd
[ "MIT" ]
5
2017-12-11T15:10:29.000Z
2018-12-21T17:40:58.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- from .market import Market from quant.api.bitfinex import PublicClient as Client import market_util class Bitfinex(Market): def __init__(self, pair_code): base_currency, market_currency = self.get_available_pairs(pair_code) super(Bitfinex, self).__ini...
33.515152
88
0.546715
1424e5744d5200c44a313a0f6336230020a10449
1,463
py
Python
python/oneflow/utils/vision/transforms/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/utils/vision/transforms/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/utils/vision/transforms/__init__.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...
21.835821
72
0.68216
37264cf75a256fd2c526bfdd828df6929a5f8c0e
698
py
Python
sketches/runningorc00/orcs.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/runningorc00/orcs.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/runningorc00/orcs.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
class Orc(): def __init__(self, posX, posY): self.x = posX self.y = posY self.dy = 0 def loadPics(self): self.orc1 = loadImage("orc1.png") self.orc2 = loadImage("orc2.png") self.orc3 = loadImage("orc3.png") def move(self): self.y += self.dy ...
24.068966
44
0.461318
2c1c4c31aa20bd7c98ffd3d3cb16473fbb0bf42d
263
py
Python
frappe-bench/apps/erpnext/erpnext/hr/doctype/vehicle/vehicle_dashboard.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/hr/doctype/vehicle/vehicle_dashboard.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/hr/doctype/vehicle/vehicle_dashboard.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
from frappe import _ data = { 'heatmap': True, 'heatmap_message': _('This is based on logs against this Vehicle. See timeline below for details'), 'fieldname': 'license_plate', 'transactions': [ { 'label': _('Logs'), 'items': ['Vehicle Log'] } ] }
20.230769
100
0.638783
6caeadaed1cc5d4996a25a88738cfbd5f77d7caa
3,200
py
Python
zencad/gutil.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/gutil.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/gutil.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from zencad.util import point3 from zencad.geom.trans import rotateZ from math import sqrt def restore_ellipse_centers(apnt, bpnt, r1, r2, phi): """ Поиск центра двумерного элипса по радиусам, углу наклона главной оси и двум точкам. """ rot = rotateZ(phi) irot = rot...
50.793651
330
0.4025
6cd93d125c66d9da3e564386052f22648bef1af5
168
py
Python
models/__init__.py
DevCriUd/hr_cgt
5db7c173b937fd156b365d17ddf9bd6d86638315
[ "Apache-2.0" ]
null
null
null
models/__init__.py
DevCriUd/hr_cgt
5db7c173b937fd156b365d17ddf9bd6d86638315
[ "Apache-2.0" ]
null
null
null
models/__init__.py
DevCriUd/hr_cgt
5db7c173b937fd156b365d17ddf9bd6d86638315
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from . import hr_documents from . import hr_document_type from . import hr_employee from . import hr_attendance_day from . import hr_attendance
24
31
0.767857
4cefc66b32bd4fb58970fcb668dab7ab09d38ead
747
py
Python
python/course/interview/1019/main.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
1
2019-05-22T07:12:34.000Z
2019-05-22T07:12:34.000Z
python/course/interview/1019/main.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
3
2021-12-10T01:13:54.000Z
2021-12-14T21:18:42.000Z
python/course/interview/1019/main.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
null
null
null
import numpy as np class MyList: arr = [] index = -1 def __init__(self, arr): self.arr = arr print(self.arr) def __iter__(self): self.index = self.index + 1 return self def __next__(self): max = len(arr) if self.index + 1 >= max: raise...
19.657895
39
0.518072
2c84a253b92d2603b16c098278418667f27ef2f7
9,954
py
Python
Packs/AtlassianConfluenceCloud/Integrations/AtlassianConfluenceCloud/test_data/input_data.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/AtlassianConfluenceCloud/Integrations/AtlassianConfluenceCloud/test_data/input_data.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/AtlassianConfluenceCloud/Integrations/AtlassianConfluenceCloud/test_data/input_data.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
MESSAGES = { "REQUIRED-URL-FIELD": "Site Name can not be empty.", "NO_RECORDS_FOUND": "No {} were found for the given argument(s).", "LIMIT": "{} is an invalid value for limit. Limit must be between 0 and int32.", "START": "{} is an invalid value for start. Start must be between 0 and int32.", "INVA...
57.872093
117
0.657022
2cca6603134417a066e920e7f8acc12ac1ccf2c9
888
py
Python
angstrom/2019/crypto/Eightball/benaloh.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
angstrom/2019/crypto/Eightball/benaloh.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
angstrom/2019/crypto/Eightball/benaloh.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
from gmpy2 import div, gcd, invert, powmod from Crypto.Util.number import getPrime, getRandomRange def unpack(fn): with open(fn, 'r') as f: return tuple([int(x) for x in f.readlines()]) def pack(fn, k): with open(fn, 'w') as f: f.write('\n'.join([str(x) for x in k])) def generate(): r = 257 while True: p ...
19.733333
55
0.572072
37464c912341bf564d0fc46a6aeb6d3d0a297872
911
py
Python
nz_django/day6/form_demo1/front/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_django/day6/form_demo1/front/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_django/day6/form_demo1/front/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from django.shortcuts import render from django.views import View from .forms import MessageBoardForm from django.http import HttpResponse class IndexView(View): def get(self,request): form = MessageBoardForm() return render(request,'index.html',context={'form':form}) def post(self,request): ...
32.535714
64
0.610318
3774bedb25bee50341949f769f47672b0d4e5bd2
1,067
py
Python
pyetl/example_sqlalchemy.py
febridev/portfoliode
ef2cea76c92b9676102cb76ca476f663a920b659
[ "MIT" ]
null
null
null
pyetl/example_sqlalchemy.py
febridev/portfoliode
ef2cea76c92b9676102cb76ca476f663a920b659
[ "MIT" ]
null
null
null
pyetl/example_sqlalchemy.py
febridev/portfoliode
ef2cea76c92b9676102cb76ca476f663a920b659
[ "MIT" ]
null
null
null
import sqlalchemy import pandas as pd #Open Connection connection_uri = "mariadb+mariadbconnector://root:demo@35.197.132.1:13306/dbdemo" db_engine = sqlalchemy.create_engine(connection_uri) datass = pd.read_sql("select grade_code,gradecategory_code,grade_name from teomjobgrade",db_engine) aa = pd.DataFrame(datass) b...
29.638889
101
0.766635
80b921e0ef980327c58c0ef84b5745f250550b81
2,354
py
Python
context_processors.py
klml/kohrsupply
89ae3ebae120398e8259dbe77c3b092485cc79f9
[ "MIT" ]
null
null
null
context_processors.py
klml/kohrsupply
89ae3ebae120398e8259dbe77c3b092485cc79f9
[ "MIT" ]
9
2017-06-15T10:24:09.000Z
2018-08-01T21:07:25.000Z
context_processors.py
klml/kohrsupply
89ae3ebae120398e8259dbe77c3b092485cc79f9
[ "MIT" ]
null
null
null
# The context processor function # http://matthewphiong.com/django-global-template-variable import datetime from django.core.exceptions import ObjectDoesNotExist from django.conf import settings as setting ## must use "as", only settings did not work from .models import Transport, TransportLocation, TransportUserGetF...
36.215385
96
0.68819
45d5573a9d7b712585e9a4dde6ae84cab08cf790
406
py
Python
src/preprocessing/DepthHolesFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
7
2015-11-27T09:53:32.000Z
2021-01-13T17:35:54.000Z
src/preprocessing/DepthHolesFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
src/preprocessing/DepthHolesFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
class DepthHolesFilter(object): def __init__(self, foreground=1500, background=2100): self.foreground = foreground; self.background = background; def filter(self, rgb, depth, balls, args = {}): shadow = (depth <= self.foreground) depth[shadow] = 4095 bg = (...
27.066667
58
0.58867
9409cdf2fbaa954a33d4b7a51516ca4ac174d84f
1,252
py
Python
WeChatTools/Utils/HttpUtils.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
WeChatTools/Utils/HttpUtils.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
WeChatTools/Utils/HttpUtils.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
# -*- coding=utf-8 -*- # python35 import http.client import urllib import json import hashlib import hmac def getSign(params, secretKey): bSecretKey = bytes(secretKey, encoding='utf8') sign = '' for key in params.keys(): value = str(params[key]) sign += key + '=' + value + '&' bSign =...
27.217391
68
0.632588
04abd00f2bb6ca6843144e5c2e4b746157e37521
17,881
py
Python
bindings/python/ensmallen/datasets/zenodo.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
bindings/python/ensmallen/datasets/zenodo.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
bindings/python/ensmallen/datasets/zenodo.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
"""Module providing graphs available from Zenodo.""" from ensmallen import Graph # pylint: disable=import-error from .automatic_graph_retrieval import AutomaticallyRetrievedGraph def WikiLinkIT( directed = False, preprocess = "auto", load_nodes = True, load_node_types = True, load_edge_weights = True, auto_en...
28.026646
117
0.657681
6d2632d733d5a57945e10b07fc04af4558dc41f8
764
py
Python
2020 special edition/forum/gantun/decrypt.py
themaddoctor/BritishNationalCipherChallenge
43b455b030ed441a188629520d04045c4a6fbb9d
[ "BSD-4-Clause-UC" ]
18
2019-01-10T16:13:33.000Z
2022-03-14T01:38:56.000Z
2020 special edition/forum/gantun/decrypt.py
themaddoctor/BritishNationalCipherChallenge
43b455b030ed441a188629520d04045c4a6fbb9d
[ "BSD-4-Clause-UC" ]
6
2018-12-06T21:23:37.000Z
2021-11-08T23:59:44.000Z
2020 special edition/forum/gantun/decrypt.py
themaddoctor/BritishNationalCipherChallenge
43b455b030ed441a188629520d04045c4a6fbb9d
[ "BSD-4-Clause-UC" ]
11
2018-12-15T10:45:49.000Z
2022-02-03T05:40:57.000Z
#!/usr/bin/env python # based on Gantun from https://susec.tf/tasks/gantun_229621efd1dcc01ef8851254affd1326887ec58e.txz alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" def integer_root(n): # Newton's method to find square root of n u, s = n, n+1 while u < s: s = u t = s + n // s u = t // ...
21.828571
97
0.52356
b651467d9affa6d86bc19e52cd547c66bbe0a034
549
py
Python
server/bumf/api/views/base.py
bumfiness/bumf
71c404c0a8f804b8f0e127df3de6d8916db4c660
[ "Apache-2.0" ]
6
2017-01-07T17:59:46.000Z
2017-02-10T13:19:46.000Z
server/bumf/api/views/base.py
rixx/bumf
71c404c0a8f804b8f0e127df3de6d8916db4c660
[ "Apache-2.0" ]
null
null
null
server/bumf/api/views/base.py
rixx/bumf
71c404c0a8f804b8f0e127df3de6d8916db4c660
[ "Apache-2.0" ]
null
null
null
from django.conf import settings from rest_framework import permissions, viewsets class BumfViewSet(viewsets.ModelViewSet): """ This base class allows the view to be displayed in the browsable API in DEBUG mode. """ permission_classes = [ permissions.AllowAny if settings.DEBUG else permissions...
28.894737
87
0.699454
1726e7e6fbef0155a4c95abe29523c55d3dcf892
161
py
Python
PYTHON/Numpy/zeros_and_ones.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Numpy/zeros_and_ones.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Numpy/zeros_and_ones.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import numpy s = tuple(map(int, input().strip().split(' '))) print(numpy.zeros(s, dtype=int)) print(numpy.ones(s, dtype=int))
20.125
47
0.68323
bd99345eda4a69720a58b8e15caccb9196549273
1,532
py
Python
article_spider/article_spider/spiders/article.py
ypislon/bachelorarbeit
2e1d07d667d505a79d1adb9363cec5d21dafe832
[ "MIT" ]
null
null
null
article_spider/article_spider/spiders/article.py
ypislon/bachelorarbeit
2e1d07d667d505a79d1adb9363cec5d21dafe832
[ "MIT" ]
null
null
null
article_spider/article_spider/spiders/article.py
ypislon/bachelorarbeit
2e1d07d667d505a79d1adb9363cec5d21dafe832
[ "MIT" ]
null
null
null
import scrapy from urllib.parse import urljoin # TODO: black magic - dont do this! import sys sys.path.insert(0, 'C:\\hdm\\bachelorarbeit') from db_schema import Website, Article from helper import * class ArticlesSpider(scrapy.Spider): name = "articles" def start_requests(self): for website in Websi...
35.627907
104
0.619452
bddd6966812d4d86616f221f5296adb313fa49c8
212
py
Python
django/web/pages.py
cyberjacob/Eventlr
a1474ab73d50b08d4bd21ec83830105b2632ecfa
[ "MIT" ]
null
null
null
django/web/pages.py
cyberjacob/Eventlr
a1474ab73d50b08d4bd21ec83830105b2632ecfa
[ "MIT" ]
null
null
null
django/web/pages.py
cyberjacob/Eventlr
a1474ab73d50b08d4bd21ec83830105b2632ecfa
[ "MIT" ]
null
null
null
from django.http import HttpResponse import django.template def index(request): t = django.template.loader.get_template('index.html') c = django.template.Context({}) return HttpResponse(t.render(c))
26.5
57
0.740566
da67574350b06bb3c70cbb779e4825b8c387d47e
3,924
py
Python
web-brutator-master/lib/core/Bruteforcer.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
web-brutator-master/lib/core/Bruteforcer.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
web-brutator-master/lib/core/Bruteforcer.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import threading from lib.core.Exceptions import AuthException, RequestException class Bruteforcer: def __init__(self, auth_module, wordlist, success_creds_callback, wrong_creds_callback, ...
27.062069
84
0.553772
dab7be068ad7be5a46a0a73caeb51e825dd999c2
2,867
py
Python
cs/lambda_cs/05_hash_tables_and_blockchain/Sprint-Challenge--Hash-BC/blockchain/miner.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
cs/lambda_cs/05_hash_tables_and_blockchain/Sprint-Challenge--Hash-BC/blockchain/miner.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/05_hash_tables_and_blockchain/Sprint-Challenge--Hash-BC/blockchain/miner.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
""" Blockchain :: Sprint challenge """ import hashlib import random from timeit import default_timer as timer from uuid import uuid4 import sys import requests def proof_of_work(last_proof): """Multi-Ouroboros Proof of Work Algorithm. - Find a number p' such that the last five digits of hash(p) are equal ...
29.556701
77
0.609348
c175725119b1cb5d122bbe5753c568cda99db044
525
py
Python
Codeforces_problems/Divide It A/solution.py
KAHund/CompetitiveCode
6ed211a2f795569f5c2f18c2f660520d99d41ca0
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
Codeforces_problems/Divide It A/solution.py
KAHund/CompetitiveCode
6ed211a2f795569f5c2f18c2f660520d99d41ca0
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
Codeforces_problems/Divide It A/solution.py
KAHund/CompetitiveCode
6ed211a2f795569f5c2f18c2f660520d99d41ca0
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
# We follow a greedy strategy to divide the number as much as we can. # If there it is a multiple of 3, we introduce a factor of 2 so we can remove it completely in 2 counts. # If there it is a multiple of 5, we introduce a factor of 4 so we can remove it completely in 3 counts. for i in range(int(input())): num = int...
27.631579
104
0.647619
c1d1a52f63cd8b09a585850bf351973e4e1c36fb
396
py
Python
impat.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
impat.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
impat.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
"""This script will add a different folder to sys.path so modules can be loaded from there i.e. import module from another folder""" import os, sys, inspect def addfolder(name): cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile(inspect.currentframe()))[0],name+'/'))) ...
39.6
135
0.729798
a9dfc3c0100ef87e00449b55433c00cd43f7ddde
12,122
py
Python
open/hls4ml/code/ad/AD03/training/common.py
AidanYok/tiny_results_v0.5
3ec2c4a4fb5c7261876bb3e468b34d4e0e2ab4b2
[ "Apache-2.0" ]
5
2021-06-22T15:34:37.000Z
2022-03-29T06:12:03.000Z
open/hls4ml/code/ad/AD03/training/common.py
AidanYok/tiny_results_v0.5
3ec2c4a4fb5c7261876bb3e468b34d4e0e2ab4b2
[ "Apache-2.0" ]
null
null
null
open/hls4ml/code/ad/AD03/training/common.py
AidanYok/tiny_results_v0.5
3ec2c4a4fb5c7261876bb3e468b34d4e0e2ab4b2
[ "Apache-2.0" ]
5
2021-08-02T16:39:02.000Z
2022-03-29T06:12:04.000Z
""" @file common.py @brief Commonly used script @author Toshiki Nakamura, Yuki Nikaido, and Yohei Kawaguchi (Hitachi Ltd.) Copyright (C) 2020 Hitachi, Ltd. All right reserved. """ ######################################################################## # import python-library ###################################...
34.933718
119
0.477479
a40253720cd12f9123bb39dfec2a627b81c59864
2,950
py
Python
generate-Klausur.py
dassystem/notenfeedback
bca8878b540b50c2793c799edc5637409479c025
[ "Apache-2.0" ]
null
null
null
generate-Klausur.py
dassystem/notenfeedback
bca8878b540b50c2793c799edc5637409479c025
[ "Apache-2.0" ]
null
null
null
generate-Klausur.py
dassystem/notenfeedback
bca8878b540b50c2793c799edc5637409479c025
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # Benoetigt: ezodf (python) und seine Abhaenigkeiten, Python3, pdflatex, pdfnup # Lauffaehig unter Windows. # Dieses Skript generiert aus der Kursliste und der aktet-Schule-Klausur.tex eine xls Tabelle # Zu benutzten mit "$ python generate-klausur.py [[DATEINAME.ods]] [[DATEINAME.tex]]" # Geschri...
30.729167
121
0.555254
cfa78227f1823e6b60fd384eb19afe71a28c383e
3,106
py
Python
finbyz_dashboard/finbyz_dashboard/dashboard_chart_source/top_moving_items_balance/top_moving_items_balance.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
1
2021-11-19T05:27:11.000Z
2021-11-19T05:27:11.000Z
finbyz_dashboard/finbyz_dashboard/dashboard_chart_source/top_moving_items_balance/top_moving_items_balance.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
null
null
null
finbyz_dashboard/finbyz_dashboard/dashboard_chart_source/top_moving_items_balance/top_moving_items_balance.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
2
2021-08-21T10:41:38.000Z
2021-11-19T05:27:13.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, json from frappe import _ from frappe.utils import flt, cint, getdate, now, date_diff # from frappe.utils.dashboard import cache_source f...
45.014493
179
0.747585
7a80fa8a146eba750ea5a7cd1ea661d3744b0c59
1,940
py
Python
TEG/past_works/gera_grafo.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
10
2020-12-08T20:18:15.000Z
2021-06-07T20:00:07.000Z
TEG/past_works/gera_grafo.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
2
2021-06-28T03:42:13.000Z
2021-06-28T16:53:13.000Z
TEG/past_works/gera_grafo.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
2
2021-01-14T19:59:20.000Z
2021-06-15T11:53:21.000Z
import random as r from pprint import pprint import math as m def cria_ponto(): return round(r.uniform(0, 1), 4) def gera_x(n): x = set() while len(x) < n: x.add(cria_ponto()) return x def gera_y(n): y = set() while len(y) < n: y.add(cria_ponto()) return y def gera_co...
26.944444
91
0.586082
a431468a821c8afb55924779fbba38cd5953b331
1,884
py
Python
jumeaux/commands/retry/main.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
11
2017-10-02T01:29:12.000Z
2022-03-31T08:37:22.000Z
jumeaux/commands/retry/main.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
79
2017-07-16T14:47:17.000Z
2022-03-31T08:49:14.000Z
jumeaux/commands/retry/main.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
2
2019-01-28T06:11:58.000Z
2021-01-25T07:21:21.000Z
"""Retry Jumeaux from report Usage: {cli} <report> [--title=<title>] [--description=<description>] [--tag=<tag>...] [--threads=<threads>] [--processes=<processes>] [--max-retries=<max_retries>] [-vvv] {cli} (-h | --help) Options: <report> Rep...
32.482759
95
0.534501
f102fe1a5ce4bbe60d24f984094cde7d41be5721
1,059
py
Python
chapter101/postgres_elasticsearch.py
thiagola92/learning-databases-with-python
cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e
[ "MIT" ]
null
null
null
chapter101/postgres_elasticsearch.py
thiagola92/learning-databases-with-python
cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e
[ "MIT" ]
null
null
null
chapter101/postgres_elasticsearch.py
thiagola92/learning-databases-with-python
cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e
[ "MIT" ]
null
null
null
import psycopg import elasticsearch import psycopg.extras from datetime import datetime from elasticsearch import helpers, Elasticsearch start = datetime.now() postgres_client = psycopg.connect("postgres://username:password@127.0.0.1") elasticsearch_client = Elasticsearch("http://username:password@127.0.0.1:9200") c...
23.021739
79
0.733711