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
4dede58c0fef4d55dc28c54109b9b8b889164529
410
py
Python
Python1/aula2.py
Belaschich/SoulON
9f908b025b34fc79187b4efd5ea93a78dca0ef7e
[ "MIT" ]
null
null
null
Python1/aula2.py
Belaschich/SoulON
9f908b025b34fc79187b4efd5ea93a78dca0ef7e
[ "MIT" ]
null
null
null
Python1/aula2.py
Belaschich/SoulON
9f908b025b34fc79187b4efd5ea93a78dca0ef7e
[ "MIT" ]
null
null
null
''' 1-Crie três inputs que receba os três dados abaixo: -Nome do tipo string -Altura do tipo Float -CPF do tipo inteiro 2-Exiba através de um único print as três informações para o usuário. ''' nome = input("Digite seu nome: ") altura = float(input("Digite sua altura: ")) CPF = int(input("Digite seu CPF: ")) print(...
27.333333
96
0.695122
151288429a1fc1def4d38955472f858cfa9bcd3f
6,252
py
Python
hark/src/ex5/ex5.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
11
2017-04-21T11:39:55.000Z
2022-02-11T20:25:18.000Z
hark/src/ex5/ex5.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
69
2017-04-26T09:30:38.000Z
2017-08-01T11:31:21.000Z
hark/src/ex5/ex5.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
53
2017-04-20T16:16:11.000Z
2017-07-19T12:53:01.000Z
# coding=utf-8 import sys import math import networkx as nx import numpy as np import timeit ## @package ex5 # This script is a solution for exercise 5 from the advanced programming course in the sommer 2017 at TUB. # For more information see @link http://www.zib.de/koch/lectures/ss2017_appfs.php ## This method vali...
45.970588
113
0.633077
e19cd983282065058ae67eafe19645c7b6501372
2,453
py
Python
SurveyManager/survey/migrations/0002_auto_20181126_0514.py
javiervar/SurveyManager
bbe2ed356654c32586c587f58c609c8ce014e96b
[ "MIT" ]
null
null
null
SurveyManager/survey/migrations/0002_auto_20181126_0514.py
javiervar/SurveyManager
bbe2ed356654c32586c587f58c609c8ce014e96b
[ "MIT" ]
null
null
null
SurveyManager/survey/migrations/0002_auto_20181126_0514.py
javiervar/SurveyManager
bbe2ed356654c32586c587f58c609c8ce014e96b
[ "MIT" ]
null
null
null
# Generated by Django 2.1.2 on 2018-11-26 05:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('survey', '0001_initial'), ] operations = [ migrations.CreateModel( name='Alumno', f...
35.550725
114
0.563392
a1646cb279bb201f3ad2bc65ca621ee7ea6ca3ab
94
py
Python
admin-tutorial/AdminFields/fieldsets_/apps.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
5
2020-07-14T07:48:10.000Z
2021-12-20T21:20:10.000Z
admin-tutorial/AdminFields/fieldsets_/apps.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
7
2021-03-26T03:13:38.000Z
2022-03-12T00:42:03.000Z
admin-tutorial/AdminFields/fieldsets_/apps.py
zhengtong0898/django-decode
69680853a4a5b07f6a9c4b65c7d86b2d401a92b1
[ "MIT" ]
1
2021-02-16T07:04:25.000Z
2021-02-16T07:04:25.000Z
from django.apps import AppConfig class FieldsetsConfig(AppConfig): name = 'fieldsets_'
15.666667
33
0.765957
62dcd4273370eca4f4982ceac5266f53cb24f197
3,150
py
Python
etl/core/environment.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
etl/core/environment.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
etl/core/environment.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
""" All environment variables should be loaded from here. This makes it easy to manage state. """ import os from etl.core.singleton import Singleton @Singleton class Environment: def __init__(self): ''' All flags will be named the same as the environment variable unless specified. Tuple format: ====...
41.447368
112
0.553968
9aa3ae925064f9f67cc9e7428d6b66cef2f9fb6c
2,300
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch08_binary_trees/util/TreeUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch08_binary_trees/util/TreeUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch08_binary_trees/util/TreeUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden from ch08_binary_trees.solutions import ex13_print_tree from ch08_binary_trees.util.binary_tree_node import BinaryTreeNode def inorder(node, action): if node is None: return inorder(node.left, action) action(...
20.909091
66
0.675217
b1766c3ff7a7b1a01936643bd979ef59785377c0
962
py
Python
SC101_Assignments/SC101_Assignment5/largest_digit.py
JIllchen487/StanCode101
8025dd4e4cf0cb3d14d7314ef4ea6dfff3e5b5cc
[ "MIT" ]
null
null
null
SC101_Assignments/SC101_Assignment5/largest_digit.py
JIllchen487/StanCode101
8025dd4e4cf0cb3d14d7314ef4ea6dfff3e5b5cc
[ "MIT" ]
null
null
null
SC101_Assignments/SC101_Assignment5/largest_digit.py
JIllchen487/StanCode101
8025dd4e4cf0cb3d14d7314ef4ea6dfff3e5b5cc
[ "MIT" ]
null
null
null
""" File: largest_digit.py Name: ---------------------------------- This file recursively prints the biggest digit in 5 different integers, 12345, 281, 6, -111, -9453 If your implementation is correct, you should see 5, 8, 6, 1, 9 on Console. """ def main(): print(find_largest_digit(12345)) # 5 print(find_larg...
19.24
55
0.644491
493da376f8a8bc3ab9deb411951f522bc2f14f30
414
py
Python
370/tuwulisu_370_hashmap.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
370/tuwulisu_370_hashmap.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
370/tuwulisu_370_hashmap.py
Leetcode-Secret-Society/warehouse
40d7969683b1296f361e799cda37f15ceec52af8
[ "MIT" ]
null
null
null
from collections import defaultdict class Solution: def getModifiedArray(self, length: int, updates: List[List[int]]) -> List[int]: hash_map = defaultdict(int) for i, j, c in updates: hash_map[i]+=c hash_map[j+1]-=c num = 0 ans = [] for i in range(leng...
27.6
83
0.524155
770b2bc050b9e72fbafd23468a59a00f5ece3b3c
635
py
Python
data_tests/saved__backend__py3.9/numba/row_sum_boost.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
data_tests/saved__backend__py3.9/numba/row_sum_boost.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
data_tests/saved__backend__py3.9/numba/row_sum_boost.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
# __protected__ from numba import njit import numpy as np # __protected__ @njit(cache=True, fastmath=True) def row_sum(arr, columns): return arr.T[columns].sum(0) # __protected__ @njit(cache=True, fastmath=True) def row_sum_loops(arr, columns): # locals type annotations are used only for Cython # arr...
22.678571
54
0.645669
657750ab531be699e7e92956f42fa38ea0a2df45
10,222
py
Python
src/onegov/form/parser/grammar.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/form/parser/grammar.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/form/parser/grammar.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import re from decimal import Decimal from onegov.form.utils import decimal_range from pyparsing import ( alphanums, Combine, FollowedBy, Group, Literal, MatchFirst, nums, pyparsing_unicode, OneOrMore, Optional, ParserElement, Regex, Suppress, White, Word, ) ...
21.47479
79
0.625514
b8a09fcdad4408d181f568f0592e23b7ef2775bd
24,255
py
Python
Packs/IntSight/Integrations/IntSight/IntSight_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/IntSight/Integrations/IntSight/IntSight_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/IntSight/Integrations/IntSight/IntSight_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import pytest from mock import Mock, patch import demistomock as demisto INTSIGHTS_PARAMS = { 'server': 'https://api.test.com', 'proxy': 'no_proxy', 'insecure': True, 'credentials': { 'identifier': "some_id", 'password': 'some_password' } } @pytest.mark.filterwarnings('ignore::ur...
35.152174
117
0.589899
b8b3c4c31692738e9362a2d3032ec7cf814f42d0
2,209
py
Python
server/apps/recommendation/task.py
Mayandev/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
129
2019-04-20T08:23:25.000Z
2022-03-14T10:02:23.000Z
server/apps/recommendation/task.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
9
2019-05-19T15:06:17.000Z
2021-12-14T06:47:14.000Z
server/apps/recommendation/task.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
34
2019-05-06T06:37:17.000Z
2021-12-09T02:27:58.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-04-28 20:52 # @Author : Mayandev # @Site : https://github.com/Mayandev/ # @File : task.py # @Software: PyCharm from users.models import UserProfile from movie.models import Genre, Movie from user_operation.models import UserFavorGenre, UserFavorAct...
29.453333
123
0.659574
3be0a93a819b35fd57092bd54eeebec1c083d33d
5,789
py
Python
packages/watchmen-storage/src/watchmen_storage/storage_spi.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage/src/watchmen_storage/storage_spi.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-storage/src/watchmen_storage/storage_spi.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from typing import Any, Dict, List, Optional from watchmen_model.admin import Topic from watchmen_model.common import DataPage from .free_storage_types import FreeAggregatePager, FreeAggregator, FreeFinder, FreePager from .storage_types import Entity, EntityDeleter, EntityDistinctVa...
24.120833
117
0.735015
f010a1c1f0338063e73819f958c150fc4e2f6f26
1,463
py
Python
Mythras/upload2roll20.py
ManuZzZ85/roll20-character-sheets
b5fef2108ec42bc4334fb0a35e30b361e275c01c
[ "MIT" ]
1,104
2015-01-02T17:02:48.000Z
2022-03-31T19:32:41.000Z
Mythras/upload2roll20.py
ManuZzZ85/roll20-character-sheets
b5fef2108ec42bc4334fb0a35e30b361e275c01c
[ "MIT" ]
4,560
2015-01-04T22:17:13.000Z
2022-03-31T21:29:56.000Z
Mythras/upload2roll20.py
ManuZzZ85/roll20-character-sheets
b5fef2108ec42bc4334fb0a35e30b361e275c01c
[ "MIT" ]
5,009
2015-01-01T16:21:24.000Z
2022-03-30T12:50:54.000Z
import json import requests from pathlib import Path home = str(Path.home()) with open("{}/.roll20/config.json".format(home)) as config_file: configs = json.load(config_file) login_data = {'email': configs['email'], 'password': configs['password']} roll20session = requests.Session() login_result = roll20session....
29.26
126
0.694463
b2fe957e41b1173e97e6db1cdebac81dd5538d4f
449
py
Python
analyze/__init__.py
no-ora/solitadds
18c5868af00441a8e67311679a0b848c836975d2
[ "MIT" ]
null
null
null
analyze/__init__.py
no-ora/solitadds
18c5868af00441a8e67311679a0b848c836975d2
[ "MIT" ]
null
null
null
analyze/__init__.py
no-ora/solitadds
18c5868af00441a8e67311679a0b848c836975d2
[ "MIT" ]
null
null
null
from applications import summarize_applications, applications_by_month_by_action, applications_by_month, applications_by_weekday, applications_by_weekday_by_operation, applications_by_hour, applications_by_hour_by_operation from users import summarize_users, get_one_time_builder_application_ids from plots_for_variation...
112.25
223
0.926503
3373b78b6116788282eef9227546fd63b17015a4
1,259
py
Python
Interview Preparation Kits/Interview Preparation Kit/Trees/Trees: Is This a Binary Tree/is_binary_tree.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Interview Preparation Kits/Interview Preparation Kit/Trees/Trees: Is This a Binary Tree/is_binary_tree.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Interview Preparation Kits/Interview Preparation Kit/Trees/Trees: Is This a Binary Tree/is_binary_tree.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
""" Node is defined as class node: def __init__(self, data): self.data = data self.left = None self.right = None """ def checkBST(root): if not(root): return True if not(root.left) and not(root.right): return True if not(root.left): current = ro...
27.977778
108
0.592534
6893e3e35437b6b62d01bfb07ae4f225dcff9f35
2,422
py
Python
cbm/ipycbm/ipy_view/view_time_series.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
17
2021-01-18T07:27:01.000Z
2022-03-10T12:26:21.000Z
cbm/ipycbm/ipy_view/view_time_series.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
4
2021-04-29T11:20:44.000Z
2021-12-06T10:19:17.000Z
cbm/ipycbm/ipy_view/view_time_series.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
47
2021-01-21T08:25:22.000Z
2022-03-21T14:28:42.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : Konstantinos Anastasakis # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD from ipywidgets import (HBox, VBox, Dropdown, Button, Out...
27.213483
78
0.599917
f0a8f18d21c5d79e5553f1ae2b0ca74aa8163b2f
744
py
Python
python/advanced_sw/res_code/SCRAP.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/advanced_sw/res_code/SCRAP.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/advanced_sw/res_code/SCRAP.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
import sqlite3 import wget conn = sqlite3.connect('music.sqlite') cur = conn.cursor() cur.executescript(''' CREATE TABLE IF NOT EXISTS data ( i INTEGER, url TEXT UNIQUE PRIMARY KEY ); ''') track1 = 'http://mp3l.jamendo.com/?trackid=' track2 = '&format=mp31&from=app-97dab294' i1 = cur.execute(''' SELECT...
17.302326
58
0.569892
680162711b478acbbc00efca69dc68ac8bcee65d
3,263
py
Python
python/data_visualisation.py
Cl3V0r/MLSeminar
d05f171a9b7d773ea123e1919e07312a7f0c9fe8
[ "MIT" ]
null
null
null
python/data_visualisation.py
Cl3V0r/MLSeminar
d05f171a9b7d773ea123e1919e07312a7f0c9fe8
[ "MIT" ]
null
null
null
python/data_visualisation.py
Cl3V0r/MLSeminar
d05f171a9b7d773ea123e1919e07312a7f0c9fe8
[ "MIT" ]
null
null
null
#!usr/bin/env python #coding:utf8 import matplotlib.pyplot as plt from wordcloud import WordCloud from pathlib import Path import numpy as np from PIL import Image from PIL import ImageFilter from keras.utils import plot_model from ann_visualizer.visualize import ann_viz from keras.models import load_model def plotWo...
33.989583
77
0.702115
8b43ad289f37539fe743ea56f4ab9f27814f8852
3,336
py
Python
src/server/app/repository/CanvasRepository.py
MatthiasRiener/DigiPen
9b4aff4a1c431e06d73733dc3dd3f3f3d4631704
[ "MIT" ]
null
null
null
src/server/app/repository/CanvasRepository.py
MatthiasRiener/DigiPen
9b4aff4a1c431e06d73733dc3dd3f3f3d4631704
[ "MIT" ]
null
null
null
src/server/app/repository/CanvasRepository.py
MatthiasRiener/DigiPen
9b4aff4a1c431e06d73733dc3dd3f3f3d4631704
[ "MIT" ]
null
null
null
from ..models.Canvas import Canvas from ..db.settings import mongoclient import json import time import os from bson import json_util from bson.objectid import ObjectId from ..repository.AuthenticationRepository import AuthenticationRepository aRepo = AuthenticationRepository(testing=False) class CanvasRepository()...
32.705882
246
0.628297
8c93b1f628e3c9a362945e104d1473d59c0adcba
159
py
Python
Algorithms/Implementation/Repeated.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Implementation/Repeated.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Implementation/Repeated.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
#coding:utf-8 s = raw_input() n = int(raw_input()) length = len(s) i = n / length mod = n % length a_num = s.count('a') print a_num*i + s[:mod].count('a')
12.230769
34
0.591195
0fc8347785f2e3cc51f3df1e97cef7bee8f98683
10,450
py
Python
python/oneflow/compatible/single_client/experimental/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
1
2021-09-13T02:34:53.000Z
2021-09-13T02:34:53.000Z
python/oneflow/compatible/single_client/experimental/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
null
null
null
python/oneflow/compatible/single_client/experimental/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
1
2021-01-17T03:34:39.000Z
2021-01-17T03:34:39.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...
58.379888
88
0.8511
e896b2c7e3514da43e72e1757b75f7d1c14c8f07
74,548
py
Python
Packs/epo/Integrations/epoV2/epoV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
null
null
null
Packs/epo/Integrations/epoV2/epoV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
null
null
null
Packs/epo/Integrations/epoV2/epoV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
null
null
null
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import json import urllib3 import traceback from typing import Any, Tuple, Dict # Disable insecure warnings urllib3.disable_warnings() ''' CONSTANTS ''' GET = 'GET' DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' EPO_SYSTEM_ATTRI...
39.153361
120
0.58345
e89e21005a2e34316959cf063cd8bc5aa6f58239
461
py
Python
src/using_tips/u&r.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/using_tips/u&r.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/using_tips/u&r.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ python2 中,u是unicode的编码,r是原始字符,例如: u'你好' #这里是把‘你好’用Unicode编码 r'\nabdcd\rds' #这里加上r表示 把\nabdcd\rds看做原始字符,忽略一切转义字符 s1 = '百度知道' s2 = u'百度知道' type(s1) type(s2) print '520\n13213' print u'520\n13213' print r'520\n12321' print R'520\n12321' """ """ Python 2里的Unicode字符串在Pyt...
13.171429
75
0.700651
fa2d294a37952354ebf15bee6013874b016a5340
3,536
py
Python
official/recommend/deep_and_cross/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/recommend/deep_and_cross/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/recommend/deep_and_cross/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...
36.081633
109
0.700509
d7818b5bc11f98497c4e7de851721463b696b5fe
1,304
py
Python
SBTK_League_Helper/src/tools/__DEPRECATED/dynamic_programming.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/src/tools/__DEPRECATED/dynamic_programming.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/src/tools/__DEPRECATED/dynamic_programming.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
# This comes directly from Leira's Project Euler utilities # turns out the tool is actually too powerful for this purpose, so # this is a simplified version from functools import wraps # The function must take only one parameter class Simple_Dynamic_Memory(): ############################ ## basi...
25.568627
102
0.505368
0e23ec2712f35696822abe3351fb391827ccf1d6
1,668
py
Python
SoSe-21/Code-Vorlesungen/Wiederholung/2/Wiederholung-Listen-Strings-Dictionaries.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
1
2022-03-23T09:40:39.000Z
2022-03-23T09:40:39.000Z
SoSe-21/Code-Vorlesungen/Wiederholung/2/Wiederholung-Listen-Strings-Dictionaries.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
SoSe-21/Code-Vorlesungen/Wiederholung/2/Wiederholung-Listen-Strings-Dictionaries.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
# #Index 0 1 2 3 4 # e = ["Das", "ist", "eine", "Liste", ["Verschachtelung", "yeah"]] # Liste # f = {"Jonas": 2101357, # "Peter": 2101356} # Dictionary einkaufsliste = [] # Definition der Funktionen def split_nutzereingabe(eingabe): liste = eingabe.split(",") return liste def laeng...
26.47619
88
0.705036
0e4078bd56f5eefd66750a19d0655383f7d636d7
3,658
py
Python
dual_model.py
henrique/jigsaw20
5d12de807667810ea9b9bdb9cbccebabea7ed21d
[ "Apache-2.0" ]
8
2020-06-23T13:42:34.000Z
2022-01-25T11:00:01.000Z
dual_model.py
henrique/jigsaw20
5d12de807667810ea9b9bdb9cbccebabea7ed21d
[ "Apache-2.0" ]
null
null
null
dual_model.py
henrique/jigsaw20
5d12de807667810ea9b9bdb9cbccebabea7ed21d
[ "Apache-2.0" ]
3
2020-06-24T03:18:26.000Z
2020-07-30T01:22:53.000Z
""" build a dual TFAutoModel and load its data from npz or tfrec dataset """ import glob import numpy as np import pandas as pd import tensorflow as tf from tensorflow.keras.layers import Dense, Dropout, Input from tensorflow.keras.models import Model from transformers import TFAutoModel def build_model(model_id1='...
33.254545
92
0.644615
ada599dae079b0f6c693cd048f39a5f063a41021
15,985
py
Python
upperBound.py
ixa-ehu/crosstext
196c18619c730d4168a957038ba237f0dc5f32ca
[ "Apache-2.0" ]
null
null
null
upperBound.py
ixa-ehu/crosstext
196c18619c730d4168a957038ba237f0dc5f32ca
[ "Apache-2.0" ]
null
null
null
upperBound.py
ixa-ehu/crosstext
196c18619c730d4168a957038ba237f0dc5f32ca
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from collections import Counter from itertools import * de_en_alignment = '/tartalo03/users/crosstext/europarl/test/alignments/en-de.grow-diag-final.alignment' es_en_alignment = '/tartalo03/users/crosstext/europarl/test/alignments/en-es.grow-diag-final...
50.746032
211
0.613638
addacbd8e43ec945d6f196625761bd650864cc64
231
py
Python
src/nfz_module/adapter/SensorAdapter.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
src/nfz_module/adapter/SensorAdapter.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
src/nfz_module/adapter/SensorAdapter.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod, abstractproperty __author__ = 'Hans-Werner Roitzsch' class SensorAdapter(metaclass=ABCMeta): """ Abstract Base Class: SensorAdapter """ @abstractmethod def get_data(self): return
16.5
57
0.766234
70af2df0b6fa7923d8582e1d5978829a52130ee0
82
py
Python
packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/schema/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/schema/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/schema/__init__.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from .report_schema import ReportSchema from .subject_schema import SubjectSchema
27.333333
41
0.878049
70b46654c70a5b8c9f8887463e4e0703687bfb63
500
py
Python
verto/errors/CustomArgumentRulesError.py
uccser/verto
d36aa88b208f1700fafc033679bd1e9775496d25
[ "MIT" ]
4
2017-04-10T06:09:54.000Z
2019-05-04T02:07:40.000Z
verto/errors/CustomArgumentRulesError.py
uccser/verto
d36aa88b208f1700fafc033679bd1e9775496d25
[ "MIT" ]
268
2017-04-03T20:40:46.000Z
2022-02-04T20:10:08.000Z
verto/errors/CustomArgumentRulesError.py
uccser/kordac
d36aa88b208f1700fafc033679bd1e9775496d25
[ "MIT" ]
1
2019-01-07T15:46:31.000Z
2019-01-07T15:46:31.000Z
from verto.errors.Error import Error class CustomArgumentRulesError(Error): '''Exception raised when custom argument rules refer to a processors that does not exist. Attributes: tag: tag which was not matched argument: the argument that was not found value: the value that was not ...
27.777778
72
0.684
cbe25c51b03c5159d113c7d2de100ec7bb8f11a8
675
py
Python
decorate_showcase/com/aaron/decoratedemo.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
decorate_showcase/com/aaron/decoratedemo.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
2
2021-03-25T22:00:07.000Z
2022-01-20T15:51:48.000Z
decorate_showcase/com/aaron/decoratedemo.py
qsunny/python
ace8c3178a9a9619de2b60ca242c2079dd2f825e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' Created on 2019-04-13 @FileName: manage.py @Description: 修饰器使用示例 functools模板作用在于修改被修改的函数,函数名称 、文档名称、模板名称是原名称 @author: 'Aaron.Qiu' @version V1.0.0 ''' from functools import wraps def tags(tag_name): def tags_decorator(func): @wraps(func) def func_wrapper(name): ...
23.275862
65
0.659259
38114d1fa6df057adf8cdb71fba964cb88aa02aa
3,404
py
Python
tools/pollers/lraEbeArcgis.py
fxedel/vaterstetten-in-zahlen
c161a18fd72a7f1ca695b075e029090d604ccdd2
[ "MIT" ]
10
2021-01-28T21:43:22.000Z
2022-01-15T16:50:34.000Z
tools/pollers/lraEbeArcgis.py
fxedel/vaterstetten-in-zahlen
c161a18fd72a7f1ca695b075e029090d604ccdd2
[ "MIT" ]
7
2021-06-10T07:19:21.000Z
2022-03-22T15:11:17.000Z
tools/pollers/lraEbeArcgis.py
fxedel/vaterstetten-in-zahlen
c161a18fd72a7f1ca695b075e029090d604ccdd2
[ "MIT" ]
5
2021-01-29T14:14:45.000Z
2022-01-09T15:37:36.000Z
from arcgis.features import FeatureLayer from datetime import datetime import os import time import pollers.poller class InzidenzPoller(pollers.poller.Poller): def run(self): csv_filename = os.path.join('corona-fallzahlen', 'arcgisInzidenzLandkreis.csv'); current_rows = self.read_csv_rows(csv_filename) ...
36.602151
145
0.657168
2a941a921642c699c31107efc7a225e22a4377ce
366
py
Python
30_days_of_Code/18_queue_stack.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
30_days_of_Code/18_queue_stack.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
30_days_of_Code/18_queue_stack.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 class Solution: def __init__(self): self.stack = [] self.queue = [] def pushCharacter(self, s): self.stack.append(s) def enqueueCharacter(self, s): self.queue.append(s) def popCharacter(self): return self.stack.pop() def dequeueChar...
19.263158
34
0.595628
fab2fe0179aaf49f14f5e2229a5cf2c6ee3d789c
405
py
Python
plus-one/plus-one.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
plus-one/plus-one.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
plus-one/plus-one.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def plusOne(self, digits: List[int]) -> List[int]: # 1. list of integers --> list of strings str_digits = [str(d) for d in digits] # 2. plus one and then convert it to string str_digits=str(int("".join(str_digits))+1) # 3. add items into list ...
28.928571
54
0.540741
e2015705d4c2c19c4e9375b10a7e8b06136f93c4
3,814
py
Python
app/models/auth/Bussiness.py
nucleo-de-telessaude-do-maranhao/abtms
8d1b1df223d9f07fc4447836011f3e3678625d59
[ "MIT" ]
null
null
null
app/models/auth/Bussiness.py
nucleo-de-telessaude-do-maranhao/abtms
8d1b1df223d9f07fc4447836011f3e3678625d59
[ "MIT" ]
null
null
null
app/models/auth/Bussiness.py
nucleo-de-telessaude-do-maranhao/abtms
8d1b1df223d9f07fc4447836011f3e3678625d59
[ "MIT" ]
1
2019-03-13T14:34:24.000Z
2019-03-13T14:34:24.000Z
from app.models.auth.DatabaseFactory import DatabaseFactory class Bussiness(): def __init__(self, code=0, name="", email="", password="", cnpj="", phone=""): self.code = code self.name = name self.email = email self.password = password self.cnpj = cnpj self.phone = phone self.connection =...
26.486111
176
0.601993
ea2e76fb04a38dc482184670861eb302d7ae8e03
1,138
py
Python
car/ceshi.py
cdxxiaoge/StreetRoller
3bb9b4ee8ddad9c1582f1aaf572591a09e5d3400
[ "Apache-2.0" ]
null
null
null
car/ceshi.py
cdxxiaoge/StreetRoller
3bb9b4ee8ddad9c1582f1aaf572591a09e5d3400
[ "Apache-2.0" ]
null
null
null
car/ceshi.py
cdxxiaoge/StreetRoller
3bb9b4ee8ddad9c1582f1aaf572591a09e5d3400
[ "Apache-2.0" ]
null
null
null
from Mymqtt import Mymqtt from receive import * import pygame # 位置、速度、加速度三个量都要记得进行模拟和现实的转化 # 屏幕刷新 flash = 0 # 背景图以及移动小车图 car_image_name = "car.png" pygame.init() # 生成窗口以及窗口标题 screen_show = pygame.display.set_mode((1000, 600), 0, 32) pygame.display.set_caption("Little Case") # 加载并转换图片 car0 = pygame.image.load(car_image_...
25.288889
75
0.619508
ea2ed11fdc2caebde285184c6e50b3e664c92df5
617
pyde
Python
sketches/manifest_video/manifest_video.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/manifest_video/manifest_video.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/manifest_video/manifest_video.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
def setup(): global txt, y size(842, 480, P3D) # große Version # size(560, 315, P3D) #kleine Version # fullScreen(P3D) y = height/2 lines = loadStrings("manifest.txt") txt = join(lines, "\n") keepGoing = False def draw(): global txt, y background(0) translate(width/2, he...
18.69697
41
0.547812
5258dea1709c8cde71c7109ae41e075c28db3bcf
938
py
Python
PythonPro/demo/conditional.py
JianmingXia/StudyTest
66d688ad41bbce619f44359ea126ff07a923f97b
[ "MIT" ]
null
null
null
PythonPro/demo/conditional.py
JianmingXia/StudyTest
66d688ad41bbce619f44359ea126ff07a923f97b
[ "MIT" ]
68
2020-09-05T04:22:49.000Z
2022-03-25T18:47:08.000Z
PythonPro/demo/conditional.py
JianmingXia/StudyTest
66d688ad41bbce619f44359ea126ff07a923f97b
[ "MIT" ]
null
null
null
#coding=utf-8 #条件语句 var = 100 if ( var == 100 ) : print "变量 var 的值为100" print "Good bye!" # num = 9 # if num >= 0 and num <= 10: # 判断值是否在0~10之间 # print 'hello' # # 输出结果: hello # # num = 10 # if num < 0 or num > 10: # 判断值是否在小于0或大于10 # print 'hello' # else: # print 'undefine' # # 输出结果: undefine # #...
19.142857
58
0.514925
870e282eb3c95af90cf5327746147d52466c9c4a
192
py
Python
lib/util/ImageProcessing/strategies.py
Thukor/MazeSolver
c953e193ce27a7348e8ec9c5592144426dfce193
[ "MIT" ]
5
2018-02-06T22:48:34.000Z
2020-01-07T20:19:05.000Z
lib/util/ImageProcessing/strategies.py
Thukor/MazeSolver
c953e193ce27a7348e8ec9c5592144426dfce193
[ "MIT" ]
11
2018-01-31T21:47:49.000Z
2018-04-21T16:42:52.000Z
lib/util/ImageProcessing/strategies.py
Thukor/MazeSolver
c953e193ce27a7348e8ec9c5592144426dfce193
[ "MIT" ]
2
2020-06-18T05:40:03.000Z
2022-02-02T03:46:30.000Z
from ..decorators.imagestrategy import * @imagestrategy def identity(image): return image class ImageProcessor: @staticmethod def process_image(image, strategy): return strategy(image)
19.2
40
0.791667
5e8627a326ae1a3cdd72fc3c5458483c0f21feec
28,471
py
Python
Packs/ReversingLabs_Titanium_Cloud/Integrations/ReversingLabsTitaniumCloudv2/ReversingLabsTitaniumCloudv2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ReversingLabs_Titanium_Cloud/Integrations/ReversingLabsTitaniumCloudv2/ReversingLabsTitaniumCloudv2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ReversingLabs_Titanium_Cloud/Integrations/ReversingLabsTitaniumCloudv2/ReversingLabsTitaniumCloudv2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from typing import Union import demistomock as demisto from CommonServerPython import * from ReversingLabs.SDK.ticloud import FileReputation, AVScanners, FileAnalysis, RHA1FunctionalSimilarity, \ RHA1Analytics, URIStatistics, URIIndex, AdvancedSearch, ExpressionSearch, FileDownload, FileUpload, \ URLThreatIntel...
30.320554
120
0.654982
5e9a41515b549ba27ee3725976df4c5d4a3399eb
501
py
Python
task_3_7.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
task_3_7.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
task_3_7.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 3. Вариант 7. # Напишите программу, которая выводит имя "Мэри Анн Эванс", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире. # Videneev P. A. # 26.05.2016 print("Герой нашей сегоднящней программы - Мэри Анн Эванс") ...
45.545455
200
0.746507
0ddb81c837dfb2373434c84e20b2fe56819e6caf
1,771
py
Python
Assembler/asm_io.py
Laegluin/mikrorechner
7e5e878072c941e422889465c43dea838b83e5fd
[ "MIT" ]
1
2019-01-28T01:53:20.000Z
2019-01-28T01:53:20.000Z
Assembler/asm_io.py
Laegluin/mikrorechner
7e5e878072c941e422889465c43dea838b83e5fd
[ "MIT" ]
null
null
null
Assembler/asm_io.py
Laegluin/mikrorechner
7e5e878072c941e422889465c43dea838b83e5fd
[ "MIT" ]
null
null
null
import math import os #nochmal fürs debuggen mit adressen printen def read_assembler_file(source): if(os.path.exists(source)): if(source.endswith('.txt')): file = open(source,'r') return file.read() else: print('Pfad muss in Textdatei enden!') else: ...
30.534483
126
0.584416
df524879ce7b54e72dfb71052f0409cf1f4d7228
2,798
py
Python
cs/lambda_cs/06_graphs/sprint_challenge/traverse_graph.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
cs/lambda_cs/06_graphs/sprint_challenge/traverse_graph.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/06_graphs/sprint_challenge/traverse_graph.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
""" Graphs - Sprint Challenge :: Traversal graph """ import random from util import Stack, Queue from room import Room class TraverseGraph: def __init__(self): """Represent a graph as a dictionary of rooms mapping rooms and connections.""" self.rooms = {} # Lookup for opposite d...
36.337662
73
0.602931
df559fe5a00a1cf76affcad5121a890c8d01728f
296
py
Python
PyHugeGraph/__init__.py
WeiwenRen/PyHugeGraph
e09430da5a5b93fbafd1de02f8c4545bd1f0afd7
[ "Apache-2.0" ]
null
null
null
PyHugeGraph/__init__.py
WeiwenRen/PyHugeGraph
e09430da5a5b93fbafd1de02f8c4545bd1f0afd7
[ "Apache-2.0" ]
null
null
null
PyHugeGraph/__init__.py
WeiwenRen/PyHugeGraph
e09430da5a5b93fbafd1de02f8c4545bd1f0afd7
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- """ PyCharm __init__.py.py 18/9/14 16:32 by Gaomenghan """ import config from comm.hugegraph.HugeGraphClient import HugeGraphClient hugegraph_client = HugeGraphClient( host=config.hugegraph.CONTACT_POINTS, port=config.hugegraph.PORT, graph_name="hugegraph", )
19.733333
58
0.746622
33cad60650faf328dfc18481ffdeab210799f59b
4,409
py
Python
samples/grouping-categorical-features/group_feat.py
Matheus158257/projects
26a6148046533476e625a872a2950c383aa975a8
[ "Apache-2.0" ]
2
2021-02-16T12:39:57.000Z
2021-07-21T11:36:39.000Z
samples/grouping-categorical-features/group_feat.py
Matheus158257/projects
26a6148046533476e625a872a2950c383aa975a8
[ "Apache-2.0" ]
20
2020-10-26T18:05:27.000Z
2021-11-30T19:05:22.000Z
samples/grouping-categorical-features/group_feat.py
Matheus158257/projects
26a6148046533476e625a872a2950c383aa975a8
[ "Apache-2.0" ]
7
2020-10-13T18:12:22.000Z
2021-08-13T19:16:21.000Z
from sklearn.cluster import KMeans import numpy as np import pandas as pd class GroupCatFeatures(): def __init__(self,method='top_n',threshold=0.05,n=10,column_index = None,column_name='',task='classification'): # Input variables # self.feature_types = feature_types self.method = method ...
48.450549
140
0.589703
1d2338dbab90ef90ecf79ccb48346ae9d2694d0f
691
py
Python
hrsweb/config.py
sirboldilox/hrsweb
7d0b9df08fde8edba9cdd4c86d9a4518aa5f9758
[ "MIT" ]
null
null
null
hrsweb/config.py
sirboldilox/hrsweb
7d0b9df08fde8edba9cdd4c86d9a4518aa5f9758
[ "MIT" ]
null
null
null
hrsweb/config.py
sirboldilox/hrsweb
7d0b9df08fde8edba9cdd4c86d9a4518aa5f9758
[ "MIT" ]
null
null
null
""" Config reader """ from configparser import ConfigParser, NoSectionError, ParsingError # Defaults class SiteConfig(ConfigParser): """Configuration options for the site. Raises exceptions if the required sections are missing """ required_sections = ['flask', 'hrsdb'] @classmethod def fr...
23.033333
70
0.645441
1d4b94c792b5f17ce36f600d11a9929f1d5af216
1,712
py
Python
official/cv/ADNet/pth2ckpt.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/ADNet/pth2ckpt.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/ADNet/pth2ckpt.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...
37.217391
115
0.698014
6377e842c2bd7e52f2ee708251286717c82456e8
292
py
Python
Backend/views/helpers.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
15
2020-04-24T20:18:11.000Z
2022-01-31T21:05:05.000Z
Backend/views/helpers.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
2
2021-05-19T07:15:09.000Z
2022-03-07T08:29:34.000Z
Backend/views/helpers.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
4
2020-04-27T16:20:13.000Z
2021-02-23T10:39:42.000Z
def __as_feature_collection(resultset): features = [] for elem in resultset: feature = elem.as_dict() feature['type'] = 'Feature' features.append(feature) featurecollection = {"type": "FeatureCollection", "features": features} return featurecollection
32.444444
75
0.667808
63b3ff1ff02fc6d96a405cd2c96ccdab25566981
816
py
Python
common/models/food/FoodCat.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
2
2019-06-10T08:57:47.000Z
2021-06-12T16:22:15.000Z
common/models/food/FoodCat.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
common/models/food/FoodCat.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from sqlalchemy import Column, DateTime, Integer, String from sqlalchemy.schema import FetchedValue from application import db,app class FoodCat(db.Model): __tablename__ = 'food_cat' id = db.Column(db.Integer, primary_key=True, unique=True) name = db.Column(db.String(50), nullable=False, ...
40.8
91
0.742647
9870d25b3ebee314272d646fa14d90f49f1d6a40
2,197
py
Python
benwaonline/entities/user.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
benwaonline/entities/user.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
16
2017-09-13T10:21:40.000Z
2020-06-01T04:32:22.000Z
benwaonline/entities/user.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
from flask_login import UserMixin from benwaonline.gateways import UserGateway from benwaonline.entities import Entity from benwaonline.cache import cache class User(Entity, UserMixin): '''Represents a User resource object, related to the User model in the database. Also used by flask-login, for authenticati...
29.293333
130
0.627219
9886d54244bfdf53fb5b29c6749cf1ed042b27b0
11,944
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/action_detect/reader/tsminf_reader.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/action_detect/reader/tsminf_reader.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/applications/FootballAction/predict/action_detect/reader/tsminf_reader.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-24T16:27:01.000Z
2022-01-24T16:27:01.000Z
""" tsn frame reader """ # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # #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 # #Unle...
33.270195
112
0.546132
f6d6bfe0a7cdeba7acc3753bf57e27fdbbcd9945
749
py
Python
utils/model.py
pushyzheng/docker-oj-web
119abae3763cd2e53c686a320af7f4f5af1f16ca
[ "MIT" ]
2
2019-06-24T08:34:39.000Z
2019-06-27T12:23:47.000Z
utils/model.py
pushyzheng/docker-oj-web
119abae3763cd2e53c686a320af7f4f5af1f16ca
[ "MIT" ]
null
null
null
utils/model.py
pushyzheng/docker-oj-web
119abae3763cd2e53c686a320af7f4f5af1f16ca
[ "MIT" ]
null
null
null
# encoding:utf-8 import json import copy class JsonSerializableMixin(object): def to_json_string(self): return json.dumps(self, default=lambda obj: obj.__dict__) def from_json_string(self, json_string): data = json.loads(json_string) for key in self.__dict__.keys(): if k...
21.4
65
0.619493
1236c105cd738de28d0683c644d829174ee42ab9
687
py
Python
src/bo4e/enum/rufnummernart.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/enum/rufnummernart.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/enum/rufnummernart.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
# pylint:disable=missing-module-docstring from bo4e.enum.strenum import StrEnum class Rufnummernart(StrEnum): """ Abbildung verschiedener Rufnummerntypen. """ RUF_ZENTRALE = "RUF_ZENTRALE" #: Rufnummer Zentrale FAX_ZENTRALE = "FAX_ZENTRALE" #: Faxnummer Zentrale SAMMELRUF = "SAMMELRUF" #:...
34.35
65
0.723435
1240cb55b3ac30f375b59ba3cca882b1a2a0fd6d
2,209
py
Python
test/test_npu/test_network_ops/test_mish_backward.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_mish_backward.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_mish_backward.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Huawei Technologies Co., Ltd # Copyright (c) 2019, Facebook CORPORATION. # 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/lice...
39.446429
76
0.70756
89cc1ed4ba9dfa0c8da6759acb18cc35a14520da
2,103
py
Python
official/nlp/mass/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/nlp/mass/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/nlp/mass/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
31.863636
78
0.686163
7f0644b4d9fe5c5e824a3fbb1efbadb1557ff70a
858
py
Python
exercises/pt/test_04_12_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/test_04_12_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/test_04_12_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert len(doc1.ents) == 2, "No primeiro exemplo são esperadas duas entidades" assert ( doc1.ents[0].label_ == "WEBSITE" and doc1.ents[0].text == "Reddit" ), "Verifique a primeira entidade no primeiro exemplo" assert ( doc1.ents[1].label_ == "WEBSITE" and doc1.ents[1].text ==...
47.666667
82
0.65035
f639055465a1be43de76c20986ecb03bdd641a5c
320
py
Python
Algorithms/Implementation/sock_merchant.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/sock_merchant.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Implementation/sock_merchant.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from collections import Counter def sockMerchant(n, ar): sock = Counter() for a in ar: sock[a] += 1 return sum([v // 2 for k, v in sock.items()]) n = int(input().strip()) ar = list(map(int, input().strip().split(' '))) result = sockMerchant(n, ar) print(result)
18.823529
49
0.6125
9cc5ff1b4627244907c1c37c6f34a7ea7214e4e6
879
py
Python
loesungsvorschlaege/ml_3_kuenstliche_neuronale_netze/praxis/03/neuronales_netz_1.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
loesungsvorschlaege/ml_3_kuenstliche_neuronale_netze/praxis/03/neuronales_netz_1.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
loesungsvorschlaege/ml_3_kuenstliche_neuronale_netze/praxis/03/neuronales_netz_1.py
severinhaller/einf-machinelearning
4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b
[ "MIT" ]
null
null
null
import numpy as np def predict(sample): matrix_w_input_hidden = np.array([[0.9, 0.3, 0.4], [0.2, 0.8, 0.2], [0.1, 0.5, 0.6]]) matrix_w_hidden_output = np.array([[0.3, 0.7, 0.5], [0.6, 0.5, 0.2], [0.8, 0.1, 0.9]]) # Berechnung zwischen Input Layer und Hidden Layer # Matrix mal Vektor z = matrix_w_i...
29.3
90
0.607509
143efb9bd4a324f86614a377ee34ba2a218b1fc9
11,919
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/postgresql/test_postgres.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/postgresql/test_postgres.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/module_utils/postgresql/test_postgres.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
# Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import pytest import ansible_collections.community.general.plugins.module_utils.postgres as pg INPUT_DICT = dict( session_role=dict(default='')...
36.900929
117
0.668848
b4af4b29e684efbd84c1c4c26641932b8efad3fd
1,566
py
Python
src/onegov/ballot/models/election/association.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/ballot/models/election/association.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/ballot/models/election/association.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.orm import Base from onegov.core.orm.types import UUID from sqlalchemy import Column from sqlalchemy import ForeignKey from sqlalchemy import Text from sqlalchemy.orm import backref from sqlalchemy.orm import relationship from uuid import uuid4 class ElectionAssociation(Base): """ An association ...
26.1
79
0.652618
b4c0fd2599d0c26b03237a89b7bb66054d14711b
5,737
py
Python
GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOgui.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/mActionGTOgui.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/mActionGTOgui.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 PyQt5.QtCore import Qt, QObject from PyQt5.QtWidgets import QApplication, QDialog, QAction, QToolBar, QDockWidget, QSizePolicy from PyQt5.QtGui import QIcon import os class run(QObject): def __init__(self, id, gtotool, config, debug): super(run, self).__ini...
49.034188
116
0.546976
373012e8198c1b8eaed1479b729b35f14f83e607
395
py
Python
Language Proficiency/Python/Collections/collections.namedtuple()/namedtuple.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Language Proficiency/Python/Collections/collections.namedtuple()/namedtuple.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Language Proficiency/Python/Collections/collections.namedtuple()/namedtuple.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from collections import namedtuple if __name__ == "__main__": N = int(input()) fields = input().split() total = 0 for i in range(N): Student = namedtuple('student', fields) field1, field2, field3, field4 = input().split() student = Student(field1, field...
21.944444
57
0.610127
25d76a3dd9481ce85fab43eed29b75d61562acc4
6,366
py
Python
scripts/download_logs.py
srespondek/aws-pgbadger-analyzer
a716c4596e0d08f83cfd550159bf963ee8517b4c
[ "MIT" ]
null
null
null
scripts/download_logs.py
srespondek/aws-pgbadger-analyzer
a716c4596e0d08f83cfd550159bf963ee8517b4c
[ "MIT" ]
null
null
null
scripts/download_logs.py
srespondek/aws-pgbadger-analyzer
a716c4596e0d08f83cfd550159bf963ee8517b4c
[ "MIT" ]
null
null
null
import logging import boto3 import sys, os, datetime, hashlib, hmac, urllib import requests import pandas as pd from datetime import timedelta DB_NAME = os.environ['DB_NAME'] DB_REGION = os.environ['DB_REGION'] def get_logger(name=__name__): stdout_handler = logging.StreamHandler(sys.stdout) enable_debug_l...
32.646154
161
0.664625
25eaa5a63b0598fc5dcc7d5b5268692b53a139f1
503
py
Python
http/flask_beispiel.py
wichmann/RaspPI
168609cb237e59a4c895eae798c0dab052aab38b
[ "MIT" ]
null
null
null
http/flask_beispiel.py
wichmann/RaspPI
168609cb237e59a4c895eae798c0dab052aab38b
[ "MIT" ]
null
null
null
http/flask_beispiel.py
wichmann/RaspPI
168609cb237e59a4c895eae798c0dab052aab38b
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # Notwendige Bibliothek installieren: # sudo apt install python3-flask # oder # pip3 install flask from flask import Flask # initialisiere Flask-Server app = Flask(__name__) # definiere Route für Hauptseite @app.route('/') def index(): # gebe Antwort an aufrufe...
19.346154
48
0.656064
d336aa200e99ab0b8cb619ad0a287f7e2815eeea
1,997
py
Python
PlaidCTF/2021/web/Carmen_Sandiego/instance/server-camera/sensor/server.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
PlaidCTF/2021/web/Carmen_Sandiego_Season2/instance/server-camera/sensor/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
PlaidCTF/2021/web/Carmen_Sandiego_Season2/instance/server-camera/sensor/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
from socketserver import ThreadingTCPServer, UnixStreamServer, BaseRequestHandler, StreamRequestHandler, ThreadingMixIn import re from threading import Lock, Thread import time import os from queue import Queue KEY_REGEX = r"([a-z]{1,512})" connection_lock = Lock() class ThreadingUnixStreamServer(ThreadingMixIn, Uni...
23.22093
119
0.669004
d3589958ed6fe696ee55b0e222a493697cef1751
3,113
py
Python
python/oneflow/nn/modules/arange.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
null
null
null
python/oneflow/nn/modules/arange.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
null
null
null
python/oneflow/nn/modules/arange.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
null
null
null
""" 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.588889
143
0.649213
d3601f3f4b130882399d012039ba228f1cbce81d
2,172
py
Python
easyp2p/ui/Ui_progress_window.py
Ceystyle/easyp2p
99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc
[ "MIT" ]
4
2019-07-18T10:58:28.000Z
2021-11-18T16:57:45.000Z
easyp2p/ui/Ui_progress_window.py
Ceystyle/easyp2p
99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc
[ "MIT" ]
1
2019-07-05T09:21:47.000Z
2019-07-05T09:21:47.000Z
easyp2p/ui/Ui_progress_window.py
Ceystyle/easyp2p
99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc
[ "MIT" ]
2
2019-07-05T08:56:34.000Z
2020-06-09T10:03:42.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'progress_window.ui' # # Created by: PyQt5 UI code generator 5.12.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_ProgressWindow(object): def setupUi(self, ProgressWindow):...
45.25
114
0.75
6cb4dfd1eec96d75785296bb44417eb34304cc80
3,541
py
Python
genutil/file_folder.py
MZH-bust/genutil
f17190ec484d5844f8950908cc07556a5b1429e7
[ "MIT" ]
null
null
null
genutil/file_folder.py
MZH-bust/genutil
f17190ec484d5844f8950908cc07556a5b1429e7
[ "MIT" ]
null
null
null
genutil/file_folder.py
MZH-bust/genutil
f17190ec484d5844f8950908cc07556a5b1429e7
[ "MIT" ]
null
null
null
"""Dieses Modul stellt grundlegende Funktionen zum Arbeiten mit Dateien und Ordnern bereit""" import os from typing import Union from pathlib import Path from datetime import datetime def get_file_modification_datetime(filename: Union[str, Path], folderpath: Union[str, Path] = None) -> datetime: """Ermittelt den...
35.767677
119
0.680599
e24b02304b5c3677254b253653ab8ce69e56717d
205
py
Python
exercises/zh/exc_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/zh/exc_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/zh/exc_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import spacy nlp = spacy.load("zh_core_web_sm") doc = nlp("我养了一只猫。") # 查找词汇"猫"的哈希值 cat_hash = ____.____.____[____] print(cat_hash) # 查找cat_hash来得到字符串 cat_string = ____.____.____[____] print(cat_string)
15.769231
34
0.741463
64703080885064832b0e666cb01d98b6e758ec86
898
py
Python
deprecated/benchmark/ps/ctr/infer_args.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
170
2020-08-12T12:07:01.000Z
2022-03-07T02:38:26.000Z
deprecated/benchmark/ps/ctr/infer_args.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
195
2020-08-13T03:22:15.000Z
2022-03-30T07:40:25.000Z
deprecated/benchmark/ps/ctr/infer_args.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
67
2020-08-14T02:07:46.000Z
2022-03-28T10:05:33.000Z
import argparse import logging def parse_args(): parser = argparse.ArgumentParser(description="PaddlePaddle DeepFM example") parser.add_argument( '--model_path', type=str, required=True, help="The path of model parameters gz file") parser.add_argument( '--data_path',...
27.212121
79
0.608018
648d7d173563edc2d2a9df2af70c22ea92bc7512
2,129
py
Python
test/test_npu/test_onnx/torch.onnx/custom_ops_demo/test_custom_ops_python.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_onnx/torch.onnx/custom_ops_demo/test_custom_ops_python.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_onnx/torch.onnx/custom_ops_demo/test_custom_ops_python.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Huawei Technologies Co., Ltd # Copyright (c) 2019, Facebook CORPORATION. # 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/lice...
29.569444
104
0.630343
37840040564b0d87ac97601196855b6a5729d867
159
py
Python
GeniNacTrigger/Service/server.py
HyechurnJang/genaci
aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3
[ "Apache-2.0" ]
null
null
null
GeniNacTrigger/Service/server.py
HyechurnJang/genaci
aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3
[ "Apache-2.0" ]
null
null
null
GeniNacTrigger/Service/server.py
HyechurnJang/genaci
aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Created on 2018. 10. 23. @author: Hyechurn Jang, <hyjang@cisco.com> ''' from pygics import server server('0.0.0.0', 80, 'engine')
17.666667
42
0.622642
20c0b5f287296078af444e67c082ef7e511221c9
3,771
py
Python
venv/Lib/site-packages/pynance/data/retrieve.py
LeonardoHMS/imobi
6b2b97a05df67ea7d493f7b601382f65c6629cc2
[ "MIT" ]
35
2015-03-12T04:16:14.000Z
2020-12-17T18:10:15.000Z
venv/Lib/site-packages/pynance/data/retrieve.py
LeonardoHMS/imobi
6b2b97a05df67ea7d493f7b601382f65c6629cc2
[ "MIT" ]
31
2015-03-16T21:31:04.000Z
2021-01-26T00:12:34.000Z
venv/Lib/site-packages/pynance/data/retrieve.py
LeonardoHMS/imobi
6b2b97a05df67ea7d493f7b601382f65c6629cc2
[ "MIT" ]
18
2015-09-30T10:40:26.000Z
2021-01-25T21:20:44.000Z
""" .. Copyright (c) 2014- Marshall Farrier license http://opensource.org/licenses/MIT Data - remote retrieval (:mod:`pynance.data.retrieve`) ========================================================= .. currentmodule:: pynance.data.retrieve Wraps `Pandas Remote Data Access <http://pandas.pydata.org/pandas-docs/s...
30.909836
126
0.639088
b34fd6aba85247b624defdf29d3e5501805998a9
462
py
Python
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/test/tfuncs.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/tfuncs.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/tfuncs.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
import pybedtools import os testdir = os.path.dirname(__file__) test_tempdir = os.path.join(os.path.abspath(testdir), 'tmp') unwriteable = os.path.join(os.path.abspath(testdir), 'unwriteable') def setup(): if not os.path.exists(test_tempdir): os.system('mkdir -p %s' % test_tempdir) pybedtools.set_temp...
27.176471
67
0.701299
2fc2271d2102552d74e09ecbe6532ebf54f33eda
270
py
Python
src/onegov/org/views/page_move.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/views/page_move.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/views/page_move.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.security import Private from onegov.org import OrgApp from onegov.org.models import PageMove @OrgApp.view(model=PageMove, permission=Private, request_method='PUT') def move_page(self, request): request.assert_valid_csrf_token() self.execute()
27
70
0.792593
ffb407b6f7f0a272f39adaaca0f3d3aebae543f4
400
py
Python
config.py
flifloo/status
f1f075d7cf9f016f95878692d34e419b76bba268
[ "MIT" ]
null
null
null
config.py
flifloo/status
f1f075d7cf9f016f95878692d34e419b76bba268
[ "MIT" ]
null
null
null
config.py
flifloo/status
f1f075d7cf9f016f95878692d34e419b76bba268
[ "MIT" ]
null
null
null
import os basedir = os.path.abspath(os.path.dirname(__file__)) if not os.path.isfile("key.ini"): open("key.ini", "w").write(str(os.urandom(24))) KEY = open("key.ini").readline().replace("\n", "") class Config(object): SECRET_KEY = KEY SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL") or "sqlite://...
30.769231
110
0.6825
923550c234a54046ba2f735aa2313d98e8964e94
3,556
py
Python
Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/bilstm_with_crf/predict.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-12T06:52:43.000Z
2022-01-12T06:52:43.000Z
Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/bilstm_with_crf/predict.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
null
null
null
Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/bilstm_with_crf/predict.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
34.862745
198
0.675478
a62502931732b70a55765938636946419918c50e
332
py
Python
upload.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
upload.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
upload.py
dieterpl/iDogstra
62ee246763e107335b9caf0a4f96239fa0953234
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import subprocess import sys mode = input("WLAN (w) or LAN (l)? ") ip = "" if mode == "w": ip = "172.28.0.20" elif mode == "l": ip = "192.168.168.255" else: print("Please enter valid mode character") sys.exit(1) subprocess.Popen("rsync -Pra Code/ pi@%s:/home/pi/Code" % ip, shell=T...
18.444444
80
0.605422
5b36788cb46e3f49238258c48096477b3d190733
252
py
Python
Packs/PassiveTotal/Scripts/RiskIQPassiveTotalHostPairChildrenScript/RiskIQPassiveTotalHostPairChildrenScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/PassiveTotal/Scripts/RiskIQPassiveTotalHostPairChildrenScript/RiskIQPassiveTotalHostPairChildrenScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/PassiveTotal/Scripts/RiskIQPassiveTotalHostPairChildrenScript/RiskIQPassiveTotalHostPairChildrenScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * result = demisto.executeCommand('pt-get-host-pairs', {'direction': 'children', 'query': demisto.args().get('indicator_value')} ) demisto.results(result)
31.5
105
0.555556
753a6ea7b3f6c7464ca52343dc2aec80ffb42a45
55
py
Python
1.py
13297568637z/githubtest
7caf2f506fd812fac17e5e304023c4222b7bcaeb
[ "MIT" ]
null
null
null
1.py
13297568637z/githubtest
7caf2f506fd812fac17e5e304023c4222b7bcaeb
[ "MIT" ]
null
null
null
1.py
13297568637z/githubtest
7caf2f506fd812fac17e5e304023c4222b7bcaeb
[ "MIT" ]
null
null
null
print('给小白用的分支') print('小白修改的代码') print('pycharm下的操作')
13.75
20
0.727273
f36c9264ac19b3c84d156c263201e94a62999966
2,708
py
Python
proyecto-teo-v2/lexer.py
danielorozco14/proyecto-teo
1b5c38acef77d2bb495a5acb2e223ba987495805
[ "MIT" ]
null
null
null
proyecto-teo-v2/lexer.py
danielorozco14/proyecto-teo
1b5c38acef77d2bb495a5acb2e223ba987495805
[ "MIT" ]
null
null
null
proyecto-teo-v2/lexer.py
danielorozco14/proyecto-teo
1b5c38acef77d2bb495a5acb2e223ba987495805
[ "MIT" ]
null
null
null
import ply.lex as lex # Lista de definicion de tokens tokens = [ 'NUMERO', 'operadores', 'identificador', 'COMA', 'DATATYPE', 'SEMICOLON', 'IGUAL', 'HASH', 'INCLUDE', 'DEFINE', 'STRING', 'MENOR', 'MAYOR', 'LIBRERIA', 'LPAREN', 'RPAREN', 'BBLOCK', ...
15.563218
55
0.487445
f3c613b39eb23c0dd4519940ffba8a0b457c4442
7,424
py
Python
module/RSS.py
lonelyion/TweetToBot-Docker
ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278
[ "MIT" ]
null
null
null
module/RSS.py
lonelyion/TweetToBot-Docker
ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278
[ "MIT" ]
null
null
null
module/RSS.py
lonelyion/TweetToBot-Docker
ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278
[ "MIT" ]
null
null
null
from module.PushList import PushList import module.msgStream as msgStream from module.msgStream import SendMessage from html.parser import HTMLParser import time import re import traceback # 日志输出 from helper import getlogger logger = getlogger(__name__) """ RSShub 推送识别码为path """ class MyHTMLParser(HTMLParser): d...
33.29148
79
0.487204
9430930841dfa2e813c16dbc5eac44f99cc8c0c4
2,553
py
Python
src/lecture3_new/exp_svm/exp_svm.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
1
2020-08-17T07:09:09.000Z
2020-08-17T07:09:09.000Z
src/lecture3_new/exp_svm/exp_svm.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
null
null
null
src/lecture3_new/exp_svm/exp_svm.py
Fassial/zju-intern
f421f9c97d3c567e9b97121c5bf5c675c9e2c721
[ "MIT" ]
2
2020-07-26T07:27:57.000Z
2020-08-17T07:09:15.000Z
#here from sklearn import svm import os import sys sys.path.append("..") from load_data.load_data import * # here class test_svm(object): def get_score(self,score_list): score_rel = [] for s in score_list: score_rel.append(s[1]) return np.array(score_rel) def get_acc(self,...
37
114
0.581669
ca464a699aea05477a60a618fbbabddc1e7ca881
3,420
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/visualization/plot_csv_timeline.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
4
2020-11-13T02:35:56.000Z
2021-03-29T20:15:54.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/visualization/plot_csv_timeline.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
9
2020-12-09T02:12:39.000Z
2021-02-18T00:15:28.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/visualization/plot_csv_timeline.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) 2014-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...
34.897959
87
0.647076
8e24471301210e6068e183fa68197e5de91d2112
1,036
py
Python
src/rod_cutting/rod_cutting.py
jwvg0425/DSAndAlgo3
173ccf717b84610def861854736c3b16a57ac727
[ "MIT" ]
null
null
null
src/rod_cutting/rod_cutting.py
jwvg0425/DSAndAlgo3
173ccf717b84610def861854736c3b16a57ac727
[ "MIT" ]
null
null
null
src/rod_cutting/rod_cutting.py
jwvg0425/DSAndAlgo3
173ccf717b84610def861854736c3b16a57ac727
[ "MIT" ]
null
null
null
def rod_cutting(n, price, length): if n == 0: return 0 value = 0 for i in range(1, n + 1): newValue = price[i] + rod_cutting(n-i, price, length) if newValue > value: value = newValue length[n] = i return value def rod_cutting_memo(n, price, memo, len...
24.666667
72
0.493243
6d276bf55e7aca6e60c9fb75669c9865b8faac58
1,021
py
Python
CSES_Problems/Repetitions/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
CSES_Problems/Repetitions/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
CSES_Problems/Repetitions/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
def repeat_counts(n): if len(n)==1: # checking for the length of n. If it is 1 then returns 1 return 1 maxx=c=0 # initializing maxx and c as 0. maxx is used for maximum check and c is used for counting for i in range(1,len(n)): if n[i-1]==n[i]: # check if the e...
56.722222
146
0.556317
612a6ce59e78ab167d931416b5abe0b60b46eb97
4,550
py
Python
CareerTinderServer/CareerTinder/tinder.py
sarojaerabelli/HVGS
86ec3d2de496540ca439c40f4a0c58c47aa181cf
[ "MIT" ]
1
2016-09-18T16:40:27.000Z
2016-09-18T16:40:27.000Z
CareerTinderServer/CareerTinder/tinder.py
sarojaerabelli/HVGS
86ec3d2de496540ca439c40f4a0c58c47aa181cf
[ "MIT" ]
null
null
null
CareerTinderServer/CareerTinder/tinder.py
sarojaerabelli/HVGS
86ec3d2de496540ca439c40f4a0c58c47aa181cf
[ "MIT" ]
null
null
null
from django.http import HttpResponse from django.template import loader from models import * from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse # Create your views here. def review_page(request, idx=0): idx = int(idx) recruiter = Recruiter.objects.all()[0] if idx == H...
36.99187
98
0.60967
94a5330198c03f77bd6a22d6c6674517f7404b3e
12,389
py
Python
results/update.py
thanasisttgr/AutoEq
863436c40c8d4abf6874cc301bc1c7d8e8c5303c
[ "MIT" ]
1
2020-01-16T14:03:51.000Z
2020-01-16T14:03:51.000Z
results/update.py
hyshuma/AutoEq
4c3ad3478d6b74fc794bd7d973b330d38da338b9
[ "MIT" ]
null
null
null
results/update.py
hyshuma/AutoEq
4c3ad3478d6b74fc794bd7d973b330d38da338b9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import argparse sys.path.insert(1, os.path.realpath(os.path.join(sys.path[0], os.pardir))) from frequency_response import FrequencyResponse ROOT_DIR = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir)) def main(): arg_parser = argparse.ArgumentParser() ...
41.713805
129
0.576963
a227946577e292ec76d1ad8fdab0a31488f065b5
1,805
py
Python
source/lib/ptp/src/threads/stoppable_thread.py
weberval/SocialBot
f45e16c28fe2a1283b09b1f5c7b6334ef03f9a7b
[ "MIT" ]
2
2018-04-07T14:56:12.000Z
2020-03-26T12:06:51.000Z
source/lib/ptp/src/threads/stoppable_thread.py
weberval/SocialBot
f45e16c28fe2a1283b09b1f5c7b6334ef03f9a7b
[ "MIT" ]
2
2018-04-07T14:55:31.000Z
2018-04-25T07:43:29.000Z
source/lib/ptp/src/threads/stoppable_thread.py
weberval/SocialBot
f45e16c28fe2a1283b09b1f5c7b6334ef03f9a7b
[ "MIT" ]
2
2019-09-06T22:31:43.000Z
2020-03-26T12:06:51.000Z
from threading import Thread, Event from time import sleep class StoppableThread(Thread): """ Thread class with a stop() method. """ def __init__(self, sleep_time=0, target=None, args=(), kwargs=None): """ Call the Thread init method. :param sleep_time: :param target:...
27.769231
80
0.54072
786aa563e7c200dd99ed14ba9999a5fbb6cf7d97
1,922
py
Python
torch/utils/data/graph.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
5
2018-04-24T13:41:12.000Z
2019-07-09T07:32:09.000Z
torch/utils/data/graph.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
14
2021-10-14T06:58:50.000Z
2021-12-17T11:51:07.000Z
torch/utils/data/graph.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
7
2020-08-31T22:49:59.000Z
2020-09-15T14:29:07.000Z
import io import pickle from torch.utils.data import IterDataPipe from typing import Any, Dict, Generator reduce_ex_hook = None PRIMITIVE = (int, float, complex, str, bytes, bytearray, Generator) def stub_unpickler(): return "STUB" # TODO(VitalyFedyunin): Make sure it works without dill module installed def...
29.121212
117
0.676379
01c8dfe36051d3bd60bd6d04d9488fddd3470b4f
475
py
Python
ppyt/commands/dummy.py
yusukemurayama/ppytrading
9804d0de870d77bf8a1c847736a636b1342d4600
[ "MIT" ]
4
2016-08-16T07:47:15.000Z
2017-12-11T10:08:47.000Z
ppyt/commands/dummy.py
yusukemurayama/ppytrading
9804d0de870d77bf8a1c847736a636b1342d4600
[ "MIT" ]
null
null
null
ppyt/commands/dummy.py
yusukemurayama/ppytrading
9804d0de870d77bf8a1c847736a636b1342d4600
[ "MIT" ]
2
2018-06-15T04:43:15.000Z
2020-05-02T07:47:15.000Z
# coding: utf-8 import logging from ppyt.commands import CommandBase logger = logging.getLogger(__name__) plogger = logging.getLogger('print') class Command(CommandBase): """特に意味のないコマンドです。""" def _add_options(self, parser): """コマンド実行時の引数を定義します。""" parser.add_argument('args', nargs='*') ...
23.75
52
0.663158
bdcc4915d037b0406f0e24a3405effa2e65fe0c9
250
py
Python
796-rotate-string/796-rotate-string.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
796-rotate-string/796-rotate-string.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
796-rotate-string/796-rotate-string.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def rotateString(self, s: str, goal: str) -> bool: starts = [i for i, c in enumerate(s) if c==goal[0]] for start in starts: if s[start:]+s[:start]==goal: return True return False
35.714286
59
0.536
e58905cec9b06c4afdde4132f2bd332a20000ded
2,299
py
Python
research/cv/AttentionCluster/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/AttentionCluster/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/AttentionCluster/eval.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...
36.492063
98
0.706829
00d25f6df1c920e2e720acd88c84e26c7db6c0ec
16,746
py
Python
Biologic.py
PaulMndn/Abschlussarbeit_Programming_Basics
d0c28d1a690ea2e1e2c24599ddd61a8b868f422f
[ "MIT" ]
null
null
null
Biologic.py
PaulMndn/Abschlussarbeit_Programming_Basics
d0c28d1a690ea2e1e2c24599ddd61a8b868f422f
[ "MIT" ]
null
null
null
Biologic.py
PaulMndn/Abschlussarbeit_Programming_Basics
d0c28d1a690ea2e1e2c24599ddd61a8b868f422f
[ "MIT" ]
null
null
null
import logging from Bio import SeqIO, Entrez import pathlib import re import sys import GUI log = logging.getLogger(__name__) def get_bonds(): """Returns a dictionary with number of bonds of binding rna base pairs.""" bonds = { "AU": 2, "GC": 3, "GU": 1 } # add reversed pairs ...
33.830303
101
0.548668
97c974180d456092fc3fec153963b04cb7e5d834
1,210
py
Python
Algorithms/5_Searching/16.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
1
2021-11-25T13:39:30.000Z
2021-11-25T13:39:30.000Z
Algorithms/5_Searching/16.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
Algorithms/5_Searching/16.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/red-knights-shortest-path/problem #!/bin/python3 import math import os import random import re import sys from collections import deque # # Complete the 'printShortestPath' function below. # # The function accepts following parameters: # 1. INTEGER n # 2. INTEGER i_start # ...
25.208333
73
0.603306
de1001a2aa20b8c291de08f4ddcf94b8a9ebb601
1,495
py
Python
Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/04_pprint_teil_2.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
null
null
null
Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/04_pprint_teil_2.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/04_pprint_teil_2.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
# Mit pprint lassen sich auch Dictionarys alphabetisch sortiert ausgeben import pprint, os, re maxl=50 dv=18 def output(string): delta=len(string)%maxl print(''.center(maxl+2, '█')) if delta != 0: string+=' '*(maxl-delta) pattern=re.compile(r'[\S|\\n].{'+str(maxl-dv)+r','+str(maxl)+r'}[ ]', re...
46.71875
260
0.604682
a9cc722cce8baad92a38823140facaae0e300b7f
792
py
Python
kts/models/binary.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
18
2019-02-14T13:10:07.000Z
2021-11-26T07:10:13.000Z
kts/models/binary.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-02-17T14:06:42.000Z
2019-09-15T18:05:54.000Z
kts/models/binary.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-09-15T13:12:42.000Z
2020-04-15T14:05:54.000Z
from kts.modelling.mixins import BinaryMixin, NormalizeFillNAMixin from kts.models.common import XGBMixin, LGBMMixin, CatBoostMixin, all_estimators, BLACKLISTED_PARAMS __all__ = [] class XGBClassifier(BinaryMixin, XGBMixin): pass class LGBMClassifier(BinaryMixin, LGBMMixin): pass class CatBoostClassifier(BinaryMixin...
33
100
0.738636
e7af243e9565dd579eb8cef1b129357c64dda356
921
py
Python
solutions/ctirg/webserver/src/service/rearch.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-01-11T18:40:22.000Z
2021-01-11T18:40:22.000Z
solutions/ctirg/webserver/src/service/rearch.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/ctirg/webserver/src/service/rearch.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
import logging as log from common.config import MILVUS_TABLE, OUT_PATH, OUT_DATA from indexer.index import milvus_client, search_vectors, get_vector_by_ids from indexer.tools import connect_mysql, search_by_milvus_id import numpy as np import torch import pickle import dgl import json import random def do_search(in...
23.615385
74
0.69924