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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b5e03fade3e7023bdfc63b07ea3fa31b3bff638c | 1,659 | py | Python | src/lecture1/hog_svm.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 1 | 2020-08-17T07:09:09.000Z | 2020-08-17T07:09:09.000Z | src/lecture1/hog_svm.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | null | null | null | src/lecture1/hog_svm.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 2 | 2020-07-26T07:27:57.000Z | 2020-08-17T07:09:15.000Z | """
Created on July 25 01:45, 2020
@author: fassial
"""
import math
import numpy as np
from sklearn.svm import SVC
# local dep
import preprocess
class hog_svm:
def __init__(self):
self.svm = SVC(
C = 1.0
)
def train(x_train, y_train, batch_size = 100):
n_cycle = math.ceil... | 36.065217 | 133 | 0.611212 |
1fde8f34247eef53ab6370af86d4ee1641b792dc | 220 | py | Python | FeedCrawler.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 63 | 2016-03-21T21:35:07.000Z | 2021-03-20T22:50:34.000Z | FeedCrawler.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 200 | 2016-03-15T21:45:26.000Z | 2021-04-03T10:47:45.000Z | FeedCrawler.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 25 | 2016-03-15T20:44:33.000Z | 2020-10-25T09:43:48.000Z | # -*- coding: utf-8 -*-
# FeedCrawler
# Projekt von https://github.com/rix1337
import multiprocessing
from feedcrawler import crawler
if __name__ == '__main__':
multiprocessing.freeze_support()
crawler.main()
| 18.333333 | 40 | 0.722727 |
1fe16d9259d750812fb2ab5eb3534ee198ec1d28 | 748 | py | Python | INBa/2015/Primov_G_S/task_4_19.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Primov_G_S/task_4_19.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Primov_G_S/task_4_19.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 4. Вариант 19
#Напишите программу, которая выводит имя, под которым скрывается Ричард Дженкинс. Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти). Для хранения всех необходимых... | 49.866667 | 435 | 0.77139 |
1f21b43497b5106c61689a6e5b52811eee931dc7 | 2,453 | py | Python | official/cv/crnn/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/crnn/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/crnn/postprocess.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... | 29.914634 | 106 | 0.647371 |
23e08c9823f8b8705f84192f5c3b995318ab6204 | 1,388 | py | Python | nz_django/day3/book_manager/front/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_django/day3/book_manager/front/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_django/day3/book_manager/front/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from django.shortcuts import render,redirect,reverse
from django.db import connection
def get_corsor():
return connection.cursor()
# Create your views here.
#主要是用来展示所有的图书列表
def index(request):
cursor = get_corsor()
cursor.execute("select id,name,author from book")
books = cursor.fetchall()
print(bo... | 30.844444 | 97 | 0.650576 |
9e47b75dcc5b4bd85aa427c4d7ab977a659fb489 | 80 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.15-startwith-method-with-logic.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.15-startwith-method-with-logic.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.15-startwith-method-with-logic.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | name = input("Input a name: ")
if name.startswith("Mr."):
print("Dear Sir")
| 20 | 30 | 0.6125 |
b51f87fe583c5e1a2149cc766109e961e3eccba0 | 2,287 | py | Python | build_server/teamcity_agent/shut_down_on_empty_queue.py | Empythy/geometry-learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 21 | 2018-10-09T08:15:29.000Z | 2022-03-16T08:23:08.000Z | build_server/teamcity_agent/shut_down_on_empty_queue.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 31 | 2017-09-20T13:30:37.000Z | 2018-03-01T13:24:58.000Z | build_server/teamcity_agent/shut_down_on_empty_queue.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 7 | 2018-11-29T11:39:02.000Z | 2022-01-12T07:10:26.000Z | import http
import os
from datetime import datetime
import boto3
import requests
from slackclient import SlackClient
SCRIPT_NAME = os.path.basename(__file__)
TIMESTAMP = str(datetime.now()).replace(':', '.')
# Set this to the appropriate region
REGION_NAME = 'eu-west-1'
# Get environment variables
# Slack is requir... | 33.144928 | 106 | 0.747267 |
f576d7424704e0e29b9c509d16006bea31238510 | 777 | py | Python | python/data_sutram/scraper/get_im_sat.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/data_sutram/scraper/get_im_sat.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/data_sutram/scraper/get_im_sat.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | """
code to get the satellite images from Zoom Earth
https://satellites.pro/
https://ecn.t3.tiles.virtualearth.net/tiles/a300101321312212320.jpeg?g=6856&mkt=en-US
"""
import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
import ssl
import wget
# Ignore SSL certificate errors
ctx = ssl.create_... | 25.9 | 126 | 0.720721 |
277faeaf5e11fe8e80286d4743a2801c2379c981 | 3,159 | py | Python | helpers.py | AuxiliumCDNG/MET-Bot | 7e00d878c92ad4f68b0b2920235019e14c9ea2fa | [
"MIT"
] | null | null | null | helpers.py | AuxiliumCDNG/MET-Bot | 7e00d878c92ad4f68b0b2920235019e14c9ea2fa | [
"MIT"
] | null | null | null | helpers.py | AuxiliumCDNG/MET-Bot | 7e00d878c92ad4f68b0b2920235019e14c9ea2fa | [
"MIT"
] | null | null | null | import functools
import discord.errors as derrors
from flask import abort
from globals import discord, client, connection_pool
def change_setting(setting, value):
with connection_pool.connection() as con, con.cursor(dictionary=True) as cursor:
cursor.execute("SELECT * FROM settings WHERE setting='%s'" %... | 33.606383 | 116 | 0.557455 |
e36622de08b4c5615c57efe020f669e1ef2008b2 | 1,103 | py | Python | MAIN/STM32F405_C/NORMAL/V38/uOTA.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405_C/NORMAL/V38/uOTA.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405_C/NORMAL/V38/uOTA.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | uOTALoop = True
uOTAFileName = ""
uf = None
def GetFileName(data):
global uOTAFileName
global uf
IsFileNameExist = False
splitData = data.decode('utf-8').split('@')
for item in splitData:
if item == "FName":
IsFileNameExist = True
elif IsFileNameExist:
uOTAFil... | 27.575 | 72 | 0.525839 |
47bc4e214b7f0db87435383ffc19268960900c33 | 3,355 | py | Python | TestBot/test_cogs/poketcgFunctions/database.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/poketcgFunctions/database.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/poketcgFunctions/database.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | from .. import sql, log
def initialise_db():
sql('poketcg', '''create table players (
discord_id integer
,cash integer
,daily_reset integer
,packs text
,packs_opened integer
,packs_bought integer
,total_cash integer
,total_cards integer
,cards_sold integer
)'''
)
sql('poketcg', '''creat... | 25.037313 | 74 | 0.704024 |
9a6492adb5235d891453f321ff099012a02fd390 | 4,919 | py | Python | project/forms/event_suggestion.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/forms/event_suggestion.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/forms/event_suggestion.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask_babelex import lazy_gettext
from flask_wtf import FlaskForm
from wtforms import (
BooleanField,
SelectField,
SelectMultipleField,
StringField,
SubmitField,
)
from wtforms.fields.html5 import EmailField, TelField
from wtforms.validators import DataRequired, Optional
from project.forms.com... | 33.462585 | 101 | 0.614353 |
d08248b3438bb9ff63262fcf49a8889956a6daf4 | 5,333 | py | Python | deeplearning EX/Ex2.py | deliciousYSH/Misc.Code | 5e957ca16b2a7b2a1dff5f0a1dec563dd4757d18 | [
"MIT"
] | null | null | null | deeplearning EX/Ex2.py | deliciousYSH/Misc.Code | 5e957ca16b2a7b2a1dff5f0a1dec563dd4757d18 | [
"MIT"
] | null | null | null | deeplearning EX/Ex2.py | deliciousYSH/Misc.Code | 5e957ca16b2a7b2a1dff5f0a1dec563dd4757d18 | [
"MIT"
] | null | null | null | import torch as t
import torchvision as tv
import torchvision.transforms as transforms
from torchvision.transforms import ToPILImage
from torch import nn
import torch as t
from torch.nn import functional as F
from torch import optim
show = ToPILImage() # 可以把Tensor转成Image,方便可视化
t.set_num_threads(8)
# 第一次运行程序torchvi... | 25.763285 | 77 | 0.569661 |
ef874930ed0f728ee4d894108c7b0a3edb9238d2 | 2,528 | py | Python | Chromatography_Simulator.py | Tocha4/-Displacement--Chromatography | 0baf4f9e2d23b39f610217b048d799c6403a259e | [
"MIT"
] | 2 | 2020-11-25T07:53:48.000Z | 2021-09-19T14:19:51.000Z | Chromatography_Simulator.py | Tocha4/-Displacement--Chromatography | 0baf4f9e2d23b39f610217b048d799c6403a259e | [
"MIT"
] | null | null | null | Chromatography_Simulator.py | Tocha4/-Displacement--Chromatography | 0baf4f9e2d23b39f610217b048d799c6403a259e | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QApplication
from Graphs.fig_01 import PlotCanvas
from Graphs.graphChromaCanvas import PlotCanvas_Chrom
from Graphs.Popup_ai import popup
from fa_02 import App
import sys
import numpy as np
import seaborn as sns; sns.set()
class main(App):
def __init__(self):
super().__in... | 35.605634 | 101 | 0.636472 |
089c9898e8878fbdf94451a91b9325b21ead4f27 | 202 | py | Python | LoremPizzum/products/urls.py | BruhMano/LoremPizzum | 8909a9f21ea2878cf9accf035989edbd15c3d285 | [
"BSD-3-Clause"
] | null | null | null | LoremPizzum/products/urls.py | BruhMano/LoremPizzum | 8909a9f21ea2878cf9accf035989edbd15c3d285 | [
"BSD-3-Clause"
] | null | null | null | LoremPizzum/products/urls.py | BruhMano/LoremPizzum | 8909a9f21ea2878cf9accf035989edbd15c3d285 | [
"BSD-3-Clause"
] | null | null | null | from django.urls import path
from .views import *
urlpatterns = [
path('',index,name = 'index'),
path('menu/',menu,name ="menu"),
path('menu/<int:ids>/',product_details,name = "product"),
] | 25.25 | 61 | 0.633663 |
3ee0b44afeb27a7ed6773007a5a8f2f1bd46c665 | 856 | py | Python | project/views/user.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/views/user.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/views/user.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask import render_template
from flask_security import auth_required
from project import app
from project.models import AdminUnitInvitation
from project.views.utils import get_invitation_access_result
@app.route("/profile")
@auth_required()
def profile():
return render_template("profile.html")
@app.route... | 27.612903 | 64 | 0.793224 |
f5c4ba3211f705b56e7bd0a38c6bd7b5ebe0ab28 | 345 | py | Python | Language Proficiency/Python/Collections/Word Order/word_order.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Language Proficiency/Python/Collections/Word Order/word_order.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Language Proficiency/Python/Collections/Word Order/word_order.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from collections import OrderedDict
if __name__ == "__main__":
n = int(input())
d = OrderedDict()
total = 0
for _ in range(n):
word = input()
if word in d:
d[word] += 1
else:
d[word] = 1
total += 1
print(total)
... | 15.681818 | 35 | 0.484058 |
9d5ad53ac9bae2187dedf633156848163fc30679 | 2,263 | py | Python | src/onegov/onboarding/models/assistant.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/onboarding/models/assistant.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/onboarding/models/assistant.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import inspect
import time
class Assistant(object):
""" Describes an assistant guiding a user through onboarding. """
def __init__(self, app, current_step_number=1):
self.app = app
methods = (fn[1] for fn in inspect.getmembers(self))
methods = (fn for fn in methods if inspect.ismeth... | 26.011494 | 69 | 0.634998 |
dfad6c1889e0ff2bd949fdd80c62bcb58593eff3 | 793 | py | Python | Beginner/03. Python/DoubleIndex.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-06T13:55:02.000Z | 2021-10-06T13:55:02.000Z | Beginner/03. Python/DoubleIndex.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/DoubleIndex.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | """
Create a function named double_index that has two parameters: a list named lst and a single number named index.
The function should return a new list where all elements are the same as in lst except for the element at index. The element at index should be double the value of the element at index of the original lst... | 44.055556 | 205 | 0.747793 |
f8cf0224508da49a83c3759dfa55ee196a7586ca | 340 | py | Python | designer_door_mat.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | designer_door_mat.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | designer_door_mat.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | # Hackerrank - Designer Door Mat
# repetitions of '.|.' with remaining L/R filled with '-'
# top and bottom of central 'WELCOME' belt are symmetrical (hence N//2)
N, M = map(int, input().split())
pattern = [('.|.' * (2 * i + 1)).center(M, '-') for i in range(N // 2)]
print('\n'.join(pattern + ['WELCOME'.center(M, '-')... | 42.5 | 71 | 0.597059 |
0828313229f471e85e1245d3b40f21c570c26951 | 1,318 | py | Python | mod/units/play.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 1 | 2015-06-28T15:26:52.000Z | 2015-06-28T15:26:52.000Z | mod/units/play.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | null | null | null | mod/units/play.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 6 | 2015-03-20T16:36:22.000Z | 2021-08-28T07:58:18.000Z | # -*- coding: utf-8 -*-
# @Date : 2014-07-05 22:43:49
# @Author : xindervella@gamil.com yml_bright@163.com
from tornado.httpclient import HTTPRequest, HTTPClient, HTTPError
from config import SERVICE, TIME_OUT, DEFAULT_UUID
from get_api_return import error_map
import urllib
def update(db, user):
if ... | 26.897959 | 66 | 0.542489 |
f2b314d77e7ca1845d8f0e2b4f54ec1b9265d2b9 | 516 | py | Python | leetcode/1351-Count-Negative-Numbers-in-a-Sorted-Matrix/binary-search.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/1351-Count-Negative-Numbers-in-a-Sorted-Matrix/binary-search.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/1351-Count-Negative-Numbers-in-a-Sorted-Matrix/binary-search.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
def countNegatives(self, grid: List[List[int]]) -> int:
res = 0
nrows, ncols = len(grid), len(grid[0])
start_l, start_r = 0, nrows - 1
for i in range(ncols - 1, -1, -1):
l, r = start_l, start_r
while l <= r:
m = l + int((r - l)... | 28.666667 | 59 | 0.381783 |
4b480835021a5770416ad60005616685879cf80c | 3,250 | py | Python | research/cv/3dcnn/src/loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/3dcnn/src/loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/3dcnn/src/loss.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... | 38.690476 | 81 | 0.676615 |
d9c32c17d2cb119e923fd601879e19bca9fce117 | 2,972 | py | Python | nscan/nscan.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | nscan/nscan.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | nscan/nscan.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python2
#-*- coding:utf-8 -*-
import socket
import subprocess
import os
import netifaces
import threading
import thread
from datetime import datetime
import time
import shlex
import platform
import sys
import argparse
banner = '''
███▄ █ ██████ ▄████▄ ▄▄▄ ███▄ █
██ ▀█ █ ▒██ ▒ ▒██▀ ... | 30.639175 | 191 | 0.477456 |
0a880406ff4f10755f387565554c2d00c885eb4b | 4,080 | py | Python | oneflow/python/test/ops/test_tril.py | Ldpe2G/oneflow | 69febbe613c1dcc3aed1652a37e4ec7d18d2f1ba | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/test/ops/test_tril.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/test/ops/test_tril.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.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... | 32.903226 | 88 | 0.61201 |
0acd210448dddef196b5df69ce1c1681202c0793 | 69 | py | Python | Scarky2/account/views.py | kopringo/Scarky2 | 93c59cd31113749045caff68274f779a61360167 | [
"MIT"
] | null | null | null | Scarky2/account/views.py | kopringo/Scarky2 | 93c59cd31113749045caff68274f779a61360167 | [
"MIT"
] | null | null | null | Scarky2/account/views.py | kopringo/Scarky2 | 93c59cd31113749045caff68274f779a61360167 | [
"MIT"
] | null | null | null |
def signup(request):
pass
def signup_confirm(request):
pass | 11.5 | 28 | 0.695652 |
7cc589058f16fb8d261f17755008e640e325e2b4 | 516 | py | Python | code/NumpyIntro.py | ju1-eu/pyAnfaenger | 59440e99d69582ee2c7a022c8b819e7c78f41ac0 | [
"MIT"
] | null | null | null | code/NumpyIntro.py | ju1-eu/pyAnfaenger | 59440e99d69582ee2c7a022c8b819e7c78f41ac0 | [
"MIT"
] | null | null | null | code/NumpyIntro.py | ju1-eu/pyAnfaenger | 59440e99d69582ee2c7a022c8b819e7c78f41ac0 | [
"MIT"
] | null | null | null | import numpy as np
# liste in array wandeln mit numpy
noten_list = [100, 89, 44, 78, 45, 24, 18]
noten_np_array = np.array(noten_list, dtype=np.int8)
# max und min
noten_max = np.max(noten_np_array)
noten_min = np.min(noten_np_array)
# argmax git den index zurück
# 0 1 2 3 4 5 6
# [100, 89, 44, 78, 45,... | 25.8 | 52 | 0.72093 |
6b1e8692aca49f50da73d8fa712374daf07962e1 | 14,799 | py | Python | Ui_QTDialogVer2.py | PRJJOHN/Automation | cf78ec94300ed65429c1ec1035bef046282d18da | [
"BSD-3-Clause"
] | null | null | null | Ui_QTDialogVer2.py | PRJJOHN/Automation | cf78ec94300ed65429c1ec1035bef046282d18da | [
"BSD-3-Clause"
] | null | null | null | Ui_QTDialogVer2.py | PRJJOHN/Automation | cf78ec94300ed65429c1ec1035bef046282d18da | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'd:\biologue\Automation\QTDialogVer2.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
fr... | 49.494983 | 93 | 0.701669 |
86398a5bd1fe2cfb49ff5a8eb8bbc41ada77f0b2 | 329 | py | Python | 1_basics/3_luftballon.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | 1_basics/3_luftballon.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | 1_basics/3_luftballon.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | """
Heissluftballon
"""
newPage(1000, 1000)
oval(300, 400, 500, 500)
rect(100, 100, 200, 200)
"""
- Klicke auf «run» (cmd r)
- Ändere die Werte in den Klammern und klicke auf «run» (cmd r)
- Wähle einen Wert aus, drücke die cmd-Taste und drücke/ziehe am Trackpad nach links/rechts.
- Bewege den Korb unter den Ballo... | 16.45 | 92 | 0.680851 |
86b216de43e0f898b67022f4d4a0b8bf0bfc8d47 | 2,265 | py | Python | pyntcloud/scalar_fields/voxelgrid.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/scalar_fields/voxelgrid.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/scalar_fields/voxelgrid.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import numpy as np
from .base import ScalarField
class VoxelgridScalarField(ScalarField):
def __init__(self, *, pyntcloud, voxelgrid_id):
super().__init__(pyntcloud=pyntcloud)
self.voxelgrid_id = voxelgrid_id
def extract_info(self):
self.voxelgrid = self.pyntcloud.structures[self.vox... | 31.458333 | 74 | 0.624724 |
86d15fb60b09ed785a79e781f5b3c3e3bafc3064 | 159 | py | Python | 137-single-number-ii/137-single-number-ii.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 137-single-number-ii/137-single-number-ii.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 137-single-number-ii/137-single-number-ii.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def singleNumber(self, nums: List[int]) -> int:
for num in set(nums):
if nums.count(num)==1:
return num | 31.8 | 51 | 0.534591 |
d4b6f67d3b29589fa3656268bd377e10fc38287d | 1,737 | py | Python | python/fmcc.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | python/fmcc.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | python/fmcc.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | from faulhaber_const import commands as FMCC
fautmel=['GTYP', 'GSER', 'VER', 'GN', 'GCL', 'GRM', 'GKN', 'RM', 'KN', 'ANSW', 'NET', 'CST', 'CO', 'SO', 'TO', 'SAVE', 'BAUD', 'NODEADR', 'GNODEADR', 'GADV', 'EN', 'DI', 'GTIMEOUT', 'TIMEOUT', 'UPTIME', 'SADV']
from crcmod.predefined import mkCrcFun as mkCrcFunPre
from crcm... | 32.166667 | 210 | 0.626943 |
131b1da735849f3c8fe52c179acfe373219ad839 | 1,263 | py | Python | TFLCycles/unfinished/fourier.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | TFLCycles/unfinished/fourier.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | TFLCycles/unfinished/fourier.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z |
# %% Time results using fft
import numpy as np
import scipy.fftpack
# Number of samplepoints
N = 600
# sample spacing
T = 1.0 / 800.0
x = np.linspace(0.0, N * T, N)
y = np.sin(50.0 * 2.0 * np.pi * x) + 0.5 * np.sin(80.0 * 2.0 * np.pi * x)
yf = scipy.fftpack.fft(y)
xf = np.linspace(0.0, 1.0 / (2.0 * T), int(N / 2... | 21.775862 | 73 | 0.621536 |
6a463dfacc1f994a95c61e154379c89169995ee2 | 1,591 | py | Python | lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py | hanzhan1/llvm | efe40bb5c797b102088e3cd2579a0f57ccf93310 | [
"Apache-2.0"
] | 305 | 2019-09-14T17:16:05.000Z | 2022-03-31T15:05:20.000Z | lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py | hanzhan1/llvm | efe40bb5c797b102088e3cd2579a0f57ccf93310 | [
"Apache-2.0"
] | 11 | 2019-10-17T21:11:52.000Z | 2022-02-17T20:10:00.000Z | lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py | AlexeySachkov/llvm | 4a5f2a7830a9195cf13c8063c1c9f8c2b03730c2 | [
"Apache-2.0"
] | 24 | 2019-10-03T11:22:11.000Z | 2022-01-25T09:59:30.000Z | """
Test lldb-vscode runInTerminal reverse request
"""
import unittest2
import vscode
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import lldbvscode_testcase
import time
import os
class TestVSCode_runInTerminal(lldbvscode_testcase.VSCodeTestCaseBa... | 32.469388 | 110 | 0.690132 |
16932af3d66680646227a7bd3231b50a0c2f258b | 2,153 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_2/fix_gl_entries_for_stock_transactions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_2/fix_gl_entries_for_stock_transactions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_2/fix_gl_entries_for_stock_transactions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import print_function, unicode_literals
import frappe
from frappe.utils import flt
def execute():
from erpnext.stock.stock_balance import repost
repost(allow_zero_rate=True,... | 39.145455 | 100 | 0.701811 |
16b2f6b020c57fbe56ebe3fc0562a7af41b89c03 | 2,110 | py | Python | Chapter7_CNN/Chapter7_3_CNN_Optimization/cnnNormAugment.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter7_CNN/Chapter7_3_CNN_Optimization/cnnNormAugment.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter7_CNN/Chapter7_3_CNN_Optimization/cnnNormAugment.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import os
from typing import Tuple
from tensorflow.keras.callbacks import TensorBoard
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Input
from tensorflow... | 26.375 | 81 | 0.685308 |
bccd39f75623c68fa637486d628eedd5c6959744 | 3,153 | py | Python | 6_ObjectOriented/exceptions.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 6_ObjectOriented/exceptions.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 6_ObjectOriented/exceptions.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | import numbers
import builtins
from math import sqrt
from functools import total_ordering
@total_ordering
class Vector2D:
def __init__(self, x=0, y=0):
if isinstance(x, numbers.Real) and isinstance(y, numbers.Real): # Numbers.Real = reele Zahl
self.x = x
self.y = y
else:
... | 31.53 | 117 | 0.594037 |
fc99d64382dead7b4f27044a7fe7556849d90655 | 992 | py | Python | src/webapp/webapp.py | Somsubhra/Enrich | cf1e69b86ceb64c8b09c98b442e09c1196b50125 | [
"MIT"
] | 1 | 2015-11-30T09:27:51.000Z | 2015-11-30T09:27:51.000Z | src/webapp/webapp.py | Somsubhra/Enrich | cf1e69b86ceb64c8b09c98b442e09c1196b50125 | [
"MIT"
] | null | null | null | src/webapp/webapp.py | Somsubhra/Enrich | cf1e69b86ceb64c8b09c98b442e09c1196b50125 | [
"MIT"
] | null | null | null | # Headers
__author__ = 'Somsubhra Bairi'
__email__ = 'somsubhra.bairi@gmail.com'
# All imports
from flask import Flask, render_template, request, jsonify
from extras import Logger
from output import Tagger
# The Web App class
class WebApp:
# Constructor for the Web App class
def __init__(self, host, port,... | 22.545455 | 58 | 0.606855 |
5d943e496e3d1ae025c9b8507ef36bff119be54c | 4,414 | py | Python | src/onegov/swissvotes/app.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/swissvotes/app.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/swissvotes/app.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from more.content_security import SELF
from onegov.core import Framework
from onegov.core import utils
from onegov.core.framework import default_content_security_policy
from onegov.file import DepotApp
from onegov.form import FormApp
from onegov.quill import QuillApp
from one... | 27.416149 | 77 | 0.703897 |
f8df88351dbd41765f0c3fa26ae86555dae956f6 | 461 | py | Python | INBa/2014/MOCHALOV_V_V/task_2_15.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/MOCHALOV_V_V/task_2_15.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/MOCHALOV_V_V/task_2_15.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 15.
# Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Плутарх. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Mochalov V. V.
# 02.03.2016
print("Два основных достояния человеческой природы - это ... | 41.909091 | 201 | 0.655098 |
5d176b6587ad83097c694403d9da81093495958e | 1,973 | py | Python | pyScript_NodeManager/NodeOutput.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript_NodeManager/NodeOutput.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript_NodeManager/NodeOutput.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | from PySide2.QtWidgets import QWidget, QGridLayout, QPushButton, QComboBox, QLineEdit, QMessageBox
class NodeOutput(QWidget):
def __init__(self, content_widget):
super(NodeOutput, self).__init__()
self.content_widget = content_widget
# create UI
# create all layouts
self... | 32.883333 | 104 | 0.64369 |
5d1eca6dd4d6a1ac6aee56ae9a830421c8c8c7b5 | 5,620 | py | Python | official/cv/yolov5/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/yolov5/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/yolov5/train.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... | 42.900763 | 117 | 0.668683 |
54f3277b45303de43b99d831a4246029cc59951e | 5,689 | py | Python | tensorflow/basic-rl/tutorial10/gps/gui/config.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/basic-rl/tutorial10/gps/gui/config.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/basic-rl/tutorial10/gps/gui/config.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z | """ Default configuration and hyperparameter values for GUI objects. """
import itertools
#from gps.proto.gps_pb2 import TRIAL_ARM, AUXILIARY_ARM
from gps_pb2 import TRIAL_ARM, AUXILIARY_ARM
from gps.gui.ps3_config import PS3_BUTTON, INVERTED_PS3_BUTTON
# Mappings from actions to their corresponding keyboard binding... | 37.926667 | 80 | 0.616101 |
4ae21d237a753e029cbad8ae66f170751995a5bc | 299 | py | Python | quant/common/util.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 7 | 2017-10-22T15:00:09.000Z | 2019-09-19T11:45:43.000Z | quant/common/util.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 1 | 2018-01-19T16:19:40.000Z | 2018-01-19T16:19:40.000Z | quant/common/util.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 5 | 2017-12-11T15:10:29.000Z | 2018-12-21T17:40:58.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
def convert_currency_bfx(currency):
currency = currency.lower()
if currency == "dash":
currency = "dsh"
if currency == "bcc":
currency = "bch"
if currency == "iota":
currency = 'iot'
return currency.upper()
| 21.357143 | 35 | 0.568562 |
916f51cdc158475001d6335269ad5b8ee741b0ed | 412 | py | Python | aoc2020/day_17/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_17/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_17/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | from aoc2020 import *
from functools import reduce
from .space import Space
class Solution(SolutionABC):
expected = 112
def solve(self) -> any:
space = Space(reduce(lambda a, b: a + b, [
[((x, y, 0), s == '#') for x, s in enumerate(r)]
for y, r in enumerate(self.resource_lines... | 27.466667 | 68 | 0.584951 |
91db378fdcaec57e460b46579f5a79f6cd815efc | 6,479 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # 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, os, json
from frappe.utils import cstr
from unidecode import unidecode
def create_charts(company, chart_template=None, existing_company=... | 33.056122 | 108 | 0.729125 |
37e946ecbba5551f36bb403d60b3fcbb0bf2515f | 563 | py | Python | exercises/zh/test_02_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/test_02_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/test_02_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"import Doc, Span" or "import Span, Doc" in __solution__
), "你有正确导入Doc和Span吗?"
assert doc.text == "我喜欢周杰伦", "你有正确创建Doc吗?"
assert span.text == "周杰伦", "有正确创建span吗?"
assert span.label_ == "PERSON", "你有把标签PERSON加到span中吗?"
assert "doc.ents =" in __solution__, "你有覆盖doc.ent... | 33.117647 | 64 | 0.616341 |
f414f45683a888732f11144fd3b4968901f6dad4 | 7,055 | py | Python | src/main/python/client/gui.py | mwintersperger-tgm/sew5-simple-user-database-mwintersperger-tgm | aa638ef1399807403312a0597596412d69e6f20f | [
"MIT"
] | null | null | null | src/main/python/client/gui.py | mwintersperger-tgm/sew5-simple-user-database-mwintersperger-tgm | aa638ef1399807403312a0597596412d69e6f20f | [
"MIT"
] | null | null | null | src/main/python/client/gui.py | mwintersperger-tgm/sew5-simple-user-database-mwintersperger-tgm | aa638ef1399807403312a0597596412d69e6f20f | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
import requests
class App(QWidget):
def __init__(self):
self.usernameValue = None
self.emailValue = None
self.photoValue = None
super().__init__()
self.title = 'Simple User Databa... | 41.745562 | 194 | 0.60326 |
f42cb16db1604abd827777087c1f79fdfb5a081e | 2,615 | py | Python | controller/pbutton_rpi.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | controller/pbutton_rpi.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | controller/pbutton_rpi.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | '''Pushbuttons on RPi with MCP23017 (I2C)
'''
import mcp23017
# Panelkeys
PB1 = 'PB1'
PB2 = 'PB2'
PB3 = 'PB3'
PB4 = 'PB4'
PB5 = 'PB5'
PB6 = 'PB6'
PB7 = 'PB7'
PBAutoOff = 'PBAutoOff'
MAN_KEYS = (PB1, PB2, PB3, PB4, PB5, PB6, PB7)
def key_to_index(key):
if key == PB1:
return 0
elif key == PB2:
... | 21.97479 | 73 | 0.562906 |
be46c70311e3b09592311118ce68cb508426b3c1 | 799 | py | Python | tests/onegov/election_day/models/test_subscriber.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/models/test_subscriber.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/models/test_subscriber.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.election_day.models import EmailSubscriber
from onegov.election_day.models import SmsSubscriber
from onegov.election_day.models import Subscriber
def test_subscriber(session):
session.add(Subscriber(address='endpoint', locale='de_CH'))
session.add(EmailSubscriber(address='end@poi.nt', locale='fr_C... | 34.73913 | 70 | 0.742178 |
22de695cf1ab0eb80e60b40c8c6051d972f42293 | 531 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/purearrays/ex08_add_one_example.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/purearrays/ex08_add_one_example.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/purearrays/ex08_add_one_example.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import numpy as np
from ch06_arrays.solutions.ex08_add_one import add_one
def main():
# Wrap result in numpy array
result = add_one(np.array([1, 3, 2, 4]))
result_as_array = np.array(result)
print(result) # [1, ... | 22.125 | 61 | 0.619586 |
a3ab4e7b19878f0658959760c7ec724dfc86102c | 3,833 | py | Python | modeling/model_utils/unet_parts.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | 2 | 2020-12-22T08:40:05.000Z | 2021-03-30T08:09:44.000Z | modeling/model_utils/unet_parts.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | modeling/model_utils/unet_parts.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | """ Parts of the U-Net model """
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils.utils import init_weights
class DoubleConv(nn.Module):
"""(convolution => [BN] => ReLU) * 2"""
def __init__(self, in_channels, out_channels, BatchNorm,mid_channels=None):
super().__init__()
... | 33.330435 | 95 | 0.56431 |
4a71978d0c206bad3fb1066a4cbb18d5003bee6e | 4,239 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_13_Arbeiten_mit_Word_und_PDF_Dokumenten/10_kapitel_13_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_13_Arbeiten_mit_Word_und_PDF_Dokumenten/10_kapitel_13_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_13_Arbeiten_mit_Word_und_PDF_Dokumenten/10_kapitel_13_repetitionsfragen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 10_kapitel_13_repetitionsfragen.py
import re
max_text_length=70
max_text_delta=20
def output(title, string):
print('╔'+''.center(max_text_length+8, '═')+'╗')
print('║ '+title.center(max_text_length+7).upper()+'║')
print('╠'+''.center(max_text_length+8, '═')+'╣')
string=string+' '*max_text_length
... | 69.491803 | 257 | 0.758434 |
4a9a211b41a3ac67b470ad3b29852c6bf06a03fe | 1,416 | py | Python | frappe-bench/apps/erpnext/erpnext/regional/india/__init__.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/regional/india/__init__.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/regional/india/__init__.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | states = [
'',
'Andaman and Nicobar Islands',
'Andhra Pradesh',
'Arunachal Pradesh',
'Assam',
'Bihar',
'Chandigarh',
'Chhattisgarh',
'Dadra and Nagar Haveli',
'Daman and Diu',
'Delhi',
'Goa',
'Gujarat',
'Haryana',
'Himachal Pradesh',
'Jammu and Kashmir',
'Jharkhand',
'Karnataka',
'Kerala',
'Lakshadw... | 17.7 | 37 | 0.593927 |
609d70537bc075f4cfa8a4efc4020a7531c1b21d | 7,598 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/ocs_switch_action.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/ocs_switch_action.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/ocs_switch_action.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# -*- codi... | 50.317881 | 163 | 0.662543 |
1c0f5ba51707f293a2fbbd40b4e7d6c6a5838c3b | 1,728 | py | Python | LottoCSVGraph.py | TuxStory/LCsvGraph | 61abca24692a2230597a3736c677322adb262e74 | [
"MIT"
] | null | null | null | LottoCSVGraph.py | TuxStory/LCsvGraph | 61abca24692a2230597a3736c677322adb262e74 | [
"MIT"
] | null | null | null | LottoCSVGraph.py | TuxStory/LCsvGraph | 61abca24692a2230597a3736c677322adb262e74 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import csv, statistics
def DataList():
path ="./LottoGameData.csv"
file = open(path,newline='')
reader = csv.reader(file)
header = next(reader) #first line is the reader
data = []
for row in reader:
# row = [date, n1, n2, n3, n4, n5, n... | 28.327869 | 101 | 0.618634 |
1c6db27755dd77d681259a7564a8b6ed51426839 | 2,501 | py | Python | 7-assets/past-student-repos/Data-Structures-master/python/heap/heap_iterative.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Data-Structures-master/python/heap/heap_iterative.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Data-Structures-master/python/heap/heap_iterative.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # Title : Max Heap using iterative approach
# Author : Frank Faustino
# Date : 2018-08-18
class Heap:
def __init__(self):
self.storage = []
def __len__(self):
return len(self.storage)
def _left(self, i):
"""Check if left child exists and return it."""
return self.storage[(i * 2) + 1] \
... | 30.5 | 79 | 0.627349 |
c7e089e2a3ccd6fc2cad952c4d0088845ce41a3e | 10,136 | py | Python | apps/mainloop_and_utils/mainloop.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/mainloop_and_utils/mainloop.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/mainloop_and_utils/mainloop.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | import cv2
import robolib.modelmanager.downloader as downloader
from robolib.networks.erianet import Erianet
from robolib.networks.configurations import VGG19ish
from robolib.networks.common import contrastive_loss_manual
import time
import threading
import os
import matplotlib.pyplot as plt
from tensorflow.python.clie... | 39.74902 | 134 | 0.577052 |
40f9801ddf817bcaa3ad994637f2c4dcaa5bc78b | 3,495 | py | Python | update_avatars.py | jeanfrancis/codeforcmr.cm | cf52731484dcdb62f646d5fb51f92d27cf545ada | [
"MIT"
] | 1 | 2020-10-04T20:36:15.000Z | 2020-10-04T20:36:15.000Z | update_avatars.py | jeanfrancis/codeforcmr.cm | cf52731484dcdb62f646d5fb51f92d27cf545ada | [
"MIT"
] | null | null | null | update_avatars.py | jeanfrancis/codeforcmr.cm | cf52731484dcdb62f646d5fb51f92d27cf545ada | [
"MIT"
] | 1 | 2020-01-01T13:01:49.000Z | 2020-01-01T13:01:49.000Z | #!/usr/bin/env python3
"""
This script updates all the avatars for the lab members.
If you want to re-download all images, you need to create a personal access token on github and
set it through `GITHUB_AUTH_TOKEN`. Otherwise you'll be stopped halfway by github's rate limits.
"""
import glob
import os
import logging
i... | 32.971698 | 115 | 0.659227 |
dc0d75989527c214152360d0edc774d5d8aa22a0 | 308 | py | Python | books/PythonAutomate/pdf_word_documents/pdf_extract_text.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/pdf_word_documents/pdf_extract_text.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/pdf_word_documents/pdf_extract_text.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """pdf_extract_text.py
PDF 특정 페이지의 텍스트 추출하기
"""
import PyPDF2
pdf_file_obj = open("meetingminutes.pdf", "rb")
pdf_reader = PyPDF2.PdfFileReader(pdf_file_obj)
print(pdf_reader.numPages) # 페이지 갯수 출력
page_obj = pdf_reader.getPage(0) # 첫 번째 페이지 객체
print(page_obj.extractText()) # 텍스트 추출
pdf_file_obj.close()
| 25.666667 | 47 | 0.753247 |
90c4c1608aa4df8e4b7235402f1030d14e099345 | 764 | py | Python | elements/python/7/7/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/7/7/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/7/7/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | VALUES = dict(
I=1,
V=5,
X=10,
L=50,
C=100,
D=500,
M=1000,
)
EXCEPTIONS = dict(
I=['V', 'X'],
X=['L', 'C'],
C=['D', 'M'],
)
def roman_numeral_value(numeral):
v = 0
i = 0
n = len(numeral)
while i < n:
ch = ... | 16.608696 | 62 | 0.435864 |
292656efb7b06ab5a689c7663701870b5901f537 | 708 | py | Python | project/cli/scrape.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | project/cli/scrape.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | 35 | 2022-01-24T22:15:59.000Z | 2022-03-31T15:01:35.000Z | project/cli/scrape.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | import click
from flask.cli import AppGroup
from project import app
scrape_cli = AppGroup("scrape")
@scrape_cli.command("news")
def scrape_news():
from project.cli.scrape_news import scrape
click.echo("Scraping news..")
scrape()
click.echo("Done.")
@scrape_cli.command("weather_warnings")
def scra... | 19.135135 | 58 | 0.721751 |
3129bde6c866ed9c8b6f4f9ef099154c8b1c0c79 | 707 | py | Python | Problems/Dynamic Programming/Easy/IsSubsequence/test_is_subsequence.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Dynamic Programming/Easy/IsSubsequence/test_is_subsequence.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Dynamic Programming/Easy/IsSubsequence/test_is_subsequence.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from unittest import TestCase
from is_subsequence import is_subsequence_DP, is_subsequence_pointers
class Test(TestCase):
def test_is_subsequence_pointers(self):
self.assertTrue(is_subsequence_pointers("", "ahbgdc"))
self.assertTrue(is_subsequence_pointers("b", "ahbgdc"))
self.assertTrue(is... | 47.133333 | 69 | 0.722772 |
313043358146586deb8229577aa6448f9b648400 | 4,021 | py | Python | 3rdparty/webkit/Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/gen_vk_format_table.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | null | null | null | 3rdparty/webkit/Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/gen_vk_format_table.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | null | null | null | 3rdparty/webkit/Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/gen_vk_format_table.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | 1 | 2019-01-25T13:55:25.000Z | 2019-01-25T13:55:25.000Z | #!/usr/bin/python
# Copyright 2016 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# gen_vk_format_table.py:
# Code generation for vk format map
from datetime import date
import json
import math
import pprint
impor... | 28.928058 | 96 | 0.69908 |
316ba7e2ad7a4f04d35dc426e50e374ac54050b6 | 1,637 | py | Python | Packs/CommonScripts/Scripts/PDFUnlocker/PDFUnlocker_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/PDFUnlocker/PDFUnlocker_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/PDFUnlocker/PDFUnlocker_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
class TestPDFUnlocker:
@staticmethod
def mock_results(mocker):
mocker.patch.object(demisto, "results")
@staticmethod
def mock_context(mocker, args_value=None):
if not args_value:
args_value = {
"entryID": "entry_id",
... | 27.283333 | 92 | 0.597434 |
3175670f8e1ec63e8af213a0238a2cc11288439b | 4,304 | py | Python | 2018/beginners/web-js-safe-1/src/generate.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/beginners/web-js-safe-1/src/generate.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/beginners/web-js-safe-1/src/generate.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2018 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 26.243902 | 83 | 0.635688 |
6f272cf83362695f881dbf78a4704dd6f3186c79 | 18,910 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/party.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/party.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/party.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # 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 frappe import _, msgprint, scrub
from frappe.defaults import get_user_permissions
from frappe.model.utils import get_fetch_values
fr... | 39.478079 | 208 | 0.762507 |
6f64300963c9505cabfce820259286eb4692b223 | 974 | py | Python | src/visitpy/pyavt/setup.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/pyavt/setup.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/pyavt/setup.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
###############################################################################
# file: setup.py
# ... | 27.055556 | 79 | 0.590349 |
d2143aea4bb94d28a10201414fabac971b9055f8 | 2,904 | py | Python | test/test_npu/test_dynamic_ops/test_network_support_net.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_dynamic_ops/test_network_support_net.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_dynamic_ops/test_network_support_net.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... | 36.759494 | 103 | 0.657713 |
d262c328482d34471e5a6fe6115a5cf32f06c48e | 574 | py | Python | tests/test_nordapi_meths.py | joshRooz/NordApi | c0d34ed81a0014da5fb96a3409d1ccc0addcc01e | [
"MIT"
] | null | null | null | tests/test_nordapi_meths.py | joshRooz/NordApi | c0d34ed81a0014da5fb96a3409d1ccc0addcc01e | [
"MIT"
] | null | null | null | tests/test_nordapi_meths.py | joshRooz/NordApi | c0d34ed81a0014da5fb96a3409d1ccc0addcc01e | [
"MIT"
] | null | null | null | from pytest import unittest
from nordapi.NordApi import NordApi
class TestCountryExists(unittest.TestCase):
def test_valid_country(self):
valid = NordApi()
assert type(valid.get_country_id('australia')) == int
def test_invalid_country(self):
invalid = NordApi()
self.assertRais... | 28.7 | 68 | 0.702091 |
9699bd5304f444ec3b137bcea5d6b63bb561484d | 486 | py | Python | IVTp/2014/TITOV_S_G/task_5_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/TITOV_S_G/task_5_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/TITOV_S_G/task_5_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 22.
# Напишите программу, которая бы при запуске случайным образом отображала имя одного из двух сооснователей компании Google.
# Titov S.G.
# 11.04.2016
import random
print ("Программа случайным образом отображает имя одного из двух сооснователей компании Google")
name = random.randint (1,2)
p... | 23.142857 | 123 | 0.722222 |
73e417142a2c9f036f3a5181d372f631efd8e3f6 | 2,982 | py | Python | tests/test_tipc/benchmark/modules/seq2seq.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/test_tipc/benchmark/modules/seq2seq.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/test_tipc/benchmark/modules/seq2seq.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import paddle
import paddle.nn as nn
from paddlenlp.utils.log import logger
from paddlenlp.metrics import Perplexity
from .model_base import BenchmarkBase
sys.path.append(
os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir,
... | 34.275862 | 138 | 0.541247 |
fb740ffbbd0a966c4b525561fdf2751c176d322e | 235 | py | Python | 1342-number-of-steps-to-reduce-a-number-to-zero/1342-number-of-steps-to-reduce-a-number-to-zero.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 1342-number-of-steps-to-reduce-a-number-to-zero/1342-number-of-steps-to-reduce-a-number-to-zero.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 1342-number-of-steps-to-reduce-a-number-to-zero/1342-number-of-steps-to-reduce-a-number-to-zero.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def numberOfSteps(self, num: int) -> int:
step=0
while(num>0):
if num%2==0:
num=int(num/2)
else:
num-=1
step+=1
return step | 23.5 | 45 | 0.408511 |
fbb72d98ef92e4c535318ed5cc89c3b5de786751 | 75 | py | Python | SmartMirror/webinterface.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | null | null | null | SmartMirror/webinterface.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | 3 | 2018-11-22T09:49:52.000Z | 2019-05-29T14:43:52.000Z | SmartMirror/webinterface.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | null | null | null | from flask_interface import app
# This file simpy starts the webinterface
| 18.75 | 41 | 0.826667 |
83f69c208d3d39e94573fbe48e6b8b218792ea15 | 1,860 | py | Python | match.py | ghallberg/tmnt | fda60b74785db59c3cad371162c8dbf8525cb673 | [
"MIT"
] | null | null | null | match.py | ghallberg/tmnt | fda60b74785db59c3cad371162c8dbf8525cb673 | [
"MIT"
] | null | null | null | match.py | ghallberg/tmnt | fda60b74785db59c3cad371162c8dbf8525cb673 | [
"MIT"
] | null | null | null | import utils
import player
import tournament_round
from itertools import groupby
def add(players):
match_uuid = utils.generate_uuid()
utils.store_event({'type': 'add_match', 'players': players, 'match': match_uuid})
return match_uuid
def parent_tournament(m_id):
creation = utils.first_event('add_m... | 22.682927 | 85 | 0.594624 |
f7ef23b6522d8a4e14dded404ed37881b85e6213 | 1,854 | py | Python | Hack-Gmail-master/Hack-gmail.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Hack-Gmail-master/Hack-gmail.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Hack-Gmail-master/Hack-gmail.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 smtplib
from os import system
def artwork():
print("\n")
print("##########################################################")
print("# #")
print("# \||/ #")
print("# | ... | 36.352941 | 106 | 0.350054 |
790083cffbbe481ab01c97be8c70d2138b48d2bd | 765 | py | Python | UFV---Python/Trabalho Mat. Disc/grafo_4675.py | Vith-MCB/UFV | 9d96fecdc9ffde2563f9f397bcdb39d95aaf7e69 | [
"MIT"
] | 1 | 2022-01-25T16:52:26.000Z | 2022-01-25T16:52:26.000Z | UFV---Python/Trabalho Mat. Disc/grafo_4675.py | Vith-MCB/UFV | 9d96fecdc9ffde2563f9f397bcdb39d95aaf7e69 | [
"MIT"
] | null | null | null | UFV---Python/Trabalho Mat. Disc/grafo_4675.py | Vith-MCB/UFV | 9d96fecdc9ffde2563f9f397bcdb39d95aaf7e69 | [
"MIT"
] | null | null | null | n = int(input())
c = int(input())
lista = input().split()
graph = [[0 for i in range(n)] for j in range(n)]
cont = 0
for i in range(n):
for j in range(n):
graph[i][j] = int(lista[cont])
cont += 1
if i == j:
graph[i][j] = 0
listaMemoria = [c]
contaminados = []
contaminados.append(... | 23.181818 | 49 | 0.48366 |
f7055739785c4cd04f80cc452e257c475ad0395d | 1,476 | py | Python | prova1/prova1.py | samcost/POO | 5c280407abb7aa9db1c82e52c34fd372465e8fe2 | [
"MIT"
] | null | null | null | prova1/prova1.py | samcost/POO | 5c280407abb7aa9db1c82e52c34fd372465e8fe2 | [
"MIT"
] | null | null | null | prova1/prova1.py | samcost/POO | 5c280407abb7aa9db1c82e52c34fd372465e8fe2 | [
"MIT"
] | null | null | null | import math
class Robo:
def __init__(self,nome):
self.__nome = nome
self.__posicao = [0.0,0.0]
self.__em_op = False
@property
def nome(self):
return self.__nome
@nome.setter
def nome(self, alterar_nome):
self.__nome = alterar_nome
@property
def... | 24.196721 | 109 | 0.592818 |
e3b1d2e1a99ab293791b0a941556d153f4f23585 | 3,048 | py | Python | official/cv/yolov3_darknet53/convert_weight.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/yolov3_darknet53/convert_weight.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/yolov3_darknet53/convert_weight.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 40.105263 | 118 | 0.660433 |
b7ddc3eef16d7fe43fa226e0afd937a2d5e64c9e | 310 | py | Python | exercises/fr/solution_02_02_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/solution_02_02_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/solution_02_02_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.fr import French
nlp = French()
doc = nlp("David Bowie a le label PER")
# Cherche le hash pour le label de chaine "PER"
person_hash = nlp.vocab.strings["PER"]
print(person_hash)
# Cherche person_hash pour obtenir la chaine
person_string = nlp.vocab.strings[person_hash]
print(person_string)
| 23.846154 | 47 | 0.764516 |
4db49cf2bf531633e0d7139def2b324d7ee2c77b | 2,103 | py | Python | OMH/2021/crypto/jamal/jamal.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | OMH/2021/crypto/jamal/jamal.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | OMH/2021/crypto/jamal/jamal.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | import jamal_secrets
from Crypto.Random.random import randrange
from Crypto.Util.number import bytes_to_long, inverse, long_to_bytes
p = 23913162461506241913954601592637284046163153526897774745274721709391995411082414294401609291264387860355671317653627011946189434760951108211821677155027175527596657912855025319457656... | 30.926471 | 621 | 0.667618 |
424f2b644f301997892eaa6c7e04f942285c8a64 | 11,088 | py | Python | scripts/train_test_split.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 8 | 2018-03-09T16:44:38.000Z | 2021-04-07T11:33:30.000Z | scripts/train_test_split.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 4 | 2020-03-24T15:34:54.000Z | 2021-06-01T21:54:33.000Z | scripts/train_test_split.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 1 | 2020-05-13T14:30:55.000Z | 2020-05-13T14:30:55.000Z | """
Script to split a dataset in train+test IDs sets.
"""
# Authors: Gianni Barlacchi <gianni.barlacchi@gmail.com> Michele Ferretti <mic.ferretti@gmail.com>
import argparse
import os
import math
import errno
import pandas as pd
import geopandas as gpd
from geopandas import GeoDataFrame
from shapely.geometry import P... | 36.354098 | 141 | 0.606512 |
db08e61087db07b2d4b121bc4b24e4abeafaba16 | 15,530 | py | Python | home-assistant/custom_components/alexa_media/config_flow.py | Adamvg/SmartHouse | 740b010260f6f6b38a19e2a75d431446abd54253 | [
"MIT"
] | null | null | null | home-assistant/custom_components/alexa_media/config_flow.py | Adamvg/SmartHouse | 740b010260f6f6b38a19e2a75d431446abd54253 | [
"MIT"
] | null | null | null | home-assistant/custom_components/alexa_media/config_flow.py | Adamvg/SmartHouse | 740b010260f6f6b38a19e2a75d431446abd54253 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: Apache-2.0
"""
Alexa Config Flow.
For more details about this platform, please refer to the documentation at
https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639
"""
from collections import OrderedDict
im... | 39.820513 | 93 | 0.56671 |
db28ef74b8841b35ccafc2c4f8cc01988bfc17c7 | 1,290 | py | Python | pyntcloud/structures/delaunay.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/structures/delaunay.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/structures/delaunay.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import pandas as pd
from scipy.spatial import Delaunay
from itertools import combinations
from .base import Structure
class Delaunay3D(Delaunay, Structure):
def __init__(self, points,
furthest_site=False,
incremental=False,
qhull_options=None):
Structur... | 30.714286 | 77 | 0.578295 |
222a90d4e889b822e2b2340b55eefcb7a1eb453e | 3,163 | py | Python | Technical_Indicator_ADX.py | sonomarina/Stock-sentiment-analysis | 2b3ddd88c73916ea06d39ef5d455f9220c69fdf7 | [
"Unlicense"
] | null | null | null | Technical_Indicator_ADX.py | sonomarina/Stock-sentiment-analysis | 2b3ddd88c73916ea06d39ef5d455f9220c69fdf7 | [
"Unlicense"
] | null | null | null | Technical_Indicator_ADX.py | sonomarina/Stock-sentiment-analysis | 2b3ddd88c73916ea06d39ef5d455f9220c69fdf7 | [
"Unlicense"
] | null | null | null | # =============================================================================
# Import OHLCV data and calculate ATR and ADX technical indicators
# Author : Mayank Rasu
# Please report bug/issues in the Q&A section
# =============================================================================
# Import necesa... | 42.173333 | 136 | 0.533987 |
58df1740afdb463311c0ff9cf84ae264eb424660 | 31,724 | py | Python | py_script/build_train_json.py | skybluezx/GraphCompute | 95dc176147a7a16eb2176fd1f384de467e3daad6 | [
"MIT"
] | 4 | 2021-07-29T11:32:34.000Z | 2021-08-12T07:13:25.000Z | py_script/build_train_json.py | skybluezx/GraphCompute | 95dc176147a7a16eb2176fd1f384de467e3daad6 | [
"MIT"
] | null | null | null | py_script/build_train_json.py | skybluezx/GraphCompute | 95dc176147a7a16eb2176fd1f384de467e3daad6 | [
"MIT"
] | 1 | 2021-11-29T03:47:35.000Z | 2021-11-29T03:47:35.000Z | import argparse
import json
parser = argparse.ArgumentParser(description='Simple file download script for Google Drive')
parser.add_argument(
'-file_path',
dest='file_path',
type=str,
help='json file path',
)
parser.add_argument(
'-restartRatio',
dest='restartRatio',
type=float,
help='r... | 57.575318 | 92 | 0.677279 |
83387188017b0aa0c3f696999089b979b4cefd7b | 1,081 | py | Python | marsyas-vamp/marsyas/src/marsyas_python/task1_pedestrianwalk_v2.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/task1_pedestrianwalk_v2.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/task1_pedestrianwalk_v2.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Exercises from the book:
# Designing Sound - Andy Farnell
# Practice 1 - Pedestrian walk
#
# It is a simple beeping sound
#
# Network description:
# PWM wave @ 10 Hz \\
# ==> Product ==> Output
# Sinusoid @ 2.5 kHz //
from marsyas import *
from marsyas_util import *
maxGain = ... | 30.885714 | 91 | 0.725254 |
834f5c4bf5b35be8cbe2673066d9daf8e5248eae | 726 | py | Python | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_NumberofIncidentsWithErrors/IncidentsCheck_NumberofIncidentsWithErrors_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_NumberofIncidentsWithErrors/IncidentsCheck_NumberofIncidentsWithErrors_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_NumberofIncidentsWithErrors/IncidentsCheck_NumberofIncidentsWithErrors_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import demistomock as demisto
from IncidentsCheck_NumberofIncidentsWithErrors import main, RED_HTML_STYLE, GREEN_HTML_STYLE
@pytest.mark.parametrize('incident_ids, expected', [
(5, f"<h1 style={RED_HTML_STYLE}5</h1>"),
(1, f"<h1 style={RED_HTML_STYLE}1</h1>"),
(0, f"<h1 style={GREEN_HTML_ST... | 33 | 99 | 0.690083 |
3636eb699b56cad7a5e6a0ab2d8dc14ccce9b56c | 7,171 | py | Python | TSP.py | SpotTroup/Aufgabe33 | 5a8f8d6cb0467feec87d1927ef68d5e680d9eb0c | [
"MIT"
] | null | null | null | TSP.py | SpotTroup/Aufgabe33 | 5a8f8d6cb0467feec87d1927ef68d5e680d9eb0c | [
"MIT"
] | null | null | null | TSP.py | SpotTroup/Aufgabe33 | 5a8f8d6cb0467feec87d1927ef68d5e680d9eb0c | [
"MIT"
] | null | null | null | ##################################################################################################################
#
# Aufgage 3.3 Traveling Salesman PRoble
# Lösungsansatz mit Dijkstra-Algorithmus für ungerichtete gewichtete Graphen mit Hashtabellen
# "Welcher Pfad von Kiel nach Kiel über alle Punkte ist der ... | 31.871111 | 115 | 0.47469 |
18728d979e65b4189943c45307a17a3250086473 | 65,199 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/test/test1.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/test/test1.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/test/test1.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | from __future__ import print_function
import pybedtools
import gzip
import os, difflib, sys
from textwrap import dedent
from nose import with_setup
from nose.tools import assert_raises, raises
from pybedtools.helpers import BEDToolsError
from pybedtools import featurefuncs
import six
import pysam
from .tfuncs import se... | 32.228868 | 270 | 0.597448 |
62b10aa9949e2a67803b52899594375ef6cf1bb3 | 21,173 | py | Python | Cr4ck-yc/Cr4ck.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Cr4ck-yc/Cr4ck.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Cr4ck-yc/Cr4ck.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#Males gw encrypt Tod jika mau recode, recode aja
#Tapi ngotak dikit jangan Lo jual belikan sc ini kontol
#Code by YayanXD
#Created 05-07-2020
#My facebook (https://www.facebook.com/KM39453)
import os,sys,re,time,json,random,requests
from bs4 import BeautifulSoup as pars... | 56.612299 | 241 | 0.420677 |
9adc7cfece715245024834cc3ba1e3fde045ce69 | 266 | py | Python | src/onegov/winterthur/cronjobs.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/cronjobs.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/cronjobs.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.winterthur.app import WinterthurApp
from onegov.winterthur.collections import AddressCollection
@WinterthurApp.cronjob(hour=15, minute=50, timezone='Europe/Zurich')
def update_streets_directory(request):
AddressCollection(request.session).update()
| 33.25 | 68 | 0.830827 |
b18134da28b7ac1cd8ee4a1c8059befb6a20bef2 | 20,108 | py | Python | Packs/CTIX/Integrations/CTIX/CTIX.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | Packs/CTIX/Integrations/CTIX/CTIX.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | Packs/CTIX/Integrations/CTIX/CTIX.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
'''IMPORTS'''
import base64
import hashlib
import hmac
import time
import json
import requests
import urllib.parse
import urllib3
from typing import Any, Dict
# Disable insecure warnings
urllib3.disable_warnings()
'... | 33.966216 | 108 | 0.581759 |
49636ddaca594fd415af8635dd2d4f193daa864a | 489 | py | Python | python/python_backup/Jimut/fact.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/Jimut/fact.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/Jimut/fact.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from tqdm import tqdm
def fact(n): #function to calculate factorial
f0=1
a0=0
for i0 in tqdm(range(n)):
a0=i0+1
... | 28.764706 | 208 | 0.353783 |
b8ce68d6217316cd0c60be6866a8d617ae4937ec | 3,173 | py | Python | tests/rbac/api/user/create_user_test.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | tests/rbac/api/user/create_user_test.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 1 | 2019-07-08T22:32:43.000Z | 2019-07-08T22:32:43.000Z | tests/rbac/api/user/create_user_test.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | # 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 ... | 33.755319 | 79 | 0.628112 |
b8291e021f1ff831ac65bb76d4b837f46a481afb | 11,279 | py | Python | autojail/extract/board.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 6 | 2020-08-12T08:16:15.000Z | 2022-03-05T02:25:53.000Z | autojail/extract/board.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-03-30T10:34:51.000Z | 2021-06-09T11:24:00.000Z | autojail/extract/board.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-11-21T09:30:58.000Z | 2021-11-21T09:30:58.000Z | # type: ignore
import json
import logging
from collections import OrderedDict
from pathlib import Path, PosixPath
from typing import Any, Dict, List, Tuple
from autojail.model.board import ParentClockInfo
from ..model import GIC, Board, Clock, MemoryRegion
from ..utils.draw_tree import draw_tree
from .device_tree imp... | 33.972892 | 172 | 0.505009 |
ac7078e9228aebc170d47c0604f6588ab2cf54a1 | 579 | py | Python | 数据结构/NowCode/23_FindNumsAppearOnce.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | null | null | null | 数据结构/NowCode/23_FindNumsAppearOnce.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 3 | 2020-08-14T07:50:27.000Z | 2020-08-14T08:51:06.000Z | 数据结构/NowCode/23_FindNumsAppearOnce.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 2 | 2021-03-14T05:58:45.000Z | 2021-08-29T17:25:52.000Z | # 一个整型数组里除了两个数字之外,其他的数字都出现了两次。请写程序找出这两个只出现一次的数字。
class Solution:
# 返回[a,b] 其中ab是出现一次的两个数字
def FindNumsAppearOnce(self, array):
dict = {}
for i in range(len(array)):
if dict.get(array[i]) != None:
del dict[array[i]]
else:
dict[array[i]] = 1
... | 30.473684 | 48 | 0.528497 |
cbf649cdd0dec41ab90d8a01af4b65f1a0ddf657 | 172 | py | Python | django_project/apps/course/urls.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | django_project/apps/course/urls.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | django_project/apps/course/urls.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | #encoding: utf-8
from django.urls import path
from . import views
app_name = 'course'
urlpatterns = [
path('course_token/',views.course_token,name='course_token'),
] | 17.2 | 65 | 0.726744 |
0285e0a78fecb3250a3f129b79887e41588a93b7 | 36,541 | py | Python | Src/corpus.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | 2 | 2017-09-28T13:54:57.000Z | 2018-06-28T05:03:06.000Z | Src/corpus.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | null | null | null | Src/corpus.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | null | null | null | import operator
import os
from param import FeatParams, XPParams, Paths
import logging
class Corpus:
"""
a class used to encapsulate all the information of the corpus
"""
mweTokenDic, mweDictionary, mwtDictionary, mwtDictionaryWithSent = {}, {}, {}, {}
def __init__(self, langName):
... | 37.632338 | 173 | 0.499822 |
ceaf5cef3d5bf3a2ff1ac68c6c154588d81704f8 | 1,581 | py | Python | chapter2/problem5.py | Baw25/MongoStuff | 0a6f35505948d36b3bf1b07a1a75709babaeca71 | [
"MIT"
] | null | null | null | chapter2/problem5.py | Baw25/MongoStuff | 0a6f35505948d36b3bf1b07a1a75709babaeca71 | [
"MIT"
] | null | null | null | chapter2/problem5.py | Baw25/MongoStuff | 0a6f35505948d36b3bf1b07a1a75709babaeca71 | [
"MIT"
] | null | null | null |
import pymongo
# movies example:
# {
# "_id" : ObjectId("56918f5e24de1e0ce2dfccc3"),
# "title" : "Once Upon a Time in the West",
# "year" : 1968,
# "imdb" : "tt0064116",
# "type" : "movie"
# }
# movieDetails ex:
db.movieDetails.find({"countries.1": "Sweden"})
{
"_id" : ObjectId("569190ca24de1e0ce2dfcd4f"),
... | 21.657534 | 189 | 0.623656 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.