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
f63035e2404c2cbfc8ffe431b893338405e1e3c8
1,875
py
Python
migrations/versions/f1bc3fa623c7_.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
migrations/versions/f1bc3fa623c7_.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
migrations/versions/f1bc3fa623c7_.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
"""empty message Revision ID: f1bc3fa623c7 Revises: 75c07cb9cfe3 Create Date: 2020-07-07 15:49:58.653888 """ import sqlalchemy as sa from alembic import op from project import dbtypes from project.models import EventAttendanceMode, EventStatus, EventTargetGroupOrigin # revision identifiers, used by Alembic. revisio...
30.737705
86
0.663467
1aef0710df7c130db61c13de945d779637e1d515
1,133
py
Python
assets/webofscience_concatenate.py
rhearty1/rhearty1.github.io
f05f1d496aaf6fa0c0fe846ecff0e2737a37de3e
[ "MIT" ]
null
null
null
assets/webofscience_concatenate.py
rhearty1/rhearty1.github.io
f05f1d496aaf6fa0c0fe846ecff0e2737a37de3e
[ "MIT" ]
null
null
null
assets/webofscience_concatenate.py
rhearty1/rhearty1.github.io
f05f1d496aaf6fa0c0fe846ecff0e2737a37de3e
[ "MIT" ]
null
null
null
import glob, os NUM_LINES_TO_SKIP_FIRST = 2 NUM_LINES_TO_SKIP_LAST = 2 dirname = 'inputs' os.chdir(dirname) filenames = glob.glob("*.txt") for filename in filenames: print(filename) print('Overwriting output.txt...') with open('../output.txt', 'w', encoding="utf-8") as outfile: for filename in filenames: ...
45.32
83
0.621359
21350db413f6086ada5a635b3d5235f6d5a1fabb
3,401
py
Python
projects/g3h1-cp-fml-interpreter/src/actuator/actuator.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g3h1-cp-fml-interpreter/src/actuator/actuator.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g3h1-cp-fml-interpreter/src/actuator/actuator.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
from PIL import Image, ImageDraw from math import sin, cos from semantic import Operation # 执行器(绘图模块) class Actuator(object): def __init__(self, filename): self.origin = (0, 0) self.scale = [1, 1] self.rot = 0 self.points = [] self.image = None self.operation_queue ...
33.019417
104
0.52514
2143e51452f2bc7b2e0d37a41bab76e418e8d1b7
1,069
py
Python
ch01_text_encoding/utf-8.py
aisolab/17Techs
91351921c9ac85672d29dab895d4d7df8b310a6b
[ "MIT" ]
1
2021-01-10T14:32:41.000Z
2021-01-10T14:32:41.000Z
ch01_text_encoding/utf-8.py
aisolab/17Techs
91351921c9ac85672d29dab895d4d7df8b310a6b
[ "MIT" ]
null
null
null
ch01_text_encoding/utf-8.py
aisolab/17Techs
91351921c9ac85672d29dab895d4d7df8b310a6b
[ "MIT" ]
1
2021-08-14T11:23:55.000Z
2021-08-14T11:23:55.000Z
""" 유니코드 유니코드 (Unicode) - 동일한 규칙으로 모든 언어를 표현할 수 있는 문자 집합 - 유니코드 문자 집합을 표현하는 문자열 인코딩은 UTF-8, UTF-16, UTF-32 등이 존재 - 문자의 종류에 따라 기본 다국어 평면 (Basic Multilingual Plane, BMP), 보충 다국어 평면 (Supplementary Multilingual Plane, SMP), 상형 문자 보충 평면 (Supplementary Ideographic Plane, SIP), 특수 목적 보충 평면 (Supplement...
41.115385
162
0.625819
d3aca216cb75aec4ae37f671649d057d424633e2
211
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v7_0/set_is_group_for_warehouse.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_0/set_is_group_for_warehouse.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_0/set_is_group_for_warehouse.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
import frappe def execute(): frappe.reload_doc("stock", "doctype", "warehouse") frappe.db.sql("""update tabWarehouse set is_group = if ((ifnull(is_group, "No") = "Yes" or ifnull(is_group, 0) = 1), 1, 0)""")
35.166667
91
0.663507
9facf0bd24a97a72f99662f9b01de3aead79fe19
1,777
py
Python
backend/utils/database_lookup.py
methodpark/digitaleswarten
024c0b88df54e9727925b202e139b3c5b2ce73d6
[ "Apache-2.0" ]
10
2020-03-20T19:14:43.000Z
2020-10-29T21:31:40.000Z
backend/utils/database_lookup.py
methodpark/digitaleswarten
024c0b88df54e9727925b202e139b3c5b2ce73d6
[ "Apache-2.0" ]
41
2020-03-20T20:27:55.000Z
2020-03-24T21:49:37.000Z
backend/utils/database_lookup.py
methodpark/digitaleswarten
024c0b88df54e9727925b202e139b3c5b2ce73d6
[ "Apache-2.0" ]
1
2020-03-21T09:31:51.000Z
2020-03-21T09:31:51.000Z
from flask import abort from models.entry import Entry from models.place import Place from models.queue import Queue def get_place_if_exists(place_id): """ Returns the place linked to the place id. Throws a 404 otherwise. """ place = get_place(place_id) if place is None: abort(404) ...
25.385714
78
0.659539
e22d9bdbef59df2e3972b765c8c716118dd5dddb
745
py
Python
testcode/postillon_spider.py
Cl3V0r/MLSeminar
d05f171a9b7d773ea123e1919e07312a7f0c9fe8
[ "MIT" ]
null
null
null
testcode/postillon_spider.py
Cl3V0r/MLSeminar
d05f171a9b7d773ea123e1919e07312a7f0c9fe8
[ "MIT" ]
null
null
null
testcode/postillon_spider.py
Cl3V0r/MLSeminar
d05f171a9b7d773ea123e1919e07312a7f0c9fe8
[ "MIT" ]
null
null
null
#execute with scrapy runspider postillon_spider.py -o ../data/postillon.json import scrapy class PostillonSpider(scrapy.Spider): name="titles" start_urls = [ "https://www.der-postillon.com/" ] def parse(self, response): for title in response.xpath("//div[@class='post hentry']"): ...
35.47619
112
0.620134
2c7d20fc7c33b4c9a5948f0597108cd4087c0b4b
617
py
Python
HSCTF/2021/crypto/regulus-ignicapilla/regulus-ignicapilla.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
HSCTF/2021/crypto/regulus-ignicapilla/regulus-ignicapilla.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
HSCTF/2021/crypto/regulus-ignicapilla/regulus-ignicapilla.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
from Crypto.Util.number import * import random import math flag = open('flag.txt','rb').read() while 1: p = getPrime(512) q = getPrime(512) if (p<q or p>2*q): continue break n = p**2*q while 1: a = random.randint(2,n-1) if pow(a,p-1,p**2)!=1: break def e(m): assert m<p ka...
23.730769
75
0.604538
e2c6bc55856ffba1150dec091f9217c21fe31443
260
py
Python
Python/Courses/Crash-Course-on-Python.Google/week-2-Basic-Python-Syntax/04-Defining-Function.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Crash-Course-on-Python.Google/week-2-Basic-Python-Syntax/04-Defining-Function.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Crash-Course-on-Python.Google/week-2-Basic-Python-Syntax/04-Defining-Function.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
def greeting(name: str) -> None: print("Welcome, " + name) def greeting2(name: str, department: str) -> None: print("Welcome, " + name) print("You are part of " + department) greeting("Shihab") greeting("Saimon") greeting2("Shihab", "Backend")
20
50
0.642308
e2e554b09723039d7a8e46ab2811ac53f81366a2
1,614
py
Python
crawler/utils/LoggingConfig.py
macroxu/FundAnalysis
bc94f271fae5df6971aae37b873b97973d25b1c8
[ "Apache-2.0" ]
null
null
null
crawler/utils/LoggingConfig.py
macroxu/FundAnalysis
bc94f271fae5df6971aae37b873b97973d25b1c8
[ "Apache-2.0" ]
null
null
null
crawler/utils/LoggingConfig.py
macroxu/FundAnalysis
bc94f271fae5df6971aae37b873b97973d25b1c8
[ "Apache-2.0" ]
null
null
null
import logging import os from logging import handlers from utils.FileManager import FileManager _crawlerLogName="crawlerLog" _crawlerLogFileName='crawlerLog.log' _crawlerDebugLogFileName='crawlerDebugLog.log' def _loggingConfig(**kwargs): level=kwargs.pop('level',None) dateFmt=kwargs.pop('dateFmt',None) ...
29.888889
132
0.7057
20147b0a6f188bdf85141db47e36371c803cda98
3,223
py
Python
Dinsel/ex1/ex1.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
11
2017-04-21T11:39:55.000Z
2022-02-11T20:25:18.000Z
Dinsel/ex1/ex1.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
69
2017-04-26T09:30:38.000Z
2017-08-01T11:31:21.000Z
Dinsel/ex1/ex1.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
53
2017-04-20T16:16:11.000Z
2017-07-19T12:53:01.000Z
#!/usr/bin/env python # encoding: UTF-8 """ Get the geometric mean of a list of nums. @FriedrichDinsel """ # import sys import time import datetime import numpy as np from scipy.stats.mstats import gmean class ex1(): """.""" def __init__(self, args): """.""" self.getGMean(args) def getD...
28.776786
130
0.522495
204f290f5fa70c015b240f6d5d3d3593a08c9f74
537
py
Python
Decorators/Basic/excercise.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
Decorators/Basic/excercise.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
Decorators/Basic/excercise.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
''' To extending the python function functionality without touching the implemented the code. ''' from time import time def timer(fun): def wrapper(*args, **kargs): start = time() result = fun(*args, **kargs) end = time() print("{x} Running time in Total Sec: ".format(x=fun.__na...
20.653846
93
0.636872
649b568d46fcef2eaac617e2ce3e7bee215f72ce
8,783
py
Python
vkapp/bot/logic/user_states.py
ParuninPavel/lenta4_hack
6d3340201deadf5757e37ddd7cf5580b928d7bda
[ "MIT" ]
1
2017-11-23T13:33:13.000Z
2017-11-23T13:33:13.000Z
vkapp/bot/logic/user_states.py
ParuninPavel/lenta4_hack
6d3340201deadf5757e37ddd7cf5580b928d7bda
[ "MIT" ]
null
null
null
vkapp/bot/logic/user_states.py
ParuninPavel/lenta4_hack
6d3340201deadf5757e37ddd7cf5580b928d7bda
[ "MIT" ]
null
null
null
from .core.State import State import time from .utils.stickers import is_sticker from vkapp.bot.dao import usersDAO, newsDAO, moneyDAO import json PROPOSAL_AMOUNT=1 PUBLISH_AMOUNT=100 MAX_DAILY_NEWS=10 class BootStrapState(State): def on_trigger(self, trigger): usersDAO.new_blogger(trigger.current_uid) ...
44.358586
138
0.587043
2070df1c7cad57339ed0b2d6e05c2677c3aa4292
590
py
Python
repo/script.video.F4mProxy/lib/flvlib/__init__.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
1
2017-11-26T18:18:46.000Z
2017-11-26T18:18:46.000Z
repo/script.video.F4mProxy/lib/flvlib/__init__.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
null
null
null
repo/script.video.F4mProxy/lib/flvlib/__init__.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
3
2019-09-30T19:52:05.000Z
2020-04-12T21:20:56.000Z
import os # python 2.4 does not have os.SEEK_* try: os.SEEK_SET except AttributeError: os.SEEK_SET, os.SEEK_CUR, os.SEEK_END = range(3) import logging log = logging.getLogger('flvlib') log.setLevel(logging.NOTSET) handler = logging.StreamHandler() handler.setLevel(logging.NOTSET) formatter ...
23.6
71
0.659322
45ddea4b834b942f810ed9dd4516771058cf7999
1,898
py
Python
tools/datasets_convert/dcm2jpg.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
2
2020-12-22T08:40:05.000Z
2021-03-30T08:09:44.000Z
tools/datasets_convert/dcm2jpg.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
tools/datasets_convert/dcm2jpg.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
#coding=utf-8 import os import cv2 # import matplotlib.pylab as plt import numpy as np import pydicom from pydicom import dcmread def convert_ybr_to_rgb(arr): if len(arr.shape) == 4: return np.vstack([convert_ybr_to_rgb(a)[np.newaxis] for a in arr]) else: temp = arr[..., 1].copy() arr[...
27.114286
93
0.612223
ff80c1cf2bd249bf109a1b7011cb46594096818b
4,319
py
Python
dvwa-app/attacker/attacker.py
alxgrk/pratikum-sec-inf-and-event-mgmt
a53d8a79be4664b7b8b249034760bab1d9fbc657
[ "Apache-2.0" ]
4
2019-05-13T21:39:29.000Z
2019-08-10T09:19:44.000Z
dvwa-app/attacker/attacker.py
alxgrk/pratikum-sec-inf-and-event-mgmt
a53d8a79be4664b7b8b249034760bab1d9fbc657
[ "Apache-2.0" ]
null
null
null
dvwa-app/attacker/attacker.py
alxgrk/pratikum-sec-inf-and-event-mgmt
a53d8a79be4664b7b8b249034760bab1d9fbc657
[ "Apache-2.0" ]
null
null
null
import argparse import time import requests import numpy as np import logging import subprocess from selenium import webdriver from selenium.webdriver.chrome.options import Options from pyvirtualdisplay import Display logging.basicConfig(level=logging.DEBUG) parser = argparse.ArgumentParser(description='HTTPS-Cli...
30.631206
224
0.676777
ff9476fe4da3e06e0fb2a5cf0e9396354d1e2e8a
1,182
py
Python
init_transcription.py
NickForero11/Subbler
ed528514e96ddc30d58230ff98ff0fd5216ea5de
[ "MIT" ]
null
null
null
init_transcription.py
NickForero11/Subbler
ed528514e96ddc30d58230ff98ff0fd5216ea5de
[ "MIT" ]
null
null
null
init_transcription.py
NickForero11/Subbler
ed528514e96ddc30d58230ff98ff0fd5216ea5de
[ "MIT" ]
null
null
null
"""Module to handle the triggering of the transcription process in AWS Transcribe. """ from json import dumps from requests import post from requests.exceptions import RequestException from sys import exit def init_transcription(originLang, s3key): """Trigger a transcription job on AWS Transcribe of an audiofile ...
27.488372
76
0.618443
a67d551f955a42a8487cbd2e9a0e3e2e16b89da9
1,164
py
Python
Problems/Depth-First Search/medium/FindBottomLeftTreeValue/find_bottom_left_tree_value.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Depth-First Search/medium/FindBottomLeftTreeValue/find_bottom_left_tree_value.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Depth-First Search/medium/FindBottomLeftTreeValue/find_bottom_left_tree_value.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import Optional # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right # Recursive def findBottomLeftValue(self, root: Optional[TreeNode]) -> int: self.last_left, self.last_r...
24.25
65
0.582474
4706b84d09b93681c87b293180c95c75cfb1b04d
5,626
py
Python
tests/test_reader.py
lextoumbourou/pelican-frontmark
d68003a34c952089df6d653a79ba31388619b69e
[ "MIT" ]
8
2017-01-23T01:29:54.000Z
2022-03-26T18:52:00.000Z
tests/test_reader.py
lextoumbourou/pelican-frontmark
d68003a34c952089df6d653a79ba31388619b69e
[ "MIT" ]
2
2017-11-25T05:32:29.000Z
2021-05-24T07:50:07.000Z
tests/test_reader.py
lextoumbourou/pelican-frontmark
d68003a34c952089df6d653a79ba31388619b69e
[ "MIT" ]
9
2017-01-22T19:11:09.000Z
2021-12-10T16:35:41.000Z
import os from pelican import readers, Pelican from pelican.settings import DEFAULT_CONFIG from pelican.utils import SafeDatetime from frontmark.reader import FrontmarkReader from frontmark.signals import frontmark_yaml_register from pyquery import PyQuery as pq TEST_DIR = os.path.dirname(__file__) DATA_PATH = os.p...
29
87
0.67117
5b476c2daf1f51b7b0b0f3bb768c6a831d9da023
7,590
py
Python
7-assets/past-student-repos/Graphs-master/projects/graph/graph.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Graphs-master/projects/graph/graph.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Graphs-master/projects/graph/graph.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
""" Simple graph implementation """ from util import Stack, Queue # These may come in handy class Graph: """Represent a graph as a dictionary of vertices mapping labels to edges.""" def __init__(self): self.vertices = {} def add_vertex(self, vertex): """ Add a vertex to the graph....
31.493776
112
0.516206
caacf4553a7a4ce62b2dc66dfb0498e679d10043
686
py
Python
exercises/ja/test_04_12_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/ja/test_04_12_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/ja/test_04_12_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert len(doc1.ents) == 2, "doc1に2つの固有表現が含まれています。" assert ( doc1.ents[0].label_ == "WEBSITE" and doc1.ents[0].text == "Reddit" ), "doc1の1番目の固有表現を確認してください" assert ( doc1.ents[1].label_ == "WEBSITE" and doc1.ents[1].text == "Patreon" ), "doc1の2番目の固有表現を確認してください" assert ...
36.105263
75
0.61516
1b9d23b96e34d4ff22197e8c6d38d821e9f81fd4
12,096
py
Python
cloudmesh/volume/openstack/Provider.py
cloudmesh/cloudmesh-volume
a7502d077f2fb7c6b1b7986da9595a36591b06cd
[ "Apache-2.0" ]
1
2020-03-12T09:49:53.000Z
2020-03-12T09:49:53.000Z
cloudmesh/volume/openstack/Provider.py
cloudmesh/cloudmesh-volume
a7502d077f2fb7c6b1b7986da9595a36591b06cd
[ "Apache-2.0" ]
1
2020-03-25T00:47:12.000Z
2020-03-30T23:32:00.000Z
cloudmesh/volume/openstack/Provider.py
cloudmesh/cloudmesh-volume
a7502d077f2fb7c6b1b7986da9595a36591b06cd
[ "Apache-2.0" ]
5
2020-02-20T01:04:24.000Z
2020-05-05T14:36:30.000Z
import openstack from cloudmesh.common.console import Console from cloudmesh.common.dotdict import dotdict from cloudmesh.configuration.Config import Config from cloudmesh.volume.VolumeABC import VolumeABC from cloudmesh.mongo.CmDatabase import CmDatabase class Provider(VolumeABC): kind = "openstack" sample...
33.322314
80
0.516534
1ba086d9eab3d2d0ac0cc405559918911d6bceec
1,970
py
Python
cs/lambda_cs/05_hash_tables_and_blockchain/Sprint-Challenge--Hash-BC/hashtables/ex1/ex1.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
cs/lambda_cs/05_hash_tables_and_blockchain/Sprint-Challenge--Hash-BC/hashtables/ex1/ex1.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/05_hash_tables_and_blockchain/Sprint-Challenge--Hash-BC/hashtables/ex1/ex1.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
""" Hashtables :: Sprint challenge, Part 1 """ from hashtables import ( HashTable, hash_table_insert, hash_table_retrieve, ) def get_indices_of_item_weights(weights, length, limit): """Given a package with a weight limit `limit` and a list `weights` of item weights, finds two items whose sum of w...
26.266667
75
0.638071
1bb76df2d767660ee8353e19d7d362c7b05884a0
902
py
Python
Algorithms/Search_Algorithms/Binary_Search/binarySearchRecursive.py
hussamEL-Hwary/DS-Algo-Handbook
86a97d586a4ca8b17168c0a9f5a9f43f856eba58
[ "MIT" ]
18
2016-11-01T04:00:36.000Z
2021-09-13T14:26:35.000Z
Algorithms/Search_Algorithms/Binary_Search/binarySearchRecursive.py
JEERU/DS-Algo-Handbook
86a97d586a4ca8b17168c0a9f5a9f43f856eba58
[ "MIT" ]
60
2016-10-11T14:50:47.000Z
2016-10-31T11:05:01.000Z
Algorithms/Search_Algorithms/Binary_Search/binarySearchRecursive.py
JEERU/DS-Algo-Handbook
86a97d586a4ca8b17168c0a9f5a9f43f856eba58
[ "MIT" ]
87
2016-09-08T05:04:50.000Z
2016-10-30T19:19:53.000Z
""" Pre: List ordered asc, variable to find Post: Returns the position of the variable (x). If the variable is not in the list => return -1 """ def binarySearchRecursive(l, x): return r_binarySearchRecursive(l, x, 0, len(l) - 1) def r_binarySearchRecursive(l, x, left, right): if left > right: r...
33.407407
107
0.651885
84b51ad9529742ff8d8afe90a701b6cf53c44137
846
py
Python
PMIa/2015/NIKISHIN_P_S/task_7_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2015/NIKISHIN_P_S/task_7_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2015/NIKISHIN_P_S/task_7_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 7. Вариант 22. # Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток. # Nikishin P. S. # 20.05.2016 import random score=10 osnivateli = ["Ромул", "Рем"] osn=random.choice(osnivateli) print ("Здравствуйте! ") pri...
31.333333
152
0.70922
b6ce2c8f988edf80d8abcdeeea41737d46bdb8d1
1,200
py
Python
utils.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
utils.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
utils.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
from pathlib import Path key_order = {'Bundle': ( 'id', 'meta', 'implicitRules', 'language', 'identifier', 'type', 'timestamp', 'total', 'link', 'e...
29.268293
90
0.54
6d37aa793c9abb1f4a7485d2f648bc8842019ace
16,367
py
Python
src/onegov/org/forms/allocation.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/forms/allocation.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/forms/allocation.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import sedate from cached_property import cached_property from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta from dateutil.rrule import rrule, DAILY, MO, TU, WE, TH, FR, SA, SU from onegov.form import Form from onegov.form.fields import MultiCheckboxField from onegov.org import _...
25.653605
78
0.5673
eda639a4472a7644e93faba1030e915f68d2c980
20,216
py
Python
Jassen.py
simi48/Ef-If_Jassen
6076839492bff591cf9b457e949999e9167903e6
[ "Apache-2.0" ]
4
2019-03-17T19:55:43.000Z
2019-04-30T15:22:36.000Z
Jassen.py
simi48/Ef-If_Jassen
6076839492bff591cf9b457e949999e9167903e6
[ "Apache-2.0" ]
null
null
null
Jassen.py
simi48/Ef-If_Jassen
6076839492bff591cf9b457e949999e9167903e6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Project: Deep Jass File: Jassen.py Purpose: Assortment of Functions required for playing cards Functions: - ChooseTrump - CountPoints - LegalMove - Colour - RoundWinner - LocalPov - CTT (Card to Text) - CsTT (Variation of CTT) - C...
30.263473
252
0.512169
b6b21e2eb631b3b477b97c533c674811c479df95
424
py
Python
Python/M01_ProgrammingBasics/L06_NestedLoops/Exercises/Solutions/P06_SpecialNumbers.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L06_NestedLoops/Exercises/Solutions/P06_SpecialNumbers.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L06_NestedLoops/Exercises/Solutions/P06_SpecialNumbers.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
1
2022-02-23T13:03:14.000Z
2022-02-23T13:03:14.000Z
number = int(input()) for first in range(1, 10): if number % first == 0: for second in range(1, 10): if number % second == 0: for third in range(1, 10): if number % third == 0: for fourth in range(1, 10): if...
38.545455
81
0.417453
1e4587a8aaee7ccc3a4f1fc217c6da690ca0c7a3
1,009
py
Python
Packs/FeedAlienVault/Integrations/FeedAlienVaultReputation/FeedAlienVaultReputation.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedAlienVault/Integrations/FeedAlienVaultReputation/FeedAlienVaultReputation.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedAlienVault/Integrations/FeedAlienVaultReputation/FeedAlienVaultReputation.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * def main(): feed_url_to_config = { 'http://reputation.alienvault.com/reputation.data': { 'fieldnames': [ 'value', 'reliability', 'risk', 'threat_type', 'geocountry', 'geocity', 'geolocation', 'unknown' ], 'indicator_type'...
31.53125
112
0.602577
949d0b8b12b09bd6f113458b91d5bd114fb81e0d
1,844
py
Python
official/cv/cnnctc/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/cnnctc/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/cnnctc/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2020 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...
36.156863
102
0.747289
94bb6b23442ca410b19aa779619de454678bc070
2,009
py
Python
src/onegov/election_day/layouts/mail.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/layouts/mail.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/layouts/mail.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from cached_property import cached_property from onegov.ballot import Vote from onegov.core.i18n import SiteLocale from onegov.election_day import _ from onegov.election_day.layouts.default import DefaultLayout class MailLayout(DefaultLayout): """ A special layout for creating HTML E-Mails. """ @cached_prope...
32.934426
77
0.61772
15259386c2802319f84237c7287fe8bd6ca16828
476
py
Python
download_data.py
melioristic/FANPY
2d68d222de4f1e6d6d802268253ce446cd924914
[ "MIT" ]
1
2021-04-23T19:47:51.000Z
2021-04-23T19:47:51.000Z
download_data.py
melioristic/FANPY
2d68d222de4f1e6d6d802268253ce446cd924914
[ "MIT" ]
null
null
null
download_data.py
melioristic/FANPY
2d68d222de4f1e6d6d802268253ce446cd924914
[ "MIT" ]
null
null
null
from forpy import download_era5_met var_met = ['rainfall_flux', 'near_surface_air_temperature', 'near_surface_wind_speed', 'surface_air_pressure', 'surface_downwelling_shortwave_radiation'] var_pressure = 'relative_humidity' download_dir = '/data/compoundx/era5_me...
25.052632
54
0.703782
15941d3d6d19d924727f2a150337a9fa41dd6df6
1,375
py
Python
P8702N/console.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
P8702N/console.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
P8702N/console.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
#!/usr/bin/env python import socket import threading import sbs TCP_IP = '10.0.0.184' TCP_PORT = 10001 BUFFER_SIZE = 1024 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TCP_IP, TCP_PORT)) pipeaway = {'kern.alert': None, 'daemon.warn': None, 'CMS MDM': None} for key in pipeaway: pipeaway[key] ...
22.916667
80
0.557091
15b03fc4ce7e75b5dd9e52a200a945ffd00f2234
18,782
py
Python
MAIN/STM32F405_C/NORMAL/history/V30/PXSensor.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
MAIN/STM32F405_C/NORMAL/history/V30/PXSensor.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
MAIN/STM32F405_C/NORMAL/history/V30/PXSensor.py
ozturkahmetcevdet/VSenst
07c068fefcbd66ae4d8ec0480b4da10d6b5c7410
[ "MIT" ]
null
null
null
import gc from micropython import const from SX1239 import RF_COMING_DATA_SIZE import binascii OPEN_SCENE_SHOW_TIME = const(2500) CLOSING_TIME = const(10000) CLOSE_SCENE_SHOW_TIME = const(1000) MAX_SEAT_NUMBER = const(33) PXHUB_ESTIMATED_LIFETIME = const(1788) #day RF_DATA_...
64.102389
751
0.645565
15be5824c174557f89309dde3137938009dc1b4a
66
py
Python
home-assistant/custom_components/mmpk/__init__.py
Adamvg/SmartHouse
740b010260f6f6b38a19e2a75d431446abd54253
[ "MIT" ]
136
2019-06-27T08:11:47.000Z
2022-03-11T12:26:53.000Z
home-assistant/custom_components/mmpk/__init__.py
Venkysgithu/SmartHouse
d4e42dbbbb1f535f1684d507de411a4421b92e4d
[ "MIT" ]
5
2020-05-30T00:19:22.000Z
2022-03-25T18:49:47.000Z
home-assistant/custom_components/mmpk/__init__.py
Venkysgithu/SmartHouse
d4e42dbbbb1f535f1684d507de411a4421b92e4d
[ "MIT" ]
63
2019-07-15T21:11:58.000Z
2022-03-13T09:43:24.000Z
"""Public transit sensor for MPK Kraków""" __version__ = '1.0.0'
16.5
42
0.681818
01a637df72a8e5176ed07e911f53cdcb04c17277
6,205
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/xenserver/test_xapi.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/xenserver/test_xapi.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/xenserver/test_xapi.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright: (c) 2019, Bojan Vitnik <bvitnik@mainstream.rs> # 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 import pytest import atexit from ..FakeAnsibleModul...
35.255682
155
0.721676
bd656d2e48692149ac1903caedc3cde4a7edbe2c
3,196
py
Python
src/onegov/core/html.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/html.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/html.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import re from bleach.sanitizer import Cleaner from html2text import HTML2Text # html tags allowed by bleach SANE_HTML_TAGS = [ 'a', 'abbr', 'b', 'br', 'blockquote', 'code', 'del', 'div', 'em', 'i', 'img', 'hr', 'li', 'ol', 'p', 'pre', 'strong', ...
22.666667
77
0.631727
da1254c8d2170a7f8022cd68939570d5b87b57bd
1,209
py
Python
scripts/ci/docker/masonry_docker_ci_cleanup.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
scripts/ci/docker/masonry_docker_ci_cleanup.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
scripts/ci/docker/masonry_docker_ci_cleanup.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. # # Helper script to cleanup tpl build dirs to reduce # our docker image size # import sys import g...
25.1875
73
0.65426
f92bbf46f5541cdaa7b964610cf1546c7b1fae50
3,854
py
Python
next2018/amer/orange/clusterizer.py
nutanix/hackathon
b9d47c4911036b6037c5d817cbe38af83b83de7a
[ "MIT" ]
1
2018-05-15T21:25:17.000Z
2018-05-15T21:25:17.000Z
next2018/amer/orange/clusterizer.py
nutanix/hackathon
b9d47c4911036b6037c5d817cbe38af83b83de7a
[ "MIT" ]
1
2021-06-01T22:18:54.000Z
2021-06-01T22:18:54.000Z
next2018/amer/orange/clusterizer.py
nutanix/hackathon
b9d47c4911036b6037c5d817cbe38af83b83de7a
[ "MIT" ]
1
2018-05-15T23:59:11.000Z
2018-05-15T23:59:11.000Z
import subprocess import sys import time import requests CLOUDALIZER_IP = "35.196.167.141" CLUSTER_IP = "10.21.55.37" VM_UUID = "314cecaf-03cc-437d-9828-32e99fd474a9" def send_mail(address, sender, subject, body): cmd = "echo \"%s\" | mail -v -s \"%s\" -r \"%s\" %s" % ( body, subject, sender, address) subpr...
30.587302
80
0.60275
006ff368c5f54921011fc6fd0ff6810b96ad7200
1,013
py
Python
神经网络可视化/netron/test_netron.py
yujmo/mlbt
43c42e15e6a63aa05c7e564f508641bce3fbdf55
[ "MIT" ]
null
null
null
神经网络可视化/netron/test_netron.py
yujmo/mlbt
43c42e15e6a63aa05c7e564f508641bce3fbdf55
[ "MIT" ]
null
null
null
神经网络可视化/netron/test_netron.py
yujmo/mlbt
43c42e15e6a63aa05c7e564f508641bce3fbdf55
[ "MIT" ]
null
null
null
import torch.nn as nn import torch.nn.functional as F import torch """ 1、生成神经网络模型model 2、保存model为pth文件 3、使用netron工具打开pth文件 """ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') class Net(nn.Module): def __init__(self): super(Net, self).__init__() ...
27.378378
78
0.565647
00c4913ceebce055758dc2c9d36c9e4569d0a30b
1,162
py
Python
projects/visualize/tests/bmp_get/script.py
DockerComposeFiles/ARM
b0faddb525ad134ff8c589c370d8e61ab030c216
[ "MIT" ]
null
null
null
projects/visualize/tests/bmp_get/script.py
DockerComposeFiles/ARM
b0faddb525ad134ff8c589c370d8e61ab030c216
[ "MIT" ]
null
null
null
projects/visualize/tests/bmp_get/script.py
DockerComposeFiles/ARM
b0faddb525ad134ff8c589c370d8e61ab030c216
[ "MIT" ]
null
null
null
import time from pathlib import Path print("reading start", flush=True) # Wenn Datei nicht existiert, ist der Sensor_Container noch nicht Einsatzbereit # Warten, dass Sensor_Container mit dem schreiben begonnen hat fileName = r"/data/data.txt" fileObj = Path(fileName) while not fileObj.is_file: print("no_File", f...
27.023256
85
0.627367
dad1b28257220eb3192f6c4ead181bc9c4fd1c2b
1,468
py
Python
src/test/tests/queries/avg_value.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/queries/avg_value.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/test/tests/queries/avg_value.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: avg_value.py # Tests: queries - average value # # Programmer: Hank Childs # Date: May 11, 2011 # # Modifications: # Kathleen Biagas, Wed Aug 28 09:04:00 MST 2019 # Turn off cycli...
23.301587
78
0.648501
e7727e49e50b32c3673e2019ab03d14f857e5777
156
py
Python
year_3/comppi_1/managers/admin.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
year_3/comppi_1/managers/admin.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
21
2020-03-24T16:26:04.000Z
2022-02-18T15:56:16.000Z
year_3/comppi_1/managers/admin.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import PubOrgRegistrant, PubOrgAdmin admin.site.register(PubOrgAdmin) admin.site.register(PubOrgRegistrant)
22.285714
49
0.846154
e7c5a5c46470c22157a361678d53ad8ec29ea4fa
9,049
py
Python
Packs/FeedSOCRadarThreatFeed/Integrations/FeedSOCRadarThreatFeed/FeedSOCRadarThreatFeed_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedSOCRadarThreatFeed/Integrations/FeedSOCRadarThreatFeed/FeedSOCRadarThreatFeed_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedSOCRadarThreatFeed/Integrations/FeedSOCRadarThreatFeed/FeedSOCRadarThreatFeed_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import io import json import pytest from CommonServerPython import DemistoException, CommandResults, FeedIndicatorType SOCRADAR_API_ENDPOINT = 'https://platform.socradar.com/api' def util_load_json(path): with io.open(path, mode='r', encoding='utf-8') as f: return json.loads(f.read()) def test_test_m...
35.210117
114
0.743508
4154c486ee740bc2e499457b9690f971386a1ad5
1,886
py
Python
SoSe-21/Uebung-5/A1-BMI-try-except.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
1
2022-03-23T09:40:39.000Z
2022-03-23T09:40:39.000Z
SoSe-21/Uebung-5/A1-BMI-try-except.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
SoSe-21/Uebung-5/A1-BMI-try-except.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
# Aufgabe 1 - Übung 5 # # Erweitern Sie das BMI-Programm aus der Vorlesung und geben Sie zusätzlich die folgende Interpretation aus: # BMI < 18.5 Untergewicht # BMI 18.5 - 24.9 Normalgewicht # BMI 25.0 - 29.9 Übergewicht # BMI > 30.0 Adipositas # # BMI = masse / (körpergröße zum quadrat in m) untergewicht = 18.5 norma...
32.517241
108
0.722163
ec241bd0c9d51af8f3b7a3c7354f8f3bc2c28de7
250
py
Python
PyStellar/stellar/Git/resources/git_sql.py
psgstellar/Stellar
947d4b3d9d6b9c74d4c9ebd29683793a8d86fad2
[ "Apache-2.0" ]
3
2021-01-24T17:07:55.000Z
2021-02-20T20:11:13.000Z
PyStellar/stellar/Git/resources/git_sql.py
psgstellar/Stellar
947d4b3d9d6b9c74d4c9ebd29683793a8d86fad2
[ "Apache-2.0" ]
61
2021-01-10T12:59:01.000Z
2021-06-24T09:19:20.000Z
PyStellar/stellar/Git/resources/git_sql.py
psgstellar/Stellar
947d4b3d9d6b9c74d4c9ebd29683793a8d86fad2
[ "Apache-2.0" ]
1
2021-01-14T05:23:32.000Z
2021-01-14T05:23:32.000Z
def git_user_owner_repo(): sql = """ SELECT username ,github_name ,github_token ,github_repo FROM psg_github """ return sql
22.727273
33
0.384
ec36fd8b2106feff47de3e2fed1939709557481f
3,045
py
Python
display/_dmx_buzzer_menu_view.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
display/_dmx_buzzer_menu_view.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
display/_dmx_buzzer_menu_view.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
from ._button_lights import ButtonLights from ._view import View from ._display import Display from config import DmxConfig address_cursor_value = 2 value_cursor_value = 3 min_cursor = address_cursor_value max_cursor = value_cursor_value class DmxBuzzerMenuView(View): _cursor = min_cursor _edit_mode = False...
32.741935
120
0.621675
ec43e8f9159e91ea501c32a241a398d3443f0e92
5,626
py
Python
Utils.py
Lynext/VordLraxx
fb63c2e3e1608d947981832349d32fffe222f3db
[ "MIT" ]
null
null
null
Utils.py
Lynext/VordLraxx
fb63c2e3e1608d947981832349d32fffe222f3db
[ "MIT" ]
1
2020-12-27T21:12:40.000Z
2022-03-17T00:08:47.000Z
Utils.py
Lynext/VordLraxx
fb63c2e3e1608d947981832349d32fffe222f3db
[ "MIT" ]
null
null
null
import Vars import Offsets from memorpy.WinStructures import PAGE_READWRITE import re from Player import Player from Bomb import Bomb import time def gTime (): return int(round(time.time() * 1000)) def reverseDir (dir): if dir == "left": return "right" if dir == "right": return "left" ...
31.430168
135
0.644685
ec44d3a9ab3f075271c930696f37b6a428fc2c67
1,295
py
Python
src/onegov/core/crypto/password.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/crypto/password.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/crypto/password.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from passlib.hash import bcrypt_sha256 def hash_password(password): """ The default password hashing algorithm used by onegov. Over time the underlying algorithm may change, at which point :meth:`verify_password` must issue a deprecation warning when using the old algorithm. Note that no salt is...
33.205128
78
0.726641
d41256f7687d97f0632978bbaaea1717d8a862cf
4,737
py
Python
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/scripts/annotate.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/annotate.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/annotate.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
""" annotate a file with the neearest features in another. %prog [options] if --upstream and --downstream are not specified only 2 colummns are added to the [a] file: nearest_name, nearest_distance. if they are specified upstream_names, downstream_names are specified. if --report-distance is included, the format ...
31.164474
78
0.625924
cf48c3a1881820e7cb8ad4c0e1c7f095acddab83
369
py
Python
session17/pylog.py
NeumannSven/pyshb_programmierkurs
518da3766dff36e938b36c49d410edb52c0cb32c
[ "MIT" ]
2
2019-10-26T12:47:05.000Z
2020-07-07T16:36:19.000Z
session17/pylog.py
NeumannSven/pyshb_programmierkurs
518da3766dff36e938b36c49d410edb52c0cb32c
[ "MIT" ]
null
null
null
session17/pylog.py
NeumannSven/pyshb_programmierkurs
518da3766dff36e938b36c49d410edb52c0cb32c
[ "MIT" ]
4
2020-02-28T13:43:05.000Z
2020-12-02T10:39:46.000Z
def logger(fn): def wrapper(*args, **kwargs): r = fn(*args, **kwargs) print(f"{fn.__name__} {args} {kwargs}-> {r}") return r return wrapper def html(tag): def tagfunc(fn): def wrapper(*args, **kwargs): r = fn(*args, **kwargs) return f"<{tag}>{r}</...
20.5
53
0.504065
d8549d1052c3270dc77d0aee70de66eeac8d04d0
1,062
py
Python
src/contours/contourf.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/contours/contourf.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/contours/contourf.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
# contourf import numpy as np import matplotlib.pyplot as plt origin = 'lower' delta = 0.025 x = y = np.arange(-3.0, 3.01, delta) X, Y = np.meshgrid(x, y) Z1 = np.exp(-X**2 - Y**2) Z2 = np.exp(-(X - 1)**2 - (Y - 1)**2) Z = (Z1 - Z2) * 2 nr, nc = Z.shape # put NaNs in one corner: Z[-nr // 6:, -nc // 6:] = np.nan #...
23.6
76
0.667608
994a146d06b1ea6d110f8bfc9564cddd08d1f37e
1,993
py
Python
brick/structure.py
xsank/bottle
4c228043ea31811fffd8eb30914d025c1fd43dc0
[ "MIT" ]
9
2015-01-06T01:32:43.000Z
2017-03-01T18:34:54.000Z
brick/structure.py
jude90/bottle
4c228043ea31811fffd8eb30914d025c1fd43dc0
[ "MIT" ]
null
null
null
brick/structure.py
jude90/bottle
4c228043ea31811fffd8eb30914d025c1fd43dc0
[ "MIT" ]
4
2015-02-05T09:48:43.000Z
2016-02-22T15:04:35.000Z
''' Created on 2013-4-21 @author: Xsank ''' from collections import MutableMapping as DictMixin class MultiDict(DictMixin): def __init__(self, *a, **k): self.dict = dict() for k, v in dict(*a, **k).iteritems(): self[k] = v def __len__(self): return len(self.dict) def __iter...
31.140625
109
0.654792
851e697b3dafbeabacb8e83b0f60404788f90170
446
py
Python
pvs_suban/urls.py
hackit90/django-invoices
770d5cffe7831539b885c517b0a435cc764e0a8c
[ "MIT" ]
null
null
null
pvs_suban/urls.py
hackit90/django-invoices
770d5cffe7831539b885c517b0a435cc764e0a8c
[ "MIT" ]
null
null
null
pvs_suban/urls.py
hackit90/django-invoices
770d5cffe7831539b885c517b0a435cc764e0a8c
[ "MIT" ]
null
null
null
from rest_framework.routers import DefaultRouter from .views import ContactApiView, InvoiceApiView, AddressApiView, InvoicePositionApiView, CountryApiView router = DefaultRouter() router.register("contacts", ContactApiView) router.register("invoices", InvoiceApiView) router.register("addresses", AddressApiView) route...
40.545455
106
0.840807
8fdee362e2278298efd23980d497af6ee976caed
4,009
py
Python
templates/utils/stationarity.py
BHouwens/kitchen_sink
bf881131320dea92a70e7141a77cfdea637da9d9
[ "MIT" ]
1
2021-06-09T08:44:32.000Z
2021-06-09T08:44:32.000Z
templates/utils/stationarity.py
BHouwens/kitchen_sink
bf881131320dea92a70e7141a77cfdea637da9d9
[ "MIT" ]
null
null
null
templates/utils/stationarity.py
BHouwens/kitchen_sink
bf881131320dea92a70e7141a77cfdea637da9d9
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from tqdm import tqdm from statsmodels.tsa.stattools import adfuller def find_min_d_FFD(df, corr_thres=.9, p_thres=.05, col="CLOSE", verbose=False): """ Finds the minimum `d` value that is close to the ADF critical value limit. Selects for the value against correlat...
28.635714
79
0.54677
71237033deccf85ec258e392555d11a619a5667c
3,226
py
Python
scripts/spreadsheet_to_resource_mds/util.py
moscowtimeNgD/opsecswag.github.io
8654d3d436095ddb399d80be53c893eb586544c9
[ "MIT" ]
32
2019-08-31T15:12:39.000Z
2021-12-28T09:21:31.000Z
scripts/spreadsheet_to_resource_mds/util.py
moscowtimeNgD/opsecswag.github.io
8654d3d436095ddb399d80be53c893eb586544c9
[ "MIT" ]
106
2019-10-27T07:30:44.000Z
2022-03-15T14:43:50.000Z
scripts/spreadsheet_to_resource_mds/util.py
moscowtimeNgD/opsecswag.github.io
8654d3d436095ddb399d80be53c893eb586544c9
[ "MIT" ]
14
2019-10-29T19:31:21.000Z
2022-01-31T22:44:47.000Z
#! /usr/bin/python3 #-*- coding: UTF-8 -*- import re import unidecode from goose3 import Goose GRAB_FIRST_TWO_SENTENCES_RE = '[.!?][\s]{1,2}(?=[A-Z])' REMOVE_SPECIAL_CHARACTERS_RE = '[^A-Za-z0-9]+' REMOVE_SPECIAL_CHARACTERS_KEEP_DASHES_RE = '[^A-Za-z0-9-]+' CLOSE_PAREN = ")" COLON = "&#58" COMMA = "," DASH = "-" EMP...
31.940594
110
0.66336
f102c3717a37c0fe2da85c124d03d4d2c74d9313
285
py
Python
models/medical_type.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
models/medical_type.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
null
null
null
models/medical_type.py
aroodooteam/aro_hr
bf26f026593493486b4b5c13b26b9b47b9fe3825
[ "BSD-2-Clause" ]
3
2017-09-11T08:02:11.000Z
2020-04-04T08:13:23.000Z
# -*- coding: utf-8 -*- from openerp import api, exceptions, fields, models class MedicalType(models.Model): _name = 'medical.type' _description = "Medical Type" name = fields.Char(string = 'Description', size=32) detail = fields.Text(string = 'Text sur document')
23.75
55
0.673684
f11f08e25fef45f76af91f471b3f6f7be7236eec
1,769
py
Python
.circleci/checklhe/particledata.py
tmartini/JHUGen
80da31668d7b7eb5b02bb4cac435562c45075d24
[ "Apache-2.0" ]
3
2015-06-08T13:09:28.000Z
2020-09-04T19:59:36.000Z
.circleci/checklhe/particledata.py
tmartini/JHUGen
80da31668d7b7eb5b02bb4cac435562c45075d24
[ "Apache-2.0" ]
64
2015-06-24T15:08:17.000Z
2022-01-25T04:59:32.000Z
.circleci/checklhe/particledata.py
tmartini/JHUGen
80da31668d7b7eb5b02bb4cac435562c45075d24
[ "Apache-2.0" ]
19
2015-05-04T22:15:41.000Z
2021-07-06T10:04:40.000Z
particlename = { 1: "d", 2: "u", 3: "s", 4: "c", 5: "b", 6: "t", 11: "e-", 12: "nue", 13: "mu-", 14: "numu", 15: "tau-", 16: "nu...
25.637681
101
0.267948
f18c330004ce89a9fc49155fd7e78caf027d227d
847
py
Python
10.3389/fevo.2021.762173/scripts/randomcopy_image.py
jqsunac/doi
c5912a40c7bfda8270e5d51fbdd82a9f0650bd23
[ "MIT" ]
null
null
null
10.3389/fevo.2021.762173/scripts/randomcopy_image.py
jqsunac/doi
c5912a40c7bfda8270e5d51fbdd82a9f0650bd23
[ "MIT" ]
null
null
null
10.3389/fevo.2021.762173/scripts/randomcopy_image.py
jqsunac/doi
c5912a40c7bfda8270e5d51fbdd82a9f0650bd23
[ "MIT" ]
null
null
null
import os import sys import glob import shutil if __name__ == '__main__': from_dpath = sys.argv[1] to_dpath = sys.argv[2] subset_id = int(sys.argv[3]) for d in sorted(glob.glob(os.path.join(from_dpath, '*'))): print(os.path.basename(d)) d_output_path = os.path.jo...
21.175
78
0.489965
2d013edb5f4be73585b3ec3f09fe6ada08efe40b
7,779
py
Python
packages/watchmen-pipeline-kernel/test/watchmen_pipeline_kernel_test/test_ask_from_storage.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-kernel/test/watchmen_pipeline_kernel_test/test_ask_from_storage.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-kernel/test/watchmen_pipeline_kernel_test/test_ask_from_storage.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from decimal import Decimal from typing import Tuple from unittest import TestCase from pydantic import BaseModel from watchmen_auth import PrincipalService from watchmen_data_kernel.storage_bridge import parse_condition_for_storage, PipelineVariables from watchmen_data_kernel.storage_bridge.ask_from_storage import P...
37.946341
117
0.769508
ebdbbeca29f30ff27398a0153c7b8ea013c9cfe6
16,660
py
Python
app-backend/tests/test_stakeholder.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
null
null
null
app-backend/tests/test_stakeholder.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
1
2019-03-12T13:35:46.000Z
2019-03-12T13:35:46.000Z
app-backend/tests/test_stakeholder.py
MarlonSchultz/SHM
f9082afb34d41ba20de564939c2e7de0caed907e
[ "MIT" ]
1
2019-03-15T13:29:57.000Z
2019-03-15T13:29:57.000Z
from sqlalchemy.exc import OperationalError, ProgrammingError from unittest import mock from app import app_object import app import unittest class MockDatabaseModelResult: def __init__(self): self.results = [] def all(self): return self.results def _db_session_add_side_effect(project): ...
48.571429
119
0.657983
d693739febf256d4c38e2abd57a937e8455540e3
33,761
py
Python
modules/calculations.py
metxchris/MMM-Explorer
251b4d7af56241882611bc47e94ec2923e4be8da
[ "MIT" ]
null
null
null
modules/calculations.py
metxchris/MMM-Explorer
251b4d7af56241882611bc47e94ec2923e4be8da
[ "MIT" ]
null
null
null
modules/calculations.py
metxchris/MMM-Explorer
251b4d7af56241882611bc47e94ec2923e4be8da
[ "MIT" ]
null
null
null
"""Calculates variable values Variable Classifications: * Base variable: A non-gradient variable that is either used as input to MMM, or is needed to calculate an MMM input variable. Base variables do not depend on values of gradient or additional variables. * Gradient variable: A variable that is a normalized gr...
26.901195
118
0.685229
30788591dfdfa602268a4eb716fd606c684ef521
444
py
Python
pythonProj/FZPython/taskCenter/mockStock.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/taskCenter/mockStock.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
null
null
null
pythonProj/FZPython/taskCenter/mockStock.py
iHamburg/FZQuant
86b750ec33d01badfd3f324d6f1599118b9bf8ff
[ "MIT" ]
2
2019-04-10T10:05:00.000Z
2021-11-24T17:17:23.000Z
""" 模拟每3秒显示一次估价 """ import json import time import random from kafka import KafkaProducer # from kafka.errors import KafkaError producer = KafkaProducer(bootstrap_servers=['111.230.131.15:9092'], value_serializer=lambda m: json.dumps(m).encode('utf-8'), api_version=(0,10)) while True: ...
19.304348
102
0.662162
9dd4b04a287ad128e1ad750cd6ecf94c66d649a8
93
py
Python
website/apps/uploader/admin.py
stahlnow/stahlnow
265dd46c54f68173071d1c86218201d6e618ceeb
[ "MIT" ]
1
2017-03-14T08:08:31.000Z
2017-03-14T08:08:31.000Z
website/apps/uploader/admin.py
stahlnow/stahlnow
265dd46c54f68173071d1c86218201d6e618ceeb
[ "MIT" ]
null
null
null
website/apps/uploader/admin.py
stahlnow/stahlnow
265dd46c54f68173071d1c86218201d6e618ceeb
[ "MIT" ]
null
null
null
from uploader.models import File from django.contrib import admin admin.site.register(File)
18.6
32
0.827957
d1a0359181f5f6aad7e455275029715b500a52dc
1,911
py
Python
Utils/MatlabWhistleDetection/python/resample_wav.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/MatlabWhistleDetection/python/resample_wav.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/MatlabWhistleDetection/python/resample_wav.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import os import sys import getopt from shutil import copyfile """ Extracts the audio from our game videos. This script expects that ffmpeg is installed and in the PYTHONPATH. Usage: python extract_wav.py -i <path_to_folder_where_mp4_files_are> """ def parse_arguments(argv): input_path = '' try: ...
28.102941
111
0.576138
d1d295a9062a09b90839b9d44b5c09781ef46eb8
1,612
py
Python
gemtown/gems/serializers.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/gems/serializers.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/gems/serializers.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
from rest_framework import serializers from . import models from gemtown.users import models as user_models import time class TimestampField(serializers.Field): def to_representation(self, value): return int(time.mktime(value.timetuple())) class UserSerializer(serializers.ModelSerializer): class M...
25.587302
64
0.562655
ae5c8fedc83169c6ed53002df1bbefc3287c9a72
3,106
py
Python
examples/relationship/manytomanyfield/models.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
5
2020-07-14T07:48:10.000Z
2021-12-20T21:20:10.000Z
examples/relationship/manytomanyfield/models.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
7
2021-03-26T03:13:38.000Z
2022-03-12T00:42:03.000Z
examples/relationship/manytomanyfield/models.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
1
2021-02-16T07:04:25.000Z
2021-02-16T07:04:25.000Z
from django.db import models # CREATE TABLE `manytomanyfield_publication` ( -- Django 建表语句 # `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, # `title` varchar(30) NOT NULL # ); # # CREATE TABLE `manytomanyfield_publication` ( ...
45.014493
115
0.653574
ee3dc7a45829c1837e8e2efca5da1b2d981ef25e
3,247
py
Python
database/models.py
shyorange/MovieWebsite
aaf3be332b9f944ea93fbd841e1758b4a11d4581
[ "Apache-2.0" ]
null
null
null
database/models.py
shyorange/MovieWebsite
aaf3be332b9f944ea93fbd841e1758b4a11d4581
[ "Apache-2.0" ]
null
null
null
database/models.py
shyorange/MovieWebsite
aaf3be332b9f944ea93fbd841e1758b4a11d4581
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # __author__ : "shyorange" # __date__ : 2018/12/18 import math; import pymysql; from pymysql.cursors import DictCursor class Dytt: def __init__(self): self.conn = pymysql.Connection(host="localhost",port=3306,user="root",password="root",db="firstdb",cursorclass=DictCursor); self.c...
34.913978
179
0.592239
c9c74f8658fbce6b4b63a0001d161aa330596f4c
1,343
py
Python
dict2xml.py
Berni1557/MDDoc
06dd3cae302e6f125ebfbb2fc513bb754d72f07d
[ "BSD-3-Clause" ]
null
null
null
dict2xml.py
Berni1557/MDDoc
06dd3cae302e6f125ebfbb2fc513bb754d72f07d
[ "BSD-3-Clause" ]
null
null
null
dict2xml.py
Berni1557/MDDoc
06dd3cae302e6f125ebfbb2fc513bb754d72f07d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from xml.dom.minidom import Document from xml.dom.minidom import parse, parseString def iterate_children(parent): child = parent.firstChild while child != None: yield child child = child.nextSibling class dict2xml(object): doc = Document() Vmap = di...
27.979167
54
0.565153
4edc948f60e5ee55a9d967c42aa547ca5a264292
1,191
py
Python
Hackerrank_problems/ElectronicShop/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
Hackerrank_problems/ElectronicShop/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
Hackerrank_problems/ElectronicShop/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
#!/bin/python3 import os import sys # #You will get the money spent between the keyboard and the usb and sum it if it is less than the budget it will return the price spent def getMoneySpent(keyboards, drives, b): spend = -1 #Check each cost of each keyboard with that of each usb will sum them until some result ...
27.697674
134
0.649034
01468c7abc97a57536bd5f3138f31804ad099bb3
267
py
Python
pacman-termux/test/pacman/tests/query003.py
Maxython/pacman-for-termux
3b208eb9274cbfc7a27fca673ea8a58f09ebad47
[ "MIT" ]
23
2021-05-21T19:11:06.000Z
2022-03-31T18:14:20.000Z
source/pacman-6.0.1/test/pacman/tests/query003.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
11
2021-05-21T12:08:44.000Z
2021-12-21T08:30:08.000Z
source/pacman-6.0.1/test/pacman/tests/query003.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Query search for a package" p = pmpkg("foobar") p.files = ["bin/foobar"] p.groups = ["group1", "group2"] self.addpkg2db("local", p) self.args = "-Qs %s" % p.name self.addrule("PACMAN_RETCODE=0") self.addrule("PACMAN_OUTPUT=^local/%s" % p.name)
22.25
48
0.670412
0150754e77c4d18aaf12ccbc46e7d6cb7a084e10
949
py
Python
elements/python/7/14/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/7/14/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/7/14/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
A = 0x5062146fc7303a6b MASK = 0xffffffffffffffff def h(s): """ Computes a 64-bit hash of the string s. """ H = 0 for c in s: H = (A*H + ord(c)) & MASK return H def strings_equal(S, T): return all([s == t for s, t in map(None, S, T)]) def find(needle, haystack): n = len(need...
19.367347
82
0.562698
09882b4d744725b99ecddd602b538cf6ec4426a0
408
py
Python
src/common/interfaces.py
AakashMallik/cnn-firefly
6c8ed58a035e62682263753436b124cb979ed240
[ "MIT" ]
null
null
null
src/common/interfaces.py
AakashMallik/cnn-firefly
6c8ed58a035e62682263753436b124cb979ed240
[ "MIT" ]
7
2020-11-27T12:24:31.000Z
2020-11-29T09:41:09.000Z
src/common/interfaces.py
AakashMallik/cnn-firefly
6c8ed58a035e62682263753436b124cb979ed240
[ "MIT" ]
null
null
null
from abc import ABC, abstractclassmethod class FactoryInterface(ABC): lookup_table = {} @abstractclassmethod def generate(cls, config={}, options={}): """generate the required pytorch object Args: config (dict, optional): config object. Defaults to {}. options (di...
27.2
98
0.639706
09a78ed3ca6df26f251c36772590ea65a1dbfacd
451
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v8_0/delete_schools_depricated_doctypes.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
frappe-bench/apps/erpnext/erpnext/patches/v8_0/delete_schools_depricated_doctypes.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v8_0/delete_schools_depricated_doctypes.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2017, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): """ delete doctypes """ if frappe.db.exists("DocType", "Grading Structure"): frappe.delete_doc("DocType", "Grading...
32.214286
71
0.740576
11435f672717b1286baa57e88b1a60150c0c1175
810
py
Python
src/main/java/ch/hslu/AD/SW11/EBNF/grammer_05.py
hslu-students/AD-Exercise
d39836e703dadfba61016f0ab5a3991ae250ae15
[ "MIT" ]
2
2018-02-24T08:13:32.000Z
2019-02-19T11:59:41.000Z
src/main/java/ch/hslu/AD/SW11/EBNF/grammer_05.py
hslu-students/AD-Exercise
d39836e703dadfba61016f0ab5a3991ae250ae15
[ "MIT" ]
null
null
null
src/main/java/ch/hslu/AD/SW11/EBNF/grammer_05.py
hslu-students/AD-Exercise
d39836e703dadfba61016f0ab5a3991ae250ae15
[ "MIT" ]
1
2017-05-06T08:48:38.000Z
2017-05-06T08:48:38.000Z
""" Grammer for language in SW11-4-d """ import colorful import lark __GRAMMER__ = """ start: sprache sprache: vorspann "11" nachspann vorspann: ["01"("0")*] nachspann: ("0"["00"|"11"])* """ __WORDS__ = [ '11', '01110', '01111', '01011010', '0111000', '1100', '0011', '01001111' ] ...
16.875
69
0.566667
a31ede4cb274bae1d229a34b354afe771e991065
83
py
Python
examples/nowcoder/SQL1/apps.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
5
2020-07-14T07:48:10.000Z
2021-12-20T21:20:10.000Z
examples/nowcoder/SQL1/apps.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
7
2021-03-26T03:13:38.000Z
2022-03-12T00:42:03.000Z
examples/nowcoder/SQL1/apps.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
1
2021-02-16T07:04:25.000Z
2021-02-16T07:04:25.000Z
from django.apps import AppConfig class Sql1Config(AppConfig): name = 'SQL1'
13.833333
33
0.73494
6625d6bca7ae41533551c4c50cad15192bc660e9
134
py
Python
elements/python/16/3/test.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/16/3/test.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/16/3/test.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
import permutations def main(): x = [2, 3, 5, 7] permutations.print_permutations(x) if __name__ == '__main__': main()
12.181818
38
0.619403
b07a8ed1059d1929df117716da3282ecb7c0fa87
449
py
Python
NahamCon/2021/web/AgentTester/app/backend/models.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
NahamCon/2021/web/AgentTester/app/backend/models.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
NahamCon/2021/web/AgentTester/app/backend/models.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(40), unique=True) email = db.Column(db.String(100), unique=True) password = db.Column(db.String(1000), unique=False) about = db.Column(db.Str...
24.944444
55
0.679287
b0e29e1164b24b16e7620cfb8444455c50093df1
343
py
Python
Exercicios/ex09-1.py
BoltzBit/LP
f84d36d1bdee9a20c197cebec2810234c5311fb8
[ "MIT" ]
null
null
null
Exercicios/ex09-1.py
BoltzBit/LP
f84d36d1bdee9a20c197cebec2810234c5311fb8
[ "MIT" ]
null
null
null
Exercicios/ex09-1.py
BoltzBit/LP
f84d36d1bdee9a20c197cebec2810234c5311fb8
[ "MIT" ]
null
null
null
#calculo de média de 4 notas numeroNotas = int(input('Insira a quantidade de notas: ')) somaNotas = 0 for nota in range(numeroNotas): nota_aluno = int(input('Insira a {0}ª nota do aluno: '.format(nota+1))) somaNotas += nota_aluno mediaNotas = somaNotas/numeroNotas msg = 'A media do aluno é {0}' print(m...
22.866667
75
0.699708
b0f7ec7718c16552dd1d244873bc8ebae7c12c9f
527
py
Python
util/log.py
HerbLee/sanicweb
f5177ca715ed704ebceffdd59710406b2659c514
[ "Apache-2.0" ]
null
null
null
util/log.py
HerbLee/sanicweb
f5177ca715ed704ebceffdd59710406b2659c514
[ "Apache-2.0" ]
null
null
null
util/log.py
HerbLee/sanicweb
f5177ca715ed704ebceffdd59710406b2659c514
[ "Apache-2.0" ]
null
null
null
# @time : 2020/7/12 18:30 # @author : HerbLee # @file : log.py import logging import os apath = os.path.abspath(".") log = logging.getLogger(__name__) log.setLevel(level=logging.INFO) handler = logging.FileHandler("{}/log/log.txt".format(apath)) handler.setLevel(logging.INFO) formatter = logging.Formatter('...
18.821429
85
0.717268
3c4399ca8f80bc41be39c3dac2c08743a04a2aa7
1,247
py
Python
example/kafka_kafka_worker.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
8
2022-02-24T14:59:24.000Z
2022-03-31T04:37:55.000Z
example/kafka_kafka_worker.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
3
2022-02-27T17:08:52.000Z
2022-03-18T13:11:01.000Z
example/kafka_kafka_worker.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
2
2022-02-24T15:03:07.000Z
2022-03-15T03:12:00.000Z
import logging from typing import List, Tuple from example.data_models import InputMessage, KafkaKafkaOutput from volley import Engine logging.basicConfig(level=logging.INFO) CONSUMER_GROUP = "kafka.kafka.worker" INPUT_TOPIC = "localhost.kafka.kafka.input" OUTPUT_TOPIC = "localhost.kafka.kafka.output" queue_config ...
23.980769
74
0.667201
3c988c5c10ea0b688a40ac89dc6a9575104170ad
669
py
Python
Python/numpy/np_verbinden.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/numpy/np_verbinden.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/numpy/np_verbinden.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
import numpy as np np.set_printoptions(suppress=True) v = np.array([2, 4, 6]) w = np.array([1, 3, 5]) print(np.row_stack((v, w))) print(np.column_stack((v, w))) # sich selbst stacken: print(np.row_stack((v, v, v))) A = np.array([[1, 2], [3, 4], ]) B = np.array([[6, 7], [8, 9], ]) print(np.row_...
17.605263
47
0.557549
598601a910975e6f06023d305c9192e8bb4a6b0a
3,634
py
Python
research/hpc/deepbsde/src/equation.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/hpc/deepbsde/src/equation.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/hpc/deepbsde/src/equation.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.609524
119
0.644469
59a45b239ca88550757987f0f42bc6e5cf5af806
9,477
py
Python
DCWGAN.py
1486342897/Wasserstein-GAN
1cf756b6143b01cc0180f4086cb2c4e126b97de6
[ "MIT" ]
null
null
null
DCWGAN.py
1486342897/Wasserstein-GAN
1cf756b6143b01cc0180f4086cb2c4e126b97de6
[ "MIT" ]
null
null
null
DCWGAN.py
1486342897/Wasserstein-GAN
1cf756b6143b01cc0180f4086cb2c4e126b97de6
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Aug 7 15:11:57 2017 @author: liuy """ from __future__ import print_function import tensorflow as tf import utils as utils import glob import os import numpy as np import time class DCWGAN(object): def __init__(self, data_dir, sample_dir, real_dir...
47.623116
116
0.536773
75b4c0ec6dec439ba73f43158a4e1f2fd3ae226c
400
py
Python
Algorithms/Strings/string_construction.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Algorithms/Strings/string_construction.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Algorithms/Strings/string_construction.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/string-construction/problem?h_r=internal-search # s = 'abcabc' # s = 'abcd' s = 'abc' p = '' n = len(s) # append each letter to p and charge 1 dollar # if s substring is in the p then simply append to p substring = sorted(list(set(list(set(s)) + [s[:i] for i in range(1,n)] + [s]...
23.529412
87
0.6425
ddb9fa9b85e8deef086da926f6a713822d065af7
996
py
Python
0014longest-common-prefix.py
meat00/my-leetcode-python
8312de396b29e1d6dd54a65f87fa0511eb400faa
[ "MIT" ]
null
null
null
0014longest-common-prefix.py
meat00/my-leetcode-python
8312de396b29e1d6dd54a65f87fa0511eb400faa
[ "MIT" ]
null
null
null
0014longest-common-prefix.py
meat00/my-leetcode-python
8312de396b29e1d6dd54a65f87fa0511eb400faa
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- class Solution: def longestCommonPrefix(self, strs) -> str: if not strs: return str() prefix = strs[0] prefix_len = len(prefix) for s in strs[1:]: i = 0 cur_prefix_len = 0 while i < prefix...
27.666667
75
0.426707
fb31742ec00ace1e6ccc3b68a194fec533769d34
700
py
Python
Problems/Depth-First Search/easy/InvertBinaryTree/invert_binary_tree.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Depth-First Search/easy/InvertBinaryTree/invert_binary_tree.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Depth-First Search/easy/InvertBinaryTree/invert_binary_tree.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import Optional # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right # Recursive def invertTree(root: Optional[TreeNode]) -> Optional[TreeNode]: if not root: return...
26.923077
76
0.627143
fd0456dcc7840b3a6ade383f95aeb5d91f4f45da
225,933
py
Python
DHParser/ebnf.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
2
2020-12-25T19:37:42.000Z
2021-03-26T04:59:12.000Z
DHParser/ebnf.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
6
2018-08-07T22:48:52.000Z
2021-10-07T18:38:20.000Z
DHParser/ebnf.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
null
null
null
# ebnf.py - EBNF -> Python-Parser compilation for DHParser # # Copyright 2016 by Eckhart Arnold (arnold@badw.de) # Bavarian Academy of Sciences an Humanities (badw.de) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. ...
47.857022
714
0.619516
fd248b09ac8cd871cdc9113ca88f19a4d0606a69
195
py
Python
AP_SS16/US3/python_custom_scripts/regression.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
3
2016-04-27T17:07:00.000Z
2022-02-02T15:43:15.000Z
AP_SS16/US3/python_custom_scripts/regression.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
5
2016-04-27T17:10:03.000Z
2017-06-20T14:54:20.000Z
AP_SS16/US3/python_custom_scripts/regression.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
null
null
null
import numpy as np def reg_linear (x, m, b): return m*x + b def reg_quadratic (x, a, x0, c): return a*(x-x0)**2 + c def reg_cubic (x, a, b, c, d): return a*x**3 + b*x**2 + c*x + d
17.727273
36
0.538462
fd421cd69ef8e93d1216da0742498035745823b8
328
py
Python
app/config/secure_demo.py
zucc-acm-devteam/zuccacm-sso
9c7d2f0b9cc069962f32b555152732a98bf2e94a
[ "Apache-2.0" ]
null
null
null
app/config/secure_demo.py
zucc-acm-devteam/zuccacm-sso
9c7d2f0b9cc069962f32b555152732a98bf2e94a
[ "Apache-2.0" ]
null
null
null
app/config/secure_demo.py
zucc-acm-devteam/zuccacm-sso
9c7d2f0b9cc069962f32b555152732a98bf2e94a
[ "Apache-2.0" ]
null
null
null
# 定义数据库信息 SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://username:password@ip:port/acmsso?charset=utf8mb4' SQLALCHEMY_TRACK_MODIFICATIONS = False # 定义flask信息 SECRET_KEY = 'secretkey' SESSION_COOKIE_NAME = 'sso-session' SESSION_COOKIE_SAMESITE = 'None' SESSION_COOKIE_SECURE = True # 定义redis信息 REDIS_URL = 'redis://127.0.0....
25.230769
92
0.795732
20fb3c6a174f49cfb2f0d1ed3273839218df5c03
2,276
py
Python
WikiAnalyser/footballMatchAnalyzer/footballStatElement.py
Simocracy/PwrBot
feac80393072f3c79e1978466c54c84a4e74ff85
[ "MIT" ]
null
null
null
WikiAnalyser/footballMatchAnalyzer/footballStatElement.py
Simocracy/PwrBot
feac80393072f3c79e1978466c54c84a4e74ff85
[ "MIT" ]
null
null
null
WikiAnalyser/footballMatchAnalyzer/footballStatElement.py
Simocracy/PwrBot
feac80393072f3c79e1978466c54c84a4e74ff85
[ "MIT" ]
null
null
null
class FootballStatElement: """Gesamtstatistik für einen Gegner""" name = "" flag = "" year = 0 matches = [] preComment = ""; postComment = ""; @property def played(self): return self.win + self.drawn + self.lose win = 0 drawn = 0 lose = 0 goalsFor = 0 goalsAgainst = 0 @property def goalsDiff(self...
26.16092
143
0.635325
85dbf47b1dee050ddd8351114dc282aca0308a00
4,572
py
Python
DBSCAN/src/dbscan.py
quqixun/MLAlgorithms
1ad46a899a6280a08c196fb4eb0931408c8636c7
[ "MIT" ]
2
2018-04-25T18:00:28.000Z
2018-08-08T09:39:18.000Z
DBSCAN/src/dbscan.py
quqixun/MLAlgorithms
1ad46a899a6280a08c196fb4eb0931408c8636c7
[ "MIT" ]
null
null
null
DBSCAN/src/dbscan.py
quqixun/MLAlgorithms
1ad46a899a6280a08c196fb4eb0931408c8636c7
[ "MIT" ]
2
2019-03-03T02:55:48.000Z
2021-01-21T04:50:46.000Z
# Conventional Machine Learning Algorithms # Class of "DBSCAN". # Author: Qixun Qu # Create on: 2018/06/13 # Modify on: 2018/06/16 # ,,, ,,, # ;" '; ;' ", # ; @.ss$$$$$$s.@ ; # `s$$$$$$$$$$$$$$$' # $$$$$$$$$$$$$$$$$$ # $$$$P""Y$$$Y""W$$$$$ # $$$$ p"$$$"q $$$$$ # $$$$ .$$$$$. $$$$' ...
24.319149
71
0.464348
c073b68a51b7d6f56e6463f349d7ac1353a0b64f
1,172
py
Python
packages/watchmen-rest/src/watchmen_rest/util/raise_http_exception.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest/src/watchmen_rest/util/raise_http_exception.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest/src/watchmen_rest/util/raise_http_exception.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from logging import getLogger from typing import Any, Optional from fastapi import HTTPException from starlette import status from watchmen_utilities import is_not_blank logger = getLogger(__name__) def raise_400(detail: Any) -> None: raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=detail) d...
28.585366
112
0.788396
c8d8e3fbd45f4b187eb8c85bea70cc17a3cb500b
1,524
py
Python
python/geodesy.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
python/geodesy.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
python/geodesy.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
"""This module contain a few function relevant when dealing with geodesy — also known as geodetics or geodetics engineering — a branch of applied mathematics and earth sciences, is the scientific discipline that deals with the measurement and representation of the Earth""" import math def DistMidLatLong(FoLat, FoLng,...
39.076923
147
0.678478
c8fdd96a4d297a7109bc003d7d3233a2654255bf
41,557
py
Python
Cortex-M_Implementation_KEM/Cortex-M4/src/saber/m4-striding/generate-multiplication.py
KULeuven-COSIC/SABER
50357b5e75701b1d16bfc4dc2032b8925dbe1382
[ "Unlicense" ]
34
2019-02-15T05:11:49.000Z
2022-03-23T08:00:29.000Z
Cortex-M_Implementation_KEM/Cortex-M4/src/m4-striding/generate-multiplication.py
cothan/SABER
4743134da0e4a695491b6c2de60e17f21d2d241f
[ "Unlicense" ]
8
2020-04-09T12:33:42.000Z
2022-03-07T20:08:41.000Z
Cortex-M_Implementation_KEM/Cortex-M4/src/m4-striding/generate-multiplication.py
cothan/SABER
4743134da0e4a695491b6c2de60e17f21d2d241f
[ "Unlicense" ]
10
2020-03-09T15:09:50.000Z
2022-03-23T08:00:18.000Z
#!/usr/bin/env python3 import sys from functools import wraps from math import ceil, floor from collections import defaultdict def toomcook_256(pntA, pntB, pntC): instructions = toomcook_256_64(pntA, pntB, pntC) for ins in instructions: yield ins def toomcook_256_64(pntA, pntB, pntC): r0 = "r4"; r1 = "r5"; r2 ...
33.51371
102
0.529369
cdaf28efec7b0eca0e61e7658ad6d7491bad0070
16,259
py
Python
src/onegov/ballot/models/election/proporz_election.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/ballot/models/election/proporz_election.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/ballot/models/election/proporz_election.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from collections import OrderedDict from itertools import groupby from onegov.ballot.models.election.candidate import Candidate from onegov.ballot.models.election.candidate_result import CandidateResult from onegov.ballot.models.election.election import Election from onegov.ballot.models.election.election_result import...
36.785068
79
0.623901
b525e167aba4d8f997b28b58a949be2f96c274ae
1,229
py
Python
IVTa/2014/AMETOVA_M_M/task_7_49.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/AMETOVA_M_M/task_7_49.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/AMETOVA_M_M/task_7_49.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 7. Вариант 49. # Разработайте систему начисления очков для задачи 6, # в соответствии с которой игрок получал бы большее # количество баллов за меньшее количество попыток. # Ametova M. # 20.05.2016 import random print('Угадайте ранг!') mans = tuple('''Генерал-фельдмаршал Адмирал Генерал-лейтенант Генерал...
20.483333
62
0.604557
f542cb199bbeab9cfa0ac26d558747b87f38ce8b
924
py
Python
verto/utils/HtmlSerializer.py
uccser/verto
d36aa88b208f1700fafc033679bd1e9775496d25
[ "MIT" ]
4
2017-04-10T06:09:54.000Z
2019-05-04T02:07:40.000Z
verto/utils/HtmlSerializer.py
uccser/verto
d36aa88b208f1700fafc033679bd1e9775496d25
[ "MIT" ]
268
2017-04-03T20:40:46.000Z
2022-02-04T20:10:08.000Z
verto/utils/HtmlSerializer.py
uccser/kordac
d36aa88b208f1700fafc033679bd1e9775496d25
[ "MIT" ]
1
2019-01-07T15:46:31.000Z
2019-01-07T15:46:31.000Z
from markdown.util import etree import re class HtmlSerializer(object): '''Converts an element tree object which is HTML into a string. ''' COMMENT_PATTERN = r'<!--(?P<start_condition>.*?)&gt;(?P<content>.*?)&lt;!(?P<end_condition>.*?)-->' @staticmethod def tostring(root): '''Convert...
30.8
103
0.593074
19762f68609ce923d858bb687b785593b15b1e72
13,794
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/metrics/vos_metric.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/metrics/vos_metric.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/metrics/vos_metric.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-24T16:27:01.000Z
2022-01-24T16:27:01.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
49.797834
117
0.497608