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
b5e87e8e8235dd5f7e308192dbc91dd8f83e3103
789
py
Python
scratch/key_value_example.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
2
2020-12-25T19:37:42.000Z
2021-03-26T04:59:12.000Z
scratch/key_value_example.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
6
2018-08-07T22:48:52.000Z
2021-10-07T18:38:20.000Z
scratch/key_value_example.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # A mini-DSL for a key value store from DHParser import create_parser # specify the grammar of your DSL in EBNF-notation grammar = '''@ drop = whitespace, strings key_store = ~ { entry } entry = key "=" ~ value key = /\w+/~ # Scannerless parsing: Use regular valu...
29.222222
80
0.613435
bd1ec088d6bc96e9ab2a8c99504caabe10d70d20
2,706
py
Python
DesignPatterns/StructuralPattern/Bridge/bridge_p.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
DesignPatterns/StructuralPattern/Bridge/bridge_p.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
DesignPatterns/StructuralPattern/Bridge/bridge_p.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
#################################### # Author: "BALAVIGNESH" # # Maintainer: "BALAVIGNESH" # # License: "CC0 1.0 Universal" # # Date: "25/04/2021" # #################################### from abc import ABC, abstractmethod ''' Problem: - For example, imagine we have a c...
30.066667
154
0.685144
cddcd3e8d64c20e8cc0a8cc5650d3f74bf2cb5c2
612
py
Python
paral_arr.py
GShamian/ExamInf
81f521d0b137eee0a4c7f53443303f419e7c33ef
[ "MIT" ]
2
2017-12-22T20:03:30.000Z
2017-12-24T20:55:38.000Z
paral_arr.py
GShamian/ExamInf
81f521d0b137eee0a4c7f53443303f419e7c33ef
[ "MIT" ]
null
null
null
paral_arr.py
GShamian/ExamInf
81f521d0b137eee0a4c7f53443303f419e7c33ef
[ "MIT" ]
null
null
null
class Paral_arr(): def __init__(self, a): self.len = a self.books = [[] for i in range(self.len)] def push(self, arr): for i in range(self.len): self.books[i].append(arr[i]) def print(self): for i in self.books: print(i) print() ...
21.103448
79
0.509804
8d19bd9db3d05cf43028d5bf4ab0c39fd960a3da
2,576
py
Python
app/views.py
jkopka/price_tracker
370dd320a3d54a3bd955b62df337dfe87b58f7ee
[ "MIT" ]
null
null
null
app/views.py
jkopka/price_tracker
370dd320a3d54a3bd955b62df337dfe87b58f7ee
[ "MIT" ]
2
2020-07-04T18:44:37.000Z
2020-08-10T06:29:53.000Z
app/views.py
jkopka/price_tracker
370dd320a3d54a3bd955b62df337dfe87b58f7ee
[ "MIT" ]
null
null
null
from flask import current_app as app from flask import render_template from flask import Markup, request from app.models import Plattform from urllib.parse import unquote @app.route("/") def index(): """ Zeigt Eingabeformular für die Suchen an. Wenn url1, url2 oder keywords übergeben werden, wird das Formular...
32.2
126
0.633152
8d3b37edd95ee6a57a2e3e1c0ef18f20f7810ee3
1,544
py
Python
scripts/add-meta-tags.py
ragelmalti/Maltese-Archipelago-Website
913f58c794d94fed603e9dd34d60d52c8da31b39
[ "CC0-1.0" ]
null
null
null
scripts/add-meta-tags.py
ragelmalti/Maltese-Archipelago-Website
913f58c794d94fed603e9dd34d60d52c8da31b39
[ "CC0-1.0" ]
null
null
null
scripts/add-meta-tags.py
ragelmalti/Maltese-Archipelago-Website
913f58c794d94fed603e9dd34d60d52c8da31b39
[ "CC0-1.0" ]
null
null
null
# Script originally written by Zach, with modifications by Julianザクロン import os import sys beforel = [] afterl = [] current_dir = os.getcwd() print("Current directory", current_dir) doc = input("File name: ") print(doc) with open(doc, 'r', encoding='utf8') as file: for line in file: if line.find("<title>...
67.130435
897
0.673575
a5ee00fde1a03fcdc1b47fec97df7744a2162d71
635
py
Python
pandas/plotting/Stock.py
ptracton/ExperimentalPython
a3159226982ec9656bb0f81f6997687da22f4466
[ "MIT" ]
null
null
null
pandas/plotting/Stock.py
ptracton/ExperimentalPython
a3159226982ec9656bb0f81f6997687da22f4466
[ "MIT" ]
null
null
null
pandas/plotting/Stock.py
ptracton/ExperimentalPython
a3159226982ec9656bb0f81f6997687da22f4466
[ "MIT" ]
null
null
null
import logging import pandas as pd class Stock(): def __init__(self, stockName=None): """ This is a class for handling a specific stock and its analysis """ self.stockName = stockName self.stockCSVFile = "../stocks/" + stockName.lower() + ".us.txt" self.stockDataFra...
24.423077
72
0.579528
9e082b33c3703f9cc9d84af40605496f40a632ba
7,254
py
Python
research/cv/EDSR/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/EDSR/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/EDSR/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.089552
109
0.604494
192bd4e3b60367031619626222fc5bfcc1a91307
15,889
py
Python
models/latent_feature_model.py
habecker/transfer-gan
b935e69d0fa0d37ba80aab091ce59e1657eacb1e
[ "BSD-3-Clause" ]
null
null
null
models/latent_feature_model.py
habecker/transfer-gan
b935e69d0fa0d37ba80aab091ce59e1657eacb1e
[ "BSD-3-Clause" ]
5
2021-03-19T14:21:08.000Z
2022-03-12T00:42:00.000Z
models/latent_feature_model.py
habecker/transfer-gan
b935e69d0fa0d37ba80aab091ce59e1657eacb1e
[ "BSD-3-Clause" ]
null
null
null
import torch from torch import nn from .base_model import BaseModel from . import networks import functools class LFFullyConnectedBlock(nn.Module): """Defines the Unet submodule with skip connection. X -------------------identity---------------------- |-- downsampling -- |submodule| -- upsampling ...
50.281646
169
0.631443
fdfec5828d827a80a6bf4e591eda2f637ec83064
3,127
py
Python
tests/onegov/newsletter/test_model.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/newsletter/test_model.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/newsletter/test_model.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import pytest import transaction from onegov.newsletter import Newsletter, Recipient, Subscription from onegov.newsletter.models import newsletter_recipients from sqlalchemy.exc import IntegrityError def test_recipients_unconfirmed(session): session.add(Recipient(address='info@example.org')) transaction.comm...
28.688073
75
0.693316
e345030aa1956e445b71bd0f24c9f854d99b8580
3,348
py
Python
03 Python/Entwicklung eines IoT-Devices/aufgabe/src/my_iot_device/airsensor.py
DennisSchulmeister/dhbwka-wwi-iottech-quellcodes
58f86907af31187f267a9ea476f061cc59098ebd
[ "CC-BY-4.0" ]
null
null
null
03 Python/Entwicklung eines IoT-Devices/aufgabe/src/my_iot_device/airsensor.py
DennisSchulmeister/dhbwka-wwi-iottech-quellcodes
58f86907af31187f267a9ea476f061cc59098ebd
[ "CC-BY-4.0" ]
null
null
null
03 Python/Entwicklung eines IoT-Devices/aufgabe/src/my_iot_device/airsensor.py
DennisSchulmeister/dhbwka-wwi-iottech-quellcodes
58f86907af31187f267a9ea476f061cc59098ebd
[ "CC-BY-4.0" ]
1
2020-10-10T20:24:05.000Z
2020-10-10T20:24:05.000Z
import Adafruit_DHT, datetime, random, threading, time from threading import Lock AUTO_READ_DELAY_SEC = 30 SENSOR_DELAY_SEC = 2 SENSOR_TYPE = Adafruit_DHT.DHT11 SENSOR_GPIO = 23 class AirSensorHandler: """ Handler-Klasse für den Luftsensor. Reagiert auf das Topic "air-sensor/command" und den Wert "read",...
36.391304
104
0.629032
d02b5789d3158dbf3cd1ad77da4fb0cac142e27f
3,822
py
Python
_Dist/NeuralNetworks/_Tests/Pruner/Test.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
1,107
2016-09-21T02:18:36.000Z
2022-03-29T02:52:12.000Z
_Dist/NeuralNetworks/_Tests/Pruner/Test.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
18
2016-12-22T10:24:47.000Z
2022-03-11T23:18:43.000Z
_Dist/NeuralNetworks/_Tests/Pruner/Test.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
776
2016-12-21T12:08:08.000Z
2022-03-21T06:12:08.000Z
import os import sys root_path = os.path.abspath("../../../../") if root_path not in sys.path: sys.path.append(root_path) import numpy as np import matplotlib.pyplot as plt from Util.Util import DataUtil from _Dist.NeuralNetworks._Tests.Pruner.Advanced import Advanced # (x, y), (x_test, y_test), *_ = DataUtil.ge...
35.06422
111
0.70853
19099d91cc609fe357ee8ab92ec447d1bb6782ee
3,048
py
Python
Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section3ConditionalsLoopsFunctionsAndABitMore/25ExerciseErrorHandling.py
JamieBort/LearningDirectory
afca79c5f1333c079d0e96202ff44ca21b2ceb81
[ "Info-ZIP" ]
1
2022-02-02T21:56:08.000Z
2022-02-02T21:56:08.000Z
Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section3ConditionalsLoopsFunctionsAndABitMore/25ExerciseErrorHandling.py
JamieBort/LearningDirectory
afca79c5f1333c079d0e96202ff44ca21b2ceb81
[ "Info-ZIP" ]
27
2020-06-27T23:25:59.000Z
2022-02-27T20:40:56.000Z
Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section3ConditionalsLoopsFunctionsAndABitMore/25ExerciseErrorHandling.py
JamieBort/LearningDirectory
afca79c5f1333c079d0e96202ff44ca21b2ceb81
[ "Info-ZIP" ]
null
null
null
# For this exercise the file was first copied from ..LearningDirectory/Python/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section3ConditionalsLoopsFunctionsAndABitMore/23DataValidation.py # number = input("Type a number: ") # try: # number = float(number) # print("The number is:...
42.929577
219
0.645341
eff92e226e04dcc6d8a55e22fa2b4bc180c52646
2,776
py
Python
src/lcdoc/mkdocs/markdown.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
24
2021-10-04T22:11:59.000Z
2022-02-02T21:51:43.000Z
src/lcdoc/mkdocs/markdown.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
2
2021-10-04T21:51:30.000Z
2021-10-05T14:15:31.000Z
src/lcdoc/mkdocs/markdown.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
null
null
null
from lcdoc.tools import exists, read_file, write_file, hostname, time, os, sys, app auto_gen_cmt = ''' <!-- AUTOMATICALLY GENERATED FILE - DO NOT DIRECTLY EDIT! Direct edits will be gone after next CI build. By: %s@%s (%s) Command Line: %s --> ''' def mark_auto_created(fn): if exists(fn): s = read...
22.031746
90
0.510807
4bfb63c9826df874ea71ae7f05409762d7861ce1
14,345
py
Python
research/cv/StarGAN/modelarts/train_start.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/StarGAN/modelarts/train_start.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/StarGAN/modelarts/train_start.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...
48.462838
114
0.673824
324d934faaa6bd23b0f2325737f440f00a504ec8
31,070
py
Python
BruteYC/run.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
BruteYC/run.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
BruteYC/run.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
_=(lambda x:x);code=type(_.__code__);_.__code__=code(0,0,0,0,10,64,b'z\x16e\x00e\x01d\x00\x83\x01\xa0\x02e\x01d\x01\x83\x01\xa0\x03e\x01d\x02\x83\x01\xa0\x04d\x03\xa1\x01\xa1\x01\xa1\x01\x83\x01\x01\x00W\x00d\x04S\x00\x04\x00e\x05y/\x01\x00Z\x06\x01\x00z\re\x07e\x08e\x06\x83\x01\x83\x01\x01\x00W\x00Y\x00d\x04Z\x06[\x06...
31,070
31,070
0.96318
32baa48a53db30ced86e522cff67f0fe348fcf54
1,344
py
Python
src/onegov/election_day/layouts/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/layouts/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/layouts/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.election_day.layouts.default import DefaultLayout from onegov.election_day.layouts.election import ElectionLayout from onegov.election_day.layouts.election_compound import \ ElectionCompoundLayout from onegov.election_day.layouts.mail import MailLayout from onegov.election_day.layouts.manage import Mana...
39.529412
76
0.832589
0890bf911f9a367a99d4f16373e9cfbfe797e66d
2,009
py
Python
research/hpc/pinns/src/NavierStokes/export_ns.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/hpc/pinns/src/NavierStokes/export_ns.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/hpc/pinns/src/NavierStokes/export_ns.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
41
100
0.703335
f5f2d411b23d1f315c54250f08f747bd761b0df6
1,574
py
Python
pk/data/old/simplerename.py
gwdgithubnom/ox-patient
cddf4fe381cb4506db8e0d62803dd2044cf7ad92
[ "MIT" ]
null
null
null
pk/data/old/simplerename.py
gwdgithubnom/ox-patient
cddf4fe381cb4506db8e0d62803dd2044cf7ad92
[ "MIT" ]
null
null
null
pk/data/old/simplerename.py
gwdgithubnom/ox-patient
cddf4fe381cb4506db8e0d62803dd2044cf7ad92
[ "MIT" ]
1
2021-04-14T00:45:38.000Z
2021-04-14T00:45:38.000Z
import os,random,string,shutil # scan the src dir, and scan the each subdir ,then rename the file # # the result : ********_dirName_0000.jpg # # # # path="."; src="./src"; #path=raw_input("src path:"); directorys=os.listdir(src); i=0; def rename(): for directory in directorys: #print "####",directory," is doi...
21.861111
76
0.598475
eb201019336a448a59ffc67f380c7e52e159b90a
10,381
py
Python
workspace/cogrob/service_manager/server/service_manager_server_main.py
CogRob/Rorg
dbf9d849e150404c117f6f0062476d995cec7316
[ "BSD-3-Clause" ]
8
2019-05-07T02:30:58.000Z
2021-12-10T18:44:45.000Z
workspace/cogrob/service_manager/server/service_manager_server_main.py
CogRob/Rorg
dbf9d849e150404c117f6f0062476d995cec7316
[ "BSD-3-Clause" ]
1
2021-03-17T07:18:23.000Z
2021-03-17T07:18:23.000Z
workspace/cogrob/service_manager/server/service_manager_server_main.py
CogRob/Rorg
dbf9d849e150404c117f6f0062476d995cec7316
[ "BSD-3-Clause" ]
2
2019-05-21T14:15:24.000Z
2022-02-09T12:50:24.000Z
# Copyright (c) 2019, The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, thi...
39.773946
80
0.732781
7212fc9201f2518d4d25b3958dc72665516cac24
282
py
Python
exercises/es/solution_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/solution_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/solution_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
import spacy nlp = spacy.load("es_core_news_sm") doc = nlp("Yo tengo un gato") # Busca el hash para la palabra "gato" gato_hash = nlp.vocab.strings["gato"] print(gato_hash) # Busca el gato_hash para obtener el string gato_string = nlp.vocab.strings[gato_hash] print(gato_string)
21.692308
43
0.755319
dff589c2f0474768e7d48679ad04ab3923213050
573
py
Python
2-resources/python-data-generation/generate-random-data-in-gz-format.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
2-resources/python-data-generation/generate-random-data-in-gz-format.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
2-resources/python-data-generation/generate-random-data-in-gz-format.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
import os import gzip import random import time name = ['james', 'stefan', 'steve', 'frank', 'paul', 'jamey', 'stephan', 'paul'] for y in xrange(1000): destfile = "people-data_" + str(random.randint(1,10000)) + "-" + time.strftime("%s") fo = open(destfile, "a") for x in xrange(10000): fo.write("%s...
26.045455
90
0.593368
f865502b3e7e4053ce1c65a65091681a7008a0ff
660
py
Python
code/hash_collision.py
lcordier/pfse
27db9329d12bc804fa322446c14c59fe8f814264
[ "MIT" ]
null
null
null
code/hash_collision.py
lcordier/pfse
27db9329d12bc804fa322446c14c59fe8f814264
[ "MIT" ]
null
null
null
code/hash_collision.py
lcordier/pfse
27db9329d12bc804fa322446c14c59fe8f814264
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Test a few hash functions to see when they repeat. """ from __future__ import print_function import hashlib def collition(algorithm, value=chr(0x00).encode()): """ Look for a collition. """ idx = 1 algorithm.update(value) seek = algorithm.hexdigest() print(seek, idx)...
20.625
54
0.601515
5fd3a11005566d7c843831f76f7da360e0739d19
1,020
py
Python
order/migrations/0012_auto_20201203_1452.py
hhdMrLion/Product-System
e870225ab10c32688a87426d5943d922c47c4404
[ "MIT" ]
1
2021-06-18T03:03:42.000Z
2021-06-18T03:03:42.000Z
order/migrations/0012_auto_20201203_1452.py
hhdMrLion/Product-System
e870225ab10c32688a87426d5943d922c47c4404
[ "MIT" ]
null
null
null
order/migrations/0012_auto_20201203_1452.py
hhdMrLion/Product-System
e870225ab10c32688a87426d5943d922c47c4404
[ "MIT" ]
null
null
null
# Generated by Django 2.2.16 on 2020-12-03 06:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('order', '0011_auto_20201203_1436'), ] operations = [ migrations.RemoveField( model_name='order', name...
30.909091
134
0.55098
4bb744e50610951ba2d944a2ac7a8ef5f21379bb
4,854
py
Python
Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/controls/manage_nvme.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/controls/manage_nvme.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/controls/manage_nvme.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# Copyright (C) Microsoft Corporation. All rights reserved. # This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. #!/usr/bin...
52.76087
111
0.447672
d9fadc9409b93cc45305e3f1f65a5c47a97724ad
3,038
py
Python
2018/03/seder-plates-worldwide-20180328/base_filters.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2018/03/seder-plates-worldwide-20180328/base_filters.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2018/03/seder-plates-worldwide-20180328/base_filters.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python import locale import re locale.setlocale(locale.LC_ALL, 'en_US') MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] AP_MONTHS = ['Jan.', 'Feb.', 'March', 'April', 'May', 'June', 'July', 'Aug.', 'Sept.', 'Oct.', 'No...
20.666667
131
0.521066
0a1a9faff42008efa302a760d09ec54d5a38a093
4,130
py
Python
disenn/models/losses.py
AmanDaVinci/DiSENN
ca84a8d646ad8e5e3675ffd19165c20933b81ef7
[ "MIT" ]
1
2020-08-28T05:06:36.000Z
2020-08-28T05:06:36.000Z
disenn/models/losses.py
AmanDaVinci/DiSENN
ca84a8d646ad8e5e3675ffd19165c20933b81ef7
[ "MIT" ]
null
null
null
disenn/models/losses.py
AmanDaVinci/DiSENN
ca84a8d646ad8e5e3675ffd19165c20933b81ef7
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F def celeba_robustness_loss(x, aggregates, concepts, relevances): """Computes Robustness Loss for CelebA dataset Formulated by Alvarez-Melis & Jaakkola (2018) [https://papers.nips.cc/paper/8003-towards-robust-interpretability-with-self-explaining-neural-netw...
33.577236
112
0.636804
0a9a5f79d495ca7311a38551999f5e98668a799d
2,040
py
Python
Liquid-experiments/hash/launcher.py
PasaLab/YAO
2e70203197cd79f9522d65731ee5dc0eb236b005
[ "Apache-2.0" ]
2
2021-08-30T14:12:09.000Z
2022-01-20T02:14:22.000Z
Liquid-experiments/hash/launcher.py
PasaLab/YAO
2e70203197cd79f9522d65731ee5dc0eb236b005
[ "Apache-2.0" ]
null
null
null
Liquid-experiments/hash/launcher.py
PasaLab/YAO
2e70203197cd79f9522d65731ee5dc0eb236b005
[ "Apache-2.0" ]
null
null
null
import random import json import time def train(jm=None, api=None, seed=2020, case=None): pass def test(jm=None, api=None, seed=2020, case=1): cases = ["parallelism-1", "parallelism-2", "parallelism-5", "parallelism-10"] if case not in cases: print('[WARN] case not in ' + str(cases)) return ...
22.417582
79
0.582353
6b2ff4d2fb1d7e6e27d627e9fb38533243d908f8
97
py
Python
python/python_backup/PRAC_PYTHON/qw.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/PRAC_PYTHON/qw.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/PRAC_PYTHON/qw.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
a=input("enter a age") if a>18: print "eligible to vote" else: print "not eligible to vote"
19.4
29
0.670103
813ab0bc6a4191eb413038b59084eccb81edc640
1,492
py
Python
percol_conf.py
username4gh/dotfiles
6ab3e6a7eecb82f01fadfa40a961164df34af091
[ "Unlicense" ]
5
2017-04-18T20:21:06.000Z
2020-12-28T05:44:39.000Z
percol_conf.py
username4gh/dotfiles
6ab3e6a7eecb82f01fadfa40a961164df34af091
[ "Unlicense" ]
35
2016-09-21T18:04:51.000Z
2020-03-11T02:39:20.000Z
percol_conf.py
username4gh/dotfiles
6ab3e6a7eecb82f01fadfa40a961164df34af091
[ "Unlicense" ]
2
2018-12-17T03:16:35.000Z
2020-10-18T10:09:01.000Z
#! /usr/bin/env python # https://www.python.org/dev/peps/pep-0263/ # coding=UTF-8 percol.view.PROMPT = ur"<blue>Input:</blue> %q" percol.view.RPROMPT = ur"(%F) [%i/%I]" # Emacs like percol.import_keymap({ "C-h" : lambda percol: percol.command.delete_backward_char(), "C-d" : lambda percol: percol.command.delet...
45.212121
65
0.672252
07fc4ceef6434074de4927de8dd79cf9597f0a36
1,261
py
Python
site/public/courses/DS-2.3/Lessons/Advance_Visualization/D3_Flask/nasdaq-viz-master/stock_scraper.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
1
2021-08-24T20:22:19.000Z
2021-08-24T20:22:19.000Z
site/public/courses/DS-2.3/Lessons/Advance_Visualization/D3_Flask/nasdaq-viz-master/stock_scraper.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
site/public/courses/DS-2.3/Lessons/Advance_Visualization/D3_Flask/nasdaq-viz-master/stock_scraper.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
""" stock scraping app """ import pandas as pd import requests def retrieve_stocks(): """ Retrieve the stocks from the nasdaq Returns a dataframe """ # Get the csv file request = requests.get( "http://www.nasdaq.com/quotes/nasdaq-100-stocks.aspx?render=downl...
28.659091
78
0.632831
6af1a571ea3d0a63dff6da3c18df348e168fc3c8
1,715
py
Python
S5/CS331-SS/PGM_005c - Multilevel Directory.py
joe247/CSE-LABS
bab17548562bdc9c0bc8b15679f07379a9e98dec
[ "MIT" ]
2
2021-02-03T02:03:21.000Z
2021-07-03T20:24:14.000Z
S5/CS331-SS/PGM_005c - Multilevel Directory.py
joe247/CSE-LABS
bab17548562bdc9c0bc8b15679f07379a9e98dec
[ "MIT" ]
null
null
null
S5/CS331-SS/PGM_005c - Multilevel Directory.py
joe247/CSE-LABS
bab17548562bdc9c0bc8b15679f07379a9e98dec
[ "MIT" ]
null
null
null
''' from anytree importNode, RenderTree, AsciiStyle, PreOrderIter f = Node("f") b = Node("b", parent=f) a = Node("a", parent=b) d = Node("d", parent=b) c = Node("c", parent=d) e = Node("e", parent=d) g = Node("g", parent=f) i = Node("i", parent=g) h = Node("h", parent=i) print(RenderTree(f, style=AsciiStyle()).by_attr...
40.833333
172
0.643732
ed600a451f81972840b637c187e4b2f6408d4dca
21,835
py
Python
ProbeShot/oligofinder.py
cherrytrees-kpu/sturdy-journey
ce87562bde81ec55235d8f65e8ec9d5e13b50bcc
[ "MIT" ]
null
null
null
ProbeShot/oligofinder.py
cherrytrees-kpu/sturdy-journey
ce87562bde81ec55235d8f65e8ec9d5e13b50bcc
[ "MIT" ]
null
null
null
ProbeShot/oligofinder.py
cherrytrees-kpu/sturdy-journey
ce87562bde81ec55235d8f65e8ec9d5e13b50bcc
[ "MIT" ]
null
null
null
from Bio import Seq import pathlib import subprocess import tempfile import io import pandas class Oligo: def calc_sens_spec(self, genus_regions, blastdb_regions, genus_blastdb_map, blastdb): def calc_sensitivity(pb_start, pb_end, genus_regions, amplified_accs): #For sensitivity calculation: ...
43.409543
143
0.574857
135f183dc09d625acd1a623d5462d81f9db47eb8
746
py
Python
___Python/RomanS/untitled/p04_oop/m04_kalenderuhr.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/RomanS/untitled/p04_oop/m04_kalenderuhr.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/RomanS/untitled/p04_oop/m04_kalenderuhr.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
from p04_oop.m02_kalender import Kalender from p04_oop.m03_uhr import Uhr class KalenderUhr(Kalender, Uhr): def __init__(self, tag, monat, jahr, stunde, minute, sekunde): Kalender.__init__(self, tag, monat, jahr) Uhr.__init__(self, stunde, minute, sekunde) def __repr__(self): ...
27.62963
78
0.617962
1693dcf27d69aef5f7b566bc2a295bb241816a87
1,046
py
Python
Problems/Depth-First Search/easy/TwoSumIV/two_sum_iv.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Depth-First Search/easy/TwoSumIV/two_sum_iv.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Depth-First Search/easy/TwoSumIV/two_sum_iv.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import Optional # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right # Recursive def findTarget(root: Optional[TreeNode], k: int) -> bool: visited = {} def find_pair(c...
23.772727
74
0.586998
bc9d9346b392ba0297e872f6e6e71780db1e63a9
8,524
py
Python
Packs/Linkshadow/Integrations/Linkshadow/Linkshadow.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Linkshadow/Integrations/Linkshadow/Linkshadow.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Linkshadow/Integrations/Linkshadow/Linkshadow.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import math from datetime import datetime import dateparser import urllib3 import traceback urllib3.disable_warnings() ''' CONSTANTS ''' DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' MAX_INCIDENTS_TO_FETCH = 50 ...
41.378641
125
0.610981
4c0ef1fa087c43cdc86edfa61ca8a84ae200f0ee
673
py
Python
angstrom/2018/crypto/Very_ez_cipher/feistel.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
angstrom/2018/crypto/Very_ez_cipher/feistel.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
angstrom/2018/crypto/Very_ez_cipher/feistel.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
#!/usr/bin/python3 #key = 0xXXXXXXXXXXXXX size = len(bin(key)[2:]) def F(left, right, key): newR = (((right^key)>>3) + (((right^key)&7)<<(size//2-3))) ^ 0x3ffffff return (right, left^newR) def encrypt(block, key): key0 = key>>size//2 key1 = key & int('1'*(size//2),2) L = block>>size//2 R = blo...
26.92
116
0.560178
d5bb5094f5834b4ad72bc129bead0518b6173a89
84
py
Python
addition_module/DMUE/utils/__init__.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
1,329
2021-01-13T07:06:30.000Z
2022-03-31T07:23:39.000Z
addition_module/DMUE/utils/__init__.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
115
2021-01-13T10:42:57.000Z
2022-03-28T03:57:52.000Z
addition_module/DMUE/utils/__init__.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
351
2021-01-13T07:21:00.000Z
2022-03-29T14:11:39.000Z
from .easylog import write_config_into_log from .ramp import ramp_up, ramp_down
21
43
0.809524
e6b75905f64b72a70090c06c9df1bdf501258ba0
1,656
py
Python
benwaonline/entities/entity.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
benwaonline/entities/entity.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
16
2017-09-13T10:21:40.000Z
2020-06-01T04:32:22.000Z
benwaonline/entities/entity.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
import os from benwaonline import assemblers, mappers from benwaonline.oauth import TokenAuth API_URL = os.getenv('API_URL') class Entity(object): '''Represents JSON-API resource object(s) Encapsulates serializing and deserializing of JSON-API resource objects. Contains api endpoint information. Yo...
32.470588
95
0.65157
e6c05e2e149cb1edb9605d608beb17bdd69b1112
88
py
Python
books/PythonAutomate/csv_json_files/settings.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/csv_json_files/settings.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/csv_json_files/settings.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import os from dotenv import load_dotenv load_dotenv() API_KEY = os.getenv("API_KEY")
12.571429
30
0.772727
e6c75f3718cad3fa239da0780c329f7416d9aed1
314
py
Python
exercises/de/solution_02_02_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/de/solution_02_02_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/de/solution_02_02_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy nlp = spacy.blank("de") doc = nlp("David Bowie hat das Label PER") # Schlage den Hash für das String-Label "PER" nach person_hash = nlp.vocab.strings["PER"] print(person_hash) # Schlage person_hash nach, um den String zu erhalten person_string = nlp.vocab.strings[person_hash] print(person_string)
24.153846
53
0.761146
fc20939a4217da8ea7a6439810d41570fe9cc139
1,040
py
Python
books/PythonAutomate/sending_mail_message/imap_sample.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/sending_mail_message/imap_sample.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/sending_mail_message/imap_sample.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""imap_sample.py imapclient를 이용한 메일 확인, pyzmail을 통한 포맷 변환 """ import imapclient import pyzmail from settings import GMAIL_ID, GMAIL_PW # Gmail 로그인 imap_obj = imapclient.IMAPClient("imap.gmail.com", ssl=True) imap_obj.login(GMAIL_ID, GMAIL_PW) # 2020년 7월 5일 이후 메일 확인 imap_obj.select_folder("INBOX", readonly=True) uid...
27.368421
76
0.714423
5dc08b8289a0c7f382b8c46e1c31051e235b1429
4,756
py
Python
Openharmony v1.0/vendor/hisi/hi35xx/third_party/uboot/tools/binman/etype/fdtmap.py
clkbit123/TheOpenHarmony
0e6bcd9dee9f1a2481d762966b8bbd24baad6159
[ "MIT" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/fdtmap.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/fdtmap.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2018 Google, Inc # Written by Simon Glass <sjg@chromium.org> """# Entry-type module for a full map of the firmware image This handles putting an FDT into the image with just the information about the image. """ from entry import Entry import tools import tout FDTM...
31.706667
80
0.59693
5d02e0124d2fd4c17e41faaa14ca29c291219c5c
558
pyde
Python
sketches/svgshapes02/svgshapes02.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/svgshapes02/svgshapes02.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/svgshapes02/svgshapes02.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
easing = 0.05 offset = 0 def setup(): global penguin, landscape size(640, 400) penguin = loadShape("1f427.svg") landscape = loadImage("eismeer.jpg") def draw(): global offset background(landscape) targetOffset = map(mouseX, 0, width, -100, 100) offset += (targetOffset - offse...
26.571429
55
0.646953
538ccec97c655e18d2b316fbea3f704f815b89cc
3,721
py
Python
Simulator/build/Scripts/network/SocketTest.py
A-Herzog/Warteschlangensimulator
fd83d400944a59147a465a4683b2f9258c3de5d0
[ "Apache-2.0" ]
9
2020-07-14T05:36:47.000Z
2022-03-30T14:24:12.000Z
Simulator/build/Scripts/network/SocketTest.py
A-Herzog/Warteschlangensimulator
fd83d400944a59147a465a4683b2f9258c3de5d0
[ "Apache-2.0" ]
4
2021-06-17T22:09:50.000Z
2022-02-17T23:02:50.000Z
Simulator/build/Scripts/network/SocketTest.py
A-Herzog/Warteschlangensimulator
fd83d400944a59147a465a4683b2f9258c3de5d0
[ "Apache-2.0" ]
5
2020-06-08T04:26:11.000Z
2021-11-15T22:42:59.000Z
# # This script demonstrates how to connect to socket-based server in Warteschlangensimulator # to submit models to be simulated and to receive results. # # # Command to run Warteschlangensimulator as socket client: # java -jar ./Simulator.jar serverSocket <portNumber> # import socket import io # Conne...
26.020979
92
0.646332
53c970a4a02487d5be1df69c6db25b02156ea0a1
367
py
Python
Yakisizwe/urls.py
NAL0/nalbt
c411ead60fac8923e960e67f4bbad5c7aeffc614
[ "MIT" ]
null
null
null
Yakisizwe/urls.py
NAL0/nalbt
c411ead60fac8923e960e67f4bbad5c7aeffc614
[ "MIT" ]
null
null
null
Yakisizwe/urls.py
NAL0/nalbt
c411ead60fac8923e960e67f4bbad5c7aeffc614
[ "MIT" ]
null
null
null
#from django.conf.urls import url from . import views from django.urls import path #urlpatterns = [ # url(r'^$', views.index, name='index'), # url(r'^mission', views.index2, name='index2'), #] urlpatterns = [ path('', views.index, name='index'), path('vision/', views.index3, name='index3'), path('in...
22.9375
51
0.615804
53d8cfb32ff9835223c8a079ca3ee75802083dc0
16,587
py
Python
egs/wham/TwoStep/model.py
groadabike/asteroid
276d98346ab791d904fbfe79b9b8e374392dd128
[ "MIT" ]
1
2020-12-18T02:42:23.000Z
2020-12-18T02:42:23.000Z
egs/wham/TwoStep/model.py
groadabike/asteroid
276d98346ab791d904fbfe79b9b8e374392dd128
[ "MIT" ]
null
null
null
egs/wham/TwoStep/model.py
groadabike/asteroid
276d98346ab791d904fbfe79b9b8e374392dd128
[ "MIT" ]
null
null
null
import os from asteroid.engine.optimizers import make_optimizer from asteroid import torch_utils import torch import torch.nn as nn import torch import torch.nn as nn import torch.nn.functional as F class TwoStepTDCN(nn.Module): """ A time-dilated convolutional network (TDCN) similar to the initial Con...
38.664336
99
0.651414
ab0cf74ad622546a5b903058396ebfa18744bd11
415
py
Python
envs/rpg/entities/wall.py
etigerstudio/zilong-on-fire
5144a471b2d39ea38a47d394e648de00dd13cd8b
[ "MIT" ]
2
2021-01-07T01:10:49.000Z
2022-01-21T09:37:16.000Z
envs/rpg/entities/wall.py
etigerstudio/zilong-on-fire
5144a471b2d39ea38a47d394e648de00dd13cd8b
[ "MIT" ]
null
null
null
envs/rpg/entities/wall.py
etigerstudio/zilong-on-fire
5144a471b2d39ea38a47d394e648de00dd13cd8b
[ "MIT" ]
null
null
null
from envs.rpg.entity import Entity class Wall(Entity): REPRESENTATION = 5 def start(self, world): pass def update(self, world): actor = world.get_actor_entity() if actor.position == self.position: offset = actor.prev_movement_offset actor.position[0] -= of...
21.842105
47
0.595181
91e9755e2c1edf1e87327a8ee911996331bbc512
258
py
Python
02_Python/sets.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
02_Python/sets.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
02_Python/sets.py
DaviNakamuraCardoso/Harvard-CS50-Web-Programming
afec745eede41f7b294c3ee6ebaff9ac042e5e4c
[ "MIT" ]
null
null
null
def main(): #Creating a empty set s = set() s.add(1) s.add(2) s.add(3) s.add(4) print(s) s.add(3) print(s) s.remove(2) print(s) print(f"The set has {len(s)} elements.") if __name__ == "__main__": main()
13.578947
44
0.496124
37f805d3c1bd48283346f9d1a79bc499aab2bdd4
1,139
py
Python
my_lda.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
my_lda.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
my_lda.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # 中文注释 import numpy as np import lda import matplotlib.pyplot as plt import textmining tdm = textmining.TermDocumentMatrix() with open('small_data.txt', 'r') as f: for line in f: tdm.add_doc(line.strip()) # create a temp variable with doc-term info temp = list(tdm.rows(cutoff=1)) #...
27.780488
75
0.705004
534f0f8e46404881bdd7976be9cf4eddf4125044
5,519
py
Python
20-fs-ias-lec/groups/13-sneakernet/code/guiSneakernet.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-fs-ias-lec/groups/13-sneakernet/code/guiSneakernet.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-fs-ias-lec/groups/13-sneakernet/code/guiSneakernet.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
import PySimpleGUI as sg # PySimpleGUI should be only dependecy besides the one herited from sneakernet_functions import sneakernet_functions import webbrowser import os running = False # this keeps track if the program should start up (which is the case if values are entered correctly) user = None path = None # bas...
53.067308
129
0.480884
fe9d075de8587380fd5a89bc7f56cbdcabb41531
229
py
Python
python/inputandoutputexpectedgenerator.py
Oidlichtnwoada/MiMi
06bdee6903673ec4d4fdb3a27ee8f65af2cb2f32
[ "MIT" ]
1
2019-12-27T10:42:40.000Z
2019-12-27T10:42:40.000Z
python/inputandoutputexpectedgenerator.py
Oidlichtnwoada/MiMi
06bdee6903673ec4d4fdb3a27ee8f65af2cb2f32
[ "MIT" ]
null
null
null
python/inputandoutputexpectedgenerator.py
Oidlichtnwoada/MiMi
06bdee6903673ec4d4fdb3a27ee8f65af2cb2f32
[ "MIT" ]
null
null
null
class InputAndOutputExpectedGenerator: def __init__(self): pass def generateInput(self, param1, param2, param3): return param3 def generateOutputExpected(self, param1, param2): return param1
22.9
53
0.689956
4319ff772663e03a01aaee72b5e3083f2403e594
292
py
Python
display/_console_lcd.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
display/_console_lcd.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
display/_console_lcd.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
from ._lcd import Lcd class ConsoleLcd(Lcd): _lines = ["", "", "", ""] def write_line(self, num: int, value: str): self._lines[num] = value[0:20] def flush(self): print("#" * 20) for line in self._lines: print(line) print("#" * 20)
19.466667
47
0.503425
43c139d614d0a40f68fa37eaa7846e2db45939ba
22,240
py
Python
Properties/analysis/FileLevel/filelevel.py
NazaninBayati/SCA
74e670462dd0da5e24147aab86df393b38405176
[ "MIT" ]
null
null
null
Properties/analysis/FileLevel/filelevel.py
NazaninBayati/SCA
74e670462dd0da5e24147aab86df393b38405176
[ "MIT" ]
null
null
null
Properties/analysis/FileLevel/filelevel.py
NazaninBayati/SCA
74e670462dd0da5e24147aab86df393b38405176
[ "MIT" ]
null
null
null
dictionary_file = [] def file_dictionary(file_name,file_address,file_call): di_file = 0 dictionary_file.append(file_name) dictionary_file.append(file_address) while di_file < file_call.__len__(): dictionary_file.append(file_call[di_file]) dictionary_file.append('\n') if di_fi...
38.213058
359
0.570459
7145b73631b8a0d03d220a6fb40eb072dccb6196
772
py
Python
Agent5/main_agent_Agent5_rewards.py
schigeru/Bachelorarbeit_Code
261b2552221f768e7022abc60a4e5a7d2fedbbae
[ "MIT" ]
null
null
null
Agent5/main_agent_Agent5_rewards.py
schigeru/Bachelorarbeit_Code
261b2552221f768e7022abc60a4e5a7d2fedbbae
[ "MIT" ]
null
null
null
Agent5/main_agent_Agent5_rewards.py
schigeru/Bachelorarbeit_Code
261b2552221f768e7022abc60a4e5a7d2fedbbae
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import gym from stable_baselines.common.policies import MlpPolicy from stable_baselines.common.vec_env import DummyVecEnv from stable_baselines.common.vec_env import SubprocVecEnv from stable_baselines import PPO2 from gym_Agent4_rewards import PandaRobotGymEnv import rospy import numpy as np im...
23.393939
96
0.717617
e08252a5e735572501738124f6eef34460624de2
156
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.14-list-with-loop.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.14-list-with-loop.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.14-list-with-loop.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
saarc = ["Bangladesh", "Afghanistan", "Bhutan", "Nepal", "India", "Pakistan", "Sri Lanka"] for country in saarc: print(country, "is a member of SAARC")
39
90
0.660256
e0ff0e487539e064450b6c0790ad13d3ba09a129
2,344
py
Python
graph_network/data/data.py
stevezheng23/graph_network_tf
b48a43453c2731f253bfe5a61e0b6339f4fc9f99
[ "Apache-2.0" ]
null
null
null
graph_network/data/data.py
stevezheng23/graph_network_tf
b48a43453c2731f253bfe5a61e0b6339f4fc9f99
[ "Apache-2.0" ]
null
null
null
graph_network/data/data.py
stevezheng23/graph_network_tf
b48a43453c2731f253bfe5a61e0b6339f4fc9f99
[ "Apache-2.0" ]
null
null
null
import numpy as np import tensorflow as tf __all__ = ["GraphData"] class GraphData(object): """graph data""" def __init__(self, edge_list, node_attr, edge_attr=None, graph_attr=None, node_label=None, edge_lab...
26.636364
83
0.536689
1c2f15c725d49d08657992ccce0173a331d53cb5
3,770
py
Python
Chapter11_AI/cartpoleAgent4.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter11_AI/cartpoleAgent4.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter11_AI/cartpoleAgent4.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
# noqa import gym import numpy as np from tensorflow.keras.layers import Activation from tensorflow.keras.layers import Dense from tensorflow.keras.models import Sequential from tensorflow.keras.utils import to_categorical class Agent: def __init__(self, env: gym.Env): self.env = env self.num_ober...
35.904762
96
0.58992
1c37a1c346f1ed4454020911795eff358c3de77d
2,559
py
Python
plugins/tff_backend/bizz/todo/investor.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
null
null
null
plugins/tff_backend/bizz/todo/investor.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
178
2017-08-02T12:58:06.000Z
2017-12-20T15:01:12.000Z
plugins/tff_backend/bizz/todo/investor.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
2
2018-01-10T10:43:12.000Z
2018-03-18T10:42:23.000Z
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
30.831325
79
0.609222
c71d805161075cf3ceccf7ac8ef78c19c0c2bc3f
303
py
Python
sensoro/writeRFID/openWrite.py
bhemsen/bigBrother
260f927fdcf6b6d43ec79a7a7ea4ba61a44c5e6d
[ "MIT" ]
null
null
null
sensoro/writeRFID/openWrite.py
bhemsen/bigBrother
260f927fdcf6b6d43ec79a7a7ea4ba61a44c5e6d
[ "MIT" ]
null
null
null
sensoro/writeRFID/openWrite.py
bhemsen/bigBrother
260f927fdcf6b6d43ec79a7a7ea4ba61a44c5e6d
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: UTF-8 -*- import sys # insert at 1, 0 is the script path (or '' in REPL) sys.path.insert(1, '/home/pi/bigBrother/sensoro/writeRFID') # enable debugging import cgitb cgitb.enable() print("Content-Type: text/plain;charset=utf-8") print() exec(open("Write.py").read())
18.9375
59
0.686469
4040a427ccc661c8da88b43f0fad5b01f1f8682a
6,608
py
Python
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/MetaSV-0.5-py2.7.egg/metasv/vcf_utils.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/MetaSV-0.5-py2.7.egg/metasv/vcf_utils.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/MetaSV-0.5-py2.7.egg/metasv/vcf_utils.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
import logging logger = logging.getLogger(__name__) from sv_interval import * from defaults import SVS_SUPPORTED, MAX_SV_LENGTH import pysam # Callers to remove filtered values when reading REMOVE_FILTERED = set(["BreakSeq", "Lumpy", "Manta", "CNVkit", "Contra", "WHAM"]) def print_header(header, file_fd): for ...
41.3
120
0.562349
4048dd188243411178001a8c2d2518f28ac3c09d
1,941
py
Python
deutschland/dwd/models/__init__.py
kiranmusze/deutschland
86d8ead3f38ad88ad66bb338b9f5a8db06992344
[ "Apache-2.0" ]
null
null
null
deutschland/dwd/models/__init__.py
kiranmusze/deutschland
86d8ead3f38ad88ad66bb338b9f5a8db06992344
[ "Apache-2.0" ]
null
null
null
deutschland/dwd/models/__init__.py
kiranmusze/deutschland
86d8ead3f38ad88ad66bb338b9f5a8db06992344
[ "Apache-2.0" ]
null
null
null
# flake8: noqa # import all models into this package # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: # from from deutschland.dwd.model.pet import Pet # or import this package, but before...
47.341463
88
0.862957
40c253d0480f5568f7330805d91e1d03727b2870
1,413
py
Python
src/onegov/core/orm/mixins/publication.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/orm/mixins/publication.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/core/orm/mixins/publication.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from sedate import utcnow from sqlalchemy import Column, case, func, and_, not_ from sqlalchemy.ext.hybrid import hybrid_property from onegov.core.orm.types import UTCDateTime class UTCPublicationMixin: #: Optional publication dates publication_start = Column(UTCDateTime, nullable=True) publication_end =...
28.26
73
0.649682
d3c4f241bb7cc57604e4f61dfde1c7e82fd7734f
3,834
py
Python
Packs/CommonScripts/Scripts/SSDeepSimilarity/SSDeepSimilarity.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/SSDeepSimilarity/SSDeepSimilarity.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/SSDeepSimilarity/SSDeepSimilarity.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import traceback import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 import tempfile HEADERS = "ssdeep,1.1--blocksize:hash:hash,filename\n" ''' COMMAND FUNCTION ''' def _handle_existing_outputs(anchor_hash: str, output_key: str, new_hashes_outputs: list): context = demist...
33.33913
114
0.684142
31612e83d702fc9e0a57b8a40aefb01651ac6f5b
1,046
py
Python
7-assets/past-student-repos/data_struct_and_algo-master/celeb.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
4
2021-08-31T00:56:40.000Z
2021-11-29T03:08:55.000Z
7-assets/past-student-repos/data_struct_and_algo-master/celeb.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
3
2022-02-14T18:48:11.000Z
2022-03-30T05:26:26.000Z
7-assets/past-student-repos/data_struct_and_algo-master/celeb.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
1
2021-08-31T00:54:51.000Z
2021-08-31T00:54:51.000Z
def orangesRotting(elemnts): if not elemnts or len(elemnts)==0: return 0 n=len(elemnts) m=len(elemnts[0]) rotten=[] for i in range(n): for j in range(m): if elemnts[i][j]==2: rotten.append((i,j)) mins=0 def dfs(rotten): count=[] fo...
20.115385
41
0.42543
73580a4d23e6b1cb48889a4fc3d5654159a6525f
144
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.02-tuple/ph-9.23-tuple-index.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.02-tuple/ph-9.23-tuple-index.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.02-tuple/ph-9.23-tuple-index.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
tpl = (1, 2, 3) print("tpl =", tpl) print("tpl[0] =", tpl[0]) print("tpl[1] =", tpl[1]) print("tpl[2] =", tpl[2]) print("tpl[3] =", tpl[3])
13.090909
25
0.479167
b460692ce7671165ab4dcb0733b623ebdeb70dad
434
py
Python
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/03funcionario/funcionario.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/03funcionario/funcionario.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/03funcionario/funcionario.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
# ex2: funcionario nome, salarioBruto, taxa, # salario, aumento # APP salario liquido, porcentagem aumento, salario atualizado class Funcionario: def __init__(self, nome, salario, taxa): self.nome = nome self.salario = salario self.taxa = taxa def aumento(self): sel...
31
70
0.647465
4889ad136d87cb2147a7ef1feb54b9ed85cfe8e0
1,294
py
Python
model/topoml_util/test_GaussianMixtureLoss.py
Empythy/geometry-learning
5300d421ef848c2748a2ba41ced5c6e2fba93200
[ "MIT" ]
21
2018-10-09T08:15:29.000Z
2022-03-16T08:23:08.000Z
model/topoml_util/test_GaussianMixtureLoss.py
reinvantveer/Topology-Learning
5300d421ef848c2748a2ba41ced5c6e2fba93200
[ "MIT" ]
31
2017-09-20T13:30:37.000Z
2018-03-01T13:24:58.000Z
model/topoml_util/test_GaussianMixtureLoss.py
reinvantveer/Topology-Learning
5300d421ef848c2748a2ba41ced5c6e2fba93200
[ "MIT" ]
7
2018-11-29T11:39:02.000Z
2022-01-12T07:10:26.000Z
import unittest import tensorflow as tf import numpy as np from topoml_util.test_files import gmm_output from topoml_util.GaussianMixtureLoss import GaussianMixtureLoss sess = tf.InteractiveSession() DATA_FILE = '../files/geodata_vectorized.npz' class TestGaussianMixtureLoss(unittest.TestCase): def test_bivaria...
30.809524
106
0.566461
82972ce2858604957e6b61415e0b0b04633875f9
36
py
Python
WiFiBroot-master/exceptions.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
WiFiBroot-master/exceptions.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
WiFiBroot-master/exceptions.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
class SniffBreak(ValueError): pass
12
29
0.805556
7d53b4abdff0cee6e805981ce3017821781e9b7b
3,989
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex05_sudoku_solver_optimized.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex05_sudoku_solver_optimized.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex05_sudoku_solver_optimized.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden # Helpers from ch06_arrays.intro.intro import print_array def solve_sudoku(board): return __solve_sudoku_helper(board, 0, 0) def __solve_sudoku_helper(board, start_row, start_col): # 1) Bereits alle Zeilen bearbeitet? ...
25.902597
77
0.530709
81720a0a1d366a611ed09c0e30b78ddc17f32a93
2,609
py
Python
week2/recognize_computer_vision.py
anjiang2016/CVFundamentals
783c2efcaa2336d674661ae18cdec744b91223c3
[ "MIT" ]
12
2020-05-25T08:21:25.000Z
2022-02-22T09:02:00.000Z
week2/recognize_computer_vision.py
anjiang2016/CVFundamentals
783c2efcaa2336d674661ae18cdec744b91223c3
[ "MIT" ]
null
null
null
week2/recognize_computer_vision.py
anjiang2016/CVFundamentals
783c2efcaa2336d674661ae18cdec744b91223c3
[ "MIT" ]
6
2020-06-02T11:54:03.000Z
2022-02-22T09:03:05.000Z
#coding:utf-8 # code for week2,recognize_computer_vision.py # houchangligong,zhaomingming,20200520, import torch def generate_data(): # 本函数生成0-9,10个数字的图片矩阵 image_data=[] num_0 = torch.tensor( [[0,0,1,1,0,0], [0,1,0,0,1,0], [0,1,0,0,1,0], [0,1,0,0,1,0], [0,0,1,1,0,0], [0,0,0,0,0,0]])...
20.224806
58
0.488693
81b02b1434c48872781d9e26769b655825cfe6e9
1,024
py
Python
doc/examples/blocks_type_hints.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/examples/blocks_type_hints.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/examples/blocks_type_hints.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
import numpy as np from transonic import Transonic, Type, NDim, Array T = Type(float, complex) N = NDim(2, 3) A = Array[T, N] A1 = Array[T, N + 1] ts = Transonic() class MyClass: def __init__(self, a, b): self.a = a self.b = b def compute(self, n): a = self.a b = self.b ...
19.320755
52
0.525391
81d39d4764598fbc45da4ae68c0e805b3890d7b5
121
py
Python
Online-Judges/CodingBat/Python/List-02/List_2-06-has22.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/CodingBat/Python/List-02/List_2-06-has22.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/CodingBat/Python/List-02/List_2-06-has22.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def has22(nums): for i in range(len(nums)-1): if nums[i] == 2 and nums[i+1] == 2: return True return False
20.166667
39
0.578512
c4f881b3b23c9cfb8bdf5f8b2493bc263ff594d1
2,235
py
Python
8_DeepLearning-Autoencoder/Denoise_images/denoise_images.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
8_DeepLearning-Autoencoder/Denoise_images/denoise_images.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
8_DeepLearning-Autoencoder/Denoise_images/denoise_images.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import tensorflow as tf # Fix CuDnn problem gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: tf.config.experimental.set_memory_growth(gpus[0], True) except RuntimeError as e: print(e) from tensorflow.keras.layers import * from ...
31.041667
84
0.70604
d203bd2689c5206a85463d5006fbf0958574c7c1
518
py
Python
tests/mocks.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
126
2019-09-16T15:28:20.000Z
2022-03-20T10:57:53.000Z
tests/mocks.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
54
2019-09-30T08:44:01.000Z
2022-03-20T11:10:00.000Z
tests/mocks.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
11
2020-01-02T08:32:46.000Z
2022-03-20T11:10:24.000Z
from datetime import datetime from unittest.mock import Mock from pfun import clock, effect, random class MockModules: clock: clock.Clock random: random.Random def __init__(self): self.clock = Mock() self.clock.sleep.return_value = effect.success(None) self.clock.now.return_value...
27.263158
79
0.698842
d26cd91fab6273aa349cb4987ff236259de8b81e
2,088
py
Python
scripts/get-orgs.py
evildrummer/1337-observer
621eb16711d9f70a59fb5524fc990dcab1004b14
[ "MIT" ]
1
2022-01-28T22:29:44.000Z
2022-01-28T22:29:44.000Z
scripts/get-orgs.py
evildrummer/1337-observer
621eb16711d9f70a59fb5524fc990dcab1004b14
[ "MIT" ]
null
null
null
scripts/get-orgs.py
evildrummer/1337-observer
621eb16711d9f70a59fb5524fc990dcab1004b14
[ "MIT" ]
1
2022-01-28T21:10:41.000Z
2022-01-28T21:10:41.000Z
import os import subprocess import argparse import re def main(input_file, output_file): if os.path.exists(input_file): with open(input_file, "r") as myfile: content = myfile.readlines() for line in content: output_string = [] domain = line.strip() ...
43.5
104
0.519157
fbc778b1caa7a0495a3104505d96930c3146045f
5,945
py
Python
TimeSeries/neural_prophet/neural_prophet_speed_test.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
null
null
null
TimeSeries/neural_prophet/neural_prophet_speed_test.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
1
2021-02-11T23:44:52.000Z
2021-02-11T23:44:52.000Z
TimeSeries/neural_prophet/neural_prophet_speed_test.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
1
2021-12-16T01:02:23.000Z
2021-12-16T01:02:23.000Z
# %% [markdown] # # Time series forecasting - Neural prophet # Neural prophet is a time series forecasting library very similar to the Facebook prophet. # Neural prophet runs using `pytorch`, rather than `fbprophet` and it's use of `pystan`. # It has some potential advantages by using stochastic gradient descent. # # ...
34.563953
115
0.729184
837e76088b67750dfea073e3545eda785c8fc03e
1,227
py
Python
year_2/prog_base_sem1/lab7-9/manage.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
year_2/prog_base_sem1/lab7-9/manage.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
21
2020-03-24T16:26:04.000Z
2022-02-18T15:56:16.000Z
year_2/prog_base_sem1_cw/manage.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
import os from app import create_app, db from app.models import User, Role, Permission, Post, Follow, Comment, Fave, DevBug from flask_script import Manager, Shell from flask_migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Migrate(app, d...
24.058824
82
0.700896
83e5b72f5d8593a24af372337cc842c67e1e9215
456
py
Python
linear_data_structure/product_array_except_self.py
daesookimds/Algorithm
76f4cbfe9000e8c1736f470138499e7c735fecaa
[ "MIT" ]
null
null
null
linear_data_structure/product_array_except_self.py
daesookimds/Algorithm
76f4cbfe9000e8c1736f470138499e7c735fecaa
[ "MIT" ]
null
null
null
linear_data_structure/product_array_except_self.py
daesookimds/Algorithm
76f4cbfe9000e8c1736f470138499e7c735fecaa
[ "MIT" ]
null
null
null
from typing import List def productExceptSelf(nums: List[int]) -> List[int]: out = [] p = 1 for i in range(0, len(nums)): out.append(p) p = p * nums[i] print(1, i, p, out) p = 1 for i in range(len(nums) - 1, 0 - 1, -1): out[i] = out[i] * p p = p * nums[i] ...
17.538462
52
0.486842
e3f18462867372d89c8bcaf8a1a9500c401de333
2,426
py
Python
pwn/vmxck/solve.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
6
2021-02-18T15:07:55.000Z
2022-02-04T01:38:10.000Z
pwn/vmxck/solve.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
pwn/vmxck/solve.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python from pwn import * context.terminal = ['tmux', 'split-window', '-h'] context.log_level = ['debug', 'info', 'warn'][1] BINARY = './vmxck' HOST = 'localhost' PORT = 1234 def create(bf): r.sendlineafter('> ', '1') r.sendlineafter(': ', str(bf)) def run(idx): r.sendlineafter('> ', '2') ...
24.755102
81
0.542457
5820d39348ccc7a9f36e591c82be9894c8877441
1,811
py
Python
official/cv/inceptionv3/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/inceptionv3/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/inceptionv3/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
32.927273
83
0.620099
49a9a64d6807e6857cabf3ae968dbddc785422b7
729
py
Python
___Python/RomanS/untitled/p08_generatoren_iteratoren/m01_iterator.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/RomanS/untitled/p08_generatoren_iteratoren/m01_iterator.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/RomanS/untitled/p08_generatoren_iteratoren/m01_iterator.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
from random import Random l = [2, 3, 5, 7, 11] for x in l: print(x) s = "Hallo" for c in s: print(c) class Wuerfel(object): def __init__(self): self.r = Random() def __iter__(self): return self def __next__(self): return self.r.randint(1,6) # w = Wuerf...
14.58
40
0.429355
49e58e60219bf4c7df48eea2165c7af19eaa7d0a
3,591
py
Python
examples/dependency_parsing/ddparser/export_model.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
examples/dependency_parsing/ddparser/export_model.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
examples/dependency_parsing/ddparser/export_model.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
39.9
170
0.664717
3fdcbe07eca3047621298dd85b7f3f7b60cba32d
694
py
Python
Python/pandas/06_statistic.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/pandas/06_statistic.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/pandas/06_statistic.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
from matplotlib.pyplot import axis import pandas as pd import numpy as np var = np.random.randint(10, size=(1337,7)) df = pd.DataFrame(var) print(f"Dataframe:\n {df}\n=====================\n") # descripe: Statistische werte, Count, mean, ..., std: Standardabweichung #25%, 50%, 75%: aller Werte sind unterhalb dieses W...
23.133333
73
0.651297
3fde79946f8353cb37ac6b740abed34be3c4cb41
4,624
py
Python
Packs/Jira/Integrations/JiraEventCollector/JiraEventCollector_test.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
1
2021-11-02T05:36:38.000Z
2021-11-02T05:36:38.000Z
Packs/Jira/Integrations/JiraEventCollector/JiraEventCollector_test.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
61
2021-10-07T08:54:38.000Z
2022-03-31T10:25:35.000Z
Packs/Jira/Integrations/JiraEventCollector/JiraEventCollector_test.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
import json import io import requests_mock from freezegun import freeze_time import demistomock as demisto from datetime import datetime, timedelta DEMISTO_PARAMS = { 'method': 'GET', 'url': 'https://your.domain/rest/api/3/auditing/record', 'max_fetch': 100, 'first_fetch': '3 days', 'credentials':...
35.030303
110
0.6875
b7b7c1371a57cd38ca055f7d5518f3f5e17392aa
877
py
Python
0104maximum-depth-of-binary-tree.py
meat00/my-leetcode-python
8312de396b29e1d6dd54a65f87fa0511eb400faa
[ "MIT" ]
null
null
null
0104maximum-depth-of-binary-tree.py
meat00/my-leetcode-python
8312de396b29e1d6dd54a65f87fa0511eb400faa
[ "MIT" ]
null
null
null
0104maximum-depth-of-binary-tree.py
meat00/my-leetcode-python
8312de396b29e1d6dd54a65f87fa0511eb400faa
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: ''' 遍历 ''' def cntDepth(self, root, depth): if root is None: return depth leftDepth = self....
20.880952
57
0.517674
b7cb859239159632a4be35df0a2fe0985f64189e
953
py
Python
DataProcess/utils/filters.py
zhangupkai/RFID_Script
9e05fad86e71dc6bd5dd12650d369f13d5a835c8
[ "MIT" ]
null
null
null
DataProcess/utils/filters.py
zhangupkai/RFID_Script
9e05fad86e71dc6bd5dd12650d369f13d5a835c8
[ "MIT" ]
null
null
null
DataProcess/utils/filters.py
zhangupkai/RFID_Script
9e05fad86e71dc6bd5dd12650d369f13d5a835c8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ @Project :DataProcess @File :filters.py @Author :Zhang Qihang @Date :2021/11/14 18:35 """ import numpy as np import config def hampel(X): length = X.shape[0] - 1 k = config.HAMPEL nsigma = 3 iLo = np.array([i - k for i in range(0, length + 1)]...
23.243902
74
0.542497
b7d6e291c2755dff1dd4710055f495c2ee8d811a
2,753
py
Python
checks/frameset_test.py
thegreenwebfoundation/green-spider
68f22886178bbe5b476a4591a6812ee25cb5651b
[ "Apache-2.0" ]
19
2018-04-20T11:03:41.000Z
2022-01-12T20:58:56.000Z
checks/frameset_test.py
thegreenwebfoundation/green-spider
68f22886178bbe5b476a4591a6812ee25cb5651b
[ "Apache-2.0" ]
160
2018-04-05T16:12:59.000Z
2022-03-01T13:01:27.000Z
checks/frameset_test.py
thegreenwebfoundation/green-spider
68f22886178bbe5b476a4591a6812ee25cb5651b
[ "Apache-2.0" ]
8
2018-11-05T13:07:57.000Z
2021-06-11T11:46:43.000Z
import httpretty from httpretty import httprettified import unittest from checks import frameset from checks import page_content from checks.config import Config @httprettified class TestFrameset(unittest.TestCase): def test_frameset_positive(self): page_body = """ <!doctype html public "-//w...
32.011628
87
0.538322
128a54ac37e498aceaf39f8a71f3fff1eaeebc23
4,505
py
Python
web/monitor/monitor.py
liukai0322/docklet
9e4d1f4fc2e523423b0e94406242a29b20643788
[ "BSD-3-Clause" ]
1
2016-05-31T06:52:53.000Z
2016-05-31T06:52:53.000Z
web/monitor/monitor.py
liukai0322/docklet
9e4d1f4fc2e523423b0e94406242a29b20643788
[ "BSD-3-Clause" ]
null
null
null
web/monitor/monitor.py
liukai0322/docklet
9e4d1f4fc2e523423b0e94406242a29b20643788
[ "BSD-3-Clause" ]
null
null
null
import sys sys.path.append("..") from flask import session from view.view import normalView from dockletreq.dockletrequest import dockletRequest class monitorView(normalView): template_path = "monitor/monitorNodeAll.html" @classmethod def get(self): data = { "user": session['username'...
38.836207
154
0.615982
c401a14e680ff9240e51c9787dd16e44ba82fe3f
271
py
Python
Algorithms/Strings/game_of_thrones1.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Strings/game_of_thrones1.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Strings/game_of_thrones1.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from collections import Counter import sys S = Counter(input().strip()) possible_odd = 1 for k, v in S.items(): if v % 2 == 1: possible_odd -= 1 if possible_odd < 0: print('NO') sys.exit(1) print('YES')
19.357143
31
0.564576
678285b3f3400b84df84f757d15fa29a93903640
777
py
Python
tests/performance_test/read_write_test_v1.py
DockerComposeFiles/ARM
b0faddb525ad134ff8c589c370d8e61ab030c216
[ "MIT" ]
null
null
null
tests/performance_test/read_write_test_v1.py
DockerComposeFiles/ARM
b0faddb525ad134ff8c589c370d8e61ab030c216
[ "MIT" ]
null
null
null
tests/performance_test/read_write_test_v1.py
DockerComposeFiles/ARM
b0faddb525ad134ff8c589c370d8e61ab030c216
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys import time # Messen der Lesezeiten # Zugriff auf die Systemzeit unter alpine endete in einem permision error readStart = time.time() # Testdatei readFile = "passwords" # Datei wird in f geöffnet und gelesen with open(readFile) as f: content = f.readlines() f.close() # Berechnung...
20.447368
73
0.738739
db33e21f15507ae16d00469c19fa16b261460414
417
py
Python
657-robot-return-to-origin/657-robot-return-to-origin.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
657-robot-return-to-origin/657-robot-return-to-origin.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
657-robot-return-to-origin/657-robot-return-to-origin.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def judgeCircle(self, moves: str) -> bool: if len(set(moves))%2==1: return False origin=[0, 0] direction = {"R": [1, 0], "L": [-1, 0], "U": [0, 1], "D": [0, -1]} for move in moves: origin[0]+=direction[move][0] origin[1]+=direction[...
32.076923
74
0.453237
22232a12b46a51d53e71eb4dca5298d52b7a84c0
941
py
Python
server/apps/movie/models.py
Mayandev/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
129
2019-04-20T08:23:25.000Z
2022-03-14T10:02:23.000Z
server/apps/movie/models.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
9
2019-05-19T15:06:17.000Z
2021-12-14T06:47:14.000Z
server/apps/movie/models.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
34
2019-05-06T06:37:17.000Z
2021-12-09T02:27:58.000Z
from django.db import models # Create your models here. class Movie(models.Model): movieId = models.CharField("数据集id", max_length=20, null=True, blank=True) doubanId = models.CharField("豆瓣id", max_length=20, null=True, blank=True) closest_movie = models.CharField("相似电影", max_length=256, null=True, blank=...
26.138889
83
0.686504
18e1cd46b252a3e8c94d402cf8ef2da28222ceff
1,062
py
Python
nz_django/day6/uploadfile_demo/front/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_django/day6/uploadfile_demo/front/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_django/day6/uploadfile_demo/front/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from django.shortcuts import render from django.views import View from django.http import HttpResponse from .forms import ArticleForm from .models import Article class IndexView(View): def get(self,request): return render(request,'index.html') # def post(self,request): # myfile = request.FILES.g...
36.62069
78
0.619586
3655a545b64d285c2dd456e2282a3d9891335fe6
2,290
py
Python
index.py
moritzott/hesse-musikdatenbank
79d2f2b5453eb76b1d40dfb2a201c947a5c8f637
[ "MIT" ]
null
null
null
index.py
moritzott/hesse-musikdatenbank
79d2f2b5453eb76b1d40dfb2a201c947a5c8f637
[ "MIT" ]
1
2021-10-09T10:52:57.000Z
2021-10-09T10:52:57.000Z
index.py
moritzott/hesse-musikdatenbank
79d2f2b5453eb76b1d40dfb2a201c947a5c8f637
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #---------------------------------------------------------- # #---------------------------------------------------------- from tkinter import * from utils import app def start(): # get words from input and call the function start_search with those words worte = w...
28.625
99
0.664192
3677e5289596be1a665766a74f537e83b4c1ee4b
89,156
py
Python
DHParser/server.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
2
2020-12-25T19:37:42.000Z
2021-03-26T04:59:12.000Z
DHParser/server.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
6
2018-08-07T22:48:52.000Z
2021-10-07T18:38:20.000Z
DHParser/server.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
null
null
null
# server.py - an asynchronous tcp-server to compile sources with DHParser # # Copyright 2019 by Eckhart Arnold (arnold@badw.de) # Bavarian Academy of Sciences an Humanities (badw.de) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wit...
43.279612
118
0.595899
7fedd000212d9db47dcc200eb35d00aad64f8f0a
1,472
py
Python
Openharmony v1.0/vendor/hisi/hi35xx/third_party/uboot/tools/binman/etype/u_boot_spl.py
clkbit123/TheOpenHarmony
0e6bcd9dee9f1a2481d762966b8bbd24baad6159
[ "MIT" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/u_boot_spl.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/u_boot_spl.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2016 Google, Inc # Written by Simon Glass <sjg@chromium.org> # # Entry-type module for spl/u-boot-spl.bin # import elf from entry import Entry from blob import Entry_blob class Entry_u_boot_spl(Entry_blob): """U-Boot SPL binary Properties / Entry arguments...
33.454545
80
0.706522
184f94d8aa36648efba2d444581acb99d8a9555d
6,958
py
Python
pacman-arch/test/pacman/pactest.py
Maxython/pacman-for-termux
3b208eb9274cbfc7a27fca673ea8a58f09ebad47
[ "MIT" ]
23
2021-05-21T19:11:06.000Z
2022-03-31T18:14:20.000Z
source/pacman-6.0.1/test/pacman/pactest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
11
2021-05-21T12:08:44.000Z
2021-12-21T08:30:08.000Z
source/pacman-6.0.1/test/pacman/pactest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
#! /usr/bin/python3 # # pactest : run automated testing on the pacman binary # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the ...
39.534091
84
0.602185
a1edf34585b9ab370f716557836b9a7f5c271a35
561
py
Python
exercises/de/test_02_14.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/de/test_02_14.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/de/test_02_14.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert ( "from spacy.matcher import PhraseMatcher" in __solution__ ), "Hast du den PhraseMatcher importiert?" assert ( "PhraseMatcher(nlp.vocab)" in __solution__ ), "Hast du den PhraseMatcher korrekt initialisiert?" assert "matcher(doc)" in __solution__, "Hast du den Matc...
51
120
0.716578
3df63e1af8c41365fba38bab8121f1f5bbde8314
5,815
py
Python
src/bo4e/com/ausschreibungslos.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/ausschreibungslos.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/ausschreibungslos.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Ausschreibungslos class and corresponding marshmallow schema for de-/serialization """ from typing import List, Optional import attr from marshmallow import fields from marshmallow_enum import EnumField # type:ignore[import] from bo4e.com.ausschreibungsdetail import Ausschreibungsdetail, Ausschreibungs...
46.150794
189
0.770077
9a8762d6c60897097f988db155db843436dab11a
651
py
Python
sonar_branch_result_parser.py
MarioaAk/SWT-Test
23b743eb18afc6d04bb053cf63498fcd3e1ae67d
[ "MIT" ]
4
2020-01-08T13:16:16.000Z
2020-10-26T10:40:19.000Z
sonar_branch_result_parser.py
exxcellent/swt2-bsa-backend
0edb7ee3cd5033c8b98a1f20a6062873e13c9f06
[ "MIT" ]
286
2018-12-13T07:33:00.000Z
2022-02-09T08:32:58.000Z
sonar_branch_result_parser.py
MarioaAk/SWT-Test
23b743eb18afc6d04bb053cf63498fcd3e1ae67d
[ "MIT" ]
6
2020-04-27T13:53:13.000Z
2021-03-15T12:41:26.000Z
#!/usr/bin/env python import sys import json import requests def getSonarResult(data, branch): for item in data["branches"]: if (item["name"] == branch): result = item["status"]["qualityGateStatus"] # print(item["name"] + ' -> ' + result) sys.stdout.write(result) ...
21.7
56
0.626728