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
314ef4609156d200ebd076441fcc53dc03da264d
26,386
py
Python
Code/Main.py
Luc-Wshr/DHBW-Python-WeatherApp
b6ba6daabfb8114b916bcf1499862da80b392f43
[ "MIT" ]
null
null
null
Code/Main.py
Luc-Wshr/DHBW-Python-WeatherApp
b6ba6daabfb8114b916bcf1499862da80b392f43
[ "MIT" ]
null
null
null
Code/Main.py
Luc-Wshr/DHBW-Python-WeatherApp
b6ba6daabfb8114b916bcf1499862da80b392f43
[ "MIT" ]
1
2021-04-30T09:32:48.000Z
2021-04-30T09:32:48.000Z
# ----------------------------------------------------------------------------------------Library imports from tkinter import * from PIL import ImageTk, Image from datetime import date, timedelta, datetime from requests import api from tkinter import messagebox from io import BytesIO from urllib.request import u...
42.904065
230
0.573562
7303e49148bccd2aaa05216b19ebd41bc863e044
5,878
py
Python
toolsparty-master/information-gathering/filter.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
toolsparty-master/information-gathering/filter.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
toolsparty-master/information-gathering/filter.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 python # coding:utf-8 # Build by LandGrey 2017-11-04 import os import re import sys import itertools from netaddr import IPNetwork def unique(seq, idfun=None): if idfun is None: def idfun(x): return x seen = {} results = [] for item in seq: marker = idfun(item) ...
40.537931
134
0.517863
5edc22f09c9bb0acb651b2130b2603c64d1f9565
3,550
py
Python
addition_module/DSDG/DUM/make_dataset/crop_dataset.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
1
2022-02-07T02:03:37.000Z
2022-02-07T02:03:37.000Z
addition_module/DSDG/DUM/make_dataset/crop_dataset.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
null
null
null
addition_module/DSDG/DUM/make_dataset/crop_dataset.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
null
null
null
import math import os import cv2 import numpy as np root_dir = '/export2/home/wht/oulu_images_crop/' img_root = '/export2/home/wht/oulu_images/train_img_flod/' map_root = '/export2/home/wht/oulu_images/train_depth_flod/' bbox_root = '/export2/home/wht/oulu_images/train_bbox_flod/' def crop_face_from_s...
30.34188
103
0.588169
6f449f97bb6734162e099524b59368ab3fd0ea4c
881
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v4_0/fix_employee_user_id.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
frappe-bench/apps/erpnext/erpnext/patches/v4_0/fix_employee_user_id.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v4_0/fix_employee_user_id.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import get_fullname def execute(): for user_id in frappe.db.sql_list("""select distinct user_id from `tabEmployee` ...
36.708333
98
0.710556
6f7548730449893029d082a697b4df4cebcd13bd
1,328
py
Python
IdeaProjects/MachineLearning/ScipyKmeans.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
1
2018-12-30T14:07:42.000Z
2018-12-30T14:07:42.000Z
IdeaProjects/MachineLearning/ScipyKmeans.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
IdeaProjects/MachineLearning/ScipyKmeans.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
from sklearn.cluster import KMeans from sklearn.externals import joblib import numpy import time import matplotlib.pyplot as plt if __name__ == '__main__': ## step 1: 加载数据 print ("step 1: load data...") dataSet = [] fileIn = open('./data.txt') for line in fileIn.readlines(): lineArr = line....
35.891892
96
0.568524
824e9e31f20468ca7e369d7d9424b67014e9f819
9,775
py
Python
products/migrations/0001_initial.py
silver-whale-enterprises-llc/amzproduzer
25e63f64b0ef09241475c72af9a710dcb7d9e926
[ "Apache-2.0" ]
1
2019-07-22T14:03:11.000Z
2019-07-22T14:03:11.000Z
products/migrations/0001_initial.py
silver-whale-enterprises-llc/amzproduzer
25e63f64b0ef09241475c72af9a710dcb7d9e926
[ "Apache-2.0" ]
null
null
null
products/migrations/0001_initial.py
silver-whale-enterprises-llc/amzproduzer
25e63f64b0ef09241475c72af9a710dcb7d9e926
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.7 on 2019-03-16 14:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='AmazonCategory', fields=[ ...
61.867089
217
0.601841
8156872c3c7505d6ae4c391b1ec4ba132353b317
325
py
Python
packages/watchmen-model/src/watchmen_model/system/key_store.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/system/key_store.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/system/key_store.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from datetime import datetime from typing import Any, Dict from pydantic import BaseModel from watchmen_model.common import Storable, TenantId, UserId class KeyStore(Storable, BaseModel): tenantId: TenantId = None keyType: str = None params: Dict[str, Any] = None createdAt: datetime = None createdBy: UserId = ...
21.666667
60
0.775385
81c7a6c3c416caed6e6acc0f2ede1d01cf8b95be
718
py
Python
WiSe-2122/Wiederholung/Vorlesung/login-example.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
1
2022-03-23T09:40:39.000Z
2022-03-23T09:40:39.000Z
WiSe-2122/Wiederholung/Vorlesung/login-example.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
WiSe-2122/Wiederholung/Vorlesung/login-example.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
# Login-Maske # Variablendefinition passwort = "Aligator123" richtiges_passwort = False versuche = 3 # Hauptprogramm while not richtiges_passwort and versuche >= 0: nutzer_eingabe = input("Bitte geben Sie das Passwort ein (achten Sie auf Groß- und Kleinschreibung): ") if nutzer_eingabe == passwort: pri...
37.789474
107
0.715877
f227ed5dc51b2012044b4e1d4a6143f9163a8faa
707
py
Python
algorithms/sorting/countingsort1.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
algorithms/sorting/countingsort1.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
algorithms/sorting/countingsort1.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
import sys def print_list(ar): print(' '.join(map(str, ar))) def insertion_sort(ar): if len(ar) == 1: print_list(ar) return (ar) else: x = ar[-1] for i in reversed(range(len(ar) - 1)): if x < ar[i]: ar[i + 1] = ar[i] print_list...
19.108108
53
0.413013
d2484a6288c83657b04426cacd42d76cd5057cb0
2,560
py
Python
archive/assets/fi/Archive/scripts/replace_menu.py
brnnnfx/openoffice-org
8b1023c59fd9c7a58d108bb0b01dd1f8884c9163
[ "Apache-2.0" ]
5
2019-10-14T23:00:48.000Z
2021-11-06T22:21:06.000Z
archive/assets/fi/Archive/scripts/replace_menu.py
brnnnfx/openoffice-org
8b1023c59fd9c7a58d108bb0b01dd1f8884c9163
[ "Apache-2.0" ]
31
2020-11-14T09:27:16.000Z
2022-03-08T17:09:15.000Z
archive/assets/fi/Archive/scripts/replace_menu.py
brnnnfx/openoffice-org
8b1023c59fd9c7a58d108bb0b01dd1f8884c9163
[ "Apache-2.0" ]
15
2020-11-10T17:04:25.000Z
2022-01-31T12:12:48.000Z
#!/usr/bin/python import sys,os,string,re ################################################################################ # Definitions ################################################################################ starttag = "<!-- MENU-START -->" endtag = "<!-- MENU-END -->" ###################################...
28.764045
86
0.410938
d2723078e6218a062e5b17a77641d7724455a032
4,626
py
Python
Code/chap6.py
CPEGM/Swinnen-2012
ce6a2621cc66ec7818abe4e4cb2b6cff1d6e151b
[ "CC0-1.0" ]
null
null
null
Code/chap6.py
CPEGM/Swinnen-2012
ce6a2621cc66ec7818abe4e4cb2b6cff1d6e151b
[ "CC0-1.0" ]
null
null
null
Code/chap6.py
CPEGM/Swinnen-2012
ce6a2621cc66ec7818abe4e4cb2b6cff1d6e151b
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Sep 29 10:15:07 2018 @author: CPEGM """ from math import sqrt, pi # Exercice 6.1 # Converti une vitesse en milles / heures en km/h et m/s vitesse = 10 conv = vitesse * 1609 / 3600 print("Vitesse en m/s: ", conv) print("Vitesse en km/h: ", conv*3.6) # Exercice 6.2 # Calcul l...
23.014925
78
0.607436
73c0ca46bae477837411a010459a4ed08549d2ee
1,222
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/utils/build_utils.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
883
2020-11-12T11:46:46.000Z
2022-03-31T18:27:10.000Z
paddlevideo/utils/build_utils.py
arkofgalaxy/PaddleVideo
64251233c83b7eb681061b454da198a9082309a6
[ "Apache-2.0" ]
233
2020-12-09T06:04:59.000Z
2022-03-28T08:16:51.000Z
paddlevideo/utils/build_utils.py
arkofgalaxy/PaddleVideo
64251233c83b7eb681061b454da198a9082309a6
[ "Apache-2.0" ]
225
2020-11-13T06:21:55.000Z
2022-03-31T05:36:11.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
33.944444
74
0.687398
49d40c7e8105e1dc3c6a53b9a5efdfc964321770
974
py
Python
session4/04_events.py
NeumannSven/pyshb_programmierkurs
518da3766dff36e938b36c49d410edb52c0cb32c
[ "MIT" ]
2
2019-10-26T12:47:05.000Z
2020-07-07T16:36:19.000Z
session4/04_events.py
NeumannSven/pyshb_programmierkurs
518da3766dff36e938b36c49d410edb52c0cb32c
[ "MIT" ]
null
null
null
session4/04_events.py
NeumannSven/pyshb_programmierkurs
518da3766dff36e938b36c49d410edb52c0cb32c
[ "MIT" ]
4
2020-02-28T13:43:05.000Z
2020-12-02T10:39:46.000Z
# Modul importieren import tkinter as tk # Hauptfenster erzeugen root = tk.Tk() root.geometry('500x500') # Beispiel Widget erzeugen zeichnung1 = tk.Canvas(root, width=200, height=100) zeichnung1.grid(row=0, column=0, sticky='WE') zeichnung1.create_line(0, 0, 200, 100) zeichnung1.create_rectangle(50, 25, 150, 75, fill...
27.828571
77
0.753593
4d381231df4723636c7886785057912e05b1251a
7,203
py
Python
Packs/Base/Scripts/FindSimilarIncidentsByText/FindSimilarIncidentsByText.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Base/Scripts/FindSimilarIncidentsByText/FindSimilarIncidentsByText.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Base/Scripts/FindSimilarIncidentsByText/FindSimilarIncidentsByText.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
# type: ignore import dateutil.parser from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import linear_kernel from six import string_types from CommonServerPython import * INCIDENT_TEXT_FIELD = 'incident_text_for_tfidf' def parse_datetime(datetime_str): return dateutil.pars...
39.79558
119
0.652784
1500ccd69a5292d544d5256bbf6892bde8e3d194
1,144
py
Python
zencad/examples/Integration/skimage-mechanicus/cube.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/examples/Integration/skimage-mechanicus/cube.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/examples/Integration/skimage-mechanicus/cube.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import numpy as np import sys from skimage import measure, io from itertools import chain import time import math import zencad from zencad import * import mech mechanicus, base, ignore = mech.build() cube = box(1000, center=True) mech = [disp(mechanicus, color=(1, 1, 1)) for i in range(0,...
26.604651
66
0.657343
12e261b344c6124dde28585e83c4f9e935eb0825
601
py
Python
setup.py
MBALearnsToCode/ProbGraph
a61839669ca84b0bb0103134682dfdf43c6c3f1b
[ "MIT" ]
null
null
null
setup.py
MBALearnsToCode/ProbGraph
a61839669ca84b0bb0103134682dfdf43c6c3f1b
[ "MIT" ]
null
null
null
setup.py
MBALearnsToCode/ProbGraph
a61839669ca84b0bb0103134682dfdf43c6c3f1b
[ "MIT" ]
null
null
null
from setuptools import setup setup(name='ProbabPyReason', version='0.1.3', packages=['ProbabPyReason'], url='https://github.com/MBALearnsToCode/ProbabPyReason', author='Vinh Luong (a.k.a. MBALearnsToCode)', author_email='MBALearnsToCode@UChicago.edu', description='Probabilistic Rea...
37.5625
81
0.69218
42093bae2393283e01f30b8ede5a951ccddae005
204
py
Python
robolib/util/random.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
2
2017-11-30T21:12:11.000Z
2017-12-01T07:52:43.000Z
robolib/util/random.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
14
2017-11-14T18:12:53.000Z
2018-06-03T16:07:57.000Z
robolib/util/random.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
3
2018-02-05T10:40:03.000Z
2018-02-09T09:29:19.000Z
import numpy as np def random_different_numbers(max): ind1 = 0 ind2 = 0 while ind1 == ind2: ind1 = np.random.randint(max) ind2 = np.random.randint(max) return ind1, ind2
18.545455
37
0.617647
c4500260c8ca934843a3372a462566e2d60d902a
709
py
Python
finbyz_dashboard/finbyz_dashboard/custom_number_card/items_to_deliver.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
1
2021-11-19T05:27:11.000Z
2021-11-19T05:27:11.000Z
finbyz_dashboard/finbyz_dashboard/custom_number_card/items_to_deliver.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
null
null
null
finbyz_dashboard/finbyz_dashboard/custom_number_card/items_to_deliver.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
2
2021-08-21T10:41:38.000Z
2021-11-19T05:27:13.000Z
from __future__ import unicode_literals import frappe, json from frappe import _ @frappe.whitelist() def number_card_custom(filters=None): filters = frappe.parse_json(filters) where_condition = '' if filters.get('company'): where_condition += " and so.company = '{}'".format(filters.get('company')) sales_query =...
27.269231
76
0.723554
6707dfc783befac2999d33d36372211a4e0b90ac
5,597
py
Python
access_control_test.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
access_control_test.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
access_control_test.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- # 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 r...
29.457895
95
0.611935
67f665aef99de73ef20b81132f4cbe9e82705f67
256
py
Python
aoc2020/utils.py
en0/aoc2020
a2f41b909dffe1f366682b3d03fd5fbdbc924ec0
[ "MIT" ]
null
null
null
aoc2020/utils.py
en0/aoc2020
a2f41b909dffe1f366682b3d03fd5fbdbc924ec0
[ "MIT" ]
null
null
null
aoc2020/utils.py
en0/aoc2020
a2f41b909dffe1f366682b3d03fd5fbdbc924ec0
[ "MIT" ]
null
null
null
from functools import reduce def coalesce(a, b): return b if a is None else a def math_product(l): return reduce(lambda a, b: a * b, l, 1) def count_all(a, b): """Count all occurrence of a in b""" return len([1 for w in b if w == a])
17.066667
43
0.617188
2277484bbf8b56b04f875e0ed1bcb92053098952
3,484
py
Python
analyzer/sentimentanalysis.py
ringvorlesung2019mgm/twitter-bingo
f0a1f40024e335977b395049618dafda123e7a8f
[ "Apache-2.0" ]
2
2019-01-15T12:22:43.000Z
2021-09-08T15:58:49.000Z
analyzer/sentimentanalysis.py
ringvorlesung2019mgm/twitter-bingo
f0a1f40024e335977b395049618dafda123e7a8f
[ "Apache-2.0" ]
47
2018-11-08T14:06:13.000Z
2019-01-05T17:40:26.000Z
analyzer/sentimentanalysis.py
ringvorlesung2019mgm/twitter-bingo
f0a1f40024e335977b395049618dafda123e7a8f
[ "Apache-2.0" ]
null
null
null
import re from textblob import TextBlob from textblob_de import TextBlobDE from langdetect import detect from langdetect.lang_detect_exception import LangDetectException from emoji import analyze_emoji_sentimens def clean_tweet(tweet): ''' Utility function to clean tweet text by removing links, special charac...
35.55102
151
0.656142
3f1bc0138378c43d8017c03ecae2177a182653f1
455
py
Python
mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Archive/Archive.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
282
2016-06-16T14:41:44.000Z
2022-03-02T03:43:02.000Z
mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Archive/Archive.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
146
2016-06-16T08:55:45.000Z
2020-09-08T10:37:32.000Z
mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Archive/Archive.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
94
2016-06-16T10:49:07.000Z
2022-03-28T09:14:03.000Z
from mongodb_consistent_backup.Archive.Tar import Tar # NOQA from mongodb_consistent_backup.Archive.Zbackup import Zbackup # NOQA from mongodb_consistent_backup.Pipeline import Stage class Archive(Stage): def __init__(self, manager, config, timer, base_dir, backup_dir): super(Archive, self).__init__(sel...
41.363636
108
0.764835
58bb977ad67737e14362bfa54da901083414e8e3
800
py
Python
data_tests/block_fluidsim.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
data_tests/block_fluidsim.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
data_tests/block_fluidsim.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
from transonic import Transonic ts = Transonic() class MyClass: def _time_step_RK2(self): dt = self.deltat diss, diss2 = self.exact_linear_coefs.get_updated_coefs() compute_tendencies = self.sim.tendencies_nonlin state_spect = self.sim.state.state_spect tendencies_n = co...
26.666667
78
0.56375
1886c1a8823e00f4533385dfd4818924103bc173
2,745
py
Python
Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/08_kapitel_8_repetitionsfragen.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
null
null
null
Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/08_kapitel_8_repetitionsfragen.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/08_kapitel_8_repetitionsfragen.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
# 21_kapitel_8_repetitionsfragen.py # Hier die Antworten zu den Wiederholeungsfragen aus Kapitel 8 import re maxl, dv= 50, 13 def output(): global string print(''.center(maxl, '█')) delta=len(string) % maxl string+=' '*(maxl-delta) suchmuster=re.compile(r'.{'+str(maxl-dv) + r',' + str(maxl) +'}[,|\.|\n| ]', re.DOT...
40.367647
241
0.751548
830df2c321488399aa40b42bdfb058a1dca47ffe
265
py
Python
Online-Judges/DimikOJ/Python/52-search-the-search-2.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/DimikOJ/Python/52-search-the-search-2.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/DimikOJ/Python/52-search-the-search-2.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
for _ in range(int(input())): main_str, sub_str = input().split( ) sub_len = len(sub_str) count = 0 for i in range(len(main_str)): lest_len = (i + sub_len) if main_str[i:lest_len] == sub_str: count += 1 print(count)
26.5
43
0.554717
36969dad236eb5a161a8fe82b1aaebd2f111752f
5,884
py
Python
showcase2/test.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
showcase2/test.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
2
2021-03-25T22:00:07.000Z
2022-01-20T15:51:48.000Z
showcase2/test.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
import pprint # Single line comments start with a number symbol. """ Multiline strings can be written using three "s, and are often used as comments """ "Hello " + "world!" print("Hello" * 3) # A string can be treated like a list of characters print("This is a string"[0]) # => 'T' # A newer way to ...
24.722689
83
0.623046
a1e13211cd209c3b0f9cc8f3f7b30aa093591c3d
226
py
Python
comp/microsoft/011_day_of_week.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2017-05-18T06:11:02.000Z
2017-05-18T06:11:02.000Z
comp/microsoft/011_day_of_week.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
comp/microsoft/011_day_of_week.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution: def day_of_week(self, s, k): week = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] mp = {} for i, d in enumerate(week): mp[d] = i return week[(mp[s] + k) % 7]
28.25
64
0.438053
6297708f25cba5e782551c9a64fdb794e7b057c7
1,575
py
Python
modelindex/models/Collection.py
datumbox/model-index
a39af5f8aaa2a90b8fc7180744a855282360067a
[ "MIT" ]
12
2021-02-26T08:19:00.000Z
2022-01-26T14:00:16.000Z
modelindex/models/Collection.py
datumbox/model-index
a39af5f8aaa2a90b8fc7180744a855282360067a
[ "MIT" ]
null
null
null
modelindex/models/Collection.py
datumbox/model-index
a39af5f8aaa2a90b8fc7180744a855282360067a
[ "MIT" ]
3
2021-03-19T13:51:56.000Z
2021-08-25T05:25:52.000Z
from modelindex.models.Model import Model from modelindex.utils import full_filepath, load_any_file, lowercase_keys class Collection(Model): """A collection of models with common characteristics.""" COMMON_FIELDS = [ "Name", "Metadata", "Results", "Paper", "Code", ...
34.23913
96
0.589841
a7e0b02ffbee9478d2ca4e66019e2b1179f4e4e5
3,193
py
Python
src/kandidaturen/models.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
1
2021-12-20T20:15:26.000Z
2021-12-20T20:15:26.000Z
src/kandidaturen/models.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
null
null
null
src/kandidaturen/models.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
null
null
null
from django.db import models from django.db.models import Q from simple_history.models import HistoricalRecords from aemter.models import Funktion class Kandidatur(models.Model): """ Datenbankmodell Kandidatur Felder: * name: Nachname der Kandidatur. Darf nicht null sein. * vorname: Vorname der K...
34.333333
122
0.697463
3d9e19d0af55e5ff3f8b92f0a7889a039963e2ad
3,117
py
Python
torba/tests/client_tests/unit/test_utils.py
mittalkartik2000/lbry-sdk
a07b17ec0c9c5d0a88bc730caf6ab955e0971b38
[ "MIT" ]
4,076
2018-06-01T05:54:24.000Z
2022-03-07T21:05:52.000Z
torba/tests/client_tests/unit/test_utils.py
mittalkartik2000/lbry-sdk
a07b17ec0c9c5d0a88bc730caf6ab955e0971b38
[ "MIT" ]
80
2018-06-14T01:02:03.000Z
2019-06-19T10:45:39.000Z
torba/tests/client_tests/unit/test_utils.py
braveheart12/lbry-sdk
dc709b468f9dce60d206161785def5c7ace2b763
[ "MIT" ]
20
2018-06-27T21:52:22.000Z
2022-03-08T11:25:23.000Z
import unittest from torba.client.util import ArithUint256 from torba.client.util import coins_to_satoshis as c2s, satoshis_to_coins as s2c class TestCoinValueParsing(unittest.TestCase): def test_good_output(self): self.assertEqual(s2c(1), "0.00000001") self.assertEqual(s2c(10**7), "0.1") ...
32.46875
90
0.63266
b118a21a59e7853404937b4421bc99d8cc3eba72
772
py
Python
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/01_map_function.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
null
null
null
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/01_map_function.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/01_map_function.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ### # File: 01_map_function.py # Project: Kapitel_06_Funktionen # Created Date: Sunday 24.02.2019, 11:14 # Author: Apop85 # ----- # Last Modified: Sunday 24.02.2019, 11:20 # ----- # Copyright (c) 2019 Apop85 # This software is published under the MIT license. # Check http:/...
35.090909
87
0.696891
7701edd987609078aabd72f11f11fa48bc3eebfb
8,497
py
Python
oldp/apps/lib/legal_md/extensions/line_numbers.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
3
2020-06-27T08:19:35.000Z
2020-12-27T17:46:02.000Z
oldp/apps/lib/legal_md/extensions/line_numbers.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
oldp/apps/lib/legal_md/extensions/line_numbers.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
import re from bs4 import BeautifulSoup from markdown import Extension from markdown.postprocessors import Postprocessor from markdown.preprocessors import Preprocessor TABLE_CLASS = 'table table-lines' TR_CLASS = 'line' TD_LINE_NUMBER_CLASS = 'line-number' TD_LINE_CONTENT_CLASS = 'line-content' PLACEHOLDER_BEGIN = ...
35.11157
117
0.529599
029221c566d886aea4ff5b618a7439ef6016a6bd
436
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/doc_fragments/oracle_display_name_option.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/doc_fragments/oracle_display_name_option.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/doc_fragments/oracle_display_name_option.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
# Copyright (c) 2018, Oracle and/or its affiliates. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): DOCUMENTATION = """ options: display_name: description: Use I(display_name) along with the other options to retu...
33.538462
119
0.642202
a2e7f4cc67e216aa722fd219b88605e125115f4e
1,023
py
Python
visitor_counter/counter/test.py
jcromerohdz/FlaskDev
29539259cba3a0e18c205fb439ee916fb12e5318
[ "MIT" ]
null
null
null
visitor_counter/counter/test.py
jcromerohdz/FlaskDev
29539259cba3a0e18c205fb439ee916fb12e5318
[ "MIT" ]
null
null
null
visitor_counter/counter/test.py
jcromerohdz/FlaskDev
29539259cba3a0e18c205fb439ee916fb12e5318
[ "MIT" ]
null
null
null
import os import unittest import pathlib from dotenv import load_dotenv env_dir = pathlib.Path(__file__).parents[1] load_dotenv(os.path.join(env_dir, '.flaskenv')) from counter.models import Counter from application import db from application import create_app as create_app_base from utils.test_db import TestDB clas...
27.648649
53
0.662757
a7615bd3bf2e0508ceba10085234d5c6cc3a7166
2,046
py
Python
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_10_Definition_eigener_Klassen/03_klassenbeispiel_geld_private_attribute.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
null
null
null
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_10_Definition_eigener_Klassen/03_klassenbeispiel_geld_private_attribute.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_10_Definition_eigener_Klassen/03_klassenbeispiel_geld_private_attribute.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ### # File: 03_klassenbeispiel_geld_private_attribute.py # Project: Kapitel_10_Definition_eigener_Klassen # Created Date: Monday 11.03.2019, 15:30 # Author: Apop85 # ----- # Last Modified: Monday 11.03.2019, 15:59 # ----- # Copyright (c) 2019 Apop85 # This software is publi...
31.96875
86
0.671065
a77e6010f1c2a5e3953f0b69b0c90759b94a8ad5
1,607
py
Python
packages/watchmen-data-kernel/src/watchmen_data_kernel/encryption/last_masker.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/encryption/last_masker.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/encryption/last_masker.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import Any, Union from watchmen_data_kernel.common import DataKernelException from watchmen_model.admin import FactorEncryptMethod from .encryptor import Encryptor class LastMasker(Encryptor): def __init__(self, digits: int): self.digits = digits if digits == 3: self.method = FactorEncryptMethod....
28.192982
98
0.701929
ac30b7e356b880a69689309a6e652df9db44bb3e
2,958
py
Python
test/demonst_2_tspdb.py
saeyoung/tslb
5f52646260e14f44c61a670cfc75509951e5e794
[ "MIT" ]
null
null
null
test/demonst_2_tspdb.py
saeyoung/tslb
5f52646260e14f44c61a670cfc75509951e5e794
[ "MIT" ]
3
2020-03-24T18:18:21.000Z
2021-08-23T20:37:09.000Z
test/demonst_2_tspdb.py
saeyoung/tslb
5f52646260e14f44c61a670cfc75509951e5e794
[ "MIT" ]
null
null
null
############################################################# # # TSPDB demonstration # ############################################################# import sys, os sys.path.append("../..") sys.path.append("..") sys.path.append(os.getcwd()) import numpy as np import pandas as pd from datetime import datetime from matp...
25.947368
70
0.582488
ac6f6d9ca74784809146f94c388171eb4a4f9e1e
612
py
Python
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_3/funcoes_p5.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_3/funcoes_p5.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_3/funcoes_p5.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
""" Funções (def) em python - *args **kwargs """ """ def func(a1, a2, a3, a4, a5, nome=None, a6=None): # todo: depois de colocar o nome=None precisa nomear todas variáveis print(a1, a2, a3, a4, a5, nome, a6) return nome, a6 var = func(1, 2, 3, 4, 5, nome='Pedro', a6='5') print(var[0], var[1]) """ def func...
23.538462
129
0.607843
3ba54d5d537fb54c4e27365979f7fb3bac721711
789
py
Python
source/data/batch/writeToDatabase.py
aaarl/Spotify-Auswertung-Big-Data-Plattform
47684db8eb3a8764568c1365dd02a8c2b3975dba
[ "Apache-2.0" ]
1
2021-12-29T20:06:54.000Z
2021-12-29T20:06:54.000Z
source/data/batch/writeToDatabase.py
aaarl/Spotify-Auswertung-Big-Data-Plattform
47684db8eb3a8764568c1365dd02a8c2b3975dba
[ "Apache-2.0" ]
null
null
null
source/data/batch/writeToDatabase.py
aaarl/Spotify-Auswertung-Big-Data-Plattform
47684db8eb3a8764568c1365dd02a8c2b3975dba
[ "Apache-2.0" ]
null
null
null
from pyspark import SparkContext, SQLContext from pyspark.sql import functions as F spark = SparkContext("local[*]", "SQL_Example") sc = SQLContext(spark) df = sc.read.load("hdfs://my-hadoop-cluster-hadoop-hdfs-nn:9000/data/dataset.csv", format="csv", sep=",", inf...
30.346154
82
0.607098
ce482595b316c3376f815aa83e3dde856f96671f
3,077
py
Python
Packs/Base/Scripts/SanePdfReport/SanePdfReport_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Base/Scripts/SanePdfReport/SanePdfReport_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Base/Scripts/SanePdfReport/SanePdfReport_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from SanePdfReport import * import subprocess import os import http.client def test_find_zombie_processes(mocker): ps_output = ''' PID PPID S CMD 1 0 S python /tmp/pyrunner/_script_docker_python_loop.py 39 1 Z [soffice.bin] <defunct> 55 1 Z [gpgconf] <defunct...
38.4625
118
0.706857
50116fee1b8d7655df07696546d2b5d2109540c8
3,398
py
Python
research/cv/AVA_hpa/src/loss.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/AVA_hpa/src/loss.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/AVA_hpa/src/loss.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.475
95
0.64332
5015e575f01f280b3335e7633c7a67446cd466ea
364
py
Python
Theories/Algorithms/Recursion1/Pow/pow_x_n.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Theories/Algorithms/Recursion1/Pow/pow_x_n.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Theories/Algorithms/Recursion1/Pow/pow_x_n.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
# def myPow(x, n): # if not n: # return 1 # if n < 0: # return 1 / myPow(x, -n) # if n % 2: # return x * myPow(x, n - 1) # return myPow(x * x, n / 2) def myPow(x, n): if n < 0: x = 1 / x n = -n pow = 1 while n: if n & 1: pow *= x ...
18.2
36
0.343407
7640640ebc31149d876d2299f064fe7475cd8153
467
py
Python
LF6/zip_woerterbuch.py
JohannesMuelle/workshops
af9140159e3872aff75864ced99b5163d7bba1ba
[ "CC0-1.0" ]
5
2016-07-07T09:00:31.000Z
2017-03-09T22:46:33.000Z
LF6/zip_woerterbuch.py
JohannesMuelle/workshops
af9140159e3872aff75864ced99b5163d7bba1ba
[ "CC0-1.0" ]
null
null
null
LF6/zip_woerterbuch.py
JohannesMuelle/workshops
af9140159e3872aff75864ced99b5163d7bba1ba
[ "CC0-1.0" ]
8
2016-05-13T14:29:06.000Z
2019-10-20T16:43:32.000Z
import zipfile import sys from threading import Thread zFile = zipfile.ZipFile("evil.zip") def entpackeDatei(zFile, passwort): try: zFile.extractall(pwd=passwort) print("[+]"+passwort+"\n") except: print("[]"+passwort+"\n") pass def main(): passFile = open('German.dic') ...
22.238095
65
0.610278
7660373f3d83294cc8821f697c6ec56e2c958f5a
1,418
py
Python
src/lecture4/ROC_plot/draw_plot.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
1
2020-08-17T07:09:09.000Z
2020-08-17T07:09:09.000Z
src/lecture4/ROC_plot/draw_plot.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
null
null
null
src/lecture4/ROC_plot/draw_plot.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
2
2020-07-26T07:27:57.000Z
2020-08-17T07:09:15.000Z
import matplotlib.pyplot as plt import os import numpy as np from sklearn.metrics import roc_curve color_list = ['red','blue','black','chocolate','yellow','green','pink','violet'] font = {'family': 'Times New Roman', 'weight': 'normal', 'size': 9, } def draw_roc_plot(score_list,true_list,number_list,save_fig_path,fi...
47.266667
146
0.683357
4f743ea6291d34265ede54d49d51123afc13fb56
2,685
py
Python
4_DeepLearning-Advanced/Verbesserung der Netzwerke/TaxiFahrten/Taxi_Data.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
4_DeepLearning-Advanced/Verbesserung der Netzwerke/TaxiFahrten/Taxi_Data.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
4_DeepLearning-Advanced/Verbesserung der Netzwerke/TaxiFahrten/Taxi_Data.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.datasets import fetch_california_housing from sklearn.model_selection import train_test_split from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import StandardScaler class TAXIROUTING: def __init...
44.75
120
0.641341
8c664ee18c39a929d7cd161be5f9c25db015ce73
496
py
Python
setup.py
ISalimzhanov/devops_lab1
ea9b271d5d6fed3f85b2c90f61f4a9dd13c5ece2
[ "PSF-2.0" ]
null
null
null
setup.py
ISalimzhanov/devops_lab1
ea9b271d5d6fed3f85b2c90f61f4a9dd13c5ece2
[ "PSF-2.0" ]
null
null
null
setup.py
ISalimzhanov/devops_lab1
ea9b271d5d6fed3f85b2c90f61f4a9dd13c5ece2
[ "PSF-2.0" ]
null
null
null
from setuptools import find_packages, setup with open("README.md") as f: readme = f.read() with open("LICENSE") as f: license = f.read() setup( name="Simple web app to show current time in Moscow", version="0.1.0", description="Simple web app to show current time in Moscow", long_description=...
26.105263
64
0.685484
0f9854c7721932d097a95c345ded32aceb81ec58
387
py
Python
src/config.py
whfuyn/fyzero
c4c258849a29c84531b54fb67109be6675c28151
[ "MIT" ]
1
2019-02-16T06:27:32.000Z
2019-02-16T06:27:32.000Z
src/config.py
whfuyn/AlphaFy
c4c258849a29c84531b54fb67109be6675c28151
[ "MIT" ]
null
null
null
src/config.py
whfuyn/AlphaFy
c4c258849a29c84531b54fb67109be6675c28151
[ "MIT" ]
null
null
null
# MCTS C_PUCT = 2**0.5 EPSILON = 0.25 # P = (1 - EPSILON) * P + EPSILON * noise ALPHA = 0.03 # Dirichlect noise VIRTUAL_DISCOUNT = 0.8 DEFAULT_PARALLEL_NUM = 8 # Faster at the cost of thinking depth. # Game BOARD_SHAPE = (9, 9) NUM_CONNECTED_TO_WIN = 5 DEFAULT_GUIDE_ENABLED = False # This option is slow. # Networ...
22.764706
65
0.713178
ba005e01dca984a320837ee0b21a90696007bfa8
803
py
Python
tshark_linux.py
ligang945/pyMisc
3107c80f7f53ffc797b289ec73d1ef4db80f0b63
[ "MIT" ]
null
null
null
tshark_linux.py
ligang945/pyMisc
3107c80f7f53ffc797b289ec73d1ef4db80f0b63
[ "MIT" ]
null
null
null
tshark_linux.py
ligang945/pyMisc
3107c80f7f53ffc797b289ec73d1ef4db80f0b63
[ "MIT" ]
null
null
null
#!/usr/bin/python # example: tshark -R (gsm_map.dialogue.destinationReference) -w 124.cap -r \\10.9.29.108\FSRoot\dp10_data\GuangDongYD\GsmMap_GsmCap_E1\xili_data\124.cap import os # linux filter = 's1ap||gtpv2||diameter' src_dir = '/home/genius/new_sc_lte' dst_dir = '/home/genius/new_sc_lte_pure' ...
26.766667
153
0.636364
fa4b08f5b4bd8bdef02c9b3bc9c3ca851feccfe7
350
py
Python
quark_core_api/core/script.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
quark_core_api/core/script.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
quark_core_api/core/script.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
import os, copy class Script(object): def __init__(self, name, directory): self._name = name self._filename = os.path.join(directory, "{}.py".format(name)) @property def name(self): return self._name @property def filename(self): return self._filename def run...
18.421053
70
0.602857
ad5be745a86deb170bd78ec06a50c691c0807880
2,404
py
Python
year_2/prog_base_sem1_cw/app/administer/forms.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
year_2/prog_base_sem1_cw/app/administer/forms.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
21
2020-03-24T16:26:04.000Z
2022-02-18T15:56:16.000Z
year_2/prog_base_sem1_cw/app/administer/forms.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import ValidationError from ..models import Role, User from wtforms.validators import DataRequired, Length, Email, Regexp from wtforms import StringField, TextAreaField, BooleanField, SelectField, SubmitField, DateField class EditProfileAdminForm(FlaskForm): email = St...
43.709091
117
0.668053
d1090de839eca5aaf619b1d99096fd0584070acb
356
py
Python
01.DataStructure/Tree/HG/P42576.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
1
2021-11-21T06:03:06.000Z
2021-11-21T06:03:06.000Z
01.DataStructure/Tree/HG/P42576.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
2
2021-10-13T07:21:09.000Z
2021-11-14T13:53:08.000Z
01.DataStructure/Tree/HG/P42576.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
null
null
null
def solution(participant, completion): answer = '' part = {} for p in participant: if not p in part: part[p] = 1 else: part[p] += 1 for c in completion: if c in part: part[c] -= 1 for k, v in part.items(): if v == 1: ...
19.777778
38
0.441011
d154dbb4fee1c03eadabb48ac567fcdcbb21bd4b
180
py
Python
Object Oriented Programming/monopoly/spiel.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
Object Oriented Programming/monopoly/spiel.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
Object Oriented Programming/monopoly/spiel.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
import spielbrett import die class Spiel: def __init__(self): self.spielbrett = spielbrett.Spielbrett() self.die_1 = die.Die() self.die_2 = die.Die()
18
49
0.633333
d162435f00a4a290f4b7b2e796ddd8a49c4667dc
2,053
py
Python
plugins/tff_backend/bizz/messages.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
null
null
null
plugins/tff_backend/bizz/messages.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
178
2017-08-02T12:58:06.000Z
2017-12-20T15:01:12.000Z
plugins/tff_backend/bizz/messages.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...
45.622222
117
0.741354
7e249d61eae514decc26063db48f6608a2ed86f3
901
py
Python
source/pkgsrc/misc/calibre/patches/patch-setup_build__environment.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__environment.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/misc/calibre/patches/patch-setup_build__environment.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-setup_build__environment.py,v 1.6 2019/03/25 13:11:56 wiz Exp $ Always build like on Linux. --- setup/build_environment.py.orig 2019-03-08 06:09:34.000000000 +0000 +++ setup/build_environment.py @@ -111,8 +111,8 @@ def get_sip_dir(): pyqt['pyqt_sip_dir'] = get_sip_dir() pyqt['sip_inc_dir'] = os.envir...
50.055556
134
0.706992
0e180a911b7d9af995a7beced33f929ef1f674ca
427
py
Python
pythonProj/FZPython/pyquant/libs/utillib.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/pyquant/libs/utillib.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/pyquant/libs/utillib.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
2
2019-04-10T10:05:00.000Z
2021-11-24T17:17:23.000Z
#!/usr/bin/env python # coding: utf8 import time import datetime def get_today(): today = datetime.datetime.now().strftime('%Y-%m-%d') return today def list_to_string(l): l = [str(item) for item in l] return "".join(l) if __name__ == '__main__': """""" from pyquant.db_models import Symb...
15.814815
56
0.65808
0ea6ac4cb94a2b869dcdc94ce8cf668ba00f7eb2
7,636
py
Python
research/audio/wavenet/wavenet_vocoder/modules.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/audio/wavenet/wavenet_vocoder/modules.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/audio/wavenet/wavenet_vocoder/modules.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
35.682243
119
0.619303
7d1f95e6db965ad539fc4c356cc1d37968b087c9
1,252
py
Python
handle_text.py
sambabypapapa/CralwerSet
a76e0660c42ce7aac20b8d07ccc454b6636a8a2a
[ "Apache-2.0" ]
5
2020-08-17T08:37:16.000Z
2021-06-07T05:02:05.000Z
handle_text.py
sambabypapapa/CralwerSet
a76e0660c42ce7aac20b8d07ccc454b6636a8a2a
[ "Apache-2.0" ]
null
null
null
handle_text.py
sambabypapapa/CralwerSet
a76e0660c42ce7aac20b8d07ccc454b6636a8a2a
[ "Apache-2.0" ]
1
2021-06-07T05:02:10.000Z
2021-06-07T05:02:10.000Z
import CralwerSet.connect_mysql as connect_mysql import json import Levenshtein import datetime import pymysql def diff(string, List): for each in List: if Levenshtein.ratio(string, each) > 0.8: return False return True conn = connect_mysql.w_shark_erp() cur = conn.cursor() insertSql = "i...
27.822222
99
0.638179
bc04ac2a6ce67e98da9dffe12d7c6b69e881eb30
4,368
py
Python
fuzzsvc/controller/Host.py
ifoundthetao/FuzzFlow
86559ac7f85fc89510c0d9647e02880edb95aa2a
[ "MIT" ]
53
2016-08-26T02:51:45.000Z
2021-05-24T21:05:44.000Z
controller/Host.py
FingerLeakers/FuzzFlow
3f2de617c3658904f9640f53a05d5e4e90634e32
[ "MIT" ]
null
null
null
controller/Host.py
FingerLeakers/FuzzFlow
3f2de617c3658904f9640f53a05d5e4e90634e32
[ "MIT" ]
31
2016-08-26T04:08:31.000Z
2021-05-24T21:05:54.000Z
from datetime import datetime from flask_restful import Resource, reqparse from model.FuzzingHost import FuzzingHost from model.FuzzingArch import FuzzingArch from model.FuzzingPlatform import FuzzingPlatform from controller.Job import JobManager from app import app db = app.config['db'] class HostCtrl(Resource): ...
34.944
85
0.576465
70db273dbf7f0ce3e66e9cc71ea3e37073902e60
8,180
py
Python
zencad/geom/sweep.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/geom/sweep.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/geom/sweep.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
from zencad.geom.shape import Shape, shape_generator from zencad.lazifier import lazy from zencad.util import vector3 from zencad.geom.trans import translate import zencad.geom.exttrans from OCC.Core.TopAbs import TopAbs_FACE from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakePrism, BRepPrimAPI_MakeRevol from OCC.Core.B...
28.802817
276
0.675672
70eefc1c230d1b55fa9b2183f6e21c8bfb9f72b2
3,455
py
Python
Codeforces/648-2/B.py
dipta007/Competitive-Programming
998d47f08984703c5b415b98365ddbc84ad289c4
[ "MIT" ]
6
2018-10-15T18:45:05.000Z
2022-03-29T04:30:10.000Z
Codeforces/648-2/B.py
dipta007/Competitive-Programming
998d47f08984703c5b415b98365ddbc84ad289c4
[ "MIT" ]
null
null
null
Codeforces/648-2/B.py
dipta007/Competitive-Programming
998d47f08984703c5b415b98365ddbc84ad289c4
[ "MIT" ]
4
2018-01-07T06:20:07.000Z
2019-08-21T15:45:59.000Z
""" Python 3 compatibility tools. """ from __future__ import division, print_function import itertools import sys import os from io import BytesIO, IOBase if sys.version_info[0] < 3: input = raw_input range = xrange filter = itertools.ifilter map = itertools.imap zip = itertools.izip def is_it_local(): ...
20.939394
73
0.574819
cb1cb9ab12d5ffb1fbc7c39aab98b116c9072790
6,318
py
Python
doc/precursers/2019_09-Sneakernet/Sneakernet/udp_peer.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
doc/precursers/2019_09-Sneakernet/Sneakernet/udp_peer.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
doc/precursers/2019_09-Sneakernet/Sneakernet/udp_peer.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
#!/usr/bin/env python3 # sn/udp_peer.py # import bluetooth import base64 import select import socket import sys import time LOGS_DIR = 'logs' import lib.gg as gg import lib.local_db as ldb # server_sock=bluetooth.BluetoothSocket( bluetooth.L2CAP ) PEER_PORT = 0x1001 # --------------------------------------...
37.384615
101
0.524375
0e0f9db9ad47d76b69f3f4412a7a7f10cbf51b8d
397
py
Python
exercises/zh/exc_03_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/zh/exc_03_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/zh/exc_03_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy from spacy.language import Language # 定义定制化组件 @Language.component("length_component") def length_component_function(doc): # 获取doc的长度 doc_length = ____ print(f"This document is {doc_length} tokens long.") # 返回这个doc ____ # 读取小规模的中文流程 nlp = spacy.load("zh_core_web_sm") # 将组件加入到流程的最前面,打...
17.26087
56
0.735516
2db499c418f7cd4975352e65fbe5677313a726cc
236
py
Python
languages/python/exercises/concept/enums/enums.py
AlexLeSang/v3
3d35961a961b5a2129b1d42f1d118972d9665357
[ "MIT" ]
null
null
null
languages/python/exercises/concept/enums/enums.py
AlexLeSang/v3
3d35961a961b5a2129b1d42f1d118972d9665357
[ "MIT" ]
45
2020-01-24T17:04:52.000Z
2020-11-24T17:50:18.000Z
languages/python/exercises/concept/enums/enums.py
AlexLeSang/v3
3d35961a961b5a2129b1d42f1d118972d9665357
[ "MIT" ]
null
null
null
from enum import Enum # Define Log Level Here. class LogLevel(Enum): pass def parse_log_level(message): pass def convert_to_short_log(message): pass def return_alias(): pass def return_members(enum_class): pass
13.111111
34
0.720339
2dc2e298e40a0767c93e33b592f622a13cca364e
90
py
Python
agspiel/api/__init__.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2021-03-09T21:37:41.000Z
2021-03-09T21:37:41.000Z
agspiel/api/__init__.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
4
2020-11-13T19:34:58.000Z
2021-07-24T16:25:27.000Z
agspiel/api/__init__.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2020-08-24T14:38:18.000Z
2020-08-24T14:38:18.000Z
# Copyright (c) 2020 | KingKevin23 (@kingkevin023) from .api import Api __all__ = [Api]
18
51
0.7
93515ffc53732b0aaf2f9e4052b5a519e4ad1493
2,682
py
Python
app/recipe/tests/test_ingredients_api.py
Sahinovic/Kuhar
b01cef5f6f0013196d96c8b71f3cf39a8cc149de
[ "MIT" ]
null
null
null
app/recipe/tests/test_ingredients_api.py
Sahinovic/Kuhar
b01cef5f6f0013196d96c8b71f3cf39a8cc149de
[ "MIT" ]
null
null
null
app/recipe/tests/test_ingredients_api.py
Sahinovic/Kuhar
b01cef5f6f0013196d96c8b71f3cf39a8cc149de
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Ingredient from recipe.serializers import IngredientSerializer INGREDIENTS_URL=reverse ('recipe:ingredie...
35.289474
76
0.673751
521f99911a3361971dc457a3990310b5ee9c4687
5,746
py
Python
Utils/py/MotionAnalysis/motor_vs_sensor_joint.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/MotionAnalysis/motor_vs_sensor_joint.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/MotionAnalysis/motor_vs_sensor_joint.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import BehaviorParser from matplotlib import pyplot from mpl_toolkits.mplot3d import Axes3D import numpy as np import math JointID = { "HeadPitch": 0, "HeadYaw": 1, "RShoulderRoll": 2, "LShoulderRoll": 3, "RShoulderPitch": 4, "LShoulderPitch": 5, "RElbowRoll": 6, "LElbowRoll": 7, "RElbowYaw": 8, "...
29.020202
112
0.555517
5e75c2c3885be33e725c3577a89a46eeafa40431
9,927
py
Python
main.py
jorgeaugustocarvalho/Sinbad-Bot
4370f6cf598e88a25023dd821b489ecf34b924a9
[ "MIT" ]
null
null
null
main.py
jorgeaugustocarvalho/Sinbad-Bot
4370f6cf598e88a25023dd821b489ecf34b924a9
[ "MIT" ]
null
null
null
main.py
jorgeaugustocarvalho/Sinbad-Bot
4370f6cf598e88a25023dd821b489ecf34b924a9
[ "MIT" ]
null
null
null
import discord import emoji from deep_translator import GoogleTranslator from discord.ext import commands import random import asyncio import time client = commands.Bot(command_prefix = "$", case_insensitive = True) @client.event async def on_ready(): print(' "Humanos são como oceanos, e não há ondas que eu não p...
31.119122
276
0.569256
df00149bd31d5c6665b2f0640308cdd53673d227
173
py
Python
books/python_workout/code_examples/main.py
roskenet/Playground
3cce70eeb38646b0f2ffbd071c3aaec7b8f5b9cb
[ "MIT" ]
null
null
null
books/python_workout/code_examples/main.py
roskenet/Playground
3cce70eeb38646b0f2ffbd071c3aaec7b8f5b9cb
[ "MIT" ]
null
null
null
books/python_workout/code_examples/main.py
roskenet/Playground
3cce70eeb38646b0f2ffbd071c3aaec7b8f5b9cb
[ "MIT" ]
null
null
null
#!/usr/bin/env python from killerapp import dothings if __name__ == '__main__': dothings.do_something() # See PyCharm help at https://www.jetbrains.com/help/pycharm/
19.222222
61
0.734104
df4fb8cfb8fb42cb2f6fb30e9d5dc437b737025c
1,331
py
Python
tests/test_utils.py
flat35hd99/jupyter-book
4d5b474e6f2b80c4d1d206e4554740ff82a344dc
[ "BSD-3-Clause" ]
2,109
2020-05-02T23:47:18.000Z
2022-03-31T22:16:54.000Z
tests/test_utils.py
flat35hd99/jupyter-book
4d5b474e6f2b80c4d1d206e4554740ff82a344dc
[ "BSD-3-Clause" ]
1,158
2020-04-29T18:07:02.000Z
2022-03-31T21:50:57.000Z
tests/test_utils.py
flat35hd99/jupyter-book
4d5b474e6f2b80c4d1d206e4554740ff82a344dc
[ "BSD-3-Clause" ]
360
2020-04-29T14:44:49.000Z
2022-03-31T09:26:23.000Z
import pytest from click.testing import CliRunner from jupyter_book.cli.main import init as myst_init from jupyter_book.utils import init_myst_file def test_myst_init(cli: CliRunner, temp_with_override): """Test adding myst metadata to text files.""" path = temp_with_override.joinpath("tmp.md").absolute() ...
34.128205
80
0.694966
df6bf24410286fec6ca4aa8edb5e29fcb3cc437a
21,068
py
Python
src/onegov/org/path.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/path.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/path.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" Contains the paths to the different models served by onegov.org. """ import sedate from datetime import date from onegov.chat import MessageCollection from onegov.core.converters import extended_date_converter from onegov.core.converters import json_converter from onegov.directory import Directory from onegov.dir...
29.799151
78
0.714116
df812529cb5c551b07dbe362213271afc6b3be17
253
py
Python
model/particleState.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
model/particleState.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
model/particleState.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
""" Element of the model. Contains the ParticleState enum. """ from enum import Enum class ParticleState(Enum): """ Contains all health states """ HEALTHY = 1 INFECTED = 2 INFECTIOUS = 3 IMMUNE = 4 DECEASED = 5
14.882353
36
0.600791
800b673f4321da98e2a44074024d66ef2cbd622b
526
py
Python
py-basics/src/lectures/lists/exercise3.py
AndrasTarlos/s4f
bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426
[ "CC0-1.0" ]
null
null
null
py-basics/src/lectures/lists/exercise3.py
AndrasTarlos/s4f
bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426
[ "CC0-1.0" ]
null
null
null
py-basics/src/lectures/lists/exercise3.py
AndrasTarlos/s4f
bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426
[ "CC0-1.0" ]
4
2021-12-13T15:52:00.000Z
2022-03-28T13:54:53.000Z
""" List Exercise 3 Implementieren Sie die Funktion except_for(), welche eine Kopie von 'my_list' zurückgibt, ohne dass die ausgeschlossenen Elemente 'excluded' darin enthalten sind. Benutzen Sie die nachfolgenden Tests zur Kontrolle. """ def except_for(my_list, excluded): result = [] for element in my_list:...
26.3
120
0.661597
1d5bd107e83f7bab18f500ff0edd5c08cd3c8c1d
999
py
Python
assignments/ps0-template/tests.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
1
2022-02-26T13:52:31.000Z
2022-02-26T13:52:31.000Z
assignments/ps0-template/tests.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
null
null
null
assignments/ps0-template/tests.py
tallamjr/mit-6006
c2aa6bb48edef5800c0779ba2eebd697d44249b5
[ "MIT" ]
null
null
null
import unittest from count_long_subarray import count_long_subarray tests = ( ( (2, 2, 4, 1, 4), 2, ), ( (7, 8, 5, 7, 7, 3, 2, 8), 3, ), ( (7, 7, 9, 1, 2, 11, 9, 6, 2, 8, 9), 2, ), ( (4, 18, 10, 8, 13, 16, 18, 1, 9, 6, 11, 13, 12, 5, 7...
24.365854
99
0.525526
1d6d04fb7d80dce648998ffe6f6acd6cdcbad560
1,824
py
Python
criterion/SE.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
2
2020-12-22T08:40:05.000Z
2021-03-30T08:09:44.000Z
criterion/SE.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
criterion/SE.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable #TODO:未正式启用 class SELoss(nn.Module): def __init__(self, num_classes=6): super(SELoss, self).__init__() self.bce = nn.BCELoss() self.num_classes = num_classes ...
26.057143
71
0.570724
d5a473b2d1c767031f6b3f614ce9d6e371274287
1,103
py
Python
server/apps/movie/views.py
Mayandev/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
129
2019-04-20T08:23:25.000Z
2022-03-14T10:02:23.000Z
server/apps/movie/views.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
9
2019-05-19T15:06:17.000Z
2021-12-14T06:47:14.000Z
server/apps/movie/views.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
34
2019-05-06T06:37:17.000Z
2021-12-09T02:27:58.000Z
from django.shortcuts import render # Create your views here. from movie.serializers import MovieSerializer, GenreSerializer from .models import Movie, Genre from rest_framework import mixins, viewsets from rest_framework.pagination import PageNumberPagination class MoviePagination(PageNumberPagination): ''' ...
24.511111
67
0.685403
985c95116cc3e3646123324743d676791fd72f96
462
py
Python
packages/watchmen-data-surface/src/watchmen_data_surface/settings.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-surface/src/watchmen_data_surface/settings.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-surface/src/watchmen_data_surface/settings.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from logging import getLogger from pydantic import BaseSettings logger = getLogger(__name__) class DataSurfaceSettings(BaseSettings): TRUNCATE_TOPIC_DATA: bool = True class Config: # secrets_dir = '/var/run' env_file = '.env' env_file_encoding = 'utf-8' case_sensitive = True settings = DataSurfaceSetti...
19.25
57
0.761905
7f3f704cf0465e0e557a93ed59164e36aca32b21
1,755
py
Python
test/test_npu/test_network_ops/test_max_v1_backward.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_max_v1_backward.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_max_v1_backward.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law...
38.152174
77
0.692308
7f4815ef07fb18a63e9bc498eb22de5de5f98791
20,675
py
Python
etl/load/pipelines/derive_main.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
etl/load/pipelines/derive_main.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
etl/load/pipelines/derive_main.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
# derive pipeline for cdm_twf import etl.load.primitives.tbl.derive as derive_func import etl.load.primitives.tbl.clean_tbl as clean_tbl from etl.load.primitives.tbl.derive import with_ds from etl.load.primitives.tbl.derive_helper import * import time import os CLEAN_SQL = False IGNORE_LEGACY_DERIVE = True PARRALELL =...
49.22619
197
0.66786
f68a15694ed165ec049ce9ac69a54d627bd8301a
930
py
Python
___Python/Marco/PythonProj/p05_random/m01-wuerfeln.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Marco/PythonProj/p05_random/m01-wuerfeln.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Marco/PythonProj/p05_random/m01-wuerfeln.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
import random r = random.Random() def wuerfeln(): return r.randint(1, 6) # Augenzahl zw. 1 und 6 def muenzwurf(): return r.randit(0, 1) # 0 = Kopf, 1 = Zahl d = {} for i in range(100000): augenzahl = wuerfeln() if augenzahl in d: d[augenzahl] += 1 else: d[augenzahl]...
18.6
61
0.556989
f6ccdd7a5713975aa605501560fcbab3ae3aa197
12,289
py
Python
insomniac/action_runners/interact/action_handle_blogger.py
shifenis/Insomniac
7c9d572b83c29049bc3075073be5549fe821a739
[ "MIT" ]
533
2020-06-01T10:40:11.000Z
2022-03-29T17:05:50.000Z
insomniac/action_runners/interact/action_handle_blogger.py
shifenis/Insomniac
7c9d572b83c29049bc3075073be5549fe821a739
[ "MIT" ]
399
2020-06-01T22:01:55.000Z
2022-03-29T20:39:29.000Z
insomniac/action_runners/interact/action_handle_blogger.py
shifenis/Insomniac
7c9d572b83c29049bc3075073be5549fe821a739
[ "MIT" ]
166
2020-06-01T21:51:52.000Z
2022-03-12T14:14:44.000Z
from functools import partial from insomniac.action_runners.actions_runners_manager import ActionState from insomniac.actions_impl import interact_with_user, InteractionStrategy from insomniac.actions_types import LikeAction, FollowAction, InteractAction, GetProfileAction, StoryWatchAction, \ BloggerInteractionTyp...
50.991701
148
0.667182
12416ad926865ba4956da6f486c631058489c645
726
py
Python
pacman-termux/test/pacman/tests/ignore008.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/ignore008.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/ignore008.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Sync with relevant ignored fnmatched packages" package1 = pmpkg("foopkg", "1.0-1") self.addpkg2db("local", package1) package2 = pmpkg("barpkg", "2.0-1") self.addpkg2db("local", package2) package3 = pmpkg("bazpkg", "3.0-1") self.addpkg2db("local", package3) package1up = pmpkg("foopkg", "2.0-1") ...
24.2
66
0.699725
125d65741d533d781e6c44a1055f77d2fa988417
6,086
py
Python
official/cv/deeplabv3/ascend310_quant_infer/post_quant.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/deeplabv3/ascend310_quant_infer/post_quant.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/deeplabv3/ascend310_quant_infer/post_quant.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.977011
116
0.687808
89c76706dec7cc2dc6dc72574a2fb4564ab638cf
1,829
py
Python
Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/07_zahlenraten.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
null
null
null
Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/07_zahlenraten.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/07_zahlenraten.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
# Kleines Spiel bei welchem eine Zahl zwischen 1 und x erraten werden soll. from random import randint as rng print('Lass uns ein Spiel spielen.\n\nIch denke mir eine Zahl zwischen 1 und X aus \nund du musst sie erraten.') print('Welche Zahl sollen wir für X nehmen?') while True: try: maxcnt = int(input())...
35.862745
137
0.564243
d607b2f745ed5b9d0fea712929cb5363cb412603
558
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v10_0/add_default_cash_flow_mappers.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
frappe-bench/apps/erpnext/erpnext/patches/v10_0/add_default_cash_flow_mappers.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v10_0/add_default_cash_flow_mappers.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from erpnext.setup.install import create_default_cash_flow_mapper_templates def execute(): frappe.reload_doc('accounts', 'doctype', frappe.scrub('Cash Flo...
34.875
96
0.777778
c3bb0009437d4eedbadb5326a06698ffa3a66c04
2,252
py
Python
MAIN/STM32F405/V03/system.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
MAIN/STM32F405/V03/system.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
MAIN/STM32F405/V03/system.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
import utime from SX1239 import SX1239 from display import Display, NextionCommand import userControl from register import DataBase DB = DataBase() SX1239 = SX1239() Display = Display() NEXTIONCOMMAND = NextionCommand() NEXTIONCOMMAND.ClearAllBuffer() NEXTIONCOMMAND.Page.Buffer = NEXTIONCOMMAND.Page.FfV16 NEXTIONCO...
31.277778
80
0.698934
c3ce44d8eca06c9c8d27f41802e20c5c0c6e70fb
1,106
py
Python
flask/microblog-db/migrations/versions/fe7de99e910c_.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
flask/microblog-db/migrations/versions/fe7de99e910c_.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
2
2021-03-25T22:00:07.000Z
2022-01-20T15:51:48.000Z
flask/microblog-login/migrations/versions/fe7de99e910c_.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
"""empty message Revision ID: fe7de99e910c Revises: None Create Date: 2019-04-14 13:50:33.492638 """ # revision identifiers, used by Alembic. revision = 'fe7de99e910c' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): # ### commands auto generated by Alembic - please adjust! #...
28.358974
71
0.68264
61b8c61b685cc1d67cb961e68261153e29159efc
668
py
Python
features/mona.py
BogyMitutoyoCTL/Riesen-Tetris
8bbbaf0b7aeae7890da724d3d72719a7d068237a
[ "MIT" ]
1
2019-04-27T07:28:52.000Z
2019-04-27T07:28:52.000Z
features/mona.py
BogyMitutoyoCTL/Riesen-Tetris
8bbbaf0b7aeae7890da724d3d72719a7d068237a
[ "MIT" ]
null
null
null
features/mona.py
BogyMitutoyoCTL/Riesen-Tetris
8bbbaf0b7aeae7890da724d3d72719a7d068237a
[ "MIT" ]
null
null
null
import time from PIL import Image from features.feature import Feature class Mona(Feature): def __init__(self, field_leds, field_matrix, rgb_field_painter, led_matrix_painter): super(Mona, self).__init__(field_leds, field_matrix, rgb_field_painter, led_matrix_painter) def event(self, eventname: st...
25.692308
99
0.643713
9cb9b695c291d853d84d5de5fffb4ecaba2abe8d
806
py
Python
Algorithms/Sorting/insertion_part1.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Sorting/insertion_part1.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Sorting/insertion_part1.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import copy def insertion_sort(ar): for i in range(1, len(ar)): key = ar[i] j = i - 1 while j > -1 and key < ar[j]: ar[j + 1] = ar[j] j = j - 1 ar[j+1] = key return ar n = int(input().strip()) ar = list(map(int, input(...
22.388889
48
0.496278
2e954e6a7cb2dc1e0a38a99d6c42a6fb88757704
626
py
Python
src/common/losses/factory.py
AakashMallik/cnn-firefly
6c8ed58a035e62682263753436b124cb979ed240
[ "MIT" ]
null
null
null
src/common/losses/factory.py
AakashMallik/cnn-firefly
6c8ed58a035e62682263753436b124cb979ed240
[ "MIT" ]
7
2020-11-27T12:24:31.000Z
2020-11-29T09:41:09.000Z
src/common/losses/factory.py
AakashMallik/cnn-firefly
6c8ed58a035e62682263753436b124cb979ed240
[ "MIT" ]
null
null
null
from torch.nn import (CrossEntropyLoss, NLLLoss, MSELoss, BCEWithLogitsLoss, BCELoss) from ..interfaces import FactoryInterface class LossFactory(FactoryInterface): lookup_table = { "CrossEntropyLoss": CrossEntropyLoss, "NLLLoss": NLLLoss, "BCELoss": BCELoss } ...
28.454545
71
0.63099
2ecd3ca2b79a0bf4094f52041728bb4be4e58b39
97
py
Python
python/coursera_python/MICHIGAN/exception/exce.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/MICHIGAN/exception/exce.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/MICHIGAN/exception/exce.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
try: print 1/0 except ZeroDivisionError: print "You can't divide by zero, you're silly."
19.4
51
0.690722
25c83b797046de26d5afb050d286066e380a1459
139
py
Python
Java/Secao13EnumeracoesComposicao/aaa.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Java/Secao13EnumeracoesComposicao/aaa.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Java/Secao13EnumeracoesComposicao/aaa.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
num = 9 p = 0 i = 0 while(num > 0): if num % 2 == 0: p = p + 1 else: i = i + 1 num = num - 1 print(p) print(i)
11.583333
20
0.381295
6cba3e8d0e08a30ebb74430ca68cd975d9e556a4
8,303
py
Python
RDS/circle2_use_cases/metadata/src/lib/Metadata.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle2_use_cases/metadata/src/lib/Metadata.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle2_use_cases/metadata/src/lib/Metadata.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
import requests import logging import json import os from lib.Research import Research from RDS import Util logger = logging.getLogger() class Metadata: def __init__(self, testing: str = None): """ This is the constructor. No needed parameters. Testing has to be valid url string without ...
32.057915
132
0.574009
4ca2ef019111ae8eddca623d85e21253316e227a
230
py
Python
exercises/ja/exc_02_02_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/ja/exc_02_02_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/ja/exc_02_02_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy nlp = spacy.blank("ja") doc = nlp("デヴィッド・ボウイはPERSONです") # ラベル「PERSON」のハッシュを引く person_hash = ____.____.____[____] print(person_hash) # person_hashを引いて文字列を取得 person_string = ____.____.____[____] print(person_string)
17.692308
36
0.769565
e23e1a72fab0493f19bd65ca7c6423397274eb28
95
py
Python
Python/main.py
SchickDominik/progprojects
1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2
[ "MIT" ]
null
null
null
Python/main.py
SchickDominik/progprojects
1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2
[ "MIT" ]
9
2020-08-19T19:31:51.000Z
2020-09-01T15:30:43.000Z
Python/main.py
SchickDominik/progprojects
1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2
[ "MIT" ]
2
2020-08-19T16:00:58.000Z
2020-08-21T08:16:23.000Z
import math sum = 0 for i in range(1,1000000000): sum+=math.sqrt((1/(i**2))*6) print(sum)
13.571429
32
0.621053
392470f9769301ab6c1ef0541d17a52b0a754fdf
632
py
Python
balsn-2021-writeup/alldata/crypto/1337pins/dist/deploy/src/test.py
Jimmy01240397/balsn-2021-writeup
91b71dfbddc1c214552280b12979a82ee1c3cb7e
[ "MIT" ]
null
null
null
balsn-2021-writeup/alldata/crypto/1337pins/dist/deploy/src/test.py
Jimmy01240397/balsn-2021-writeup
91b71dfbddc1c214552280b12979a82ee1c3cb7e
[ "MIT" ]
null
null
null
balsn-2021-writeup/alldata/crypto/1337pins/dist/deploy/src/test.py
Jimmy01240397/balsn-2021-writeup
91b71dfbddc1c214552280b12979a82ee1c3cb7e
[ "MIT" ]
null
null
null
import multiprocessing as mp def job(x, q): result = x for i in range(10): result += i print(result) q.put(result) # 使用 multiprocessing 須在 main 裡面用 if __name__=='__main__': q = mp.Queue() # 使用 queue 接收 function 的回傳值 p1 = mp.Process(target=job, args=(55, q)) # 特別注意 這邊的傳入參數只有一個的話,後面要有逗...
21.793103
73
0.558544
204573214c46297eaa4f62f94e8b3759df9f323a
1,137
py
Python
pandemie/util/plot_score.py
marvinsxtr/informaticup-2020-pandemie
0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89
[ "MIT" ]
null
null
null
pandemie/util/plot_score.py
marvinsxtr/informaticup-2020-pandemie
0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89
[ "MIT" ]
null
null
null
pandemie/util/plot_score.py
marvinsxtr/informaticup-2020-pandemie
0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89
[ "MIT" ]
1
2020-03-28T00:02:41.000Z
2020-03-28T00:02:41.000Z
""" This file is a useful to plot the currently used score function. """ from numpy import arange from matplotlib import pyplot as plt try: from pandemie.tester.tester import Tester, SCORE_HALVED except ModuleNotFoundError: print("To run execute `python -m pandemie.util.plot_score` in the project folder") ...
21.865385
86
0.666667
b3a6510fdd01a0cb7a721178c6e85fae98cfb182
92
py
Python
2014/06/table-gallup-institutions/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2014/06/table-gallup-institutions/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2014/06/table-gallup-institutions/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 = '18p1S-xRUSvtFxtFXCgoqXwqXuWdwAAIT1dn1238cNn4'
23
68
0.836957
b3adaa2f870215119c39195f0ded325efcf3a0fb
8,245
py
Python
3DNet/train_RSNA19.py
BhaveshJP25/RSNA
48d85faf82651b1ae4fdcd829ce2d4978a858d3f
[ "MIT" ]
null
null
null
3DNet/train_RSNA19.py
BhaveshJP25/RSNA
48d85faf82651b1ae4fdcd829ce2d4978a858d3f
[ "MIT" ]
null
null
null
3DNet/train_RSNA19.py
BhaveshJP25/RSNA
48d85faf82651b1ae4fdcd829ce2d4978a858d3f
[ "MIT" ]
null
null
null
''' Written by SeuTao ''' from setting import parse_opts from datasets.TReNDs import TReNDsDataset from model import generate_model import torch import numpy as np from torch import nn from torch.utils.data import DataLoader import time import os from tqdm import tqdm def metric(y_true, y_pred): return np.mean(np...
34.070248
153
0.572953
80a767a844ca9d997984f137ce8ea799e418f7c5
715
py
Python
python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-classes.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-classes.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-classes.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ CS231n Convolutional Neural Networks for Visual Recognition http://cs231n.github.io/ Python Numpy Tutorial http://cs231n.github.io/python-numpy-tutorial/ Numpy Reference https://docs.scipy.org/doc/numpy/reference/  ̄ 2019-07-02 (Tue) """ # Python Numpy Tutorial > Clas...
21.666667
59
0.643357
039d1a0df018f5cfdd3f4cf1972e6bf2a4f8a5de
2,677
py
Python
recipes/cxsparse/3.1.1/conanfile.py
SolarFramework/conan-solar
cdb6253556c056baacaf3e5f28b595869adddb88
[ "Apache-2.0" ]
null
null
null
recipes/cxsparse/3.1.1/conanfile.py
SolarFramework/conan-solar
cdb6253556c056baacaf3e5f28b595869adddb88
[ "Apache-2.0" ]
3
2021-02-15T08:48:16.000Z
2021-02-24T16:35:54.000Z
recipes/cxsparse/3.1.1/conanfile.py
SolarFramework/conan-solar
cdb6253556c056baacaf3e5f28b595869adddb88
[ "Apache-2.0" ]
null
null
null
import os import shutil from conans import ConanFile, tools, CMake from conans.errors import ConanInvalidConfiguration class cxsparsesolverConan(ConanFile): name = "cxsparse" filename = "CXSparse" license = "GNU Lesser General Public License" url = "https://github.com/Solar-Framework/conan-solar/recipe...
39.955224
97
0.642137