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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5ca78d9193337931f0b65630c2321a753974e302 | 1,112 | py | Python | utils/summaries.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | 2 | 2020-12-22T08:40:05.000Z | 2021-03-30T08:09:44.000Z | utils/summaries.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | utils/summaries.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | import os
import torch
import numpy as np
from torchvision.utils import make_grid
from tensorboardX import SummaryWriter
class TensorboardSummary(object):
def __init__(self, directory):
self.directory = directory
def create_summary(self):
writer = SummaryWriter(log_dir=os.path.join(self.direct... | 44.48 | 107 | 0.714029 |
5cc963fd977636c6d07525cfbfd9f1d82c9ef344 | 12,932 | py | Python | skripte/python/edit_tools/analyse.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/analyse.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/analyse.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
# :Copyright: © 2014 Günter Milde.
# Released without warranty under the terms of the
# GNU General Public License (v. 2 or later)
# :Id: $Id: $
# analyse.py: Sammeln und Sortieren von Teilwörtern
# =================================================
... | 32.989796 | 82 | 0.567507 |
8fde9efc1addcc6dcc2ede9208a4b281dcae2136 | 7,921 | py | Python | CCTV-main/CCTV.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | CCTV-main/CCTV.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | CCTV-main/CCTV.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import os,sys,time,json,requests
from datetime import datetime
saat_ini = datetime.now()
tgl = saat_ini.strftime('%d')
bln = saat_ini.strftime('%m')
thn = saat_ini.strftime('%Y')
waktu_new = (tgl+"-"+bln+"-"+thn)
xnxx="\033[85m"
q="\033[00m"
h2="\033[40m"
b2="\033[44m"
c2="\033[46m"
i2="\033[42m"
u2="\033[45m"
m2="\033... | 41.041451 | 177 | 0.512814 |
854112b3665de925f4a78a9873a2d61fd76dc78b | 927 | py | Python | hello/hello_py.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | hello/hello_py.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | hello/hello_py.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import pickle
import imp
items = [1, 2, 3, "223", 5.0]
pickle.dump(items, open("a.p", "w"))
print(pickle.load(open("a.p")))
try:
imp.reload(sys)
sys.setdefaultencoding('utf-8')
except NameError:
# The only supported default encodings in Python are... | 22.071429 | 61 | 0.647249 |
85c378758cf33329e9d631ddeecfcc10ab846d1a | 4,063 | py | Python | test/test_npu/test_network_ops/test_take.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_take.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_take.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 45.144444 | 104 | 0.599311 |
f12c0b019e8a77ab62f128ef639dd3cc54ccc73f | 1,046 | py | Python | IVTa/2014/BRONNIKOV_I_S/task_9_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/BRONNIKOV_I_S/task_9_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/BRONNIKOV_I_S/task_9_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 9. Вариант 50
# Создайте игру, в которой компьютер выбирает какое-либо слово,
# а игрок должен его отгадать. Компьютер сообщает игроку, сколько
# букв в слове, и дает пять попыток узнать, есть ли какая-либо буква
# в слове, причем программа может отвечать только "Да" и "Нет".
# Вслед за тем игрок должен п... | 32.6875 | 69 | 0.655832 |
f1919c68916a044ec358236cc87cc2fc708dc986 | 3,059 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/turn-defs/turnCount2EdgeCount.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/turn-defs/turnCount2EdgeCount.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/turn-defs/turnCount2EdgeCount.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) 2012-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 39.727273 | 117 | 0.667865 |
7ac75bc2c278f141651a637bdd2863266bc829e1 | 454 | py | Python | python/coding_dojang/decorator_parameter.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/decorator_parameter.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/decorator_parameter.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | def is_multiple(x):
def real_decorator(func):
def wrapper(a, b):
r = func(a, b)
if r % x == 0:
print('{0}의 반환값은 {1}의 배수입니다.'.format(func.__name__, x))
else:
print('{0}의 반환값은 {1}의 배수가 아닙니다.'.format(func.__name__, x))
return r
... | 21.619048 | 74 | 0.506608 |
7093ae35f71163b27efc72b17ae3112854cf9786 | 8,355 | py | Python | examples/language_model/chinesebert/eval_cmrc.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/chinesebert/eval_cmrc.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/language_model/chinesebert/eval_cmrc.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | #encoding=utf8
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless requi... | 32.011494 | 104 | 0.59246 |
8e968c7be28a535c8eaf9db2b05f1c0657f0fc8e | 960 | py | Python | hm/deviceList.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | hm/deviceList.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | hm/deviceList.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | from hm import BaseList, Device
import xml.etree.ElementTree as ET
class DeviceList(BaseList):
def __init__(self, xml):
BaseList.__init__(self, xml)
self.devices = []
self.rebuild(xml)
def rebuild(self, xml):
self.devices = []
xmlp = ET.XMLParser(encoding=self.encoding... | 27.428571 | 70 | 0.586458 |
15ef305cbeb5a0671567e5f5599538041b693b94 | 3,138 | py | Python | src/models/chen2017/transforms.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 2 | 2018-04-27T09:02:15.000Z | 2019-04-19T19:12:13.000Z | src/models/chen2017/transforms.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 1 | 2019-04-19T19:13:08.000Z | 2021-02-22T21:29:55.000Z | src/models/chen2017/transforms.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | null | null | null | import skimage.io
import skimage.segmentation as seg
from skimage.util import img_as_float, img_as_ubyte
from skimage.transform import resize, rotate
from skimage import io
import matplotlib.pyplot as plt
import argparse
import random as rnd
import math
from collections import namedtuple
import numpy as np
class Sca... | 34.108696 | 97 | 0.589866 |
ba98728c84cf22a5e31528d40e9f92a6936477b8 | 326 | py | Python | reddit.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | reddit.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | reddit.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | 1 | 2020-09-30T18:53:05.000Z | 2020-09-30T18:53:05.000Z | #! /usr/bin/env python3
import json
import requests
url = 'https://reddit.com/r/wholesomememes.json'
headers = {'user-agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0'}
r = requests.get(url, headers=headers)
for post in r.json()['data']['children']:
print('')
print(post['data']['u... | 27.166667 | 96 | 0.671779 |
bac6ae2b7c78d816084a61fe50d68747d4c3b7bc | 988 | py | Python | Kapitel_6/_4_abc_example.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_6/_4_abc_example.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_6/_4_abc_example.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | # ABC Modul um abstracte Methode zu erstellen, welche von den Kindklassen der PCBase
# Klasse nachträglich selbst implementiert werden müssen.
from abc import ABC, abstractmethod
# Base-Klasse, die Methoden als abstracte Methoden kennzeichnet, damit jene von
# einer vererbten Klasse nachträglich implementiert werden... | 26.702703 | 87 | 0.729757 |
032ca08bedba891c12f9c3e2efc46a290def2ed9 | 620 | py | Python | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/slack/python/slack_helper.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 103 | 2019-08-30T10:04:40.000Z | 2022-03-30T22:14:44.000Z | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/slack/python/slack_helper.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 6 | 2021-04-08T08:36:27.000Z | 2021-10-01T07:47:17.000Z | 2-resources/__CHEAT-SHEETS/cheatsheets-master/cheatsheets-master/slack/python/slack_helper.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 51 | 2019-06-10T06:11:46.000Z | 2022-03-30T16:33:05.000Z | # pip install slackclient
# https://github.com/JPStrydom/Crypto-Trading-Bot/issues/10
from slack import WebClient as SlackClient
legacy_token = "" # https://api.slack.com/custom-integrations/legacy-tokens
slack_client = SlackClient(legacy_token)
def list_channels():
name_to_id = {}
res = slack_client.api_call... | 34.444444 | 103 | 0.720968 |
0371c38619da50e382ace8fd4b5fa38d2140165a | 689 | py | Python | Algorithms/DynamicProgramming/Edit Distance/edit_distance_dynamic.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 26 | 2019-07-17T11:05:43.000Z | 2022-02-06T08:31:40.000Z | Algorithms/DynamicProgramming/Edit Distance/edit_distance_dynamic.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 7 | 2019-07-16T19:52:25.000Z | 2022-01-08T08:03:44.000Z | Algorithms/DynamicProgramming/Edit Distance/edit_distance_dynamic.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 19 | 2020-01-14T02:44:28.000Z | 2021-12-27T17:31:59.000Z | def edit(s1, s2, x, y):
if arr[x-1][y-1] != -1:
return arr[x-1][y-1]
if x==0:
arr[x-1][y-1] = y
return y
if y==0:
arr[x-1][y-1] = x
return x
if s1[x-1] == s2[y-1]:
arr[x-1][y-1] = edit(s1, s2, x-1, y-1)
return arr[x-1][y-1]
return min(edit... | 22.225806 | 86 | 0.554427 |
cef4c2d462390fc2940c28310cbbe567e1f72685 | 1,888 | py | Python | game_of_life/convolution_based.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | game_of_life/convolution_based.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | game_of_life/convolution_based.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | # %%
import numpy as np
from matplotlib import pyplot as plt
import matplotlib.animation as animation
import scipy.signal
class GameOfLife:
def __init__(self, shape=(3, 3)):
self.shape = shape
self.state = np.zeros(self.shape, dtype=int)
# kernel to sum
self.kernel = np.ones((3, 3)... | 29.968254 | 78 | 0.612818 |
06a20b3896deb24d7a21b42b2273b48d5895998e | 13,028 | py | Python | radiomics/extract.py | RimeT/p3_radio | 3d522a4356c62255cd93c6d74eb388a2e474dd00 | [
"Apache-2.0"
] | null | null | null | radiomics/extract.py | RimeT/p3_radio | 3d522a4356c62255cd93c6d74eb388a2e474dd00 | [
"Apache-2.0"
] | null | null | null | radiomics/extract.py | RimeT/p3_radio | 3d522a4356c62255cd93c6d74eb388a2e474dd00 | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
import argparse
import pandas as pd
import csv
import logging
import os
import re
import shutil
import tempfile
import threading
import signal
import numpy as np
import SimpleITK as sitk
from datetime import datetime
from collections import OrderedDict
from multiprocessing import cpu_count, Pool... | 42.575163 | 128 | 0.615981 |
2303179639b395d2ab926cd58e8eeda93e029a68 | 703 | py | Python | mod/units/srtp_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 1 | 2015-06-28T15:26:52.000Z | 2015-06-28T15:26:52.000Z | mod/units/srtp_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | null | null | null | mod/units/srtp_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 6 | 2015-03-20T16:36:22.000Z | 2021-08-28T07:58:18.000Z | # -*- coding: utf-8 -*-
# @Date : 2014-07-02 01:44:46
# @Author : xindervella@gamil.com
import tornado.web
from ..models.srtp import Detail as SRTPD
class SRTPHandler(tornado.web.RequestHandler):
@property
def db(self):
return self.application.db
def get(self, openid):
... | 29.291667 | 74 | 0.600284 |
8879e545372e7f1d91c4fc8e41be9f87dc519b9a | 14,963 | py | Python | src/onegov/activity/collections/activity.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/collections/activity.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/collections/activity.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import secrets
import sedate
from copy import copy
from enum import IntEnum
from onegov.activity.models import Activity, Occasion, OccasionDate, Period
from onegov.activity.utils import date_range_decode
from onegov.activity.utils import date_range_encode
from onegov.activity.utils import merge_ranges
from onegov.acti... | 30.412602 | 79 | 0.579763 |
ee585a5a781695edc5bee427447cefd1f44c7b03 | 3,620 | py | Python | quant/brokers/_gate.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 7 | 2017-10-22T15:00:09.000Z | 2019-09-19T11:45:43.000Z | quant/brokers/_gate.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 1 | 2018-01-19T16:19:40.000Z | 2018-01-19T16:19:40.000Z | quant/brokers/_gate.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 5 | 2017-12-11T15:10:29.000Z | 2018-12-21T17:40:58.000Z | # coding=utf-8
# Copyright (C) 2017, Philsong <songbohr@gmail.com>
from quant import config
from .broker import Broker
from quant.api.gate import PrivateClient as GateClient
import logging
# python -m quant.cli -m Bitfinex_BCH_BTC get-balance
class Gate(Broker):
def __init__(self, pair_code, api_key=None, api_se... | 31.206897 | 92 | 0.577072 |
6d94e2993d7abaeee9bd1b648b7999081e63281a | 252 | py | Python | adv_project/urls.py | scottrenz/mud_build | 42640a47ab4c5ecdfd1cdc55168d9d394850c68a | [
"MIT"
] | 2 | 2021-02-22T02:55:33.000Z | 2021-02-24T09:12:34.000Z | adv_project/urls.py | scottrenz/mud_build | 42640a47ab4c5ecdfd1cdc55168d9d394850c68a | [
"MIT"
] | 9 | 2020-01-07T16:49:07.000Z | 2021-09-22T18:24:59.000Z | cs/lambda_cs/04_cs_build_week_1/adv_project/urls.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 1 | 2019-11-19T00:54:54.000Z | 2019-11-19T00:54:54.000Z | from django.contrib import admin
from django.urls import path, include
from django.conf.urls import include
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('api.urls')),
path('api/adv/', include('adventure.urls')),
]
| 25.2 | 48 | 0.690476 |
6dd277d3ce2bfddde329636de040f24850a281cc | 2,877 | py | Python | src/onegov/activity/matching/utils.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/matching/utils.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/matching/utils.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity import log
from onegov.activity.utils import dates_overlap
from sortedcontainers import SortedSet
def overlaps(booking, other, minutes_between=0, alignment=None,
with_anti_affinity_check=False):
""" Returns true if the given booking overlaps with the given booking
or occasion... | 26.154545 | 78 | 0.643031 |
6de02c175c5a3b0569693e61aabb29ffefdce17b | 629 | py | Python | tests/test_002_user.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 8 | 2019-11-26T13:34:46.000Z | 2021-06-21T13:41:57.000Z | src/tests/test_002_user.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 93 | 2019-12-16T09:29:10.000Z | 2021-04-24T12:03:33.000Z | src/tests/test_002_user.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 2 | 2020-12-03T12:43:19.000Z | 2020-12-22T21:48:47.000Z | from tests.MyTestCase import MyTestCase
from tests.MyFuncLogin import loginAsLukasUser
class TestUser(MyTestCase):
"""
Setup and Teardown functions are specified in
MyTestCase
"""
# Tests
def test_login_user(self):
"""
This is a "positive" Systemtest as Blackboxtes... | 25.16 | 97 | 0.600954 |
113defa6c17646d72867b8721613277f77858dd2 | 459 | py | Python | Python/Random/List-Comprehensions/00.00-List-Comprehensions.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Random/List-Comprehensions/00.00-List-Comprehensions.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Random/List-Comprehensions/00.00-List-Comprehensions.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | from math import sqrt
square_li = []
for i in range(1, 11):
square_li.append(i * i)
print(square_li)
square_li2 = [x * x for x in range(1, 11)]
print(square_li2)
even = []
for i in range(1, 11):
if i % 2 == 0:
even.append(i)
print(even)
even2 = [x for x in range(1, 11) if x % 2 == 0]
print(even2)
e... | 17.653846 | 57 | 0.592593 |
114bae91464e6f57d2f302d2a59948fe2f04b8a8 | 648 | py | Python | brute_force_zip_password_cracker-master/brute_force_zip_1.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | brute_force_zip_password_cracker-master/brute_force_zip_1.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | brute_force_zip_password_cracker-master/brute_force_zip_1.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import zipfile
from tqdm import tqdm
from time import sleep
wordlist = "PATH TO WORDLIST"
zip_file = "PATH TO PASSWORD-PROTECTED ZIP FILE"
zip_file = zipfile.ZipFile(zip_file)
n_words = len(list(open(wordlist, "rb")))
print("Total passwords to test:", n_words)
with open(wordlist, "rb") as wordlist:
for... | 28.173913 | 64 | 0.594136 |
3a5a06189cecd9d893d349afad9af9b45119461f | 2,628 | py | Python | src/onegov/agency/views/memberships.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/views/memberships.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/views/memberships.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath import redirect
from morepath.request import Response
from onegov.agency import _
from onegov.agency import AgencyApp
from onegov.agency.forms import MembershipForm
from onegov.agency.layout import MembershipLayout
from onegov.agency.models import AgencyMembershipMoveWithinAgency
from onegov.agency.models... | 24.792453 | 73 | 0.731355 |
42f3020513587b40f03474d4d3d280309a0189a8 | 470 | py | Python | setup.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | setup.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | setup.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | from cx_Freeze import setup, Executable
#Aqui onde contém o compilador do sistema
setup(
name = "SODA",
version = "1.6",
description = "Um sistema para facilitar sua vida, futuramente sera uma linguagem de programacao",
options = {"build_exe": {
'packages': ["os","sys","math"],
'include... | 33.571429 | 102 | 0.634043 |
c2f86b9e0c21439f59331bc2fe7ead07a88c6768 | 642 | py | Python | Curso_Python/Secao5-modulos-uteis/132_sys-argv_executando_arquivos_como_argumentos_sistema/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao5-modulos-uteis/132_sys-argv_executando_arquivos_como_argumentos_sistema/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao5-modulos-uteis/132_sys-argv_executando_arquivos_como_argumentos_sistema/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | # executa no terminal do pycharm
import sys
import os
argumentos = sys.argv
qtd_argumentos = len(argumentos)
if qtd_argumentos <= 1:
print('Faltando argumentos')
print('-a', 'Para listar todos os arquivos nesta pasta ', sep='\t')
print('-d', 'Para listar todos os diretorios nesta pasta', sep='\t')
s... | 20.709677 | 72 | 0.637072 |
6c1043b428cd2a631c5be835e61bbeaf7a477abe | 582 | py | Python | createDict.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | createDict.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | createDict.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -*- coding: utf-8 -*-
# @Author: lock
# @Date: 2016-11-02 18:52:07
# @Last Modified by: lock
# @Last Modified time: 2016-11-02 18:55:30
from random import Random
def random_str(randomlength=8):
str = ''
chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789'
length = len(chars) - 1
... | 23.28 | 76 | 0.646048 |
6c4abd53898fff0f880628272d16e74348ea89ef | 450 | py | Python | INBa/2015/Kishukov_N/task_3_10.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Kishukov_N/task_3_10.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Kishukov_N/task_3_10.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3. Вариант 10
# Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Юстиниан. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Кишуков Назир
# 30.02.2016
print ("Под каким псевдонимом наиболее известен Игорь Васильевич ... | 40.909091 | 201 | 0.777778 |
6c5502371746caa6b445324ca7f3199a90287254 | 6,532 | py | Python | chillow/service/ai/search_tree_node.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 3 | 2021-01-17T23:32:07.000Z | 2022-01-30T14:49:16.000Z | chillow/service/ai/search_tree_node.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-01-17T13:37:56.000Z | 2021-04-14T12:28:49.000Z | chillow/service/ai/search_tree_node.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-04-02T14:53:38.000Z | 2021-04-20T11:10:17.000Z | from dataclasses import dataclass
from typing import Type, Any, List, Tuple, Optional
from chillow.exceptions import InvalidPlayerMoveException
from chillow.model.action import Action
from chillow.model.game import Game
from chillow.model.player import Player
from chillow.service.game_service import GameService
@dat... | 46 | 124 | 0.625536 |
6c79b52cbcc8a493b6ef0d797c0ab694221314aa | 4,397 | py | Python | test/test_npu/test_mkldnn_convolution.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_mkldnn_convolution.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_mkldnn_convolution.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 44.414141 | 122 | 0.671822 |
660f9ca6018bbf84e8051ef23c1fb98e81cc59de | 3,006 | py | Python | GeniNacTrigger/Service/engine/aci.py | HyechurnJang/genaci | aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3 | [
"Apache-2.0"
] | null | null | null | GeniNacTrigger/Service/engine/aci.py | HyechurnJang/genaci | aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3 | [
"Apache-2.0"
] | null | null | null | GeniNacTrigger/Service/engine/aci.py | HyechurnJang/genaci | aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Created on 2018. 5. 11.
@author: HyechurnJang
'''
import re
import json
import pygics
from acidipy import Controller, Event
class ACI:
class EPEvent(Event):
def __init__(self, aci): self.aci = aci
def handle(self, status, obj):
try: self... | 35.364706 | 98 | 0.518629 |
6635ca765b30b46d49119400f675c253fe2af54e | 2,011 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/lib/testUtil.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/lib/testUtil.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/lib/testUtil.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... | 31.920635 | 77 | 0.69816 |
a567385f70fa6e552dbf66002a9008cd83c88f4f | 2,138 | py | Python | pocketthrone/entities/mod.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | 4 | 2016-06-05T16:48:04.000Z | 2020-03-23T20:06:06.000Z | pocketthrone/entities/mod.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | pocketthrone/entities/mod.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | __all__ = "Mod"
from pocketthrone.managers.filemanager import FileManager
class Mod:
# engine identifiers
_id = -1
_tag = "[Mod] "
basename = None
# entity strings
name = None
desc = ""
desc_de = ""
author = ""
# entity flags
is_initialized = False
is_disabled = False
is_empty = False
def __init__(se... | 23.755556 | 112 | 0.692703 |
3c597daa8ebbd9e68b8ff3750282fb70be6fd331 | 284 | py | Python | zencad/examples/1.GeomPrim/1.prim3d/platonic.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/1.GeomPrim/1.prim3d/platonic.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/1.GeomPrim/1.prim3d/platonic.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
from zencad import *
tetra = tetrahedron(10)
hexa = hexahedron(10)
octa = octahedron(10)
dodeca = dodecahedron(10)
icosa = icosahedron(10)
disp(tetra)
disp(hexa.movX(20))
disp(octa.movX(40))
disp(dodeca.movX(60))
disp(icosa.movX(80))
show()
| 14.947368 | 25 | 0.711268 |
3c5d612c181cf255369a792c4fad374f0fbbdf68 | 2,033 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_0/apply_user_permissions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v4_0/apply_user_permissions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_0/apply_user_permissions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from erpnext.hr.doctype.employee.employee import EmployeeUserDisabledError
def execute():
update_hr_permissions()
update_permissions()
... | 39.862745 | 119 | 0.741269 |
3c91f0d0d8c7dc734bab4715550fd0b9b4cd7c49 | 2,460 | py | Python | local_socket/mySerial/myserial.py | hanyanze/FS_AILPB | 7756551cf926aa6296ec851dd696c97d56e06bca | [
"Apache-2.0"
] | 1 | 2020-07-16T02:52:47.000Z | 2020-07-16T02:52:47.000Z | local_socket/mySerial/myserial.py | hanyanze/FS_AILPB | 7756551cf926aa6296ec851dd696c97d56e06bca | [
"Apache-2.0"
] | null | null | null | local_socket/mySerial/myserial.py | hanyanze/FS_AILPB | 7756551cf926aa6296ec851dd696c97d56e06bca | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# coding=UTF-8
import os
import re
import time
import serial
import binascii
import crcmod.predefined
class CRCGenerator(object):
def __init__(self):
self.module = 'crc-8'
def crc_8(self, hexData):
crc8 = crcmod.predefined.Crc(self.module)
hexData =binascii.unhexlify... | 26.73913 | 74 | 0.537805 |
b1cf73980224766200dd741c93f107a63b066e8c | 474 | py | Python | webapp/flask_deploy_model/app.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | webapp/flask_deploy_model/app.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | webapp/flask_deploy_model/app.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from flask import Flask, jsonify, request
import joblib
app = Flask(__name__)
@app.route('/', methods=['POST', 'GET'])
def index():
if (request.method == 'POST'):
data = request.get_json()
house_price = float(data['area'])
lin_reg = joblib.load('./linear_reg.pkl')
return jsonify(l... | 24.947368 | 65 | 0.618143 |
59d0bbae99a66d27dda0293e97094747ba29010b | 2,671 | py | Python | test/test_npu/test_constant_pad_nd.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_constant_pad_nd.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_constant_pad_nd.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 37.619718 | 90 | 0.593411 |
e65753bae1dfc7bc020f3e31fea2cb478f34542f | 474 | py | Python | Algorithms/Implementation/Workbook.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Workbook.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Workbook.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
n, k = map(int, raw_input().split())
t_list = map(int, raw_input().split())
page = 0
count = 0
for t in t_list:
page_num = t/k if t%k == 0 else t/k + 1
for i in xrange(1, page_num+1):
page += 1
t_scope_min = (i-1) * k + 1
if i < page_num:
t_sco... | 18.96 | 55 | 0.49789 |
554774e79c987c7e35d264e23776bc3f7a6bcb2c | 3,299 | py | Python | research/cv/DDM/dataset/cityscapes.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/DDM/dataset/cityscapes.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/DDM/dataset/cityscapes.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.2375 | 103 | 0.658381 |
34f578c3ca8b9e0b6ba49137544d9ae958b52db3 | 3,774 | py | Python | nz_crawl_demo/day6/douyin.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day6/douyin.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day6/douyin.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import requests
from lxml import etree
start_url = ' https://www.iesdouyin.com/share/user/88445518961'
def get_real_num(content):
content = content.replace(' &#', '0').replace('; ', '')
regex_list = [
{'name': ['0xe602', '0xe60e', '0xe618'], 'val... | 41.472527 | 162 | 0.577636 |
fd3aa9bf5d003fba068b2a21c085951c0a848ddc | 568 | py | Python | flask/microblog-login/db_create.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | flask/microblog-login/db_create.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | flask/microblog-login/db_create.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from migrate.versioning import api
from config import config
from app import db
import os.path
db.create_all()
SQLALCHEMY_DATABASE_URI = config.get('SQLALCHEMY_DATABASE_URI')
SQLALCHEMY_MIGRATE_REPO = config.get('SQLALCHEMY_MIGRATE_REPO')
if not os.path.exists(SQLALCHEMY_MIGRATE_REPO):
ap... | 35.5 | 111 | 0.820423 |
b5f536e00dbb1d769c9a2b0a150b7904e51e8466 | 4,979 | py | Python | methods/t5/eval.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | 3 | 2021-07-06T20:02:31.000Z | 2022-03-27T13:13:01.000Z | methods/t5/eval.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | null | null | null | methods/t5/eval.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#% python3 evaluator.py -qa datasets/csqa/questions.jsonl -p predictions.csv -o metrics.json
# python eval.py -qa datasets/csqa/dev_rand_split.jsonl -p outputs/csqa/dev.csv -o metrics.json
import csv
from typing import *
import logging
import os
import sys
import json
import argparse
... | 38.898438 | 119 | 0.634063 |
bd291eafeb4bf7a3f15f69300b83212c1a5e9bac | 17,163 | py | Python | service/wkb/tf_continue_train/select_fund.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/wkb/tf_continue_train/select_fund.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/wkb/tf_continue_train/select_fund.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pymysql as pdb
import numpy as np
import smtplib
import tensorflow as tf
from matplotlib import pyplot as plt
def sendmail(Text):
# 在python3中该函数出现中文字符会Unicodeencodeerror
Server = "smtp.qq.com" # QQ邮箱的SMTP服务器地址
Subject = "znzs" # 邮件主题,
To = "cmbc95568@139.co... | 117.554795 | 11,497 | 0.626988 |
1fd1f6c94c55543795ad81ce348da247693dbdf3 | 12,176 | py | Python | verto/tests/ButtonLinkTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/tests/ButtonLinkTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/tests/ButtonLinkTest.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | import markdown
from unittest.mock import Mock
from verto.VertoExtension import VertoExtension
from verto.processors.GenericTagBlockProcessor import GenericTagBlockProcessor
from verto.errors.ArgumentMissingError import ArgumentMissingError
from verto.tests.ProcessorTest import ProcessorTest
class ButtonLinkTest(Pro... | 48.31746 | 199 | 0.695056 |
7b35c07ad4fccf26c66011ce5b622bd0302c28ba | 138 | py | Python | python/python_backup/PRAC_PYTHON/avg.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/avg.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/avg.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a=input("enter a no")
b=input("enter second no")
c=input("enter third no")
d=input("enter fourth no")
s=(a+b+c+d)/2
print "average",s | 23 | 27 | 0.644928 |
7b3c707f2e967aa6be6c7f3f8adc4f376d689cd4 | 62,455 | py | Python | Packs/BluelivThreatContext/Integrations/BluelivThreatContext/BluelivThreatContext_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/BluelivThreatContext/Integrations/BluelivThreatContext/BluelivThreatContext_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/BluelivThreatContext/Integrations/BluelivThreatContext/BluelivThreatContext_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from BluelivThreatContext import Client, blueliv_threatActor, blueliv_campaign, blueliv_malware, blueliv_indicatorIp, \
blueliv_indicatorFqdn, blueliv_indicatorCs, blueliv_attackPattern, blueliv_tool, \
blueliv_signature, blueliv_cve
def test_blueliv_threatActor(mocker, requests_... | 46.297257 | 120 | 0.43886 |
570bc7f724f0fc5d508d017171cb31c9ee18d0e6 | 1,494 | py | Python | python/en/archive/weather_python_code/download_weather_forecast.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/weather_python_code/download_weather_forecast.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/weather_python_code/download_weather_forecast.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
download_weather_forecast.py
$ chmod 766 download_weather_forecast.py
$ ./download_weather_forecast.py 108
"""
import sys
def get_weather_info( area_code, file_name='weather.html', save=True ):
import urllib.request
import urllib.parse
area_code_dict = { "전국": ... | 28.188679 | 72 | 0.487282 |
5739d040700fdc7c5b9da2832fb37398c691d765 | 1,518 | py | Python | src/autograph/services/autograph/session.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | src/autograph/services/autograph/session.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | src/autograph/services/autograph/session.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | import httpx
class Session:
''' Класс для работы с AutoGraph '''
auth_params: dict | None = None # Параметры для отправки запросов
def __init__(self, api: str, login: str, password: str, time_difference: int) -> None:
self.api, self.login, self.password, self.time_difference = api, login, passw... | 25.728814 | 105 | 0.525033 |
9e0e7684edd356111555dc8fb64e36a2fcc670c4 | 55 | py | Python | notebooks/utils/__init__.py | k4t0mono/ipln | ba71860bc38df52780903f647fb2404c61a6b3f2 | [
"BSD-2-Clause"
] | null | null | null | notebooks/utils/__init__.py | k4t0mono/ipln | ba71860bc38df52780903f647fb2404c61a6b3f2 | [
"BSD-2-Clause"
] | 2 | 2020-03-24T17:06:03.000Z | 2020-03-31T02:16:40.000Z | notebooks/utils/__init__.py | k4t0mono/ipln | ba71860bc38df52780903f647fb2404c61a6b3f2 | [
"BSD-2-Clause"
] | null | null | null | __all__ = [ 'lexical', 'tui', 'syntax', 'semantical' ]
| 27.5 | 54 | 0.6 |
197b583a2b156c4b4d3b4bf2f8886b533e951d8b | 386 | py | Python | Alexa_Rank_Checker-main/Alexa.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Alexa_Rank_Checker-main/Alexa.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Alexa_Rank_Checker-main/Alexa.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #Note : use lowercase when using it
#gunakan Huruf kecil saat menggunakannya
#Example : blog-gan.org
#if you run : Blog-gan.org => Error
import requests
print(
"""\033[0m Alexa Rank Checker """
)
Domain = raw_input('Domain ~:# ')
Alexa = requests.get('https://whoisdog.com/tool/domain-alexa-checker/index.php?act... | 24.125 | 108 | 0.696891 |
273e3d64fd070091df45a3c1a14b3cbb0aa334ff | 1,878 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOses.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOses.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOses.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from qgis.core import QgsProject, QgsVectorLayer
def run(id, gtotool, config, debug):
try:
#gto
info = gtotool.info
iface = gtotool.iface
gtomain= gtotool.gtomain
#tool data
mode=config["mode"]#"all"/"current"/"<layername>"
... | 35.433962 | 70 | 0.56869 |
2758d2a562ec8ebbfd3fc441204331ab2750be3f | 2,904 | py | Python | pages/extensions/amp_dev/markdown_extras/block_filter.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 300 | 2015-12-09T20:35:37.000Z | 2019-07-16T06:41:29.000Z | pages/extensions/amp_dev/markdown_extras/block_filter.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 2,099 | 2019-07-16T13:24:27.000Z | 2022-03-26T12:31:51.000Z | pages/extensions/amp_dev/markdown_extras/block_filter.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 543 | 2019-07-18T09:06:14.000Z | 2022-03-31T02:43:10.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import re
FILTER_TRIGGER = '[filter'
FILTER_TAG_PATTERN = re.compile(r'\[filter .*?\](?!\()', re.MULTILINE)
ATTRIBUTE_PATTERN = re.compile(r'(\w+)=(?:\"|\')(.*?)(?:\"|\')')
FILTER_END_TAG_PATTERN = '[/filter]'
DEFAULT_FORMATS = 'websites, ad... | 34.987952 | 133 | 0.659435 |
fd89e99ebaf4b8c1cf5070efebff0880e930117d | 2,649 | py | Python | loesung/blatt1b_4f.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | 1 | 2019-09-27T13:47:20.000Z | 2019-09-27T13:47:20.000Z | loesung/blatt1b_4f.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | loesung/blatt1b_4f.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | # Hier soll vom User zwei Zahlen abgefragt werden und eine
# Multiplikationstabelle damit erstellt werden.
# Impotiere den 10er Logarithmus aus der Matherweiterung.
from math import log10
correct_width = False
while not correct_width:
try:
width = int(input("Wie viele Spalten soll die Tabelle haben?\n"))... | 31.535714 | 80 | 0.694979 |
e306d2b2991fa279e9f75e9610fa179dcca7b77f | 334 | py | Python | leetcode/389-Find-the-Difference/FindtheDifference_Hash.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-04-07T15:08:53.000Z | 2016-04-07T15:08:53.000Z | leetcode/389-Find-the-Difference/FindtheDifference_Hash.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/389-Find-the-Difference/FindtheDifference_Hash.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def findTheDifference(self, s, t):
"""
:type s: str
:type t: str
:rtype: str
"""
diff = {}
for w in s:
diff[w] = diff.get(w, 0) + 1
for w in t:
if diff.get(w, 0) == 0:
return w
... | 22.266667 | 40 | 0.38024 |
3263a9b8a28da471843a788f1791a9c17a5c7803 | 9,004 | py | Python | crawl_badou.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 5 | 2020-08-17T08:37:16.000Z | 2021-06-07T05:02:05.000Z | crawl_badou.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | null | null | null | crawl_badou.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 1 | 2021-06-07T05:02:10.000Z | 2021-06-07T05:02:10.000Z | import requests
import json
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.chrome.options import Options
from browsermobproxy import Server
import time
import os
import pickle
import datetime
import re
import CralwerSet.connect_mysql as connect_mysql
imp... | 35.87251 | 223 | 0.531542 |
4104e1b2204c30eaa04e5a79ba3c318132da8a83 | 12,396 | py | Python | research/cv/FaceRecognition/infer/sdk/python_facerecognition/main.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/FaceRecognition/infer/sdk/python_facerecognition/main.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/FaceRecognition/infer/sdk/python_facerecognition/main.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # coding = utf-8
"""
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable... | 36.892857 | 119 | 0.654647 |
eb2be21c34231e3d0cc80154608bc18607b022ff | 6,094 | py | Python | code/5/MaxWalkSat.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/5/MaxWalkSat.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/5/MaxWalkSat.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | from __future__ import division, print_function
from sys import float_info, stdout, argv
from math import e
from random import *
# input is a tuple with five dimensions
def f1(s):
return -(25 * (s.x1 - 2) ** 2 + (s.x2 - 2) ** 2 + ((s.x3 - 1) ** 2) * ((s.x4 - 4) ** 2) + (s.x5 - 1) ** 2)
def f2(s):
return s.x... | 30.47 | 110 | 0.339022 |
de5e50f7a251697208c681fde6543db6bc9c27a5 | 56 | py | Python | python/python_backup/PRAC_PYTHON/pol.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/pol.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/pol.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | s=5
for i in range(1,11,1):
s=s+(10*i)
print s
| 9.333333 | 24 | 0.5 |
9d2034c6c643e5487ef5bdf8384366e028c07f78 | 380 | py | Python | HXP/2020/crypto/minithorpe/executor.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | HXP/2020/crypto/octothorpe/executor.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | HXP/2020/crypto/octothorpe/executor.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 subprocess import run
from sys import stdin, stdout
from struct import pack
command = stdin.buffer.readline().rstrip(b'\n')
result = run(command, shell=True, capture_output=True, timeout=0.5)
header = pack('III', result.returncode, len(result.stdout), len(result.stderr))
message = header +... | 31.666667 | 79 | 0.760526 |
19d296a4e47923ac01b8731ec296fce1fa03029c | 10,796 | py | Python | Integrations/python/deephaven/PerformanceTools/__init__.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | Integrations/python/deephaven/PerformanceTools/__init__.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 1 | 2022-03-03T21:24:40.000Z | 2022-03-03T21:24:54.000Z | Integrations/python/deephaven/PerformanceTools/__init__.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null |
"""
Tools for users to analyze the performance of the Deephaven system and Deephaven queries.
Note: Some functions return a dictionary of tables and plots. All of the values in the dictionary can be added to the local
namespace for easy analysis. For example::
locals().update(persistentQueryStatusMonitor())
"""... | 42.337255 | 261 | 0.734253 |
3e68e56e94cb990ed447b34709324b2a81d487a6 | 9,283 | py | Python | repo/service.vpn.manager/libs/ipinfo.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/service.vpn.manager/libs/ipinfo.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/service.vpn.manager/libs/ipinfo.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Zomboided
#
# 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 3 of the License, or
# (at your... | 36.837302 | 143 | 0.611117 |
e42ef29e021aa02abecade340e8fbae0e9068165 | 1,446 | py | Python | main.py | bjoernh/immunsicht_backend | dae264a01da775bc99edf89afabf0b9759682d1b | [
"MIT"
] | 1 | 2020-04-06T23:17:55.000Z | 2020-04-06T23:17:55.000Z | main.py | bjoernh/immunsicht_backend | dae264a01da775bc99edf89afabf0b9759682d1b | [
"MIT"
] | null | null | null | main.py | bjoernh/immunsicht_backend | dae264a01da775bc99edf89afabf0b9759682d1b | [
"MIT"
] | null | null | null | from enum import Enum
from fastapi import FastAPI
from pydantic import BaseModel
from datetime import date
from pprint import pprint
fake_db = [{
"case_code": "345dfgdf4r5",
"citizen_id": 34554,
"insurance_company": "Techniker Krankenkasse",
"first_name": "Hans",
"last_name": "Mueller",
"street... | 22.59375 | 61 | 0.660443 |
5f64dd91807cbcf01a83da0b9350224fe93c9a5b | 4,851 | py | Python | src/onegov/server/config.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/server/config.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/server/config.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import yaml
from onegov.server import errors
from onegov.server.utils import load_class
class Config(object):
""" Represents the configuration of the server. """
def __init__(self, configuration):
""" Load the given configuration, which is a list of dictionaries.
Each dictionary is loaded by... | 31.705882 | 79 | 0.63121 |
5f8a476b8ebd2ab14856b2e996c34d286036a5b8 | 1,002 | py | Python | exercises/en/test_04_11_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/en/test_04_11_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/en/test_04_11_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
len(TRAINING_DATA) == 3
), "Looks like there's something wrong with the data. Expected 3 examples."
assert all(
len(entry) == 2 and isinstance(entry[1], dict) for entry in TRAINING_DATA
), "Incorrect training data format. Expected a list of tuples where the second el... | 55.666667 | 102 | 0.651697 |
4b80e3b3bf5f86e2b39c5bd66e9c0a46bb9845d7 | 27,742 | py | Python | restToMongo.py | WeDoThingsPTP/YACS5e-cloud | e3869d66ff7f83c2274f8ee9dc4bddc2b95f28d4 | [
"MIT"
] | null | null | null | restToMongo.py | WeDoThingsPTP/YACS5e-cloud | e3869d66ff7f83c2274f8ee9dc4bddc2b95f28d4 | [
"MIT"
] | 1 | 2017-10-19T18:25:29.000Z | 2017-10-19T18:25:29.000Z | restToMongo.py | WeDoThingsPTP/YACS5e-cloud | e3869d66ff7f83c2274f8ee9dc4bddc2b95f28d4 | [
"MIT"
] | 2 | 2017-10-17T21:19:59.000Z | 2017-10-18T07:57:53.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import requests
import json
import sys
from pymongo import MongoClient
rest_url = 'http://dnd5eapi.co/api/'
def ability_scores(database):
result = requests.get(rest_url + 'ability-scores').json()
for iterator in range(result['count']):
result_item = request... | 42.354198 | 101 | 0.508795 |
0a1a18c540ef09b300195f3c7cff20d620c96062 | 7,243 | py | Python | tests/nlu/featurizers/test_spacy_featurizer.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 37 | 2019-06-07T07:39:00.000Z | 2022-01-27T08:32:57.000Z | tests/nlu/featurizers/test_spacy_featurizer.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 216 | 2020-09-20T13:05:58.000Z | 2022-03-28T12:10:24.000Z | tests/nlu/featurizers/test_spacy_featurizer.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 65 | 2019-05-21T12:16:53.000Z | 2022-02-23T10:54:15.000Z | import numpy as np
import pytest
from rasa.shared.nlu.training_data import loading
from rasa.shared.nlu.training_data.training_data import TrainingData
from rasa.shared.nlu.training_data.message import Message
from rasa.nlu.config import RasaNLUModelConfig
from rasa.nlu.featurizers.dense_featurizer.spacy_featurizer im... | 32.626126 | 87 | 0.695154 |
0a4c9d77da8af69f33efd82abd4b00052704c7dc | 2,735 | py | Python | scriptsForPreprocessing/viewer_for_data.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2022-01-03T14:00:17.000Z | 2022-01-03T14:00:17.000Z | scriptsForPreprocessing/viewer_for_data.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | null | null | null | scriptsForPreprocessing/viewer_for_data.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2021-12-21T09:50:53.000Z | 2021-12-21T09:50:53.000Z | import os, json
import random
import cv2
import numpy as np
from PIL import Image, ImageDraw
def random_color():
levels = range(32, 256, 32)
return tuple(random.choice(levels) for _ in range(3))
# import data
path_to_json = r'resources/parsing/via_region_data.json'
# path to augmented dataset
path_to_aug_d... | 38.521127 | 138 | 0.612431 |
6a61bf16154a31d5742fbda3e2433c79170bef37 | 1,380 | py | Python | 6_ObjectOriented/class_methods.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 6_ObjectOriented/class_methods.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 6_ObjectOriented/class_methods.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | # instance method - klassenabhängig
# static method - klassenunabhängig
# class method - verändert Zustand einer Klasse (Bsp.: 2ter Konstruktor)
from time import localtime
class Date:
def __init__(self, year, month, day):
self.year = year
self.month = month
self.day = day
# instance m... | 28.75 | 93 | 0.652174 |
6ac44d655018254a0eae5033b3524291f20b288f | 3,291 | py | Python | src/workflows/testdlg/daliuge/main.py | ska-telescope/sdp-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 2 | 2019-07-15T09:49:34.000Z | 2019-10-14T16:04:17.000Z | src/workflows/testdlg/daliuge/main.py | ska-telescope/sdp-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 17 | 2019-07-15T14:51:50.000Z | 2021-06-02T00:29:43.000Z | src/workflows/testdlg/daliuge/main.py | ska-telescope/sdp-configuration-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 1 | 2019-10-10T08:16:48.000Z | 2019-10-10T08:16:48.000Z | #
# ICRAR - International Centre for Radio Astronomy Research
# (c) UWA - The University of Western Australia, 2019
# Copyright by UWA (in the framework of the ICRAR)
# All rights reserved
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser G... | 31.342857 | 80 | 0.675479 |
0a785579446af41eef4ba99ba305c28581375cc4 | 10,591 | py | Python | python/oneflow/compatible/single_client/test/ops/test_constant_pad2d.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/test/ops/test_constant_pad2d.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/test/ops/test_constant_pad2d.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 37.424028 | 87 | 0.62657 |
0a9ebefbf24b484351d490ff34069d72f9913b98 | 1,531 | py | Python | euler-33.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-33.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-33.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | def zmozi_sez(sez):
z = 1
for x in sez:
z *= x
return z
def gcd(x,y):
while(y):
x, y = y, x % y
return x
def zanimivi_ulomki():
stevci = []
imenovalci = []
for x in range(1,10):
for y in range(1,10):
for z in range(x,10):
... | 27.339286 | 63 | 0.305029 |
0afe320d077c205483c9309c608d5a4b5d903e14 | 3,377 | py | Python | rbac/common/task/propose_owner.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/common/task/propose_owner.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/common/task/propose_owner.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 35.177083 | 79 | 0.662422 |
7c824f19b6c57706ec80e0ef6ceeda84e4d862d5 | 6,734 | py | Python | 2.LDA (Linear Discriminant Analysis).py | ZeyuanLi98/Machine-Learning-Build-everything-from-scratch | 52e08ecbe7752e115b4b5f0c5eaa41bb2dc3a8bc | [
"Apache-2.0"
] | null | null | null | 2.LDA (Linear Discriminant Analysis).py | ZeyuanLi98/Machine-Learning-Build-everything-from-scratch | 52e08ecbe7752e115b4b5f0c5eaa41bb2dc3a8bc | [
"Apache-2.0"
] | null | null | null | 2.LDA (Linear Discriminant Analysis).py | ZeyuanLi98/Machine-Learning-Build-everything-from-scratch | 52e08ecbe7752e115b4b5f0c5eaa41bb2dc3a8bc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Dec 26 14:42:14 2021
@author: Zeyuan Li
"""
import numpy as np
from collections import Counter
from scipy.stats import multivariate_normal
import matplotlib.pyplot as plt
def self_split(X, y, r=0.7):
'''
This function randomly split the training and test... | 36.204301 | 112 | 0.56341 |
862159bccd9490abc5a0760baebe0603c505929c | 25,690 | py | Python | haas_lib_bundles/python/libraries/qmi8610/qmi8610.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/libraries/qmi8610/qmi8610.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/libraries/qmi8610/qmi8610.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | """
Copyright (C) 2015-2021 Alibaba Group Holding Limited
MicroPython's driver for QMI8610
Author: HaaS
Date: 2021/09/14
"""
from micropython import const
from driver import I2C
from utime import sleep_ms
import math
M_PI = (3.14159265358979323846)
ONE_G = (9.80665)
FISIMU_STATUS1_CMD_DONE = cons... | 39.281346 | 122 | 0.646672 |
812fbf1cd46ed7858acf642448eaa762d0596b9f | 6,594 | py | Python | StateTracing/seq2seq.py | junchenfeng/diagnosis_tracing | 4e26e2ad0c7abc547f22774b6c9c299999a152c3 | [
"MIT"
] | null | null | null | StateTracing/seq2seq.py | junchenfeng/diagnosis_tracing | 4e26e2ad0c7abc547f22774b6c9c299999a152c3 | [
"MIT"
] | null | null | null | StateTracing/seq2seq.py | junchenfeng/diagnosis_tracing | 4e26e2ad0c7abc547f22774b6c9c299999a152c3 | [
"MIT"
] | 1 | 2020-09-08T13:42:16.000Z | 2020-09-08T13:42:16.000Z | # -*- coding: utf-8 -*-
from torch import nn
from torch.nn import functional as F
from torch import ne,cat,where,rand,lt,argmax,no_grad
from torch.nn.utils.rnn import pad_packed_sequence,pack_padded_sequence
hidden_size = 64
width = 6
height = 6
max_num = 7
class S2S(nn.Module):
def __init__(self... | 39.017751 | 151 | 0.546103 |
d4e3db25769fc6f8b5ffc060714f081fb56c3f0c | 5,207 | py | Python | tests/onegov/org/test_views_user.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_user.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_user.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import re
import transaction
from onegov.user import UserCollection
def test_disable_users(client):
client.login_admin()
users = client.get('/usermanagement')
assert 'admin@example.org' in users
assert 'editor@example.org' in users
editor = users.click('Ansicht', index=1).click('Bearbeiten')
... | 29.089385 | 76 | 0.671404 |
be2bb73cc2ad5750408b049e4c9c73acce8c83b3 | 3,268 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/net/netextract_subPart.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/netextract_subPart.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/netextract_subPart.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) 2008-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... | 32.356436 | 82 | 0.626989 |
07fec8434099e2c6772dabc1b883a121c204ded6 | 2,331 | py | Python | ais3-pre-exam-2022-writeup/Crypto/Double AES/chal.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Crypto/Double AES/chal.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Crypto/Double AES/chal.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
import json
import secrets
import os
FLAG = os.getenv("FLAG")
class AESToken:
def __init__(self, secret):
self.iv = secret[:16]
self.key = secret[16:]
def decrypt(self, data, **kwargs):
cipher = AES.new(self.key,... | 33.3 | 79 | 0.507079 |
ed5cea73e433a554b79fe809e8afa9a64082838c | 635 | py | Python | sdks/pysdk/setup.py | harrywong/evt | 95985384619e0f5ff4021e8838d421ac4b4b946d | [
"BSD-3-Clause"
] | 1,411 | 2018-04-23T03:57:30.000Z | 2022-02-13T10:34:22.000Z | sdks/pysdk/setup.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 27 | 2018-06-11T10:34:42.000Z | 2019-07-27T08:50:02.000Z | sdks/pysdk/setup.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 364 | 2018-06-09T12:11:53.000Z | 2020-12-15T03:26:48.000Z | from setuptools import find_packages, setup
setup(
name='pyevtsdk',
version='0.3',
author='everiToken',
author_email='help@everitoken.io',
description='Python SDK library for everiToken',
long_description=open('README.rst').read(),
license='MIT',
url='https://github.com/everitoken/evt/t... | 30.238095 | 67 | 0.63937 |
ed76ac3d9fbcfd1d7d598e9af44780b3ee957d79 | 7,162 | py | Python | MachineTranslation/src_bak/attention/v1/lib/utils_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | 2 | 2021-08-25T01:13:29.000Z | 2021-10-10T14:49:59.000Z | MachineTranslation/src_bak/attention/v1/lib/utils_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | MachineTranslation/src_bak/attention/v1/lib/utils_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import tensorflow.keras.backend as K
import tensorflow as tf
import numpy as np
class TensorUtils(object):
"""
使用 tensorflow 后端构造自定义函数, 与 网络层(keras layer) Lambda 结合使用后
可以生成更多无状态的网络层 (无需进行反向传播)
eg.
lambda_argmax=Lambda(tensors_tookits.argmax_tensor, argu... | 25.30742 | 127 | 0.551103 |
92c2ec57747246311a3d88ed86c59dc31dece2a0 | 922 | py | Python | us1/python/auge1.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | us1/python/auge1.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | us1/python/auge1.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
import uncertainties.unumpy as unp
from scipy import optimize
from scipy.stats import sem
h, amp, HF, TGC = np.genfromtxt('python/daten/programm/auge1.Txt', unpack=True)
max1 = amp[:20]
max2 = amp[35:]
max3 = amp[180:]
max4 = amp[240:... | 25.611111 | 79 | 0.691974 |
92e6ac78e6253617494f74dcadd66723001f614f | 961 | py | Python | app/alarmpi/alarmparser.py | Bouni/alarmpi | f569532499dcd78d7fa73deab46365623fef85c1 | [
"MIT"
] | null | null | null | app/alarmpi/alarmparser.py | Bouni/alarmpi | f569532499dcd78d7fa73deab46365623fef85c1 | [
"MIT"
] | null | null | null | app/alarmpi/alarmparser.py | Bouni/alarmpi | f569532499dcd78d7fa73deab46365623fef85c1 | [
"MIT"
] | 1 | 2020-02-10T15:43:24.000Z | 2020-02-10T15:43:24.000Z | import logging
import re
import quopri
LOGGER = logging.getLogger(__name__)
class AlarmParser:
def __init__(self, config, msg):
self.config = config
self.msg = self.decode(msg.get_payload())
self._parse()
def decode(self, msg):
LOGGER.error(type(msg))
for e in ["utf-8... | 26.694444 | 78 | 0.528616 |
136960a3c200dd0bbcb93533ddac1eaad635c69c | 7,182 | py | Python | marsyas-vamp/marsyas/src/marsyas_python/aim.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/aim.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/aim.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Plotting auditory image model stuff
import pickle
from pylab import *
import sys
from matplotlib import pyplot
from marsyas import MarSystemManager,MarControlPtr
# create a global MarSystemManager
msm = MarSystemManager()
# helper function to create a list of MarSystems from a list of... | 24.9375 | 120 | 0.670008 |
b9b964983fd0e5b2622f42aad11d7e735269e4e3 | 5,105 | py | Python | marsyas-vamp/marsyas/scripts/large-evaluators/check-vamp-qm-default.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/check-vamp-qm-default.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/check-vamp-qm-default.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
DEBUG = 0
import os
import sys
import subprocess
import glob
import numpy
import pipes
import eval_manager
import mar_collection
def single_file_generate(audio_filename, basedir):
plugin_added = "vamp:qm-vamp-plugins:qm-tempotracker:tempo"
cmd = "sonic-annotator -d %s %s -w csv --csv... | 30.939394 | 106 | 0.640744 |
6a4a060495917e3c797769d6d8d04b77dd686d85 | 2,320 | py | Python | python/oneflow/compatible/single_client/benchmarks/cnn_benchmark/alexnet_model.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/benchmarks/cnn_benchmark/alexnet_model.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/benchmarks/cnn_benchmark/alexnet_model.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 34.626866 | 79 | 0.672414 |
bc973289102495c026b07c66146be210c049665a | 7,494 | py | Python | lib/mdbook.py | nullputra/nlptr-lib | 618c2c74c3d3033bae04de9ba9a253bb6eb31a6c | [
"CC0-1.0"
] | null | null | null | lib/mdbook.py | nullputra/nlptr-lib | 618c2c74c3d3033bae04de9ba9a253bb6eb31a6c | [
"CC0-1.0"
] | null | null | null | lib/mdbook.py | nullputra/nlptr-lib | 618c2c74c3d3033bae04de9ba9a253bb6eb31a6c | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/python3
from collections import defaultdict
import getopt
import glob
import os
import re
import shutil
import subprocess
import toml
import sys
usage = """USAGE: $ mdbook.py [options] <PATH>
e.g.) $ rm -rf book && lib/mdbook.py -l cpp -s hpp -S cpp
e.g.) $ rm -rf book && lib/mdbook.py -l CSharp -s ... | 36.556098 | 118 | 0.570723 |
91409bc0b0162975cb5d1870be271a14bde631d1 | 8,809 | py | Python | logger_controller/logger_control.py | jorgeMorfinezM/AwsS3FileManager | 443800c58371391b8c127ed538c21766b2315eac | [
"Apache-2.0"
] | 1 | 2020-08-13T21:28:19.000Z | 2020-08-13T21:28:19.000Z | logger_controller/logger_control.py | jorgeMorfinezM/AwsS3FileManager | 443800c58371391b8c127ed538c21766b2315eac | [
"Apache-2.0"
] | null | null | null | logger_controller/logger_control.py | jorgeMorfinezM/AwsS3FileManager | 443800c58371391b8c127ed538c21766b2315eac | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Requires Python 3.x or later
"""
__author__ = "Jorge Morfinez Mojica (jorge.morfinez.m@gmail.com)"
__copyright__ = "Copyright 2020, Jorge Morfinez Mojica"
__license__ = ""
__history__ = """ Se conecta, valida y copia
documentos/archivos a un
Bucket ... | 33.622137 | 120 | 0.66625 |
fca127048915e869873094ce6d9b590a49ec8bc1 | 16,695 | py | Python | frappe-bench/apps/erpnext/erpnext/healthcare/setup.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/setup.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/setup.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.setup.utils import insert_record
def setup_healthcare():
if frappe.db.exists('Medical Department', 'Cardiology'):
# already setup
return
create_medical_departments()
create_antibiotics()
create_test_uom()
create_duration(... | 63.479087 | 243 | 0.641809 |
54f235e0046622e513bb5e7fe6cae6898ecd61c8 | 3,051 | py | Python | src/test/tests/databases/closedatabase.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/closedatabase.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/closedatabase.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: closedatabase.py
#
# Tests: mesh - 3D, curvilinear, single domain
# plots - Pseudocolor
# databases - Silo
#
# Purpose: This test case tests that the viewer ca... | 28.25 | 79 | 0.674205 |
0726990661f4fcaa31b7210703acb970e77fe5a6 | 907 | py | Python | python/data_sutram/scraper/geocoder_2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/data_sutram/scraper/geocoder_2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/data_sutram/scraper/geocoder_2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import geocoder
import unicodecsv
import logging
import time
import csv
pcode=[]
with open('locs2.csv', 'rb') as f:
reader = csv.DictReader(f)
for line in reader:
lat = float(line['lat'])
lon = float(line['lon'])
g = geocoder.mapquest([lat,lon], method='reverse')
at... | 36.28 | 134 | 0.593164 |
4ad0c8e0f147bcdfe66438cd56872dabfd8a40de | 3,583 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/nso_show.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/nso_show.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/nso_show.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Cisco and/or its affiliates.
#
# 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... | 26.93985 | 129 | 0.681831 |
db6419e946248e4fc5ac72316c0061669c7c964c | 864 | py | Python | frappe-bench/apps/erpnext/erpnext/regional/france/setup.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/regional/france/setup.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/regional/france/setup.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
def setup(company=None, patch=True):
make_custom_field... | 25.411765 | 80 | 0.75463 |
533b15251ae498e1b7ae57cec580c0b8ec1ac424 | 228 | py | Python | factorial.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | factorial.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | factorial.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | 1 | 2020-09-30T18:53:05.000Z | 2020-09-30T18:53:05.000Z | f=int(input("Enter any number"))
def fact(num):
if num>0:
fact_=1
for i in range(1,num+1):
fact_*=i
return fact_
else:return 0
print("The factorial of the number is",fact(f))
| 22.8 | 48 | 0.54386 |
f452b3767a8f4cba48d3cac0592a00b35e80e165 | 43,694 | py | Python | components/security/mbedtls/mbedtls-2.16.8/tests/scripts/generate_test_code.py | github0null/LiteOSv5.0_CMake | 4253ec53521be01016079c7d0e57d5dbf80c1903 | [
"BSD-3-Clause"
] | 4,335 | 2018-05-08T16:55:45.000Z | 2022-03-31T03:52:42.000Z | components/security/mbedtls/mbedtls-2.16.8/tests/scripts/generate_test_code.py | github0null/LiteOSv5.0_CMake | 4253ec53521be01016079c7d0e57d5dbf80c1903 | [
"BSD-3-Clause"
] | 106 | 2018-05-16T11:30:54.000Z | 2021-12-27T01:50:33.000Z | components/security/mbedtls/mbedtls-2.16.8/tests/scripts/generate_test_code.py | github0null/LiteOSv5.0_CMake | 4253ec53521be01016079c7d0e57d5dbf80c1903 | [
"BSD-3-Clause"
] | 1,387 | 2018-05-08T11:06:50.000Z | 2022-03-26T16:03:05.000Z | #!/usr/bin/env python3
# Test suites code generator.
#
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
#
# This file is provided under the Apache License 2.0, or the
# GNU General Public License v2.0 or later.
#
# **********
# Apache License 2.0:
#
# Licensed under the Ap... | 37.123195 | 79 | 0.635213 |
f479dfacecdb5126eee5087c99a4f6953271f6fd | 2,342 | py | Python | ui.py | asalyga/Quizzie | 00eb46cb469473618e64baf1eddc9fd144193af5 | [
"MIT"
] | null | null | null | ui.py | asalyga/Quizzie | 00eb46cb469473618e64baf1eddc9fd144193af5 | [
"MIT"
] | null | null | null | ui.py | asalyga/Quizzie | 00eb46cb469473618e64baf1eddc9fd144193af5 | [
"MIT"
] | null | null | null | from tkinter import *
from quiz_brain import QuizBrain
THEME_COLOR = "#375362"
class AppUi:
def __init__(self, quiz_brain: QuizBrain):
self.quiz = quiz_brain
self.window = Tk()
self.window.title("Quiz app")
self.window.config(padx=20, pady=20, bg=THEME_COLOR)
self.score_l... | 38.393443 | 155 | 0.593937 |
beafc8cecc71a22636d1f7339e519a7d4a0d5edb | 35,593 | py | Python | official/cv/faster_rcnn/src/detecteval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/faster_rcnn/src/detecteval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/faster_rcnn/src/detecteval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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.874118 | 120 | 0.509033 |
fe723d6e633d076825c766a2cc24462a3aebf5ca | 6,165 | py | Python | python/tests/test_validator.py | derHahn/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 4 | 2015-02-20T09:20:10.000Z | 2018-02-05T10:54:10.000Z | python/tests/test_validator.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 80 | 2018-04-13T13:46:24.000Z | 2022-02-16T16:01:46.000Z | python/tests/test_validator.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 6 | 2018-06-06T19:55:32.000Z | 2021-09-30T15:16:40.000Z | #!/usr/bin/env python
import unittest
import sys
import os
import copy
sys.path.insert(0,os.path.join(os.path.dirname(__file__), '..'))
import SBtab
import validatorSBtab
class TestValidator(unittest.TestCase):
def setUp(self):
'''
setup SBtabTable class with files from test directory
'''... | 43.111888 | 133 | 0.612003 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.