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
b03b85560632c7d285f2936c1fc7df527781f42d
2,100
py
Python
scripts/scraper.py
jhKessler/Tagesschau-Analysis
40490b13fa2f3e5cf3bd4b5f4f46b5bf72ab9899
[ "MIT" ]
null
null
null
scripts/scraper.py
jhKessler/Tagesschau-Analysis
40490b13fa2f3e5cf3bd4b5f4f46b5bf72ab9899
[ "MIT" ]
null
null
null
scripts/scraper.py
jhKessler/Tagesschau-Analysis
40490b13fa2f3e5cf3bd4b5f4f46b5bf72ab9899
[ "MIT" ]
null
null
null
# # scraper for getting the data from article descriptions # import time import datetime import requests import pandas as pd from tqdm import tqdm from bs4 import BeautifulSoup DATE_FORMAT = "%d/%m/%Y" ARCHIVE_URL = "https://www.tagesschau.de/multimedia/video/videoarchiv2~_date-" SECOND_DELAY = 1 # dates first_d...
32.307692
173
0.739524
afd6664432eb837b50bee769a174cb19c16d821f
329
py
Python
server/bumf/api/views/auth.py
bumfiness/bumf
71c404c0a8f804b8f0e127df3de6d8916db4c660
[ "Apache-2.0" ]
6
2017-01-07T17:59:46.000Z
2017-02-10T13:19:46.000Z
server/bumf/api/views/auth.py
rixx/bumf
71c404c0a8f804b8f0e127df3de6d8916db4c660
[ "Apache-2.0" ]
null
null
null
server/bumf/api/views/auth.py
rixx/bumf
71c404c0a8f804b8f0e127df3de6d8916db4c660
[ "Apache-2.0" ]
null
null
null
from rest_framework import mixins, permissions, viewsets from bumf.api.serializers import UserSerializer from bumf.core.models import User class UserView(mixins.CreateModelMixin, viewsets.GenericViewSet): queryset = User.objects.none() permission_classes = [permissions.AllowAny] serializer_class = UserSe...
29.909091
65
0.808511
a566fd8c43c862cab7e4250aec18c8b8495f8ba7
84
py
Python
Python/if-else.py
bunny8469/Hello-World
722b5961cbcd9b2c2eec2cb6aa700eaa451e008b
[ "MIT" ]
133
2021-01-15T16:29:40.000Z
2022-03-21T16:35:42.000Z
Python/if-else.py
bunny8469/Hello-World
722b5961cbcd9b2c2eec2cb6aa700eaa451e008b
[ "MIT" ]
117
2021-01-17T08:54:22.000Z
2022-01-17T16:38:11.000Z
Python/if-else.py
bunny8469/Hello-World
722b5961cbcd9b2c2eec2cb6aa700eaa451e008b
[ "MIT" ]
146
2021-01-15T12:57:19.000Z
2022-03-15T20:10:23.000Z
t=int(input()) if t>=1: print("bigger than 1") else: print("smaller than 1")
16.8
27
0.595238
a57d7dab18bdfa799114ea56df3d758834aa2120
407
py
Python
setup.py
raicheff/flask-spf
abfeb35bde6235be80aacdfdcfce71f40421ed91
[ "MIT" ]
null
null
null
setup.py
raicheff/flask-spf
abfeb35bde6235be80aacdfdcfce71f40421ed91
[ "MIT" ]
null
null
null
setup.py
raicheff/flask-spf
abfeb35bde6235be80aacdfdcfce71f40421ed91
[ "MIT" ]
null
null
null
# # Flask-SPF # # Copyright (C) 2017 Boris Raicheff # All rights reserved # from setuptools import find_packages, setup setup( name='Flask-SPF', version='0.1.0', description='Flask-SPF', author='Boris Raicheff', author_email='b@raicheff.com', url='https://github.com/raicheff/flask-spf', ...
16.28
49
0.660934
3cef0e52a2048eb5b25bb85af93f0adab276a41b
631
py
Python
finbyz_dashboard/finbyz_dashboard/dashboard_overrides/install_fixtures.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
1
2021-11-19T05:27:11.000Z
2021-11-19T05:27:11.000Z
finbyz_dashboard/finbyz_dashboard/dashboard_overrides/install_fixtures.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
null
null
null
finbyz_dashboard/finbyz_dashboard/dashboard_overrides/install_fixtures.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
2
2021-08-21T10:41:38.000Z
2021-11-19T05:27:13.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.desk.doctype.global_search_settings.global_search_settings import update_global_search_doctypes # Finby...
30.047619
107
0.835182
055dbd21f9914f317100d134cb4bb20c0c841ad9
14,731
py
Python
official/cv/fastscnn/infer/sdk/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/fastscnn/infer/sdk/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/fastscnn/infer/sdk/main.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
''' The scripts to execute sdk infer ''' # 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 # # Unles...
39.282667
110
0.621003
f93f27538f5cdd1b46073b7e5bfef848372aeb0c
6,498
py
Python
fahrplanauskunft-vvs.py
wienand/fahrplanauskunft-vvs
ca595e2f51af1d00ea8db463d9fc3390c51c5741
[ "MIT" ]
1
2018-11-27T15:31:40.000Z
2018-11-27T15:31:40.000Z
fahrplanauskunft-vvs.py
wienand/fahrplanauskunft-vvs
ca595e2f51af1d00ea8db463d9fc3390c51c5741
[ "MIT" ]
null
null
null
fahrplanauskunft-vvs.py
wienand/fahrplanauskunft-vvs
ca595e2f51af1d00ea8db463d9fc3390c51c5741
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import collections import datetime import json import os import urllib from flask import Flask, request port = int(os.environ.get("PORT", 5000)) runsAtHeroku = port != 5000 app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def queryVVS(): intent = request.json['request']['in...
43.905405
209
0.554786
fd25ba81163d883a65a07de03662e866968a9ede
57
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-005/pg-5.1-check-turtle.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-005/pg-5.1-check-turtle.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-005/pg-5.1-check-turtle.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
import turtle turtle.forward(100) turtle.exitonclick()
9.5
20
0.789474
fd308d7dbc333d082e34f58aff0ed51ad0791375
439
py
Python
exercises/pt/test_02_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/test_02_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/test_02_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert gato_hash == nlp.vocab.strings["gato"], "Você atribuiu o código hash corretamente?" assert 'nlp.vocab.strings["gato"]' in __solution__, "Você selecionou a string corretamente?" assert gato_string == "gato", "Você selecionou a string corretamente?" assert ( "nlp.vocab.strings[g...
43.9
96
0.697039
bd2ef38a0612241d1de44edb38334800ba3dd48e
251
py
Python
Chapter2_Python/01-Variables.py
olebause/TensorFlow2
70fcb7c85c7ead0dc4f88ffa35be5f2eb93e618e
[ "MIT" ]
11
2020-10-12T14:06:31.000Z
2022-02-22T09:16:32.000Z
Chapter2_Basics/Variables.py
franneck94/UdemyPythonIntro
4895a91a04eedce7d59b61bf12e5aa209fe60f85
[ "MIT" ]
1
2020-12-21T15:29:20.000Z
2022-01-15T12:06:09.000Z
Chapter2_Basics/Variables.py
franneck94/UdemyPythonIntro
4895a91a04eedce7d59b61bf12e5aa209fe60f85
[ "MIT" ]
8
2020-10-29T07:53:49.000Z
2022-03-17T11:01:20.000Z
# 1. var names cannot contain whitespaces # 2. var names cannot start with a number my_age = 27 # int price = 0.5 # float my_name_is_jan = True # bool my_name_is_peter = False # bool my_name = "Jan Schaffranek" # str print(my_age) print(price)
20.916667
41
0.713147
2f9999fb7e0a0ffa1363366f7c683a7fee0c73f2
240
py
Python
exercises/pt/solution_03_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/solution_03_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/solution_03_03.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy # Carregue o fluxo de procesamento en_core_web_sm nlp = spacy.load("pt_core_news_sm") # Imprima o nome dos componentes do fluxo print(nlp.pipe_names) # Imprima as informações das tuplas (name, component) print(nlp.pipeline)
21.818182
53
0.7875
f1b47f048a9998081bfd0ddeb605e84241c854d2
330
py
Python
pusta2/config.py
EE/flexdb
08a80b9e56201e678ef055af27bdefa6d52bcbf5
[ "MIT" ]
null
null
null
pusta2/config.py
EE/flexdb
08a80b9e56201e678ef055af27bdefa6d52bcbf5
[ "MIT" ]
null
null
null
pusta2/config.py
EE/flexdb
08a80b9e56201e678ef055af27bdefa6d52bcbf5
[ "MIT" ]
null
null
null
app_name = "pusta2" prefix_url = "pusta2" static_files = { 'js': { 'pusta2/js/': ['main.js', ] }, 'css': { 'pusta2/css/': ['main.css', ] }, 'html': { 'pusta2/html/': ['index.html', ] } } permissions = { "edit": "Editing actualy nothing.", "sample1": "sample1longve...
18.333333
40
0.487879
7b075b0059651433f0f15cf456c5036b91957e78
38
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.16-list-with-maltiple-range.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.16-list-with-maltiple-range.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.16-list-with-maltiple-range.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
li = list(range(2, 21, 2)) print(li)
9.5
26
0.578947
c8a7cac846d8b813597b47640cc31911b8185e4a
3,308
py
Python
projekte_ss2017/Minensuche_Benjamin/field.py
krother/python_abv_zedat
1e2e1fe16da6612c470f06f519cd053c567e0611
[ "MIT" ]
1
2019-03-04T20:09:26.000Z
2019-03-04T20:09:26.000Z
projekte_ss2017/Minensuche_Benjamin/field.py
krother/python_abv_zedat
1e2e1fe16da6612c470f06f519cd053c567e0611
[ "MIT" ]
null
null
null
projekte_ss2017/Minensuche_Benjamin/field.py
krother/python_abv_zedat
1e2e1fe16da6612c470f06f519cd053c567e0611
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Jul 31 22:06:35 2017 @author: Benny """ import random as rnd def printField(field): '''printField printes the Minesweeperfield''' for row in range(len(field)): print() for col in range(len(field[0])): print(field[row...
30.915888
88
0.441959
c8ba9141db4d8766c1713040f5459df594f79e19
277
py
Python
src/terracotta.py
magistersart/ZTC_fork
ce72734ea575d9846b5b81f3efbfd14fa1f7e532
[ "PostgreSQL" ]
null
null
null
src/terracotta.py
magistersart/ZTC_fork
ce72734ea575d9846b5b81f3efbfd14fa1f7e532
[ "PostgreSQL" ]
null
null
null
src/terracotta.py
magistersart/ZTC_fork
ce72734ea575d9846b5b81f3efbfd14fa1f7e532
[ "PostgreSQL" ]
null
null
null
#!/usr/bin/python # pylint: disable=W0142 """ terracotta.* scripts item This file is part of ZTC and distributed under GNU GPL v.3 Copyright (c) 2011 Vladimir Rusinov] """ from ztc.java.terracotta import JMXTerracotta j = JMXTerracotta() m = j.args[0] j.get(m, *j.args[1:])
18.466667
58
0.714801
a80e4fd7647e2b2049ab30c37ad79eba0682f08f
2,743
py
Python
simple-tensorflow-demo/4.demos/3.backPropagationTest.py
crackedcd/Intern.MT
36398837af377a7e1c4edd7cbb15eabecd2c3103
[ "MIT" ]
1
2019-07-05T03:42:17.000Z
2019-07-05T03:42:17.000Z
simple-tensorflow-demo/4.demos/3.backPropagationTest.py
crackedcd/Intern.MT
36398837af377a7e1c4edd7cbb15eabecd2c3103
[ "MIT" ]
null
null
null
simple-tensorflow-demo/4.demos/3.backPropagationTest.py
crackedcd/Intern.MT
36398837af377a7e1c4edd7cbb15eabecd2c3103
[ "MIT" ]
1
2019-06-24T05:56:55.000Z
2019-06-24T05:56:55.000Z
""" 损失函数 loss 预测值(predict)(y)与已知答案(target)(y_)的差距 均方误差 MSE mean-square error MSE(y, y_) = sigma ((y - y_)^2 / n) loss = tf.reduce_mean(tf.square(y, y_)) 反向传播 BP back propagation 为训练模型参数, 在所有参数上用梯度下降, 使NN模型在训练数据上的损失最小. train_step = tf.train.GradientDescentOptimizer(learning_rate).minimize(loss) train_step = tf.train.M...
27.158416
85
0.582574
93b61103d8019f377a14047dd0b12051d80f41d7
637
py
Python
py/test/test_inception_v2.py
zjZSTU/GoogLeNet
a0801e45006d34b4901a8834397961ce17f24e2e
[ "Apache-2.0" ]
1
2021-04-18T15:36:33.000Z
2021-04-18T15:36:33.000Z
py/test/test_inception_v2.py
zjZSTU/GoogLeNet
a0801e45006d34b4901a8834397961ce17f24e2e
[ "Apache-2.0" ]
null
null
null
py/test/test_inception_v2.py
zjZSTU/GoogLeNet
a0801e45006d34b4901a8834397961ce17f24e2e
[ "Apache-2.0" ]
3
2020-07-10T11:45:52.000Z
2022-01-15T08:46:14.000Z
# -*- coding: utf-8 -*- """ @date: 2020/4/9 下午11:37 @file: test_inception_v2.py @author: zj @description: """ import torch import models.inception_v2 as inception def test(): model_googlenet = inception.Inception_v2(num_classes=1000) # print(model_googlenet) # 训练阶段 model_googlenet.train() data...
18.735294
62
0.660911
27a9c70335e5cc4b5a56e709850c0d0067a0b822
5,917
py
Python
BruteForce/Wordpress.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
BruteForce/Wordpress.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
BruteForce/Wordpress.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
# uncompyle6 version 2.11.5 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.18 (default, Apr 20 2020, 20:30:41) # [GCC 9.3.0] # Embedded file name: BruteForce\Wordpress.py import requests import re import threading import time import json from Exploits import printModule from Tools import shellupload r = '...
39.97973
205
0.488085
e3879e265593ab018ada0842a7f018865afdb065
792
py
Python
ryu/app/otherApp/getFlowTab.py
yuesir137/SDN-CLB
58b12a9412cffdf2945440528b1885c8899edd08
[ "Apache-2.0" ]
null
null
null
ryu/app/otherApp/getFlowTab.py
yuesir137/SDN-CLB
58b12a9412cffdf2945440528b1885c8899edd08
[ "Apache-2.0" ]
null
null
null
ryu/app/otherApp/getFlowTab.py
yuesir137/SDN-CLB
58b12a9412cffdf2945440528b1885c8899edd08
[ "Apache-2.0" ]
null
null
null
import os import time local=1 while True: tables=os.popen('sudo ovs-ofctl dump-flows s{}'.format(local)).readlines()[1:] minPacketN=100 minPort=-1 for table in tables: print(table) details=table.split(',') # print(details) if len(details)>9: duration=details[1...
27.310345
82
0.539141
4750a43892925cea105fadd9b59420a1313f7f95
3,566
py
Python
Python/calculator_gui.py
saurabhpal007/hacktoberfest2021-1
5abad37ab426a7b34fc7bcd98ded885fd6ce02ef
[ "CC0-1.0" ]
81
2021-10-01T13:19:13.000Z
2021-10-06T08:43:35.000Z
Python/calculator_gui.py
saurabhpal007/hacktoberfest2021-1
5abad37ab426a7b34fc7bcd98ded885fd6ce02ef
[ "CC0-1.0" ]
67
2021-10-01T13:43:46.000Z
2021-10-06T13:55:49.000Z
Python/calculator_gui.py
saurabhpal007/hacktoberfest2021-1
5abad37ab426a7b34fc7bcd98ded885fd6ce02ef
[ "CC0-1.0" ]
394
2021-10-01T11:55:24.000Z
2021-10-06T13:45:57.000Z
from tkinter import * import parser from math import factorial root = Tk() root.title("Calculator") i=0 def get_variables(num): global i display.insert(i,num) i+=1 def perhitungan(): entire_string = display.get() try: a = parser.expr(entire_string).compile() result ...
42.452381
101
0.660404
47c46d3061e5499818d18eca27a7cbab630d6878
396
py
Python
exercises/zh/exc_04_10.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/zh/exc_04_10.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/zh/exc_04_10.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
TRAINING_DATA = [ ( "我去年去了西安,那里的城墙很壮观!", {"entities": [(4, 5, "TOURIST_DESTINATION")]}, ), ( "人一辈子一定要去一趟巴黎,但那里的埃菲尔铁塔有点无趣。", {"entities": [(5, 6, "TOURIST_DESTINATION")]}, ), ( "深圳也有个巴黎的埃菲尔铁塔,哈哈哈", {"entities": []} ), ( "北京很适合暑假去:长城、故宫,还...
20.842105
54
0.467172
d089f978def3108a932d726df6fa2d43634cb62e
5,448
py
Python
contrib/华为云垃圾分类大赛心得与案例-GitLD/src_Xception_all_aug+TTA/data_gen.py
huaweicloud/ModelArts-Lab
75d06fb70d81469cc23cd422200877ce443866be
[ "Apache-2.0" ]
1,045
2019-05-09T02:50:43.000Z
2022-03-31T06:22:11.000Z
contrib/华为云垃圾分类大赛心得与案例-GitLD/src_Xception_all_aug+TTA/data_gen.py
huaweicloud/ModelArts-Lab
75d06fb70d81469cc23cd422200877ce443866be
[ "Apache-2.0" ]
1,468
2019-05-16T00:48:18.000Z
2022-03-08T04:12:44.000Z
contrib/华为云垃圾分类大赛心得与案例-GitLD/src_Xception_all_aug+TTA/data_gen.py
huaweicloud/ModelArts-Lab
75d06fb70d81469cc23cd422200877ce443866be
[ "Apache-2.0" ]
1,077
2019-05-09T02:50:53.000Z
2022-03-27T11:05:32.000Z
# -*- coding: utf-8 -*- import os import math import codecs import random import numpy as np from glob import glob from PIL import Image from keras.utils import np_utils, Sequence from sklearn.model_selection import train_test_split class BaseSequence(Sequence): """ 基础的数据流生成器,每次迭代返回一个batch BaseSequence可直...
41.272727
144
0.672173
d0a0e3262a093befa973a8e125897b334151be59
1,047
py
Python
018-C127-WebScraping/main.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
2
2021-09-28T13:55:20.000Z
2021-11-15T10:08:49.000Z
018-C127-WebScraping/main.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
null
null
null
018-C127-WebScraping/main.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
1
2022-01-20T03:02:20.000Z
2022-01-20T03:02:20.000Z
from selenium import webdriver from bs4 import BeautifulSoup import time import csv START_URL = "https://en.wikipedia.org/wiki/List_of_brightest_stars_and_other_record_stars" browser = webdriver.Chrome("chromedriver.exe") browser.get(START_URL) time.sleep(3) def scrape(): headers = ["vmag", "name", "bayer", "dist...
29.914286
104
0.636103
ef7372b2f45a71a889cf69edf89aa0ccd564cb51
5,955
py
Python
AntColonyOptimizer.py
siej88/FuzzyACO
989a58049c8417cd023cfc312fb99d2649333ca7
[ "MIT" ]
null
null
null
AntColonyOptimizer.py
siej88/FuzzyACO
989a58049c8417cd023cfc312fb99d2649333ca7
[ "MIT" ]
null
null
null
AntColonyOptimizer.py
siej88/FuzzyACO
989a58049c8417cd023cfc312fb99d2649333ca7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ UNIVERSIDAD DE CONCEPCION Departamento de Ingenieria Informatica y Ciencias de la Computacion Memoria de Titulo Ingenieria Civil Informatica DETECCION DE BORDES EN IMAGENES DGGE USANDO UN SISTEMA HIBRIDO ACO CON LOGICA DIFUSA Autor: Sebastian Ignacio Espinoza Jimenez Patrocinant...
48.024194
105
0.573468
ef994720ea2a999f0b5e3dfb0c277052b19ae51f
534
py
Python
Packs/CommonScripts/Scripts/Cut/Cut_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/Cut/Cut_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/Cut/Cut_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from Cut import cut import pytest @pytest.mark.parametrize('value,delimiter,fields,expected', [ ('A-B-C-D-E', '-', '1,5', 'A-E'), ('a,ב,c', ',', '2,3', 'ב,c'), ]) def test_cut(value, delimiter, fields, expected): """ Given: Case 1: A-B-C-D-E to split by - from char 1 to 5 Case 2: a,ב,...
22.25
61
0.558052
329062c006761cb11d903f71c24e59c1e35e6910
3,731
py
Python
extractTool/extractTool/similar.py
corneliazy/Geosoftware2
8604c79c58a61b84c602f16b5f1e74e30dfcbd0e
[ "MIT" ]
null
null
null
extractTool/extractTool/similar.py
corneliazy/Geosoftware2
8604c79c58a61b84c602f16b5f1e74e30dfcbd0e
[ "MIT" ]
47
2018-11-13T13:55:01.000Z
2019-09-16T13:38:11.000Z
extractTool/extractTool/similar.py
corneliazy/Geosoftware2
8604c79c58a61b84c602f16b5f1e74e30dfcbd0e
[ "MIT" ]
4
2018-11-27T12:36:51.000Z
2020-10-14T18:07:04.000Z
import math import detailebenen import click # import typ # Beispielkoordinaten # bbox1 = [5.8663155, 47.270111, 15.041932 , 55.099159] # bbox2 = [7.5234, 52.0326, 7.7556, 52.152] # def mastersim(filepath): # bbox1 = detailebenen(filepath) blabla Hier muessen die Bboxen berechet werden # bbox2 = detailebee(f...
28.480916
273
0.654248
08c0a7cb786a0eb7250f9d1fe3bd7eb0533d2522
600
py
Python
0009palindrome-number.py
meat00/my-leetcode-python
8312de396b29e1d6dd54a65f87fa0511eb400faa
[ "MIT" ]
null
null
null
0009palindrome-number.py
meat00/my-leetcode-python
8312de396b29e1d6dd54a65f87fa0511eb400faa
[ "MIT" ]
null
null
null
0009palindrome-number.py
meat00/my-leetcode-python
8312de396b29e1d6dd54a65f87fa0511eb400faa
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- class Solution(): def isPalindrome(self, x: int) -> bool: ''' 注意特殊情况 1. x小于0 2. 最后一位为0 3. x为0 ''' if x < 0 or (x % 10 == 0 and x != 0): return False rev = 0 while x > rev: ...
22.222222
45
0.416667
de3b2bf4d4c0e709ae15751a616c74112bddc8e9
1,804
py
Python
resources/mechanics_lib/Ant.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
7
2016-01-20T02:33:00.000Z
2021-02-04T04:06:57.000Z
resources/mechanics_lib/Ant.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
null
null
null
resources/mechanics_lib/Ant.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
3
2016-10-05T07:20:30.000Z
2017-11-20T10:36:50.000Z
from api.component import Component class Ant(Component): def defComponents(self): self.addSubcomponent("brain", "Brains", inherit=True, prefix=None) self.addSubcomponent("front", "LegPair", inherit=True, prefix=None) self.addSubcomponent("back", "LegPair", inherit=True, prefix=None) def defParameters...
37.583333
101
0.517738
dec08e4b05b41dd81d160d7e41ed3c728b977af9
1,383
py
Python
python/oneflow/utils/vision/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/utils/vision/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/utils/vision/__init__.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
520
2020-07-31T05:52:42.000Z
2022-03-29T02:38:11.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
32.162791
84
0.710774
72181adc745c56619ee60682e9432eea3a374283
92
py
Python
2015/02/nurse-injury-rates/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2015/02/nurse-injury-rates/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2015/02/nurse-injury-rates/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python COPY_GOOGLE_DOC_KEY = '1assIFoHbgfYcQ-OdFmm2q7ia2VaGQwrdZ5NmhoKImOk'
23
68
0.836957
a0f19af25be558d43e8977913bf66c771223f953
1,121
py
Python
Lab_02/fib.py
SadequrRahman/advance-SoC
35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4
[ "BSD-4-Clause-UC" ]
null
null
null
Lab_02/fib.py
SadequrRahman/advance-SoC
35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4
[ "BSD-4-Clause-UC" ]
null
null
null
Lab_02/fib.py
SadequrRahman/advance-SoC
35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4
[ "BSD-4-Clause-UC" ]
null
null
null
# # Copyright (C) 2019 Mohammad Sadequr Rahman <mohammad.rahman@tuhh.de> # # This file is part of Advance SoC Design Lab Soultion. # # SoC Design Lab Soultion can not be copied and/or distributed without the express # permission of Mohammad Sadequr Rahman # # File: fib.py # This is a pymtl fibonacci gloden algorithm...
21.557692
82
0.540589
261e85d58df7266cfd7e58e24f7b48125975f239
1,171
py
Python
chemolab/core/unicode.py
MeleiDigitalMedia/ChemoLab
b27421a836d76de88b23845f6c808d4429925702
[ "MIT" ]
null
null
null
chemolab/core/unicode.py
MeleiDigitalMedia/ChemoLab
b27421a836d76de88b23845f6c808d4429925702
[ "MIT" ]
null
null
null
chemolab/core/unicode.py
MeleiDigitalMedia/ChemoLab
b27421a836d76de88b23845f6c808d4429925702
[ "MIT" ]
null
null
null
class SubScript(): """Creates an instance of SubScript""" def __init__(self): self.NUM_0 = u'\u2080' self.NUM_1 = u'\u2081' self.NUM_2 = u'\u2082' self.NUM_3 = u'\u2083' self.NUM_4 = u'\u2084' self.NUM_5 = u'\u2085' self.NUM_6 = u'\u2086' ...
31.648649
45
0.485056
26bb10f45a5b4f95ec9fcb604d781837ada01030
345
py
Python
init.py
two-doges/tpf
a98f68fba40b3f07ce0ef14f6ca982e915ee3e07
[ "MIT" ]
2
2018-03-04T13:36:22.000Z
2018-03-04T13:36:33.000Z
init.py
two-doges/tpf
a98f68fba40b3f07ce0ef14f6ca982e915ee3e07
[ "MIT" ]
null
null
null
init.py
two-doges/tpf
a98f68fba40b3f07ce0ef14f6ca982e915ee3e07
[ "MIT" ]
null
null
null
import os import sys sys.path.append("..") import dataoper def initall(): pat = "devhost" fp = open("devdata.py","w+") s = str(os.getcwd()) fp.write('dir = '+'"'+s+'/'+pat+'"'+'\n') fp.write('pos = '+'"'+s+'/'+"devdata"+'"') dataoper.make_table(pat) if __name__ == "__main__": dataoper.dele...
20.294118
46
0.553623
90320414d5545b38764cd72587480188bd9c886c
422
py
Python
python/en/_numpy/organize_this/test_numpy.Quickstart_tutorial-03.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/organize_this/test_numpy.Quickstart_tutorial-03.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/organize_this/test_numpy.Quickstart_tutorial-03.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
""" test_numpy.Quickstart_tutorial-03.py * References Quickstart tutorial https://docs.scipy.org/doc/numpy/user/quickstart.html TODO: Start from A frequent error consists in calling array with multiple numeric """ import numpy as np a = np.array( [2,3,4] ) """ >>> a array([2, 3, 4]) >>> a.dtype dtype('int64...
14.066667
65
0.63981
840e3e92339d6c3635dffee4c74621caca209267
94
py
Python
python_lessons/freecodecamp_python/014_dict_object_d_for_in_print.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
python_lessons/freecodecamp_python/014_dict_object_d_for_in_print.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
python_lessons/freecodecamp_python/014_dict_object_d_for_in_print.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
d = dict() d['quincy'] = 1 d['beau'] = 5 d['kris'] = 9 for (k,i) in d.items(): print(k, i)
15.666667
23
0.478723
4b974cf32caa7c6b6283e803dcfb8044ee9063ed
9,140
py
Python
SAC2018/SAC.py
Wen2chao/RL-Algorithm-
6cb31f2e02a90fceef498c7ee46a4d06eb976005
[ "MIT" ]
19
2020-06-09T07:48:10.000Z
2022-03-27T04:52:36.000Z
SAC2018/SAC.py
Wen2chao/RL-Algorithm-
6cb31f2e02a90fceef498c7ee46a4d06eb976005
[ "MIT" ]
1
2020-09-17T07:39:35.000Z
2021-08-02T02:31:52.000Z
SAC2018/SAC.py
Wen2chao/RL-Algorithm-
6cb31f2e02a90fceef498c7ee46a4d06eb976005
[ "MIT" ]
12
2020-03-28T08:19:26.000Z
2022-03-21T11:08:08.000Z
import gym import torch import random import torch.nn as nn import collections import numpy as np import torch.nn.functional as F import torch.optim as optim import matplotlib.pyplot as plt from torch.distributions import Normal class ReplayBeffer(): def __init__(self, buffer_maxlen): self.b...
33.726937
121
0.609409
4b165c49280c7f812571921ae83d0c505571bf4d
10,637
py
Python
GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/gto_remote.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/gto_remote.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/gto_remote.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 builtins import str from PyQt5.QtCore import Qt,QObject,QFileSystemWatcher #from PyQt5.QtGui import * import os import json import io from qgis.core import QgsProject,QgsFeatureRequest from .gto_info import gtoInfo class gtoRemote(QObject): def __init__(self, gtoma...
42.043478
231
0.540378
4b2694efc137f8ec6d32dfa08a19037c42e42cdd
3,457
py
Python
accounts/forms.py
JanakiRaman-2002/Arre-yaar
c0b44ca1f8884a09116241dcd0bf7cfcee3b785d
[ "Apache-2.0" ]
null
null
null
accounts/forms.py
JanakiRaman-2002/Arre-yaar
c0b44ca1f8884a09116241dcd0bf7cfcee3b785d
[ "Apache-2.0" ]
null
null
null
accounts/forms.py
JanakiRaman-2002/Arre-yaar
c0b44ca1f8884a09116241dcd0bf7cfcee3b785d
[ "Apache-2.0" ]
null
null
null
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm,AuthenticationForm from django.forms.widgets import TextInput, Textarea from .models import * class UserForm(forms.Form): # class Meta: # model = User # fields = ('username','...
41.650602
129
0.57304
8ad3d7138e5cc42b191ab7f7b90915eb7d6894bf
1,090
py
Python
research/cv/SRGAN/src/loss/psnr_loss.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/SRGAN/src/loss/psnr_loss.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/SRGAN/src/loss/psnr_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...
35.16129
78
0.658716
6ae2efdb4e7a2f5616ad6b4dce2044e09d204517
3,293
py
Python
research/inference.py
jieming2002/models-quiz8
421dc407a10444cab4bd88c25599077acca96bdb
[ "Apache-2.0" ]
null
null
null
research/inference.py
jieming2002/models-quiz8
421dc407a10444cab4bd88c25599077acca96bdb
[ "Apache-2.0" ]
null
null
null
research/inference.py
jieming2002/models-quiz8
421dc407a10444cab4bd88c25599077acca96bdb
[ "Apache-2.0" ]
null
null
null
import argparse import os import numpy as np import tensorflow as tf from matplotlib import pyplot as plt from PIL import Image from utils import visualization_utils as vis_util from utils import label_map_util if tf.__version__ < '1.4.0': raise ImportError('Please upgrade your tensorflow installation to v1.4.* ...
41.1625
126
0.683875
0aa1c7468484eee02456915485470e6e25a46577
5,918
py
Python
tests/test_tokenization_bart.py
zyxdSTU/pytorch-pretrained-BERT
5ec89489dd66302023821f2d27e109861e9f593d
[ "Apache-2.0" ]
4
2021-01-15T20:20:47.000Z
2021-11-14T18:33:42.000Z
tests/test_tokenization_bart.py
yym6472/transformers
abd01205561e5caec167c1fbb20bccea24d7ba46
[ "Apache-2.0" ]
1
2021-09-15T09:20:01.000Z
2022-03-02T17:16:01.000Z
tests/test_tokenization_bart.py
yym6472/transformers
abd01205561e5caec167c1fbb20bccea24d7ba46
[ "Apache-2.0" ]
3
2021-04-26T08:01:16.000Z
2022-03-23T04:47:56.000Z
import json import os import unittest from transformers import BartTokenizer, BartTokenizerFast, BatchEncoding from transformers.file_utils import cached_property from transformers.testing_utils import require_torch from transformers.tokenization_roberta import VOCAB_FILES_NAMES from .test_tokenization_common import ...
39.986486
109
0.628929
0abc761c4d0f1015b3d182238014d8363430208c
693
py
Python
old/baxter_test.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
old/baxter_test.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
old/baxter_test.py
YoshimitsuMatsutaIe/hoge_flow_test
22e2e2ce043a3107bd06449f6f9958641293e414
[ "MIT" ]
null
null
null
"""baxter関連をテストする""" import numpy as np from math import cos, sin, tan, pi #import itertools import csv import matplotlib.pyplot as plt import matplotlib.animation as anm from mpl_toolkits.mplot3d import Axes3D #import matplotlib.patches as patches #from matplotlib.font_manager import FontProperties #fp = FontPropert...
21
66
0.702742
7c7cc5d03503a565bf1f10598b682a71e75a2d48
2,955
py
Python
events/views.py
rocky-roll-call/rrc-backend
02e8e11c3dab7661e48650e2e861a4a97788a4ce
[ "MIT" ]
null
null
null
events/views.py
rocky-roll-call/rrc-backend
02e8e11c3dab7661e48650e2e861a4a97788a4ce
[ "MIT" ]
null
null
null
events/views.py
rocky-roll-call/rrc-backend
02e8e11c3dab7661e48650e2e861a4a97788a4ce
[ "MIT" ]
null
null
null
""" Event API Views """ # django from django.shortcuts import get_object_or_404 # library from rest_framework import generics from rest_framework.exceptions import ValidationError # app from casts.models import Cast from casts.permissions import IsManagerOrReadOnly from users.models import Profile from .models impor...
33.965517
83
0.698816
7cc242f60c16ba220614e43c292406585aa58ed9
408
py
Python
Algorithms/Sorting/InsertionSort/insertion_sort.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
26
2019-07-17T11:05:43.000Z
2022-02-06T08:31:40.000Z
Algorithms/Sorting/InsertionSort/insertion_sort.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
7
2019-07-16T19:52:25.000Z
2022-01-08T08:03:44.000Z
Algorithms/Sorting/InsertionSort/insertion_sort.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
19
2020-01-14T02:44:28.000Z
2021-12-27T17:31:59.000Z
def insertion_sort(arr): for i in range(1, len(arr)): key = arr[i] j = i - 1 while(j>=0 and arr[j]>key): arr[j+1]=arr[j] j = j - 1 arr[j+1] = key return arr def main(): arr = [6, 5, 8, 9, 3, 1, 4, 7, 2] sorted_arr = insertion_sort(arr) ...
20.4
37
0.458333
7cd061d6e0313657c5bd26a9b8283e3bedc8bf98
1,648
py
Python
etl/transforms/primitives/df/restructure.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
etl/transforms/primitives/df/restructure.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
etl/transforms/primitives/df/restructure.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
import etl.transforms.primitives.df.pandas_utils as pandas_utils import pandas as pd import numpy as np import logging def select_columns(df, selection_dict): try: df = df[list(selection_dict.keys())]\ .rename(index=str, columns=selection_dict)\ .reset_index(drop=True) except Ke...
32.313725
75
0.652913
86a6b22c2d771d5bbbd8c2ebed050c8c9fd2e1e6
2,560
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/scripts/inventory/lxc_inventory.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/scripts/inventory/lxc_inventory.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/scripts/inventory/lxc_inventory.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # (c) 2015-16 Florian Haas, hastexo Professional Services GmbH # <florian@hastexo.com> # Based in part on: # libvirt_lxc.py, (c) 2013, Michael Scherer <misc@zarb.org> # # This file is part of Ansible, # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the...
36.056338
82
0.678516
d4954ea39c55d5e1eb404391d9b9f35a36d9d496
2,079
py
Python
oldp/utils/test_utils.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
3
2020-06-27T08:19:35.000Z
2020-12-27T17:46:02.000Z
oldp/utils/test_utils.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
oldp/utils/test_utils.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
import logging import os from unittest import TestCase from django.conf import settings logger = logging.getLogger(__name__) class TestCaseHelper(object): resource_dir = None @staticmethod def get_app_root_dir(): return os.path.dirname(os.path.dirname(os.path.realpath(__file__))) def get_r...
29.7
113
0.658009
d4da6651eaa60ead25c4d44b2f69a592b2f35122
10,794
py
Python
tests/model/test_game.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
3
2021-01-17T23:32:07.000Z
2022-01-30T14:49:16.000Z
tests/model/test_game.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
2
2021-01-17T13:37:56.000Z
2021-04-14T12:28:49.000Z
tests/model/test_game.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
2
2021-04-02T14:53:38.000Z
2021-04-20T11:10:17.000Z
import unittest from datetime import datetime, timezone import tests from chillow.model.cell import Cell from chillow.model.direction import Direction from chillow.model.game import Game from chillow.model.player import Player from chillow.exceptions import WrongGameWidthException, WrongGameHeightException, OwnPlayerM...
42.496063
110
0.592459
078c756cad7cad8808fa355832f4361f48528673
3,423
py
Python
src/onegov/translator_directory/app.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/translator_directory/app.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/translator_directory/app.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import datetime from sqlalchemy.orm import object_session from onegov.core import utils from onegov.core.crypto import random_token from onegov.file.utils import as_fileintent, extension_for_content_type, \ content_type_from_fileobj from onegov.gis import Coordinates from onegov.translator_directory...
31.694444
79
0.752848
07b99f525071369ad8a8683e936de85bf118cf18
2,964
py
Python
Examples/terminal/demo_all/demo-all.py
andino-systems/andinopy
28fc09fbdd67dd690b9b3f80f03a05c342c777e1
[ "Apache-2.0" ]
null
null
null
Examples/terminal/demo_all/demo-all.py
andino-systems/andinopy
28fc09fbdd67dd690b9b3f80f03a05c342c777e1
[ "Apache-2.0" ]
null
null
null
Examples/terminal/demo_all/demo-all.py
andino-systems/andinopy
28fc09fbdd67dd690b9b3f80f03a05c342c777e1
[ "Apache-2.0" ]
null
null
null
import time from andinopy import andinoterminal import logging class TerminalDemo: terminal: andinoterminal = None _last_keyboard: str = "" _last_rfid: str = "" def __init__(self): print("initializing Terminal") self.terminal = andinoterminal() self.terminal.rfid_keyboard_ins...
34.870588
114
0.67139
ed3c21f001a4067d79b6c959360144742570c9bb
1,687
py
Python
MzituCrawler/spiders/zipaiSpiders.py
yeming1001/-MzituCrawler
3e3dad298734658266fb4c12cd863be73eb4f4a2
[ "Apache-2.0" ]
1
2018-02-09T05:36:06.000Z
2018-02-09T05:36:06.000Z
MzituCrawler/spiders/zipaiSpiders.py
yeming1001/-MzituCrawler
3e3dad298734658266fb4c12cd863be73eb4f4a2
[ "Apache-2.0" ]
null
null
null
MzituCrawler/spiders/zipaiSpiders.py
yeming1001/-MzituCrawler
3e3dad298734658266fb4c12cd863be73eb4f4a2
[ "Apache-2.0" ]
1
2017-03-30T07:44:49.000Z
2017-03-30T07:44:49.000Z
from scrapy.selector import Selector import scrapy from MzituCrawler.items import MzituZiPaicrawlerItem # 妹子图自拍爬虫 class ZipaiSiders(scrapy.Spider): name = 'mzitu.zipai' allowed_domains = ['www.mzitu.com'] base_url = 'http://www.mzitu.com/zipai/comment-page-{}#comments' start_urls = ['http://www.mzitu...
35.145833
186
0.623592
92bb6c6e0a379cb864cc9e018d8b94120804e425
1,843
py
Python
python_first_step/partialsum/partialsum.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
python_first_step/partialsum/partialsum.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
python_first_step/partialsum/partialsum.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
import time import numpy as np import numpy .linalg as nl import random import matplotlib.pyplot as plt import sys # Iteration über sämtliche Argumente: for eachArg in sys.argv: print(eachArg) #t1 = np.linspace(1,5,10) #t2 = np.linspace(1,5,20) #plt.plot(t1,t2) #(t1, t1, ’r -- ’,t1, t1++2, (bs, t2,np.log(t2)*...
20.252747
122
0.560499
92c46a523a0d0e121e5938ce9c1fe6fda06192d6
1,488
py
Python
20-fs-ias-lec/groups/07-14-logCtrl/src/logStore/appconn/kotlin_connection.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-fs-ias-lec/groups/07-14-logCtrl/src/logStore/appconn/kotlin_connection.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-fs-ias-lec/groups/07-14-logCtrl/src/logStore/appconn/kotlin_connection.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
from .connection import Function class KotlinFunction(Function): """Connection to the group kotlin to insert and output the chat elements""" def __init__(self): super(KotlinFunction, self).__init__() def insert_data(self, cbor): """adds a new chat element as cbor @:parameter eve...
32.347826
85
0.670699
13068e620cee3b753c5b140b987eded2ed8c4625
3,847
py
Python
lib/tinyxml2/setversion.py
tokosattila/HomeEinkBadge
786e9314ef8119d968048ec77956f4fb7804082f
[ "Unlicense" ]
null
null
null
lib/tinyxml2/setversion.py
tokosattila/HomeEinkBadge
786e9314ef8119d968048ec77956f4fb7804082f
[ "Unlicense" ]
null
null
null
lib/tinyxml2/setversion.py
tokosattila/HomeEinkBadge
786e9314ef8119d968048ec77956f4fb7804082f
[ "Unlicense" ]
null
null
null
# Python program to set the version. ############################################## import re import sys import optparse def fileProcess( name, lineFunction ): filestream = open( name, 'r' ) if filestream.closed: print( "file " + name + " not open." ) return output = "" print( "--- Processing " + name + " --...
24.980519
92
0.639199
1356129dc0abaeb018a9096112b5fdcb2597e545
1,024
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v4_2/repost_sle_for_si_with_no_warehouse.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
frappe-bench/apps/erpnext/erpnext/patches/v4_2/repost_sle_for_si_with_no_warehouse.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v4_2/repost_sle_for_si_with_no_warehouse.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import print_function, unicode_literals import frappe from erpnext.stock.stock_ledger import NegativeStockError def execute(): si_list = frappe.db.sql("""select distinct s...
30.117647
83
0.723633
138d7bc4b0520e3a2db37c0f407ede225496a386
388
py
Python
Django/ballon/migrations/0002_auto_20180827_2341.py
ballon3/GRAD
c630e32272fe34ead590c04d8360169e02be87f1
[ "MIT" ]
null
null
null
Django/ballon/migrations/0002_auto_20180827_2341.py
ballon3/GRAD
c630e32272fe34ead590c04d8360169e02be87f1
[ "MIT" ]
null
null
null
Django/ballon/migrations/0002_auto_20180827_2341.py
ballon3/GRAD
c630e32272fe34ead590c04d8360169e02be87f1
[ "MIT" ]
null
null
null
# Generated by Django 2.1 on 2018-08-28 06:41 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ballon', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='resume', name='category', ), mi...
18.47619
45
0.556701
16570c371b0050e20e4bd40f17bb05001dc4a9ef
65
py
Python
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 1/1.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
50-Python-Exercises/Exercises/Exercise 1/1.py
kuwarkapur/Hacktoberfest-2022
efaafeba5ce51d8d2e2d94c6326cc20bff946f17
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
50-Python-Exercises/Exercises/Exercise 1/1.py
kuwarkapur/Hacktoberfest-2022
efaafeba5ce51d8d2e2d94c6326cc20bff946f17
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
#What will this script produce? #A: 3 a = 1 a = 2 a = 3 print(a)
9.285714
31
0.6
169285c1ac74a7a129c46f31b711141ae326ac5b
6,780
py
Python
core/execute.py
littlecharacter/AutoWork
feebb8459f889b7a9165073be8fd44ba544cbb35
[ "Apache-2.0" ]
null
null
null
core/execute.py
littlecharacter/AutoWork
feebb8459f889b7a9165073be8fd44ba544cbb35
[ "Apache-2.0" ]
null
null
null
core/execute.py
littlecharacter/AutoWork
feebb8459f889b7a9165073be8fd44ba544cbb35
[ "Apache-2.0" ]
null
null
null
import os import time import copy import threading from queue import Queue from core.orm import * import cv2 import pyautogui import pyperclip import pyscreeze import subprocess import platform pyautogui.FAILSAFE = False IMG_PATH = '../img/' run_flag = Queue(1) run_work = {} stop_signal = Queue(1) class WorkThread...
33.235294
135
0.604277
1696bcdc44faf9716acc2873aabb989ef4b6baca
1,521
py
Python
deprecated/fleet_x/examples/bert_app.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
170
2020-08-12T12:07:01.000Z
2022-03-07T02:38:26.000Z
deprecated/fleet_x/examples/bert_app.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
195
2020-08-13T03:22:15.000Z
2022-03-30T07:40:25.000Z
deprecated/fleet_x/examples/bert_app.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
67
2020-08-14T02:07:46.000Z
2022-03-28T10:05:33.000Z
# 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...
37.097561
83
0.788297
bcaddff8d887bb1fd1c11d78ed87b7479ca2753e
2,714
py
Python
build/cpp/verify_runtime_deps.py
opensource-assist/fuschia
66646c55b3d0b36aae90a4b6706b87f1a6261935
[ "BSD-3-Clause" ]
null
null
null
build/cpp/verify_runtime_deps.py
opensource-assist/fuschia
66646c55b3d0b36aae90a4b6706b87f1a6261935
[ "BSD-3-Clause" ]
null
null
null
build/cpp/verify_runtime_deps.py
opensource-assist/fuschia
66646c55b3d0b36aae90a4b6706b87f1a6261935
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python2.7 # Copyright 2018 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import json import os import sys def has_packaged_file(needed_file, deps): """Returns true if the given file co...
33.097561
79
0.660648
d5c48ed1b49eda67aaff43b79819a2e01281381f
925
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/util/ListUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/util/ListUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/util/ListUtils.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden def swap(values, first, second): value1 = values[first] value2 = values[second] values[first] = value2 values[second] = value1 def swap(values, first, second): tmp = values[first] values[first] = values[s...
18.137255
62
0.617297
e6cf49e5934c0be95398f25368e771acb43175b6
1,440
py
Python
ebenezer/atencion/migrations/0009_level.py
davrv93/ebenezer-backend
d3db4dafd9a8c35bea9f32afe2be1dd451f64298
[ "Apache-2.0" ]
null
null
null
ebenezer/atencion/migrations/0009_level.py
davrv93/ebenezer-backend
d3db4dafd9a8c35bea9f32afe2be1dd451f64298
[ "Apache-2.0" ]
3
2020-02-11T23:15:00.000Z
2021-06-10T20:52:17.000Z
ebenezer/atencion/migrations/0009_level.py
davrv93/ebenezer-backend
d3db4dafd9a8c35bea9f32afe2be1dd451f64298
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.2 on 2018-10-05 13:43 from django.db import migrations, models import django.db.models.deletion import mptt.fields import uuid class Migration(migrations.Migration): dependencies = [ ('atencion', '0008_typeoflevel'), ] operations = [ migrations.CreateModel( ...
42.352941
195
0.629861
fc006934a13cf8982d1cb7088c731a90c14873bf
2,965
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/traci/storage.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/traci/storage.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/traci/storage.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
# -*- coding: utf-8 -*- # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2008-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at # https://www....
29.949495
100
0.633052
5d5e2faa22593ed62da301da0114b2b99e99f783
2,073
py
Python
code/1/utest.py
pwang13/AutomatedSE_Coursework
b416672d9756fcc60367143b989d29b0c905cfc3
[ "Unlicense" ]
null
null
null
code/1/utest.py
pwang13/AutomatedSE_Coursework
b416672d9756fcc60367143b989d29b0c905cfc3
[ "Unlicense" ]
null
null
null
code/1/utest.py
pwang13/AutomatedSE_Coursework
b416672d9756fcc60367143b989d29b0c905cfc3
[ "Unlicense" ]
null
null
null
#!/usr/bin/python """ utest.py (c) 2016 tim@menzies.us, MIT licence Part of http://tiny.cc/ase16: teaching tools for (model-based) automated software enginering. USAGE: (1) If you place '@ok' before a function, then load that file, then that function will execute and all assertion failures will add one to a FAIL count...
24.104651
64
0.611674
53bb8d640caf8b9381c100c0bce1f921964c5e35
8,422
py
Python
V1/DDPG/ddpg_v1.py
marsXyr/GESRL
3d60dfd4ffa1e0ae24d64b09f431d8ee0a9b5c01
[ "Apache-2.0" ]
null
null
null
V1/DDPG/ddpg_v1.py
marsXyr/GESRL
3d60dfd4ffa1e0ae24d64b09f431d8ee0a9b5c01
[ "Apache-2.0" ]
null
null
null
V1/DDPG/ddpg_v1.py
marsXyr/GESRL
3d60dfd4ffa1e0ae24d64b09f431d8ee0a9b5c01
[ "Apache-2.0" ]
null
null
null
import argparse import numpy as np import gym import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from utils import logz from utils.tools import get_output_folder, OUNoise, hard_update, soft_update from utils.buffer import ReplayBuffer FloatTensor = torch.FloatTensor """ ...
33.553785
96
0.628473
53cc51a93ef82b14a7ec16ec867df498664a7acf
7,468
py
Python
AP_SS16/504/python/plot_helpers.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
3
2016-04-27T17:07:00.000Z
2022-02-02T15:43:15.000Z
AP_SS16/504/python/plot_helpers.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
5
2016-04-27T17:10:03.000Z
2017-06-20T14:54:20.000Z
AP_SS16/504/python/plot_helpers.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
null
null
null
import sys import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import uncertainties import uncertainties.unumpy as unp from scipy.constants import C2K, K2C from scipy.optimize import curve_fit from uncertainties import ufloat from uncertainties.unumpy import uarray def extract_error(data): ...
26.960289
93
0.647161
4ac9cb55aec05451141c0c5425a601054eed08ff
2,754
py
Python
Automaten/Python/nka_terme.py
jneug/schule-projekte
4f1d56d6bb74a47ca019cf96d2d6cc89779803c9
[ "MIT" ]
2
2020-09-24T12:11:16.000Z
2022-03-31T04:47:24.000Z
Automaten/Python/nka_terme.py
jneug/schule-projekte
4f1d56d6bb74a47ca019cf96d2d6cc89779803c9
[ "MIT" ]
1
2021-02-27T15:06:27.000Z
2021-03-01T16:32:48.000Z
Automaten/Python/nka_terme.py
jneug/schule-projekte
4f1d56d6bb74a47ca019cf96d2d6cc89779803c9
[ "MIT" ]
1
2021-02-24T05:12:35.000Z
2021-02-24T05:12:35.000Z
def transition(state, char, stack_char): new_state = -1 new_stack_chars = "" if state == 0: new_state = 1 new_stack_chars = "S#" elif state == 1: if stack_char in "0123456789+-*:().": new_state = 1 new_stack_chars = "" elif stack_char == "S": ...
28.391753
64
0.444808
4afe315c7c91d456e84455d89f39e76f2aef0620
7,453
py
Python
Packs/BitDam/Integrations/BitDam/BitDam.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/BitDam/Integrations/BitDam/BitDam.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/BitDam/Integrations/BitDam/BitDam.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * '''IMPORTS''' import requests import base64 # disable insecure warnings requests.packages.urllib3.disable_warnings() '''INTEGRATION PARAMS''' API_TOKEN = demisto.params().get('apitoken') URL_BASE = demisto.params().get('url') USE_PROXY = demisto.params()....
32.404348
126
0.671407
db6dce16e99bbd21687167c6e3bf52f7bad1adc0
1,024
py
Python
PINp/2014/Chernov_M_S/task_9_27.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Chernov_M_S/task_9_27.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Chernov_M_S/task_9_27.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 9. Вариант 27. #Создайте игру, в которой компьютер выбирает какое-либо слово, а игрок должен его отгадать. Компьютер сообщает игроку, сколько букв в слове, и дает пять попыток узнать, есть ли какая-либо буква в слове, причем программа может отвечать только "Да" и "Нет". Вслед за тем игрок должен попробовать от...
36.571429
309
0.708984
dbb0f6ca9a74b0ed550f6304dee3919819bd64f3
728
py
Python
tools/pythonpkg/tests/fast/test_transaction.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
2,816
2018-06-26T18:52:52.000Z
2021-04-06T10:39:15.000Z
tools/pythonpkg/tests/fast/test_transaction.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
1,310
2021-04-06T16:04:52.000Z
2022-03-31T13:52:53.000Z
tools/pythonpkg/tests/fast/test_transaction.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
270
2021-04-09T06:18:28.000Z
2022-03-31T11:55:37.000Z
import duckdb import pandas as pd class TestConnectionTransaction(object): def test_transaction(self, duckdb_cursor): con = duckdb.connect() con.execute('create table t (i integer)') con.execute ('insert into t values (1)') con.begin() con.execute ('insert into t values (1)...
36.4
72
0.596154
91a50515d6ddfd3b7262f7be8ec40e6696dd3187
304
py
Python
Chapter2_Python/ZipEnumerate.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter2_Python/ZipEnumerate.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter2_Python/ZipEnumerate.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
list_a = [10, 20, 30] list_b = ["Jan", "Peter", "Max"] list_c = [True, False, True] for val_a, val_b, val_c in zip(list_a, list_b, list_c): print(val_a, val_b, val_c) print("\n") for i in range(len(list_a)): print(i, list_a[i]) print("\n") for i, val in enumerate(list_a): print(i, val)
17.882353
55
0.615132
91b1c7f2319c2b96912a3d9b4ae99fedff955d99
8,833
py
Python
Tests/Marketplace/search_and_uninstall_pack.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
Tests/Marketplace/search_and_uninstall_pack.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
40
2022-03-03T07:34:00.000Z
2022-03-31T07:38:35.000Z
Tests/Marketplace/search_and_uninstall_pack.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
import ast import json import argparse import os import sys import demisto_client from Tests.scripts.utils import logging_wrapper as logging from Tests.scripts.utils.log_util import install_logging from Tests.Marketplace.search_and_install_packs import install_packs from time import sleep def get_all_installed_packs...
38.404348
118
0.582475
91d503c31210a49b924dbb63337d444d4de28f5c
2,853
py
Python
.vscode/extensions/ms-vscode.cpptools-1.9.0/debugAdapters/lldb/lib/python2.7/site-packages/lldb/formatters/Logger.py
Kvahn-ui/dotfiles
3f1364410f5bebcaacca6ae38a8e5fbb9bb51285
[ "MIT" ]
3
2016-02-10T14:18:40.000Z
2018-02-05T03:15:56.000Z
.vscode/extensions/ms-vscode.cpptools-1.9.0/debugAdapters/lldb/lib/python2.7/site-packages/lldb/formatters/Logger.py
Kvahn-ui/dotfiles
3f1364410f5bebcaacca6ae38a8e5fbb9bb51285
[ "MIT" ]
4
2019-06-16T09:52:03.000Z
2019-08-18T02:11:35.000Z
.vscode/extensions/ms-vscode.cpptools-1.9.0/debugAdapters/lldb/lib/python2.7/site-packages/lldb/formatters/Logger.py
Kvahn-ui/dotfiles
3f1364410f5bebcaacca6ae38a8e5fbb9bb51285
[ "MIT" ]
null
null
null
from __future__ import print_function import sys import os.path import inspect class NopLogger: def __init__(self): pass def write(self,data): pass def flush(self): pass def close(self): pass class StdoutLogger: def __init__(self): pass def write(self,data): print(data) def flush(self): pas...
23.195122
187
0.719243
37eff26f5b825f76373d94f0673d1cfc9374a61d
442
py
Python
tests/test_types.py
fgoettel/wgt
e093e2a003fa6c9d4c2082cebbc95701d7f9089d
[ "Unlicense" ]
null
null
null
tests/test_types.py
fgoettel/wgt
e093e2a003fa6c9d4c2082cebbc95701d7f9089d
[ "Unlicense" ]
null
null
null
tests/test_types.py
fgoettel/wgt
e093e2a003fa6c9d4c2082cebbc95701d7f9089d
[ "Unlicense" ]
1
2022-01-29T12:01:47.000Z
2022-01-29T12:01:47.000Z
#!/usr/bin/env python3 """Tests for `wgt` types.""" import pytest from wgt import types def test_celsius(): """Test celsisus as representative of units.""" expected = 42.42 celsius = types.Celsius(expected) assert celsius.value == expected assert celsius.unit == "°C" assert celsius.name == ...
20.090909
60
0.662896
53587c8e62ac8bf101f88a22bd046e76f3b783e7
4,453
py
Python
magenta_docker/task.py
googleinterns/step258-2020
49e7af1a381e076ee884f55857a7af2f72add74d
[ "Apache-2.0" ]
2
2020-08-28T15:17:40.000Z
2022-01-21T14:03:21.000Z
magenta_docker/task.py
googleinterns/step258-2020
49e7af1a381e076ee884f55857a7af2f72add74d
[ "Apache-2.0" ]
1
2021-01-27T18:22:46.000Z
2021-01-27T20:58:55.000Z
magenta_docker/task.py
googleinterns/step258-2020
49e7af1a381e076ee884f55857a7af2f72add74d
[ "Apache-2.0" ]
4
2020-07-28T12:13:11.000Z
2021-01-27T16:29:29.000Z
"""Script for running a containerised training on Google Cloud AI Platform.""" import json import os import subprocess from absl import app from absl import flags FLAGS = flags.FLAGS flags.DEFINE_string('save_dir', None, 'Path where checkpoints and summary events will be saved ' ...
38.387931
79
0.669661
be44d532f6aa12d608ccd0be0854223b83c35355
4,444
py
Python
blockchain/wallet.py
tobias-fyi/xebec
731112b60ab4bd915a9c3f57a3a96c2e37b4a119
[ "MIT" ]
null
null
null
blockchain/wallet.py
tobias-fyi/xebec
731112b60ab4bd915a9c3f57a3a96c2e37b4a119
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/05_hash_tables_and_blockchain/Blockchain/client_mining_p/wallet.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
""" Blockchain — Day 2 Project :: Wallet app > MVP * Allow the user to enter, save, or change the `user_id` used for the program * Display the current balance for that user * Display a list of all transactions for this user, including sender and recipient > Stretch Goals * Use styling to visually distinguish coins se...
32.202899
82
0.593384
be488e981ad6a83f4dbe5d20f646a189ebba482e
959
py
Python
methods/transformers/examples/seq2seq/save_randomly_initialized_model.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
3
2021-07-06T20:02:31.000Z
2022-03-27T13:13:01.000Z
methods/transformers/examples/seq2seq/save_randomly_initialized_model.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
methods/transformers/examples/seq2seq/save_randomly_initialized_model.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
#!/usr/bin/env python import fire from transformers import AutoConfig, AutoModelForSeq2SeqLM, AutoTokenizer def save_randomly_initialized_version(config_name: str, save_dir: str, **config_kwargs): """Save a randomly initialized version of a model using a pretrained config. Args: config_nam...
35.518519
147
0.741397
fe657793db522efafe2f203d65640858801013a6
12,785
py
Python
Packs/UBIRCH/Integrations/UBIRCH/UBIRCH.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/UBIRCH/Integrations/UBIRCH/UBIRCH.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/UBIRCH/Integrations/UBIRCH/UBIRCH.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import from CommonServerUserPython import * # noqa import paho.mqtt.client as mqtt import paho from typing import Callable import traceback import json ''' CONSTANTS ''' QOS_AT_LEAST_ONCE = 1 # SEVERITY CRITICAL...
34.184492
119
0.630426
606e7f4ea22341b5ce383d26e26fb0b9876fd29c
266
py
Python
DataStructure/U14/U14_97.py
qiaw99/Data-Structure
3b1cdce96d4f35329ccfec29c03de57378ef0552
[ "MIT" ]
1
2019-10-29T08:21:41.000Z
2019-10-29T08:21:41.000Z
DataStructure/U14/U14_97.py
qiaw99/Data-Structure
3b1cdce96d4f35329ccfec29c03de57378ef0552
[ "MIT" ]
null
null
null
DataStructure/U14/U14_97.py
qiaw99/Data-Structure
3b1cdce96d4f35329ccfec29c03de57378ef0552
[ "MIT" ]
null
null
null
nums = 34 coins= [1,2,5,10] temp = nums dp = [float("inf") for _ in range(nums)] dp[0] = 0 for i in range(1,nums): for j in range(len(coins)): if(coins[j] <= nums): dp[i] = min(dp[i], dp[i-coins[j]]+1) print(dp) print(dp[nums-1])
22.166667
48
0.518797
7196df947a719f1ad906027a0121949c2fb6e0d6
1,039
py
Python
python/oneflow/framework/tensor_tuple_util.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/framework/tensor_tuple_util.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/framework/tensor_tuple_util.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
520
2020-07-31T05:52:42.000Z
2022-03-29T02:38:11.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
32.46875
77
0.758422
71afa04ef8d0f57669ca0f129f2c50b754e901ac
365
py
Python
0-notes/job-search/Cracking the Coding Interview/C04TreesGraphs/questions/4.12-questions.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C04TreesGraphs/questions/4.12-questions.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C04TreesGraphs/questions/4.12-questions.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# 4.12 Paths with Sum # You are given a binary tree in which each node contains an integer value # which might be positive or negative. # Design an algorithm to count the number of paths that sum to a given value. # The path does not need to start or end at the root or a leaf, but it must go # downwards, trav...
45.625
78
0.739726
e0aa0f61cc446160a9ed1bbc3c7d59ad1a2459a4
3,056
py
Python
cbm/ipycbm/ipy_view/view_background.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_background.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_background.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
47
2021-01-21T08:25:22.000Z
2022-03-21T14:28:42.000Z
import json import os.path import matplotlib.pyplot as plt from ipywidgets import Output, VBox, SelectionSlider from mpl_toolkits.axes_grid1 import ImageGrid import rasterio from rasterio.plot import show from descartes import PolygonPatch from copy import copy # import matplotlib.ticker as ticker # import numpy as np...
31.183673
80
0.592605
1c19f2b5e50ed09f338bab660257e2262cf0a3ab
3,056
py
Python
TcpPortForward.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
TcpPortForward.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
TcpPortForward.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/python env # -*- coding: utf-8 -*- ''' filename:TcpPortForward.py @desc: 利用python的socket端口转发,用于远程维护,Hack 如果连接不到远程,会sleep 36s,最多尝试200(即两小时) @usage: ./TcpPortForward.py stream1 stream2 stream为:l:port或c:host:port l:port表示监听指定的本地端口 c:host:port表示监听远程指定的端口 ''' import socket import sys import threading import time...
20.238411
84
0.647251
1c26f17d2185eda40065447ee1354e5564503292
643
py
Python
keras_malicious_url_detector/library/utility/url_data_loader.py
Adrimeov/keras-malicious-url-detector
22b8d075b41117f016100bb5ebff14a77907dacb
[ "MIT" ]
null
null
null
keras_malicious_url_detector/library/utility/url_data_loader.py
Adrimeov/keras-malicious-url-detector
22b8d075b41117f016100bb5ebff14a77907dacb
[ "MIT" ]
null
null
null
keras_malicious_url_detector/library/utility/url_data_loader.py
Adrimeov/keras-malicious-url-detector
22b8d075b41117f016100bb5ebff14a77907dacb
[ "MIT" ]
null
null
null
import pandas as pd import os def load_url_data(data_dir_path): url_data = pd.read_csv(data_dir_path, sep=',') url_data.columns = ['text', 'label'] class_zero = url_data[url_data['label'] == 0].reset_index() class_one = url_data[url_data['label'] == 1].reset_index() class_zero = class_zero.trun...
21.433333
72
0.678072
c70927eb1e75849d56fdcae49b01e64384fcad46
587
py
Python
computer-networking-a-top-down-approach/cp2/ping_client.py
Jocs/reading-notes
26b8331877a2de034b8860bc3e3967893112d52d
[ "MIT" ]
3
2021-08-04T07:59:48.000Z
2022-03-26T23:58:17.000Z
computer-networking-a-top-down-approach/cp2/ping_client.py
Jocs/reading-notes
26b8331877a2de034b8860bc3e3967893112d52d
[ "MIT" ]
null
null
null
computer-networking-a-top-down-approach/cp2/ping_client.py
Jocs/reading-notes
26b8331877a2de034b8860bc3e3967893112d52d
[ "MIT" ]
null
null
null
from socket import * import time serverName = '127.0.0.1' serverPort = 12000 socketClient = socket(AF_INET, SOCK_DGRAM) socketClient.settimeout(1) for i in range(0, 10): sendTime = time.time() message = ('Ping %d %s' % (i + 1, sendTime)).encode() try: socketClient.sendto(message, (serverName, serverPort)) ...
27.952381
79
0.674617
c719e11e1ced89112513a66e444d40617c7ab79a
4,421
py
Python
tests/addons/res2dict/test_block.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
11
2017-10-02T01:29:12.000Z
2022-03-31T08:37:22.000Z
tests/addons/res2dict/test_block.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
79
2017-07-16T14:47:17.000Z
2022-03-31T08:49:14.000Z
tests/addons/res2dict/test_block.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
2
2019-01-28T06:11:58.000Z
2021-01-25T07:21:21.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- import datetime import pytest from owlmixin.util import load_yaml from jumeaux.addons.res2dict.block import Executor from jumeaux.models import Response, Res2DictAddOnPayload PATTERN1_BODY = """ [Module1] Name: Jumeaux License: MIT Version: 0.33.0 [Module2 alpha] Name: J...
28.522581
84
0.406243
c75729dda34f44378f1f02da98c296ce6020d9b8
720
py
Python
weibo/login/WeiboSearch.py
haiboz/weiboSpider
517cae2ef3e7bccd9e1d328a40965406707f5362
[ "Apache-2.0" ]
null
null
null
weibo/login/WeiboSearch.py
haiboz/weiboSpider
517cae2ef3e7bccd9e1d328a40965406707f5362
[ "Apache-2.0" ]
null
null
null
weibo/login/WeiboSearch.py
haiboz/weiboSpider
517cae2ef3e7bccd9e1d328a40965406707f5362
[ "Apache-2.0" ]
null
null
null
#encoding:utf8 ''' Created on 2016年4月11日 @author: wb-zhaohaibo ''' import re import json def sServerData(serverData): "Search the server time & nonce from server data" p = re.compile('\((.*)\)') jsonData = p.search(serverData).group(1) data = json.loads(jsonData) serverTime = str(d...
25.714286
59
0.613889
c78d99955e67deeb2e620ec322002ab6b93889ea
689
py
Python
exercises/pt/exc_02_14.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/exc_02_14.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/exc_02_14.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import json import spacy with open("exercises/pt/countries.json", encoding="utf8") as f: COUNTRIES = json.loads(f.read()) nlp = spacy.blank("pt") doc = nlp("A República Tcheca deve ajudar a Eslováquia a proteger seu espaço aéreo.") # Importar o PhraseMatcher e inicializá-lo from spacy.____ import ____ matcher =...
29.956522
85
0.750363
1be96298cc3d51bb4bedd0b7a44a6da10210454a
10,628
py
Python
algo/simplex.py
teastares/or_lab
c8fb5c22d31c1e2b93381397202be7b71a3fc796
[ "MIT" ]
1
2021-01-18T09:11:59.000Z
2021-01-18T09:11:59.000Z
algo/simplex.py
teastares/or_lab
c8fb5c22d31c1e2b93381397202be7b71a3fc796
[ "MIT" ]
null
null
null
algo/simplex.py
teastares/or_lab
c8fb5c22d31c1e2b93381397202be7b71a3fc796
[ "MIT" ]
null
null
null
""" This file defines the algorithms. Last edited by Teast Ares, 20190130. """ import itertools import numpy as np from util import * from constant import const class Simplex: """ Simplex method for solving linear programming. If model is not a LP, we will relax it to LP. paras: model: the o...
34.064103
142
0.665036
909efa8645242acf6bd1c290699feb5f896c38ba
1,917
py
Python
leetcode/005-Longest-Palindromic-Substring/LongPalSubstr_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2017-05-18T06:11:02.000Z
2017-05-18T06:11:02.000Z
leetcode/005-Longest-Palindromic-Substring/LongPalSubstr_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/005-Longest-Palindromic-Substring/LongPalSubstr_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
# @author: cchen # pretty long and should be simplified later class Solution: # @param {string} s # @return {string} def longestPalindrome(self, s): size = len(s) ls = [] ll = 0 rr = 0 l = 0 r = 0 maxlen = r - l + 1 for i in range(1, size): ...
28.191176
66
0.27856
46a0da48b68a91465765362d47177cf154fd8be0
1,313
py
Python
2020-09-02-1159-gma_istPrim.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
2020-09-02-1159-gma_istPrim.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
2020-09-02-1159-gma_istPrim.py
gmaubach/OOP-with-Python
9b059e911d55d616e756324564f1f2cc524aa53d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Sep 2 11:38:10 2020 @author: Georg Maubach Schreiben Sie eine Funktion istPrim(), die einen ganzzahligen Wert übergeben bekommt und die dann zurückliefert, ob der Wert eine Primzahl ist oder nicht. Definition Primzahl: - Zahl ist NUR durch 1 und durch sich selbs...
26.26
68
0.50495
b4431f07b1d304fb8d5b45e5a3617709b7e19e3c
9,983
py
Python
Python/pyBitwiseAutomation/SocketDevice.py
jimwaschura/Automation
f655feeea74ff22ebe44d8b68374ba6983748f60
[ "BSL-1.0" ]
null
null
null
Python/pyBitwiseAutomation/SocketDevice.py
jimwaschura/Automation
f655feeea74ff22ebe44d8b68374ba6983748f60
[ "BSL-1.0" ]
null
null
null
Python/pyBitwiseAutomation/SocketDevice.py
jimwaschura/Automation
f655feeea74ff22ebe44d8b68374ba6983748f60
[ "BSL-1.0" ]
null
null
null
# SocketDevice.py # ================================================================================ # BOOST SOFTWARE LICENSE # # Copyright 2020 BitWise Laboratories Inc. # Original Author.......Jim Waschura # Contact...............info@bitwiselabs.com # # Permission is hereby granted, free of charge, to any person or ...
34.424138
110
0.608234
6f2011e99aa153ea426797f4955466f84ec63854
1,492
py
Python
angstrom/2019/crypto/Eightball/server.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
angstrom/2019/crypto/Eightball/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
angstrom/2019/crypto/Eightball/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
import binascii import socketserver from Crypto.Random.random import choice from Crypto.Util.asn1 import DerSequence import benaloh answers = [ b'It is certain', b'It is decidedly so', b'Without a doubt', b'Yes definitely', b'You may rely on it', b'As I see it, yes', b'Most likely', b'Outlook good', ...
21.314286
59
0.69437
48fe19da112a00251dbf32baa059193efdd1efc1
1,358
py
Python
make_executible.py
Morgadow/Bierliste_K3.1
088806849affbbf5ea0b24fc0393a2308cd5b4aa
[ "MIT" ]
null
null
null
make_executible.py
Morgadow/Bierliste_K3.1
088806849affbbf5ea0b24fc0393a2308cd5b4aa
[ "MIT" ]
null
null
null
make_executible.py
Morgadow/Bierliste_K3.1
088806849affbbf5ea0b24fc0393a2308cd5b4aa
[ "MIT" ]
null
null
null
#!/usr/bin/python3.7 # -*- coding: utf-8 -*- import os import shutil from Bierliste_Tool import __version__ import time PROJECT_NAME = "Bierliste_Tool" print("Create .exe file for version: " + __version__) print("") if not os.path.exists(os.path.join("Executible", 'v' + __version__)): print("Prepa...
35.736842
147
0.659057
7daf21b74d8b5eb42cd09299049750ed974bcb1b
345
py
Python
数据结构/NowCode/41_rectCover.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
null
null
null
数据结构/NowCode/41_rectCover.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
3
2020-08-14T07:50:27.000Z
2020-08-14T08:51:06.000Z
数据结构/NowCode/41_rectCover.py
Blankwhiter/LearningNotes
83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0
[ "MIT" ]
2
2021-03-14T05:58:45.000Z
2021-08-29T17:25:52.000Z
# 矩形覆盖 class Solution: def rectCover(self, number): # write code here if number == 0: return 0 if number == 1: return 1 if number == 2: return 2 a = 1 b = 2 for i in range(3, number + 1): b = a + b a...
20.294118
38
0.394203
7defcf558669cbf65947bd91d6bd4823108f5d2b
696
py
Python
imwievaluation/semester.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
null
null
null
imwievaluation/semester.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
null
null
null
imwievaluation/semester.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
1
2019-10-19T10:11:17.000Z
2019-10-19T10:11:17.000Z
import sqlalchemy as db from sqlalchemy.dialects import mysql from sqlalchemy.orm import relationship from base import Base class Semester(Base): __tablename__ = 'semester' id = db.Column(db.Integer, primary_key=True) term = db.Column(mysql.ENUM('WS', 'SS'), nullable=False) year = db.Column(mysql.YEA...
26.769231
65
0.689655
817a55f51bbc9d8522c0a10c412685bf4172baed
722
py
Python
leetcode/092-Reverse-Linked-List-II/RevLinkedListII_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/092-Reverse-Linked-List-II/RevLinkedListII_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/092-Reverse-Linked-List-II/RevLinkedListII_001.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: # @param {ListNode} head # @param {integer} m # @param {integer} n # @return {ListNode} def reverseBetween(self, head, m, n): dumpy = ListNode(0) ...
21.878788
41
0.470914
81bf6bf890fef439f92ad73919a95ca7433af382
272
py
Python
Licence 2/I33/TP 1/ex_9.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 2/I33/TP 1/ex_9.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 2/I33/TP 1/ex_9.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
def tri_bulle(L): pointer = 0 while pointer < len(L): left = 0 right = 1 while right < len(L) - pointer: if L[right] < L[left]: L[left], L[right] = L[right], L[left] left += 1 right += 1 pointer += 1 return L print(tri_bulle([8, -1, 2, 5, 3, -2]))
19.428571
41
0.551471
b50fe49d8324b7d77943ea9dcfcba3e2f0c0b5be
251
py
Python
Packs/CommonScripts/Scripts/LastArrayElement/LastArrayElement.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/LastArrayElement/LastArrayElement.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/LastArrayElement/LastArrayElement.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto def main(): value = demisto.args()['value'] if type(value) is list and len(value) > 0: value = value[-1] demisto.results(value) if __name__ == "__builtin__" or __name__ == "builtins": main()
16.733333
55
0.621514
d280380ee06ad6e8b6080dcc93810f12c6802282
832
py
Python
Course_1/Week_03/MyQuickSort.py
KnightZhang625/Stanford_Algorithm
7dacbbfa50e7b0e8380cf500df24af60cb9f42df
[ "Apache-2.0" ]
null
null
null
Course_1/Week_03/MyQuickSort.py
KnightZhang625/Stanford_Algorithm
7dacbbfa50e7b0e8380cf500df24af60cb9f42df
[ "Apache-2.0" ]
1
2020-07-16T08:03:22.000Z
2020-07-16T08:09:34.000Z
Course_1/Week_03/MyQuickSort.py
KnightZhang625/Stanford_Algorithm
7dacbbfa50e7b0e8380cf500df24af60cb9f42df
[ "Apache-2.0" ]
null
null
null
import random def MySwap(MyArray,i,j): temp = MyArray[i] MyArray[i] = MyArray[j] MyArray[j] = temp def MyQuickSort(MyArray,left,right): if left == right: return random.seed() pivot = random.randint(left,right) MySwap(MyArray,left,pivot) i = left+1 # first element in the right...
25.212121
79
0.604567