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
07f40f6f6a322a473f4a2713e7af04e8a4e789b6
19,715
py
Python
Python/pyBitwiseAutomation/autogenCommon.py
jimwaschura/Automation
f655feeea74ff22ebe44d8b68374ba6983748f60
[ "BSL-1.0" ]
null
null
null
Python/pyBitwiseAutomation/autogenCommon.py
jimwaschura/Automation
f655feeea74ff22ebe44d8b68374ba6983748f60
[ "BSL-1.0" ]
null
null
null
Python/pyBitwiseAutomation/autogenCommon.py
jimwaschura/Automation
f655feeea74ff22ebe44d8b68374ba6983748f60
[ "BSL-1.0" ]
null
null
null
# autogenCommon.py # ================================================================================ # BOOST SOFTWARE LICENSE # # Copyright 2020 BitWise Laboratories Inc. # Original Author.......Jim Waschura # Contact...............info@bitwiselabs.com # # Permission is hereby granted, free of charge, to any person or...
32.858333
117
0.586609
9c36cd857034549c9aa16596fba6a09f510c8d55
173
py
Python
7-assets/past-student-repos/Intro-Python-master/src/days-2-4-adv/player.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Intro-Python-master/src/days-2-4-adv/player.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Intro-Python-master/src/days-2-4-adv/player.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Write a class to hold player information, e.g. what room they are in # currently. class Player: def __init__(self, name, room): self.name = name self.room = room
28.833333
70
0.693642
92bf54b06fd64ee34267e66120f1f833a16d2f4f
182
py
Python
books/PythonAutomate/file_organize/remove_file_to_trash.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/file_organize/remove_file_to_trash.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/file_organize/remove_file_to_trash.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import send2trash bacon_file = open('bacon.txt', 'a') # creates the file bacon_file.write('Bacon is not a vegetable') bacon_file.close() send2trash.send2trash('bacon.txt')
22.75
56
0.71978
b97c736ddc478bdbb1f779fdaa112a7a8b8ee317
6,923
py
Python
vb_simulation_pkgs/pkg_vb_sim/scripts/node_online_order_placer.py
ROBODITYA/Eyantra-2021-Vargi-Bots
f1c6a82c46e6e84486a4832b3fbcd02625849447
[ "MIT" ]
1
2021-07-13T07:05:29.000Z
2021-07-13T07:05:29.000Z
vb_simulation_pkgs/pkg_vb_sim/scripts/node_online_order_placer.py
TejasPhutane/Eyantra-2021-Vargi-Bots
ab84a1304101850be8c0f69cfe6de70d53c33189
[ "MIT" ]
1
2021-06-05T07:58:03.000Z
2021-06-05T07:58:03.000Z
vb_simulation_pkgs/pkg_vb_sim/scripts/node_online_order_placer.py
ROBODITYA/Eyantra-2021-Vargi-Bots
f1c6a82c46e6e84486a4832b3fbcd02625849447
[ "MIT" ]
null
null
null
#!/usr/bin/env python # ROS Node - MQTT Online Order Placer import rospy import paho.mqtt.client as mqtt import time import datetime import json class OnlineOrderPlacer: def __init__(self): rospy.init_node('node_online_order_placer') param_online_order_config = rospy.get_param('onlin...
39.787356
119
0.655785
dbe52d334fe7f74f3591cd1d68bec3dbcb6b1bf5
258
py
Python
weibo/test/linTest.py
haiboz/weiboSpider
517cae2ef3e7bccd9e1d328a40965406707f5362
[ "Apache-2.0" ]
null
null
null
weibo/test/linTest.py
haiboz/weiboSpider
517cae2ef3e7bccd9e1d328a40965406707f5362
[ "Apache-2.0" ]
null
null
null
weibo/test/linTest.py
haiboz/weiboSpider
517cae2ef3e7bccd9e1d328a40965406707f5362
[ "Apache-2.0" ]
null
null
null
# coding:utf8 ''' Created on 2016年4月19日 @author: wb-zhaohaibo ''' import re st = "<http>我说的<a><http>是等丰富的<a>这里是中文_".decode("utf8") pattenst = re.compile(ur'[<>\w\u4e00-\u9fa5]+([\u4e00-\u9fa5]+)_') cs = pattenst.findall(st) print cs print cs[0]
19.846154
67
0.639535
e015e50bed12cf82408a0a52e85c26ae3e571d06
8,045
py
Python
20-fs-ias-lec/groups/04-logMerge/eventCreationTool/EventCreationToolTests.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-fs-ias-lec/groups/04-logMerge/eventCreationTool/EventCreationToolTests.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-fs-ias-lec/groups/04-logMerge/eventCreationTool/EventCreationToolTests.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
# Tests for EventCreationTool.py # Authors: Günes Aydin, Joey Zgraggen, Nikodem Kernbach # VERSION: 1.1 # Since only the EventFactory class is our recommended API, it is the only one tested. import hashlib import hmac import nacl.signing import os import secrets import shutil import unittest import Event import Event...
61.412214
117
0.712244
e0561d6b6cb86c070808563ed19f490232a7e2af
1,563
py
Python
reptile/movieMaoYanTop.py
WuNull/findmovie
29d3ef6fe2282f48be57780f5e8366de1d3479a6
[ "Apache-2.0" ]
1
2019-11-26T07:03:06.000Z
2019-11-26T07:03:06.000Z
reptile/movieMaoYanTop.py
WuNull/findmovie
29d3ef6fe2282f48be57780f5e8366de1d3479a6
[ "Apache-2.0" ]
null
null
null
reptile/movieMaoYanTop.py
WuNull/findmovie
29d3ef6fe2282f48be57780f5e8366de1d3479a6
[ "Apache-2.0" ]
null
null
null
""" 爬虫 猫眼电影top100 """ import requests from lxml import etree import csv headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36' } def index_page(number): url = "https://maoyan.com/board/4?offset=%s" % number...
31.26
136
0.598848
0edfa55e7216f148d515832375fdf8612f24845b
1,006
py
Python
scripts/dirmaker.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
8
2018-03-09T16:44:38.000Z
2021-04-07T11:33:30.000Z
scripts/dirmaker.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
4
2020-03-24T15:34:54.000Z
2021-06-01T21:54:33.000Z
scripts/dirmaker.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
1
2020-05-13T14:30:55.000Z
2020-05-13T14:30:55.000Z
import pandas as pd import geopandas as gpd import numpy as np from shapely.geometry import Point, Polygon import os import re import zipfile,fnmatch import shutil import sys # SET CITY NAME CITIES = ["barcelona","london","rome","milan","madrid","berlin","paris","stockholm"] # Base directory BASE_DIR = os.path.abspa...
28.742857
120
0.730616
16e275cf0378eed046528285ac6f786e9a2e5491
582
py
Python
exercises/ja/solution_03_15.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/ja/solution_03_15.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/ja/solution_03_15.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import json import spacy from spacy.tokens import Doc with open("exercises/ja/bookquotes.json", encoding="utf8") as f: DATA = json.loads(f.read()) nlp = spacy.blank("ja") # デフォルト値がNoneのDoc拡張属性「author」を登録 Doc.set_extension("author", default=None) # デフォルト値がNoneのDoc拡張属性「book」を登録 Doc.set_extension("book", default=N...
25.304348
64
0.706186
bc499c8cbe29d33b3a3548012e40145e812b9244
11,396
py
Python
etl/data_extraction/scrapers/ehrenamt_hessen.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
7
2020-04-23T20:16:11.000Z
2022-01-04T14:57:16.000Z
etl/data_extraction/scrapers/ehrenamt_hessen.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
361
2020-04-23T17:20:14.000Z
2022-03-02T11:29:45.000Z
etl/data_extraction/scrapers/ehrenamt_hessen.py
Betadinho/einander-helfen
272f11397d80ab5267f39a7b36734495f1c00b0c
[ "MIT" ]
1
2021-11-29T06:02:52.000Z
2021-11-29T06:02:52.000Z
import math import time from bs4 import BeautifulSoup from data_extraction.scraper import Scraper class EhrenamtHessenScraper(Scraper): base_url = 'https://www.ehrenamtssuche-hessen.de' def parse(self, response, url): """Handles the soupified response of a detail page in the predefined way and retur...
40.126761
119
0.568972
bc54ef76fa64be7fddd8ae563478602b98b2ba8f
1,077
py
Python
src/data/create_tile_datasets.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
2
2018-04-27T09:02:15.000Z
2019-04-19T19:12:13.000Z
src/data/create_tile_datasets.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
1
2019-04-19T19:13:08.000Z
2021-02-22T21:29:55.000Z
src/data/create_tile_datasets.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
null
null
null
from experiment.data import Environment import datasets.divahisdb as diva import datasets.tiles as tile import logging import random from PIL import Image import numpy as np def task(env): split = diva.Splits.training.name dataset = diva.HisDBDataset(env.dataset(diva.NAME), gt=True, split=split) width = 3...
26.268293
77
0.690808
bc8fceda32bafb543fb28aab4f5ef2e2407117e0
12,125
py
Python
tools/make_proj_dos_YS_v1.1.py
cwandtj/A2P2
a5999f6dbcd7da194fbded8b8c113affdb419c3b
[ "MIT" ]
1
2017-08-25T07:46:30.000Z
2017-08-25T07:46:30.000Z
tools/make_proj_dos_YS_v1.1.py
cwandtj/A2P2
a5999f6dbcd7da194fbded8b8c113affdb419c3b
[ "MIT" ]
null
null
null
tools/make_proj_dos_YS_v1.1.py
cwandtj/A2P2
a5999f6dbcd7da194fbded8b8c113affdb419c3b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Takes a VASP PROCAR file and produces projected densities of states # by binning the eigenstates on to a mesh ('raw') # and then Gaussian smearing ('smear'). # Latest updated 21/11/2017 by Yoon-Su Shim, CERU, Korea Institute of Energy Research # Written by M. J. Wolf, Department of Chemistry, ...
28.329439
157
0.519918
bc958fc23f598f2f3086307f24f4ac5b50b9ac69
2,436
py
Python
kernel/blog/models.py
sageteam/behpack
3b8afb81dc7da70807308af4c8a2d2ab92b1a133
[ "MIT" ]
null
null
null
kernel/blog/models.py
sageteam/behpack
3b8afb81dc7da70807308af4c8a2d2ab92b1a133
[ "MIT" ]
null
null
null
kernel/blog/models.py
sageteam/behpack
3b8afb81dc7da70807308af4c8a2d2ab92b1a133
[ "MIT" ]
null
null
null
from django.db import models import secrets from accounts.models import User from painless import functions as func ############################## ####### NEWS ####### ############################## class NewsTags(models.Model): tag_name = models.CharField(max_length = 128) def __str__(self): ...
28
135
0.66133
d5e020d6164c2ea99c091ba40f25689a6d6d5a1d
534
py
Python
mahadbt-main/bot.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
mahadbt-main/bot.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
mahadbt-main/bot.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
from telegram import Update from telegram.ext import Updater, CommandHandler, CallbackContext import time as t import os as s from response import * t.sleep(2) print("Bot has been started") updater.dispatcher.add_handler(CommandHandler('hello', hello)) updater.dispatcher.add_handler(CommandHandler('bye',...
25.428571
66
0.7603
d5ee9231ce9ebbcd36038a2ff166cfb34b2b009f
1,850
py
Python
Webpage/arbeitsstunden/migrations/0006_auto_20210623_1921.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
Webpage/arbeitsstunden/migrations/0006_auto_20210623_1921.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
46
2022-01-08T12:03:24.000Z
2022-03-30T08:51:05.000Z
Webpage/arbeitsstunden/migrations/0006_auto_20210623_1921.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.12 on 2021-06-23 19:21 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('arbeitsstunden', '0005_auto_20210616_1756'), ] ...
29.365079
82
0.558378
e6cb84e2034510595dab4e03e03d93da980d57d8
1,089
py
Python
agspiel/utils/main.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2021-03-09T21:37:41.000Z
2021-03-09T21:37:41.000Z
agspiel/utils/main.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
4
2020-11-13T19:34:58.000Z
2021-07-24T16:25:27.000Z
agspiel/utils/main.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2020-08-24T14:38:18.000Z
2020-08-24T14:38:18.000Z
# Copyright (c) 2020 | KingKevin23 (@kingkevin023) from requests import Session class LoginError(Exception): pass def get_php_session_id(email:str, password:str) -> str: """ Diese Funktion loggt sich im AG-Spiel ein, liest den Cookie "PHPSESSID" aus und gibt diesen an den Aufrufer zurück. Für den Fa...
41.884615
99
0.707071
e6eb96b1849b66fbbaf7fe5b59d58f71d1b21165
560
py
Python
challenges/mirrorBits/python3/mirrorBits.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
5
2020-05-21T03:02:34.000Z
2021-09-06T04:24:26.000Z
challenges/mirrorBits/python3/mirrorBits.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
6
2019-04-24T03:39:26.000Z
2019-05-03T02:10:59.000Z
challenges/mirrorBits/python3/mirrorBits.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
1
2021-09-06T04:24:27.000Z
2021-09-06T04:24:27.000Z
def mirrorBits(a): return int('{0:b}'.format(a)[::-1], 2) if __name__ == '__main__': input0 = [97, 8, 123, 86782, 5] expectedOutput = [67, 1, 111, 65173, 5] assert len(input0) == len(expectedOutput), '# input0 = {}, # expectedOutput = {}'.format(len(input0), len(expectedOutput)) for i, expected in enumerate(expec...
50.909091
123
0.673214
fc02db57e071eb48610fb9b3161f84fee5dc7562
35,733
py
Python
python/oneflow/compatible/single_client/ops/math_unary_elementwise_ops.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/ops/math_unary_elementwise_ops.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/ops/math_unary_elementwise_ops.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...
25.912255
104
0.63342
f8ee5cb1b987b00e789cb56a9708efbab6aab8cb
637
py
Python
___Python/Torsten/Python-Kurs/p08_generatoren_iteratoren/m01_iteratoren.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Torsten/Python-Kurs/p08_generatoren_iteratoren/m01_iteratoren.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Torsten/Python-Kurs/p08_generatoren_iteratoren/m01_iteratoren.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
from random import Random l = [2, 3, 5, 7, 11] for x in l: print(x) s = "Hallo!" for c in s: print(c) class Wuerfel(object): def __init__(self): self.r = Random() def __iter__(self): return self def __next__(self): return self.r.randint(1, 6) #w = Wu...
13.553191
36
0.450549
5d0777cdc61b46e1640da627218696b1de6cc439
945
py
Python
chapter03/elasticsearch_study.py
thiagola92/learning-databases-with-python
cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e
[ "MIT" ]
null
null
null
chapter03/elasticsearch_study.py
thiagola92/learning-databases-with-python
cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e
[ "MIT" ]
null
null
null
chapter03/elasticsearch_study.py
thiagola92/learning-databases-with-python
cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e
[ "MIT" ]
null
null
null
from elasticsearch import Elasticsearch client = Elasticsearch("http://username:password@127.0.0.1:9200") client.indices.create(index="index_name") client.update( index="index_name", id=1, doc_as_upsert=True, doc={ "sku": 134218478, "name": "Rb-01 - Robô Aspirador De Pó Fast Clean Biv...
26.25
166
0.674074
5d25cf9bc9e4a59cc5e56ba31000f4ff4d1b183c
5,795
py
Python
research/audio/fcn-4/infer/sdk/python/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/audio/fcn-4/infer/sdk/python/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/audio/fcn-4/infer/sdk/python/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# coding=utf-8 """ 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 agre...
38.125
104
0.627437
db8342ee040eda6d56b98f7bf329de499737cfdd
10,212
py
Python
Packs/EWS/Integrations/EWSv2/EWSv2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/EWS/Integrations/EWSv2/EWSv2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/EWS/Integrations/EWSv2/EWSv2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import datetime import EWSv2 import logging import dateparser import pytest from exchangelib import Message from EWSv2 import fetch_last_emails from exchangelib import EWSDateTime, EWSTimeZone class TestNormalCommands: """ """ class MockClient: class MockAccount: def __init__(self...
34.04
119
0.624951
915cc04e5e8e0b07b48e482ae8c00df96000fcc6
1,854
py
Python
Imaginary/2021/misc/Guess_the_Password/password.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
Imaginary/2021/misc/Guess_the_Password/password.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
Imaginary/2021/misc/Guess_the_Password/password.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
#!/usr/bin/env -S python3 -u import secrets import codecs import time def get_flag(): with open("/tmp/pw_flag", 'rt') as f: print(f.read()) # initialize password def init_password(): global password global sample_password # seems super secure, right? password = "%08x" % secrets.randbits(3...
28.523077
92
0.613269
530d5e1daf85df2a42e5a05e69a4fcbfa7b48a36
2,603
py
Python
bot.py
malexmave/Wissenschaftlicher-Dienst-Twitter
77abb3acc8b69b1d0e9d868a770dad6e9823a180
[ "Apache-2.0" ]
1
2022-01-28T19:18:04.000Z
2022-01-28T19:18:04.000Z
bot.py
malexmave/Wissenschaftlicher-Dienst-Twitter
77abb3acc8b69b1d0e9d868a770dad6e9823a180
[ "Apache-2.0" ]
2
2022-01-28T19:28:00.000Z
2022-01-28T19:31:33.000Z
bot.py
malexmave/Wissenschaftlicher-Dienst-Twitter
77abb3acc8b69b1d0e9d868a770dad6e9823a180
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 import feedparser import re import datetime import twitter def str2date(datestr): """Convert datestring from RSS to datetime object.""" return datetime.datetime.strptime(datestr, '%Y-%m-%dT%H:%M:%SZ') # RegEx-Pattern to match format of RSS titles containing actual reports # The pattern is W...
36.661972
103
0.657703
f460b74b32e8f9f2d1189a6f28e15687f241d594
481
py
Python
WorkCount/word-count.py
xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum
f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74
[ "Apache-2.0" ]
6
2021-11-11T01:06:08.000Z
2021-11-18T02:45:25.000Z
WorkCount/word-count.py
xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum
f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74
[ "Apache-2.0" ]
null
null
null
WorkCount/word-count.py
xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum
f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74
[ "Apache-2.0" ]
null
null
null
import os import shutil from pyspark import SparkContext inputpath = 'input' outputpath = 'output' sc = SparkContext('local', 'wordcount') # 读取文件 input = sc.textFile(inputpath) # 切分单词 words = input.flatMap(lambda line: line.split(' ')) # 转换成键值对并计数 counts = words.map(lambda word: (word, 1)).reduceByKey(lambda x, y: x...
19.24
74
0.733888
2291fa7f4b8aab66d0f5b81325c6afdca0cc197e
513
py
Python
code/examples/EyeSetup.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
2
2019-09-25T13:39:22.000Z
2019-09-26T10:06:13.000Z
code/examples/EyeSetup.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
44
2019-09-25T14:35:48.000Z
2021-08-20T17:26:12.000Z
code/examples/EyeSetup.py
SaschaMzH/hucon
830b6c5e21c2c7316c61e8afdf708066374b9b62
[ "BSD-3-Clause" ]
8
2019-09-25T13:53:07.000Z
2022-02-24T19:23:44.000Z
""" Set eye color of all. 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 hucon import Eye eye_tl = None eye_tr = None eye_bl = None eye_br = None eye_tl = Eye(1, Eye.RGB...
19.730769
65
0.692008
a3a78e458a044c9ebd7aadbcc575ebc6cc52e883
13,666
py
Python
paddlenlp/transformers/prophetnet/tokenizer.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
paddlenlp/transformers/prophetnet/tokenizer.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
paddlenlp/transformers/prophetnet/tokenizer.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # Copyright 2021 The Fairseq Authors and The HuggingFace Inc. team. # # 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 # # ...
42.179012
120
0.582687
4322aadd32fd36b25f3a443b44c98bd47b870b3b
2,284
py
Python
20-fs-ias-lec/groups/Demo B/src/tests/test_chat_connection.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-fs-ias-lec/groups/Demo B/src/tests/test_chat_connection.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-fs-ias-lec/groups/Demo B/src/tests/test_chat_connection.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
from testfixtures import LogCapture import os from ..logStore.appconn.chat_connection import ChatFunction from ..logStore.funcs.EventCreationTool import EventFactory def test_get_chat_event(): try: with LogCapture() as log_cap: ecf = EventFactory() cf = ChatFunction() ...
37.442623
115
0.550788
4374efdcb1a232ce04f219805123831f529554fc
871
py
Python
mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Upload/Util.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
282
2016-06-16T14:41:44.000Z
2022-03-02T03:43:02.000Z
mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Upload/Util.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
146
2016-06-16T08:55:45.000Z
2020-09-08T10:37:32.000Z
mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Upload/Util.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
94
2016-06-16T10:49:07.000Z
2022-03-28T09:14:03.000Z
import os import re import logging def get_upload_files(backup_dir, regex=None): upload_files = [] r = None if regex is not None: logging.info("Only uploading files from %s that match the specified regex" % backup_dir) r = re.compile(regex) else: logging.debug("No regex specifi...
33.5
96
0.585534
439966ab92cee0d26b183a57198958a20f907fe7
601
py
Python
7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/04_printing.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/04_printing.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/04_printing.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
""" Python provides a number of ways to perform printing. Research how to print using the printf operator, the `format` string method, and by using f-strings. """ x, y, z = 10, 2.24552, "I like turtles!" # Using the printf operator (%), print the following feeding in the values of x, # y, and z: # x is 10, y is 2.25...
30.05
80
0.635607
6062ddcf1d25d89ef6165c494976aebd8a37e06c
824
gyp
Python
source/pkgsrc/inputmethod/fcitx5-mozc/patches/patch-renderer_renderer.gyp
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/inputmethod/fcitx5-mozc/patches/patch-renderer_renderer.gyp
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/inputmethod/fcitx5-mozc/patches/patch-renderer_renderer.gyp
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-renderer_renderer.gyp,v 1.1 2021/02/17 15:29:51 ryoon Exp $ * Support NetBSD. --- renderer/renderer.gyp.orig 2021-02-15 05:04:33.000000000 +0000 +++ renderer/renderer.gyp @@ -193,7 +193,7 @@ 'win32_renderer_core_test', ], }], - ['target_platform=="Linux" and enab...
32.96
97
0.574029
e0f795c49e041a12ec7f11d8be2c9098a8a1acd9
511
py
Python
Prototype/Prototype April 2020/windowmain.py
fowado/BauphysikSE1
eb8805196c8fbf99a879c40c5e0725d740c5a0de
[ "CC-BY-4.0" ]
4
2019-12-03T16:13:09.000Z
2019-12-11T23:22:58.000Z
Prototype/Prototype April 2020/windowmain.py
fowado/BauphysikSE1
eb8805196c8fbf99a879c40c5e0725d740c5a0de
[ "CC-BY-4.0" ]
65
2019-12-08T17:43:59.000Z
2020-08-14T15:26:21.000Z
Prototype/Prototype April 2020/windowmain.py
fowado/BauphysikSE1
eb8805196c8fbf99a879c40c5e0725d740c5a0de
[ "CC-BY-4.0" ]
null
null
null
# This Python file uses the following encoding: utf-8 from PyQt5 import QtWidgets, uic import sys from master import Ui_MainWindow class windowmain(QtWidgets.QMainWindow): def __init__(self): super(windowmain,self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) #uic.load...
26.894737
58
0.675147
c70a530f2c7c51fee15ba8949bd0c1c80f296008
1,495
py
Python
research/cv/resnext152_64x4d/src/utils/optimizers__init__.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/resnext152_64x4d/src/utils/optimizers__init__.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/resnext152_64x4d/src/utils/optimizers__init__.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.405405
90
0.649498
90a401bada61a787b9bd8b3dfdd7c8a737688cda
10,413
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_target_proxy.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_target_proxy.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_target_proxy.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # Copyright 2017 Google Inc. # 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_version': '1.1', 'status': ['deprecated']...
35.179054
113
0.62009
d3f9b2d70b616507b3cbd92afff22de2f87ce0d1
1,149
py
Python
gemtown/gems/migrations/0011_auto_20190424_2048.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/gems/migrations/0011_auto_20190424_2048.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/gems/migrations/0011_auto_20190424_2048.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
# Generated by Django 2.0.13 on 2019-04-24 11:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gems', '0010_auto_20190424_2048'), ] operations = [ migrations.AlterField( model_name='bonusgem', name='bonus_type'...
39.62069
208
0.607485
c37797a6944b5f9846dcc9ce753cf5b992dcb292
919
py
Python
tools/pythonpkg/tests/fast/arrow/test_view.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
2,816
2018-06-26T18:52:52.000Z
2021-04-06T10:39:15.000Z
tools/pythonpkg/tests/fast/arrow/test_view.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
1,310
2021-04-06T16:04:52.000Z
2022-03-31T13:52:53.000Z
tools/pythonpkg/tests/fast/arrow/test_view.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
270
2021-04-09T06:18:28.000Z
2022-03-31T11:55:37.000Z
import duckdb import os try: import pyarrow import pyarrow.parquet can_run = True except: can_run = False class TestArrowView(object): def test_arrow_view(self, duckdb_cursor): if not can_run: return parquet_filename = os.path.join(os.path.dirname(os.path.realpath(__file...
41.772727
118
0.707291
6f008af8dd7b530fc253359a611a17ce6548f601
447
py
Python
etc/services.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
1
2021-06-15T08:59:02.000Z
2021-06-15T08:59:02.000Z
etc/services.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
null
null
null
etc/services.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python3 import os, sys SERVICES = ("tsgrain_controller.service", "tsgrain_website.service") def usage(): print('''usage: services.py status|stop|start|disable|enable ''') os._exit(0) def main(): if len(sys.argv) != 2: usage() else: op = sys.argv[1] for svc in SERVIC...
16.555556
68
0.577181
6f65a54b07d6b21d050df9f1345b937d50eee961
405
py
Python
exercises/en/solution_01_03_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/en/solution_01_03_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/en/solution_01_03_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
# Import spaCy and create the English nlp object import spacy nlp = spacy.blank("en") # Process the text doc = nlp("I like tree kangaroos and narwhals.") # A slice of the Doc for "tree kangaroos" tree_kangaroos = doc[2:4] print(tree_kangaroos.text) # A slice of the Doc for "tree kangaroos and narwhals" (without the...
25.3125
72
0.753086
48adacfabd77a4ba6288f9a6a04193374ce49c0e
1,523
py
Python
gestionProtocolos_y_Estudios/models.py
AnuTor/UniNeuroLab
5825f440d4663650f038083f3da05229cc5ada4f
[ "Apache-2.0" ]
1
2021-01-09T01:20:45.000Z
2021-01-09T01:20:45.000Z
gestionProtocolos_y_Estudios/models.py
AnuTor/UniNeuroLab
5825f440d4663650f038083f3da05229cc5ada4f
[ "Apache-2.0" ]
1
2021-01-09T00:53:55.000Z
2021-01-09T00:53:55.000Z
gestionProtocolos_y_Estudios/models.py
AnuTor/UniNeuroLab
5825f440d4663650f038083f3da05229cc5ada4f
[ "Apache-2.0" ]
1
2021-01-07T23:57:28.000Z
2021-01-07T23:57:28.000Z
# GESTION PROTOCOLOS Y ESTUDIOS from django.db import models # Create your models here. class direccionProtocolo(models.Model): protocoloEstudio=models.CharField(max_length=300, verbose_name="Nombre del Protocolo") clave_Protocolo=models.IntegerField(null= True,verbose_name= "ID de Protocolo") tipoInvestigacion=...
63.458333
130
0.83585
5b16dbcd06bc9aca927c10a74f867a683470d746
2,480
py
Python
frappe-bench/env/lib/python2.7/site-packages/stdnum/si/ddv.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/stdnum/si/ddv.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/stdnum/si/ddv.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# ddv.py - functions for handling Slovenian VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 ...
33.066667
75
0.703226
827e98a5f75fcb182a668b4b2f3bedb20610f6bb
1,624
py
Python
RDS/circle1_adapters_and_ports/port_owncloud/src/server.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle1_adapters_and_ports/port_owncloud/src/server.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle1_adapters_and_ports/port_owncloud/src/server.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
#!/usr/bin/env python from RDS import Util, OAuth2Service, FileTransferMode, FileTransferArchive from __init__ import app from RDS import Util import os owncloud_installation_url = os.getenv("OWNCLOUD_INSTALLATION_URL", "") owncloud_redirect_uri = os.getenv("RDS_OAUTH_REDIRECT_URI", "") owncloud_oauth_token_url = "{}...
39.609756
131
0.769704
82ae7661abf3f0811bd084de64c81a0a703664b3
1,068
py
Python
app-backend/migrations/versions/e6d4ac8564fb_.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
null
null
null
app-backend/migrations/versions/e6d4ac8564fb_.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
1
2019-03-12T13:35:46.000Z
2019-03-12T13:35:46.000Z
app-backend/migrations/versions/e6d4ac8564fb_.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
1
2019-03-15T13:29:57.000Z
2019-03-15T13:29:57.000Z
"""empty message Revision ID: e6d4ac8564fb Revises: 72a41f87e02d Create Date: 2019-03-05 10:59:54.531509 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e6d4ac8564fb' down_revision = '72a41f87e02d' branch_labels = None depends_on = None def upgrade(): # ...
28.105263
65
0.682584
7df1596312b0767ad61ff41fa0f66e79fc9d2f9c
1,982
py
Python
funcs.py
JasperMorrison/PytorchToCaffe
04f0066cdc8a9da92591d7361907c3ea53271707
[ "MIT" ]
794
2018-09-06T07:38:41.000Z
2022-03-16T06:30:37.000Z
funcs.py
JasperMorrison/PytorchToCaffe
04f0066cdc8a9da92591d7361907c3ea53271707
[ "MIT" ]
111
2018-12-04T11:18:27.000Z
2022-03-31T07:39:11.000Z
funcs.py
JasperMorrison/PytorchToCaffe
04f0066cdc8a9da92591d7361907c3ea53271707
[ "MIT" ]
221
2018-11-22T08:11:03.000Z
2022-03-16T07:11:43.000Z
from __future__ import print_function import numpy as np import time class Logger(): def __init__(self,file_name=None,show=True): self.show=show self.file_name=file_name def __call__(self,str): str='%s '%(time.strftime('%H:%M:%S'),)+str if self.file_name: with open...
31.460317
101
0.57114
81c76944b08693a60409b36747831951e842916d
981
py
Python
example.py
fokkerh/deeplearning2020
4446c046982430d5e063919cf9511c8a174c76c2
[ "MIT" ]
133
2020-03-11T09:56:22.000Z
2022-01-03T08:27:00.000Z
example.py
fokkerh/deeplearning2020
4446c046982430d5e063919cf9511c8a174c76c2
[ "MIT" ]
10
2020-03-12T15:02:46.000Z
2020-11-27T21:21:42.000Z
example.py
fokkerh/deeplearning2020
4446c046982430d5e063919cf9511c8a174c76c2
[ "MIT" ]
64
2020-03-12T08:11:38.000Z
2021-06-25T08:45:53.000Z
from tensorflow import keras from deeplearning2020 import Submission data = keras.datasets.mnist (train_images, train_labels), (test_images, test_labels) = data.load_data() train_images = train_images / 255.0 test_images = test_images / 255.0 total_classes = 10 train_vec_labels = keras.utils.to_categorical(train_lab...
30.65625
86
0.75739
f21ab155eb72adaa2df5a9458de13a37e1cdc236
8,757
py
Python
Packs/Salesforce/Integrations/SalesForceEventCollector/SalesForceEventCollector.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
Packs/Salesforce/Integrations/SalesForceEventCollector/SalesForceEventCollector.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
40
2022-03-03T07:34:00.000Z
2022-03-31T07:38:35.000Z
Packs/Salesforce/Integrations/SalesForceEventCollector/SalesForceEventCollector.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
import urllib3 from CommonServerPython import * import demistomock as demisto from collections.abc import Generator import tempfile import requests import csv from SiemApiModule import * # noqa: E402 urllib3.disable_warnings() class SalesforceClient(IntegrationEventsClient): def set_request_filter(self, after: ...
37.583691
116
0.619961
b5066cbf658199e49e4d0c233ef3c6fc502d6ff0
947
py
Python
src/bo4e/com/com.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/com.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/com.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains base class for all components """ from typing import Generic, Type, TypeVar import attr from marshmallow import Schema, post_load # pylint: disable=too-few-public-methods @attr.s(auto_attribs=True, kw_only=True) class COM: """ base class for all components """ #: Any type derived from COM ...
25.594595
82
0.701162
82f1b8c78a970289856b52f4f7d8522b9a08ecb3
611
py
Python
Webpage/arbeitsstunden/migrations/0017_auto_20210718_1045.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
Webpage/arbeitsstunden/migrations/0017_auto_20210718_1045.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
46
2022-01-08T12:03:24.000Z
2022-03-30T08:51:05.000Z
Webpage/arbeitsstunden/migrations/0017_auto_20210718_1045.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.5 on 2021-07-18 10:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('arbeitsstunden', '0016_auto_20210718_1012'), ] operations = [ migrations.AlterField( model_name='project', name='res...
25.458333
82
0.603928
d27f462eed95af3ff0a112a1daf1bce4ff11b58d
392
py
Python
PMIa/2014/VINOGRADOVA_J_S/task_1_48.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2014/VINOGRADOVA_J_S/task_1_48.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2014/VINOGRADOVA_J_S/task_1_48.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 1. Вариант 48. # Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Доменико Теотокопули. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода. # Vinogradova J. # 15.03.2016 print("Доменико Теотокопули более известен, как ...
39.2
213
0.795918
9635c940c5ee576251586f67481b124490292e1e
2,659
py
Python
20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logStore/transconn/database_connector.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logStore/transconn/database_connector.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logStore/transconn/database_connector.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
from ..database.database_handler import DatabaseHandler as dataBaseHandler from ..funcs.log import create_logger from ..verific.verify_insertion import Verification logger = create_logger('DatabaseConnector') """The database connector allows the network layer to access database functionality. It is meant to be used m...
45.844828
119
0.71117
736627ced6f6be2af75616b70471bc4993cf3d28
2,387
py
Python
Simulator/build/Scripts/network/MQTTTest.py
A-Herzog/Warteschlangensimulator
fd83d400944a59147a465a4683b2f9258c3de5d0
[ "Apache-2.0" ]
9
2020-07-14T05:36:47.000Z
2022-03-30T14:24:12.000Z
Simulator/build/Scripts/network/MQTTTest.py
A-Herzog/Warteschlangensimulator
fd83d400944a59147a465a4683b2f9258c3de5d0
[ "Apache-2.0" ]
4
2021-06-17T22:09:50.000Z
2022-02-17T23:02:50.000Z
Simulator/build/Scripts/network/MQTTTest.py
A-Herzog/Warteschlangensimulator
fd83d400944a59147a465a4683b2f9258c3de5d0
[ "Apache-2.0" ]
5
2020-06-08T04:26:11.000Z
2021-11-15T22:42:59.000Z
# # This script demonstrates how to connect to MQTT client in Warteschlangensimulator # to submit models to be simulated and to receive results. # # # Command to run Warteschlangensimulator as MQTT client: # java -jar ./Simulator.jar serverMQTT tcp://localhost Warteschlangensimulator/task # import paho.mqtt...
34.594203
146
0.74026
f785c58031f772c5f9a3d62c21b3e58cf3156564
906
py
Python
code/range_and_forecasting_accuracy/metdata.py
niplav/site
09380a8585e6b067c4cce23da13ca9601320bd51
[ "MIT" ]
2
2022-02-09T14:02:59.000Z
2022-03-23T11:50:47.000Z
code/range_and_forecasting_accuracy/metdata.py
niplav/site
09380a8585e6b067c4cce23da13ca9601320bd51
[ "MIT" ]
null
null
null
code/range_and_forecasting_accuracy/metdata.py
niplav/site
09380a8585e6b067c4cce23da13ca9601320bd51
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import json import time from time import mktime f=open("../../data/metaculus.json") jsondata=json.load(f) for page in jsondata: for question in page["results"]: if question["possibilities"]["type"]=="binary" and (question["resolution"]==1 or question["resolution"]==0): try: restime=...
34.846154
125
0.671082
540bbaa8f663ae2591eac22aab0b34811eae3ff3
9,256
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/docker_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/docker_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/docker_config.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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_version': '1.1', 'status': ['prev...
30.347541
159
0.627377
49a3ed9af0c94f4cbcb35a6bea06f72fb8ea5dc5
6,296
py
Python
top/clearlight/reptile/reptile_test.py
ClearlightY/Python_learn
93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232
[ "Apache-2.0" ]
1
2020-01-16T09:23:43.000Z
2020-01-16T09:23:43.000Z
top/clearlight/reptile/reptile_test.py
ClearlightY/Python_learn
93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232
[ "Apache-2.0" ]
null
null
null
top/clearlight/reptile/reptile_test.py
ClearlightY/Python_learn
93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232
[ "Apache-2.0" ]
null
null
null
import requests, json, os, threading, time, logging from bs4 import BeautifulSoup from multiprocessing import Process, Queue from multiprocessing.queues import Empty from urllib.request import urlretrieve # 首先在f盘新建一个img文件夹, 用来保存图像 logging.basicConfig(level=logging.ERROR, filename='failed_img.log') # 抓取地址 answers_url...
29.420561
662
0.609752
b7017d337744734f73caa44476f4387c44673cd2
7,436
py
Python
web/controllers/api/Order.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
1
2020-03-24T04:26:34.000Z
2020-03-24T04:26:34.000Z
web/controllers/api/Order.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
web/controllers/api/Order.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 application import app, db import json, decimal from common.models.food.Food import Food from common.models.pay.PayOrder import PayOrder from common.libs.UrlManager import UrlManager from common.libs.Helper impor...
33.196429
122
0.719607
b760b56a5f0bcec2292039a3c60116403da77773
2,075
py
Python
Packs/ShiftManagement/Scripts/CreateChannelWrapper/CreateChannelWrapper.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ShiftManagement/Scripts/CreateChannelWrapper/CreateChannelWrapper.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ShiftManagement/Scripts/CreateChannelWrapper/CreateChannelWrapper.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * def main(): args = demisto.args() channel_type = args.get('type') channel_name = args.get('name') channel_desc = args.get('description') channel_team = args.get('team') errors = [] integrations_to_create = [] channels_created = [] modules = demist...
37.053571
127
0.646747
4d5e821206ca2a94f7966e3b2865b633b9dec259
605
py
Python
source/pkgsrc/converters/py-zfec/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/converters/py-zfec/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/converters/py-zfec/patches/patch-setup.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-setup.py,v 1.2 2020/12/19 15:28:05 gdt Exp $ \todo Document this patch. \todo File this patch upstream. --- setup.py.orig 2020-09-18 02:16:19.000000000 +0000 +++ setup.py @@ -57,7 +57,7 @@ setup( name="zfec", version=versioneer.get_version(), description="An efficient, portable erasure c...
35.588235
118
0.644628
428e0b4241db0c5b18e99930c58df53297f9e08a
3,223
py
Python
app.py
vproHacks/RenServer
04d4d55b2850ffc019ef10139d1b38d57acfe8a1
[ "MIT" ]
null
null
null
app.py
vproHacks/RenServer
04d4d55b2850ffc019ef10139d1b38d57acfe8a1
[ "MIT" ]
null
null
null
app.py
vproHacks/RenServer
04d4d55b2850ffc019ef10139d1b38d57acfe8a1
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, redirect, url_for, flash, Response from flask_socketio import SocketIO, emit import random, requests app = Flask(__name__) app.config['SECRET_KEY'] = 'HTNPLUSPLUSTIME' socketio = SocketIO(app) # Change DB System Later ''' SCHEMA: name: str host: str code: str count:...
28.522124
89
0.573999
c4587812e0d2f6a52a2ea171c3566ad21cf6b056
80
py
Python
LSTMcell/python/core/__init__.py
JerrytTom/FPGA-Based-LSTM-Accelerator
512253b82b5966e7914477d0317c4671c87853de
[ "MIT" ]
3
2021-07-02T03:26:35.000Z
2021-12-07T02:52:51.000Z
LSTMcell/python/core/__init__.py
JerrytTom/FPGA-Based-LSTM-Accelerator
512253b82b5966e7914477d0317c4671c87853de
[ "MIT" ]
null
null
null
LSTMcell/python/core/__init__.py
JerrytTom/FPGA-Based-LSTM-Accelerator
512253b82b5966e7914477d0317c4671c87853de
[ "MIT" ]
3
2021-08-29T14:24:54.000Z
2022-01-28T11:22:34.000Z
import warnings warnings.filterwarnings("ignore") # ignore messy numpy warnings
26.666667
63
0.825
e1fbe0cf4b56c089a31d19ea675b51ccd5a9c870
449
py
Python
Project Euler Qusetions 61 - 70/Project Euler Question 62.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
1
2020-02-11T02:03:02.000Z
2020-02-11T02:03:02.000Z
Project Euler Qusetions 61 - 70/Project Euler Question 62.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
Project Euler Qusetions 61 - 70/Project Euler Question 62.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
#Project Euler Question 62 #Cubic permutations def cubic_permutations(total): cube_list = {} for x in range(1, 10000): cube_x = "".join(sorted(str(x ** 3))) if cube_x in cube_list: cube_list[cube_x].append(x) else: cube_list[cube_x] = [x] for x, y in cube_li...
24.944444
45
0.556793
c00084d7df3ceaabe75f2fd90c357ad5205a985a
24,129
py
Python
hihope_neptune-oh_hid/00_src/v0.1/third_party/LVM2/daemons/lvmdbusd/vg.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/vg.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/vg.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2. # # You should have received a copy of the GNU General Public License # a...
30.659466
76
0.718596
225fe8ff55a10fbbfa2ee68dfac287d3af1e139b
328
py
Python
UTCTF/2021/crypto/ABitWeird/main.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2022-03-27T06:00:41.000Z
2022-03-27T06:00:41.000Z
UTCTF/2021/crypto/ABitWeird/main.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
UTCTF/2021/crypto/ABitWeird/main.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2022-03-27T06:01:42.000Z
2022-03-27T06:01:42.000Z
from Crypto.Util import number from secret import flag import os length = 2048 p, q = number.getPrime(length//2), number.getPrime(length//2) N = p*q e = 3 m = number.bytes_to_long(flag) x = number.bytes_to_long(os.urandom(length//8)) c = pow(m|x, e, N) print('N =', N); print('e =', e); print('c =', c); print('m&x ='...
18.222222
61
0.643293
7a1e72f15ec8e382e6cbeaa4c011c4833654816c
258
py
Python
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/11.00-__init__.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/11.00-__init__.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/11.00-__init__.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
class Computer: def __init__(self, cpu, ram): self.cpu = cpu self.ram = ram def config(self): print(f"Config is: {self.cpu}, {self.ram}") com1 = Computer("i5", 16) com2 = Computer("Ryzen 3", 8) com1.config() com2.config()
17.2
51
0.581395
362df0fb304667131ae5d3544eee73eac63ca7e2
303
py
Python
nz_django/day1/urls_include_demo/articles/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_django/day1/urls_include_demo/articles/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_django/day1/urls_include_demo/articles/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from django.http import HttpResponse # Create your views here. def index(request): return HttpResponse('文章首页') def article_list(request,year): text = '汝输入的年份是:%s' % year return HttpResponse(text) def author_tel(request,tels): text = '作者的手机号是:%s' % tels return HttpResponse(text)
20.2
36
0.706271
36563f3f57a23b93025e300c1269be91a3776e51
1,425
py
Python
agspiel/api/order.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2021-03-09T21:37:41.000Z
2021-03-09T21:37:41.000Z
agspiel/api/order.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
4
2020-11-13T19:34:58.000Z
2021-07-24T16:25:27.000Z
agspiel/api/order.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 Order: def __init__(self, typ: str, limit: float, stueckzahl: int, orderregel: bool, systembank: bool, datum: datetime): self.typ: str = typ self.limit: float = limit self.stueckzahl: int = stueckzahl ...
23.360656
117
0.623158
184c003b2c02b6e1b46f34b8ae54e582d5403d79
1,085
py
Python
gemtown/musicians/serializers.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/musicians/serializers.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/musicians/serializers.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
from rest_framework import serializers from gemtown.users import models as user_models from . import models import time class TimestampField(serializers.Field): def to_representation(self, value): return int(time.mktime(value.timetuple())) class UsernameSerializer(serializers.ModelSerializer): cla...
23.586957
64
0.558525
a18cd4fb6145dd0161c1b3fdae76826d10be7a44
18,226
py
Python
src/doc/sphinx_cli_extractor.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/doc/sphinx_cli_extractor.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/doc/sphinx_cli_extractor.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################################ # @file visitdocs.py # # @namespace visitdocs # @brief Namespace for the visitdocs.py file # # @mainpage VisItDocs - extract inline documentation from VisIt Python module. # # @aut...
32.430605
110
0.519258
62a088a73ddfc400302fb61ae8573911257aee3a
1,157
py
Python
elements/python/8/18/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/8/18/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/8/18/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
import random class Node(object): def __init__(self, x, nxt): self.x = x self.next = nxt def insertion_sort(n): s = Node(float('-inf'), None) while n is not None: p = s while p.next is not None and p.next.x < n.x: p = p.next nxt = n.next n.next...
17.530303
56
0.517718
c522e5403fc7809dab483b77ed26b7f8f4fb9ead
2,787
py
Python
zencad/convert/api.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/convert/api.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/convert/api.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
""" В этом файле определены операции экспорта и импорта геометрии. Операции экспорта реализованы с применением evalcache.lazyfile, что позволяет избежать множественных загрухок крайней ноды. Политика хеширования в случае импорта требует учета возможности изменения файла. Поэтому в хэш загружаемого объекта подмешивает...
27.058252
89
0.731252
3dd45b31f2264020ab37cb844490df5f2f857ee0
4,814
py
Python
modeling/head/deeplabdran.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
2
2020-12-22T08:40:05.000Z
2021-03-30T08:09:44.000Z
modeling/head/deeplabdran.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
modeling/head/deeplabdran.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
########################################################################### # Created by: CASIA IVA # Email: jliu@nlpr.ia.ac.cn # Copyright (c) 2020 ########################################################################### from __future__ import division import torch import torch.nn as nn from torch.nn.functional...
42.60177
111
0.592646
3df9366b98786b3fc8d64b364e4f2ca25e3c807b
1,670
py
Python
0000 hihoOnce/169 Simple calculator/main.py
SLAPaper/hihoCoder
3f64d678c5dd46db36345736eb56880fb2d2c5fe
[ "MIT" ]
null
null
null
0000 hihoOnce/169 Simple calculator/main.py
SLAPaper/hihoCoder
3f64d678c5dd46db36345736eb56880fb2d2c5fe
[ "MIT" ]
null
null
null
0000 hihoOnce/169 Simple calculator/main.py
SLAPaper/hihoCoder
3f64d678c5dd46db36345736eb56880fb2d2c5fe
[ "MIT" ]
null
null
null
from __future__ import print_function, division, absolute_import, unicode_literals import re def add(a, b): return a + b def minus(a, b): return a - b def multiply(a, b): return a * b def divide(a, b): return int(a / b) op_func = {'+': add, '-': minus, '*': multiply, '/': divide} op_prior = ...
21.688312
82
0.567665
77373699e8dad62fd1bd7095af101340d66cf148
138,223
py
Python
old/baxter_old.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
old/baxter_old.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
old/baxter_old.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
"""baxterロボットの色々関数とクラス ・順運動学写像,ヤコビ行列など """ import numpy as np from math import cos, sin, tan, pi, sqrt import time class Kinematics: """ローカル座標系の原点,ヤコビ行列等を計算 ・ちょっとはやい """ L = 278e-3 h = 64e-3 H = 1104e-3 L0 = 270.35e-3 L1 = 69e-3 L2 = 364.35e-3 L3 = 69e-3 L4 = 374.29e-...
287.365904
7,205
0.483328
659a5c8d2a5b8dadeac2427b47013e80c9dfcf38
471
py
Python
Chapter2_Python/Logic.py
derfabs/UdemyGAN_Template
1c7d263d22ccf1ba580c71befe71e3bf6e2facb6
[ "MIT" ]
null
null
null
Chapter2_Python/Logic.py
derfabs/UdemyGAN_Template
1c7d263d22ccf1ba580c71befe71e3bf6e2facb6
[ "MIT" ]
null
null
null
Chapter2_Python/Logic.py
derfabs/UdemyGAN_Template
1c7d263d22ccf1ba580c71befe71e3bf6e2facb6
[ "MIT" ]
null
null
null
# == (Equal) # < (Less than) # > (Greater than) # != (Not Equal) # <= (Less or equal than) # >= (Greater or equal than) i_am_broke = False if i_am_broke: print("I am broke") else: print("I am not broke") my_bank_account = 1000 if my_bank_account <= 0: print("I am broke.") else: print("I am not broke...
15.7
33
0.607219
b8a23f19ca285f7c0ce301d23eb767f4d53faf16
1,162
py
Python
pocketthrone/entities/notification.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
4
2016-06-05T16:48:04.000Z
2020-03-23T20:06:06.000Z
pocketthrone/entities/notification.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
pocketthrone/entities/notification.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
__all__ = ('Notification') from datetime import datetime from pocketthrone.entities.enum import MessageImportancy, NotificationCategory class Notification: _id = -1 # properties defining unset type & category of this notification importancy = None category = None # title & message content title = "<untitled>...
25.822222
137
0.755594
a2312d0590a89873655edb3818578a4762bdf0ee
500
py
Python
packages/watchmen-model/src/watchmen_model/chart/chart_basic_style.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/chart/chart_basic_style.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/chart/chart_basic_style.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from pydantic import BaseModel from watchmen_model.common import DataModel from .chart_enums import ChartBorderStyle, ChartFontStyle, ChartFontWeight from .chart_types import ChartColor class ChartFont(DataModel, BaseModel): family: str = None size: float = None color: ChartColor = None style: ChartFontStyle = N...
23.809524
74
0.79
a2824b10955df2608764eff128b9146c1ef22246
4,166
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/net/netmatch.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/net/netmatch.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/net/netmatch.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) 2009-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.843137
109
0.661066
3bc126feea6869a7e50f3f1a7a71f6b82eda9cf8
644
py
Python
python/lambda_filter_map.py
yoyoyoju/TIL
83c5e594caf86c4ad3bb6e4347ca5a4de85db390
[ "MIT" ]
null
null
null
python/lambda_filter_map.py
yoyoyoju/TIL
83c5e594caf86c4ad3bb6e4347ca5a4de85db390
[ "MIT" ]
2
2018-09-24T09:43:24.000Z
2018-09-25T17:17:20.000Z
python/lambda_filter_map.py
yoyoyoju/TIL
83c5e594caf86c4ad3bb6e4347ca5a4de85db390
[ "MIT" ]
null
null
null
# examples of map: def fahrenheit(T): return (float(9)/5) * T + 32 temp = (36.5, 0, 100) F = map(fahrenheit, temp) # gives back an map object (iterable) temp_fahrenheit = list(map(fahrenheit, temp)) print(temp_fahrenheit) # same thing using lambda temp_F_lambda = list(map(lambda x: (float(9)/5) * x + 32, temp)...
19.515152
65
0.59472
f03b221257288a4cee6738d765237e0ecd9f71f1
198
py
Python
rasa/core/nlg/__init__.py
chaneyjd/rasa
104a9591fc10b96eaa7fe402b6d64ca652b7ebe2
[ "Apache-2.0" ]
2,433
2017-10-04T13:08:05.000Z
2022-03-13T14:59:26.000Z
rasa/core/nlg/__init__.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
1,684
2017-10-04T13:04:44.000Z
2019-05-31T20:48:49.000Z
rasa/core/nlg/__init__.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
1,229
2017-10-04T20:23:59.000Z
2022-03-11T02:49:13.000Z
from rasa.core.nlg.generator import NaturalLanguageGenerator from rasa.core.nlg.template import TemplatedNaturalLanguageGenerator from rasa.core.nlg.callback import CallbackNaturalLanguageGenerator
49.5
68
0.893939
65263a4b28a70f883ce1e747aa686f6989a0ab40
12,218
py
Python
Packs/CloudConvert/Integrations/CloudConvert/CloudConvert_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CloudConvert/Integrations/CloudConvert/CloudConvert_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CloudConvert/Integrations/CloudConvert/CloudConvert_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CloudConvert import upload_command, Client, convert_command, check_status_command, download_command, modify_results_dict from CommonServerPython import remove_empty_elements, tableToMarkdown, string_to_table_header import demistomock as demisto import json import io import pytest MOCK_API_KEY = "a1b2c3d4e5" MOCK...
37.709877
125
0.624898
6893965a8709806b3267ee74df33f8615dfadd44
4,130
py
Python
Website/backend/DatabaseCreater.py
nachgeradelt/nachgeradelt
d45ed6b3c9088d58cdd315e26b932b5da8b5f130
[ "MIT" ]
3
2018-06-16T12:49:20.000Z
2021-01-26T16:15:11.000Z
Website/backend/DatabaseCreater.py
nachgeradelt/nachgeradelt
d45ed6b3c9088d58cdd315e26b932b5da8b5f130
[ "MIT" ]
2
2019-11-01T09:36:31.000Z
2020-11-20T13:27:42.000Z
Website/backend/DatabaseCreater.py
nachgeradelt/nachgeradelt
d45ed6b3c9088d58cdd315e26b932b5da8b5f130
[ "MIT" ]
1
2019-04-23T06:46:45.000Z
2019-04-23T06:46:45.000Z
# -*- coding: utf-8 -*- ''' Created on May 10, 2018 @author: iranox ''' from databasemanager.DatabaseManager import DatabaseManager from database.Queries.Tables import TABLES import csv from database.Queries.Insert import INSERT from database.Queries.Indexe import Indexe def getAllDataFromCSV(file="",rows=[]): "...
45.384615
121
0.591768
0b144dfdf2944833bcab235206395907777493bb
141
py
Python
python/pytest/test_reqeusts.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pytest/test_reqeusts.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pytest/test_reqeusts.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import pytest import requests def test_requests(): with pytest.raises(RuntimeError): resp = requests.get("https://google.com")
17.625
49
0.702128
9bd9539d8c8b4374f3d544ac2f011b6876d2917a
702
py
Python
RunFaster/concurrency/Code-06-Simple_Printing_Official_ThreadName_Parllel_exec.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
RunFaster/concurrency/Code-06-Simple_Printing_Official_ThreadName_Parllel_exec.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
RunFaster/concurrency/Code-06-Simple_Printing_Official_ThreadName_Parllel_exec.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
''' DEVELOPER NAME : BALAVIGNESH.M IMPLEMENTED DATE: 16-11-2018 ''' import threading import time class OfficialThreadName: @staticmethod def GetThreadName(): print(threading.currentThread().getName(),'Starting.....') time.sleep(3) print(threading.currentThread().getName(),'Exiting.......
23.4
86
0.753561
9be38034bbfc16a102f94bd0001e7eaed35a5387
777
py
Python
src/utils/ma.py
JoseFilipeFerreira/StockManagement
9d619e014d894f4a580abf7cda32431ddbe0783c
[ "MIT" ]
1
2019-06-19T00:02:57.000Z
2019-06-19T00:02:57.000Z
src/utils/ma.py
jtexeira/SO_1819
929ff2e87344f97cb1b604919d180438d97152c9
[ "MIT" ]
null
null
null
src/utils/ma.py
jtexeira/SO_1819
929ff2e87344f97cb1b604919d180438d97152c9
[ "MIT" ]
null
null
null
import sys from string import ascii_lowercase from random import randint, choice def main(): MAX_ID = 1 n = 25000 if len(sys.argv) > 1: n = int(sys.argv[1]) for i in range(n): c = randint(0,2) v = [ lambda: "i {} {}".format( rString(), ...
23.545455
66
0.472329
5026b3790900edeae813213681a6f29283a9f940
22,613
py
Python
examples/FlexibleEBNF/FlexibleEBNFParser.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
2
2020-12-25T19:37:42.000Z
2021-03-26T04:59:12.000Z
examples/FlexibleEBNF/FlexibleEBNFParser.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
6
2018-08-07T22:48:52.000Z
2021-10-07T18:38:20.000Z
examples/FlexibleEBNF/FlexibleEBNFParser.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ####################################################################### # # SYMBOLS SECTION - Can be edited. Changes will be preserved. # ####################################################################### from functools import partial import os import sys from typing import Tuple, List t...
42.031599
714
0.634989
50299553c3ce4761be33b106c9b5a79cfedb7c46
4,209
py
Python
OSINT-SPY-master/osint-spy.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
OSINT-SPY-master/osint-spy.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
OSINT-SPY-master/osint-spy.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 argparse from modules import (get_bitcoin_data, get_ciphers, heart_bleed, get_company_detail, fetch_email, get_device, ip_details, VirusTotal) parser = argparse.ArgumentParser() parser.add_argument("--btc_block", help="Get latest bitcoin block info.", action="store_true") parser.add_argume...
41.264706
126
0.522689
c57d5a1d517a1f134ac40389e161f9fc6d2aec3b
794
py
Python
data/raspi/src/praxis/led.py
softwareengel/softwareengel-blog
e24192c096be4361c7f7bbe00d2c3e8263c9fd0b
[ "MIT" ]
null
null
null
data/raspi/src/praxis/led.py
softwareengel/softwareengel-blog
e24192c096be4361c7f7bbe00d2c3e8263c9fd0b
[ "MIT" ]
null
null
null
data/raspi/src/praxis/led.py
softwareengel/softwareengel-blog
e24192c096be4361c7f7bbe00d2c3e8263c9fd0b
[ "MIT" ]
null
null
null
import TestRPiGPIO as GPIO import time GPIO.setmode(GPIO.BCM) class LED (object): ''' LED - Steuerungs - Klasse ''' def __init__(self, pin, name): self.pin = pin self.name = name self.status = 0 GPIO.setup(self.pin, GPIO.OUT) def turnLEDOn(self): self.status = 1 ...
20.894737
38
0.555416
a84663b73948d6abbb778f72ce9efd727ea67400
17,896
py
Python
src/onegov/translator_directory/forms/translator.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/translator_directory/forms/translator.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/translator_directory/forms/translator.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import json import re from cached_property import cached_property from wtforms import SelectField, StringField, BooleanField, TextAreaField, \ RadioField, FloatField from wtforms.fields.html5 import DateField, EmailField, IntegerField from wtforms.validators import ( InputRequired, Email, Optional, ValidationE...
31.069444
79
0.639473
a84c2cdeb656ec48363f4335a4d9e46d87c59c12
795
py
Python
sentinel/vpn/helpers.py
allagog0x01/sentwg
52285ecf2b03c30a78901a29a7af96c8ab5764c8
[ "Apache-2.0" ]
null
null
null
sentinel/vpn/helpers.py
allagog0x01/sentwg
52285ecf2b03c30a78901a29a7af96c8ab5764c8
[ "Apache-2.0" ]
null
null
null
sentinel/vpn/helpers.py
allagog0x01/sentwg
52285ecf2b03c30a78901a29a7af96c8ab5764c8
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import subprocess from ..db import db def disconnect_client(pub_key): cmd = 'wg set wg0 peer {} remove'.format(pub_key) disconnect_proc = subprocess.Popen(cmd, shell=True) disconnect_proc.wait() def update_session_data(session_data): pub_key = session_data['pub_key'] client = db...
20.921053
61
0.561006
a89b5d92191c5feb8c657e1b744b4c3f10722fbc
1,754
py
Python
core/database.py
Pug234/BytesBump
d5ff3130bffae92e1c5c671db4ed8904c403e9dc
[ "MIT" ]
11
2020-11-14T17:28:50.000Z
2021-05-19T18:21:07.000Z
core/database.py
AnimeDyno/BytesBump
a0cf0bfc4c13592c7b10ad46faa46a2a98dc1443
[ "MIT" ]
3
2021-01-22T15:48:41.000Z
2021-06-22T17:16:50.000Z
core/database.py
zImPinguin/Bump-Bot
3f449a4e5581a35a5cff998e94a13ae33dbe2b04
[ "MIT" ]
13
2020-11-18T05:20:31.000Z
2021-06-19T16:31:30.000Z
from pymongo import MongoClient from core.files import Data client = MongoClient(Data('config').yaml_read()['mongo']) class Servers: def __init__(self, server=None): self.server = server self.col = client["BytesBump"]["servers"] self.prefixes = client["BytesBump"]["prefixes"] def get(...
25.42029
100
0.580388
a8a9f8722a5c7ef70beb4d9a360f61fbd225ec1b
6,649
py
Python
BluePrint/lib/flask_migrate/__init__.py
CodeMath/jinrockets
6bb26e9ca66ba951ab2d34bf1ffe79b2c605963f
[ "MIT" ]
1
2018-03-02T06:56:36.000Z
2018-03-02T06:56:36.000Z
lib/flask_migrate/__init__.py
SeaFalcon/Musicool_Pr
c0d62493c2d7bd9e2afa932c5f683d8b25942daf
[ "Apache-2.0" ]
null
null
null
lib/flask_migrate/__init__.py
SeaFalcon/Musicool_Pr
c0d62493c2d7bd9e2afa932c5f683d8b25942daf
[ "Apache-2.0" ]
null
null
null
import os from flask import current_app from flask.ext.script import Manager from alembic.config import Config as AlembicConfig from alembic import command class _MigrateConfig(object): def __init__(self, db, directory): self.db = db self.directory = directory @property def metadata(self):...
58.324561
214
0.702211
76afdaf15cd844deeeefef74dd3668c770345e60
3,058
py
Python
src/visitpy/visit_flow/visit_flow_vpe/src/visit_flow_vpe.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/src/visit_flow_vpe.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/src/visit_flow_vpe.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: visit_flow_expr.py author: Cyrus Harrison <cyrush@llnl.gov> created: 12/09/2011 descr...
34.75
87
0.623283
4f4db0cc2f151570b031b0cd37f1dd1f369f3a1a
440
py
Python
rev/DownTheRabbitHole/src/fs-hash.py
NoXLaw/RaRCTF2021-Challenges-Public
1a1b094359b88f8ebbc83a6b26d27ffb2602458f
[ "MIT" ]
null
null
null
rev/DownTheRabbitHole/src/fs-hash.py
NoXLaw/RaRCTF2021-Challenges-Public
1a1b094359b88f8ebbc83a6b26d27ffb2602458f
[ "MIT" ]
null
null
null
rev/DownTheRabbitHole/src/fs-hash.py
NoXLaw/RaRCTF2021-Challenges-Public
1a1b094359b88f8ebbc83a6b26d27ffb2602458f
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import struct import sys def hash(inp): padsize = len(inp) % 4 if padsize != 0: inp += 'X' * (4 - padsize) inp = inp.encode('latin1') res = "\x00" * 4 res = bytearray(res, 'latin1') for i in range(0, len(inp), 4): res[0] ^= inp[i] res[1] ^= inp[i+1] ...
20
39
0.5
4f716f3851fae938e4e7af8534f1206630cec998
2,080
py
Python
yolov5-coreml-tflite-converter/utils/pytorch_loader.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/utils/pytorch_loader.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/utils/pytorch_loader.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
import torch from models.experimental import attempt_load from torch import nn from constants import DEFAULT_INPUT_RESOLUTION, BATCH_SIZE, NB_CHANNEL class PyTorchModelLoader: def __init__(self, model_input_path, input_resolution=DEFAULT_INPUT_RESOLUTION): self.model_input_path = model_input_path ...
34.098361
106
0.685096
4fa9a1a3b93200c3978753f20851affecb42ec00
663
py
Python
examples/05 custom keyboard/KeyboardBot.py
Killerhaschen/marvin-telegram-bot
c65e890a00450ed6ed4312d93e259db0c080ef6d
[ "MIT" ]
1
2020-01-16T08:40:00.000Z
2020-01-16T08:40:00.000Z
examples/05 custom keyboard/KeyboardBot.py
Killerhaschen/marvin-telegram-bot
c65e890a00450ed6ed4312d93e259db0c080ef6d
[ "MIT" ]
null
null
null
examples/05 custom keyboard/KeyboardBot.py
Killerhaschen/marvin-telegram-bot
c65e890a00450ed6ed4312d93e259db0c080ef6d
[ "MIT" ]
1
2019-10-16T08:11:51.000Z
2019-10-16T08:11:51.000Z
import asyncio from samt import Bot, Answer, Context, Mode marv = Bot() @marv.default_answer def default(): return 'unknown', Context.get('message').text @marv.answer("Key") def key(): a = Answer("Hier isses", keyboard=[["Ja, Nein"], ["Nööö"], ["..."]]) return a @marv.answer("Key2") def key(): a...
17.447368
76
0.582202
96cdb48b1328ad661901b7ded3c8e22cc97eca3b
412
py
Python
AP_SS16/US3/python_custom_scripts/utility.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
3
2016-04-27T17:07:00.000Z
2022-02-02T15:43:15.000Z
AP_SS16/US3/python_custom_scripts/utility.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
5
2016-04-27T17:10:03.000Z
2017-06-20T14:54:20.000Z
AP_SS16/US3/python_custom_scripts/utility.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
null
null
null
import math from decimal import Decimal import scipy from uncertainties import ufloat def constant(name): """Returns ufloat containing value and its error of a physical constant Args: name (str) The name of the constant which can be found at http://docs.scipy.org/doc/scipy/reference/constants.ht...
31.692308
129
0.713592
8c038b67f7f24f0d3263f57e916b909aadc9fac2
3,909
py
Python
src/bo4e/bo/tarif.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/bo/tarif.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/bo/tarif.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Tarif class and corresponding marshmallow schema for de-/serialization """ from datetime import datetime from typing import List, Optional import attr from marshmallow import fields from bo4e.bo.tarifinfo import Tarifinfo, TarifinfoSchema from bo4e.com.aufabschlagregional import AufAbschlagRegional, Auf...
41.585106
164
0.759785
8cfbee0b6b6e92160884ae7d755e1fd297dc3d0f
6,166
py
Python
Packs/DeveloperTools/Scripts/WaitAndCompleteTask/WaitAndCompleteTask.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/DeveloperTools/Scripts/WaitAndCompleteTask/WaitAndCompleteTask.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/DeveloperTools/Scripts/WaitAndCompleteTask/WaitAndCompleteTask.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
from time import sleep import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * from typing import Dict, Any import traceback POSSIBLE_STATES = ['New', 'InProgress', 'Completed', 'Waiting', 'Error', 'Skipped', 'Blocked'] ''' STANDALONE FUNCTION ''' def get_incident_tasks_...
32.973262
106
0.636231
2cea482591a9b36d3fda2ee5df9b4a1791af948c
2,999
py
Python
helper/segmentation/evaluateTest.py
fishial/Object-Detection-Model
4792f65ea785156a8e240d9cdbbc0c9d013ea0bb
[ "CC0-1.0" ]
1
2022-01-03T14:00:17.000Z
2022-01-03T14:00:17.000Z
helper/segmentation/evaluateTest.py
fishial/Object-Detection-Model
4792f65ea785156a8e240d9cdbbc0c9d013ea0bb
[ "CC0-1.0" ]
null
null
null
helper/segmentation/evaluateTest.py
fishial/Object-Detection-Model
4792f65ea785156a8e240d9cdbbc0c9d013ea0bb
[ "CC0-1.0" ]
1
2021-12-21T09:50:53.000Z
2021-12-21T09:50:53.000Z
import sys #Change path specificly to your directories sys.path.insert(1, '/home/codahead/Fishial/FishialReaserch') import os from module.segmentation_package.src.utils import save_to_json, save_json, read_json from module.segmentation_package.src.utils import beautifier_results from module.segmentation_package.src.u...
36.13253
114
0.690564
fa05dc0a8ed592de438e2d06855f8cf596959ffe
1,829
py
Python
demos/System_Dynamics/Compartment_Models/seir/model/parts/seir_model.py
w-ghub/demos
6382676fae89bd5a190626612712fcedf17bca6d
[ "MIT" ]
56
2020-07-08T23:23:15.000Z
2022-03-11T20:43:09.000Z
demos/System_Dynamics/Compartment_Models/seir/model/parts/seir_model.py
w-ghub/demos
6382676fae89bd5a190626612712fcedf17bca6d
[ "MIT" ]
41
2020-07-11T23:24:06.000Z
2022-01-28T13:28:07.000Z
demos/System_Dynamics/Compartment_Models/seir/model/parts/seir_model.py
w-ghub/demos
6382676fae89bd5a190626612712fcedf17bca6d
[ "MIT" ]
39
2020-07-15T11:35:04.000Z
2022-02-01T16:02:51.000Z
import numpy as np ## Policies def p_exposed_growth(params, substep, state_history, prev_state): exposed_population = params['infection_rate']*prev_state['infected']*(prev_state['susceptible']/(prev_state['susceptible']+ prev_state['exposed'] + prev_state['infected'] + prev_state['recovered'])) return {'exp...
45.725
202
0.778568
fa1d59110cf93c4a7be5fe2e024cb02f95629c33
1,826
py
Python
Zh3r0/2021/crypto/chaos/challenge.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
Zh3r0/2021/crypto/chaos/challenge.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
Zh3r0/2021/crypto/chaos/challenge.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
from secret import flag def ROTL(value, bits, size=32): return ((value % (1 << (size - bits))) << bits) | (value >> (size - bits)) def ROTR(value, bits, size=32): return ((value % (1 << bits)) << (size - bits)) | (value >> bits) def pad(pt): pt+=b'\x80' L = len(pt) to_pad = 60-(L%64) if L%64 <= 60...
41.5
78
0.525192
ad09f4b15abeabe91206ac0bdfa6894bb1bfb9c8
1,028
py
Python
src/SHD/utils/gm_utilities.py
mheob/SHD.GraphicsMagick
fbf84f1feb7e5ca76a3e99238653d8f15c6b504a
[ "MIT" ]
1
2021-01-30T15:50:13.000Z
2021-01-30T15:50:13.000Z
src/SHD/utils/gm_utilities.py
mheob/SHD.GraphicsMagick
fbf84f1feb7e5ca76a3e99238653d8f15c6b504a
[ "MIT" ]
null
null
null
src/SHD/utils/gm_utilities.py
mheob/SHD.GraphicsMagick
fbf84f1feb7e5ca76a3e99238653d8f15c6b504a
[ "MIT" ]
null
null
null
from os import path, remove from PythonMagick import Image, CompositeOperator from SHD.utils.file_utilities import FileUtilities class GmUtilities: @staticmethod def convert_filetype(input_files, output_type, extensions): out_type = "." + output_type.lower() is_no_image = True for f...
31.151515
80
0.579767