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
ecfa57274d7291161c47b85dd2e9c011ec509bee
5,386
py
Python
research/cv/mnasnet/src/models/mnasnet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/mnasnet/src/models/mnasnet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/mnasnet/src/models/mnasnet.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...
33.874214
119
0.48756
5b648d655bdd8d70fbb67392df965c1221aad73b
34
py
Python
libs/const.py
PSYCHXLAUGH/PasswordManager
eb72731467bdaf93e1d7c8a238e2dc384558b63a
[ "MIT" ]
null
null
null
libs/const.py
PSYCHXLAUGH/PasswordManager
eb72731467bdaf93e1d7c8a238e2dc384558b63a
[ "MIT" ]
null
null
null
libs/const.py
PSYCHXLAUGH/PasswordManager
eb72731467bdaf93e1d7c8a238e2dc384558b63a
[ "MIT" ]
null
null
null
FOLDERNAME = "out" VERSION = "1.0"
17
18
0.647059
752d3253389bd85f6221ca65dc3fcee71f9a5599
160
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.7-2-even-odd-number.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.7-2-even-odd-number.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.7-2-even-odd-number.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
number = input("Plase enter a number: ") number = int(number) if number % 2 == 0: print(number, "is Even number") else: print(number, "is Odd number")
20
40
0.6375
752dc10c0360d6e4d8d2e866aadbf0c93828923f
1,048
py
Python
django-admin-readonly-permission/proj/accounts/admin.py
TakesxiSximada/pens
93d7b12330fa4f3e3ce913239ca2891212dabaf2
[ "Apache-2.0" ]
null
null
null
django-admin-readonly-permission/proj/accounts/admin.py
TakesxiSximada/pens
93d7b12330fa4f3e3ce913239ca2891212dabaf2
[ "Apache-2.0" ]
null
null
null
django-admin-readonly-permission/proj/accounts/admin.py
TakesxiSximada/pens
93d7b12330fa4f3e3ce913239ca2891212dabaf2
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from . import models class ReadonlyAdmin(admin.ModelAdmin): def has_add_permission(self, *args, **kwds): return False def has_delete_permission(self, *args, **kwds): return False def has_change_permission(self, *args, **kwds): return True de...
29.111111
88
0.674618
34727c29ae7e659f35bf07840ebd911f82104833
391
py
Python
PINp/2015/KHVAN_A_V/task_1_28.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2015/KHVAN_A_V/task_1_28.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2015/KHVAN_A_V/task_1_28.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 1. Вариант 28. # Напишите программу, которая будет сообщать род деятельности и псевдоним под #которым скрывается Норма Бейкер. #После вывода информации программа должна дожидаться #пока пользователь нажмет Enter для выхода. # Khvan A.V. # 10.03.2016 print ("Норма Бейкер более известна, как американская кино...
27.928571
77
0.782609
b6db8cf88722ff1e95d540321462a93180bd7417
679
py
Python
elements/python/6/16/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/6/16/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/6/16/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
import random import collections def sample(a, k): """ sample generates a sample of k elements from a. After calling this function the sample is the first k elements of a. """ n = len(a) if k > n: raise RuntimeError('sample size too large') for i in xrange(k): j = random.r...
19.4
72
0.569956
b6e38ab0f13cc60b582c5abc66498027c09d5667
1,031
py
Python
2020-11-24/zkouseni.py
Bertik23/spg
f6449f1ca8f3a869f0f493f3988b3d84901c1be0
[ "MIT" ]
null
null
null
2020-11-24/zkouseni.py
Bertik23/spg
f6449f1ca8f3a869f0f493f3988b3d84901c1be0
[ "MIT" ]
null
null
null
2020-11-24/zkouseni.py
Bertik23/spg
f6449f1ca8f3a869f0f493f3988b3d84901c1be0
[ "MIT" ]
null
null
null
import random with open("2020-11-24/encs.txt", encoding="utf-8") as f: slovnik = [i.split("|") for i in f.read().split("\n")[:-1]] def listToString(l, withIndex=False): out = "" for index, i in enumerate(l): out += f"{f'{index+1}) ' if withIndex else ''}{i}, " return out[:-2] pocetMoznosti = ...
28.638889
86
0.555771
edab65a4fe759e09ab99cf70c1bd21421a0eb4d4
2,591
py
Python
wz/backend/interface_text_reports.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/backend/interface_text_reports.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/backend/interface_text_reports.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ backend/interface_text_reports.py - last updated 2021-05-22 Controller/dispatcher for text-report management. ============================== Copyright 2021 Michael Towers Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance ...
30.482353
76
0.693169
ede11dc183ae9652fc29b2ba05c7f07b000c98a1
1,290
pyde
Python
sketches/peanokurve/peanokurve.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/peanokurve/peanokurve.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/peanokurve/peanokurve.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
add_library('Turtle') import math num_gen = 3 ds = 1 def setup(): global p size(400, 400) this.surface.setTitle("Peano-Kurve") background(50) strokeWeight(2) stroke(150, 255, 100) p = Turtle(this) p.right(90) noLoop() def draw(): p.penUp() p.goToPoint(25, 200) p.penDow...
20.47619
40
0.475969
fcee8cf11da1c547070ac3fe6e3adc4caf0c5342
16,027
py
Python
Packs/TruSTAR/Integrations/TruSTAR_V2/TruSTAR_V2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/TruSTAR/Integrations/TruSTAR_V2/TruSTAR_V2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/TruSTAR/Integrations/TruSTAR_V2/TruSTAR_V2_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import pytest from TruSTAR_V2 import TrustarClient, Utils import trustar from trustar.models.indicator import Indicator from trustar.models.enclave import EnclavePermissions from trustar.models.report import Report from trustar.models.intelligence_source import IntelligenceSource from trustar.models.phishing_submissio...
32.509128
107
0.652898
1e1d2514e688fa3084a86d6366fbf9a06d57ec20
411
py
Python
scripts/OOP/sw02_modul_klasse_import.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
scripts/OOP/sw02_modul_klasse_import.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
scripts/OOP/sw02_modul_klasse_import.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- # sw02_modul_klasse_import.py # from 'Dateiname' ohne .py import Klasse aus der Datei from sw01_modul_klasse import Schokofigur if __name__ == '__main__': objekt1 = Schokofigur('Weihnachtsmann', 200) objekt2 = Schokofigur("Osterei", 50) print(objekt2) print(...
27.4
72
0.715328
1e2b9a0404fbdd709b38bc1bf51443de5acc8e97
2,494
py
Python
packages/watchmen-rest/src/watchmen_rest/rest_app.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest/src/watchmen_rest/rest_app.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest/src/watchmen_rest/rest_app.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from __future__ import annotations from abc import abstractmethod from logging import getLogger from typing import Callable, List, Optional, Tuple from fastapi import FastAPI from watchmen_auth import AuthenticationProvider from watchmen_model.admin import User from .auth_helper import register_authentication_manag...
24.94
87
0.76664
bfd0ad22151433076a86d7c5d2e0610c3ad07cf3
11,130
py
Python
tests/onegov/core/test_csv.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/core/test_csv.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/core/test_csv.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import pytest import tempfile from io import BytesIO from onegov.core import utils from onegov.core.csv import ( CSVFile, convert_excel_to_csv, convert_list_of_dicts_to_csv, convert_list_of_dicts_to_xlsx, convert_xls_to_csv, convert_xlsx_to_csv, detect_encoding, match_headers, norma...
28.248731
77
0.584097
44bb8b5a129133ecc2c0bbc4b8729357828f0ef5
2,756
py
Python
Packs/ipinfo/Integrations/ipinfo_v2/ipinfo_v2_test.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/ipinfo/Integrations/ipinfo_v2/ipinfo_v2_test.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/ipinfo/Integrations/ipinfo_v2/ipinfo_v2_test.py
PAM360/content
928aac9c586c6e593b2a452c402a37cb5df28dac
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
"""IPinfo Integration for Cortex XSOAR - Unit Tests file""" import json import io from CommonServerPython import DBotScoreReliability import demistomock as demisto import pytest from ipinfo_v2 import BRAND_NAME @pytest.fixture(autouse=True) def handle_calling_context(mocker): mocker.patch.object(demisto, 'call...
33.609756
118
0.675254
44e52f1baa316e44189150456df8622d485c6612
1,274
py
Python
elements/python/8/11/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/8/11/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/8/11/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
class Node(object): def __init__(self, x, nxt): self.x = x self.next = nxt def circular_shift_right(n, k): """ Circularly right shift the linked list starting at n by k. """ s = n # s is the start of the input list t = n # t will be a "trailing" pointer lagging k steps behind ...
18.735294
65
0.550235
780edf309cbf4fbe8884c28ded063e4234c0f649
310
py
Python
src/Graph.py
LukasTinnes/VenturePainter
cb1f24fda2a43d402a9c5a401d713af0c950270b
[ "Unlicense" ]
1
2020-05-29T21:09:33.000Z
2020-05-29T21:09:33.000Z
src/Graph.py
LukasTinnes/VenturePainter
cb1f24fda2a43d402a9c5a401d713af0c950270b
[ "Unlicense" ]
3
2020-06-14T11:33:54.000Z
2022-01-13T03:31:06.000Z
src/Graph.py
LukasTinnes/VenturePainter
cb1f24fda2a43d402a9c5a401d713af0c950270b
[ "Unlicense" ]
null
null
null
from src.Node import Node class Graph: def __init__(self): self.nodes = [] def add_node(self, node): self.nodes.append(node) def get_node(self, identifier) -> Node: return self.nodes[identifier] def get_levels(self): for node in self.nodes: pass
19.375
43
0.6
ecb5f13bbc09afe237a816ce8c2fba7af8ba853c
1,011
py
Python
src/classifier/non_torch/eval_non_torch.py
krangelie/bias-in-german-nlg
9fbaf50fde7d41d64692ae90c41beae61bc78d44
[ "MIT" ]
14
2021-08-24T12:36:37.000Z
2022-03-18T12:14:36.000Z
src/classifier/non_torch/eval_non_torch.py
krangelie/bias-in-german-nlg
9fbaf50fde7d41d64692ae90c41beae61bc78d44
[ "MIT" ]
null
null
null
src/classifier/non_torch/eval_non_torch.py
krangelie/bias-in-german-nlg
9fbaf50fde7d41d64692ae90c41beae61bc78d44
[ "MIT" ]
1
2021-10-21T20:22:55.000Z
2021-10-21T20:22:55.000Z
import os import json from pprint import pprint import hydra.utils from sklearn.metrics import classification_report, plot_confusion_matrix import matplotlib.pyplot as plt from src.classifier.utils import store_preds def evaluate_model( embedding_name, model_type, model, X_test, Y_test, texts_test, plot_path ):...
31.59375
82
0.747774
bf31980aafc84ddbecd19a2e5675d8be10bf5e40
2,278
py
Python
Chapter7_CNN/Chapter7_3_CNN_Optimization/cnnCrossValidation.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter7_CNN/Chapter7_3_CNN_Optimization/cnnCrossValidation.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
Chapter7_CNN/Chapter7_3_CNN_Optimization/cnnCrossValidation.py
thisisjako/UdemyTF
ee4102391ed6bd50f764955f732f5740425a9209
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from sklearn.model_selection import cross_val_score from tensorflow.keras.layers import Activation from tensorflow.keras.layers import Conv2D from tensorflow.keras.layers import Dense from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Input ...
26.488372
69
0.629061
bd6a66dd4026ecf671196ae3e22d6a91f16d153a
1,243
py
Python
Intro-Python-II/examples/animals.py
tobias-fyi/01_intro_python
c56645291b8bce94d8511c3277fefba1fe8add89
[ "MIT" ]
null
null
null
Intro-Python-II/examples/animals.py
tobias-fyi/01_intro_python
c56645291b8bce94d8511c3277fefba1fe8add89
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/01_intro_python/Intro-Python-II/examples/animals.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class Human: def __init__(self, name, pets=None): self.name = name self.pets = pets if self.pets is None: self.pets = [] def add_pet(self, new_pet): self.pets.append(new_pet) new_pet.owners.append(self) class Animal(ABC):...
23.018519
74
0.555109
da4dec3a95ffed2ab11817b19047e670d21e9bd5
260
py
Python
exercises/fr/exc_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/fr/exc_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/fr/exc_02_02_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
from spacy.lang.fr import French nlp = French() doc = nlp("J'ai un chat") # Recherche le hash pour le mot "chat" cat_hash = ____.____.____[____] print(cat_hash) # Recherche cat_hash pour obtenir la chaine cat_string = ____.____.____[____] print(cat_string)
20
43
0.742308
e5880d825e328fc244ff8c8156c5d9228c2f8243
6,973
py
Python
differentiable_models/GateDenseNet40.py
CityU-AIM-Group/GFBS
d71361243f1bcf699e1a20b312b05fe0be4dfd6d
[ "MIT" ]
null
null
null
differentiable_models/GateDenseNet40.py
CityU-AIM-Group/GFBS
d71361243f1bcf699e1a20b312b05fe0be4dfd6d
[ "MIT" ]
null
null
null
differentiable_models/GateDenseNet40.py
CityU-AIM-Group/GFBS
d71361243f1bcf699e1a20b312b05fe0be4dfd6d
[ "MIT" ]
1
2021-12-19T12:31:05.000Z
2021-12-19T12:31:05.000Z
import math import torch import torch.nn as nn import torch.nn.functional as F class Gate(torch.nn.Module): def __init__(self, out_planes): super(Gate, self).__init__() self.gate = nn.Parameter(torch.ones(1, out_planes, 1, 1), requires_grad=False) def forward(self, x): return self.gate...
41.260355
142
0.610928
e59d405c9d3ed9e56bd08d01b5b87fd42b1f06f0
2,120
py
Python
scan-files.py
MartinBoehmer/Taktische-Zeichen-drawio
1f77501d2b405281b8b091b859d95dfcfca7aa1e
[ "Apache-2.0" ]
22
2017-04-20T08:10:38.000Z
2022-03-15T01:08:52.000Z
scan-files.py
MartinBoehmer/Taktische-Zeichen-drawio
1f77501d2b405281b8b091b859d95dfcfca7aa1e
[ "Apache-2.0" ]
7
2017-03-19T15:13:34.000Z
2020-02-02T22:07:48.000Z
scan-files.py
MartinBoehmer/Taktische-Zeichen-drawio
1f77501d2b405281b8b091b859d95dfcfca7aa1e
[ "Apache-2.0" ]
8
2017-04-05T11:03:53.000Z
2022-01-31T15:31:15.000Z
#!/usr/bin/python ## # # Copyright 2018 Martin Böhmer # # 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...
30.285714
208
0.755189
e5b9d21309671408bab359ad99d3e75bf7217bae
1,306
py
Python
Micropython_ESP8266/wifi_serv.py
arkahu/Stuff
6b5955444a4c538ce194764c28389e7043ab5cdd
[ "MIT" ]
null
null
null
Micropython_ESP8266/wifi_serv.py
arkahu/Stuff
6b5955444a4c538ce194764c28389e7043ab5cdd
[ "MIT" ]
null
null
null
Micropython_ESP8266/wifi_serv.py
arkahu/Stuff
6b5955444a4c538ce194764c28389e7043ab5cdd
[ "MIT" ]
null
null
null
""" ESP8266 code for running a webserver on the MCU. Data input from the form is displayed in a TFT. """ import socket, text2display def inputHandler(message): text2display.reset() text2display.drawtext(str(message), scaling = 3) def simpleserver(): html = """<!DOCTYPE html> <html> <head> ...
23.321429
76
0.50536
8aeb243126e0993dee2d5825e147252de19cdf21
961
py
Python
leetcode/127-Word-Ladder/WordLadder_002.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
leetcode/127-Word-Ladder/WordLadder_002.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
leetcode/127-Word-Ladder/WordLadder_002.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
# Link: http://www.cnblogs.com/zuoyuan/p/3765858.html class Solution(object): def ladderLength(self, beginWord, endWord, wordList): """ :type beginWord: str :type endWord: str :type wordList: Set[str] :rtype: int """ wordList.add(endWord) q = [] ...
33.137931
62
0.469303
c123682c12e8f290bef93073d0d84dd7d8ea5eab
542
py
Python
post-to-tumblr.py
jeffskinnerbox/jeffskinnerbox.github.io
d07feff062dc80da1fef339185a891d97d5c2806
[ "Unlicense", "MIT" ]
29
2015-09-12T08:08:12.000Z
2022-03-01T14:24:18.000Z
post-to-tumblr.py
jeffskinnerbox/jeffskinnerbox.github.io
d07feff062dc80da1fef339185a891d97d5c2806
[ "Unlicense", "MIT" ]
null
null
null
post-to-tumblr.py
jeffskinnerbox/jeffskinnerbox.github.io
d07feff062dc80da1fef339185a891d97d5c2806
[ "Unlicense", "MIT" ]
14
2015-09-12T08:08:13.000Z
2022-01-27T07:28:16.000Z
#!/usr/bin/python # https://api.tumblr.com/console/calls/user/info # A Python Tumblr API v2 Client - https://github.com/tumblr/pytumblr import pytumblr client = pytumblr.TumblrRestClient( '<consumer_key>', '<consumer_secret>', '<oauth_token>', '<oauth_secret>', ) # Create a link post client.create_...
25.809524
76
0.627306
a9b9bde0364aac8e0f13b58a773f91292a35feb0
5,468
py
Python
solutions/pedestrian_search/webserver/src/config.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-04-06T06:13:20.000Z
2021-04-06T06:13:20.000Z
solutions/pedestrian_search/webserver/src/config.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/pedestrian_search/webserver/src/config.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
import os import torch import torch.utils.data as data import torch.nn as nn import torchvision.models as models import torch.backends.cudnn as cudnn import random import numpy as np import logging from service.datasets.pedes import CuhkPedes from service.models.model import Model from service.utils import directory l...
37.972222
94
0.652158
e79dbc6f79aceeb33d8c4055226f606233c082a8
2,984
py
Python
research/cv/AVA_cifar/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/AVA_cifar/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/AVA_cifar/export.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...
43.246377
109
0.683646
ec0959012202377a9b0ef94277fa8549e2181eb7
15,501
py
Python
user/views.py
MIXISAMA/MIS-backend
7aaa1be773718de1beb3ce0080edca7c4114b7ad
[ "MIT" ]
null
null
null
user/views.py
MIXISAMA/MIS-backend
7aaa1be773718de1beb3ce0080edca7c4114b7ad
[ "MIT" ]
null
null
null
user/views.py
MIXISAMA/MIS-backend
7aaa1be773718de1beb3ce0080edca7c4114b7ad
[ "MIT" ]
2
2020-04-20T07:26:51.000Z
2020-04-30T11:51:54.000Z
from django.http import JsonResponse from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.models import User from django.db import transaction from django.shortcuts import get_object_or_404 from rest_framework.parsers import JSONParser from rest_framework.exceptions import ParseError from rest...
32.496855
92
0.504677
ec2055b6a5906ad1e2da7cb1e1689f2c43b6fba5
1,132
py
Python
setup.py
kiersch/parse_ecli
ae2bfe0003e625a33845abc262480f81166aea92
[ "MIT" ]
2
2020-05-05T13:08:15.000Z
2020-05-05T14:12:16.000Z
setup.py
kiersch/parse_ecli
ae2bfe0003e625a33845abc262480f81166aea92
[ "MIT" ]
1
2020-05-13T10:09:48.000Z
2020-05-13T10:09:48.000Z
setup.py
kiersch/parse_ecli
ae2bfe0003e625a33845abc262480f81166aea92
[ "MIT" ]
null
null
null
from setuptools import setup from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup(name='parse_ecli', version='0.9.5', description='Parse German ECLI', long_d...
32.342857
74
0.613074
d4077586394075db09833fbccc12fdfd0c984e21
51
py
Python
Online-Judges/CodingBat/Python/String-01/07-first_half.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/CodingBat/Python/String-01/07-first_half.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/CodingBat/Python/String-01/07-first_half.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def first_half(str): return str[:(len(str)/2)]
17
29
0.627451
2e304a813e6d62023440fa7f9629e8854c014569
13,318
py
Python
Packs/RecordedFuture/Integrations/RecordedFuture/RecordedFuture_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/RecordedFuture/Integrations/RecordedFuture/RecordedFuture_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/RecordedFuture/Integrations/RecordedFuture/RecordedFuture_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import os import unittest import json from datetime import datetime from pathlib import Path from unittest.mock import call from RecordedFuture import ( Actions, Client, ) from CommonServerPython import CommandResults import vcr as vcrpy import io CASSETTES = Path(__file__).parent / 'cassettes' def filter_o...
39.636905
117
0.64762
d8d6b102cba39df0d58d147389d1779f22f66aef
103
py
Python
pacman-termux/test/pacman/tests/pacman004.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/tests/pacman004.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/tests/pacman004.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Test command line option (-v)" self.args = "-v" self.addrule("PACMAN_RETCODE=1")
17.166667
50
0.699029
d8f78c3f47c05736957c23fd2e96c840d8060af5
1,213
py
Python
app/auth/forms.py
IoTServ/FlaskSimpleCMS
db0fc4464c6d514db14972156ca3e002a60a4876
[ "MIT" ]
null
null
null
app/auth/forms.py
IoTServ/FlaskSimpleCMS
db0fc4464c6d514db14972156ca3e002a60a4876
[ "MIT" ]
4
2020-08-29T16:11:12.000Z
2022-03-12T00:47:03.000Z
app/auth/forms.py
IoTServ/FlaskSimpleCMS
db0fc4464c6d514db14972156ca3e002a60a4876
[ "MIT" ]
null
null
null
# coding: utf-8 from flask_wtf import Form from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import DataRequired, Length, Email,EqualTo class LoginForm(Form): email = StringField(u'电子邮件', validators=[DataRequired(), Length(1, 64), Emai...
46.653846
84
0.652927
991514a18c009b00a96b1993066c0f9c5ea6e363
2,010
py
Python
python/en/archive/books/jump2python/j2p-02_2_7-string_datatype-advanced_string_formatting.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/books/jump2python/j2p-02_2_7-string_datatype-advanced_string_formatting.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/books/jump2python/j2p-02_2_7-string_datatype-advanced_string_formatting.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ jump2python-02_2_string_datatype-(5)-advanced_string_formatting.py # 고급 문자열 포매팅, p.63 # format method """ # Using idex {0}, {1}, ... print( "I eat {0} apples.".format(3) ) # 0th value in format is replaced. # I eat 3 apples. print( "I eat {0} apples.".format("five") ) # I eat fiv...
23.928571
82
0.540299
5130be328860b0e1b5d9df5db9016d22bd515472
1,802
py
Python
reports/sep/code/fcn.py
klawr/deepmech
61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff
[ "MIT" ]
1
2020-04-17T12:27:06.000Z
2020-04-17T12:27:06.000Z
reports/sep/code/fcn.py
klawr/deepmech
61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff
[ "MIT" ]
1
2022-02-27T13:13:17.000Z
2022-02-27T13:13:17.000Z
reports/sep/code/fcn.py
klawr/deepmech
61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff
[ "MIT" ]
null
null
null
from os.path import join import tensorflow as tf from tensorflow.keras import layers path = join('reports', 'sep', 'code', 'reversed.jpg') blob = tf.io.read_file(path) blob = tf.image.decode_jpeg(blob, channels=1) blob = tf.image.convert_image_dtype(blob, tf.float32) print(blob.shape) blob = tf.image.resize(blob, (23...
34
77
0.7303
5ad6cfe4e02bfe6dc210c49b4bbed9343d31904a
2,419
py
Python
src/visuanalytics/tests/analytics/transform/types/test_transform_time.py
mxsph/Data-Analytics
c82ff54b78f50b6660d7640bfee96ea68bef598f
[ "MIT" ]
3
2020-08-24T19:02:09.000Z
2021-05-27T20:22:41.000Z
src/visuanalytics/tests/analytics/transform/types/test_transform_time.py
mxsph/Data-Analytics
c82ff54b78f50b6660d7640bfee96ea68bef598f
[ "MIT" ]
342
2020-08-13T10:24:23.000Z
2021-08-12T14:01:52.000Z
src/visuanalytics/tests/analytics/transform/types/test_transform_time.py
visuanalytics/visuanalytics
f9cce7bc9e3227568939648ddd1dd6df02eac752
[ "MIT" ]
8
2020-09-01T07:11:18.000Z
2021-04-09T09:02:11.000Z
import unittest from datetime import datetime from visuanalytics.tests.analytics.transform.transform_test_helper import prepare_test class TestTransformTime(unittest.TestCase): def setUp(self): self.data = { "timestamp": 1592758688.7606313, "date": "2020-06-21" } def ...
26.877778
99
0.463001
5c53a09c8d9ea67f332e7022ba1c44771737fc43
1,539
py
Python
nz_crawl_demo/day7/youdao.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_crawl_demo/day7/youdao.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_crawl_demo/day7/youdao.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
import random import time import requests import hashlib def generateSaltSign(e): navigator_appVersion = "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" t = hashlib.md5(navigator_appVersion.encode("utf-8")).hexdigest() r = str(int(time.time() *...
29.596154
140
0.57245
5ce1a647d6e3d2028d8032046e8afd59756cace1
2,941
py
Python
app/services/document_service.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/services/document_service.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/services/document_service.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
import logging from app import db from app.models import Document, User from app.schema.document_schema import doc_schema class DocumentService: def __init__(self): self._logger = logging.getLogger(__name__) def get_documents(self, doc_id): try: document = Document.query.get(doc_...
36.308642
107
0.578375
7a3ae8ebc13ef96f12c3590c0772348831c79e58
3,094
py
Python
extension/tpcds/tpcds_config.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
2,816
2018-06-26T18:52:52.000Z
2021-04-06T10:39:15.000Z
extension/tpcds/tpcds_config.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
1,310
2021-04-06T16:04:52.000Z
2022-03-31T13:52:53.000Z
extension/tpcds/tpcds_config.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
270
2021-04-09T06:18:28.000Z
2022-03-31T11:55:37.000Z
import os # list all include directories include_directories = [os.path.sep.join(x.split('/')) for x in ['extension/tpcds/include', 'extension/tpcds/dsdgen/include', 'extension/tpcds/dsdgen/include/dsdgen-c']] # source files source_files = [os.path.sep.join(x.split('/')) for x in ['extension/tpcds/tpcds-extension.cpp']...
386.75
2,586
0.785714
7a8ad241a68ba83e215140473fb8f7da58b73d07
3,350
py
Python
Kaggle-Competitions/CrowdFlower/query_features.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-05-10T09:16:23.000Z
2019-05-10T09:16:23.000Z
Kaggle-Competitions/CrowdFlower/query_features.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
null
null
null
Kaggle-Competitions/CrowdFlower/query_features.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-10-14T07:30:18.000Z
2019-10-14T07:30:18.000Z
from sklearn.base import BaseEstimator from nltk.corpus import stopwords import numpy as np from scipy import sparse from nltk.stem import PorterStemmer from nltk.corpus import wordnet as wn stop = stopwords.words('english') def is_query_in_response(train): query_terms = train['query'].split(' ') response = ...
26.587302
84
0.677015
7a9e39120e368b356d7e6a0b83b3a8c440da4c16
1,603
py
Python
projects/g3h2-algorithm/practice4/1_knapsack_problem.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g3h2-algorithm/practice4/1_knapsack_problem.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
projects/g3h2-algorithm/practice4/1_knapsack_problem.py
keybrl/xdu-coursework
9d0e905bef28c18d87d3b97643de0d32f9f08ee0
[ "MIT" ]
null
null
null
from math import inf def zero_one_knapsack_back_tracking(items, c): # (id, weight, value) items = [(i, items[i][0], items[i][1]) for i in range(len(items))] items.sort(key=lambda a: a[1]) # 最后一个元素重量无穷大 # 将没东西装的情况转化为装不下的情况,方便讨论 items.append((len(items), inf, 0)) choices_stack = [] wei...
27.637931
70
0.499688
8fb93af8a897cb6d2fb3e35d97cda6dc4adbad92
2,008
py
Python
Contrib-Inspur/openbmc/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Inspur/openbmc/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Inspur/openbmc/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import bitbake class IncompatibleLicenseTests(OESelftestTestCase): def lic_test(self, pn, pn_lic, lic): error_msg = 'ERROR: Nothing PROVIDES \'%s\'\n%s was skipped: it has an incompatible license: %s' % (pn, pn, pn_lic) se...
47.809524
123
0.728586
56bfdedfb8c2fd8e3b5e4852d155f1e95bf9b8ed
2,416
py
Python
PythonTest/chara_anime.py
yuduki24/RubyTest
006233df69eca3eb5676984b51e57cd34d8dcf87
[ "MIT" ]
null
null
null
PythonTest/chara_anime.py
yuduki24/RubyTest
006233df69eca3eb5676984b51e57cd34d8dcf87
[ "MIT" ]
1
2017-11-03T06:59:55.000Z
2017-11-04T02:10:14.000Z
PythonTest/chara_anime.py
yuduki24/RubyTest
006233df69eca3eb5676984b51e57cd34d8dcf87
[ "MIT" ]
null
null
null
import pygame from pygame.locals import * import sys SCR_RECT = Rect(0, 0, 640, 480) def load_image(filename, colorkey=None): try: image = pygame.image.load(filename) except pygame.error as message: print ("Cannot load image:", filename) raise SystemExit(message) imag...
32.213333
84
0.590646
85738b0c610016f23ee01b2a05077c2dcb3bf887
221
py
Python
B0B-discord-bot-main/settings.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
B0B-discord-bot-main/settings.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
B0B-discord-bot-main/settings.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
import os #--------------------------------- token = os.environ['token'] #--------------------------------- bad_words = ["fucker", "stupid", "fucking", "asshole", "shit", "fuck", "dumb", "ass", "nigger", "dick", "but"]
27.625
110
0.40724
f15a924e628954f75e1ea2013980bff5a4ff9101
1,127
py
Python
Packs/GoogleChronicleBackstory/Scripts/ChronicleDBotScoreWidgetScript/ChronicleDBotScoreWidgetScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/GoogleChronicleBackstory/Scripts/ChronicleDBotScoreWidgetScript/ChronicleDBotScoreWidgetScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/GoogleChronicleBackstory/Scripts/ChronicleDBotScoreWidgetScript/ChronicleDBotScoreWidgetScript.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 * import traceback def get_html_representation(dbotscore) -> str: html = "<div style='color:grey; text-align:center;'><h1>0<br/>Unknown</h1></div>" if dbotscore == 1: html = "<div style='color:green; text-align:center;'><h1>1<br/>Good</h1></...
31.305556
94
0.622893
f171d83903eecf98f1175f08653c5efdf7f4c276
826
py
Python
beispielanwendungen/packaging/generate_ui.py
pbouda/pyqt-und-pyside-buch
a4ec10663ccc8aeda075c9a06b9707ded52382c8
[ "CC-BY-4.0" ]
5
2017-03-11T13:27:27.000Z
2022-01-09T10:52:05.000Z
beispielanwendungen/packaging/generate_ui.py
pbouda/pyqt-und-pyside-buch
a4ec10663ccc8aeda075c9a06b9707ded52382c8
[ "CC-BY-4.0" ]
2
2021-02-14T10:59:59.000Z
2021-10-30T21:46:32.000Z
beispielanwendungen/packaging/generate_ui.py
pbouda/pyqt-und-pyside-buch
a4ec10663ccc8aeda075c9a06b9707ded52382c8
[ "CC-BY-4.0" ]
1
2019-08-07T03:08:18.000Z
2019-08-07T03:08:18.000Z
# -*- coding: utf-8 -*- import sys, os from subprocess import call if sys.platform == "win32": bindir = "c:/Python27/Lib/site-packages/PyQt4/bin" else: bindir = "/usr/bin" uic_path = os.path.join(bindir, "pyuic4") rcc_path = os.path.join(bindir, "pyrcc4") ui_path = "ui" rc_path = "" out_p...
27.533333
59
0.650121
744d75481a04bf0698af2eb0e990c34daabd2e9c
203
py
Python
maximum-subarray/maximum-subarray.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
maximum-subarray/maximum-subarray.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
maximum-subarray/maximum-subarray.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def maxSubArray(self, nums: List[int]) -> int: dp=[] dp.append(nums[0]) for num in nums[1:]: dp.append(max(num, dp[-1]+num)) return max(dp)
29
50
0.512315
745b13a5bedbd3c1cb8235e21818a34ec5779c36
6,974
py
Python
frappe-bench/apps/erpnext/erpnext/setup/doctype/item_group/test_item_group.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
16
2021-06-14T23:56:47.000Z
2022-03-22T12:05:06.000Z
frappe-bench/apps/erpnext/erpnext/setup/doctype/item_group/test_item_group.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
119
2020-08-17T16:27:45.000Z
2022-03-28T12:42:56.000Z
frappe-bench/apps/erpnext/erpnext/setup/doctype/item_group/test_item_group.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
12
2021-05-16T13:35:40.000Z
2022-02-21T12:41:04.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import print_function, unicode_literals import unittest import frappe from frappe.utils.nestedset import NestedSetRecursionError, NestedSetMultipleRootsError, \ NestedSetChild...
33.528846
106
0.725982
703e9180b369b6f706c2a31d91871f1835395f44
972
py
Python
elements/python/7/2/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/7/2/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/7/2/soln.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
import random def replace_as_remove_bs(s, n): # remove bs first wr = 0 num_a = 0 for rd in xrange(n): if s[rd] == 'b': n -= 1 continue if s[rd] == 'a': num_a += 1 s[wr] = s[rd] wr += 1 # replace "a"s with "dd"s, backwards fina...
20.25
63
0.4393
565df0114a3aa911ef4fea14d5d83856b0a19242
1,165
py
Python
Packs/CommonScripts/Scripts/CheckIfSubdomain/CheckIfSubdomain.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/CommonScripts/Scripts/CheckIfSubdomain/CheckIfSubdomain.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
61
2021-10-07T08:54:38.000Z
2022-03-31T10:25:35.000Z
Packs/CommonScripts/Scripts/CheckIfSubdomain/CheckIfSubdomain.py
henry-sue-pa/content
043c6badfb4f9c80673cad9242fdea72efe301f7
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
import tldextract import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def main(): """ Checks if a given domain (or domains) are subdomains of the specified internal domains. Args: internal_domains: List of domains defined by the user as internal dom...
29.871795
93
0.664378
568165cecec6e30deeebeb69af22f4fac2d8a45a
54
py
Python
quark_core_api/__init__.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
quark_core_api/__init__.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
quark_core_api/__init__.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
from quark_core_api import common, data, context, core
54
54
0.833333
8edb55f6c1748d2fdaa0b8d183e0ce0b0c2c7ce9
9,455
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/plugins/prt/wxgui-01.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/contributed/sumopy/plugins/prt/wxgui-01.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/contributed/sumopy/plugins/prt/wxgui-01.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2016-2020 German Aerospace Center (DLR) and others. # SUMOPy module # Copyright (C) 2012-2017 University of Bologna - DICAM # This program and the accompanying materials are made available under the # terms of the Eclipse Public ...
43.571429
135
0.582337
797a43f100b82e55b3f8e3b166db2a52036475e6
3,567
py
Python
Integrations/python/deephaven/lang/constants.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
55
2021-05-11T16:01:59.000Z
2022-03-30T14:30:33.000Z
Integrations/python/deephaven/lang/constants.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
943
2021-05-10T14:00:02.000Z
2022-03-31T21:28:15.000Z
Integrations/python/deephaven/lang/constants.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
29
2021-05-10T11:33:16.000Z
2022-03-30T21:01:54.000Z
""" Deephanven Python language constants. **The contents of this module are intended only for internal Deephaven use and may change at any time.** """ import numpy as np import numba as nb from enum import Enum # TODO: a proper configuration method debugMode = False #: The debug mode. Set to True to get ast dump...
35.67
120
0.686852
7986a75c0f08c34b665746700b77f404df15e1a4
12,990
py
Python
haas_lib_bundles/python/docs/examples/smart_panel/esp32/code/music.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/smart_panel/esp32/code/music.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/smart_panel/esp32/code/music.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
import lvgl as lv from audio import Player # RESOURCES_ROOT = "S:/Users/liujuncheng/workspace/iot/esp32/solution/MicroPython/smart_panel/smart_panel/" RESOURCES_ROOT = "S:/data/pyamp/" functionImage = [ RESOURCES_ROOT + "images/prev.png", RESOURCES_ROOT + "images/play.png", RESOURCES_ROOT + "...
31.301205
107
0.631024
30e55d9e1ce29f7c4388d9ea9af6fcdeba59afcb
379
py
Python
_dev/make-empty-files.py
fabianmoronzirfas/mpo-id-tools
effbe1e0437af0df07a1073ea1ea64f18a0158eb
[ "MIT" ]
2
2018-04-17T13:51:36.000Z
2018-04-17T15:07:35.000Z
_dev/make-empty-files.py
fabianmoronzirfas/mpo-id-tools
effbe1e0437af0df07a1073ea1ea64f18a0158eb
[ "MIT" ]
1
2020-07-12T17:15:26.000Z
2020-07-12T17:15:26.000Z
_dev/make-empty-files.py
fabianmoronzirfas/mpo-id-tools
effbe1e0437af0df07a1073ea1ea64f18a0158eb
[ "MIT" ]
null
null
null
alist = ["003-013-jm2014-Info.txt", "014-016-jm2014-Books.txt", "018-103-jm2014-Guitars.txt", "104-151-jm2014-Drums.txt", "152-187-jm2014-Keys.txt", "188-197-jm2014-Zubehoer.txt", "198-239-jm2014-PA.txt", "240-255-jm2014-DJ.txt", "256-319-jm2014-Studio.txt", "320-322-jm2014-PiGal.txt", "323-337-jm2014-B...
27.071429
37
0.662269
ebe50d004250cba55831ff2d2b7a2f95a488f9a5
925
py
Python
eda.py
rejkube/streamlit_proj_test
789002346145f50b32015c4233be307d6ae09f45
[ "MIT" ]
null
null
null
eda.py
rejkube/streamlit_proj_test
789002346145f50b32015c4233be307d6ae09f45
[ "MIT" ]
null
null
null
eda.py
rejkube/streamlit_proj_test
789002346145f50b32015c4233be307d6ae09f45
[ "MIT" ]
null
null
null
#import libraries import matplotlib.pyplot as plt import pandas as pd import streamlit as st import numpy as np import matplotlib import seaborn as sns #Remove Warnings st.balloons() st.set_option('deprecation.showPyplotGlobalUse', False) st.title("Tips_Dataset") #import dataset df=pd.read_csv('tips.csv') tips=df.he...
20.555556
62
0.757838
d6c5e9999abc0eb847bdeb2de51dfe324f2bdc3c
1,340
py
Python
2016/day01_no_time_for_a_taxicab/python/src/test_solutions.py
tlake/advent-of-code
17c729af2af5f1d95ba6ff68771a82ca6d00b05d
[ "MIT" ]
null
null
null
2016/day01_no_time_for_a_taxicab/python/src/test_solutions.py
tlake/advent-of-code
17c729af2af5f1d95ba6ff68771a82ca6d00b05d
[ "MIT" ]
null
null
null
2016/day01_no_time_for_a_taxicab/python/src/test_solutions.py
tlake/advent-of-code
17c729af2af5f1d95ba6ff68771a82ca6d00b05d
[ "MIT" ]
null
null
null
"""Taxicab tests.""" from part1 import Walker as Walker1 from part2 import Walker as Walker2 class TestPart1: """.""" def test_example(self): """.""" sample_input = "R2, L3, L8" walker = Walker1(sample_input) assert(walker.run() == 9) class TestPart2: """.""" def t...
19.142857
63
0.344776
ba4788aa90fd3fd204daf2484ce04db960944569
354
py
Python
euler-9.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
euler-9.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
euler-9.py
TFabijo/euler
58dc07b9adb236890556ccd5d75ca9dbd2b50df9
[ "MIT" ]
null
null
null
def prava_trojica(): sez = [] for c in range(1,1000): for x in range(1,1000-c): a = x b = 1000 - c - x sez.append([a,b,c]) for y in sez: if y[0] ** 2 + y[1] ** 2 == y[2] ** 2: return y[0] * y[1] * y[2] else: pa...
20.823529
47
0.367232
ba9a2cb04efb697052f7412108520cb8707862b5
10,061
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/losses/depth_loss.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/losses/depth_loss.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/losses/depth_loss.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-03-07T10:51:21.000Z
2022-03-07T10:51:21.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 applic...
34.573883
84
0.571315
245a83033208563cb9c5f3ad3b8992f15eea8a03
1,756
py
Python
users/migrations/0004_auto_20190407_1707.py
rocky-roll-call/rrc-backend
02e8e11c3dab7661e48650e2e861a4a97788a4ce
[ "MIT" ]
null
null
null
users/migrations/0004_auto_20190407_1707.py
rocky-roll-call/rrc-backend
02e8e11c3dab7661e48650e2e861a4a97788a4ce
[ "MIT" ]
null
null
null
users/migrations/0004_auto_20190407_1707.py
rocky-roll-call/rrc-backend
02e8e11c3dab7661e48650e2e861a4a97788a4ce
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-04-07 17:07 from django.db import migrations, models import sorl.thumbnail.fields import users.models class Migration(migrations.Migration): dependencies = [("users", "0003_auto_20190402_0149")] operations = [ migrations.AlterField( model_name="profil...
30.807018
88
0.575171
79e88d413656d2bafe26db96747a45d235cd3839
321
py
Python
src/onegov/server/utils.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/server/utils.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/server/utils.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import inspect import importlib def load_class(cls): """ Loads the given class from string (unless alrady a class). """ if inspect.isclass(cls): return cls module_name, class_name = cls.rsplit('.', 1) module = importlib.import_module(module_name) return getattr(module, class_name, None)...
21.4
70
0.688474
0317e313803bba98aacc783938cfd82dc500cbba
1,968
py
Python
zencad/bbox.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/bbox.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/bbox.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
from OCC.Core.Bnd import Bnd_Box class BoundaryBox: def __init__(self, xl=None, xh=None, yl=None, yh=None, zl=None, zh=None): if isinstance(xl, Bnd_Box): self.assign_Bnd_Box(xl) return if (xl is None): self.assign_coords(0, 0, 0, 0, 0, 0) self.inite...
28.941176
104
0.553862
06717724b24e5f96531db80b299bb097736e106f
192
py
Python
jumeaux/addons/dump/__init__.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
11
2017-10-02T01:29:12.000Z
2022-03-31T08:37:22.000Z
jumeaux/addons/dump/__init__.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
79
2017-07-16T14:47:17.000Z
2022-03-31T08:49:14.000Z
jumeaux/addons/dump/__init__.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
2
2019-01-28T06:11:58.000Z
2021-01-25T07:21:21.000Z
# -*- coding:utf-8 -*- from jumeaux.models import DumpAddOnPayload class DumpExecutor: def exec(self, payload: DumpAddOnPayload) -> DumpAddOnPayload: raise NotImplementedError()
24
66
0.729167
aea411fcbbfc8a1e8077f38f82480187f60f2d84
633
py
Python
app/views/models/users.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/views/models/users.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
app/views/models/users.py
zhiyong-lv/flask-login
d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63
[ "MIT" ]
null
null
null
from flask_restplus import Model, fields from .commons import paginate_model user_basic = Model('User', { 'username': fields.String(required=True, description='The user name', attribute='username'), 'email': fields.String(required=True, description='The user email'), }) user_input = user_basic.clone('User Inp...
31.65
96
0.723539
4e0e6175d434db5c59f71dde218fa883b5bc7f2a
447
py
Python
INBa/2015/Rogko_K_A/task_3_20.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Rogko_K_A/task_3_20.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Rogko_K_A/task_3_20.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 3. Вариант 20. #Напишите программу, которая выводит имя "Мария Магдалена фон Лош", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире. # Рожко Ксения # 23.05.2016 print ("Под каким псевдонимом наиболее известена Мария Ма...
37.25
208
0.762864
d19bb640f04019be0d2af621fa757d6a9300e805
1,313
py
Python
ds1820_raspi_readout.py
bioPunkKitchen/climate.local
ccd29da3d84542d5f9c73a5d75bc3ceefeef1f08
[ "MIT" ]
1
2019-05-28T18:33:49.000Z
2019-05-28T18:33:49.000Z
ds1820_raspi_readout.py
bioPunkKitchen/climate.local
ccd29da3d84542d5f9c73a5d75bc3ceefeef1f08
[ "MIT" ]
1
2019-12-30T14:52:02.000Z
2020-01-04T11:41:08.000Z
ds1820_raspi_readout.py
bioPunkKitchen/climate.local
ccd29da3d84542d5f9c73a5d75bc3ceefeef1f08
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import re import sys class ds1820: sensor_path = None def __init__(self, sensor = None): if sensor is None: with open("ds1820_path", "r") as fd: sensor = fd.readline().strip() self.sensor_path = sensor def read(self): value = 0 ...
23.446429
73
0.479056
1177846526746cfa4681e167c53765ce2593ebb2
1,284
py
Python
src/histograms/marginal_hist.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/histograms/marginal_hist.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/histograms/marginal_hist.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
# marginal histogram # Import Data df = pd.read_csv("https://raw.githubusercontent.com/selva86/datasets/master/mpg_ggplot2.csv") # Create Fig and gridspec fig = plt.figure(figsize=(16, 10), dpi= 80) grid = plt.GridSpec(4, 4, hspace=0.5, wspace=0.2) # Define the axes ax_main = fig.add_subplot(grid[:-1, :-1]) ax_right...
37.764706
163
0.735202
11797fc28dce00631809e9e44c8abf3bec3dc6e5
1,098
py
Python
Curso_Python/Secao2-Python-Basico-Logica-Programacao/45_gerando_cpfs/gerando_cpf.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/45_gerando_cpfs/gerando_cpf.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/45_gerando_cpfs/gerando_cpf.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
from random import randint while True: cpf = str(randint(10000000000, 999999999999)) atual_cpf = [] inverte_cpf = atual_cpf[::-1] soma_cpf = 0 for c in range(10, 1, -1): soma_cpf += c * int(inverte_cpf[c]) #todo: Primeiro numero cpf calculo1 = 11 - (soma_cpf % 11) if calculo1 ...
24.954545
49
0.565574
6d69664f9933db2e6ee301cfeb6755c9bbbaee52
1,114
py
Python
etl/transforms/primitives/df/tests/test_filter_rows.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/tests/test_filter_rows.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/tests/test_filter_rows.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
from etl.transforms.primitives.df import filter_rows from etl.core import test_utils import pytest import pandas as pd def test_filter_on_icd9(): correct_diagnosis = {'Name': 'heart_failure_diag', 'ICD9': '428'} incorrect_diagnosis = {'Name': 'heart_failure_diag', 'ICD9': '429'} correct_history = {'Name': 'met_c...
39.785714
69
0.717235
6de91d284641436354292abb2d1db040aa2614e0
8,866
py
Python
hihope_neptune-oh_hid/00_src/v0.1/prebuilts/lite/sysroot/build/update_headers.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/prebuilts/lite/sysroot/build/update_headers.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.3/prebuilts/lite/sysroot/build/update_headers.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #-*-coding:utf-8-*- #Copyright (c) 2020-2021 Huawei Device 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....
38.380952
135
0.573878
09c808dfd279e060b49183a44d23bd294cf6e107
996
py
Python
rateable/migrations/0003_rating.py
TheKiddos/StaRat
33807d73276563f636b430e1bbfcb65b645869f7
[ "MIT" ]
1
2021-05-18T16:33:10.000Z
2021-05-18T16:33:10.000Z
rateable/migrations/0003_rating.py
TheKiddos/StaRat
33807d73276563f636b430e1bbfcb65b645869f7
[ "MIT" ]
3
2021-05-18T16:02:32.000Z
2021-05-21T15:20:12.000Z
rateable/migrations/0003_rating.py
TheKiddos/StaRat
33807d73276563f636b430e1bbfcb65b645869f7
[ "MIT" ]
1
2021-09-12T22:56:09.000Z
2021-09-12T22:56:09.000Z
# Generated by Django 3.2.3 on 2021-05-22 20:53 import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('rateable', '0002_alter_rateable_unique_together'), ] operations = [ migration...
38.307692
164
0.651606
a38f11342cfd90b980636ddab89daf4f249a2502
7,505
py
Python
phypidaq/MCP3x08Config.py
RMGrau/PhyPiDAQ
e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54
[ "BSD-2-Clause" ]
7
2018-11-30T13:38:27.000Z
2021-03-10T15:37:56.000Z
phypidaq/MCP3x08Config.py
RMGrau/PhyPiDAQ
e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54
[ "BSD-2-Clause" ]
5
2020-11-11T09:19:00.000Z
2022-02-06T09:04:55.000Z
phypidaq/MCP3x08Config.py
RMGrau/PhyPiDAQ
e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54
[ "BSD-2-Clause" ]
16
2019-04-16T10:15:45.000Z
2021-12-15T14:59:31.000Z
# -*- coding: utf-8 -*- from __future__ import print_function, division, unicode_literals from __future__ import absolute_import import numpy as np, time, sys # driver class contained below # import relevant pieces from adafruit import Adafruit_GPIO as GPIO import Adafruit_GPIO.SPI as SPI class MCP3x08Config(object...
37.525
122
0.629314
dd3c65fff42aea37084c394757ccc83430fec13f
8,746
py
Python
cbm/ipycbm/ipy_view/view_grid.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_grid.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_grid.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
47
2021-01-21T08:25:22.000Z
2022-03-21T14:28:42.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : Konstantinos Anastasakis # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD import json import numpy as np import matplotlib.pyplot a...
34.844622
78
0.535559
663a1554500090bb775ee0b8ddee7d3bcec2b00d
1,731
py
Python
v702/python/Indium.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
2
2019-12-10T10:25:11.000Z
2021-01-26T13:59:40.000Z
v702/python/Indium.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
null
null
null
v702/python/Indium.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
1
2020-12-06T21:24:58.000Z
2020-12-06T21:24:58.000Z
import numpy as np import matplotlib.pyplot as plt from uncertainties import ufloat from scipy import optimize import scipy.constants as const import uncertainties.unumpy as unp N = np.genfromtxt("python/indium.txt", unpack=True) fehler = 152 lenN = len(N) t = np.linspace(1, lenN, lenN) t = t *240 N = N - fehler fehle...
25.835821
103
0.678798
bb7fb9019ea9df057a221add579122b008004674
22,794
py
Python
Fastir_Collector/fs/fs.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
4
2021-04-23T15:39:17.000Z
2021-12-27T22:53:24.000Z
Fastir_Collector/fs/fs.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
null
null
null
Fastir_Collector/fs/fs.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
2
2021-04-19T08:28:54.000Z
2022-01-19T13:23:29.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import glob import os import sqlite3 import traceback import ctypes import struct from utils.utils import look_for_outlook_dirs, look_for_files, zip_archive, get_csv_writer, get_json_writer, \ write_to_csv, write_to_json, close_json_...
56.701493
122
0.594235
ab945b2bd49fead5ec82dc8904802198404d6f1f
138
py
Python
website/DL/cgu/app.py
man-r/DimensionsLab
c94c3aec0d52326ad522a6fa41d43ec3bde87d74
[ "MIT" ]
null
null
null
website/DL/cgu/app.py
man-r/DimensionsLab
c94c3aec0d52326ad522a6fa41d43ec3bde87d74
[ "MIT" ]
1
2022-03-24T06:13:52.000Z
2022-03-24T06:13:52.000Z
website/DL/cgu/app.py
man-r/DimensionsLab
c94c3aec0d52326ad522a6fa41d43ec3bde87d74
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys print sys.version_info print "Content-type: text/html\n\n" print "How to run Python scripts in cPanel\n\n"
23
47
0.746377
0546a8e655a9e9a9dac577446759124e6f10a49d
523
py
Python
Coursera/Python Data Structures/Assignment-9.4.py
rishav3101/Online-Courses-Learning
1e9356af331b27b6ee33d376d8d7104edaeac2fa
[ "MIT" ]
331
2019-10-22T09:06:28.000Z
2022-03-27T13:36:03.000Z
Coursera/Python Data Structures/Assignment-9.4.py
rishav3101/Online-Courses-Learning
1e9356af331b27b6ee33d376d8d7104edaeac2fa
[ "MIT" ]
8
2020-04-10T07:59:06.000Z
2022-02-06T11:36:47.000Z
Coursera/Python Data Structures/Assignment-9.4.py
rishav3101/Online-Courses-Learning
1e9356af331b27b6ee33d376d8d7104edaeac2fa
[ "MIT" ]
572
2019-07-28T23:43:35.000Z
2022-03-27T22:40:08.000Z
if __name__ == '__main__': try: name = input("Enter file:") if len(name) < 1: name = "mbox-short.txt" handle = open(name) m = dict() for word in handle: if word.startswith('From '): word = word.split() mail = word[1] ...
26.15
44
0.424474
e980a6797aefd8a5df4fabfcebbb086f6f893d20
2,173
py
Python
model/thread_manager.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
model/thread_manager.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
model/thread_manager.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
""" Element of the model. Contains the ThreadManager class. """ from PyQt5.QtCore import QObject, QThreadPool from model.simulation_thread import SimulationThread class ThreadManager(QObject): """A ThreadManager which is manages the SimulationThreads. Attributes ---------- simul...
33.953125
106
0.64197
dda89003f5e22741bfed7faf072e8b2294be36cc
7,048
py
Python
volley/connectors/rsmq.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
8
2022-02-24T14:59:24.000Z
2022-03-31T04:37:55.000Z
volley/connectors/rsmq.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
3
2022-02-27T17:08:52.000Z
2022-03-18T13:11:01.000Z
volley/connectors/rsmq.py
shipt/py-volley
0114651478c8df7304d3fe3cb9f72998901bb3fe
[ "MIT" ]
2
2022-02-24T15:03:07.000Z
2022-03-15T03:12:00.000Z
import logging import os import time from dataclasses import dataclass from typing import Any, Dict, Optional, Union from prometheus_client import Summary from rsmq import RedisSMQ from tenacity import retry, stop_after_attempt, wait_exponential, wait_fixed from volley.connectors.base import BaseConsumer, BaseProduce...
36.518135
118
0.610812
32eb7d910fa0fd865aaca51af7eaf41889871f79
2,256
py
Python
visualization.py
sonomarina/Stock-sentiment-analysis
2b3ddd88c73916ea06d39ef5d455f9220c69fdf7
[ "Unlicense" ]
null
null
null
visualization.py
sonomarina/Stock-sentiment-analysis
2b3ddd88c73916ea06d39ef5d455f9220c69fdf7
[ "Unlicense" ]
null
null
null
visualization.py
sonomarina/Stock-sentiment-analysis
2b3ddd88c73916ea06d39ef5d455f9220c69fdf7
[ "Unlicense" ]
null
null
null
# ============================================================================= # Import OHLCV data and perform basic visualizations # Author : Mayank Rasu # Please report bug/issues in the Q&A section # ============================================================================= # Import necesary libraries ...
42.566038
124
0.656028
1f86165bcf2bfa4daa08b26a1cb7c5b501ed56eb
339
py
Python
code/1/main.py
pwang13/AutomatedSE_Coursework
b416672d9756fcc60367143b989d29b0c905cfc3
[ "Unlicense" ]
null
null
null
code/1/main.py
pwang13/AutomatedSE_Coursework
b416672d9756fcc60367143b989d29b0c905cfc3
[ "Unlicense" ]
null
null
null
code/1/main.py
pwang13/AutomatedSE_Coursework
b416672d9756fcc60367143b989d29b0c905cfc3
[ "Unlicense" ]
null
null
null
#/usr/bin/python2 import utest import sys sys.dont_write_bytecode=true print "\nLoading and testing Timmons\n\n" import timmons utest.oks() print "\nLoading and testing laurel\n\n" import laurel utest.oks() print "\nLoading and testing wang\n\n" import wang utest.oks() print "\nLoading and testing goff\n\n" impor...
14.73913
41
0.758112
c0c929fa641fad6afd4d85619c579dd37a9e92bc
674
py
Python
Data Structures/DataStructures-Problems/Arrays/Litte Jhool and World Tour/littlejhool.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
26
2019-07-17T11:05:43.000Z
2022-02-06T08:31:40.000Z
Data Structures/DataStructures-Problems/Arrays/Litte Jhool and World Tour/littlejhool.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
7
2019-07-16T19:52:25.000Z
2022-01-08T08:03:44.000Z
Data Structures/DataStructures-Problems/Arrays/Litte Jhool and World Tour/littlejhool.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
19
2020-01-14T02:44:28.000Z
2021-12-27T17:31:59.000Z
if __name__ == '__main__': t=int(input()) while(t>0): flag = 1 (n,m) = map(int, input().split()) pos = dict() for i in range(m): (a,b) = map(int, input().split()) l=b-a if a<=b else n+b-a while(l>=0 and pos.get(a) is not None): ...
24.962963
51
0.313056
23e85589b33a6948cd14d63bb4afda1055f45d17
3,582
py
Python
src/main.py
TimmMoetz/blockchain-lab
02bb55cc201586dbdc8fdc252a32381f525e83ff
[ "RSA-MD" ]
2
2021-11-08T12:00:02.000Z
2021-11-12T18:37:52.000Z
src/main.py
TimmMoetz/blockchain-lab
02bb55cc201586dbdc8fdc252a32381f525e83ff
[ "RSA-MD" ]
null
null
null
src/main.py
TimmMoetz/blockchain-lab
02bb55cc201586dbdc8fdc252a32381f525e83ff
[ "RSA-MD" ]
1
2022-03-28T13:49:37.000Z
2022-03-28T13:49:37.000Z
import sys import os from Crypto.PublicKey import RSA from Crypto.Signature import * from network.node import P2PNode from network.conversations.transaction_validation import Transaction_Validation from network.conversations.block_download import Block_download from src.blockchain.block import Transaction, Block from s...
38.934783
116
0.538526
9b2049cb23fb1de930de01537b09afeb3286b964
230
py
Python
pyntcloud/geometry/models/base.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
pyntcloud/geometry/models/base.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
pyntcloud/geometry/models/base.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
from abc import ABC, abstractmethod class GeometryModel(ABC): @abstractmethod def from_k_points(self, points): pass @abstractmethod def get_projections(self, points, only_distances=False): pass
17.692308
60
0.695652
f1e5b19ff3dfe94e190ddf6085e79f91ba4d03cc
542
py
Python
___Python/Jonas/Python/p07_file_io/m00_rekursion.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Jonas/Python/p07_file_io/m00_rekursion.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Jonas/Python/p07_file_io/m00_rekursion.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
#Probleme in Teilprobleme unterteilen und so weiter # 1) Fakultät #iterative Definition # n! = 1*2*3 ... * (n-1) * n # 5! = 1*2*3*4*5(lise "5 fakultät") # 4! = 1*2*3*4 # 1! = 1 # 0! = 1 #rekursive Definition: # n! = n * (n-1)! für n >= 1 # 0! = 1 def fak(n): #rekursiv if n == 0: return 1 ...
18.689655
63
0.512915
c887083ac0f99d82881a8cbc3f287f43160dff06
2,163
py
Python
indl/data/augmentations.py
SachsLab/indl
531d2e0c2ee765004aedc553af40e258262f86cb
[ "Apache-2.0" ]
1
2021-02-22T01:39:50.000Z
2021-02-22T01:39:50.000Z
indl/data/augmentations.py
SachsLab/indl
531d2e0c2ee765004aedc553af40e258262f86cb
[ "Apache-2.0" ]
null
null
null
indl/data/augmentations.py
SachsLab/indl
531d2e0c2ee765004aedc553af40e258262f86cb
[ "Apache-2.0" ]
null
null
null
__all__ = ['random_slice', 'cast_type', 'add_depth_dim'] import tensorflow as tf def random_slice(X, y, training=True, max_offset=0, axis=1): """ Slice a tensor X along axis, beginning at a random offset up to max_offset, taking (X.shape[axis] - max_offset) samples. If training==False, this will tak...
30.9
91
0.602404
c8e3bc0aa76b6fc97e477afda6b4093229dd61c1
737
py
Python
python/pyqt/LearnPyQt/q_check_box.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pyqt/LearnPyQt/q_check_box.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pyqt/LearnPyQt/q_check_box.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import sys from PyQt5.QtCore import Qt from PyQt5.QtWidgets import ( QApplication, QMainWindow, QCheckBox, ) class MainWindow(QMainWindow): def __init__(self, *args, **kwargs): super(MainWindow, self).__init__(*args, **kwargs) self.setWindowTitle("Jayone's Awesome App") ...
21.057143
65
0.658073
b5264e0da5bef1595b84d98a88455bddd03f18d8
1,551
py
Python
libs/langdetectspacy/LangDetectSpacyDemo.py
surfmachine/language-detection
b44fbb4c7b59fc70388197653060cee67b5a2ee7
[ "MIT" ]
null
null
null
libs/langdetectspacy/LangDetectSpacyDemo.py
surfmachine/language-detection
b44fbb4c7b59fc70388197653060cee67b5a2ee7
[ "MIT" ]
null
null
null
libs/langdetectspacy/LangDetectSpacyDemo.py
surfmachine/language-detection
b44fbb4c7b59fc70388197653060cee67b5a2ee7
[ "MIT" ]
null
null
null
import spacy from spacy_langdetect import LanguageDetector nlp = spacy.load("en_core_web_sm") print("------------------------------------------------------------------------") print("Start LangDetectSpacyDemo") print("------------------------------------------------------------------------") nlp.add_pipe(LanguageDe...
28.2
197
0.567376
a914d73d10d2ac60dddb2a1406e5626aa8a547e5
1,941
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch08_binary_trees/solutions/ex01_traversals.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch08_binary_trees/solutions/ex01_traversals.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch08_binary_trees/solutions/ex01_traversals.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden from ch08_binary_trees.util import TreeUtils from ch08_binary_trees.intro import ExampleTrees def inorder(node, action): if node is None: return inorder(node.left, action) action(node.item) inorder(node.r...
19.029412
56
0.672334
a939b7128bb701389d6399b76bc3d2d1797dcce8
8,755
py
Python
pyconuk/views/__init__.py
OddBloke/2016.pyconuk.org
831d510a83c9cab8541198005c8024003b5049f5
[ "MIT" ]
null
null
null
pyconuk/views/__init__.py
OddBloke/2016.pyconuk.org
831d510a83c9cab8541198005c8024003b5049f5
[ "MIT" ]
null
null
null
pyconuk/views/__init__.py
OddBloke/2016.pyconuk.org
831d510a83c9cab8541198005c8024003b5049f5
[ "MIT" ]
null
null
null
import os import posixpath from django.contrib.staticfiles import finders from django.http import Http404 from django.shortcuts import get_object_or_404, render from django.utils.six.moves.urllib.parse import unquote from django.views import static from ..models import NewsItem, Page, Redirection, Session, Speaker, S...
25.599415
99
0.614049
a94e02d8f85fb7072e600e03f3239736fa5dc5c6
400
py
Python
python/data_sutram/pypath/PyPath/json_sqlite/8_get_stoppages_by_rec_boundary.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/data_sutram/pypath/PyPath/json_sqlite/8_get_stoppages_by_rec_boundary.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/data_sutram/pypath/PyPath/json_sqlite/8_get_stoppages_by_rec_boundary.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
""" OUTPUT : { "isJunction": "N", "isValid": "Y", "locationType": "STOP", "stopId": 1312, "stopLat": 22.640917, "stopLon": 88.432121, "stopName": "AIRPORT GATE NO 1 (AUTO STAND)" } This is a constant, so, Aim : get the minimum and t...
22.222222
125
0.5225
8d3691834156df0239fda62b743566763e223db5
7,127
py
Python
tp1/source/GraphSearch.py
ha2398/ia-tps
3696c92c8e2549aab6ac83da317cef8e15762eea
[ "MIT" ]
null
null
null
tp1/source/GraphSearch.py
ha2398/ia-tps
3696c92c8e2549aab6ac83da317cef8e15762eea
[ "MIT" ]
null
null
null
tp1/source/GraphSearch.py
ha2398/ia-tps
3696c92c8e2549aab6ac83da317cef8e15762eea
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ''' Trabalho Pratico 1: Inteligência Artificial Autor: Hugo Araujo de Sousa (2013007463) GraphSearch.py: Graph search template code. ''' from Node import Node import numpy as np import time class GraphSearch(): def __init__(self, initial, goal, problem_map): ''' Initialize the graph ...
22.202492
70
0.622843
8d8a0810b43dd4fe0e6eb14558be14b91a6a3944
25,501
py
Python
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/MetaSV-0.5-py2.7.egg/metasv.bak/generate_final_vcf.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.bak/generate_final_vcf.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/generate_final_vcf.py
poojavade/Genomics_Docker
829b5094bba18bbe03ae97daf925fee40a8476e8
[ "Apache-2.0" ]
2
2016-12-19T02:27:46.000Z
2019-07-29T02:53:54.000Z
import argparse import sys import datetime import os from collections import OrderedDict import json import base64 import logging from functools import partial import pybedtools import pysam import vcf import fasta_utils mydir = os.path.dirname(os.path.realpath(__file__)) vcf_template = os.path.join(mydir, "resources...
47.844278
169
0.608721
f5a0b4ee3f063afbca06f6aea8edfb434854e606
486
py
Python
DataProcess/utils/base_list.py
zhangupkai/RFID_Script
9e05fad86e71dc6bd5dd12650d369f13d5a835c8
[ "MIT" ]
null
null
null
DataProcess/utils/base_list.py
zhangupkai/RFID_Script
9e05fad86e71dc6bd5dd12650d369f13d5a835c8
[ "MIT" ]
null
null
null
DataProcess/utils/base_list.py
zhangupkai/RFID_Script
9e05fad86e71dc6bd5dd12650d369f13d5a835c8
[ "MIT" ]
null
null
null
# 生成功率列表 def get_power_list(): power_list = [] for x in range(0, 8): power = 24.0 + x power_list.append(power) return power_list # 生成频率列表 def get_freq_list(): freq_list = [] for x in range(0, 8): freq = 920.625 + x * 0.5 freq_list.append(freq) return freq_list ...
18.692308
34
0.578189
1919311d332f3158512e2ed925661d68d875779b
713
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex17_print_box.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex17_print_box.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex17_print_box.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden def print_box(width, height, fillchar): for y in range(height): for x in range(width): if x == 0 and (y == 0 or y == height - 1): print("+", end="") elif x == width - 1 and (y == ...
24.586207
64
0.443198
e309e3ed8ee2915c85ba56ca150c8ea43e85f20d
27,330
py
Python
research/cvtmodel/regnet/src/regnet_x_16gf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cvtmodel/regnet/src/regnet_x_16gf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cvtmodel/regnet/src/regnet_x_16gf.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...
60.59867
119
0.508782
474711dca7e015cc960b4c1b69b55599a6ce53e1
732
py
Python
campixx_2019_notebooks/helpers/code_toggle.py
Jonnyblacklabel/seo_campixx_2019
b91105fb85b2dab35780d6064a8a2f0f3f36440c
[ "MIT" ]
null
null
null
campixx_2019_notebooks/helpers/code_toggle.py
Jonnyblacklabel/seo_campixx_2019
b91105fb85b2dab35780d6064a8a2f0f3f36440c
[ "MIT" ]
2
2020-03-24T17:05:39.000Z
2020-03-31T02:10:24.000Z
campixx_2019_notebooks/helpers/code_toggle.py
Jonnyblacklabel/seo_campixx_2019
b91105fb85b2dab35780d6064a8a2f0f3f36440c
[ "MIT" ]
null
null
null
# ============================================================================= # Hide code toggle # ============================================================================= from IPython.display import HTML from IPython.display import display def main(): display(HTML(""" <script> code_show=true; functio...
25.241379
118
0.489071
d0f61a9ddcffc734b7ff4a2e2eff5da9be8725ce
420
py
Python
tarefas-poo/lista-03/enigma/model/enigma.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-03/enigma/model/enigma.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-03/enigma/model/enigma.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
# -------------------------- # UFSC - CTC - INE - INE5663 # Exercício Enigma # -------------------------- # Define a função que codifica e a que decodifica frases. # def codifica(frase, tabela): '''Codifica uma frase usando uma tabela de códigos. ''' return '8c7g$5#' def decodifica(frase, tabela): '...
22.105263
57
0.583333
efd4204a01d223bed3a24433df170d52f4ae2332
1,195
py
Python
projects/models/component.py
Matheus158257/projects
26a6148046533476e625a872a2950c383aa975a8
[ "Apache-2.0" ]
null
null
null
projects/models/component.py
Matheus158257/projects
26a6148046533476e625a872a2950c383aa975a8
[ "Apache-2.0" ]
null
null
null
projects/models/component.py
Matheus158257/projects
26a6148046533476e625a872a2950c383aa975a8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Component model.""" from datetime import datetime from sqlalchemy import Boolean, Column, DateTime, JSON, String, Text from sqlalchemy.sql import expression from ..database import Base from ..jupyter import read_parameters from ..utils import to_camel_case class Component(Base): __tab...
36.212121
90
0.720502
4be79df3615b58044e6133555ad05ed559b62751
5,008
py
Python
DataProcess/augmentation/tradition_augmentation.py
ZhangQiHang-98/RFID_Scirpt
0f74087add4cf16e2d201ad4f31cc1abd287db7e
[ "MIT" ]
3
2021-12-24T04:52:03.000Z
2021-12-27T02:14:49.000Z
DataProcess/augmentation/tradition_augmentation.py
ZhangQiHang-98/RFID_Scirpt
0f74087add4cf16e2d201ad4f31cc1abd287db7e
[ "MIT" ]
null
null
null
DataProcess/augmentation/tradition_augmentation.py
ZhangQiHang-98/RFID_Scirpt
0f74087add4cf16e2d201ad4f31cc1abd287db7e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ @File :tradition_augmentation.py @Author :Zhang Qihang @Date :2022/1/10 19:17 @Description : 传统的时序数据增强算法,根据2017年的ICMI整理而来 """ import numpy as np from scipy import interpolate from scipy.interpolate import CubicSpline # for warping from transforms3d.axangles imp...
32.309677
107
0.616014