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
433121a14dc91c926ec3720a84aee58c450f37b1
4,176
py
Python
v501_502/python/ausgleich.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
2
2019-12-10T10:25:11.000Z
2021-01-26T13:59:40.000Z
v501_502/python/ausgleich.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
null
null
null
v501_502/python/ausgleich.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
1
2020-12-06T21:24:58.000Z
2020-12-06T21:24:58.000Z
import numpy as np import matplotlib.pyplot as plt from uncertainties import ufloat from scipy import optimize import uncertainties.unumpy as unp distanz = np.linspace(0,8,3) def fit(x, a, b): return a*x + b D500, Ud500 = np.genfromtxt("python/D0.txt", unpack=True) D500 *= 6e-3 # für länge in metern params500,...
34.8
79
0.687979
4343fcc152ddd841ac13c3b0a58320ac15576867
1,957
py
Python
venv/lib/python3.7/site-packages/twilio/rest/supersim/__init__.py
uosorio/heroku_face
7d6465e71dba17a15d8edaef520adb2fcd09d91e
[ "Apache-2.0" ]
3
2020-12-14T03:29:02.000Z
2020-12-24T22:04:48.000Z
venv/lib/python3.7/site-packages/twilio/rest/supersim/__init__.py
uosorio/heroku_face
7d6465e71dba17a15d8edaef520adb2fcd09d91e
[ "Apache-2.0" ]
7
2020-06-03T19:08:42.000Z
2021-09-22T19:08:32.000Z
venv/lib/python3.7/site-packages/twilio/rest/supersim/__init__.py
uosorio/heroku_face
7d6465e71dba17a15d8edaef520adb2fcd09d91e
[ "Apache-2.0" ]
4
2021-03-25T09:00:08.000Z
2021-08-05T06:54:23.000Z
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base.domain import Domain from twilio.rest.supersim.v1 import V1 class Supersim(Domain): def __init__(self, twilio): """ Initialize the Supersim Domain :re...
21.988764
87
0.56464
434d4f532491df6f1f2e69ef3cd285c2521056a8
452
py
Python
exercises/ja/solution_03_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/ja/solution_03_06.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/ja/solution_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 = len(doc) print(f"この文章は {doc_length} トークンの長さです。") # docを返す return doc # 小サイズの日本語モデルを読み込む nlp = spacy.load("ja_core_news_sm") # パイプ...
19.652174
44
0.752212
43552918b351583618377e03d293d80e39587356
5,594
py
Python
src/onegov/election_day/layouts/election_compound.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/layouts/election_compound.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/layouts/election_compound.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from cached_property import cached_property from onegov.core.utils import normalize_for_url from onegov.election_day import _ from onegov.election_day.layouts.detail import DetailLayout from onegov.election_day.utils import pdf_filename from onegov.election_day.utils import svg_filename class ElectionCompoundLayout(D...
28.110553
77
0.555774
435a62ca4b4982ba1e76852890336e3f72525e30
570
py
Python
mitglieder/forms.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
8
2019-11-26T13:34:46.000Z
2021-06-21T13:41:57.000Z
mitglieder/forms.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
93
2019-12-16T09:29:10.000Z
2021-04-24T12:03:33.000Z
mitglieder/forms.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
2
2020-12-03T12:43:19.000Z
2020-12-22T21:48:47.000Z
from django import forms from mitglieder.models import Mitglied, MitgliedAmt, MitgliedMail from aemter.models import Funktion, Unterbereich, Organisationseinheit class MitgliedForm(forms.Form): vorname = forms.CharField(required=True) name = forms.CharField(required=True, label='nachname') spitzname = form...
43.846154
70
0.773684
71d33bce91f74d823ffc5871e6fc710581d47efb
1,938
py
Python
Packs/CommonScripts/Scripts/ExtractEmailFormatting/ExtractEmailFormatting_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/ExtractEmailFormatting/ExtractEmailFormatting_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/ExtractEmailFormatting/ExtractEmailFormatting_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from ExtractEmailFormatting import verify_is_email, main import pytest import demistomock as demisto testdata = [ ('Xsoar@test.org.de', True), ('xsoar@test.net.bla', True), ('Xsoar@test.uk.Png', False), ('Xsoar@test.eml', False), ('Xsoar@test.new.Docx', False), ('entry@id.com.gif', False), ...
32.3
99
0.652219
1bfadf880f2ff41c11d381d54817c11fd5c2c52d
25,500
py
Python
gui_v6.py
Beanarny/Praca_inz
38f843af8deeb1f1be6c77b553cfdcc4ad2a7c00
[ "MIT" ]
null
null
null
gui_v6.py
Beanarny/Praca_inz
38f843af8deeb1f1be6c77b553cfdcc4ad2a7c00
[ "MIT" ]
null
null
null
gui_v6.py
Beanarny/Praca_inz
38f843af8deeb1f1be6c77b553cfdcc4ad2a7c00
[ "MIT" ]
null
null
null
import sys from PyQt5 import QtWidgets from PyQt5.QtCore import pyqtSlot, QTime, QDate from PyQt5.QtWidgets import QApplication, QDialog, QMainWindow, QWidget, QSlider, QTimeEdit, QDateEdit from PyQt5.uic import loadUi from time import sleep import csv import mysql.connector import datetime import matplotlib.p...
51.102204
302
0.548863
403b4921121942b7e0cd56bc308f250be15e883d
4,215
py
Python
Analyzer.py
Yashraj890/StockAnalyzer
96311362c85a224833a23c08148df956a64e177c
[ "MIT" ]
null
null
null
Analyzer.py
Yashraj890/StockAnalyzer
96311362c85a224833a23c08148df956a64e177c
[ "MIT" ]
null
null
null
Analyzer.py
Yashraj890/StockAnalyzer
96311362c85a224833a23c08148df956a64e177c
[ "MIT" ]
null
null
null
import pandas as pd from openpyxl import Workbook from openpyxl import load_workbook # let's read the sectors data from workbook Sectorswb = load_workbook(r'D:\NSEData\Sectors.xlsx') # let's read the Company Symbol data from workbook CompanySymbolwb = load_workbook(r'D:\NSEData\CompanySymbol.xlsx') # let's output th...
40.142857
107
0.705101
4075f1077277de0f6c298e1013624e3aba1bb2d8
2,555
py
Python
test/test_create_keys.py
st3fan/sphinx-automation-experiment
c92c8400770c6c604e2451e4f1e71957fc4c5ef8
[ "Apache-2.0" ]
null
null
null
test/test_create_keys.py
st3fan/sphinx-automation-experiment
c92c8400770c6c604e2451e4f1e71957fc4c5ef8
[ "Apache-2.0" ]
null
null
null
test/test_create_keys.py
st3fan/sphinx-automation-experiment
c92c8400770c6c604e2451e4f1e71957fc4c5ef8
[ "Apache-2.0" ]
null
null
null
""" pghoard - test key generation tools Copyright (c) 2016 Ohmu Ltd See LICENSE for details """ import json import os import shutil import sys from unittest import mock import pytest from pghoard import create_keys from pghoard.rohmu.errors import InvalidConfigurationError def test_create_config_with_keys(): s...
38.712121
117
0.71546
dc15bd9278b0b58838cd60d5c22544c6010816e3
516
py
Python
src/onegov/fsi/initial_content.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/initial_content.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/initial_content.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.utils import module_path from onegov.org.initial_content import load_content, add_pages from onegov.org.models import Organisation def create_new_organisation(app, name, locale='de_CH'): assert locale == 'de_CH' path = module_path('onegov.fsi', 'content/de.yaml') content = load_content(p...
24.571429
62
0.717054
90b8e4397211eae263e67bd3dbe4df965540b071
6,505
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/losses/bmn_loss.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
883
2020-11-12T11:46:46.000Z
2022-03-31T18:27:10.000Z
paddlevideo/modeling/losses/bmn_loss.py
arkofgalaxy/PaddleVideo
64251233c83b7eb681061b454da198a9082309a6
[ "Apache-2.0" ]
233
2020-12-09T06:04:59.000Z
2022-03-28T08:16:51.000Z
paddlevideo/modeling/losses/bmn_loss.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...
41.433121
79
0.592621
29041a8050fdc33d13eddce7d903472ba6de1426
2,248
py
Python
software/supervisor/serial_interface.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
null
null
null
software/supervisor/serial_interface.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
null
null
null
software/supervisor/serial_interface.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
1
2020-03-08T01:50:58.000Z
2020-03-08T01:50:58.000Z
import serial import struct import time class SerialInterface(): def __init__(self, wait_timeout, real_sensor_id): self.wait_timeout = wait_timeout self.real_sensor_id = real_sensor_id self.ser = serial.Serial('/dev/tty.usbserial-A9X2VVZC', 9600, timeout=5) def read(self): r...
29.194805
80
0.576068
293f56160e7398964fc97047a353cc782d61a39a
294
py
Python
2206-divide-array-into-equal-pairs/2206-divide-array-into-equal-pairs.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
2206-divide-array-into-equal-pairs/2206-divide-array-into-equal-pairs.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
2206-divide-array-into-equal-pairs/2206-divide-array-into-equal-pairs.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def divideArray(self, nums: List[int]) -> bool: freq = {n: nums.count(n) for n in set(nums)} output = 0 for _, v in freq.items(): output+=v//2 if output==len(nums)//2: return True else: return False
29.4
52
0.496599
4669cc6ccbb3184e4662a620813875584dd20bcc
10,319
py
Python
lale/lib/sklearn/nmf.py
vishalbelsare/lale
654ca29ec0234b478d26724a25df28b28f5c0bc0
[ "Apache-2.0" ]
265
2019-08-06T14:45:43.000Z
2022-03-30T23:57:48.000Z
lale/lib/sklearn/nmf.py
vishalbelsare/lale
654ca29ec0234b478d26724a25df28b28f5c0bc0
[ "Apache-2.0" ]
467
2019-08-08T02:01:21.000Z
2022-03-25T16:12:00.000Z
lale/lib/sklearn/nmf.py
vishalbelsare/lale
654ca29ec0234b478d26724a25df28b28f5c0bc0
[ "Apache-2.0" ]
81
2019-08-07T19:59:31.000Z
2022-03-31T09:11:58.000Z
# Copyright 2019 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.207018
136
0.469135
46a1c7305ebd8c63e5ebab21850bb15cca631389
2,855
py
Python
SoSe-21/Webscraper/IMDb-Webscraper.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
1
2022-03-23T09:40:39.000Z
2022-03-23T09:40:39.000Z
SoSe-21/Webscraper/IMDb-Webscraper.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
SoSe-21/Webscraper/IMDb-Webscraper.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
# Requests wird benötigt, um einen GET Request zu stellen import requests from requests import get # Übersetzung der Website in Text from bs4 import BeautifulSoup # Zusammensetzen der Daten in DataFrames import pandas as pd # Forcieren der englischen Website headers = {"Accept Language": "en-US, en; q=0.5"} # URL ...
32.816092
118
0.69282
46b13d4f573753e73d6fc7e505495825e9bb8fee
3,358
py
Python
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/05-Python-and-Raw-SQL/main.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/05-Python-and-Raw-SQL/main.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/05-Python-and-Raw-SQL/main.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
from fastapi import status from fastapi import FastAPI, Response, HTTPException from pydantic import BaseModel from psycopg2.extras import RealDictCursor import psycopg2 import time class Post(BaseModel): title: str content: str published: bool = True while True: try: conn = psycopg2.connect...
21.947712
72
0.531864
318a3f1e74b61b43465b4b1bcc8294edffbe6c8c
6,446
py
Python
web/controllers/api/My.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
1
2020-03-24T04:26:34.000Z
2020-03-24T04:26:34.000Z
web/controllers/api/My.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
web/controllers/api/My.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from web.controllers.api import route_api from flask import request, jsonify,g from common.models.food.Food import Food from application import app,db from common.models.pay.PayOrder import PayOrder from common.models.pay.PayOrderItem import PayOrderItem from common.libs.UrlManager import UrlMan...
35.811111
105
0.723549
9ef66edc3454e9a4ebc8183c43f9deff9632b42d
3,461
py
Python
frappe-bench/apps/erpnext/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import flt, today from erpnext.accounts.utils import get_fiscal_year, now from erpnext.accounts.doctype...
40.717647
99
0.748916
731591034b90aa51770d738ada9dc5a60b5fbb99
575
py
Python
U_Image_Test.py
Klark007/Selbstfahrendes-Auto-im-Modell
d7fe81392de2b29b7dbc7c9d929fa0031b89900b
[ "MIT" ]
null
null
null
U_Image_Test.py
Klark007/Selbstfahrendes-Auto-im-Modell
d7fe81392de2b29b7dbc7c9d929fa0031b89900b
[ "MIT" ]
null
null
null
U_Image_Test.py
Klark007/Selbstfahrendes-Auto-im-Modell
d7fe81392de2b29b7dbc7c9d929fa0031b89900b
[ "MIT" ]
null
null
null
""" Replacement option for cv2. New: script to get values from different pixel """ from PIL import Image import numpy as np width = 100 def load_PIL(image_path): img = Image.open(image_path).convert('L') w, h = img.size height = int(h * (width / w)) new_img = img.resize((width, height)) ...
15.540541
50
0.622609
735fbed53c4b1af0b588188795a0f8c3d9b01ca2
8,332
py
Python
apps/process/views.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
2
2018-05-18T08:38:29.000Z
2018-05-22T08:26:09.000Z
apps/process/views.py
IT-PM-OpenAdaptronik/Webapp
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
118
2017-10-31T13:45:09.000Z
2018-02-24T20:51:42.000Z
apps/process/views.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
null
null
null
from django.shortcuts import render, HttpResponseRedirect from apps.calc.measurement import measurement_obj from django.contrib.auth.decorators import login_required import json from .json import NumPyArangeEncoder from apps.projects.models import Experiment, Datarow # Create your views here. @login_required def from...
48.44186
118
0.609337
81f219db88753b46e3e4f5ddcdf7c999ae12fe0f
891
py
Python
Packs/CommonScripts/Scripts/DumpJSON/DumpJSON_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/DumpJSON/DumpJSON_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/DumpJSON/DumpJSON_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from DumpJSON import main import demistomock as demisto import json def test_dump_json(mocker): """ Given: - Key `Level1.Level2` to dump the object nested under it When: - Run DumpJSON Then: - Ensure expected string value is stored in context and returned from the script ...
27.84375
88
0.640853
6f3b01f0f67767fbb0cd69c0f2983900dc4d68e7
3,161
py
Python
contrib/0.挖宝行动/youzidata-机坪跑道航空器识别/src/symbol/loss.py
huaweicloud/ModelArts-Lab
75d06fb70d81469cc23cd422200877ce443866be
[ "Apache-2.0" ]
1,045
2019-05-09T02:50:43.000Z
2022-03-31T06:22:11.000Z
contrib/0.挖宝行动/youzidata-机坪跑道航空器识别/src/symbol/loss.py
huaweicloud/ModelArts-Lab
75d06fb70d81469cc23cd422200877ce443866be
[ "Apache-2.0" ]
1,468
2019-05-16T00:48:18.000Z
2022-03-08T04:12:44.000Z
contrib/0.挖宝行动/youzidata-机坪跑道航空器识别/src/symbol/loss.py
huaweicloud/ModelArts-Lab
75d06fb70d81469cc23cd422200877ce443866be
[ "Apache-2.0" ]
1,077
2019-05-09T02:50:53.000Z
2022-03-27T11:05:32.000Z
import mxnet as mx def sigmoid_ce(pred, label, sample_weight=None): loss = mx.sym.relu(data=pred) - pred * label + \ mx.sym.Activation(data=-mx.sym.abs(pred), act_type='softrelu') if sample_weight is not None: loss = mx.sym.broadcast_mul(loss, sample_weight) return mx.sym.mean(loss, axis=0...
50.174603
82
0.658336
48a0789c3cc4c8eb1fdcc3fe9493274ba403d2b6
2,981
py
Python
src/visitpy/visit_flow/visit_flow_vpe/examples/flow_vpe_pyocl_ops_vort_mag_1.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/visitpy/visit_flow/visit_flow_vpe/examples/flow_vpe_pyocl_ops_vort_mag_1.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/visitpy/visit_flow/visit_flow_vpe/examples/flow_vpe_pyocl_ops_vort_mag_1.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ file: vpe_flow_pyocl_ops_example_1.py author: Cyrus Harrison <cyrush@llnl.gov> created: 3/28...
33.494382
73
0.635693
48a1e45490d688228a79af7549667d3c0dbfbc3a
11,823
py
Python
Packs/FeedCrowdstrikeFalconIntel/Integrations/FeedCrowdstrikeFalconIntel/FeedCrowdstrikeFalconIntel.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedCrowdstrikeFalconIntel/Integrations/FeedCrowdstrikeFalconIntel/FeedCrowdstrikeFalconIntel.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedCrowdstrikeFalconIntel/Integrations/FeedCrowdstrikeFalconIntel/FeedCrowdstrikeFalconIntel.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * # IMPORTS from datetime import datetime import requests from typing import List, Tuple, Optional # Disable insecure warnings requests.packages.urllib3.disable_warnings() INDICATOR_FIELDS_MAPPER = { 'stixid': 'id',...
41.195122
119
0.639685
48f7c25bb712d62d8bc3e1bb5d7defce16b8c382
618
py
Python
pk/data/cluster/dcluster/mds.py
gwdgithubnom/ox-patient
cddf4fe381cb4506db8e0d62803dd2044cf7ad92
[ "MIT" ]
null
null
null
pk/data/cluster/dcluster/mds.py
gwdgithubnom/ox-patient
cddf4fe381cb4506db8e0d62803dd2044cf7ad92
[ "MIT" ]
null
null
null
pk/data/cluster/dcluster/mds.py
gwdgithubnom/ox-patient
cddf4fe381cb4506db8e0d62803dd2044cf7ad92
[ "MIT" ]
1
2021-04-14T00:45:38.000Z
2021-04-14T00:45:38.000Z
import numpy as np from numpy.linalg import * def mds(d, dimensions = 2): """ Multidimensional Scaling - Given a matrix of interpoint distances, find a set of low dimensional points that have similar interpoint distances. """ print('Multidimensional Scaling for scatter plot...') (n,n) = d.s...
30.9
73
0.610032
81bad0a558cc0e58716cd1cc57075e692aecd3d5
251
py
Python
python/coding_dojang/asyncio_async_def.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/coding_dojang/asyncio_async_def.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/coding_dojang/asyncio_async_def.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import asyncio async def hello(): # async def로 네이티브 코루틴을 만듦 print('Hello, world!') loop = asyncio.get_event_loop() # 이벤트 루프를 얻음 loop.run_until_complete(hello()) # hello가 끝날 때까지 기다림 loop.close() # 이벤트 루프를 닫음
31.375
55
0.601594
73bb871be20da77011c5bbd7da5517554519f704
556
py
Python
zd1.py
MaksimSimanskiy/2.10
82ffd1677e250bb79d4c5fe0a0d357d91afd989e
[ "MIT" ]
null
null
null
zd1.py
MaksimSimanskiy/2.10
82ffd1677e250bb79d4c5fe0a0d357d91afd989e
[ "MIT" ]
null
null
null
zd1.py
MaksimSimanskiy/2.10
82ffd1677e250bb79d4c5fe0a0d357d91afd989e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Написать функция, вычисляющую среднее геометрическое своих аргументов а1, а2,… аn. Если функции передается пустой список аргументов, то она должна возвращать значение None """ def geo(*args): if args: values = [float(arg) for arg in args] ...
23.166667
84
0.552158
f7b3891554f592680a9cceb380616a83101d2977
1,248
py
Python
Python/QR_Code_Generator.py
saurabhpal007/hacktoberfest2021-1
5abad37ab426a7b34fc7bcd98ded885fd6ce02ef
[ "CC0-1.0" ]
81
2021-10-01T13:19:13.000Z
2021-10-06T08:43:35.000Z
Python/QR_Code_Generator.py
saurabhpal007/hacktoberfest2021-1
5abad37ab426a7b34fc7bcd98ded885fd6ce02ef
[ "CC0-1.0" ]
67
2021-10-01T13:43:46.000Z
2021-10-06T13:55:49.000Z
Python/QR_Code_Generator.py
saurabhpal007/hacktoberfest2021-1
5abad37ab426a7b34fc7bcd98ded885fd6ce02ef
[ "CC0-1.0" ]
394
2021-10-01T11:55:24.000Z
2021-10-06T13:45:57.000Z
import qrcode titulo=input('Title: ') texto=input("what data do you want to enter \n ") color_codigo=input("Code color (ingles): ") color_fondo=input("Bacground color (ingles): ") while True: porcentaje=input("The code error percent (L->7%,M->15%,Q->25%,H->30%): ") if (porcentaje.upper()=="L" or porcentaje.upper()=="...
27.130435
111
0.642628
f75d8f69fc6fc32e83324db2803ba033ca59c388
373
py
Python
chigozie-oduah-012/project9/resizing.py
cornelia247/cil-internship-cohort-01
b8184337056d378eab16d26b40b26ed58cd177bb
[ "MIT" ]
null
null
null
chigozie-oduah-012/project9/resizing.py
cornelia247/cil-internship-cohort-01
b8184337056d378eab16d26b40b26ed58cd177bb
[ "MIT" ]
null
null
null
chigozie-oduah-012/project9/resizing.py
cornelia247/cil-internship-cohort-01
b8184337056d378eab16d26b40b26ed58cd177bb
[ "MIT" ]
null
null
null
from os import error from PIL import Image def main(): try: image = open_image('image1.jpg') newImage = image.resize((200, 200)) newImage.save('image2.jpg') print("done") except: print ("There was an error processing the image.") def open_image(file_location): image...
21.941176
58
0.632708
e39301f84fff1aaa33baf7093e4a95e430df0aa3
553
py
Python
mcsf/commands/list_servers.py
beremaran/mcsf
7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4
[ "MIT" ]
null
null
null
mcsf/commands/list_servers.py
beremaran/mcsf
7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4
[ "MIT" ]
null
null
null
mcsf/commands/list_servers.py
beremaran/mcsf
7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4
[ "MIT" ]
null
null
null
import logging from mcsf.commands.base import Command from mcsf.services.json_storage import JsonStorage class ListCommand(Command): def __init__(self): self.json_storage = JsonStorage() def handle(self, args): if not self.json_storage.has('SSHKEYID'): logging.error('Please confi...
27.65
100
0.658228
54b628d192e525122416dbac5b3818ae87dd9f46
2,101
py
Python
old/simulation.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
old/simulation.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
old/simulation.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
"""シミュレーションを実行 scupy.integrateを使用 """ from simu_main import Simu import numpy as np import scipy.integrate as integrate import matplotlib.pyplot as plt import matplotlib.animation as anm import baxter_utils_new import rmp import rmp_main class Simulation: """""" def __init__( ...
23.606742
73
0.473584
c4195fc368203a89e3ef2bfdc13bb3be598a42cc
295
py
Python
wordtest-master/tests.py
jaakaappi/archived-projects
be1f754eca7c1434f3a363b0ea8ebcd190a42436
[ "MIT" ]
null
null
null
wordtest-master/tests.py
jaakaappi/archived-projects
be1f754eca7c1434f3a363b0ea8ebcd190a42436
[ "MIT" ]
3
2021-03-10T13:18:31.000Z
2021-05-11T09:20:11.000Z
wordtest-master/tests.py
jaakaappi/archived-projects
be1f754eca7c1434f3a363b0ea8ebcd190a42436
[ "MIT" ]
null
null
null
import wordtest import unittest class Tests(unittest.TestCase): def test_wrong_command_file_name(self): message, commands = wordtest.parse_commands('') assert message is "Could not parse command file : [Errno 2] No such file or directory: ''" assert commands is {}
29.5
98
0.705085
c43578437ca724ac42664263977855aab5f098e1
5,241
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/pedestrianFlow.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/pedestrianFlow.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/pedestrianFlow.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
#!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2014-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at # https://www.ec...
40.007634
117
0.62698
67a394b5dba4516fbaaf70d49a28aea35d91b350
760
py
Python
modeling/backbone/__init__.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
2
2020-12-22T08:40:05.000Z
2021-03-30T08:09:44.000Z
modeling/backbone/__init__.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
modeling/backbone/__init__.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
from modeling.backbone import resnet, xception, drn, mobilenet def build_backbone(backbone,output_stride, BatchNorm,num_classes): if backbone == 'resnet50': return resnet.resnet50(output_stride, BatchNorm,num_classes) elif backbone == 'resnet101': return resnet.resnet101(output_stride, BatchNo...
38
75
0.726316
22741d33c47fce6331bb55ea080cfee71e716e04
1,448
py
Python
examples/text_correction/ernie-csc/change_sgml_to_txt.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
examples/text_correction/ernie-csc/change_sgml_to_txt.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
examples/text_correction/ernie-csc/change_sgml_to_txt.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
from html.parser import HTMLParser import re import argparse import xml.dom.minidom from xml.dom.minidom import parse parser = argparse.ArgumentParser() parser.add_argument("--input", "-i", default="train.sgml", type=str) parser.add_argument("--output", "-o", default="train.txt", type=str) args = parser.parse_args() ...
35.317073
76
0.609116
97de4e6fc5f9f7c9818755c16e443280f683ece7
548
py
Python
books/PythonAutomate/excel_spreadsheets/update_produce.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/excel_spreadsheets/update_produce.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/excel_spreadsheets/update_produce.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""update_produce.py 스프레드시트 업데이트 하기 """ import openpyxl wb = openpyxl.load_workbook("produceSales.xlsx") sheet = wb["Sheet"] # The produce types and their updated prices PRICE_UPDATES = { "Garlic": 3.07, "Celery": 1.19, "Lemon": 1.27, } # Loop through the rows and update the prices for row_num in range(2...
23.826087
73
0.711679
18aa7e00811f3f7c40ee8155c7aab960d03f57ee
935
py
Python
tests/core/test_config.py
ph7vc/CL4M-B0T
e992cf63b1215ea7c241cab94edc251653dbaed7
[ "MIT" ]
9
2019-02-17T06:33:14.000Z
2021-10-05T02:19:00.000Z
tests/core/test_config.py
ns-phennessy/Bolt
e992cf63b1215ea7c241cab94edc251653dbaed7
[ "MIT" ]
28
2019-02-10T07:48:05.000Z
2021-12-20T00:15:37.000Z
tests/core/test_config.py
ph7vc/CL4M-B0T
e992cf63b1215ea7c241cab94edc251653dbaed7
[ "MIT" ]
4
2015-03-13T03:58:55.000Z
2015-05-27T08:29:46.000Z
import unittest from bolt.core.config import Config class TestConfig(unittest.TestCase): def test_invalid_config(self): input_config = { "something": False } config = Config(input_config) errors = config.validate() self.assertTrue(len(errors) > 0, "Input inva...
24.605263
89
0.594652
18d4645e73f2721b14e33bd508481c107941418b
3,471
py
Python
2019/beginners/misc-drive-to-the-target/app/main.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
2019/beginners/misc-drive-to-the-target/app/main.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
2019/beginners/misc-drive-to-the-target/app/main.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
#!/usr/bin/env python3 # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
46.28
197
0.6707
becbf3821ef18a12d97f8de2c9ff42f787965651
2,549
py
Python
hyperts/tests/task_test.py
oaksharks/HyperTS
cecb38f3ce3c8b0ff9ead82670447457f6de6c56
[ "Apache-2.0" ]
null
null
null
hyperts/tests/task_test.py
oaksharks/HyperTS
cecb38f3ce3c8b0ff9ead82670447457f6de6c56
[ "Apache-2.0" ]
1
2021-12-08T02:08:58.000Z
2021-12-08T02:08:58.000Z
hyperts/tests/task_test.py
newbei/HyperTS
cecb38f3ce3c8b0ff9ead82670447457f6de6c56
[ "Apache-2.0" ]
1
2021-12-07T01:32:44.000Z
2021-12-07T01:32:44.000Z
# -*- coding:utf-8 -*- from sklearn.model_selection import train_test_split from sktime.datasets import load_arrow_head from hypernets.core.callbacks import * from hypernets.core.searcher import OptimizeDirection from hypernets.searchers.random_searcher import RandomSearcher from hyperts.experiment import TSExperimen...
43.948276
132
0.748921
bee6a6494389d83f2f612e9b70c5d2113322acef
2,336
py
Python
interactions/commands/spediziel.py
AuxiliumCDNG/MET-Bot
7e00d878c92ad4f68b0b2920235019e14c9ea2fa
[ "MIT" ]
null
null
null
interactions/commands/spediziel.py
AuxiliumCDNG/MET-Bot
7e00d878c92ad4f68b0b2920235019e14c9ea2fa
[ "MIT" ]
null
null
null
interactions/commands/spediziel.py
AuxiliumCDNG/MET-Bot
7e00d878c92ad4f68b0b2920235019e14c9ea2fa
[ "MIT" ]
null
null
null
import binascii import json import os import pathlib import time from io import BytesIO import requests from interactions.create import headers def formdata(text, filename, data): boundary = binascii.hexlify(os.urandom(16)).decode('ascii') payload = { "content": "%s" % text, "embeds": [ ...
33.855072
242
0.59161
55dd2e68219614f4362328b7ae7fa53a32ecd002
1,543
py
Python
test/map_test.py
gergelyszaz/SandboxVN
b6855d1c952df66296e8fb3af42c2f8b46908a07
[ "MIT" ]
null
null
null
test/map_test.py
gergelyszaz/SandboxVN
b6855d1c952df66296e8fb3af42c2f8b46908a07
[ "MIT" ]
1
2022-03-22T23:50:32.000Z
2022-03-22T23:50:32.000Z
test/map_test.py
gergelyszaz/SandboxVN
b6855d1c952df66296e8fb3af42c2f8b46908a07
[ "MIT" ]
null
null
null
import unittest from sandbox.location.map import Map class MyTestCase(unittest.TestCase): def test_empty_map(self): edges = {} world_map = Map(edges) next_node = world_map.next("A", "B") self.assertIsNone(next_node) def test_no_route(self): edges = {"A": []} ...
23.029851
78
0.530784
55ee20d760a94ea84aec3599b4c503dddc40ca93
635
py
Python
Licence 1/I11/TP5/text.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I11/TP5/text.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I11/TP5/text.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
def minimum(a, b): return a if a < b else b def maximum(a, b): return a if a > b else b n1 = int(input("n1 = ")) n2 = int(input("n2 = ")) L = ["Bonjour"," ","a"," tout"," le"," monde !!"] L1 = [] L2 = [] L3 = [] for item in L: if len(item) < minimum(n1, n2): L1 += [item] elif minimum(n1, n2...
23.518519
82
0.522835
364e3dee28208d72e166639f858f2259099f6e50
1,730
py
Python
history/Others/Python/files/since1970.py
hengg/i-know-nothing-about-js
2dc1af3303a8565dd5599f8803d4454121bfdbec
[ "MIT" ]
2
2020-08-07T15:31:19.000Z
2021-02-05T16:40:36.000Z
history/Others/Python/files/since1970.py
hengg/js-walker
2dc1af3303a8565dd5599f8803d4454121bfdbec
[ "MIT" ]
8
2020-04-07T00:56:00.000Z
2020-09-15T02:21:42.000Z
history/Others/Python/files/since1970.py
hengg/i-know-nothing-about-js
2dc1af3303a8565dd5599f8803d4454121bfdbec
[ "MIT" ]
null
null
null
#coding=utf-8 import json import re from selenium import webdriver import time def getTodayWeatherJson( citycode ): #req =urllib2.Request('http://m.weather.com.cn/mweather/'+citycode+'.shtml') #req.add_header('User-Agent','Mozilla/5.0 (Android 5.1.1; Mobile; rv:42.0) Gecko/42.0 Firefox/42.0') #html = url...
32.641509
123
0.623699
a1be950a4723e76b1042d7d7302483db81b6c035
1,144
py
Python
src/api/app.py
th-koeln-intia/ip-sprachassistent-team1
69fbc06a326da91fd3d84f222eba6cd2b1a79975
[ "MIT" ]
1
2021-04-28T09:45:34.000Z
2021-04-28T09:45:34.000Z
src/api/app.py
th-koeln-intia/ip-sprachassistent-team1
69fbc06a326da91fd3d84f222eba6cd2b1a79975
[ "MIT" ]
1
2020-09-24T07:20:16.000Z
2020-09-24T07:20:16.000Z
src/api/app.py
th-koeln-intia/ip-sprachassistent-team1
69fbc06a326da91fd3d84f222eba6cd2b1a79975
[ "MIT" ]
1
2020-12-04T13:38:33.000Z
2020-12-04T13:38:33.000Z
import sqlite3 from flask import g from flask import Flask DATABASE = '../database.db' app = Flask(__name__) # following code snippets from https://flask.palletsprojects.com/en/1.1.x/patterns/sqlite3/ def get_db(): db = getattr(g, '_database', None) if db is None: db = g._database = sqlite3.connect(D...
22.88
91
0.63549
c52609dd9147e60d704e1e30b753353baed4526d
370
py
Python
stphohapp/migrations/0002_auto_20200913_1809.py
itechtian/stphoh
5a778deece3a690e0ec92c799b0b87ba26f1892c
[ "MIT" ]
null
null
null
stphohapp/migrations/0002_auto_20200913_1809.py
itechtian/stphoh
5a778deece3a690e0ec92c799b0b87ba26f1892c
[ "MIT" ]
null
null
null
stphohapp/migrations/0002_auto_20200913_1809.py
itechtian/stphoh
5a778deece3a690e0ec92c799b0b87ba26f1892c
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-09-13 17:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('stphohapp', '0001_initial'), ] operations = [ migrations.AlterField( model_name='patient_info', name='age', ...
19.473684
47
0.583784
3d9bd91db9cdf547c86221dbd4fb0b37d7630e25
427
py
Python
python/coding_dojang/judge_coroutine.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/coding_dojang/judge_coroutine.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/coding_dojang/judge_coroutine.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
def calc(): result = 0 while True: x, op, y = (yield result).split() x, y = int(x), int(y) if op == '+': result = x + y elif op == '-': result = x - y elif op == '*': result = x * y elif op == '/': result = x / y ex...
17.791667
41
0.40281
b1550c0de680aaae3c04263e3ebe0a9e27c582fb
159
py
Python
src/onegov/event/utils/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/event/utils/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/event/utils/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.event.utils.guidle import GuidleExportData from onegov.event.utils.utils import as_rdates __all__ = ( 'as_rdates', 'GuidleExportData', )
17.666667
54
0.754717
b82dfe645fa2c1e9280062e56e330b8572de4674
2,289
py
Python
.vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/jedilsp/pygls/lsp/types/window.py
malbaker/dom_dotfiles
c452a9c8f86669f4f6289ddcd24e12690819991b
[ "MIT" ]
null
null
null
.vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/jedilsp/pygls/lsp/types/window.py
malbaker/dom_dotfiles
c452a9c8f86669f4f6289ddcd24e12690819991b
[ "MIT" ]
null
null
null
.vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/jedilsp/pygls/lsp/types/window.py
malbaker/dom_dotfiles
c452a9c8f86669f4f6289ddcd24e12690819991b
[ "MIT" ]
null
null
null
############################################################################ # Original work Copyright 2017 Palantir Technologies, Inc. # # Original work licensed under the MIT License. # # See ThirdPartyNotices.txt in the project root for license information. # # All modifi...
34.681818
79
0.566186
b8822f5e4a08c379ee9b07c2b4eb4c306f2d9b53
555
py
Python
INBa/2015/RotkinAM/Zadacha_5_21.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/RotkinAM/Zadacha_5_21.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/RotkinAM/Zadacha_5_21.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 5. Вариант 21. # Напишите программу, которая бы при запуске случайным образом отображала название одной из двадцати восьми стран, входящих в Европейский союз # Rotkin A.M. # 05.04.2016 import random a = ("Австрия", "Бельгия", "Великобритания", "Венгрия", "Германия","Греция", "Дания","Ирландия", "Испания", "Ит...
50.454545
294
0.711712
ac3b25a83d97f70f0c6b961a7d28eaab2959b15a
2,457
py
Python
Chapter7_CNN/Chapter7_2_CNN_MNIST/mnistCnnTensorBoard1.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter7_CNN/Chapter7_2_CNN_MNIST/mnistCnnTensorBoard1.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter7_CNN/Chapter7_2_CNN_MNIST/mnistCnnTensorBoard1.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
import os from typing import Tuple import numpy as np from tensorflow.keras.callbacks import TensorBoard from tensorflow.keras.datasets import mnist from tensorflow.keras.layers import Activation from tensorflow.keras.layers import Conv2D from tensorflow.keras.layers import Dense from tensorflow.keras.layers import Fl...
27.3
81
0.699227
ac7471e694bb9f86609ebe49218470b068e5d666
16,978
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/system/solaris_zone.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/system/solaris_zone.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/system/solaris_zone.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Paul Markham <pmarkham@netrefinery.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_ver...
34.578411
138
0.581458
0203531fca6ac74e7a02fff6c1a394715846fa3a
3,770
py
Python
python/oneflow/compatible/single_client/test/ops/test_polyval.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/compatible/single_client/test/ops/test_polyval.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/compatible/single_client/test/ops/test_polyval.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...
34.907407
87
0.683289
5a405d229e7572a658f37d753c05f0a075ead52f
11,578
py
Python
Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115_test.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115_test.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/RSANetWitness_v11_1/Integrations/RSANetWitnessv115/RSANetWitnessv115_test.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
import json import io import pytest import demistomock as demisto from CommonServerPython import CommandResults, DemistoException from RSANetWitnessv115 import Client, list_incidents_command, update_incident_command, remove_incident_command, \ incident_add_journal_entry_command, incident_list_alerts_command, servi...
36.408805
122
0.674814
ce7d8e698257427ade292e00256eb5b9b3705f94
1,269
py
Python
Curso_Python/Secao5-modulos-uteis/140_openpyxl_planilhas_do_excel/main.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao5-modulos-uteis/140_openpyxl_planilhas_do_excel/main.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao5-modulos-uteis/140_openpyxl_planilhas_do_excel/main.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
""" https://openpyxl.readthedocs.io/en/stable/ pip install openpyxl pipenv install openpyxl """ import openpyxl from random import uniform """ pedidos = openpyxl.load_workbook('pedidos.xlsx') nome_planilhas = pedidos.sheetnames planilha1 = pedidos['Página1'] for linha in range(5, 16): numero_pedido = linha - 1 ...
27.586957
82
0.702128
0cafb1aeef3426a98c62d2ff495507f78e54752f
232
py
Python
rasa/core/__init__.py
n01deas/rasa
79f0feeb02919142eb06b8c52da5632f1c25c251
[ "Apache-2.0" ]
2,433
2017-10-04T13:08:05.000Z
2022-03-13T14:59:26.000Z
rasa/core/__init__.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
1,684
2017-10-04T13:04:44.000Z
2019-05-31T20:48:49.000Z
rasa/core/__init__.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
1,229
2017-10-04T20:23:59.000Z
2022-03-11T02:49:13.000Z
import logging import rasa from rasa.core.train import train from rasa.core.test import test from rasa.core.visualize import visualize logging.getLogger(__name__).addHandler(logging.NullHandler()) __version__ = rasa.__version__
19.333333
61
0.823276
e7f4dac68104ca8933822dc11ced78a94e0ed540
8,143
py
Python
skripte/python/edit_tools/wortfugen.py
hyphenation/languages-german
4330a0b1254e88615cb4c83e4b3dc2f0810c76d9
[ "MIT" ]
null
null
null
skripte/python/edit_tools/wortfugen.py
hyphenation/languages-german
4330a0b1254e88615cb4c83e4b3dc2f0810c76d9
[ "MIT" ]
null
null
null
skripte/python/edit_tools/wortfugen.py
hyphenation/languages-german
4330a0b1254e88615cb4c83e4b3dc2f0810c76d9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf8 -*- # :Copyright: © 2014 Günter Milde. # Released without warranty under the terms of the # GNU General Public License (v. 2 or later) # :Id: $Id: $ # wortfugen.py: Teste unkategorisierte Trennstellen auf Wortfugen # ====================================...
28.07931
78
0.619796
b2ce22e4c08a0387ee05150578a03f9cf9b07974
574
py
Python
SleekSecurity/layers/plugins/fingerprint/waf/requestvalidationmode.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
SleekSecurity/layers/plugins/fingerprint/waf/requestvalidationmode.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
SleekSecurity/layers/plugins/fingerprint/waf/requestvalidationmode.py
GitInitDev/ZohoUniv
966704837e65f58b52492b56d08e7958df3d220a
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # # @name: Wascan - Web Application Scanner # @repo: https://github.com/m4ll0k/Wascan # @author: Momo Outaadi (M4ll0k) # @license: See the file 'LICENSE.txt from re import search,I def requestvalidationmode(headers,content): _ = False _ |= search(r'ASP.NET has d...
35.875
112
0.724739
68819cc3386e21f0be9f7f2b5e2afb12669fc123
7,573
py
Python
Contrib-Inspur/openbmc/poky/meta/lib/oeqa/core/context.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Inspur/openbmc/poky/meta/lib/oeqa/core/context.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Inspur/openbmc/poky/meta/lib/oeqa/core/context.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
## Copyright (C) 2016 Intel Corporation # # SPDX-License-Identifier: MIT # import os import sys import json import time import logging import collections import unittest from oeqa.core.loader import OETestLoader from oeqa.core.runner import OETestRunner from oeqa.core.exception import OEQAMissingManifest, OEQATestNot...
35.553991
112
0.597121
d7bed60de9f521122b6b2ffe700858ec2786231f
1,079
py
Python
python/en/archive/dropbox/setting_fonts/matplotlib-setting_chinese_font.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/setting_fonts/matplotlib-setting_chinese_font.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/setting_fonts/matplotlib-setting_chinese_font.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ matplotlib-setting_chinese_font.py """ #import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.font_manager as fm import numpy as np true_type_font_list = [ font.name for font in fm.fontManager.ttflist ] num_ttf = len(true_type_font_list) # num...
27.666667
101
0.730306
0b1c36c058d783df2b93caa2b244b817bc62aa9c
20,365
py
Python
Packs/Symantec_Deepsight/Integrations/Symantec_Deepsight/Symantec_Deepsight.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Symantec_Deepsight/Integrations/Symantec_Deepsight/Symantec_Deepsight.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Symantec_Deepsight/Integrations/Symantec_Deepsight/Symantec_Deepsight.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import json import requests from CommonServerPython import * # disable insecure warnings requests.packages.urllib3.disable_warnings() ''' Global Variables ''' APIKEY = demisto.params()['apikey'] VERIFY = not demisto.params()['unsecure'] BASE_URL = 'https://deepsightapi.accenture.com/v1/' DOMAIN_ACCESS_SUFFIX = 'dom...
35.665499
127
0.679548
a8b28c95882bdec76702a8d43412f0e6b179a7e1
9,223
py
Python
src/pfun/either.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
126
2019-09-16T15:28:20.000Z
2022-03-20T10:57:53.000Z
src/pfun/either.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
54
2019-09-30T08:44:01.000Z
2022-03-20T11:10:00.000Z
src/pfun/either.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
11
2020-01-02T08:32:46.000Z
2022-03-20T11:10:24.000Z
from __future__ import annotations from abc import ABC, abstractmethod from functools import wraps from typing import Any, Callable, Generic, Iterable, TypeVar, Union, cast from typing_extensions import Literal from .functions import curry from .immutable import Immutable from .monad import Monad, filter_m_, map_m_ ...
25.834734
78
0.54852
a8bb75c5e6532cc426da3169029df79b9e7120b7
2,448
py
Python
wififtp-main/ftp.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
6
2021-05-12T11:01:08.000Z
2022-03-14T16:29:00.000Z
wififtp-main/ftp.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
wififtp-main/ftp.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
import os,sys,socket s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.settimeout(10) try: s.connect(("8.8.8.8", 80)) ip=s.getsockname()[0] if ((ip.find("192") != -1) | (ip.find("172") != -1)): pass else: print("You are not using any local network!\nPlease connect to a hotspot or router/Wi-Fi!") ...
27.505618
96
0.61683
96ef99500128e543bb604aad2ac42a65fec38059
694
py
Python
lanz/migrations/0002_auto_20200918_1756.py
linemax/lanz
c7f6eb150c260f088faa8255f0b15fcc9435c4af
[ "Apache-2.0" ]
null
null
null
lanz/migrations/0002_auto_20200918_1756.py
linemax/lanz
c7f6eb150c260f088faa8255f0b15fcc9435c4af
[ "Apache-2.0" ]
null
null
null
lanz/migrations/0002_auto_20200918_1756.py
linemax/lanz
c7f6eb150c260f088faa8255f0b15fcc9435c4af
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.1 on 2020-09-18 17:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lanz', '0001_initial'), ] operations = [ migrations.AlterField( model_name='post', name='b1', field=mode...
28.916667
228
0.621037
8cbfd94aef43d99abab7e660138c7e53606ca1f0
925
py
Python
Aoyama-master/xor.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
Aoyama-master/xor.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
Aoyama-master/xor.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
import sys import base64 as b64 def xor_enc(string,key): lkey=len(key) secret=[] num=0 for each in string: if num>=lkey: num=num%lkey secret.append( chr( ord(each)^ord(key[num]) ) ) num+=1 return b64.b64encode( "".join( secret ).encode() ).decode() def xor_dec(string,key): leter = b64....
22.560976
61
0.571892
0fc4ed6a71432a18f7df20c26a07df1899dc3ff8
160
py
Python
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 69/69.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 69/69.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 69/69.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
#Name the file datetime.py and fix the error import requests print(__name__) r = requests.get("http://www.pythonhow.com") print(r.text[:100]) print(__name__)
17.777778
44
0.74375
d78484684d7d8a15f78c4d0398957a69be8521f4
923
py
Python
exercises/pt/test_02_10_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/test_02_10_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/test_02_10_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert ( "span1.similarity(span2)" in __solution__ or "span2.similarity(span1)" in __solution__ ), "Você está comparando a similaridade entre as duas partições?" assert span1.text == "excelente restaurante", "Você gerou a partição corretamente?" assert span2.text == "ótimo bar", "Voc...
54.294118
107
0.697725
ad0167eff6d5df3ce3ff1c97e495fbd053518c6e
222
py
Python
src/user/urls.py
oguzhanakan0/covidlab-server
68ea4e6cd3b1244117ae43275335896b911a9b2a
[ "MIT" ]
null
null
null
src/user/urls.py
oguzhanakan0/covidlab-server
68ea4e6cd3b1244117ae43275335896b911a9b2a
[ "MIT" ]
1
2022-03-25T05:33:19.000Z
2022-03-25T05:33:19.000Z
src/user/urls.py
oguzhanakan0/covidlab-server
68ea4e6cd3b1244117ae43275335896b911a9b2a
[ "MIT" ]
null
null
null
from django.urls import path from django.urls import include, re_path # from .views import requery_loan_detail from . import views urlpatterns=[ path('sign-in',views.sign_in), path('update',views.update_user), ]
20.181818
40
0.747748
ad5c9133d7350c08f8ebbc27071b048f6fc29a3a
433
py
Python
Algorithms/Strings/the_love_letter_mystery.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Strings/the_love_letter_mystery.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Strings/the_love_letter_mystery.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys def theLoveLetterMystery(s): r = s[::-1] if s == r: return 0 return sum([abs(ord(s[i]) - ord(r[i])) for i in range(0, len(s) // 2)]) # total = 0 # for i in range(0, len(s) // 2): # total += abs(ord(s[i]) - ord(r[i])) # return total q = int(inpu...
21.65
75
0.531178
66f70d1d49098c207396d886c54a56fab3209315
27
py
Python
lol.py
s0ber23/hackt0berf3st
2575d7e3ecece785d84890e3c9a8ae9d08acc2cc
[ "MIT" ]
null
null
null
lol.py
s0ber23/hackt0berf3st
2575d7e3ecece785d84890e3c9a8ae9d08acc2cc
[ "MIT" ]
null
null
null
lol.py
s0ber23/hackt0berf3st
2575d7e3ecece785d84890e3c9a8ae9d08acc2cc
[ "MIT" ]
3
2020-10-20T05:50:08.000Z
2020-10-20T06:08:06.000Z
print("opensource is fun")
13.5
26
0.740741
7e71dc2fea79eb3ab6338b6db3dc96510d6fe854
439
py
Python
site/public/courses/SPD-2.31/exercises/unit-testing/tests/test_carbon_dating.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
1
2021-08-24T20:22:19.000Z
2021-08-24T20:22:19.000Z
site/public/courses/SPD-2.31/exercises/unit-testing/tests/test_carbon_dating.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
site/public/courses/SPD-2.31/exercises/unit-testing/tests/test_carbon_dating.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
import unittest import pytest import math from ..carbon_dating import get_age_carbon_14_dating # Write a unit test which feed 0.35 to the function. # The result should be '8680.34'. Does the function handles # every possible input correctly? What if the input is zero # or negative? # Add the necessary logic t...
33.769231
63
0.765376
698fa02e498a4bde5671b6c87a0e528812735309
1,794
py
Python
test/test_npu/test_network_ops/test_transpose.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_transpose.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_transpose.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...
37.375
74
0.653846
69eca725a0333e04c0cb963474d9dc23e29b1acb
13,265
py
Python
Image Processing/Versuch B/main.py
vincentscode/Praktikum-Hochschule-Trier
c2802364644c889e021726a7e6babaacd8978f47
[ "MIT" ]
null
null
null
Image Processing/Versuch B/main.py
vincentscode/Praktikum-Hochschule-Trier
c2802364644c889e021726a7e6babaacd8978f47
[ "MIT" ]
null
null
null
Image Processing/Versuch B/main.py
vincentscode/Praktikum-Hochschule-Trier
c2802364644c889e021726a7e6babaacd8978f47
[ "MIT" ]
null
null
null
import time import cv2 import numpy as np from matplotlib import pyplot as plt from operator import itemgetter import statistics import mss import AStar as astar # TIME MEASUREMENT time0 = time.time() def getImage(): with mss.mss() as sct: monitor = {'top': 150, 'left': 60, 'width': 830, 'height': 350} img = n...
21.190096
81
0.659857
2a9927417a7b1255b997aa9d92504495e5e27e47
899
py
Python
Cracking_the_Coding_Interview/binary_search_ice_cream_parlor.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Cracking_the_Coding_Interview/binary_search_ice_cream_parlor.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Cracking_the_Coding_Interview/binary_search_ice_cream_parlor.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys def bin_search(arr, r, n): lo = 0 hi = n - 1 while lo <= hi: mid = (lo + hi) // 2 if arr[mid] > r: hi = mid - 1 elif arr[mid] < r: lo = mid + 1 else: return True return False for i in range(int(input...
25.685714
93
0.443826
aade18d55886559904718aff3d403aa83cfb2a3e
15,731
py
Python
lbry/lbry/schema/types/v2/result_pb2.py
mittalkartik2000/lbry-sdk
a07b17ec0c9c5d0a88bc730caf6ab955e0971b38
[ "MIT" ]
null
null
null
lbry/lbry/schema/types/v2/result_pb2.py
mittalkartik2000/lbry-sdk
a07b17ec0c9c5d0a88bc730caf6ab955e0971b38
[ "MIT" ]
4
2020-10-27T21:53:05.000Z
2022-02-11T03:10:54.000Z
lbry/lbry/schema/types/v2/result_pb2.py
braveheart12/lbry-sdk
dc709b468f9dce60d206161785def5c7ace2b763
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: result.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflec...
40.966146
1,479
0.732439
6313fa14cc4e08bdf1d30163ed94d85ba90872cf
3,697
py
Python
src/bo4e/com/aufabschlag.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/aufabschlag.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/aufabschlag.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains AufAbschlag class and corresponding marshmallow schema for de-/serialization """ from typing import List, Optional import attr from marshmallow import fields from marshmallow_enum import EnumField # type:ignore[import] from bo4e.com.com import COM, COMSchema from bo4e.com.preisstaffel import Preisstaff...
42.988372
177
0.757912
2d851296a99ba8d5d6818aee297939b67e383c24
29
py
Python
www/test.py
Puzzlebox-IMT/Puzzlebox
6b80e22a4aee3228140692bd6352de18b2f6a96d
[ "MIT" ]
null
null
null
www/test.py
Puzzlebox-IMT/Puzzlebox
6b80e22a4aee3228140692bd6352de18b2f6a96d
[ "MIT" ]
null
null
null
www/test.py
Puzzlebox-IMT/Puzzlebox
6b80e22a4aee3228140692bd6352de18b2f6a96d
[ "MIT" ]
null
null
null
print("Test qui fonctionne")
14.5
28
0.758621
facba273c848241629914488c3b219e1187587c3
311
py
Python
template/python-library/pl/python_library.py
gbesancon/projects
7a9da629dddcf21fbe5c043d86b00036f80cbe14
[ "MIT" ]
null
null
null
template/python-library/pl/python_library.py
gbesancon/projects
7a9da629dddcf21fbe5c043d86b00036f80cbe14
[ "MIT" ]
1
2022-03-02T10:43:58.000Z
2022-03-02T10:43:58.000Z
template/python-library/pl/python_library.py
gbesancon/projects
7a9da629dddcf21fbe5c043d86b00036f80cbe14
[ "MIT" ]
null
null
null
""" Python library """ class PythonLibrary: """ Python library """ def __init__(self): """ Initialize """ print("Python library") def method1(self): """ Method 1 """ def method2(self): """ Method 2 """
11.961538
31
0.414791
ea69f991a87f8d96be88251d814a40684b21a4f6
2,840
py
Python
data/OSCP/Exercises/.md-toc/toc.py
fmtree-dev/md-toc-action
8b7749c54fd684f716d896c7e9a8eea2d023aac8
[ "MIT" ]
null
null
null
data/OSCP/Exercises/.md-toc/toc.py
fmtree-dev/md-toc-action
8b7749c54fd684f716d896c7e9a8eea2d023aac8
[ "MIT" ]
1
2021-03-09T01:04:47.000Z
2021-03-09T01:04:47.000Z
data/OSCP/Exercises/.md-toc/toc.py
fmtree-dev/md-toc-action
8b7749c54fd684f716d896c7e9a8eea2d023aac8
[ "MIT" ]
null
null
null
import re import sys import argparse import pathlib2 from typing import List, Iterable from functools import cmp_to_key from fmtree.scraper import Scraper from fmtree.filter import MarkdownFilter from fmtree.format import GithubMarkdownContentFormatter from fmtree import sorter from fmtree.node import FileNode class...
40.571429
101
0.561972
57adee86eff5e186c4a123cd92f1b35ae2be53df
645
py
Python
RDS/circle2_use_cases/exporter/src/api/UserResearch.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle2_use_cases/exporter/src/api/UserResearch.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle2_use_cases/exporter/src/api/UserResearch.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
from lib.Research import Research from flask import jsonify, current_app def index(user_id): pass def get(user_id, research_id): return jsonify(Research(userId=user_id, researchIndex=research_id, testing=current_app.config.get("TESTING")).getFiles()) def post(user_id, research_id): return jsonify({ ...
29.318182
128
0.741085
5e25a1e8da6eb4a18775e683b56ec2643860f1df
541
py
Python
Fortgeschrittenenpraktikum/Protokolle/V18_Germaniumdetektor/Python/theo_detektor_vgl.py
smjhnits/Praktikum
92c9df3ee7dfa2417f464036d18ac33b70765fdd
[ "MIT" ]
2
2019-03-07T08:55:36.000Z
2019-04-22T18:13:03.000Z
Fortgeschrittenenpraktikum/Protokolle/V18_Germaniumdetektor/Python/theo_detektor_vgl.py
smjhnits/Praktikum
92c9df3ee7dfa2417f464036d18ac33b70765fdd
[ "MIT" ]
null
null
null
Fortgeschrittenenpraktikum/Protokolle/V18_Germaniumdetektor/Python/theo_detektor_vgl.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 def E_aufloesung(F, E_EL): E_gamma = Q_(500, 'keV') return (2.35 * np.sqrt(F * E_gamma * E_EL)).to('eV') ##### Halbleiter (Fano-Faktor, Bandlücke) Si = ('Si', 0.115, Q_(3.65, 'eV')) Diamond = ('Diamond', 0.08, Q_(13.1, 'eV'))...
25.761905
83
0.608133
870c73929fea0a214312b442ed3eaab06808e67b
625
py
Python
setup.py
chankane/pyind
742bc671d3552d778024662867b64e32ae9bca9d
[ "MIT" ]
null
null
null
setup.py
chankane/pyind
742bc671d3552d778024662867b64e32ae9bca9d
[ "MIT" ]
null
null
null
setup.py
chankane/pyind
742bc671d3552d778024662867b64e32ae9bca9d
[ "MIT" ]
null
null
null
import setuptools setuptools.setup( name="pyind", version="1.2", author="chankane", author_email="brawnychocolate@gmail.com", description="A genetic algorithm library in Python3", long_description=open('README.md').read(), long_description_content_type="text/markdown", url="https://git...
28.409091
57
0.664
5eaf4524bf29394806aaaad0097ad455cd1affef
3,394
py
Python
PythonCruds/CrudDistribuidores.py
iRnx/Crud-Filmes
001d95879a955b64b9f918d8ddc90593cea97821
[ "MIT" ]
null
null
null
PythonCruds/CrudDistribuidores.py
iRnx/Crud-Filmes
001d95879a955b64b9f918d8ddc90593cea97821
[ "MIT" ]
null
null
null
PythonCruds/CrudDistribuidores.py
iRnx/Crud-Filmes
001d95879a955b64b9f918d8ddc90593cea97821
[ "MIT" ]
null
null
null
import mysql.connector def conectar(): """ Função para conectar ao servidor """ try: conn = mysql.connector.connect( host='localhost', user='root', password='root', database='todos_filmes') return conn except mysql.conne...
25.908397
86
0.523866
df1f42d85536ffe5de60a1d298147e2307af5e5a
1,412
py
Python
python/en/_matplotlib/gallery/lines_bars_and_markers/spectrum_representations.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_matplotlib/gallery/lines_bars_and_markers/spectrum_representations.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_matplotlib/gallery/lines_bars_and_markers/spectrum_representations.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ lines_bars_and_markers/spectrum_representations.py Matplotlib > Gallery > Lines, bars and markers > Spectrum Representations https://matplotlib.org/gallery/lines_bars_and_markers/stem_plot.html#sphx-glr-gallery-lines-bars-and-markers-stem-plot-py """ import matplotli...
26.148148
121
0.689093
df78b89d5d74a83d7229cb4e3667e523d8972989
1,265
py
Python
Packs/FidelisElevateNetwork/Integrations/FidelisElevateNetwork/FidelisElevateNetwork_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FidelisElevateNetwork/Integrations/FidelisElevateNetwork/FidelisElevateNetwork_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FidelisElevateNetwork/Integrations/FidelisElevateNetwork/FidelisElevateNetwork_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import re from datetime import datetime def test_get_ioc_filter(): from FidelisElevateNetwork import get_ioc_filter f = get_ioc_filter('192.168.19.1') # disable-secrets-detection assert f.get('simple', {}).get('column') == 'ANY_IP' f = get_ioc_filter('c9a31ea148232b201fe7cb7db5c75f5e') assert f....
39.53125
90
0.713834
33a81336e45296e7fed5f546adc16695d0a45bcc
967
py
Python
Theories/DataStructures/Graph/KahnAlgorithmTopologicalSorting/CourseScheduleII/course_schedule_ii.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Theories/DataStructures/Graph/KahnAlgorithmTopologicalSorting/CourseScheduleII/course_schedule_ii.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Theories/DataStructures/Graph/KahnAlgorithmTopologicalSorting/CourseScheduleII/course_schedule_ii.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from collections import deque from typing import List def findOrder(self, num_courses: int, prerequisites: List[List[int]]) -> List[int]: result = [0] * num_courses if num_courses == 0: return result if not prerequisites: result = [i for i in range(num_courses)] return result ...
25.447368
83
0.561531
33cf8b8c5fb71e955061ed8d96113ffef04ef904
222
py
Python
data-pipeline/src/data_pipeline/data_types/variant/__init__.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
38
2018-02-24T02:33:52.000Z
2020-03-03T23:17:04.000Z
data-pipeline/src/data_pipeline/data_types/variant/__init__.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
385
2018-02-21T16:53:13.000Z
2020-03-04T00:52:40.000Z
data-pipeline/src/data_pipeline/data_types/variant/__init__.py
broadinstitute/gnomadjs
00da72cdc2cb0753f822c51456ec15147c024a1d
[ "MIT" ]
13
2020-05-01T13:03:54.000Z
2022-02-28T13:12:57.000Z
from .annotate_variants import annotate_variants from .transcript_consequence.annotate_transcript_consequences import annotate_transcript_consequences from .variant_id import variant_id, variant_ids, compressed_variant_id
55.5
101
0.90991
89a39d3b699ed03f9a15b5ea54afb93734e43a29
16,573
py
Python
GUI/Converter_ui.py
StefanHol/SchoolReport_Excel2Word2PDF
49be73f669df7b5f25713dac3cc96929d44211e4
[ "Apache-2.0" ]
1
2022-03-16T11:25:31.000Z
2022-03-16T11:25:31.000Z
GUI/Converter_ui.py
StefanHol/SchoolReport_Excel2Word2PDF
49be73f669df7b5f25713dac3cc96929d44211e4
[ "Apache-2.0" ]
null
null
null
GUI/Converter_ui.py
StefanHol/SchoolReport_Excel2Word2PDF
49be73f669df7b5f25713dac3cc96929d44211e4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Converter.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 QtCore, Qt...
57.545139
134
0.737103
989786af21e6ad52db6c2652a2017bee05daa928
21
py
Python
python/pyhokchew/version.py
MindongLab/libhokchew
7e5b2e11377ec57bf9a5bb8bb66be6d99237640c
[ "MIT" ]
1
2020-07-23T14:18:25.000Z
2020-07-23T14:18:25.000Z
python/pyhokchew/version.py
MindongLab/libhokchew
7e5b2e11377ec57bf9a5bb8bb66be6d99237640c
[ "MIT" ]
6
2020-04-25T05:20:04.000Z
2021-08-30T09:08:50.000Z
python/pyhokchew/version.py
MindongLab/libhokchew
7e5b2e11377ec57bf9a5bb8bb66be6d99237640c
[ "MIT" ]
null
null
null
VERSION = "0.1.1.dev"
21
21
0.619048
63de92e5721ee748c2125000ab7f8e67e7e6c211
10,963
py
Python
tests/onegov/election_day/layouts/test_vote_layout.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/layouts/test_vote_layout.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/layouts/test_vote_layout.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date from freezegun import freeze_time from onegov.ballot import BallotResult from onegov.ballot import ComplexVote from onegov.ballot import Vote from onegov.election_day.layouts import VoteLayout from tests.onegov.election_day.common import DummyRequest from unittest.mock import Mock import pytes...
41.369811
79
0.634133
12030fb90d4a27fe8ecc7664534864a22c883c97
663
py
Python
t1nkuy/apps/users/signals.py
qq453388937/drf
63ef7c5f89cf8f597fd09828f8ce94ce809ce287
[ "MIT" ]
null
null
null
t1nkuy/apps/users/signals.py
qq453388937/drf
63ef7c5f89cf8f597fd09828f8ce94ce809ce287
[ "MIT" ]
null
null
null
t1nkuy/apps/users/signals.py
qq453388937/drf
63ef7c5f89cf8f597fd09828f8ce94ce809ce287
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'bobby' from django.db.models.signals import post_save from django.dispatch import receiver from rest_framework.authtoken.models import Token from django.contrib.auth import get_user_model User = get_user_model() @receiver(post_save, sender=User) # 接收哪个model传递过来的信号 def ...
23.678571
65
0.680241
c3fd472e3d35dcce548b4deab0ea2cf191edadcf
2,183
py
Python
admin-tutorial/AdminActions/actions_method/admin.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
5
2020-07-14T07:48:10.000Z
2021-12-20T21:20:10.000Z
admin-tutorial/AdminActions/actions_method/admin.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
7
2021-03-26T03:13:38.000Z
2022-03-12T00:42:03.000Z
admin-tutorial/AdminActions/actions_method/admin.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
1
2021-02-16T07:04:25.000Z
2021-02-16T07:04:25.000Z
from django.contrib import admin from .models import Article2 from django.contrib import messages from django.utils.translation import ngettext # Register your models here. class ArticleAdmin(admin.ModelAdmin): list_display = ['title', 'status'] ordering = ['title'] # 排序 # actions...
37
107
0.624828
6131fd36615e039f25e6c6ae90ab4c7f52e2a25e
595
py
Python
leetcode/242-Valid-Anagram/ValAnagram_002.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/242-Valid-Anagram/ValAnagram_002.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/242-Valid-Anagram/ValAnagram_002.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution: # @param {string} s # @param {string} t # @return {boolean} def anaRepresentation(self, s): p = {} for c in s: if c in p: p[c] += 1 else: p[c] = 1 return p def isAnagram(self, s, t): if len(s) !=...
22.037037
37
0.383193
618acf93d1235eae06763132e64cbe6613b4cf6b
1,160
py
Python
src/onegov/gis/models/coordinates.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/gis/models/coordinates.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/gis/models/coordinates.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.custom import json class Coordinates(json.Serializable, keys=('lon', 'lat', 'zoom')): """ Represents a pair of coordinates. May contain zoom factor and other information like marker icon and color. Note that only latitude and longitude really matter, the rest may or may not be used. ...
25.777778
75
0.631897
1aea4f9ad377fd01169296bdbc43cc1fb76a3e67
1,007
py
Python
IVTa/2014/GOLUBEV_A_S/task_4_44.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/GOLUBEV_A_S/task_4_44.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/GOLUBEV_A_S/task_4_44.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 4. Вариант 44. # Напишите программу, которая выводит имя, под которым скрывается Борис Николаевич Бугаев. # Дополнительно необходимо вывести область интересов указанной личности, место рождения, # годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти). # Для х...
40.28
103
0.765641
dcc34d580fa729e915e4552e64cb8a7fab83fabe
1,089
py
Python
366/Fcat_366_dfs.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
366/Fcat_366_dfs.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
366/Fcat_366_dfs.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def findLeaves(self, root: Optional[TreeNode]) -> List[List[int]]: self.depth = 0 def dfs_bu...
34.03125
70
0.568411
b4ea6f21f01c50eee7f64929ecbf94240d536343
89
py
Python
kernel/slovaki/apps.py
sageteam/behpack
3b8afb81dc7da70807308af4c8a2d2ab92b1a133
[ "MIT" ]
null
null
null
kernel/slovaki/apps.py
sageteam/behpack
3b8afb81dc7da70807308af4c8a2d2ab92b1a133
[ "MIT" ]
null
null
null
kernel/slovaki/apps.py
sageteam/behpack
3b8afb81dc7da70807308af4c8a2d2ab92b1a133
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SlovakiConfig(AppConfig): name = 'slovaki'
14.833333
33
0.752809
9f3ee07d3d546a861b9ce829e7972353f529dc84
1,028
py
Python
examples/python-lib/tests/test_cli.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
17
2020-11-20T15:58:02.000Z
2022-02-06T19:18:20.000Z
examples/python-lib/tests/test_cli.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
3
2021-02-17T13:47:44.000Z
2021-10-14T13:53:15.000Z
examples/python-lib/tests/test_cli.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
6
2020-11-23T09:51:26.000Z
2022-02-11T13:46:57.000Z
#!/usr/bin/env python from typing import Generator import pytest from typer import Typer from typer.testing import CliRunner from .conftest import Utils @pytest.fixture(scope="module") def runner() -> Generator: print("Create runner fixture") # Artifical usage of yiel to show possible setup / teardown #...
26.358974
63
0.697471
4ca5ae28c7cde24fc72db3b0ed5760e5427d10b1
2,349
py
Python
Packs/Campaign/Scripts/CollectCampaignRecipients/CollectCampaignRecipients_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Campaign/Scripts/CollectCampaignRecipients/CollectCampaignRecipients_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Campaign/Scripts/CollectCampaignRecipients/CollectCampaignRecipients_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import pytest from CollectCampaignRecipients import * from CommonServerPython import * KEYS = ['id', 'name', 'recipients', 'severity', 'status', 'created'] NUM_OF_INCIDENTS = 5 MOCKED_INCIDENTS = [ { key: f'test_{key}_{i}' if key != 'recipients' else [f'recip_{i}@test_1.com', f'recip_{i}@test_2.co...
28.301205
104
0.686249
9811414796c664c210931abc3e5d6b4190e1343f
4,181
py
Python
pre_processing.py
charliezjw/Neural-Signal-Decoder
fb0df09ba0314724c7c90141bd47cc8fb0201b7a
[ "MIT" ]
null
null
null
pre_processing.py
charliezjw/Neural-Signal-Decoder
fb0df09ba0314724c7c90141bd47cc8fb0201b7a
[ "MIT" ]
null
null
null
pre_processing.py
charliezjw/Neural-Signal-Decoder
fb0df09ba0314724c7c90141bd47cc8fb0201b7a
[ "MIT" ]
null
null
null
import numpy as np import h5py def get_data(): A01T = h5py.File("./project_datasets/A01T_slice.mat", 'r') X = np.copy(A01T["image"]) y = np.copy(A01T["type"]) y = y[0, 0:X.shape[0]:1] y = np.asarray(y, dtype=np.int32) X = X[:, :22, :] for i in range(len(y)): if y[i] == 769: ...
29.034722
107
0.533365
e2fb9f570c8a1ad2458ea9e5be721efedb1f09df
7,156
py
Python
Webpage/api/views.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
Webpage/api/views.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
46
2022-01-08T12:03:24.000Z
2022-03-30T08:51:05.000Z
Webpage/api/views.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
from cProfile import Profile from http.client import HTTPS_PORT from turtle import home from django.http import HttpResponseForbidden, HttpResponsePermanentRedirect from django.http.response import HttpResponse, HttpResponseRedirect, JsonResponse from django.shortcuts import render from api.middelware import checkToken...
31.946429
180
0.626188