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
cae99fd12f2f7241fbe77f8b4256fe9f446d8815
753
py
Python
teams/team_snapback/basic_video_stream.py
AbinMM/PYNQ_Hackathon_2017
711c75e8590b02f313295cef712188691690c948
[ "BSD-3-Clause" ]
19
2017-10-08T03:18:38.000Z
2020-07-07T02:34:18.000Z
teams/team_snapback/basic_video_stream.py
AbinMM/PYNQ_Hackathon_2017
711c75e8590b02f313295cef712188691690c948
[ "BSD-3-Clause" ]
2
2017-10-08T03:15:10.000Z
2017-10-10T16:10:32.000Z
teams/team_snapback/basic_video_stream.py
AbinMM/PYNQ_Hackathon_2017
711c75e8590b02f313295cef712188691690c948
[ "BSD-3-Clause" ]
28
2017-10-07T23:24:36.000Z
2022-03-29T08:03:40.000Z
#!/usr/bin/python3.6 from pynq.overlays.base import BaseOverlay from pynq.lib.video import * import numpy as np import cv2 base = BaseOverlay("base.bit") frame_w = 640 frame_h = 480 Mode = VideoMode(frame_w, frame_h, 24) hdmi_out = base.video.hdmi_out hdmi_out.configure(Mode, PIXEL_BGR) hdmi_out.start() cap = cv...
20.916667
61
0.706507
1b5ce490513b6ad709cda2efbb2a72baec05bfe0
5,003
py
Python
0-newbooks/bitcoin_prediction/future_virtual_trading.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-05-10T09:16:23.000Z
2019-05-10T09:16:23.000Z
0-newbooks/bitcoin_prediction/future_virtual_trading.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
null
null
null
0-newbooks/bitcoin_prediction/future_virtual_trading.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-10-14T07:30:18.000Z
2019-10-14T07:30:18.000Z
from math import sqrt from numpy import concatenate from matplotlib import pyplot import pandas as pd from datetime import datetime from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import LabelEncoder from sklearn.metrics import mean_squared_error from keras.models import Sequential from keras....
32.699346
199
0.694183
1b78b8e99c31cbd7f48a4d4ddd5f5165be98c892
1,502
py
Python
meerkat_consul/authenticate.py
meerkat-code/meerkat_consul
983851b360f330ad258e15d45d98251e0fe21100
[ "MIT" ]
null
null
null
meerkat_consul/authenticate.py
meerkat-code/meerkat_consul
983851b360f330ad258e15d45d98251e0fe21100
[ "MIT" ]
1
2018-07-18T16:36:12.000Z
2018-07-18T16:36:12.000Z
meerkat_consul/authenticate.py
fjelltopp/meerkat_consul
983851b360f330ad258e15d45d98251e0fe21100
[ "MIT" ]
null
null
null
import os import backoff import requests from meerkat_consul import app, logger from meerkat_libs import authenticate filename = os.environ.get('MEERKAT_AUTH_SETTINGS') exec(compile(open(filename, "rb").read(), filename, 'exec')) CONSUL_AUTH_USERNAME = os.environ.get('CONSUL_AUTH_USERNAME', 'consul-dev-user') CONSU...
32.652174
80
0.630493
1b7d38fed7d61eaf9907654f0cbaba82acc50b36
2,630
py
Python
code/01_phenotype_engineering/CCU013_00_helper_functions.py
BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping
83afef23f96c7b31fef64c6f735737d1afa3082d
[ "Apache-2.0" ]
null
null
null
code/01_phenotype_engineering/CCU013_00_helper_functions.py
BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping
83afef23f96c7b31fef64c6f735737d1afa3082d
[ "Apache-2.0" ]
null
null
null
code/01_phenotype_engineering/CCU013_00_helper_functions.py
BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping
83afef23f96c7b31fef64c6f735737d1afa3082d
[ "Apache-2.0" ]
null
null
null
# Databricks notebook source ### 1. Sam Hollings # Functions to create and drop (separate) a table from a pyspark data frame # Builds delta tables to allow for optimisation # Modifies owner to allow tables to be dropped def create_table(table_name:str, database_name:str='dars_nic_391419_j3w9t_collab', select_sql_script...
38.676471
139
0.741065
1ba16624c2ee7e4f383a1ed5eba621e8b3676aae
9,390
py
Python
thwin2icalendar.py
real-or-random/thwin2icalendar
6760943302e103c5b559d7dd05b5aa9a31425124
[ "CC0-1.0" ]
1
2021-04-05T19:45:19.000Z
2021-04-05T19:45:19.000Z
thwin2icalendar.py
real-or-random/thwin2icalendar
6760943302e103c5b559d7dd05b5aa9a31425124
[ "CC0-1.0" ]
1
2016-04-06T11:52:27.000Z
2016-04-12T20:10:12.000Z
thwin2icalendar.py
real-or-random/thwin2icalendar
6760943302e103c5b559d7dd05b5aa9a31425124
[ "CC0-1.0" ]
1
2021-09-10T13:53:39.000Z
2021-09-10T13:53:39.000Z
#!/usr/bin/env python """ THWin2iCalendar - Converts CSV output from THWin to an iCalendar Written in 2015-2019 by Tim Ruffing <tim@timruffing.de> To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This soft...
30.290323
211
0.646432
84cc37221bfb6199768d4d7d4f353c5cc3e51543
623
py
Python
数据结构/NowCode/LeetCode/189_rotate.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
null
null
null
数据结构/NowCode/LeetCode/189_rotate.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
3
2020-08-14T07:50:27.000Z
2020-08-14T08:51:06.000Z
数据结构/NowCode/LeetCode/189_rotate.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
2
2021-03-14T05:58:45.000Z
2021-08-29T17:25:52.000Z
class Solution(object): # def rotate(self, nums, k): # arrLen = len(nums) # if k == arrLen: # return nums # arr=[0 for i in range(arrLen)] # for index in range(arrLen): # newIndex = (index + k) % arrLen # arr[newIndex] = nums[index] # retur...
27.086957
48
0.492777
ca481256ede734ddf7645f71b7c600edf0370d79
1,519
py
Python
128/tuwulisu_128_unionFind.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
128/tuwulisu_128_unionFind.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
128/tuwulisu_128_unionFind.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
class Solution: def find(self, node): if node[0]!=node[3]: group_node = self.find(self.nodes[node[0]]) node[0] = group_node[0] return group_node else: return node def merge(self, node1, node2): node1 = self.find(node1) node2 = ...
29.784314
72
0.459513
048aba89c057a5ed68533f53fd735807f8c9650f
558
py
Python
Tutorials/30_days_of_code/Let's Review.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Tutorials/30_days_of_code/Let's Review.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
Tutorials/30_days_of_code/Let's Review.py
vinayvinu500/Hackerrank
e185ae9d3c7dc5cd661761142e436f5df6a3f0f1
[ "MIT" ]
null
null
null
# Enter your code here. Read input from STDIN. Print output to STDOUT # https://www.hackerrank.com/challenges/30-review-loop/problem?h_r=internal-search # user input n = int(input()) arr = [input() for i in range(n)] out = [] e = '' o = '' inp = '' for i in arr: for ind, val in enumerate(i): if ind % 2 == ...
16.411765
82
0.508961
6d2356010bd511dd60d29320fc34a4192f2959de
1,938
py
Python
transformer/Transformer.py
DragonYong/Sklearn
b604c4bc41ecfa5c10613f713d6ca5c73214c07c
[ "Apache-2.0" ]
null
null
null
transformer/Transformer.py
DragonYong/Sklearn
b604c4bc41ecfa5c10613f713d6ca5c73214c07c
[ "Apache-2.0" ]
null
null
null
transformer/Transformer.py
DragonYong/Sklearn
b604c4bc41ecfa5c10613f713d6ca5c73214c07c
[ "Apache-2.0" ]
1
2021-02-03T07:35:20.000Z
2021-02-03T07:35:20.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2020-06-20-22:14 # @Author : TuringEmmy # @Email : yonglonggeng@163.com # @WeChat : csy_lgy # @File : Transformer.py # @Project : PaperProject from tensorflow import keras import tensorflow as tf from Model import EncoderModel, DecoderModel from ...
37.269231
119
0.69453
6116826a323a4cc6658f12082fa605153bdaf8b5
1,141
py
Python
rawio/grouping/wavelet.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
rawio/grouping/wavelet.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
rawio/grouping/wavelet.py
hdkai/Raw-IO
f0fa928d7ef59a363c6f4c876d642af6dede6ae4
[ "Apache-2.0" ]
null
null
null
# # RawIO # Copyright (c) 2021 Yusuf Olokoba. # from imagehash import whash from PIL import Image from typing import Callable def wavelet_similarity (hamming_threshold: float=0.15) -> Callable[[str, str], bool]: """ Create a similarity function which compares Wavelet-domain hashes between images. Pa...
33.558824
139
0.669588
b6a3cf42fb86eb129a6e9f8337355043f701502e
3,646
py
Python
tools/postprocess.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
2
2020-12-22T08:40:05.000Z
2021-03-30T08:09:44.000Z
tools/postprocess.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
tools/postprocess.py
UESTC-Liuxin/SkmtSeg
1251de57fae967aca395644d1c70a9ba0bb52271
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np from PIL import Image import os import matplotlib.pyplot as plt import cv2 from dataloader.skmt import SkmtDataSet dataset_root = '../data/SKMT/Seg' images_path = os.path.join(dataset_root, 'SegmentationClass') def find_pic(img,ii): img1 = np.zeros(img.shape, np.uint8) ...
32.846847
94
0.623423
fce7d979a53e9f49c720a2a0a6f4b1f3941b4ad0
1,738
py
Python
Ws2812Painter.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
1
2019-10-22T14:02:34.000Z
2019-10-22T14:02:34.000Z
Ws2812Painter.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
null
null
null
Ws2812Painter.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
null
null
null
from luma.led_matrix.device import neopixel from luma.core.render import canvas # Ws2812 Matrix # ----------> X # | 0/0 9/0 # | # | # | # v # # Y # # # # 0/19 9/19 class Ws2812Painter: def __init__(self): self.device = neopixel(width=10, height=20, ro...
33.423077
95
0.488493
a2095b09a49e621b51b04b52cfde4dabfe3d8b5d
2,138
py
Python
app/main.py
allure-ai/mattermost-gas-button
a7c605b7d5861c422938a31dbd7a96940f442078
[ "MIT" ]
null
null
null
app/main.py
allure-ai/mattermost-gas-button
a7c605b7d5861c422938a31dbd7a96940f442078
[ "MIT" ]
null
null
null
app/main.py
allure-ai/mattermost-gas-button
a7c605b7d5861c422938a31dbd7a96940f442078
[ "MIT" ]
null
null
null
import os from flask import Flask, request import random import requests app = Flask(__name__) BASE_URL = os.getenv('BASE_URL', 'http://localhost') @app.route('/gas/mattermost', methods=['POST']) def prompt_gas(): prompt = request.form.get('text') return { "response_type": "in_channel", "us...
28.891892
81
0.36623
bf5b375c0cda58c68e7c706f404d1dfddb84b02f
229
py
Python
LINE/2021/web/YourNote/web/src/database.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
LINE/2021/web/YourNote/web/src/database.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
LINE/2021/web/YourNote/web/src/database.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 from retrying import retry db = SQLAlchemy() @retry(wait_fixed=2000, stop_max_attempt_number=10) def init_db(app): db.init_app(app) with app.app_context(): db.create_all()
22.9
51
0.746725
bf87ea0d189c093c8932af49c0adc82c0e317adb
1,985
py
Python
ahecalendar.py
owagner/ahecalendar
f1ae7a37130b54a20de4692fdd65761f6caa86c4
[ "MIT" ]
null
null
null
ahecalendar.py
owagner/ahecalendar
f1ae7a37130b54a20de4692fdd65761f6caa86c4
[ "MIT" ]
null
null
null
ahecalendar.py
owagner/ahecalendar
f1ae7a37130b54a20de4692fdd65761f6caa86c4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Download des AHE-Abfallkalenders im JSON-Forma # # Gibt entweder die Rohdaten aus, oder mit der Option --next # die jeweils nächsten Abfuhrtermine pro Containertyp, oder mit # --todayornext auch am Tag des Aufrufs stattfindende # Abfuhren # from __future__ import print_function import argp...
34.824561
105
0.746599
44d5d2dd1d7c0791f1f4aa891b5719b760c48de0
259
py
Python
Hero/2021/crypto/h4XOR/xor.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
Hero/2021/crypto/h4XOR/xor.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
Hero/2021/crypto/h4XOR/xor.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
#!/usr/bin/env python3 from os import urandom from random import randint from pwn import xor input_img = open("flag.png", "rb").read() outpout_img = open("flag.png.enc", "wb") key = urandom(8) + bytes([randint(0, 9)]) outpout_img.write(xor(input_img, key))
23.545455
41
0.706564
788c8b93c5ee4f8695a3c129b2b2c8f3e6e1bc52
733
py
Python
components/py_engine/tests/haas/HaaSEdu/python-apps/driver/i2c/test_qmc5883.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
components/py_engine/tests/haas/HaaSEdu/python-apps/driver/i2c/test_qmc5883.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
components/py_engine/tests/haas/HaaSEdu/python-apps/driver/i2c/test_qmc5883.py
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
""" Testing qmc5883 python driver The below i2c configuration is needed in your board.json. "qmc5883": { "type": "I2C", "port": 1, "addrWidth": 7, "freq": 400000, "mode": "master", "devAddr": 13 } """ from qmc5883 import QMC5883 print("Testing qmc5883 ...") qmc5883Dev = QMC5883() qmc5883Dev.open("qmc5883...
20.942857
57
0.709413
78b89e2df3388513347bf06be34291bffc3231dd
2,283
py
Python
Packs/MalwareInvestigationAndResponse/Scripts/InvestigationSummaryParse/InvestigationSummaryParse_test.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
1
2021-11-02T05:36:38.000Z
2021-11-02T05:36:38.000Z
Packs/MalwareInvestigationAndResponse/Scripts/InvestigationSummaryParse/InvestigationSummaryParse_test.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
61
2021-10-07T08:54:38.000Z
2022-03-31T10:25:35.000Z
Packs/MalwareInvestigationAndResponse/Scripts/InvestigationSummaryParse/InvestigationSummaryParse_test.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
import json from pathlib import Path import pytest from CommonServerPython import CommandResults from InvestigationSummaryParse import parse_command, KillChain, Result, Source TEST_DATA_DIR = Path(__file__).parent / 'test_data' def _list_to_context(command_results: list[CommandResults]): return [result.to_cont...
36.238095
119
0.621989
415b596c00445f725046365cbfbd626a2305a46b
582
py
Python
packages/watchmen-cli/src/watchmen_cli/settings.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-cli/src/watchmen_cli/settings.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-cli/src/watchmen_cli/settings.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from logging import getLogger from pydantic import BaseSettings from watchmen_cli.common.constants import REPLACE logger = getLogger(__name__) class CliSettings(BaseSettings): META_CLI_HOST: str = 'http://localhost' META_CLI_USERNAME: str = None META_CLI_PASSWORD: str = None META_CLI_PAT: str = None META_CLI_...
21.555556
49
0.756014
ec0c847ed596205f78dd9b7e7e830f3bb9ebe445
3,558
py
Python
classify/test_classify.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
classify/test_classify.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
2
2021-03-31T18:54:16.000Z
2021-12-13T19:49:08.000Z
classify/test_classify.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
import os import re import time from datetime import datetime from tqdm import tqdm import codecs import numpy as np import subprocess import multiprocessing #from multiprocessing import Pool from multiprocessing.dummy import Pool from pprint import pprint import pymongo from pymongo import InsertOne, DeleteMany, Rep...
30.672414
122
0.657392
ec39e159e6871f14e697b07910f401fd1e5e1fd5
4,572
py
Python
research/nlp/ktnet/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/nlp/ktnet/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/nlp/ktnet/preprocess.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...
41.189189
103
0.665792
2e24afd0d4765d44cb35a555f2c14c6b3b4cf848
479
py
Python
m5-101/content/solutions/web-crawler/section5.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
4
2021-03-25T13:15:38.000Z
2021-11-10T12:29:19.000Z
m5-101/content/solutions/web-crawler/section5.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
null
null
null
m5-101/content/solutions/web-crawler/section5.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
4
2021-03-25T13:18:10.000Z
2021-04-08T13:44:48.000Z
import pickle import json import re # Read pickle File pkl_file = 'programs.pkl' f = open(pkl_file, 'rb') infos = pickle.load(f, encoding='bytes') print(len(infos)) # Search programs = [] keyword = input('What ru looking for : ') for key in infos: d = json.loads(infos[key]) if re.search(keyword, d['program_d...
23.95
83
0.663883
2e7973ec20d345fb31ddd96c73f2d0c5893563d4
7,545
py
Python
checkmate.py
eaydin/checkmate
6a9cad7599c8c3e2087cb83b544368fdf69f6147
[ "MIT" ]
null
null
null
checkmate.py
eaydin/checkmate
6a9cad7599c8c3e2087cb83b544368fdf69f6147
[ "MIT" ]
null
null
null
checkmate.py
eaydin/checkmate
6a9cad7599c8c3e2087cb83b544368fdf69f6147
[ "MIT" ]
null
null
null
import signal import datetime from CheckMate.webcheck import run_curl_checker from CheckMate.mate import run_mate_service from CheckMate.webcheck import run_mate_check from CheckMate.tcp_check import run_tcp_check from CheckMate.sendmail import run_mail_success import CheckMate.log import CheckMate.mate import argparse...
52.034483
121
0.655931
512ed22249f4d4eccac9ab797e94b4e96fd630ea
1,610
py
Python
python/sql_alchemy/managing_relationship/many_to_many.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/sql_alchemy/managing_relationship/many_to_many.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/sql_alchemy/managing_relationship/many_to_many.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
from sqlalchemy import Column, Integer, String, ForeignKey, Table from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() association_table = Table('association', Base.metadata, Column('team_id', Integer, ForeignKey('example.sqlalchemy_tutorial_pla...
30.961538
90
0.627329
7a444036342572a7a810f9a096652055bc574a1c
386
py
Python
01.DataStructure/Tree/NY/P42576_NY.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
1
2021-11-21T06:03:06.000Z
2021-11-21T06:03:06.000Z
01.DataStructure/Tree/NY/P42576_NY.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
2
2021-10-13T07:21:09.000Z
2021-11-14T13:53:08.000Z
01.DataStructure/Tree/NY/P42576_NY.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
null
null
null
#프로그래머스 - 해시 42576 해시로 안 함... ㅠㅠ def solution(participant, completion): answer = '' participant.sort() completion.sort() for i in range(len(participant)) : try : if participant[i] != completion[i] : answer = participant[i] break except(In...
24.125
48
0.541451
710a4c8e450d3de28dadddb1bb6c60dfa22c5774
1,211
py
Python
hystreet/hystreet_to_s3/main.py
tho-wa/virushack
2bb057b4557969d4bf8899b78fe9fc2d5ef5ae13
[ "Apache-2.0" ]
null
null
null
hystreet/hystreet_to_s3/main.py
tho-wa/virushack
2bb057b4557969d4bf8899b78fe9fc2d5ef5ae13
[ "Apache-2.0" ]
null
null
null
hystreet/hystreet_to_s3/main.py
tho-wa/virushack
2bb057b4557969d4bf8899b78fe9fc2d5ef5ae13
[ "Apache-2.0" ]
null
null
null
import requests import pandas as pd import os import json df = pd.DataFrame(columns=['timestamp', 'station_id', 'pedestrians_count', 'unverified', 'weather_condition', 'temperature', 'min_temperature']) headers = {'Content-Type': 'application/json', 'X-API-Token': os.getenv('HYST...
44.851852
125
0.666391
f133ee3811cc26920c66a98d5236ae4a52c79f1d
816
py
Python
backend/migrations/versions/16080f1821df_.py
davidoesch/platform
1eb6f98568cab82e28bd5350beab2042b22d99ed
[ "MIT" ]
null
null
null
backend/migrations/versions/16080f1821df_.py
davidoesch/platform
1eb6f98568cab82e28bd5350beab2042b22d99ed
[ "MIT" ]
null
null
null
backend/migrations/versions/16080f1821df_.py
davidoesch/platform
1eb6f98568cab82e28bd5350beab2042b22d99ed
[ "MIT" ]
null
null
null
"""empty message Revision ID: 16080f1821df Revises: 37a8cc7186ff Create Date: 2019-04-05 11:47:04.800261 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '16080f1821df' down_revision = '37a8cc7186ff' branch_labels = None depends_on = None def upgrade(): # ...
26.322581
86
0.697304
f14ce0ca42b78cc8583798f0c1de14e303252336
1,285
py
Python
SoSe-21/Code-Vorlesungen/VL-5/Einstieg-Funktionen-2.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
1
2022-03-23T09:40:39.000Z
2022-03-23T09:40:39.000Z
SoSe-21/Code-Vorlesungen/VL-5/Einstieg-Funktionen-2.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
SoSe-21/Code-Vorlesungen/VL-5/Einstieg-Funktionen-2.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
# Definieren meiner Funktion # # Als erstes: def # # Als zweites: Name der Funktion # # Gefolgt von (): def trenner(anzahl_sterne): for i in range(anzahl_sterne): print("*", end="") print() # Diese Funktion berechnet die größte Zahl aus drei eingegebenen Zahlen def berechnung_maximum(zahl1, zahl2, zahl...
41.451613
136
0.727626
74900602bf429967225e9c327249ac049f8ba0fb
83
py
Python
examples/nowcoder/SQL2/apps.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
5
2020-07-14T07:48:10.000Z
2021-12-20T21:20:10.000Z
examples/nowcoder/SQL2/apps.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
7
2021-03-26T03:13:38.000Z
2022-03-12T00:42:03.000Z
examples/nowcoder/SQL2/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 Sql2Config(AppConfig): name = 'SQL2'
13.833333
33
0.73494
248045c935d70715767d75e10f9fc66daa85a349
419
py
Python
publ/__init__.py
fluffy-critter/Publ
868c5a17c605707dde4d1a95d79405301bd12f05
[ "MIT" ]
6
2018-03-29T02:07:44.000Z
2018-09-26T00:17:31.000Z
publ/__init__.py
fluffy-critter/Publ
868c5a17c605707dde4d1a95d79405301bd12f05
[ "MIT" ]
82
2018-04-01T08:53:59.000Z
2018-09-28T23:45:05.000Z
publ/__init__.py
fluffy-critter/Publ
868c5a17c605707dde4d1a95d79405301bd12f05
[ "MIT" ]
null
null
null
""" Publ: A Flask-based site management system. Like a static publishing system, but dynamic! See http://publ.beesbuzz.biz for more information. """ import logging from .flask_wrapper import Publ LOGGER = logging.getLogger(__name__) def publ(name, cfg): """ Legacy function that originally did a lot more """ ...
24.647059
74
0.732697
3b663f39569be51788df7f877f779f2323ca1bbf
3,513
py
Python
run_tests.py
clemensschiffer/openmcx
1c8a53857cd2d62349de3627be3b7bea68e4ecbf
[ "Apache-2.0" ]
22
2021-04-09T16:25:16.000Z
2022-03-29T19:31:16.000Z
run_tests.py
clemensschiffer/openmcx
1c8a53857cd2d62349de3627be3b7bea68e4ecbf
[ "Apache-2.0" ]
null
null
null
run_tests.py
clemensschiffer/openmcx
1c8a53857cd2d62349de3627be3b7bea68e4ecbf
[ "Apache-2.0" ]
3
2021-09-24T11:46:42.000Z
2021-11-09T07:05:41.000Z
################################################################################ # Copyright (c) 2021 AVL List GmbH and others # # This program and the accompanying materials are made available under the # terms of the Apache Software License 2.0 which is available at # https://www.apache.org/licenses/LICENSE-2.0. # ...
28.560976
147
0.586393
8e8d2255604b8a056060da7dab643554dd98804d
5,553
py
Python
the_platform/settings.py
Thames1990/BadBatBets
8dffb69561668b8991bf4103919e4b254d4ca56a
[ "MIT" ]
null
null
null
the_platform/settings.py
Thames1990/BadBatBets
8dffb69561668b8991bf4103919e4b254d4ca56a
[ "MIT" ]
null
null
null
the_platform/settings.py
Thames1990/BadBatBets
8dffb69561668b8991bf4103919e4b254d4ca56a
[ "MIT" ]
null
null
null
""" Django settings for the_platform project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import ...
27.765
99
0.591212
d96634ddeae13fbc9bb5deb3efffa73f07eadb50
72
py
Python
nz_crawl_demo/day8/autohome/autohome/start.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_crawl_demo/day8/autohome/autohome/start.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_crawl_demo/day8/autohome/autohome/start.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from scrapy import cmdline cmdline.execute('scrapy crawl bmw8'.split())
24
44
0.791667
692be2ea7fef94bef6bb8d2063351dc8b2dc35ce
358
py
Python
Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P08_GraduationPt.2.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P08_GraduationPt.2.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P08_GraduationPt.2.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
1
2022-02-23T13:03:14.000Z
2022-02-23T13:03:14.000Z
year = 1 name = input() skasan = 0 total = 0 while year <= 12: grade = float(input()) if grade < 4: if skasan > 0: break skasan += 1 continue total += grade year += 1 if year > 12: print(f"{name} graduated. Average grade: {total / 12:.2f}") else: print(f"{nam...
19.888889
63
0.539106
692f4a4a8274acc3d5b2f638c4ca77cb27054cbd
4,803
py
Python
resources/mechanics_lib/utils/display.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
7
2016-01-20T02:33:00.000Z
2021-02-04T04:06:57.000Z
resources/mechanics_lib/utils/display.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
null
null
null
resources/mechanics_lib/utils/display.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
3
2016-10-05T07:20:30.000Z
2017-11-20T10:36:50.000Z
try: from api.drawing import * from api.edge import * except: from ..api.drawing import * from ..api.edge import * from Tkinter import * import math #def displayTkinter(dwg, height = 500, width = 700, showFlats = True): class DisplayApp: def __init__(self, dwg, height = 500, width = 700, showFlats = True...
35.843284
128
0.57131
ba421ed53ad2906a31ce024824a9c39c4b9af301
6,633
py
Python
cbm/ipycbm/utils/settings.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
17
2021-01-18T07:27:01.000Z
2022-03-10T12:26:21.000Z
cbm/ipycbm/utils/settings.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
4
2021-04-29T11:20:44.000Z
2021-12-06T10:19:17.000Z
cbm/ipycbm/utils/settings.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
47
2021-01-21T08:25:22.000Z
2022-03-21T14:28:42.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : Konstantinos Anastasakis # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD import os from os.path import join, normpath from ipywidge...
27.6375
98
0.591437
ba94e5b3cc52a867541980710bdefad3e1a7ce9c
401
py
Python
ebenezer/atencion/migrations/0013_level_code.py
davrv93/ebenezer-backend
d3db4dafd9a8c35bea9f32afe2be1dd451f64298
[ "Apache-2.0" ]
null
null
null
ebenezer/atencion/migrations/0013_level_code.py
davrv93/ebenezer-backend
d3db4dafd9a8c35bea9f32afe2be1dd451f64298
[ "Apache-2.0" ]
3
2020-02-11T23:15:00.000Z
2021-06-10T20:52:17.000Z
ebenezer/atencion/migrations/0013_level_code.py
davrv93/ebenezer-backend
d3db4dafd9a8c35bea9f32afe2be1dd451f64298
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.2 on 2018-10-05 17:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('atencion', '0012_level_taxonomy'), ] operations = [ migrations.AddField( model_name='level', name='code', ...
21.105263
73
0.598504
2469bacfb8e7eb2079df1e628df73b494874c675
751
py
Python
一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_035.py
ethan-sui/AI-algorithm-engineer-knowledge
24795b23a4cbeb6e6839e0cae65f7745be666da6
[ "Apache-2.0" ]
209
2020-10-06T08:34:45.000Z
2022-03-08T08:35:15.000Z
一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_035.py
ethan-sui/AI-algorithm-engineer-knowledge
24795b23a4cbeb6e6839e0cae65f7745be666da6
[ "Apache-2.0" ]
null
null
null
一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_035.py
ethan-sui/AI-algorithm-engineer-knowledge
24795b23a4cbeb6e6839e0cae65f7745be666da6
[ "Apache-2.0" ]
8
2020-10-09T09:07:18.000Z
2021-05-18T10:30:46.000Z
# 35、搜索插入位置 # 一、暴力法,遍历所有的可能,寻找位置,时间复杂度O(n),空间复杂度O(1) def searchInsert0(nums, target): if target == nums[-1]: return len(nums)-1 if target > nums[-1]: return len(nums) if target < nums[0]: return 0 for i in range(len(nums)-1): if target == nums[i]: return i ...
25.896552
40
0.549933
300e0caf17d861bc69e7285a8d25fef5e5b42175
1,776
py
Python
scripts/MovieDataset.py
walty19950301/MovieRecommend
b86e773b4c27159d8819c5bae1c87192ce47953a
[ "MIT" ]
null
null
null
scripts/MovieDataset.py
walty19950301/MovieRecommend
b86e773b4c27159d8819c5bae1c87192ce47953a
[ "MIT" ]
null
null
null
scripts/MovieDataset.py
walty19950301/MovieRecommend
b86e773b4c27159d8819c5bae1c87192ce47953a
[ "MIT" ]
null
null
null
import WQUtil as util class LoadData(object): def __init__(self,filename): self.file = open(filename,'r',encoding='UTF-8') def __del__(self): self.file.close() del self.file class Movies(LoadData): def __init__(self, filename): util.log('Movies init','start') Loa...
28.190476
90
0.583896
cc4dabbb93db741d56b8630e0163bd63fcb6746f
3,575
py
Python
agents/hetero_agents.py
yerfor/Soft-DRGN
0c96d1ea295077b949229261c37d8dde25001a03
[ "MIT" ]
2
2022-02-24T08:21:49.000Z
2022-03-10T08:57:35.000Z
agents/hetero_agents.py
yerfor/Soft-DRGN
0c96d1ea295077b949229261c37d8dde25001a03
[ "MIT" ]
1
2022-02-24T08:40:21.000Z
2022-02-24T12:01:58.000Z
agents/hetero_agents.py
yerfor/Soft-DRGN
0c96d1ea295077b949229261c37d8dde25001a03
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from agents.dqn import DQNAgent from modules.hgn import HGNNetwork from utils.numba_utils import * from utils.torch_utils import * from utils.class_utils import get_cls_from_path from utils.hparams import hparams from copy import de...
45.833333
113
0.653986
9dd16ae8fce8c87b0964328a3dc11cb235239fc3
121
py
Python
tests/server/middleware/test_api.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
156
2021-11-19T18:50:14.000Z
2022-03-31T19:48:59.000Z
tests/server/middleware/test_api.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
30
2021-12-27T19:30:56.000Z
2022-03-30T17:49:00.000Z
tests/server/middleware/test_api.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
14
2022-01-17T23:24:34.000Z
2022-03-29T09:27:47.000Z
import pytest import server.middleware.api def test_init_api(): pass def test_api_version_and_prefix(): pass
11
34
0.752066
8835b0f0df7e99a5bc44cdccf7bab6738c80a3f6
163
py
Python
scripts/hello_world_christianheinrichs.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hello_world_christianheinrichs.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hello_world_christianheinrichs.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
1
2019-10-24T06:45:21.000Z
2019-10-24T06:45:21.000Z
#!/usr/bin/env python3 ## LANGUAGE: Python ## ENV: Native ## AUTHOR: Christian Heinrichs ## GITHUB: https://github.com/christianheinrichs print("Hello, world!")
18.111111
48
0.711656
a0031c10bca990efb57a3dd935ae74b3a68082a8
2,173
py
Python
site/public/courses/DS-2.2/Notebooks/Image_data_prep/fire_image_classification.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
1
2021-08-24T20:22:19.000Z
2021-08-24T20:22:19.000Z
site/public/courses/DS-2.2/Notebooks/Image_data_prep/fire_image_classification.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
site/public/courses/DS-2.2/Notebooks/Image_data_prep/fire_image_classification.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
import glob import pandas as pd import numpy as np from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D import keras from PIL import Image from keras.preprocessing.image import img_to_array files = glob.glob("Fire images/*.*") l...
32.924242
189
0.590428
4ec4bf93829679e15ae5f188b6b12cc9661cd643
22
py
Python
RDS/circle3_central_services/token_storage/src/lib/__init__.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle3_central_services/token_storage/src/lib/__init__.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle3_central_services/token_storage/src/lib/__init__.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
from . import Storage
11
21
0.772727
094b26e3ef4e93c0d3b6033be149ab7621c30eb9
85,427
py
Python
tests/onegov/swissvotes/test_collections.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/swissvotes/test_collections.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/swissvotes/test_collections.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from csv import DictReader from datetime import date from datetime import datetime from decimal import Decimal from freezegun import freeze_time from io import BytesIO from io import StringIO from onegov.core.orm.abstract import MoveDirection from onegov.swissvotes.collections import SwissVoteCollection from onegov.swi...
30.651956
78
0.507439
116ff4f800af92e993a9f003eb8881f3185ebf3a
1,944
py
Python
marsyas-vamp/marsyas/scripts/Python/icme2011_distance_matrix_resampled.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/scripts/Python/icme2011_distance_matrix_resampled.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/scripts/Python/icme2011_distance_matrix_resampled.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Calculate the stats of a pitch contour txt file # # Stats include median, mean, min, max, std dev. # import sys import os import datetime import commands import re import numpy as np import math if len(sys.argv) != 4: print "Usage: icme2011_distance_matrix_resampled.py pitch_contours.mf o...
23.421687
102
0.687243
eec8f7fb96307af508554e529e4538ca92574545
223
py
Python
_dev/license-retrival-mock-server/src/main.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
_dev/license-retrival-mock-server/src/main.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
_dev/license-retrival-mock-server/src/main.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
from fastapi import FastAPI import routers.auth import routers.licenses router_modules = [routers.auth, routers.licenses] app = FastAPI() for router_module in router_modules: app.include_router(router_module.router)
20.272727
49
0.807175
eee6178996e62d414f78a1d00335baf4476f7123
269
py
Python
exercises/es/exc_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/exc_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/exc_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import spacy nlp = spacy.load("es_core_news_sm") doc = nlp("Yo tengo un gato") # Busca el hash para la palabra "gato" gato_hash = ____.____.____[____] print(gato_hash) # Busca el gato_hash para obtener el string gato_string = ____.____.____[____] print(gato_string)
20.692308
43
0.750929
e9334f2ffcd52a98ae38216bf9eb8c345c03ac7a
137
py
Python
python/python_backup/PRAC_PYTHON/7_continue.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/PRAC_PYTHON/7_continue.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/PRAC_PYTHON/7_continue.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
for num in range(2,10): if(num%2==0): print("found an even number : ",num) continue else: print("found an odd number :",num)
22.833333
39
0.613139
3aa00fc83d722c9744b6420f6f3994dc7ae0750a
342
py
Python
Project Euler Questions 21 - 30/Project Euler Question 30.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
1
2020-02-11T02:03:02.000Z
2020-02-11T02:03:02.000Z
Project Euler Questions 21 - 30/Project Euler Question 30.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
Project Euler Questions 21 - 30/Project Euler Question 30.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
#Project Euler Question 30 #Digit Fifth Powers def power_sum_list(x): power_list = [] for num in range(2, (10**(x+1))): digit_sum = sum(list([(int(digit)**x) for digit in str(num)])) if digit_sum == num: power_list.append(num) #print (power_list) return sum(power_list) pri...
24.428571
70
0.619883
6ede89b9c4391a991926b25f2ad0ffaeea1227aa
4,961
py
Python
tensorflow/basic-rl/tutorial5/tests/grid.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-05-10T09:16:23.000Z
2019-05-10T09:16:23.000Z
tensorflow/basic-rl/tutorial5/tests/grid.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
null
null
null
tensorflow/basic-rl/tutorial5/tests/grid.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-10-14T07:30:18.000Z
2019-10-14T07:30:18.000Z
""" Grid world example fetched from http://outlace.com/Reinforcement-Learning-Part-3/ """ import numpy as np def randPair(s,e): return np.random.randint(s,e), np.random.randint(s,e) #finds an array in the "depth" dimension of the grid def findLoc(state, obj): for i in range(0,4): for j in range(0,...
29.885542
91
0.557952
959d3106a701744df69e68ad13fd4aceb6aa6dba
198
py
Python
Regex/Introduction/matching_anything_but_a_newline.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Regex/Introduction/matching_anything_but_a_newline.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Regex/Introduction/matching_anything_but_a_newline.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import re regex_pattern = r'^.{3}\..{3}\..{3}\..{3}$' test_string = input() match = re.match(regex_pattern, test_string) is not None print(str(match).lower())
15.230769
56
0.656566
c2b77ab3264fc4e04e1b3fcd5f34c111842bd766
2,695
py
Python
ppyt/rules/entry_rules/price_entry_rules.py
yusukemurayama/ppytrading
9804d0de870d77bf8a1c847736a636b1342d4600
[ "MIT" ]
4
2016-08-16T07:47:15.000Z
2017-12-11T10:08:47.000Z
ppyt/rules/entry_rules/price_entry_rules.py
yusukemurayama/ppytrading
9804d0de870d77bf8a1c847736a636b1342d4600
[ "MIT" ]
null
null
null
ppyt/rules/entry_rules/price_entry_rules.py
yusukemurayama/ppytrading
9804d0de870d77bf8a1c847736a636b1342d4600
[ "MIT" ]
2
2018-06-15T04:43:15.000Z
2020-05-02T07:47:15.000Z
# coding: utf-8 import logging from ppyt import const from ppyt.rules.entry_rules import EntryBase from ppyt.indicators.basic_indicators import ( RecentHighPriceIndicator, RecentLowPriceIndicator, ) logger = logging.getLogger(__name__) class BreakoutEntry(EntryBase): """価格のブレイクアウトを見て仕掛けるクラスです。""" _findk...
30.977011
99
0.630056
c2bc2ac6982782327017c8c5fe9eed9f9a35fca8
839
py
Python
saku/auction/serializers.py
Mehdi-MosTafavi/Saku-Backend
348a1a676ffc8ddd9077f8c94733c5f6dce98fbd
[ "MIT" ]
null
null
null
saku/auction/serializers.py
Mehdi-MosTafavi/Saku-Backend
348a1a676ffc8ddd9077f8c94733c5f6dce98fbd
[ "MIT" ]
null
null
null
saku/auction/serializers.py
Mehdi-MosTafavi/Saku-Backend
348a1a676ffc8ddd9077f8c94733c5f6dce98fbd
[ "MIT" ]
null
null
null
import random import string from rest_framework import serializers from auction.models import Auction def get_random_token(): return ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(8)) class CreateAuctionRequestSerializer(serializers.ModelSerializer): class Meta: model = A...
31.074074
100
0.690107
b0bb8c217d31d7225d573b06ffbfded15194cc25
1,923
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/solutions/ex06_quick_sort.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/solutions/ex06_quick_sort.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/solutions/ex06_quick_sort.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden def swap_positions(list, pos1, pos2): list[pos1], list[pos2] = list[pos2], list[pos1] def quick_sort_inplace(values): quick_sort_in_range(values, 0, len(values) - 1) def quick_sort_in_range(values, left, right): # r...
26.708333
80
0.669267
c6735c4b5f50879016adfe7d93ad91897bbe7d7e
183
py
Python
exercises/fr/solution_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/solution_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/fr/solution_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
# Importe spaCy import spacy # Crée l'objet nlp français nlp = spacy.blank("fr") # Traite un texte doc = nlp("Ceci est une phrase.") # Affiche le texte du document print(doc.text)
15.25
33
0.710383
059cb7838c9c4c0c23a150131d2d37d3d80b82a5
302
py
Python
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 46/46.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
50-Python-Exercises/Exercises/Exercise 46/46.py
kuwarkapur/Hacktoberfest-2022
efaafeba5ce51d8d2e2d94c6326cc20bff946f17
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
50-Python-Exercises/Exercises/Exercise 46/46.py
kuwarkapur/Hacktoberfest-2022
efaafeba5ce51d8d2e2d94c6326cc20bff946f17
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
#Write a script that extracts letters from the 26 text files and put the letters in a list import glob letters = [] file_list = glob.glob("letters/*.txt") print(file_list) for filename in file_list: with open(filename, "r") as file: letters.append(file.read().strip("\n")) print(letters)
25.166667
90
0.708609
05dcfae1884b1795bd4cc2661fa6edc132260739
3,973
py
Python
benwaonline/query.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
benwaonline/query.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
16
2017-09-13T10:21:40.000Z
2020-06-01T04:32:22.000Z
benwaonline/query.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
from benwaonline.mappers import nonempty_fields, relationships class Query(object): def __init__(self, criteria): self.criteria = criteria def __repr__(self): return '<Query {}>'.format(self.criteria) def to_filter(self): try: return [c.to_filter() for c in self.criter...
29
111
0.617418
a586b6ba227ded8f42f8e740902131839b235f99
4,687
py
Python
marsyas-vamp/marsyas/src/marsyas_python/plot_spectrogram.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/marsyas_python/plot_spectrogram.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/marsyas_python/plot_spectrogram.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # This utility will plot beautiful spectrograms of your sound files. You will have to specify a lot of parameters, # but the good news is, the defaults will be set so that it will fit most people's needs. # # The parameters you have to set are: # - Input file name # - Frame step / Frame length (i...
50.945652
216
0.713036
a5aa996f8633b0def95ebf00b9fb21767c0b5f86
166
py
Python
Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/08.11-Recursion.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/08.11-Recursion.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/08.11-Recursion.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
import sys print(sys.getrecursionlimit()) sys.setrecursionlimit(2000) print(sys.getrecursionlimit()) # def great(): # print("Hello") # great() # great()
11.857143
30
0.668675
3c7d6ea80f0a8caf632e67b37a0e9b99b11a745a
92
py
Python
2014/09/table-poverty-families-2013/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2014/09/table-poverty-families-2013/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2014/09/table-poverty-families-2013/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 = '1_eHJqegdRDdt--azNQxNly5aRr3zRG2BLdoKix9wikA'
23
68
0.826087
b1f5a04a69a5e308071e31703111446df443911c
29,373
py
Python
imbiss_ML.py
Steinheilig/Imbiss
49f6ae865cef05b4999569cecaf5931db0fb2113
[ "MIT" ]
null
null
null
imbiss_ML.py
Steinheilig/Imbiss
49f6ae865cef05b4999569cecaf5931db0fb2113
[ "MIT" ]
null
null
null
imbiss_ML.py
Steinheilig/Imbiss
49f6ae865cef05b4999569cecaf5931db0fb2113
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Machine Learning applied to defeat a 30 years old DOS game... Game mechanics "Imbiss" v. 5.4 by T. Bauer for IBM PC, 1991, Public Domain Applying machine learning to find optimal sales prices, i.e. the sales prices optimizing the profit given the current temperature and day of t...
36.808271
152
0.547101
b1fe63abb9323f4aab50edeee02f5b9b0fcbc529
1,640
py
Python
controller/main.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
1
2021-06-15T08:59:02.000Z
2021-06-15T08:59:02.000Z
controller/main.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
null
null
null
controller/main.py
huberthoegl/tsgrain
405d0ba8b98c2afa950d27294e55cd1e07506db4
[ "Apache-2.0" ]
null
null
null
import conf import atexit import controller import time import logging import mpipc_srv import led3c import db import signal import output # https://docs.python.org/3/howto/logging-cookbook.html # levels: NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL logger = logging.getLogger(conf.TSGRAIN_LOGGER) logger.setLevel(l...
24.117647
85
0.702439
3ccca3dc076c6a4afc649b86901b4a592e6265f1
530
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex08_rotation_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex08_rotation_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex08_rotation_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden import pytest from ch04_strings.solutions.ex08_rotation import contains_rotation @pytest.mark.parametrize("str1, str2, expected", [("ABCD", "ABC", True), ("ABCDEF", "EFAB", True)...
31.176471
66
0.586792
3ccd7baa6cc7b1ec212123d7f1913d6a86b74df5
5,643
py
Python
abfahrt/Result.py
Team-Zugig-zum-Erfolg/InformatiCup
788076ac38bf6d8f462465b7fb96db14d13bed30
[ "MIT" ]
1
2022-01-30T14:30:02.000Z
2022-01-30T14:30:02.000Z
abfahrt/Result.py
Team-Zugig-zum-Erfolg/InformatiCup
788076ac38bf6d8f462465b7fb96db14d13bed30
[ "MIT" ]
null
null
null
abfahrt/Result.py
Team-Zugig-zum-Erfolg/InformatiCup
788076ac38bf6d8f462465b7fb96db14d13bed30
[ "MIT" ]
null
null
null
""" This is Result for registering, saving and printing the output """ from typing import List # This module provides runtime support for type hints. The most fundamental support consists of the types Any, Union, Callable, TypeVar, and Generic. For a full specification, please see PEP 484. For a simplified introduc...
34.619632
483
0.615807
ab7c7dc1036b67eb2cdce2c0eea96c546bc7b804
1,550
py
Python
analysis/scripts/project_functions.py
data301-2021-summer2/project-group52-project
ecca18dc94ae0283af954466cd6f2434d369732f
[ "MIT" ]
null
null
null
analysis/scripts/project_functions.py
data301-2021-summer2/project-group52-project
ecca18dc94ae0283af954466cd6f2434d369732f
[ "MIT" ]
2
2021-08-14T22:20:20.000Z
2021-08-16T07:59:06.000Z
analysis/scripts/project_functions.py
data301-2021-summer2/project-group52-project
ecca18dc94ae0283af954466cd6f2434d369732f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ ## Task 2. Method Chaining and writing Python programs (10%)¶ import pandas as pd import numpy as np def load_and_process(url_or_path_to_csv_file): # Method Chain 1 (Load data and deal with missing data) df1 = ( pd.read_csv(url_or_p...
32.291667
113
0.605806
05824bcddb177424fee41f8deb88182599e0714f
556
py
Python
day05/fizzBuzz.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
day05/fizzBuzz.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
day05/fizzBuzz.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
#Write your code below this row 👇 # Erster Versuch for number in range(1, 101): output = "" if number % 3 == 0: output += "Fizz" if number % 5 == 0: output += "Buzz" if output == "": output = number print(output) print("--------------------------------------") # Zweite...
19.172414
47
0.476619
fd1ef9180c0398f1fe200617e4f7a3e87c1963b4
2,105
py
Python
zer0pts/2021/crypto/janken_vs_yoshiking/server.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
zer0pts/2021/crypto/janken_vs_yoshiking/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
zer0pts/2021/crypto/janken_vs_yoshiking/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
import random import signal from flag import flag from Crypto.Util.number import getStrongPrime, inverse HANDNAMES = { 1: "Rock", 2: "Scissors", 3: "Paper" } def commit(m, key): (g, p), (x, _) = key r = random.randint(2, p-1) c1 = pow(g, r, p) c2 = m * pow(g, r*x, p) % p return (c1, c2...
24.764706
77
0.560095
1ff6f5cc518f7f39c66b63b2ec25ac4989e2e7d3
2,307
py
Python
sun_dataset/sun_dataset.py
JugendForscht-CoLoS/SunDetection-NeuralNetwork
139bcc314cf6b5b84a82b08fda8b1e4455f7cf93
[ "MIT" ]
4
2021-02-26T15:47:28.000Z
2021-03-04T16:46:00.000Z
sun_dataset/sun_dataset.py
JugendForscht-CoLoS/SunDetection-NeuralNetwork
139bcc314cf6b5b84a82b08fda8b1e4455f7cf93
[ "MIT" ]
null
null
null
sun_dataset/sun_dataset.py
JugendForscht-CoLoS/SunDetection-NeuralNetwork
139bcc314cf6b5b84a82b08fda8b1e4455f7cf93
[ "MIT" ]
1
2021-02-24T13:01:21.000Z
2021-02-24T13:01:21.000Z
import tensorflow_datasets as tfds import os # TODO(sun_dataset): Markdown description that will appear on the catalog page. _DESCRIPTION = """ Description is **formatted** as markdown. It should also contain any processing which has been applied (if any), (e.g. corrupted example skipped, images cropped,.....
33.434783
101
0.620286
2f723f7d3dffe72fcfaff59a1d363903bbf503cd
938
py
Python
ETL/etl-framework-master (5)/etl-framework-master/Python ETL Scripts/QueryDatabaseAndWriteFile.py
DIBASSI/ZEUS
e5cc995dc232813636850e961e2a7bb8d1443a45
[ "MIT" ]
null
null
null
ETL/etl-framework-master (5)/etl-framework-master/Python ETL Scripts/QueryDatabaseAndWriteFile.py
DIBASSI/ZEUS
e5cc995dc232813636850e961e2a7bb8d1443a45
[ "MIT" ]
null
null
null
ETL/etl-framework-master (5)/etl-framework-master/Python ETL Scripts/QueryDatabaseAndWriteFile.py
DIBASSI/ZEUS
e5cc995dc232813636850e961e2a7bb8d1443a45
[ "MIT" ]
null
null
null
##Author: Bob Wakefield ##Contact: bob@MassStreet.net ##Date Created: 1May19 ##Description: Queries database and writes file ##Modification log: import sys import pandas as pd import pyodbc as db #Constants used to process data files #Exsiting paths are examples only! kFileDestination = 'C:/InterfaceAndExtractFiles...
22.878049
100
0.720682
f19ab9cc4fab06090fccbfa03d8a52ff9996070e
4,798
py
Python
cogs/mc.py
DestinyofYeet/antonstechbot
b01372431a3a2b51fb83180cf8caa1a168e294ad
[ "MIT" ]
1
2021-04-21T09:01:26.000Z
2021-04-21T09:01:26.000Z
cogs/mc.py
DestinyofYeet/antonstechbot
b01372431a3a2b51fb83180cf8caa1a168e294ad
[ "MIT" ]
null
null
null
cogs/mc.py
DestinyofYeet/antonstechbot
b01372431a3a2b51fb83180cf8caa1a168e294ad
[ "MIT" ]
null
null
null
from discord.ext import commands import discord import requests class Mc(commands.Cog): def __init__(self, client): self.client = client self.base_url = "https://api.mcsrvstat.us/2/" @commands.command(name="mc") async def mc_command(self, ctx, option=None, arg1=None): if option i...
45.695238
121
0.491038
9e9481ffdd7cc29307362762e04d8b9ef8312ba1
663
py
Python
Packs/Jask/Integrations/Jask/Jask_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Jask/Integrations/Jask/Jask_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Jask/Integrations/Jask/Jask_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto DATE_WITHOUT_MS = '2019-05-03T03:01:54' DATE_WITH_MS = '2019-05-03T03:02:54.123' def init_integration(mocker): mocker.patch.object(demisto, 'params', return_value={ 'URL': 'mock.com' }) def test_fetch_incidents(mocker): init_integration(mocker) import Jask ...
22.862069
57
0.595777
c8aa697d1d3047901bf26195b01aed483eafa372
215
py
Python
system calls/system_call.py
karinakozarova/Learning-Python
217dfc8ca6931a238445daf0b84e188c02916c52
[ "MIT" ]
1
2019-04-07T23:14:29.000Z
2019-04-07T23:14:29.000Z
system calls/system_call.py
karinakozarova/Learning-Python
217dfc8ca6931a238445daf0b84e188c02916c52
[ "MIT" ]
null
null
null
system calls/system_call.py
karinakozarova/Learning-Python
217dfc8ca6931a238445daf0b84e188c02916c52
[ "MIT" ]
null
null
null
import os from subprocess import call if __name__ == "__main__": user_input = input("Which system function should I call? ") os.system(user_input) # first way print("") call(user_input) # second way
26.875
63
0.693023
574792b07404045ae95a6015ffb3abd185cbd925
591
py
Python
flaskblog/app/models.py
john526/Flask
02e48871bc8a48b6de8eca95f88967fe9349f058
[ "MIT" ]
null
null
null
flaskblog/app/models.py
john526/Flask
02e48871bc8a48b6de8eca95f88967fe9349f058
[ "MIT" ]
null
null
null
flaskblog/app/models.py
john526/Flask
02e48871bc8a48b6de8eca95f88967fe9349f058
[ "MIT" ]
null
null
null
from app import db class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(64), index=True,unique=True) email = db.Column(db.String(120), index=True, unique=True) password_hash = db.Column(db.String(128)) def __repr__(self): return "<User {} > :...
21.888889
88
0.705584
199dbba6ec49ec1ea710916af0cba3ec4be997b3
1,662
py
Python
AP_SS16/402/python/old/table.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
3
2016-04-27T17:07:00.000Z
2022-02-02T15:43:15.000Z
AP_SS16/402/python/old/table.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
5
2016-04-27T17:10:03.000Z
2017-06-20T14:54:20.000Z
AP_SS16/402/python/old/table.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
null
null
null
import itertools import numpy as np import uncertainties.unumpy as unp from uncertainties.unumpy import ( nominal_values as noms, std_devs as stds, ) def make_table(columns, filename, figures=None): assert hasattr(columns[0], '__iter__'), "Wenn nur eine Zeile von Daten vorliegt, funktioniert zip nicht me...
31.961538
211
0.580024
e321298034c4b8dcb3b40971797a88c7cc8e3521
458
py
Python
stphohapp/urls.py
itechtian/stphoh
5a778deece3a690e0ec92c799b0b87ba26f1892c
[ "MIT" ]
null
null
null
stphohapp/urls.py
itechtian/stphoh
5a778deece3a690e0ec92c799b0b87ba26f1892c
[ "MIT" ]
null
null
null
stphohapp/urls.py
itechtian/stphoh
5a778deece3a690e0ec92c799b0b87ba26f1892c
[ "MIT" ]
null
null
null
from django.urls import path from .views import admin_view, hiv_test, add_result, delete, patientinfo urlpatterns = [ path('admin_view', admin_view, name="adminview"), path('delete/<int:patient_id>', delete, name="delete"), path('hiv_test', hiv_test, name="hiv_test"), path('<int:patient_id>/patien...
38.166667
93
0.703057
ef00331a79087361c8bb0de6f96a459d87c73a14
63
py
Python
source/pkgsrc/emulators/dynagen/files/__init__.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/emulators/dynagen/files/__init__.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/emulators/dynagen/files/__init__.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
__all__ = ['configobj', 'console', 'dynamips_lib', 'validate']
31.5
62
0.68254
324ec81ee0bf31f4550f15bb036ef9c45a1470c6
573
py
Python
4_DeepLearning-Advanced/Verbesserung der Netzwerke/TaxiFahrten/Taxi_LinReg.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
4_DeepLearning-Advanced/Verbesserung der Netzwerke/TaxiFahrten/Taxi_LinReg.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
4_DeepLearning-Advanced/Verbesserung der Netzwerke/TaxiFahrten/Taxi_LinReg.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression from Taxi_Data import TAXIROUTING excel_file_path = os.path.abspath("../DeepLearning/data/Taxi/TaxiData.xlsx") taxi_data = TAXIROUTING(excel_file_path=excel_file_path) x_train, y_train = taxi_data.x_train,...
30.157895
76
0.818499
329386faeb78d479dff18532bb6f280ebbf18ab7
881
py
Python
src/server/middleware/ui.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
156
2021-11-19T18:50:14.000Z
2022-03-31T19:48:59.000Z
src/server/middleware/ui.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
30
2021-12-27T19:30:56.000Z
2022-03-30T17:49:00.000Z
src/server/middleware/ui.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
14
2022-01-17T23:24:34.000Z
2022-03-29T09:27:47.000Z
import os import sys from flask import send_from_directory curr_path = os.path.dirname(os.path.abspath(__file__)) src_path = os.path.abspath(os.path.join(curr_path, "../")) def _build_path(): build_path = os.path.join(src_path, 'ui/build/') if not os.path.exists(build_path): raise Exception("Client U...
27.53125
88
0.696935
f5c08b2d98799636c3ce99a4c7c326dbdb944129
2,214
py
Python
Liter_Server/Massage.py
Drelf2018/Liter
e12ffdd22ee7b2724722c38e852fc9c1b2f180ad
[ "MIT" ]
null
null
null
Liter_Server/Massage.py
Drelf2018/Liter
e12ffdd22ee7b2724722c38e852fc9c1b2f180ad
[ "MIT" ]
null
null
null
Liter_Server/Massage.py
Drelf2018/Liter
e12ffdd22ee7b2724722c38e852fc9c1b2f180ad
[ "MIT" ]
null
null
null
from PIL import Image from io import BytesIO import threading import requests import sqlite3 import time import os import re new_url = {} def download(url: str, pos: int): response = requests.get(url) # 请求图片 image = Image.open(BytesIO(response.content)) # 读取网络图片 new_url[pos] = url+'@{}x{}'.format(imag...
29.131579
134
0.599368
f5dfb90af7f0a8dfb85a001bfba6f9fe0c7daab6
360
py
Python
benwaonline/schemas/image_schema.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
benwaonline/schemas/image_schema.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
16
2017-09-13T10:21:40.000Z
2020-06-01T04:32:22.000Z
benwaonline/schemas/image_schema.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
from marshmallow_jsonapi import fields from benwaonline.schemas import BaseSchema class ImageSchema(BaseSchema): id = fields.String() filepath = fields.Str() created_on = fields.DateTime() class Meta: type_ = 'images' self_url = '/api/images/{id}' self_url_kwargs = {'id': '<id>...
27.692308
42
0.65
deb89da94ebb7ceeab4826aab091b3b5ededdf3b
17,210
py
Python
Templates/Integrations/AnalyticsAndSIEM/AnalyticsAndSIEM.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Templates/Integrations/AnalyticsAndSIEM/AnalyticsAndSIEM.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Templates/Integrations/AnalyticsAndSIEM/AnalyticsAndSIEM.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' from typing import Dict, Tuple, List, Optional, Union, AnyStr import urllib3 """Example for Analytics and SIEM integration """ # Disable insecure warnings urllib3.disable_warnings() """GLOBALS/PARAMS A...
35.411523
115
0.646078
19f51336043a9cc6886518ead789c85223a20496
48
py
Python
Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/06.3.Input-char-2.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/06.3.Input-char-2.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/06.3.Input-char-2.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
ch = input("Enter a character: ")[0] print(ch)
12
36
0.625
26f8c12508fb49b6dfb739985c6a7aaa88194876
2,369
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/build/setup-sumo.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/build/setup-sumo.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/build/setup-sumo.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) 2020-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.358209
77
0.656395
3e8af260d7d2fbfd287e121dd3aad3ccafd7e9c1
822
py
Python
elements/python/10/13/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/10/13/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/10/13/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
class Node(object): def __init__(self, v, l=None, r=None): self.value = v self.left = l self.right = r def __str__(self): return '({} {} {})'.format( self.left, self.value, self.right, ).replace('None', '') def reconstruct(preorder): stack =...
22.833333
66
0.482968
39d46863fb721338899095e20779a19ebfd65c2f
343
py
Python
Packs/AttachmentsPreProcessing/Scripts/CreateFileFromPathObject/CreateFileFromPathObject.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
1
2021-11-02T05:36:38.000Z
2021-11-02T05:36:38.000Z
Packs/AttachmentsPreProcessing/Scripts/CreateFileFromPathObject/CreateFileFromPathObject.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
61
2021-10-07T08:54:38.000Z
2022-03-31T10:25:35.000Z
Packs/AttachmentsPreProcessing/Scripts/CreateFileFromPathObject/CreateFileFromPathObject.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 obj = json.loads(demisto.args()["object"]) for attachment in obj: filePath = demisto.getFilePath(attachment["path"])["path"] with open(filePath, 'rb') as f: data = f.read() demisto.results(fileResult(atta...
34.3
62
0.6793
f2a13ea8ef9297e6862edca314d73f0ecc0eee7c
554
py
Python
practices/practice_2/motor_specs.py
br4ch1st0chr0n3/robotic_systems_labs
23b8b81dc845e00cf02460258b9cec817019957b
[ "MIT" ]
null
null
null
practices/practice_2/motor_specs.py
br4ch1st0chr0n3/robotic_systems_labs
23b8b81dc845e00cf02460258b9cec817019957b
[ "MIT" ]
null
null
null
practices/practice_2/motor_specs.py
br4ch1st0chr0n3/robotic_systems_labs
23b8b81dc845e00cf02460258b9cec817019957b
[ "MIT" ]
null
null
null
import numpy as np # 35 turns motor milli = 10**(-3) centi = 10**(-2) motor_properties = { "J_m, rotor inertia (g*cm^2)": 268 * milli * centi**2, "K_m, torque constant (N*M/A)": 0.23, "B_m, nominal friction": 0.3, "t_l, torque load (N*M)": 0 } J = motor_properties['J_m, rotor inertia (g*cm^2)'] K_m =...
23.083333
59
0.592058
8a20389cb3665b4905d205ddff3f29a1070bbf15
2,524
py
Python
hardware/chip/espressif_esp32/esp-idf/components/esptool_py/esptool/flasher_stub/compare_stubs.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
40
2019-06-04T23:28:40.000Z
2022-03-28T06:12:35.000Z
hardware/chip/espressif_esp32/esp-idf/components/esptool_py/esptool/flasher_stub/compare_stubs.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
139
2019-08-19T22:18:22.000Z
2022-03-28T20:17:53.000Z
hardware/chip/espressif_esp32/esp-idf/components/esptool_py/esptool/flasher_stub/compare_stubs.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
5
2020-10-08T17:39:57.000Z
2022-01-24T22:54:48.000Z
#!/usr/bin/env python from __future__ import division, print_function import sys # Compare the esptool stub loaders to freshly built ones # in the build directory # # (Used by CI to verify the stubs are up to date.) def verbose_diff(new, old): for k in ["data_start", "text_start"]: if new[k] != old[k]: ...
38.242424
105
0.645404
8a641ce37600618010ef1bf62cc6b14760033be0
16,431
py
Python
etl/clarity2dw/planner.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
etl/clarity2dw/planner.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
etl/clarity2dw/planner.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
import asyncio import logging import time import os import json import functools import asyncpg import sys from etl.core.engine import Engine from etl.core.task import Task from etl.core.plan import Plan from etl.clarity2dw.extractor import Extractor from etl.load.pipelines.derive_main import get_derive_seq, get_depen...
40.670792
138
0.656625
6ae0ff18cd29df273b7a4b5a51cb7ce7f3aa6192
2,178
bzl
Python
tools/build_rules/build_event_stream/repo.bzl
wcalandro/kythe
64969a853711c228b4e3cfc3ce91b84b5bb853d7
[ "Apache-2.0" ]
1,168
2015-01-27T10:19:25.000Z
2018-10-30T15:07:11.000Z
tools/build_rules/build_event_stream/repo.bzl
wcalandro/kythe
64969a853711c228b4e3cfc3ce91b84b5bb853d7
[ "Apache-2.0" ]
2,811
2015-01-29T16:19:04.000Z
2018-11-01T19:48:06.000Z
tools/build_rules/build_event_stream/repo.bzl
wcalandro/kythe
64969a853711c228b4e3cfc3ce91b84b5bb853d7
[ "Apache-2.0" ]
165
2015-01-27T19:06:27.000Z
2018-10-30T17:31:10.000Z
"""An external repository for fetching build_event_stream protobufs.""" load("@bazel_skylib//lib:paths.bzl", "paths") _FILES = [ "src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto", "src/main/protobuf/command_line.proto", "src/main/protobuf/failure_details.proto",...
28.657895
98
0.624426
0adf86ca0d92857a78a6eb72df93ebb383c13119
9,721
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/slxos_vlan.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/slxos_vlan.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/slxos_vlan.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # # (c) 2018 Extreme Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
31.358065
133
0.584096
86418d7c96c9556e1cf4b321787cb7dc7fc238bc
610
py
Python
02.Sort/SY/p42839_SY.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
1
2021-11-21T06:03:06.000Z
2021-11-21T06:03:06.000Z
02.Sort/SY/p42839_SY.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
2
2021-10-13T07:21:09.000Z
2021-11-14T13:53:08.000Z
02.Sort/SY/p42839_SY.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
null
null
null
# p42839_SY import itertools import math def is_prime_number(x): for i in range(2, int(math.sqrt(x)) + 1): if x % i == 0: return False # 소수 X return True # 소수 O def solution(numbers): answer = 0 nums = [] tmp = [] parts = list(numbers) length = len(parts) for i in range(1, le...
24.4
46
0.52623
813ad07e10dfaa0618959a6fb8c486376e0f6e63
1,407
py
Python
runners/great_expectations/tests/test_job_config.py
omio-labs/richterin
c4165fe4910a556f5bba3c7224fed6d35c3fea57
[ "MIT" ]
null
null
null
runners/great_expectations/tests/test_job_config.py
omio-labs/richterin
c4165fe4910a556f5bba3c7224fed6d35c3fea57
[ "MIT" ]
null
null
null
runners/great_expectations/tests/test_job_config.py
omio-labs/richterin
c4165fe4910a556f5bba3c7224fed6d35c3fea57
[ "MIT" ]
null
null
null
import unittest import os import json from marshmallow import ValidationError from expectations import ExpectationType from job_config import JobConfigSchema, JobConfig, DatasetType RESOURCES_PATH = os.path.join(os.path.dirname(__file__), 'resources', 'job_input') class JobConfigTest(unittest.TestCase): def t...
37.026316
96
0.719261
07b890e477b50c2cc63ac84b93f4b4543bf50d8b
229
py
Python
Theories/Algorithms/Recursion1/KthSymbolInGrammar/k_symbol_grammar.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Theories/Algorithms/Recursion1/KthSymbolInGrammar/k_symbol_grammar.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Theories/Algorithms/Recursion1/KthSymbolInGrammar/k_symbol_grammar.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
def kthGrammar(n: int, k: int) -> int: if k == 1: return 0 if n == 1: return 0 if n == 2 and k == 2: return 1 s = kthGrammar(n - 1, (k + 1) // 2) return (1 - s) if k % 2 == 0 else s
17.615385
39
0.419214
9c3972f72de439c3900c60d835a5ea76afa4b902
2,957
py
Python
ladon-server/software/src/python/kafka-file-wrapper/BucketSupervisor.py
LucasRGoes/ladon-io
ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6
[ "MIT" ]
1
2018-04-29T22:33:42.000Z
2018-04-29T22:33:42.000Z
ladon-server/software/src/python/kafka-file-wrapper/BucketSupervisor.py
LucasRGoes/ladon-io
ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6
[ "MIT" ]
null
null
null
ladon-server/software/src/python/kafka-file-wrapper/BucketSupervisor.py
LucasRGoes/ladon-io
ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6
[ "MIT" ]
null
null
null
## IMPORTS ## import logging # Logging: provides a set of convenience functions for simple logging usage import os # OS: this module provides a portable way of using operating system dependent functionality import time # Time: provides various time-related functions from threading import Lock, Th...
27.37963
145
0.700372
92eb3c610eee7dce608ff266e2ae3b5c5a5c2676
11,049
py
Python
packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/topic_document_generate.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/topic_document_generate.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/topic_document_generate.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import List # noqa from watchmen_model.admin import Factor, FactorType, is_aggregation_topic, is_raw_topic, Topic from watchmen_model.common import DataModel from watchmen_model.pipeline_kernel import TopicDataColumnNames from watchmen_storage import as_table_name, ask_decimal_fraction_digits, ask_decimal...
49.77027
107
0.826229
13bcac319067f5103c20d623d69cfdc27397120f
545
py
Python
ANN/e04/e04.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
10
2020-12-08T20:18:15.000Z
2021-06-07T20:00:07.000Z
ANN/e04/e04.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
2
2021-06-28T03:42:13.000Z
2021-06-28T16:53:13.000Z
ANN/e04/e04.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
2
2021-01-14T19:59:20.000Z
2021-06-15T11:53:21.000Z
from pprint import pprint from numpy import array, diag, diagflat, dot, linalg def jacobi(A, b, N, x): D_ = diagflat(diag(A)) L_U = A - D_ D_ = linalg.inv(D_) for i in range(N): x = dot(dot(-D_, L_U), x) + dot(D_, b) print("X(%d) = " % (i + 1), end="") print(x) return x ...
17.03125
52
0.495413
b9353dc39b27b5ee989b3efb6604bf32d07c5907
11,946
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_compute_instance_group_manager_info.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_compute_instance_group_manager_info.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/gcp_compute_instance_group_manager_info.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
35.032258
133
0.629081
6a0fba21a79036d5873079cff6e83cb9f17ae9aa
1,948
py
Python
tests/onegov/winterthur/conftest.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/winterthur/conftest.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/winterthur/conftest.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import pytest import transaction from onegov.core.csv import CSVFile from onegov.core.utils import module_path from onegov.user import User from onegov.winterthur import WinterthurApp from onegov.winterthur.initial_content import create_new_organisation from pathlib import Path from sqlalchemy.orm.session import close...
26.324324
75
0.723819
6a1ee2d7a5253981c03602dcca7f357739f8b4af
15,201
py
Python
python-bildungslogin/ucs-test/97_bildungslogin_python/31_cli_metadata_import.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
python-bildungslogin/ucs-test/97_bildungslogin_python/31_cli_metadata_import.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
python-bildungslogin/ucs-test/97_bildungslogin_python/31_cli_metadata_import.py
univention/bildungslogin
29bebe858a5445dd5566aad594b33b9dd716eca4
[ "MIT" ]
null
null
null
#!/usr/share/ucs-test/runner /usr/bin/py.test -slvv --cov --cov-config=.coveragerc --cov-append --cov-report= # -*- coding: utf-8 -*- # # Copyright 2021 Univention GmbH # # https://www.univention.de/ # # All rights reserved. # # The source code of this program is made available # under the terms of the GNU Affero Gener...
37.440887
109
0.692718