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
26a25af4eaa0c332c5e3f2f2db6d7e73fafe9242
874
py
Python
app/schema/user_schema.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/schema/user_schema.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/schema/user_schema.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
from marshmallow import Schema, fields, validate, EXCLUDE, post_load from app.models import User class UserSchema(Schema): class Meta: unknown = EXCLUDE id = fields.Int(validate=validate.Range(min=1), dump_only=True) username = fields.Str(validate=validate.Length(min=1, max=80)) password = f...
29.133333
83
0.684211
f84278a93ce910876627347e88e542f481bdfca1
5,739
py
Python
course/models.py
MIXISAMA/MIS-backend
7aaa1be773718de1beb3ce0080edca7c4114b7ad
[ "MIT" ]
null
null
null
course/models.py
MIXISAMA/MIS-backend
7aaa1be773718de1beb3ce0080edca7c4114b7ad
[ "MIT" ]
null
null
null
course/models.py
MIXISAMA/MIS-backend
7aaa1be773718de1beb3ce0080edca7c4114b7ad
[ "MIT" ]
2
2020-04-20T07:26:51.000Z
2020-04-30T11:51:54.000Z
from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from plan.models import OfferingCourse, BasisTemplate, IndicatorFactor from user.models import Student, Teacher, CM # Create your models here. class Course(models.Model): ReviewStatusType = ( ...
40.992857
126
0.693152
f8c7cef385f84587d583bd21f53521a969b8bd14
5,043
py
Python
src/coverage/__init__.py
afranck64/benzlim
b8a3087cfe093ed9700ba92799aaeed17f1dd92f
[ "Apache-2.0" ]
null
null
null
src/coverage/__init__.py
afranck64/benzlim
b8a3087cfe093ed9700ba92799aaeed17f1dd92f
[ "Apache-2.0" ]
null
null
null
src/coverage/__init__.py
afranck64/benzlim
b8a3087cfe093ed9700ba92799aaeed17f1dd92f
[ "Apache-2.0" ]
null
null
null
"""coverage - Coverage informations generation about benzlim""" import logging import os import glob import shutil import sys from ..exceptions_ import (BadFormatException, BenzlimException) from ..compat import printf from ..config import Configuration def clean_mp_coverages(empty_only=True): #pragma: no cover "...
58.639535
262
0.749554
e497853e43960e7da8a82a17779f66749eb9962c
283
py
Python
settings/__init__.py
FACode/django-rest-starter
69f8dc140e9075b0722cfc2cf8a4f75cb1b4142b
[ "MIT" ]
null
null
null
settings/__init__.py
FACode/django-rest-starter
69f8dc140e9075b0722cfc2cf8a4f75cb1b4142b
[ "MIT" ]
null
null
null
settings/__init__.py
FACode/django-rest-starter
69f8dc140e9075b0722cfc2cf8a4f75cb1b4142b
[ "MIT" ]
null
null
null
from __future__ import absolute_import, print_function import sys try: from .develop import * print("Trying import develop.py settings...", file=sys.stderr) except ImportError: print("Trying import settings.py settings...", file=sys.stderr) from .settings import *
25.727273
67
0.734982
e4b30f0c9d5d96edafe8c0a3fa321895f8d633a6
1,896
py
Python
ParsingAndScraping/wink/parser.py
KazuruK/FilmGetter
fd84bcaddf17d4b89ad6e5d27095535346c5f4a9
[ "BSD-3-Clause" ]
1
2021-06-23T13:06:11.000Z
2021-06-23T13:06:11.000Z
ParsingAndScraping/wink/parser.py
KazuruK/FilmGetter
fd84bcaddf17d4b89ad6e5d27095535346c5f4a9
[ "BSD-3-Clause" ]
1
2021-06-23T21:21:52.000Z
2021-06-23T21:21:52.000Z
ParsingAndScraping/wink/parser.py
KazuruK/FilmGetter
fd84bcaddf17d4b89ad6e5d27095535346c5f4a9
[ "BSD-3-Clause" ]
1
2021-06-28T19:14:19.000Z
2021-06-28T19:14:19.000Z
import re import requests from ParsingAndScraping.assistants import digits from ParsingAndScraping.assistants import empty_string_cleaner from ParsingAndScraping.wink.scrapper import wink_search def wink_parser(film_name): price_hd = '' price_uhd = '' sub_available = '' sub_price = '399' film_id =...
32.689655
85
0.602321
5fa2792ef416615763e0ff6b06fe697fb538d702
2,425
py
Python
resources/mechanics_lib/connector.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
7
2016-01-20T02:33:00.000Z
2021-02-04T04:06:57.000Z
resources/mechanics_lib/connector.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
null
null
null
resources/mechanics_lib/connector.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
3
2016-10-05T07:20:30.000Z
2017-11-20T10:36:50.000Z
from api.component import Component import api.tabs class Connector(Component): """ A class representing a Connector. A interface is the edges in a drawing that fold up together. Interfaces is a dictionary with keys being a tuple pair of Edge names (the two Edges that will be joints) and the value ...
32.333333
154
0.663918
ffc9c57e33de0cd942621950940354cf1d5357f3
3,965
py
Python
src/data_type/dict&tuple&set&list.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/data_type/dict&tuple&set&list.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/data_type/dict&tuple&set&list.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- ''' 环境:python 3.6.0 类型的使用:dict、tuple、set、list、str 5种数据类型在使用的时候,可以依情况进行转换使用 基本数据类型:boolean、str、int、float、number、list、dict、set、dict、time、datetime a=(1,2) type(a) >>>tuple 可用方法:['count', 'index'] 可用属性:['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc...
52.171053
494
0.685498
8a85a84a0a6b010f578098e808e7e0acf261635d
369
py
Python
forenshit/darkpixel/gen_mate.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
6
2021-02-18T15:07:55.000Z
2022-02-04T01:38:10.000Z
forenshit/darkpixel/gen_mate.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
forenshit/darkpixel/gen_mate.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
# mau buang border braillenya import cv2 import numpy as np img = cv2.imread('good_one_mate.png', 0) cnv = np.zeros(img.shape, np.uint8) row, col = img.shape for i in range(row): for j in range(col): if img[i, j] == 0: cnv[i, j] = 0 else: cnv[i, j] = 255 cv2.imwrite('braille.png', cnv) # cv2.imshow('cnv',...
18.45
40
0.647696
0a6590ff1a9ad0fed7a45f6668568be759bb24ef
706
py
Python
jiuzhang/Nine Chapters/2 Binary Search & Sorted Array/py/SearchInsertPosition.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
jiuzhang/Nine Chapters/2 Binary Search & Sorted Array/py/SearchInsertPosition.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
jiuzhang/Nine Chapters/2 Binary Search & Sorted Array/py/SearchInsertPosition.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution: """ @param A: sorted integer array A which has m elements, but size of A is m+n @param B: sorted integer array B which has n elements @return: void """ def mergeSortedArray(self, A, m, B, n): # write your code here for k in range(m - 1, -1, -1): ...
24.344828
59
0.366856
0aaaf54d29a2fc0bc7d12c8a2285f4ba13e0789f
339
py
Python
lang-python/basics/06-input/src/input.py
xd23fe39/technical-notes
bb6348705a95db24d07b1081b1aa0265dda131ce
[ "MIT" ]
null
null
null
lang-python/basics/06-input/src/input.py
xd23fe39/technical-notes
bb6348705a95db24d07b1081b1aa0265dda131ce
[ "MIT" ]
null
null
null
lang-python/basics/06-input/src/input.py
xd23fe39/technical-notes
bb6348705a95db24d07b1081b1aa0265dda131ce
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # # Eingabeaufforderung zur Eingabe von alphanumerischen Zeichen name = raw_input("Your name: ") # Eingabe wird von Python-Interpreter interpretiert (keine Texteingabe) code = input("Test Python code '6*7': ") # Ergebnis der Interpretation print "Output: %s; user: ...
26.076923
71
0.707965
86ca397806a2e0082d3ebcf273cee055ca5596dd
2,509
py
Python
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/08-Authentication-and-Users/routers/post.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/08-Authentication-and-Users/routers/post.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Flask/FastAPI/Django/Python-API-Development.freeCodeCamp.org/08-Authentication-and-Users/routers/post.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
from fastapi import status, Response, HTTPException, Depends, APIRouter from ..database import get_db from sqlalchemy.orm import Session from sqlalchemy.sql import desc from .. import models, schemas, oauth2 from typing import List router = APIRouter( prefix="/posts", tags=["Posts"] ) oauth2 # Create @rou...
33.013158
148
0.714229
07e7b751808f1790d61411935a7ed7fc502448b3
371
py
Python
Test Dictionaries.py
abbashan03/Kinduino
292be35053763ee593b5721bf7ce450ec4dc1603
[ "MIT" ]
null
null
null
Test Dictionaries.py
abbashan03/Kinduino
292be35053763ee593b5721bf7ce450ec4dc1603
[ "MIT" ]
null
null
null
Test Dictionaries.py
abbashan03/Kinduino
292be35053763ee593b5721bf7ce450ec4dc1603
[ "MIT" ]
null
null
null
abc = { "1":"a", "2":"b", "3":"c"} deutsch = {'key':['Schlüssel', 'Taste'], 'slice':['Scheibe', 'Stück'], 'value':['Wert']} text = input("Geben Sie einen Text ein: ") abctext = [] for buchstabe in text: if buchstabe in abc.keys(): abctext.append(abc[buchstab...
21.823529
43
0.485175
ed14fbcd3044411e6bc6bf6f10906b0454a7d466
360,554
py
Python
Packs/Zimperium/Integrations/Zimperium/test_data/result_constants.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Zimperium/Integrations/Zimperium/test_data/result_constants.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Zimperium/Integrations/Zimperium/test_data/result_constants.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
EXPECTED_SEARCH_EVENTS = [ {'eventId': 'c4220bdf-0c0b-489c-a915-7d71bba7197a', 'eventStateCode': 1, 'eventState': 'Pending', 'typeDesc': 'ZIPS_EVENT', 'eventVector': '2', 'severity': 'IMPORTANT', 'eventName': 'THREAT_DETECTED', 'eventFullName': 'host.vulnerable.ios', 'customerId': 'becky', 'customerContac...
51.229611
1,097
0.425473
ed24fc24985561941e1b26f1ba5bc93d4f617eb2
215
py
Python
service/wkb/intelligent_device_web/listening.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
service/wkb/intelligent_device_web/listening.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
service/wkb/intelligent_device_web/listening.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
#-*- coding:utf-8 -*- import soundmeter,os def test(): cmd ="soundmeter --collect --seconds 1" while True: maxsound=os.popen(cmd).readlines()[5]#把执行Linux命令的结果传递给变量 print(maxsound)
21.5
65
0.609302
71fe3225309c689ef4299a197e869f8fecf2518d
8,322
py
Python
bot/hotel.py
kopytjuk/uni-unterkunft
c81664e0070f97f45baa6eaff6a71039a267fd37
[ "MIT" ]
null
null
null
bot/hotel.py
kopytjuk/uni-unterkunft
c81664e0070f97f45baa6eaff6a71039a267fd37
[ "MIT" ]
null
null
null
bot/hotel.py
kopytjuk/uni-unterkunft
c81664e0070f97f45baa6eaff6a71039a267fd37
[ "MIT" ]
null
null
null
import logging from datetime import datetime from telegram import ReplyKeyboardMarkup, ReplyKeyboardRemove, Location, ChatAction, ParseMode from telegram.ext import (Updater, CommandHandler, MessageHandler, CallbackQueryHandler, TypeHandler, Filters, ConversationHandler) from bot.telegramcal...
43.119171
129
0.647441
13492dda88bb88002cbdca9ce16a94168ad405b7
1,010
py
Python
src/visuanalytics/analytics/util/step_utils.py
mxsph/Data-Analytics
c82ff54b78f50b6660d7640bfee96ea68bef598f
[ "MIT" ]
3
2020-08-24T19:02:09.000Z
2021-05-27T20:22:41.000Z
src/visuanalytics/analytics/util/step_utils.py
mxsph/Data-Analytics
c82ff54b78f50b6660d7640bfee96ea68bef598f
[ "MIT" ]
342
2020-08-13T10:24:23.000Z
2021-08-12T14:01:52.000Z
src/visuanalytics/analytics/util/step_utils.py
visuanalytics/visuanalytics
f9cce7bc9e3227568939648ddd1dd6df02eac752
[ "MIT" ]
8
2020-09-01T07:11:18.000Z
2021-04-09T09:02:11.000Z
""" Modul mit Typ-Methoden, die in `images`, `transform` und `audio` verwendet werden können. """ import numbers from visuanalytics.analytics.control.procedures.step_data import StepData def execute_type_option(values: dict, data: StepData): check = data.get_data(values["check"], values) if bool(check): ...
30.606061
89
0.686139
13c7208355325bb6dad23c8151a8faca53401666
1,871
py
Python
Algorithms/Tree-Algorithm/level_traversing/level_traversing.py
Pandi-Sangareswari/algo_ds_101
056a0dd6f1bbba424cad54859dabe5d369459445
[ "MIT" ]
182
2020-10-01T17:16:42.000Z
2021-10-04T17:52:49.000Z
Algorithms/Tree-Algorithm/level_traversing/level_traversing.py
Pandi-Sangareswari/algo_ds_101
056a0dd6f1bbba424cad54859dabe5d369459445
[ "MIT" ]
759
2020-10-01T00:12:21.000Z
2021-10-04T19:35:11.000Z
Algorithms/Tree-Algorithm/level_traversing/level_traversing.py
Pandi-Sangareswari/algo_ds_101
056a0dd6f1bbba424cad54859dabe5d369459445
[ "MIT" ]
1,176
2020-10-01T16:02:13.000Z
2021-10-04T19:20:19.000Z
# author: Karthik Hegde # date: 2/10/2021 # Level order traversal on BST implementation in python from collections import deque from typing import List, Optional import sys #Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.l...
22.542169
91
0.56387
13d09f3badd42f3203ac9a58a4fd8fb01bade99c
925
py
Python
Python/Topics/Sending-Email/03-image-attachment.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Python/Topics/Sending-Email/03-image-attachment.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
Python/Topics/Sending-Email/03-image-attachment.py
shihab4t/Software-Development
0843881f2ba04d9fca34e44443b5f12f509f671e
[ "Unlicense" ]
null
null
null
# Adding Attachments import imghdr import smtplib import os from email.message import EmailMessage EMAIL_ADDRESS = os.environ.get("GMAIL_ADDRESS") EMAIL_PASSWORD = os.environ.get("GMAIL_APP_PASS") IMG_ADDRESS = "/home/shihab4t/Pictures/Beautiful-Name-Allah-Wallpaper-HD (1).jpg" with open(IMG_ADDRESS, "rb") as img:...
27.205882
81
0.703784
0ee8999a6e0fd24db4c17cf3cb5b477230b6403e
6,209
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/check_point/checkpoint_host.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/check_point/checkpoint_host.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/check_point/checkpoint_host.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
28.74537
149
0.651635
bcbf72506d2fc576e92464eda4eeb44a6f2dc27c
699
py
Python
024-C142-FlaskMockup2/contentbased_filtering.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
2
2021-09-28T13:55:20.000Z
2021-11-15T10:08:49.000Z
024-C142-FlaskMockup2/contentbased_filtering.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
null
null
null
024-C142-FlaskMockup2/contentbased_filtering.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
1
2022-01-20T03:02:20.000Z
2022-01-20T03:02:20.000Z
import pandas as pd df = pd.read_csv('articles.csv') from sklearn.feature_extraction.text import CountVectorizer count = CountVectorizer(stop_words='english') count_matrix = count.fit_transform(df['title']) from sklearn.metrics.pairwise import cosine_similarity cosine_sim = cosine_similarity(count_matrix, count_ma...
27.96
69
0.741059
4c2e6eb0a34fb0f69d4c2a30a9a7149302e5dca7
714
py
Python
zencad/examples/Integration/svg.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/examples/Integration/svg.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/examples/Integration/svg.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 #coding: utf-8 from tempfile import mkstemp from zencad import * lazy.fastdo = True m0 = \ ( zencad.rectangle(10,20) + zencad.rectangle(10,20,center=True) + zencad.ellipse(10,8) -zencad.circle(5) ) svg = to_svg_string(m0) m1 = from_svg_string(svg) fd, path = mkstemp() to_svg(m0, path) m2...
16.227273
95
0.662465
912614fde949d6c26cd2c938950e242fef46e19c
1,148
py
Python
foundation/erpnext_foundation/doctype/service_provider/service_provider.py
prafful1234/foundation
6fcb027e76eae8d307c3dd70436a9657ff681f01
[ "MIT" ]
1
2018-10-24T11:11:03.000Z
2018-10-24T11:11:03.000Z
foundation/erpnext_foundation/doctype/service_provider/service_provider.py
prafful1234/foundation
6fcb027e76eae8d307c3dd70436a9657ff681f01
[ "MIT" ]
null
null
null
foundation/erpnext_foundation/doctype/service_provider/service_provider.py
prafful1234/foundation
6fcb027e76eae8d307c3dd70436a9657ff681f01
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, EOSSF and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.utils import get_datetime from frappe.model.document import Document class ServiceProvider(Document): def autoname(self): self.nam...
37.032258
113
0.787456
e675d836df4749f9954450503e7edef296df98c5
2,105
py
Python
PINp/2014/Cheraneva A.S/task_10_24.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Cheraneva A.S/task_10_24.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Cheraneva A.S/task_10_24.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 10. Вариант 24. #Напишите программу "Генератор персонажей" для игры. #Пользователю должно быть предоставлено 30 пунктов, которые можно распределить между четырьмя характеристиками: Сила, Здоровье, Мудрость и Ловкость. #Надо сделать так, чтобы пользователь мог не только брать эти пункты из общего "пула", но...
33.951613
174
0.694537
e69cc740631a3958ebcfb8edf00e4dcb36b48e0a
656
py
Python
etl/test/test_data_management/test_DataManager.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
7
2020-04-23T20:16:11.000Z
2022-01-04T14:57:16.000Z
etl/test/test_data_management/test_DataManager.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
361
2020-04-23T17:20:14.000Z
2022-03-02T11:29:45.000Z
etl/test/test_data_management/test_DataManager.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
1
2021-11-29T06:02:52.000Z
2021-11-29T06:02:52.000Z
import unittest import os ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) os.environ['ROOT_DIR'] = ROOT_DIR from data_management.data_manager import DataManager class TestDataManager(unittest.TestCase): def test_timestamp_to_datestring(self): timestamp = 1577833200.0 datestring = "01.01.2...
26.24
84
0.739329
fc071cbee46a322f59aa670bd4da7b32db887007
360
py
Python
docs_src/custom_response/tutorial008.py
jomue/fastapi
bee35f5ae1fc58e7ab125427ad4287210e99d8b3
[ "MIT" ]
53,007
2018-12-08T10:05:29.000Z
2022-03-31T23:30:02.000Z
docs_src/custom_response/tutorial008.py
jomue/fastapi
bee35f5ae1fc58e7ab125427ad4287210e99d8b3
[ "MIT" ]
4,155
2019-01-05T05:07:49.000Z
2022-03-31T21:25:38.000Z
docs_src/custom_response/tutorial008.py
jomue/fastapi
bee35f5ae1fc58e7ab125427ad4287210e99d8b3
[ "MIT" ]
4,092
2018-12-09T16:21:00.000Z
2022-03-31T07:59:45.000Z
from fastapi import FastAPI from fastapi.responses import StreamingResponse some_file_path = "large-video-file.mp4" app = FastAPI() @app.get("/") def main(): def iterfile(): # (1) with open(some_file_path, mode="rb") as file_like: # (2) yield from file_like # (3) return StreamingRespo...
24
65
0.669444
fc4225be5efef2406a4fa266da5fd32596f87074
6,280
py
Python
python_experiments/paper_figures/vldbj/draw_varying_eps_topk_precision.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
8
2020-04-14T23:17:00.000Z
2021-06-21T12:34:04.000Z
python_experiments/paper_figures/vldbj/draw_varying_eps_topk_precision.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
null
null
null
python_experiments/paper_figures/vldbj/draw_varying_eps_topk_precision.py
RapidsAtHKUST/SimRank
3a601b08f9a3c281e2b36b914e06aba3a3a36118
[ "MIT" ]
1
2021-01-17T16:26:50.000Z
2021-01-17T16:26:50.000Z
import matplotlib.pyplot as plt from data_analysis.vldbj_data_parsing.probesim_querying_time_statistics import probesim_gt_tag # from data_analysis.querying_time_accuracy_statistics import lind_tag, cw_tag from data_analysis.vldbj_data_parsing.varying_eps_statistics import * from paper_figures.vldbj.draw_indexing_time...
39.496855
120
0.635032
fc4e65eb14dd72d88ae37ee6668e9b2293b8d17a
313
py
Python
whitespace/decode.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
whitespace/decode.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
whitespace/decode.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
from definitions import whspchars from lookups import instr_mod f = open('helloworld.ws') for line in f: wscmd = '' for c in line: wscmd += c if c in whspchars else '' # for c in wscmd: for c in whspchars: line = line.replace(c, '') print(line, repr(wscmd), instr_mod(wscmd))
24.076923
46
0.626198
b90a2a7d714c7d6b85edd18e3742b8bc2b831861
11,903
py
Python
fhirclient/r4models/biologicallyderivedproduct.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
fhirclient/r4models/biologicallyderivedproduct.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
fhirclient/r4models/biologicallyderivedproduct.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProduct) on 2019-05-07. # 2019, SMART Health IT. from . import domainresource class BiologicallyDerivedProduct(domainresource.DomainResource): """ A mater...
40.349153
124
0.619928
07124a78cf1c94399f373b914d668cc09a38a2b4
1,000
py
Python
Packs/FeedIntel471/Integrations/Intel471Actors/Intel471Actors_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedIntel471/Integrations/Intel471Actors/Intel471Actors_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedIntel471/Integrations/Intel471Actors/Intel471Actors_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import pytest import Intel471Actors as feed BUILD_PARAM_DICT_DATA = [ ( {'credentials': {'identifier': 'username', 'password': 'apikey'}, 'insecure': True, 'fetch_time': '10 minutes', 'proxy': False}, # input 'https://api.intel471.com/v1/actors?actor=*' # expected ), ( {...
27.777778
91
0.632
db6230419db3679c43d2598beba4fdb2ad42efc6
500
py
Python
Beginner/03. Python/BinaryFractalTreeVisualizer.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
3
2021-03-16T16:44:04.000Z
2021-06-07T17:32:51.000Z
Beginner/03. Python/BinaryFractalTreeVisualizer.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
null
null
null
Beginner/03. Python/BinaryFractalTreeVisualizer.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
1
2020-10-26T08:44:01.000Z
2020-10-26T08:44:01.000Z
'''Created by Aakasha01Agarwal''' import turtle t=turtle.Turtle() def init(): t.getscreen().bgcolor('black') t.color('white') t.speed(1) #Change the speed here t.setheading(90) def branch(l, angle): if l > 10: t.forward(l) t.right(angle) branch(l-15,...
17.241379
56
0.558
db6c8e44476bfa935584ab1f5b517941bf316b8b
730
py
Python
PINp/2014/Cheraneva A.S/task_7_24.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Cheraneva A.S/task_7_24.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Cheraneva A.S/task_7_24.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 7. Вариант 24. #Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток. #Cheraneva A.S. #25.05.16 import random m=('Вороная', 'Гнедая', 'Серая', 'Рыжая') a=random.randint(0,2) rand=m[a] Ball=40 print('Как вы думает...
28.076923
151
0.719178
dbda50d5fe2393da727f4f445292a4199578ffcf
4,876
py
Python
src/visitpy/pyavt/examples/py_test_mpicom_query.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/visitpy/pyavt/examples/py_test_mpicom_query.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/visitpy/pyavt/examples/py_test_mpicom_query.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# VisIt Python Query # # Tests VisIt's mpicom python MPI wrapper. # # # Usage: # Load in the Query window or run with provided driver: # visit -o path/to/rect2d.silo -nowin -cli -s visit_mpicom_test.py # class Dog: """ A simple class used to test mpi ops on a python object. """ def __init__(self,nam...
34.097902
80
0.562346
5301d5fdf50358e9aa074c40b50969ea84135caf
2,645
py
Python
abs/statistics.py
CharJon/ab
07c5da50bdf547e8b12e3c4b0e9925bf05703a41
[ "MIT" ]
null
null
null
abs/statistics.py
CharJon/ab
07c5da50bdf547e8b12e3c4b0e9925bf05703a41
[ "MIT" ]
null
null
null
abs/statistics.py
CharJon/ab
07c5da50bdf547e8b12e3c4b0e9925bf05703a41
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd def stats(df: pd.DataFrame, sh=10): s_sum = df.sum(axis=0) s_mean = df.mean(axis=0) s_median = df.median(axis=0) s_std = df.std(axis=0) s_max = df.max(axis=0) s_sgm = np.exp(np.sum(np.log((df + sh))) / len(df.index)) - sh s_min = df.min(axis=1) s...
30.402299
97
0.629868
534f515563e3b68162709579f69864300b60884e
2,591
py
Python
y_gears/scripts/Python/core_setup.py
42sol/termbase_de_shared
09ec09d3542ad72bfd3b351dd59c2aecdd52e6f4
[ "Unlicense" ]
1
2022-01-06T22:42:01.000Z
2022-01-06T22:42:01.000Z
y_gears/scripts/Python/core_setup.py
42sol/termbase_de_shared
09ec09d3542ad72bfd3b351dd59c2aecdd52e6f4
[ "Unlicense" ]
1
2022-01-07T11:01:03.000Z
2022-01-07T11:01:03.000Z
y_gears/scripts/Python/core_setup.py
42sol/termbase_de_shared
09ec09d3542ad72bfd3b351dd59c2aecdd52e6f4
[ "Unlicense" ]
1
2022-01-06T22:42:07.000Z
2022-01-06T22:42:07.000Z
from pathlib import Path #!md|[docs](https://docs.python.org/3/library/pathlib.html#Path) from toml import * #!md|[docs](https://github.com/uiri/toml) from logging import INFO,DEBUG #!md|[docs](https://docs.python.org/3/library/logging.html?highlight=logging#module-loggi...
36.492958
167
0.603628
72764bf2ce6490ed7668102bd52d121e915e65b3
9,135
py
Python
py/jpy/src/test/python/jpy_modretparam_test.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
210
2015-03-19T14:07:16.000Z
2022-03-31T19:28:13.000Z
py/jpy/src/test/python/jpy_modretparam_test.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
943
2021-05-10T14:00:02.000Z
2022-03-31T21:28:15.000Z
py/jpy/src/test/python/jpy_modretparam_test.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
40
2015-10-17T13:53:41.000Z
2021-07-18T20:09:11.000Z
import unittest import array import sys import jpyutil jpyutil.init_jvm(jvm_maxmem='512M', jvm_classpath=['target/test-classes']) import jpy try: import numpy as np except: np = None def annotate_fixture_methods(type, method): # print('annotate_fixture_methods: type =', type, ', method =', method.name...
33.959108
102
0.584346
22cbe8911c7ef296573e60316fe9626e67941ef2
2,182
py
Python
2016/day08_two_factor_authentication/python/src/parts1and2.py
tlake/advent-of-code
17c729af2af5f1d95ba6ff68771a82ca6d00b05d
[ "MIT" ]
null
null
null
2016/day08_two_factor_authentication/python/src/parts1and2.py
tlake/advent-of-code
17c729af2af5f1d95ba6ff68771a82ca6d00b05d
[ "MIT" ]
null
null
null
2016/day08_two_factor_authentication/python/src/parts1and2.py
tlake/advent-of-code
17c729af2af5f1d95ba6ff68771a82ca6d00b05d
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Docstring.""" from collections import Counter from itertools import chain from common import ( get_input, blank_screen_array, print_screen ) class ScreenSimulator: """.""" def __init__(self, commands=None, screen=None): """Initialize.""" self.commands = ...
29.486486
90
0.56187
439a0eff84a36dafb46f68fd529b183e7b7760be
13,269
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/backbones/resnet_tsn_MRI.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/backbones/resnet_tsn_MRI.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/backbones/resnet_tsn_MRI.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-03-07T10:51:21.000Z
2022-03-07T10:51:21.000Z
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 applica...
39.966867
145
0.464617
78f5013cd80995bac4e4f117ad6464075ef11c95
31
py
Python
chapter_ten/fusing_rust_with_data_access/diesel_pip_package/rust_db_cloning/__init__.py
PacktPublishing/Speed-up-your-Python-with-Rust
1fce5fb59ea966015768e7eca51c0e31d69531ec
[ "MIT" ]
21
2021-09-10T12:46:26.000Z
2022-03-23T02:50:39.000Z
chapter_ten/deploying_nightly_rust_in_rust/diesel_pip_package/rust_db_cloning/__init__.py
PacktPublishing/Speed-up-your-Python-with-Rust
1fce5fb59ea966015768e7eca51c0e31d69531ec
[ "MIT" ]
null
null
null
chapter_ten/deploying_nightly_rust_in_rust/diesel_pip_package/rust_db_cloning/__init__.py
PacktPublishing/Speed-up-your-Python-with-Rust
1fce5fb59ea966015768e7eca51c0e31d69531ec
[ "MIT" ]
6
2021-09-02T08:32:37.000Z
2022-03-17T21:15:25.000Z
from .rust_db_cloning import *
15.5
30
0.806452
6094b14016603ff8269842c3fadb35b51d320f0a
1,259
py
Python
fg/tournaments/migrations/0002_auto_20190804_2056.py
alex-evans/fgolf
8fcdfd72d168e25204a914e57d4c3478382fd473
[ "MIT" ]
null
null
null
fg/tournaments/migrations/0002_auto_20190804_2056.py
alex-evans/fgolf
8fcdfd72d168e25204a914e57d4c3478382fd473
[ "MIT" ]
null
null
null
fg/tournaments/migrations/0002_auto_20190804_2056.py
alex-evans/fgolf
8fcdfd72d168e25204a914e57d4c3478382fd473
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-08-05 01:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tournaments', '0001_initial'), ] operations = [ migrations.AlterField( model_name='tournamentpi...
35.971429
139
0.646545
60be4a6e47f5c00a3578f4339f53546a5aa690fa
1,635
py
Python
Packs/IvantiHeat/Scripts/IvantiHeatCreateProblemExample/IvantiHeatCreateProblemExample.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/IvantiHeat/Scripts/IvantiHeatCreateProblemExample/IvantiHeatCreateProblemExample.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/IvantiHeat/Scripts/IvantiHeatCreateProblemExample/IvantiHeatCreateProblemExample.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import json import demistomock as demisto from CommonServerPython import * """ Use the IvantiHeatCreateProblemExample script to create a problem object (JSON) in Ivanti Heat. The script gets the arguments required to create the problem, such as category, subject, and so on. It creates the JSON object and sets it insi...
39.878049
116
0.725994
71540059d17575de938cee205c1234c86763a75b
10,893
py
Python
voices/rms_arctic/local/train_lexadownsampledvqsoftmaxfinalframe.py
blackbawx/LEXA
75e5180ca61d3e0bd78c3b8b1ece0b21c8300026
[ "Apache-2.0" ]
null
null
null
voices/rms_arctic/local/train_lexadownsampledvqsoftmaxfinalframe.py
blackbawx/LEXA
75e5180ca61d3e0bd78c3b8b1ece0b21c8300026
[ "Apache-2.0" ]
null
null
null
voices/rms_arctic/local/train_lexadownsampledvqsoftmaxfinalframe.py
blackbawx/LEXA
75e5180ca61d3e0bd78c3b8b1ece0b21c8300026
[ "Apache-2.0" ]
null
null
null
"""Trainining script for Tacotron speech synthesis model. usage: train.py [options] options: --conf=<json> Path of configuration file (json). --gpu-id=<N> ID of the GPU to use [default: 0] --exp-dir=<dir> Experiment directory --checkpoint-dir=<dir> Directory wher...
36.553691
180
0.627559
c70402c9c012c773dff8930f99faa76cfab26467
3,762
py
Python
python_lib/hucon/Servo.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
2
2019-09-25T13:39:22.000Z
2019-09-26T10:06:13.000Z
python_lib/hucon/Servo.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
44
2019-09-25T14:35:48.000Z
2021-08-20T17:26:12.000Z
python_lib/hucon/Servo.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
8
2019-09-25T13:53:07.000Z
2022-02-24T19:23:44.000Z
#!/usr/bin/env python """ Servo.py - Driver module for leds, with PCA9685 Copyright (C) 2019 Basler AG All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from .PCA9685 import PCA9685 class Servo(object): "...
28.5
120
0.590377
c71189f4c4a5334d4fd36eef9c4a60b623fe7e40
121
py
Python
Implementierung/ResearchEnvironment/AuthorizationManagement/apps.py
Sashks/PSE
ae2d8133a85563c33583f15b9ba76a3a2bf0c762
[ "MIT" ]
null
null
null
Implementierung/ResearchEnvironment/AuthorizationManagement/apps.py
Sashks/PSE
ae2d8133a85563c33583f15b9ba76a3a2bf0c762
[ "MIT" ]
null
null
null
Implementierung/ResearchEnvironment/AuthorizationManagement/apps.py
Sashks/PSE
ae2d8133a85563c33583f15b9ba76a3a2bf0c762
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AuthorizationmanagementConfig(AppConfig): name = 'AuthorizationManagement'
20.166667
47
0.818182
40806a05de43e2f22acfa2089ad1055574120e0f
759
py
Python
leetcode/147-Insertion-Sort-List/InsertionSortList_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2017-05-18T06:11:02.000Z
2017-05-18T06:11:02.000Z
leetcode/147-Insertion-Sort-List/InsertionSortList_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/147-Insertion-Sort-List/InsertionSortList_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # @param head, a ListNode # @return a ListNode def insertionSortList(self, head): if not head: return head dummy = ListNode(0) ...
26.172414
51
0.479578
40a8bd3b6d6162500a15bd97e1e12be6b372bdec
4,991
py
Python
rbac/common/sawtooth/rbac_payload.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
75
2018-04-06T09:13:34.000Z
2020-05-18T18:59:47.000Z
rbac/common/sawtooth/rbac_payload.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
989
2018-04-18T21:01:56.000Z
2019-10-23T15:37:09.000Z
rbac/common/sawtooth/rbac_payload.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
72
2018-04-13T18:29:12.000Z
2020-05-29T06:00:33.000Z
# Copyright 2019 Contributors to Hyperledger Sawtooth # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
31.789809
87
0.665197
40b1a8323b301d4dbf29ca5e64c2ce1c71e23ff4
39,770
py
Python
BipartiteGraphModels/utility/load_data_v4.py
GACSE/BipartiteGraphModel
c05b2d9cfb1042e4a3eb374257637e2ac1f592c3
[ "MIT" ]
5
2021-02-09T06:51:48.000Z
2021-11-09T02:00:21.000Z
BipartiteGraphModels/utility/load_data_v4.py
GACSE/BipartiteGraphModel
c05b2d9cfb1042e4a3eb374257637e2ac1f592c3
[ "MIT" ]
null
null
null
BipartiteGraphModels/utility/load_data_v4.py
GACSE/BipartiteGraphModel
c05b2d9cfb1042e4a3eb374257637e2ac1f592c3
[ "MIT" ]
2
2021-07-19T09:27:01.000Z
2022-02-21T10:20:00.000Z
import numpy as np import random as rd import scipy.sparse as sp from time import time import pandas as pd # import numba as nb import concurrent.futures class Data(object): def __init__(self, path, batch_size): self.path = path self.batch_size = batch_size train_file = path + '/train.txt...
44.287305
199
0.609429
907efb7c7573636f6fcc615dd1301884a0ae8e9e
5,963
py
Python
backend/songwriter/migrations/0001_initial.py
giliam/turbo-songwriter
3d100b08dc19c60d7a1324120e06bd9f971eea5a
[ "MIT" ]
null
null
null
backend/songwriter/migrations/0001_initial.py
giliam/turbo-songwriter
3d100b08dc19c60d7a1324120e06bd9f971eea5a
[ "MIT" ]
12
2017-09-25T20:13:29.000Z
2020-02-12T00:12:41.000Z
backend/songwriter/migrations/0001_initial.py
giliam/turbo-songwriter
3d100b08dc19c60d7a1324120e06bd9f971eea5a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-08-04 14:21 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
52.769912
135
0.603052
29054264f589ee1d988e1cdd08675ae124ee348e
896
py
Python
chapter02/postgres_study.py
thiagola92/learning-databases-with-python
cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e
[ "MIT" ]
null
null
null
chapter02/postgres_study.py
thiagola92/learning-databases-with-python
cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e
[ "MIT" ]
null
null
null
chapter02/postgres_study.py
thiagola92/learning-databases-with-python
cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e
[ "MIT" ]
null
null
null
import psycopg client = psycopg.connect("postgres://username:password@127.0.0.1") cursor = client.cursor() cursor.execute( """ CREATE TABLE table_name( sku integer, name varchar(255), description text, category varchar(255) ) """ ) cursor.execute( """ INSERT IN...
21.333333
248
0.657366
29152645904b515f07a4d0da98cbe79a82611e48
5,312
py
Python
Util/ProgressBar.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
1,107
2016-09-21T02:18:36.000Z
2022-03-29T02:52:12.000Z
Util/ProgressBar.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
18
2016-12-22T10:24:47.000Z
2022-03-11T23:18:43.000Z
Util/ProgressBar.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
776
2016-12-21T12:08:08.000Z
2022-03-21T06:12:08.000Z
import time class ProgressBar: def __init__(self, min_value=0, max_value=None, min_refresh_period=0.5, width=30, name="", start=True): self._min, self._max = min_value, max_value self._task_length = int(max_value - min_value) if ( min_value is not None and max_value is not None ...
38.215827
108
0.51186
29499b0220dfc37bd2420d438083161e806a5c58
4,948
py
Python
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/EGG-INFO/scripts/venn_mpl.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
1
2019-07-29T02:53:51.000Z
2019-07-29T02:53:51.000Z
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/EGG-INFO/scripts/venn_mpl.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/EGG-INFO/scripts/venn_mpl.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
#!/usr/bin/python """ Given 3 files, creates a 3-way Venn diagram of intersections using matplotlib; \ see :mod:`pybedtools.contrib.venn_maker` for more flexibility. Numbers are placed on the diagram. If you don't have matplotlib installed. try venn_gchart.py to use the Google Chart API instead. The values in the di...
33.432432
115
0.611358
298119af20b2ba5f36a0a6cec13cd2c22b9de86a
737
py
Python
Smain.py
Jonatan966/SODA
046d8c1e7b9bac3a555526c9fe2f365c2b338aca
[ "MIT" ]
null
null
null
Smain.py
Jonatan966/SODA
046d8c1e7b9bac3a555526c9fe2f365c2b338aca
[ "MIT" ]
null
null
null
Smain.py
Jonatan966/SODA
046d8c1e7b9bac3a555526c9fe2f365c2b338aca
[ "MIT" ]
null
null
null
#Aqui onde o sistema inicia from Nucleo import * print(f'{soda_version}\nDigite INFO para mais informações.\n') def getHandler(name): name = name return globals().get(f"soda_{name}") def Main(): while True: resp = sMain_Saidas().Prompt() handler = getHandler(resp) if handler != N...
25.413793
66
0.496608
d3e78f0950dfd161c6e1ef4ebd51b631e19abb6b
3,379
py
Python
backend/app/utils/minio_client.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-11-04T17:06:07.000Z
2021-11-04T17:06:07.000Z
backend/app/utils/minio_client.py
JamesNeumann/learning-by-annotations
c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad
[ "MIT" ]
21
2021-11-01T10:13:56.000Z
2021-12-02T10:02:13.000Z
backend/app/utils/minio_client.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-12-16T18:20:55.000Z
2021-12-16T18:20:55.000Z
import json import os from typing import Any from app.core.config import settings from minio import Minio from minio.deleteobjects import DeleteObject def policy(bucket_name): return { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", ...
32.805825
111
0.585084
9ee8aca1ba0e17c40656699b5978707e16bcfb28
807
py
Python
apps/multivers/admin.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
1
2017-01-08T13:21:43.000Z
2017-01-08T13:21:43.000Z
apps/multivers/admin.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
17
2018-12-03T14:22:14.000Z
2021-07-14T15:15:12.000Z
apps/multivers/admin.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
2
2018-12-03T14:58:49.000Z
2019-12-01T13:24:42.000Z
from django.contrib import admin from . import models class SettingsAdmin(admin.ModelAdmin): list_display = ('key', 'value') list_editable = ('value',) class ProductAdmin(admin.ModelAdmin): list_display = ('alexia_id', 'alexia_name', 'multivers_id', 'multivers_name', 'margin') list_editable = ('mul...
28.821429
91
0.760843
b481d0f32071061878317ac742853597fd9cb479
2,023
py
Python
imwievaluation/tests/test_surveyxml.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
null
null
null
imwievaluation/tests/test_surveyxml.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
null
null
null
imwievaluation/tests/test_surveyxml.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
1
2019-10-19T10:11:17.000Z
2019-10-19T10:11:17.000Z
from imwievaluation.surveyxml import SurveyXML xmlfile = 'testfiles/survey.xml' sx = SurveyXML(xmlfile) groups = sx.root.findall('section') questions = sx.get_group_questions(groups[0]) def test_get_title(): title = sx.get_title() assert title == '___ VORLAGE ___ Evaluation mit Tutorium' def test_get_group...
32.111111
77
0.703905
c326117ea668ae8641b0f5781086cb6a68d6b40d
3,557
py
Python
pocketthrone/entities/tilemap.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
4
2016-06-05T16:48:04.000Z
2020-03-23T20:06:06.000Z
pocketthrone/entities/tilemap.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
pocketthrone/entities/tilemap.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
from pocketthrone.entities.enum import Enum, CoordinateAxis, Compass class GridTranslation: axis = None value = 0 def __init__(self, axis=CoordinateAxis.AXIS_X, value=0): self.axis = axis self.value = value # return the relative position of the vector represented by this class def get_relative_position(self...
25.407143
107
0.716334
d287786a0134bedc7a11f5875a3b502df87b3389
1,006
py
Python
Shakti/2021/crypto/Awesome_encryption_Scheme/encryptor.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
Shakti/2021/crypto/Awesome_encryption_Scheme/encryptor.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
Shakti/2021/crypto/Awesome_encryption_Scheme/encryptor.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
from Crypto.Cipher import AES from Crypto.Util.Padding import pad from hashlib import md5 from os import urandom from flag import flag keys = [md5(urandom(3)).digest() for _ in range(2)] def bytexor(da,ta): return bytes(i^j for i,j in zip(da,ta)) def get_ciphers(iv1, iv2): return [ AES.new(keys[0], mod...
30.484848
116
0.66004
7db930f0475b5995f65e2374f8348361212ad4f0
2,938
py
Python
python/fastcampus/chapter06_01.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/fastcampus/chapter06_01.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/fastcampus/chapter06_01.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""파이썬 심화 흐름제어, 병행처리(Concurrency) 제너레이터, 반복형 """ # 제너레이터 # 파이썬 반복형 종류 # for, collections, text file, List, Dict, Set, Tuple, unpacking, *args # 반복 가능한 이유? iter(x) 함수 호출 from collections import abc t = "ABCDEF" # for 문 사용 for c in t: print(c, end=", ") print() # while 문 사용 w = iter(t) while True: try: ...
17.592814
71
0.608237
7dbc28d6994060cb647e43e99d110578ae152808
33,214
py
Python
Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import re import time import demistomock as demisto # noqa: F401 # IMPORTS from CommonServerPython import * # noqa: F401 # Disable insecure warnings requests.packages.urllib3.disable_warnings() """PARAMETERS""" class Client(BaseClient): """ Client will implement the service API, and should not contain a...
41.106436
129
0.640965
81b050e0d5076428046f74c0b32bccf87b6063cc
571
py
Python
2181-merge-nodes-in-between-zeros/2181-merge-nodes-in-between-zeros.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
2181-merge-nodes-in-between-zeros/2181-merge-nodes-in-between-zeros.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
2181-merge-nodes-in-between-zeros/2181-merge-nodes-in-between-zeros.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def mergeNodes(self, head: Optional[ListNode]) -> Optional[ListNode]: dummy = cur = ListNode(0) flush = 0 head = head.next ...
30.052632
73
0.507881
486e52a0e38aaebceab5028fdd2aba3e1f8aebc6
85
py
Python
teste/tts.py
pedroolynth0/Ghost
485b53dedbd790770b51f1c52d70d3d892efaf2d
[ "MIT" ]
null
null
null
teste/tts.py
pedroolynth0/Ghost
485b53dedbd790770b51f1c52d70d3d892efaf2d
[ "MIT" ]
null
null
null
teste/tts.py
pedroolynth0/Ghost
485b53dedbd790770b51f1c52d70d3d892efaf2d
[ "MIT" ]
null
null
null
import pyttsx3 engine = pyttsx3.init() engine.say("OLa tudo bem") engine.runAndWait()
21.25
26
0.764706
73803d3540e807cf9377bcf4ad79fbfe1f77c246
500
py
Python
2078-two-furthest-houses-with-different-colors/2078-two-furthest-houses-with-different-colors.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
2078-two-furthest-houses-with-different-colors/2078-two-furthest-houses-with-different-colors.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
2078-two-furthest-houses-with-different-colors/2078-two-furthest-houses-with-different-colors.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def maxDistance(self, colors: List[int]) -> int: # using the fact there are at least two different colors base = colors[0] output = 0 for right in range(len(colors)-1, 0, -1): if colors[right]!=base: output = right ...
33.333333
64
0.5
fb5934fca18e9b691c36dd49e1ecc234b6585d8a
67,956
py
Python
fhirclient/r4models/explanationofbenefit.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
fhirclient/r4models/explanationofbenefit.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
fhirclient/r4models/explanationofbenefit.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit) on 2019-05-07. # 2019, SMART Health IT. from . import domainresource class ExplanationOfBenefit(domainresource.DomainResource): """ Explanation of Bene...
42.234929
129
0.597269
fbbac9db1730dd2579f1913be5eeb05ebb202843
434
py
Python
python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/t/7_t.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/t/7_t.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/t/7_t.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
def problem3_7(csv_pricefile, flower): import csv fin = open(csv_pricefile) #fout = open(new_name,'w',newline = '') #ct = 0 #tot_weight = 0.0 for row in csv.reader(fin): #print(row[0]," ",row[1]) if row[0] == flower: print(row[1]) fin.close() #fout.close() #c...
24.111111
50
0.589862
54bf542b97e04efd126cf113e05d57aaa6818a7c
7,374
py
Python
venv/Lib/site-packages/pynance/data/prep.py
LeonardoHMS/imobi
6b2b97a05df67ea7d493f7b601382f65c6629cc2
[ "MIT" ]
35
2015-03-12T04:16:14.000Z
2020-12-17T18:10:15.000Z
venv/Lib/site-packages/pynance/data/prep.py
LeonardoHMS/imobi
6b2b97a05df67ea7d493f7b601382f65c6629cc2
[ "MIT" ]
31
2015-03-16T21:31:04.000Z
2021-01-26T00:12:34.000Z
venv/Lib/site-packages/pynance/data/prep.py
LeonardoHMS/imobi
6b2b97a05df67ea7d493f7b601382f65c6629cc2
[ "MIT" ]
18
2015-09-30T10:40:26.000Z
2021-01-25T21:20:44.000Z
""" .. Copyright (c) 2014- Marshall Farrier license http://opensource.org/licenses/MIT Data - preprocessing functions (:mod:`pynance.data.prep`) ========================================================= .. currentmodule:: pynance.data.prep """ import numpy as np import pandas as pd def center(dataset, out=None):...
35.114286
96
0.645104
3ff2f735373654aceb4c2afe413b4164abba657e
5,573
py
Python
tests/test_workout_plan.py
noahsolomon0518/rengine
a544951c6b7dd707586cd3c4f84ddec554f1c96a
[ "MIT" ]
null
null
null
tests/test_workout_plan.py
noahsolomon0518/rengine
a544951c6b7dd707586cd3c4f84ddec554f1c96a
[ "MIT" ]
null
null
null
tests/test_workout_plan.py
noahsolomon0518/rengine
a544951c6b7dd707586cd3c4f84ddec554f1c96a
[ "MIT" ]
null
null
null
import unittest from unittest import TestCase from rengine.exercises import StrengthExercise from rengine.workout_plan import * class TestGetStrengthExerciseQueue(TestCase): def test_barbell_full_body_workout(self): seq = get_strenth_exercise_queue(MuscleGroup.ALL, [EquipmentAvailable.BARBELL, Equipme...
48.885965
286
0.710569
b7aa43b913e401409da6a4ed4e05d000255a0b74
1,569
py
Python
opencv_tutorial/opencv_python_tutorials/Image_Processing/image_threshold.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
opencv_tutorial/opencv_python_tutorials/Image_Processing/image_threshold.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
opencv_tutorial/opencv_python_tutorials/Image_Processing/image_threshold.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Mar 28 16:42:42 2019 @author: jone """ #%% 기본 임계처리 import cv2 from matplotlib import pyplot as plt img = cv2.imread('img/squirrel.jpg', 0) # 사이즈 조정 h, w = img.shape r = 300/w dim = (int(r*w), int(r*h)) img_resize = cv2.resize(img, dim) cv2.imshow('img', img_resize) cv2.wa...
24.904762
95
0.685787
4d0b19d0d9880b98fef0d527568f480742ca831d
2,202
py
Python
Packs/GoogleChronicleBackstory/Scripts/ChronicleAssetEventsForMACWidgetScript/ChronicleAssetEventsForMACWidgetScript_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/GoogleChronicleBackstory/Scripts/ChronicleAssetEventsForMACWidgetScript/ChronicleAssetEventsForMACWidgetScript_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/GoogleChronicleBackstory/Scripts/ChronicleAssetEventsForMACWidgetScript/ChronicleAssetEventsForMACWidgetScript_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from unittest.mock import patch import ChronicleAssetEventsForMACWidgetScript def test_main_success(mocker): """ When main function is called, set_arguments_for_widget_view should be called. """ mocker.patch.object(ChronicleAssetEventsForMACWidgetScript, 'set_arguments_for_widget_view', return_v...
31.457143
113
0.726158
4d87a9b333e2628d79462cec9f05a7ec0bd34835
392
py
Python
leetcode/154-Find-Minimum-in-Rotated-Sorted-Array-II/FindMininRSA2_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/154-Find-Minimum-in-Rotated-Sorted-Array-II/FindMininRSA2_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/154-Find-Minimum-in-Rotated-Sorted-Array-II/FindMininRSA2_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution: # @param num, a list of integer # @return an integer def findMin(self, num): L = 0; R = len(num) - 1 while L < R and num[L] >= num[R]: M = (L + R) / 2 if num[M] > num[L]: L = M + 1 elif num[M] < num[R]: ...
24.5
41
0.362245
4dbe2cda7fdd3635fe0a95f91ce6156f76e0b1bc
377
py
Python
Language Proficiency/Python/Basic Data Types/Finding the Percentage/find_percentage.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Language Proficiency/Python/Basic Data Types/Finding the Percentage/find_percentage.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Language Proficiency/Python/Basic Data Types/Finding the Percentage/find_percentage.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 if __name__ == '__main__': n = int(input()) student_marks = {} for _ in range(n): name, *line = input().split() scores = list(map(float, line)) student_marks[name] = scores query_name = input() scores = student_marks[query_name] average = sum(sco...
22.176471
39
0.588859
151b0f79c3893a023ab7ac373205c08b7e7334b1
2,475
py
Python
sam_app/sam_app/main.py
csjy309450/SAM-Backend
a23569ea372f718ca4a167e21e8046336db00561
[ "MIT" ]
null
null
null
sam_app/sam_app/main.py
csjy309450/SAM-Backend
a23569ea372f718ca4a167e21e8046336db00561
[ "MIT" ]
null
null
null
sam_app/sam_app/main.py
csjy309450/SAM-Backend
a23569ea372f718ca4a167e21e8046336db00561
[ "MIT" ]
null
null
null
import sys from wsgiref.simple_server import make_server from pyramid.config import Configurator from sam_app.view_layer.view_hello_world import ViewHelloWorld from sam_app.view_layer.view_login import ViewLogin from sam_app.view_layer.view_perf import ViewPerf import sam_app.view_layer.view_exp_unkown as view_exp_unko...
48.529412
116
0.681616
42928e4651567e66bae1f39b1b771a9f7ab0e79c
5,630
py
Python
constants/bank_dict.py
zhouhongf/bank_hr
a42e5e18f3ec36b1ec65931415fe476c9690e0a0
[ "MIT" ]
2
2021-11-27T06:40:47.000Z
2022-01-06T03:12:46.000Z
constants/bank_dict.py
zhouhongf/bank_hr
a42e5e18f3ec36b1ec65931415fe476c9690e0a0
[ "MIT" ]
null
null
null
constants/bank_dict.py
zhouhongf/bank_hr
a42e5e18f3ec36b1ec65931415fe476c9690e0a0
[ "MIT" ]
null
null
null
class BankDict: file_type = { 'outline': '理财列表', 'manual': '产品说明书', 'notice_issue': '产品发行公告', 'notice_start': '产品成立公告', 'notice_end': '产品终止公告', 'photo_bankwork': '产品图片' } list_bank_alia = { '工商银行': 'icbc', '农业银行': 'abchina', '中国银行': ...
21.245283
65
0.328242
c426470ed5a71151c059b8ffe8d4d4f59f410c32
2,613
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/sumolib/scenario/scenarios/rilsa1.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
4
2020-11-13T02:35:56.000Z
2021-03-29T20:15:54.000Z
sumolib/scenario/scenarios/rilsa1.py
KhalidHALBA-GR-NIST/UCEFSUMOV2V
4eb7ac761303a171718a10e4131184746bded9fd
[ "MIT" ]
9
2020-12-09T02:12:39.000Z
2021-02-18T00:15:28.000Z
sumolib/scenario/scenarios/rilsa1.py
KhalidHALBA-GR-NIST/UCEFSUMOV2V
4eb7ac761303a171718a10e4131184746bded9fd
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2012-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.eclipse.org/legal/epl-2....
32.259259
112
0.605817
18bd56b63638743691a203e3e89e624002603177
4,480
py
Python
ingress/ambassador/end-to-end/kubewait.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
63
2018-02-04T03:31:22.000Z
2022-03-07T08:27:39.000Z
ingress/ambassador/end-to-end/kubewait.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
3
2021-03-26T00:22:50.000Z
2021-03-26T00:26:07.000Z
ingress/ambassador/end-to-end/kubewait.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
40
2018-01-22T16:31:16.000Z
2022-03-08T04:40:42.000Z
#!python # Copyright 2018 Datawire. 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 ...
28.717949
97
0.613393
7ff9a50769ddf31d76def926a15de297b98f0de4
11,655
py
Python
api/utils/markdownify.py
healthIMIS/aha-kompass
7b7cae24502c0c0e5635c587cfef797a93ae02b5
[ "MIT" ]
2
2021-03-23T20:32:38.000Z
2021-04-21T11:20:12.000Z
api/utils/markdownify.py
healthIMIS/aha-kompass
7b7cae24502c0c0e5635c587cfef797a93ae02b5
[ "MIT" ]
4
2021-04-19T11:00:55.000Z
2021-04-20T08:21:48.000Z
api/utils/markdownify.py
healthIMIS/aha-kompass
7b7cae24502c0c0e5635c587cfef797a93ae02b5
[ "MIT" ]
null
null
null
# This is a modified copy of markdownify. ################################################################## # The original version of Markdownify is licensed as: # The MIT License (MIT) # Copyright 2012-2018 Matthew Tretter # Permission is hereby granted, free of charge, to any person obtaining a copy # of this soft...
37.718447
159
0.568254
b10902b6d8fa4891a434c2cec5762f8503b6e7f8
8,764
py
Python
src/onegov/org/views/usermanagement.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/views/usermanagement.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/views/usermanagement.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from collections import defaultdict from copy import copy from onegov.core.crypto import random_password from onegov.core.directives import query_form_class from onegov.core.security import Secret from onegov.core.templates import render_template from onegov.form import merge_forms from onegov.org import _, OrgApp from...
30.116838
78
0.588772
b13dfaa4e5e6393ac6febd707858f5f94ed30f57
5,795
py
Python
model_zoo/gpt/run_generation.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
model_zoo/gpt/run_generation.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
model_zoo/gpt/run_generation.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
import random import argparse import numpy as np import paddle from paddlenlp.transformers import ( GPTLMHeadModel, GPTTokenizer, GPTChineseTokenizer, ) MODEL_CLASSES = { "gpt2": (GPTLMHeadModel, GPTTokenizer), "gpt2-cn": (GPTLMHeadModel, GPTChineseTokenizer), } def parse_args(): parser = ar...
34.700599
108
0.551855
b199d5a55f603f0fc5fbb7270adee0b62dd46f58
739
py
Python
packages/watchmen-dqc/src/watchmen_dqc/util/fake_principal_service.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-dqc/src/watchmen_dqc/util/fake_principal_service.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-dqc/src/watchmen_dqc/util/fake_principal_service.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import Optional from watchmen_auth import PrincipalService from watchmen_model.admin import User, UserRole from watchmen_model.common import TenantId, UserId from watchmen_utilities import is_blank def fake_super_admin() -> PrincipalService: return PrincipalService(User( userId='1', userName='imma-s...
27.37037
91
0.772666
62746c05d3a4e30ca0469082373870a52d8edd07
658
py
Python
source/pkgsrc/lang/python37/patches/patch-Lib_test_test__platform.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/lang/python37/patches/patch-Lib_test_test__platform.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/lang/python37/patches/patch-Lib_test_test__platform.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-Lib_test_test__platform.py,v 1.1 2020/11/17 19:33:26 sjmulder Exp $ Support for macOS 11 and Apple Silicon (ARM). Mostly backported from: https://github.com/python/cpython/pull/22855 --- Lib/test/test_platform.py.orig 2020-08-15 05:20:16.000000000 +0000 +++ Lib/test/test_platform.py @@ -254,7 +254,7 @@...
38.705882
82
0.603343
657baeacda45a00b8f200f800fdbd2979f7c80b0
13,774
py
Python
Packs/X509Certificate/Scripts/CertificateReputation/CertificateReputation.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/X509Certificate/Scripts/CertificateReputation/CertificateReputation.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/X509Certificate/Scripts/CertificateReputation/CertificateReputation.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 * # noqa # pylint: disable=unused-wildcard-import from CommonServerUserPython import * # noqa # pylint: disable=unused-wildcard-import import traceback import dateparser from datetime import timedelta from enum import Enum from typing import List, Dict, An...
43.314465
129
0.691956
f30ec2bde48e56d2b8b973ca15e940f9a2826b45
2,590
py
Python
PMIa/2015/Donkor_A_H/task_10_10.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2015/Donkor_A_H/task_10_10.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2015/Donkor_A_H/task_10_10.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 10. Вариант 10. #Напишите программу "Генератор персонажей" для игры. Пользователю должно быть предоставлено 30 пунктов, которые можно распределить между четырьмя характеристиками: Сила, Здоровье, Мудрость и Ловкость. Надо сделать так, чтобы пользователь мог не только брать эти пункты из общего "пула", но и во...
44.655172
372
0.569884
f324010b5b987c400a38d264f8bf75178573984a
83
py
Python
event_detector/gttm/nlp/__init__.py
MahdiFarnaghi/gtm
adbec372786262607291f901a444a0ebe9e98b48
[ "Apache-2.0" ]
null
null
null
event_detector/gttm/nlp/__init__.py
MahdiFarnaghi/gtm
adbec372786262607291f901a444a0ebe9e98b48
[ "Apache-2.0" ]
null
null
null
event_detector/gttm/nlp/__init__.py
MahdiFarnaghi/gtm
adbec372786262607291f901a444a0ebe9e98b48
[ "Apache-2.0" ]
null
null
null
from .clean_text import TextCleaner from .vectorize import VectorizerUtil_FastText
27.666667
46
0.879518
b283abdf510189905da3dbbb69686fe3eb0283ed
276
py
Python
Python/EstruturaSequencial/teste.py
ekballo/Back-End
b252e3b2a16ce36486344823f14afa6691fde9bc
[ "MIT" ]
null
null
null
Python/EstruturaSequencial/teste.py
ekballo/Back-End
b252e3b2a16ce36486344823f14afa6691fde9bc
[ "MIT" ]
null
null
null
Python/EstruturaSequencial/teste.py
ekballo/Back-End
b252e3b2a16ce36486344823f14afa6691fde9bc
[ "MIT" ]
null
null
null
nome = "Jefferson Garcia" empresa = '.RhemaCODE' qtde_funcionario = 15 mediaMensalidade = 10.50 print('{} trabalha na empresa {}'.format(nome,empresa)) print('Possui {} funiconarios.'.format(qtde_funcionario)) print('A media da mensalidade é de: {}'.format(mediaMensalidade))
34.5
65
0.746377
02028127b3666048b27ff1fe6310c5019b7134ba
1,655
py
Python
resources/mechanics_lib/utils/rectbeam.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
7
2016-01-20T02:33:00.000Z
2021-02-04T04:06:57.000Z
resources/mechanics_lib/utils/rectbeam.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
null
null
null
resources/mechanics_lib/utils/rectbeam.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
3
2016-10-05T07:20:30.000Z
2017-11-20T10:36:50.000Z
try: from api.drawing import Drawing from api.shapes import Face, Rectangle from api.edge import Fold except: from ..api.drawing import Drawing from ..api.shapes import Face, Rectangle from ..api.edge import Fold import numpy as np class RectBeam(Drawing): """ A class representing a Beam. """ def ...
25.461538
107
0.601208
022edadc51047d5230202991b9e763d54e2ac41a
1,131
py
Python
pipeswitch/frontend_tcp.py
CcTtry/PipeSwitch
c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e
[ "Apache-2.0" ]
null
null
null
pipeswitch/frontend_tcp.py
CcTtry/PipeSwitch
c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e
[ "Apache-2.0" ]
null
null
null
pipeswitch/frontend_tcp.py
CcTtry/PipeSwitch
c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e
[ "Apache-2.0" ]
null
null
null
import threading import struct from util.utils import timestamp class FrontendTcpThd(threading.Thread): def __init__(self, qout, agent): super(FrontendTcpThd, self).__init__() self.qout = qout self.agent = agent def run(self): while True: timestamp('...
32.314286
75
0.552608
026da06ecf13e532d072c473f3aa2ac1079e7318
2,359
py
Python
src/doc/tutorials/tutorial_examples/scripting/listing_5_rendering_a_dataset_to_a_movie.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/doc/tutorials/tutorial_examples/scripting/listing_5_rendering_a_dataset_to_a_movie.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/doc/tutorials/tutorial_examples/scripting/listing_5_rendering_a_dataset_to_a_movie.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
########################################### # file: VisIt Scripting Tutorial Listing 5 ########################################### # # 1) Open VisIt # 2) Open 'aneurysm.visit' # 3) Paste and execute via the Commands window, or the CLI. # # import visit_utils, we will use it to help encode our movie from visit_utils im...
28.768293
101
0.698177
0cd4d22796778e0e3f8ea53f6523acd62bd29cee
1,770
py
Python
official/nlp/gru/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/nlp/gru/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/nlp/gru/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
40.227273
106
0.668362
0cfd9a9d7ee773ce3f949ab395dce4eecd2f2415
2,188
py
Python
sentiment_model.py
ameya03dot/Sentiment-Analysis-GPT2
9fcc3bae6a88aa69781093ecbaf0e0e996efdf46
[ "MIT" ]
null
null
null
sentiment_model.py
ameya03dot/Sentiment-Analysis-GPT2
9fcc3bae6a88aa69781093ecbaf0e0e996efdf46
[ "MIT" ]
null
null
null
sentiment_model.py
ameya03dot/Sentiment-Analysis-GPT2
9fcc3bae6a88aa69781093ecbaf0e0e996efdf46
[ "MIT" ]
null
null
null
import json import os import numpy as np import tensorflow as tf import model,encoder,sample model_name = "345M" # The GPT-2 model we're using #gpt2.download_gpt2(model_name=model_name) # Download the model class sentiment: def interact_model(self, model_name, seed, nsamples, ba...
30.816901
90
0.579525
f02079c88636d952785ee7a1cc058486b25274a6
549
py
Python
tests/test_front.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
tests/test_front.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
16
2017-09-13T10:21:40.000Z
2020-06-01T04:32:22.000Z
tests/test_front.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
import pytest from flask import url_for def test_search(client): data = {'tags': [''], 'submit': True} response = client.post('/', data=data, follow_redirects=False) assert response.status_code == 302 assert url_for('gallery.show_posts') in response.headers['Location'] data = {'tags': ['oldbenwa'...
36.6
72
0.688525
f05d22d7a0bb587a00f042a2fe4fefc272244136
698
py
Python
Edzna/device/opening.py
xe1gyq/veracruz
6094d511998705245fc9f25158cc496de5871db3
[ "MIT" ]
null
null
null
Edzna/device/opening.py
xe1gyq/veracruz
6094d511998705245fc9f25158cc496de5871db3
[ "MIT" ]
null
null
null
Edzna/device/opening.py
xe1gyq/veracruz
6094d511998705245fc9f25158cc496de5871db3
[ "MIT" ]
null
null
null
#!/usr/bin/python import paho.mqtt.client as paho import time import pyupm_grove as grove from threading import Thread button = grove.GroveButton(8) def functionDataSensor(): return button.value() def functionDataSensorMqttPublish(): mqttclient = paho.Client() mqttclient.connect("iot.eclipse.org", 1883,...
21.151515
68
0.697708
6533d37f3609d908544abb430c28bd8da119b3c9
1,529
py
Python
767/tuwulisu_767_greedy.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
767/tuwulisu_767_greedy.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
767/tuwulisu_767_greedy.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
class Solution: def pick_char(self, char_list, prev): picked_char = None for i, char_count in enumerate(char_list): char, count = char_count[0], char_count[1] if char != prev: picked_char = char char_count[1] = count -1 picked_i...
33.977778
123
0.517986
f08db0c473977dff30a7456d979be4e6f5ab4339
1,251
py
Python
agspiel/api/data.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2021-03-09T21:37:41.000Z
2021-03-09T21:37:41.000Z
agspiel/api/data.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
4
2020-11-13T19:34:58.000Z
2021-07-24T16:25:27.000Z
agspiel/api/data.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2020-08-24T14:38:18.000Z
2020-08-24T14:38:18.000Z
# Copyright (c) 2021 | KingKevin23 (@kingkevin023) from datetime import datetime class Data: def __init__(self, update, data=None): self.data = data self.update = update # type(update) -> function self.timestamp = datetime.now() def _update_data(self): self.data = self.upda...
25.02
111
0.576339
f0c245463a634474b65a95ef5b0c13a5f34f64dd
4,072
py
Python
superstructure/logik.py
fossabot/superstructure
f4ab5cac269fb3dedfbd3a54c441af23edf3840b
[ "MIT" ]
null
null
null
superstructure/logik.py
fossabot/superstructure
f4ab5cac269fb3dedfbd3a54c441af23edf3840b
[ "MIT" ]
null
null
null
superstructure/logik.py
fossabot/superstructure
f4ab5cac269fb3dedfbd3a54c441af23edf3840b
[ "MIT" ]
null
null
null
from .forms import LogischeForm from uuid import uuid4 class Begriff(LogischeForm): """probably not the perfect term, what is meant is a singular Thing of any sort; important: a Begriff is always a _of_ some thing and a thing of a Bewusstsein. thus begriff.besonderheit is always just what is true for the Bewusst...
24.829268
281
0.610756
0b09860f46a93ae0dec7065cfc377e072a5ad7ea
663
py
Python
BEGUNDAL-main/Bro.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
BEGUNDAL-main/Bro.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
BEGUNDAL-main/Bro.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 requests,os,json import brute P = "\x1b[0;97m" M = "\x1b[0;91m" H = "\033[92;1m" def main(): try: token = open("token.txt","r").read() otw = requests.get("https://graph.facebook.com/me/?access_token=" + token) a = json.loads(otw.text) nama = a["name"] except (KeyErro...
26.52
97
0.571644
acaa347658328215ddd0a2499409807a50f21fdd
1,920
py
Python
tests/test_dateutils.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
tests/test_dateutils.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
tests/test_dateutils.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
def test_calculate_occurrences(): result = get_calculate_occurrences("RRULE:FREQ=DAILY;COUNT=7") assert result["batch"]["batch_size"] == 10 number_of_occurences = len(result["occurrences"]) assert number_of_occurences == 7 occurence = result["occurrences"][0] assert occurence["date"] == "20300...
29.090909
87
0.734375
4a19323113ce9d7a6cd11ca8aa76ae0cd7e5f908
50
py
Python
AFluentPython/tools/__init__.py
RoboCuper-hujinlei/AI-Job
cf7a081d59700d75f0f2dc73b6d5130863796f01
[ "Apache-2.0" ]
null
null
null
AFluentPython/tools/__init__.py
RoboCuper-hujinlei/AI-Job
cf7a081d59700d75f0f2dc73b6d5130863796f01
[ "Apache-2.0" ]
null
null
null
AFluentPython/tools/__init__.py
RoboCuper-hujinlei/AI-Job
cf7a081d59700d75f0f2dc73b6d5130863796f01
[ "Apache-2.0" ]
null
null
null
""" 介绍python常用的内建模块 """ print("this is __init__")
10
25
0.68
a8415b423a00d61ed4882bcefa92e43d530b4ca8
1,539
py
Python
0-notes/job-search/Cracking the Coding Interview/C01ArraysStrings/python/1.4-answer.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C01ArraysStrings/python/1.4-answer.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C01ArraysStrings/python/1.4-answer.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Palindrome Permutation # Given a string, write a function to check if it is a permutation of a palindrome. # A palindrome is a word or phrase that is the same forwards and backwards. # A permutation is a rearrangement of letters. # The palindrome does not need to be limited to just dictionary words. # You can ignore...
32.0625
83
0.581546
4f2077e6e6ce8a1b67baf5ed3482cbb9c39b594e
111
py
Python
tournamentmasters/__init__.py
jorgeparavicini/FourWins
1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83
[ "MIT" ]
1
2021-01-20T18:33:01.000Z
2021-01-20T18:33:01.000Z
tournamentmasters/__init__.py
jorgeparavicini/FourWins
1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83
[ "MIT" ]
null
null
null
tournamentmasters/__init__.py
jorgeparavicini/FourWins
1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83
[ "MIT" ]
2
2019-09-04T08:27:14.000Z
2019-09-06T20:32:30.000Z
from .command_tournament_master import CommandTournamentMaster from .tournament_master import TournamentMaster
37
62
0.90991
4f23ac03d3d2adccff92108b434bf4227f863372
596
py
Python
ArtificialIntelligence/BotBuilding/botcleanr.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
ArtificialIntelligence/BotBuilding/botcleanr.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
ArtificialIntelligence/BotBuilding/botcleanr.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
#!/bin/python3 def nextMove(posr, posc, board): dr, dc = get_next_dirt(board) if(posc != dc): move = (posc < dc) and 'RIGHT' or 'LEFT' elif(posr != dr): move = (posr < dr) and 'DOWN' or 'UP' else: move = 'CLEAN' print(move) def get_next_dirt(board): for a in ran...
25.913043
60
0.511745
8cf3f970149fd17e31ada4f0cbf90444f7581a82
439
py
Python
PeAnalyser/hashsum.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
4
2021-04-23T15:39:17.000Z
2021-12-27T22:53:24.000Z
PeAnalyser/hashsum.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
null
null
null
PeAnalyser/hashsum.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
2
2021-04-19T08:28:54.000Z
2022-01-19T13:23:29.000Z
#-*- coding:utf-8 -*- import hashlib def md5sum(filename): f=open(filename,"r",encoding="cp437") content = f.read() f.close() h = hashlib.md5() h.update(content.encode("cp437")) hex_digest = h.hexdigest() return hex_digest def md5sum_bin(filename): f=open(filename,"rb") content = ...
20.904762
41
0.61959
0fce17b8876a706ef9a8ec4f025ba020b0dff882
724
py
Python
lab1/zad1.py
agat272/ABD
485d762655101204cc805e92d9a223da5233036f
[ "MIT" ]
null
null
null
lab1/zad1.py
agat272/ABD
485d762655101204cc805e92d9a223da5233036f
[ "MIT" ]
null
null
null
lab1/zad1.py
agat272/ABD
485d762655101204cc805e92d9a223da5233036f
[ "MIT" ]
null
null
null
#Agata Swatowska, zadanie 3- rysowanie wykresow funkcji x^2+5 import matplotlib.pyplot as plt import numpy as np def function(x): return x**2+5 x1 = np.linspace(-1,1) x2 = np.linspace(-6,6) x3 = np.linspace(0,5) fig, ax = plt.subplots(3,1) fig.set_size_inches(6, 18) y1 = function(x1) ax[0].plot(x1, y1, label = ...
19.567568
61
0.638122