hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
aebef7f18389f1bc898095c22cef8105f51f76c7
61,931
py
Python
examples/jirasearch/handle.py
Bingnum1/luceneserver
3cd784352e9fe0bbb9cf236a200ed20061c3314a
[ "Apache-2.0" ]
1
2021-01-23T09:06:51.000Z
2021-01-23T09:06:51.000Z
examples/jirasearch/handle.py
Bingnum1/luceneserver
3cd784352e9fe0bbb9cf236a200ed20061c3314a
[ "Apache-2.0" ]
null
null
null
examples/jirasearch/handle.py
Bingnum1/luceneserver
3cd784352e9fe0bbb9cf236a200ed20061c3314a
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
30.658911
217
0.540472
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
0
0
0
10,691
0
45,803
0
-96
1,316
6fb3319ecbd299b06e929aebe71749f66112ab97
3,138
py
Python
case_case.py
athityakumar/harvey
3102656e4adeb939217e9eb5b85e002a2fc84136
[ "MIT" ]
2
2019-02-08T22:24:41.000Z
2022-02-16T11:59:52.000Z
case_case.py
athityakumar/harvey
3102656e4adeb939217e9eb5b85e002a2fc84136
[ "MIT" ]
11
2019-02-05T11:53:05.000Z
2019-03-05T15:57:19.000Z
case_case.py
athityakumar/harvey
3102656e4adeb939217e9eb5b85e002a2fc84136
[ "MIT" ]
3
2019-03-02T15:09:35.000Z
2022-01-25T07:01:03.000Z
import networkx as nx G = init_graph("{}/all_citations.txt".format(DATADIR)).fetch_subgraph( query_type='case') print(len(G.nodes())) print(len(G.edges())) print(G.in_degree_distribution()) print(G.out_degree_distribution()) print('Average clustering coeff', nx.average_clustering(G)) print('Average in_degree'...
41.84
174
0.756533
import networkx as nx from models.case import Case from models.legal_knowledge_graph import LegalKnowledgeGraph from helpers import * from custom import * G = init_graph("{}/all_citations.txt".format(DATADIR)).fetch_subgraph( query_type='case') print(len(G.nodes())) print(len(G.edges())) print(G.in_degree_di...
0
0
0
0
0
0
0
45
89
6a803cec7a3a49196e6e4583c184c940972f3ced
1,177
py
Python
nlpblock/model/RNN_Attention.py
graykode/nlpblock
d7cd9e6d7a0ee401b8fecdbbf3a0ac60bdb3c0d7
[ "MIT" ]
3
2019-02-27T13:41:26.000Z
2021-05-13T07:02:39.000Z
nlpblock/model/RNN_Attention.py
graykode/nlpblock
d7cd9e6d7a0ee401b8fecdbbf3a0ac60bdb3c0d7
[ "MIT" ]
null
null
null
nlpblock/model/RNN_Attention.py
graykode/nlpblock
d7cd9e6d7a0ee401b8fecdbbf3a0ac60bdb3c0d7
[ "MIT" ]
3
2019-03-02T02:19:46.000Z
2021-10-03T18:46:52.000Z
import torch.nn as nn """ Example to run model = RNN_Attention(emb_dim=50, n_class=2, n_hidden=128, n_layers=1, bidirectional=False, linearTransform=True) output, attention = model( torch.rand([3, 5, 50]) # [batch, seq_len, emb_dim] ) print(output.shape, attention.shape) """
34.617647
121
0.665251
import torch import torch.nn as nn import nlpblock as nb class RNN_Attention(nn.Module): def __init__(self, emb_dim, n_class, n_hidden, n_layers=1, bidirectional=False, linearTransform=True): super(RNN_Attention, self).__init__() self.n_hidden = n_hidden self.num_direction...
0
0
0
812
0
0
0
-9
67
429702683092087dda7bd45ce349996c664998f9
2,387
py
Python
backend/apps/tophatter/router.py
ukibbb/goodmood-inc
006b3bb91125df15480b08832403ee22b10537ac
[ "MIT" ]
null
null
null
backend/apps/tophatter/router.py
ukibbb/goodmood-inc
006b3bb91125df15480b08832403ee22b10537ac
[ "MIT" ]
null
null
null
backend/apps/tophatter/router.py
ukibbb/goodmood-inc
006b3bb91125df15480b08832403ee22b10537ac
[ "MIT" ]
null
null
null
from fastapi import APIRouter from services.database.user_database import UserDatabase services = UserDatabase() tophatter = APIRouter(prefix="/tophatter")
29.109756
79
0.697528
import os from celery.result import AsyncResult from fastapi import APIRouter, Depends, Request from fastapi.responses import FileResponse, JSONResponse from services.calculators import TophatterCalculator from services.database.user_database import UserDatabase from services.mapper import TophatterMapper from service...
0
1,781
0
0
0
0
0
152
292
464015c029a4482be5a93282e61c8b2308f6ae53
1,506
py
Python
Desafio22.py
rsmelocunha/Python-projects
1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093
[ "MIT" ]
null
null
null
Desafio22.py
rsmelocunha/Python-projects
1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093
[ "MIT" ]
null
null
null
Desafio22.py
rsmelocunha/Python-projects
1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093
[ "MIT" ]
null
null
null
nome = input('Digite o nome completo da pessoa: ').strip() # usa-se o mtodo strip para retirar os espaos vazios antes e depois da frase print('O nome completo da pessoa em maisculo : ', nome.upper()) # usa o mtodo 'upper' para transformar toda a frase em maiscula print('O nome completo da pessoa em minsculo : ', nome....
115.846154
137
0.500664
nome = input('Digite o nome completo da pessoa: ').strip() # usa-se o método strip para retirar os espaços vazios antes e depois da frase print('O nome completo da pessoa em maiúsculo é: ', nome.upper()) # usa o método 'upper' para transformar toda a frase em maiúscula print('O nome completo da pessoa em minúsculo é: ...
44
0
0
0
0
0
0
0
0
0009e946b7b5b9f3e765ad2fd6103cf20ad6f912
6,645
py
Python
app/intro_py/intro/cli.py
thebridge0491/intro_py
c8ef32d8df10fa07a3c7b191474074b2dfd640c3
[ "CECILL-B" ]
null
null
null
app/intro_py/intro/cli.py
thebridge0491/intro_py
c8ef32d8df10fa07a3c7b191474074b2dfd640c3
[ "CECILL-B" ]
null
null
null
app/intro_py/intro/cli.py
thebridge0491/intro_py
c8ef32d8df10fa07a3c7b191474074b2dfd640c3
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- '''Command line interface module for intro_py-intro. ''' from __future__ import (absolute_import, division, print_function, unicode_literals) import os, sys import logging from future.builtins import (dict) from intro_py import util __all__ = ['main'] # -- run w/out compile -- # python...
32.414634
80
0.61836
# -*- coding: utf-8 -*- '''Command line interface module for intro_py-intro. ''' from __future__ import (absolute_import, division, print_function, unicode_literals) import os, sys, argparse, json import logging, inspect from future.builtins import (ascii, filter, hex, map, oct, zip, str, open, dict) from intro...
0
0
0
0
0
3,774
0
129
113
88e924dee2c792d20797021950f2e3dc5810c1c7
1,586
py
Python
src/validation/VersionDropout.py
lyonva/Nue
90680de00b0c76f6bfdbed71b785671e7c3a3f54
[ "Apache-2.0" ]
null
null
null
src/validation/VersionDropout.py
lyonva/Nue
90680de00b0c76f6bfdbed71b785671e7c3a3f54
[ "Apache-2.0" ]
null
null
null
src/validation/VersionDropout.py
lyonva/Nue
90680de00b0c76f6bfdbed71b785671e7c3a3f54
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd if __name__ == "__main__": versions = np.reshape(np.array( [1,1,1,2,2,2,2,3,3,3] ), (10,1)) data = np.reshape(np.zeros(100), (10, 10)) X = pd.DataFrame( np.append( versions, data, axis = 1 ), columns = ["version"] + [i for i in range(10)] ) y = pd.DataFrame(np.z...
36.883721
109
0.592055
from sklearn.model_selection import BaseCrossValidator import numpy as np import pandas as pd class VersionDropout(BaseCrossValidator): def __init__(self, n_repeats = 10, dropout = 0.3): self.n_repeats = n_repeats self.dropout = dropout # We dont implement this one def _iter_test_...
0
0
0
998
0
0
0
33
45
60f271887d5583280854a15c63199927894da99a
4,371
py
Python
lib/Phase3/alu_P3.py
prafgup/risc_v_assembler
ce2bea5f8e8b4f2ebb2f88aff1f0b2de5dc176b3
[ "MIT" ]
2
2020-07-23T16:57:04.000Z
2020-07-27T08:59:25.000Z
lib/Phase3/alu_P3.py
prafgup/risc_v_assembler
ce2bea5f8e8b4f2ebb2f88aff1f0b2de5dc176b3
[ "MIT" ]
null
null
null
lib/Phase3/alu_P3.py
prafgup/risc_v_assembler
ce2bea5f8e8b4f2ebb2f88aff1f0b2de5dc176b3
[ "MIT" ]
null
null
null
# format, name, destination register, source 1, data of source 1, IB in which data expected, source 2, data of source 2, IB in which data expected, immediate data, T_NT,stall #A=[format,name,rd,rs1,rs2,imm] #A=[format,name,rd,rs1,rs2,imm] # format, name, destination register, source 1, data of source 1, IB in whic...
16.683206
174
0.512011
def DTB(n): b=bin(n).replace("0b","") k=32-len(b) c="0"*k b=c+b return b def BTD(n): return int(n,2) # format, name, destination register, source 1, data of source 1, IB in which data expected, source 2, data of source 2, IB in which data expected, immediate data, T_NT,stall #A=[format,name,rd,rs1,rs2,imm...
0
0
0
0
0
3,211
0
0
210
467487ac228f1ed29b28cfee4341fb034f701791
3,348
py
Python
backend/forum/views.py
lautarianoo/lautacademy
beec082bdffe8c773fcec51974a687aced278a76
[ "BSD-3-Clause" ]
2
2021-11-29T15:34:24.000Z
2021-12-02T14:47:20.000Z
backend/forum/views.py
lautarianoo/lautacademy
beec082bdffe8c773fcec51974a687aced278a76
[ "BSD-3-Clause" ]
null
null
null
backend/forum/views.py
lautarianoo/lautacademy
beec082bdffe8c773fcec51974a687aced278a76
[ "BSD-3-Clause" ]
null
null
null
# class MessageCreate(LoginRequiredMixin, CreateView): # """ """ # model = Message # form_class = MessageForm # template_name = 'forum/topic-detail.html' # # def form_valid(self, form): # form.instance.user = self.request.user # form.instance.topic_id = self.kwargs.get("pk") ...
31.885714
103
0.669952
from datetime import datetime from django.shortcuts import redirect from django.urls import reverse_lazy from django.views.generic import ListView, View from django.views.generic.edit import CreateView, UpdateView from django.contrib.auth.mixins import LoginRequiredMixin from backend.forum.models import Category, Sec...
314
0
0
2,242
0
0
0
224
340
30c57ec5cfdd4cc03fe09d8e584165c9e0546fd3
195
py
Python
Desafio Python/Aula 23 des114.py
ayresmajor/Curso-python
006229cec38ea365bf43b19e3ce93fbd32e1dca6
[ "MIT" ]
null
null
null
Desafio Python/Aula 23 des114.py
ayresmajor/Curso-python
006229cec38ea365bf43b19e3ce93fbd32e1dca6
[ "MIT" ]
null
null
null
Desafio Python/Aula 23 des114.py
ayresmajor/Curso-python
006229cec38ea365bf43b19e3ce93fbd32e1dca6
[ "MIT" ]
null
null
null
import urllib import urllib.request try: site = urllib.request.urlopen('http://pudim.com.br/') except urllib.error.URLError: print('O site ardeu') else: print('Pode ir t tudo nice')
21.666667
57
0.702564
import urllib import urllib.request try: site = urllib.request.urlopen('http://pudim.com.br/') except urllib.error.URLError: print('O site ardeu') else: print('Pode ir tá tudo nice')
2
0
0
0
0
0
0
0
0
7b69b51615be9dc30924134e49ad37d51de6c157
35,658
py
Python
craton/api/v1/schemas.py
sigmavirus24/craton
911577978d9c67ed735fc87c4e36e9ddb01a78b3
[ "Apache-2.0" ]
null
null
null
craton/api/v1/schemas.py
sigmavirus24/craton
911577978d9c67ed735fc87c4e36e9ddb01a78b3
[ "Apache-2.0" ]
null
null
null
craton/api/v1/schemas.py
sigmavirus24/craton
911577978d9c67ed735fc87c4e36e9ddb01a78b3
[ "Apache-2.0" ]
null
null
null
DefinitionsHost = {'discriminator': 'name', 'required': ['name', 'region_id', 'ip_address', 'device_type'], 'type': 'object', 'properties': { ...
43.221818
79
0.391245
import six DefinitionsHost = {'discriminator': 'name', 'required': ['name', 'region_id', 'ip_address', 'device_type'], 'type': 'object', 'properties': { ...
0
40
0
911
0
2,784
0
-11
91
6e01753da913bb1f17997203ba999ed0c9230a2f
8,602
py
Python
modules/dialogPassword_ui.py
bcavlin/onering
becd3969e4e2ae4f3161221ace6d8912aad1c9ca
[ "Apache-2.0" ]
1
2017-10-14T01:47:30.000Z
2017-10-14T01:47:30.000Z
modules/dialogPassword_ui.py
bcavlin/onering
becd3969e4e2ae4f3161221ace6d8912aad1c9ca
[ "Apache-2.0" ]
null
null
null
modules/dialogPassword_ui.py
bcavlin/onering
becd3969e4e2ae4f3161221ace6d8912aad1c9ca
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './modules/dialogPassword.ui' # # Created by: PyQt4 UI code generator 4.12.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: try: ...
63.25
112
0.76273
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './modules/dialogPassword.ui' # # Created by: PyQt4 UI code generator 4.12.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: de...
0
0
0
7,910
0
200
0
0
101
d483b4213dcecfc34458e8d5770b083343438c72
88
py
Python
ontology/logistic_regression/sherlock/listify_circuits_k16_forward.py
ehbeam/neuro-knowledge-engine
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
[ "MIT" ]
15
2020-07-17T07:10:26.000Z
2022-02-18T05:51:45.000Z
ontology/neural_network/sherlock/listify_circuits_k16_forward.py
YifeiCAO/neuro-knowledge-engine
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
[ "MIT" ]
2
2022-01-14T09:10:12.000Z
2022-01-28T17:32:42.000Z
ontology/neural_network/sherlock/listify_circuits_k16_forward.py
YifeiCAO/neuro-knowledge-engine
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
[ "MIT" ]
4
2021-12-22T13:27:32.000Z
2022-02-18T05:51:47.000Z
#!/bin/python import listify_circuits listify_circuits.optimize_circuits(16, 'forward')
22
49
0.829545
#!/bin/python import listify_circuits listify_circuits.optimize_circuits(16, 'forward')
0
0
0
0
0
0
0
0
0
46b09847bebe5d7b83147bb9de7289ec119e929b
296
py
Python
setup.py
shuvamlal9/download_audioset
fdcc8baeaf1f6884b6e95ccacb1cd59603c8c973
[ "Apache-2.0" ]
58
2019-02-15T06:42:25.000Z
2022-02-07T05:44:48.000Z
setup.py
shuvamlal9/download_audioset
fdcc8baeaf1f6884b6e95ccacb1cd59603c8c973
[ "Apache-2.0" ]
7
2018-11-08T20:09:19.000Z
2021-09-03T12:35:19.000Z
setup.py
shuvamlal9/download_audioset
fdcc8baeaf1f6884b6e95ccacb1cd59603c8c973
[ "Apache-2.0" ]
18
2019-09-25T04:46:57.000Z
2021-08-04T11:54:40.000Z
''' Quick setup script. ''' import os os.system('brew install ffmpeg') os.system('brew install youtube-dl') modules=['ffmpy','pandas','soundfile','pafy', 'tqdm'] pip_install(modules)
21.142857
53
0.675676
''' Quick setup script. ''' import os def pip_install(modules): for i in range(len(modules)): os.system('pip3 install %s'%(modules[i])) os.system('brew install ffmpeg') os.system('brew install youtube-dl') modules=['ffmpy','pandas','soundfile','pafy', 'tqdm'] pip_install(modules)
0
0
0
0
0
88
0
0
23
bd31657dc3f392331c02e7aeee504595dddd7d6b
5,819
py
Python
codestosort/NaturalLanguage/module/tester.py
jimmy-academia/Deeper-Learnings
ac363efe5450dd2751c0c1bea0ee7af457f7ac24
[ "MIT" ]
2
2019-09-30T04:57:11.000Z
2020-04-06T04:27:46.000Z
codestosort/NaturalLanguage/module/tester.py
jimmy-academia/Deeper-Learnings
ac363efe5450dd2751c0c1bea0ee7af457f7ac24
[ "MIT" ]
null
null
null
codestosort/NaturalLanguage/module/tester.py
jimmy-academia/Deeper-Learnings
ac363efe5450dd2751c0c1bea0ee7af457f7ac24
[ "MIT" ]
null
null
null
import sys sys.path.append('datapreprocess') sys.path.append('module')
34.636905
102
0.562983
import os import sys import torch import logging import pickle import datetime from tqdm import tqdm sys.path.append('datapreprocess') sys.path.append('module') from datafunc import make_dataloader, test_data_for_predict, build_processed_data, make_validloader from model import LinearNet, RnnNet, RnnAttentionNet cla...
0
1,170
0
4,285
0
0
0
67
223
76a2c4c049f86c17dc660de2b14672bf68776fd2
467
py
Python
iiits/migrations/0021_auto_20160423_1110.py
IIITS/iiits.ac.in
fd1bcd656a2f1a038d331b005224c546998a23a6
[ "MIT" ]
6
2016-02-27T04:35:28.000Z
2020-06-09T04:18:38.000Z
iiits/migrations/0021_auto_20160423_1110.py
IIITS/iiits.ac.in
fd1bcd656a2f1a038d331b005224c546998a23a6
[ "MIT" ]
null
null
null
iiits/migrations/0021_auto_20160423_1110.py
IIITS/iiits.ac.in
fd1bcd656a2f1a038d331b005224c546998a23a6
[ "MIT" ]
5
2016-03-01T07:28:20.000Z
2021-01-19T10:51:58.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-04-23 11:10 from __future__ import unicode_literals
22.238095
60
0.627409
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-04-23 11:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('iiits', '0020_imageslider_researchcentreprofile'), ] operations = [ migrations...
0
0
0
291
0
0
0
19
46
1cea88c1648db23639f82885fc29e436b37f54cf
345
py
Python
python/setup.py
Impavidity/pinfrastructure
b5577fe1e140e0b360aec2834349ba87647eb000
[ "MIT" ]
10
2017-12-04T03:50:50.000Z
2020-09-25T07:24:32.000Z
python/setup.py
Impavidity/pinfrastructure
b5577fe1e140e0b360aec2834349ba87647eb000
[ "MIT" ]
8
2018-07-14T09:45:38.000Z
2018-09-17T20:56:52.000Z
python/setup.py
Impavidity/pinfrastructure
b5577fe1e140e0b360aec2834349ba87647eb000
[ "MIT" ]
1
2017-11-24T18:31:53.000Z
2017-11-24T18:31:53.000Z
from setuptools import find_packages, setup setup( name='pbase', version='0.0.1', author='Peng Shi', author_email='peng_shi@outlook.com', description='framework for deep learning applications', url='https://github.com/Impavidity/pbase', license='MIT', install_requires=[ ], pac...
20.294118
59
0.669565
from setuptools import find_packages, setup setup( name='pbase', version='0.0.1', author='Peng Shi', author_email='peng_shi@outlook.com', description='framework for deep learning applications', url='https://github.com/Impavidity/pbase', license='MIT', install_requires=[ ], pac...
0
0
0
0
0
0
0
0
0
90016a8b27c1095766448f52872ada34f0d5ea62
1,499
py
Python
web/migrations/versions/4cbe8e432c6b_add_action_table.py
skystrife/piazza-roles
be1c45fa9b8ecd75e41dc005d4eb7ec5c645d980
[ "MIT" ]
null
null
null
web/migrations/versions/4cbe8e432c6b_add_action_table.py
skystrife/piazza-roles
be1c45fa9b8ecd75e41dc005d4eb7ec5c645d980
[ "MIT" ]
null
null
null
web/migrations/versions/4cbe8e432c6b_add_action_table.py
skystrife/piazza-roles
be1c45fa9b8ecd75e41dc005d4eb7ec5c645d980
[ "MIT" ]
null
null
null
"""Add Action table. Revision ID: 4cbe8e432c6b Revises: 7b08cf35abd9 Create Date: 2018-07-27 20:05:30.976453 """ # revision identifiers, used by Alembic. revision = '4cbe8e432c6b' down_revision = '7b08cf35abd9' branch_labels = None depends_on = None
31.229167
75
0.668446
"""Add Action table. Revision ID: 4cbe8e432c6b Revises: 7b08cf35abd9 Create Date: 2018-07-27 20:05:30.976453 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '4cbe8e432c6b' down_revision = '7b08cf35abd9' branch_labels = None depends_on = None def upgrade(): ...
0
0
0
0
0
1,150
0
3
90
bb841a9f17b94bb83e50a9e9c80862e3e8d31edf
10,825
py
Python
src/sqlalchemyseed/seeder.py
jedymatt/sqlalchemyseed
2bb18889ac958df525afc235f52d7e4bfa7f12f8
[ "MIT" ]
5
2021-07-27T18:06:12.000Z
2021-12-26T06:12:07.000Z
src/sqlalchemyseed/seeder.py
jedymatt/sqlalchemyseed
2bb18889ac958df525afc235f52d7e4bfa7f12f8
[ "MIT" ]
5
2021-08-28T00:54:15.000Z
2022-01-19T12:42:24.000Z
src/sqlalchemyseed/seeder.py
jedymatt/sqlalchemyseed
2bb18889ac958df525afc235f52d7e4bfa7f12f8
[ "MIT" ]
1
2021-08-08T14:35:02.000Z
2021-08-08T14:35:02.000Z
""" MIT License Copyright (c) 2021 Jedy Matt Tabasco Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
32.41018
98
0.661247
""" MIT License Copyright (c) 2021 Jedy Matt Tabasco Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
0
1,286
0
7,341
0
629
0
116
363
c6ae817802838c9c1fcaecb00a60b1cdde36ad6c
1,024
py
Python
strongr/schedulerdomain/model/scalingdrivers/scalingdriver.py
bigr-erasmusmc/StrongR
48573e170771a251f629f2d13dba7173f010a38c
[ "Apache-2.0" ]
null
null
null
strongr/schedulerdomain/model/scalingdrivers/scalingdriver.py
bigr-erasmusmc/StrongR
48573e170771a251f629f2d13dba7173f010a38c
[ "Apache-2.0" ]
null
null
null
strongr/schedulerdomain/model/scalingdrivers/scalingdriver.py
bigr-erasmusmc/StrongR
48573e170771a251f629f2d13dba7173f010a38c
[ "Apache-2.0" ]
null
null
null
import dependency_injector.containers as containers import dependency_injector.providers as providers
51.2
381
0.805664
import dependency_injector.containers as containers import dependency_injector.providers as providers import strongr.core from strongr.schedulerdomain.model.scalingdrivers.nullscaler import NullScaler from strongr.schedulerdomain.model.scalingdrivers.simplescaler import SimpleScaler from strongr.schedulerdomain.model...
0
0
0
624
0
0
0
184
113
f9a6ef735c3f7d5839603fb65b8f00b4e1d4343e
4,124
py
Python
backend/post/serializers.py
tecty/SENG2021
f04c58b61c8ad44e776a0a1694a77a1b9b6eed6a
[ "MIT" ]
null
null
null
backend/post/serializers.py
tecty/SENG2021
f04c58b61c8ad44e776a0a1694a77a1b9b6eed6a
[ "MIT" ]
null
null
null
backend/post/serializers.py
tecty/SENG2021
f04c58b61c8ad44e776a0a1694a77a1b9b6eed6a
[ "MIT" ]
null
null
null
# class PostSerializer(serializers.Serializer): # id = serializers.IntegerField(read_only = True) # title = serializers.CharField(max_length = 255) # detail = serializers.CharField(max_length = 2047) # def create(self,validated_data): # """create a Post from json""" # return Post.obj...
32.730159
78
0.606208
from rest_framework import serializers from .models import Post, Location, Tag,Photo # class PostSerializer(serializers.Serializer): # id = serializers.IntegerField(read_only = True) # title = serializers.CharField(max_length = 255) # detail = serializers.CharField(max_length = 2047) # def create(se...
0
0
0
3,341
0
0
0
41
136
44399eb4722e282205d533abf1009cd04c03e3f2
861
py
Python
setup.py
limdongjin/smart-crawler
bc5f4f78528ae28cb7cf5f33515c3353aa72169f
[ "MIT" ]
1
2019-09-08T22:04:55.000Z
2019-09-08T22:04:55.000Z
setup.py
limdongjin/smart-crawller
bc5f4f78528ae28cb7cf5f33515c3353aa72169f
[ "MIT" ]
1
2021-06-02T00:20:16.000Z
2021-06-02T00:20:16.000Z
setup.py
limdongjin/smart-crawller
bc5f4f78528ae28cb7cf5f33515c3353aa72169f
[ "MIT" ]
1
2020-08-15T12:27:58.000Z
2020-08-15T12:27:58.000Z
from setuptools import setup, find_packages setup( name='smart-crawler', version='0.2', url='https://github.com/limdongjin/smart-crawler', license='MIT', author='limdongjin', author_email='geniuslim27@gmail.com', description='Smart Crawler', packages=find_packages(), long_descript...
25.323529
60
0.54007
import io from setuptools import setup, find_packages def long_description(): with io.open('README.md', 'r', encoding='utf-8') as f: readme = f.read() return readme setup( name='smart-crawler', version='0.2', url='https://github.com/limdongjin/smart-crawler', license='MIT', autho...
0
0
0
0
0
105
0
-12
45
d8db5ebb95e08d462648397b5a96142b82994143
838
py
Python
solar/solar.py
laluferu/hw_7
8f8fa38695d23a6aaa97fed7facc6bf03481c03d
[ "MIT" ]
null
null
null
solar/solar.py
laluferu/hw_7
8f8fa38695d23a6aaa97fed7facc6bf03481c03d
[ "MIT" ]
null
null
null
solar/solar.py
laluferu/hw_7
8f8fa38695d23a6aaa97fed7facc6bf03481c03d
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np tray = np.genfromtxt("solar.dat",delimiter=",") a = tray[:,0] b = tray[:,1] c = tray[:,2] d = tray[:,3] fig = plt.figure(figsize = (20,20)) plt.subplot(2,3,1) plt.scatter(a,b) plt.title('Grafica a vs b ') plt.xlabel('a' ) plt.ylabel('b' ) plt.subplot(2,3,2) pl...
15.518519
47
0.632458
import matplotlib.pyplot as plt import numpy as np tray = np.genfromtxt("solar.dat",delimiter=",") a = tray[:,0] b = tray[:,1] c = tray[:,2] d = tray[:,3] fig = plt.figure(figsize = (20,20)) plt.subplot(2,3,1) plt.scatter(a,b) plt.title('Grafica a vs b ') plt.xlabel('a' ) plt.ylabel('b' ) plt.subplot(2,3,2) pl...
0
0
0
0
0
0
0
0
0
b6735ebf0a44f6ae0930212653b892df8d69005a
4,767
py
Python
pmtc/pmtc_csgo.py
amosbastian/mhp
97bfd505a1b2925b384246689e09abf6c296f598
[ "MIT" ]
1
2021-12-15T09:29:05.000Z
2021-12-15T09:29:05.000Z
pmtc/pmtc_csgo.py
amosbastian/mhp
97bfd505a1b2925b384246689e09abf6c296f598
[ "MIT" ]
3
2021-01-08T08:55:23.000Z
2021-12-13T19:42:46.000Z
pmtc/pmtc_csgo.py
amosbastian/mhp
97bfd505a1b2925b384246689e09abf6c296f598
[ "MIT" ]
2
2020-06-20T21:14:55.000Z
2020-07-15T18:19:06.000Z
import json import pycountry import requests import sys import os from bs4 import BeautifulSoup from collections import namedtuple directory = os.path.dirname(os.path.abspath(__file__)) def create_players(table): """ Loop through given table and create Player objects with the following attributes: ...
30.557692
79
0.591777
import json import pycountry import requests import sys import os from bs4 import BeautifulSoup from collections import namedtuple directory = os.path.dirname(os.path.abspath(__file__)) def create_players(table): """ Loop through given table and create Player objects with the following attributes: ...
0
0
0
0
0
116
0
0
23
e54d408698a4c259a13050d9e1d7580f64ca0679
6,620
py
Python
common/src/build-data/scripts/dist.py
ane-community/botan-crypto-ane
71056f5f0d5fd706e6d42e2f7ec0f7f55d86fb74
[ "MIT" ]
1
2018-03-09T20:21:47.000Z
2018-03-09T20:21:47.000Z
common/src/build-data/scripts/dist.py
ane-community/botan-crypto-ane
71056f5f0d5fd706e6d42e2f7ec0f7f55d86fb74
[ "MIT" ]
null
null
null
common/src/build-data/scripts/dist.py
ane-community/botan-crypto-ane
71056f5f0d5fd706e6d42e2f7ec0f7f55d86fb74
[ "MIT" ]
null
null
null
#!/usr/bin/python """ Release script for botan (http://botan.randombit.net/) (C) 2011, 2012 Jack Lloyd Distributed under the terms of the Botan license """ import logging import sys if __name__ == '__main__': try: sys.exit(main()) except Exception as e: logging.error(e) import traceb...
28.782609
90
0.573867
#!/usr/bin/python """ Release script for botan (http://botan.randombit.net/) (C) 2011, 2012 Jack Lloyd Distributed under the terms of the Botan license """ import errno import logging import optparse import os import shlex import StringIO import shutil import subprocess import sys import tarfile def check_subproce...
0
0
0
0
3,890
2,041
0
-61
361
1df314dca28913ceda289e2ee311b3e80def76d2
2,023
py
Python
tab.py
sarrionandia/tournatrack
4c13a23f43da5317eea4614870a7a8510fc540ec
[ "Apache-2.0" ]
1
2015-08-13T14:35:11.000Z
2015-08-13T14:35:11.000Z
tab.py
sarrionandia/tournatrack
4c13a23f43da5317eea4614870a7a8510fc540ec
[ "Apache-2.0" ]
null
null
null
tab.py
sarrionandia/tournatrack
4c13a23f43da5317eea4614870a7a8510fc540ec
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Roberto Brian Sarrionandia # # 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 t...
27.712329
74
0.687593
# Copyright 2014 Roberto Brian Sarrionandia # # 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 t...
0
0
0
1,049
0
0
0
17
91
b6de34c73f637ea19a9f7821a4d1cb53b0ef6313
1,254
py
Python
jiangrong/jit-block.py
ronjian/once-for-all
6d0a76be5007fda31c8b366a51f23b626bb8f24c
[ "Apache-2.0" ]
null
null
null
jiangrong/jit-block.py
ronjian/once-for-all
6d0a76be5007fda31c8b366a51f23b626bb8f24c
[ "Apache-2.0" ]
null
null
null
jiangrong/jit-block.py
ronjian/once-for-all
6d0a76be5007fda31c8b366a51f23b626bb8f24c
[ "Apache-2.0" ]
null
null
null
import torch import sys; sys.path.append("/workspace/once-for-all") from ofa.model_zoo import MobileInvertedResidualBlock from ofa.layers import ConvLayer, PoolingLayer, LinearLayer block_config = { "name": "MobileInvertedResidualBlock", "mobile_inverted_conv": { "name": "MBIn...
33.891892
70
0.500797
import torch import sys; sys.path.append("/workspace/once-for-all") from ofa.model_zoo import MobileInvertedResidualBlock from ofa.layers import ConvLayer, PoolingLayer, LinearLayer, block_config = { "name": "MobileInvertedResidualBlock", "mobile_inverted_conv": { "name": "MBI...
0
0
0
0
0
0
0
1
0
29647b3a757c29b49e6efec66afbc1819cb55c41
291
py
Python
build/lib/ctrlengine/__init__.py
0xJeremy/ctrl.engine
19abba70df149a05edc5722cc95ceacc538448e6
[ "MIT" ]
3
2020-04-18T19:28:15.000Z
2021-02-25T18:48:08.000Z
build/lib/ctrlengine/__init__.py
0xJeremy/ctrl.engine
19abba70df149a05edc5722cc95ceacc538448e6
[ "MIT" ]
null
null
null
build/lib/ctrlengine/__init__.py
0xJeremy/ctrl.engine
19abba70df149a05edc5722cc95ceacc538448e6
[ "MIT" ]
null
null
null
from .controllers.pid import PID_ctrl PID = PID_ctrl from .filters.sma import simple_moving_average SMA = simple_moving_average from .filters.ewma import exponentially_weighted_moving_average EWMA = exponentially_weighted_moving_average from .sensors.camera import camera camera = camera
24.25
63
0.852234
from .controllers.pid import PID_ctrl PID = PID_ctrl from .filters.sma import simple_moving_average SMA = simple_moving_average from .filters.ewma import exponentially_weighted_moving_average EWMA = exponentially_weighted_moving_average from .sensors.camera import camera camera = camera
0
0
0
0
0
0
0
0
0
f1f48ef92a9073f542579d5b744ac993e40d285d
2,480
py
Python
clef/clef_dataloaders/clef_paths.py
ogaloglu/pre-training-multilingual-document-encoders
6cfd31c42bf9e9368a01f7a57489413b0dd8e8a3
[ "Apache-2.0" ]
null
null
null
clef/clef_dataloaders/clef_paths.py
ogaloglu/pre-training-multilingual-document-encoders
6cfd31c42bf9e9368a01f7a57489413b0dd8e8a3
[ "Apache-2.0" ]
null
null
null
clef/clef_dataloaders/clef_paths.py
ogaloglu/pre-training-multilingual-document-encoders
6cfd31c42bf9e9368a01f7a57489413b0dd8e8a3
[ "Apache-2.0" ]
null
null
null
CLEF_BASE_DIR = "/work/ogalolu/data/clef/" CLEF_LOWRES_DIR = "" if not CLEF_BASE_DIR: raise FileNotFoundError(f"Download CLEF and set CLEF_BASE_DIR in {__file__}") # # CLEF paths # PATH_BASE_QUERIES = CLEF_BASE_DIR + "Topics/" PATH_BASE_DOCUMENTS = CLEF_BASE_DIR + "DocumentData/" PATH_BASE_EVAL = CLEF_BASE_DIR + "...
42.033898
106
0.719355
from clef_extractors import * CLEF_BASE_DIR = "/work/ogalolu/data/clef/" CLEF_LOWRES_DIR = "" if not CLEF_BASE_DIR: raise FileNotFoundError(f"Download CLEF and set CLEF_BASE_DIR in {__file__}") # # CLEF paths # PATH_BASE_QUERIES = CLEF_BASE_DIR + "Topics/" PATH_BASE_DOCUMENTS = CLEF_BASE_DIR + "DocumentData/" PATH...
0
0
0
0
0
84
0
8
44
0efa9312381966faa89ed0b842c0044959a6f17f
81
py
Python
src/parameters.py
brenorms/ispy-hijackdet
e9d95c2c287406769ba4382928f126abc5faa75c
[ "MIT" ]
null
null
null
src/parameters.py
brenorms/ispy-hijackdet
e9d95c2c287406769ba4382928f126abc5faa75c
[ "MIT" ]
null
null
null
src/parameters.py
brenorms/ispy-hijackdet
e9d95c2c287406769ba4382928f126abc5faa75c
[ "MIT" ]
null
null
null
DESTINATION = "dest" ROUTE = "route" TIMESTAMP = "time" INCOMPLETE = "incomplete"
20.25
25
0.716049
DESTINATION = "dest" ROUTE = "route" TIMESTAMP = "time" INCOMPLETE = "incomplete"
0
0
0
0
0
0
0
0
0
899565351183ed11982ca23bd721f826d9db3dc3
10,726
py
Python
legtool/async/asyncio_qt.py
jpieper/legtool
ab3946051bd16817b61d3073ce7be8bd27af90d0
[ "Apache-2.0" ]
10
2015-09-23T19:28:06.000Z
2021-04-27T02:32:27.000Z
legtool/async/asyncio_qt.py
jpieper/legtool
ab3946051bd16817b61d3073ce7be8bd27af90d0
[ "Apache-2.0" ]
null
null
null
legtool/async/asyncio_qt.py
jpieper/legtool
ab3946051bd16817b61d3073ce7be8bd27af90d0
[ "Apache-2.0" ]
9
2015-10-16T07:26:18.000Z
2021-01-13T07:18:35.000Z
# Copyright 2014 Josh Pieper, jjp@pobox.com. # # 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...
32.113772
78
0.580832
# Copyright 2014 Josh Pieper, jjp@pobox.com. # # 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...
0
2,561
0
7,163
0
0
0
-22
224
43b5ac3a72f9f95842b15538afd7bc1f2c01b85a
409
py
Python
tests/test_route53.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
tests/test_route53.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
tests/test_route53.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
import unittest if __name__ == "__main__": unittest.main()
27.266667
86
0.738386
import unittest from troposphere.route53 import AliasTarget class TestAliasTarget(unittest.TestCase): def test_bucket_template(self): AliasTarget("zone", "dnsname", True) AliasTarget(hostedzoneid="zone", dnsname="dnsname", evaluatetargethealth=True) AliasTarget(HostedZoneId="zone", DNSNam...
0
0
0
275
0
0
0
22
46
31e0663dbc76bff63285d4bb8f3f2e71fbc4584c
8,143
py
Python
mmdeploy/apis/onnx/partition.py
grimoire/mmdeploy
e84bc30f4a036dd19cb3af854203922a91098e84
[ "Apache-2.0" ]
746
2021-12-27T10:50:28.000Z
2022-03-31T13:34:14.000Z
mmdeploy/apis/onnx/partition.py
grimoire/mmdeploy
e84bc30f4a036dd19cb3af854203922a91098e84
[ "Apache-2.0" ]
253
2021-12-28T05:59:13.000Z
2022-03-31T18:22:25.000Z
mmdeploy/apis/onnx/partition.py
grimoire/mmdeploy
e84bc30f4a036dd19cb3af854203922a91098e84
[ "Apache-2.0" ]
147
2021-12-27T10:50:33.000Z
2022-03-30T10:44:20.000Z
# Copyright (c) OpenMMLab. All rights reserved. import onnx import onnx.helper
39.529126
79
0.557534
# Copyright (c) OpenMMLab. All rights reserved. from typing import Dict, Iterable, Optional, Union import onnx import onnx.helper import onnx.utils from mmdeploy.apis.core import PIPELINE_MANAGER from mmdeploy.core.optimizers import (attribute_to_dict, create_extractor, get_new_n...
0
7,655
0
0
0
0
0
273
134
5d7f2e56aabd9c24bae1c58515d40f566137a253
30,722
py
Python
Utilities/Data_Retrieval.py
MaximilianJanetschek/Urban_Intermodal_Transportation
632caf668636448dc9290d54cf1c7b527c68a957
[ "MIT" ]
null
null
null
Utilities/Data_Retrieval.py
MaximilianJanetschek/Urban_Intermodal_Transportation
632caf668636448dc9290d54cf1c7b527c68a957
[ "MIT" ]
null
null
null
Utilities/Data_Retrieval.py
MaximilianJanetschek/Urban_Intermodal_Transportation
632caf668636448dc9290d54cf1c7b527c68a957
[ "MIT" ]
null
null
null
def chunks(lst, n): """Yield successive n-sized chunks from lst.""" return [lst[x:x+n] for x in range(0, len(lst), n)]
48.229199
163
0.571252
import multiprocessing import os from joblib import delayed, Parallel from Utilities.OSMnx_Utility import * from Utilities.GTFS_Utility import * from Utilities.General_Function import * from Utilities.Data_Manipulation import * import copy import time import tqdm class InstanceNetwork: """ The 'InstanceNetw...
0
0
0
29,358
0
895
0
44
291
9f26d6035b6573e34596eb9fde7c872ffce0a295
834
py
Python
Python3-Exercises/P4_BasicPrototype/create_table.py
anliven/Reading-Code-Learning-Python
a814cab207bbaad6b5c69b9feeb8bf2f459baf2b
[ "Apache-2.0" ]
null
null
null
Python3-Exercises/P4_BasicPrototype/create_table.py
anliven/Reading-Code-Learning-Python
a814cab207bbaad6b5c69b9feeb8bf2f459baf2b
[ "Apache-2.0" ]
null
null
null
Python3-Exercises/P4_BasicPrototype/create_table.py
anliven/Reading-Code-Learning-Python
a814cab207bbaad6b5c69b9feeb8bf2f459baf2b
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import sqlite3 conn = sqlite3.connect('TempTest.db') # db curs = conn.cursor() # curs.execute(''' CREATE TABLE messages ( id integer primary key autoincrement, subject text not null, sender text not null, reply_to int, text text not null ) ''') # SQL ...
29.785714
98
0.645084
# coding=utf-8 import sqlite3 conn = sqlite3.connect('TempTest.db') # 如果db文件不存在将自动创建 curs = conn.cursor() # 从连接获得游标 curs.execute(''' CREATE TABLE messages ( id integer primary key autoincrement, subject text not null, sender text not null, reply_to int, text text not ...
153
0
0
0
0
0
0
0
0
518d85a3aef403f601f2a5017033b27fa0b6353e
670
py
Python
Advance_Python/Threads/Interface.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
Advance_Python/Threads/Interface.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
Advance_Python/Threads/Interface.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
# Interface a = Army() af = AirForce() n = Navy() a.area() a.gun() print() af.area() af.gun() print() n.area() n.gun()
12.884615
35
0.565672
# Interface from abc import ABC, abstractmethod class DefenceForce(ABC): @abstractmethod def gun(self): pass @abstractmethod def area(self): pass class Army(DefenceForce): def gun(self): print("Gun : AK47") def area(self): print("Area : Land") class AirFor...
0
53
0
312
0
0
0
14
169
066da45179243a03d94f2d09baf50607a017d988
2,479
py
Python
validation/validation_data_parser.py
djgroen/FabCovid
9449f2a9ac5562c28bb7d25c2b772daba4930e21
[ "BSD-3-Clause" ]
null
null
null
validation/validation_data_parser.py
djgroen/FabCovid
9449f2a9ac5562c28bb7d25c2b772daba4930e21
[ "BSD-3-Clause" ]
null
null
null
validation/validation_data_parser.py
djgroen/FabCovid
9449f2a9ac5562c28bb7d25c2b772daba4930e21
[ "BSD-3-Clause" ]
null
null
null
if __name__ == '__main__': update_validation_data(force=True) print('Done')
33.5
87
0.498992
import pandas as pd import os def get_region_names(): path = '../config_files' return os.listdir(path) def get_validation_names(): path = 'raw_data' d = os.listdir(path) d = list(set(['_'.join(x.split('_')[:-1]) for x in d])) return d def update_validation_data(regions='all', force=False): ...
0
0
0
0
0
2,295
0
-14
113
97b8adc68cda8f76e6a472a5ea0c1148ad16237a
4,241
py
Python
auto.py
Angel-cuba/Painonhallinta_LAST
c7176dca2b5812470667e07357ffcfecff5f3ba4
[ "CC0-1.0" ]
null
null
null
auto.py
Angel-cuba/Painonhallinta_LAST
c7176dca2b5812470667e07357ffcfecff5f3ba4
[ "CC0-1.0" ]
null
null
null
auto.py
Angel-cuba/Painonhallinta_LAST
c7176dca2b5812470667e07357ffcfecff5f3ba4
[ "CC0-1.0" ]
null
null
null
# Auto-luokka yliluokka erilaisille autotyypeille # Ominaisuudet (Field, Property) merkki, malli, vuosimalli, kilometrit, kyttvoima, vaihteistotyyppi, vri ja if __name__ == '__main__': henkiloauto1 = Henkiloauto('ABC-12', 'Ferrary', 'Land', 2020, 354322, 'diesel', 'automaatti', 'punainen', 270, 2.8, 4000, 7, 5...
39.268519
193
0.656685
# Auto-luokka yliluokka erilaisille autotyypeille # Ominaisuudet (Field, Property) merkki, malli, vuosimalli, kilometrit, käyttövoima, vaihteistotyyppi, väri ja class Auto(): # Olionmuodostin eli knstruktori def __init__(self, rek, merkki, malli, vm, km, kvoima, vaihteito, vari, paastot, s_tilavuus, hin...
92
537
0
2,745
0
0
0
0
46
92d78602e71ff019637a48c3901e7b88a151aaae
3,475
py
Python
BaseEditor.py
Demezy/SpeedSearch
dc25090d2e30ecc1f669a3a6c9d7a2277fd9ca32
[ "BSD-3-Clause" ]
null
null
null
BaseEditor.py
Demezy/SpeedSearch
dc25090d2e30ecc1f669a3a6c9d7a2277fd9ca32
[ "BSD-3-Clause" ]
null
null
null
BaseEditor.py
Demezy/SpeedSearch
dc25090d2e30ecc1f669a3a6c9d7a2277fd9ca32
[ "BSD-3-Clause" ]
null
null
null
def cursore_maker(method): """, , """ return wrapper if __name__ == '__main__': from Searcher import FileWorker base = SQLWorker() # , file = FileWorker('./test') base.make_table() base.fill_the_table(file.list_of_files) print(base.search_except_parameter('flag')) #...
36.968085
118
0.640288
import os import sqlite3 def cursore_maker(method): """Декоратор, создающий курсор, для работы с бд""" def wrapper(self, *args, **kwargs): with sqlite3.connect(self.name) as base: cur = base.cursor() return_value = method(self, cur, *args, **kwargs) base.commit() ...
1,502
1,504
0
603
0
211
0
-19
94
c5d1d1b86bf3bdcb3ec08d34977098d33c7f38d4
9,846
py
Python
layers.py
Gladys-Zhao/mRNN-mLSTM
23499f237ea8b0f68c96f756fbf0f4028836e64c
[ "BSD-3-Clause" ]
15
2020-06-17T06:40:00.000Z
2021-11-18T09:08:23.000Z
layers.py
Gladys-Zhao/mRNN-mLSTM
23499f237ea8b0f68c96f756fbf0f4028836e64c
[ "BSD-3-Clause" ]
null
null
null
layers.py
Gladys-Zhao/mRNN-mLSTM
23499f237ea8b0f68c96f756fbf0f4028836e64c
[ "BSD-3-Clause" ]
3
2020-07-17T09:00:44.000Z
2021-11-18T09:08:24.000Z
#Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. #This program is free software; you can redistribute it and/or modify it under the terms of the BSD 3-Clause License. #This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty...
42.808696
228
0.591205
#Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. #This program is free software; you can redistribute it and/or modify it under the terms of the BSD 3-Clause License. #This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty...
0
0
0
9,212
0
0
0
15
171
aa9bc77eb78bd2c1fefa580f9e9e571616cbb9c0
9,384
py
Python
train_procgen/policies.py
yanlai00/train-procgen
9785eb8945f55e1c30ed50fe33345405688ed6d8
[ "MIT" ]
null
null
null
train_procgen/policies.py
yanlai00/train-procgen
9785eb8945f55e1c30ed50fe33345405688ed6d8
[ "MIT" ]
null
null
null
train_procgen/policies.py
yanlai00/train-procgen
9785eb8945f55e1c30ed50fe33345405688ed6d8
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from baselines.a2c.utils import conv, fc, conv_to_fc def impala_cnn(images, depths=[16, 32, 32], use_batch_norm=True, dropout=0): """ Model used in the paper "IMPALA: Scalable Distributed Deep-RL with Importance Weighted Actor-Learner Architectures" https://arxiv...
36.092308
154
0.62159
import numpy as np import tensorflow as tf from baselines.a2c.utils import conv, fc, conv_to_fc from baselines.common.distributions import make_pdtype from baselines.common.input import observation_input def impala_cnn(images, depths=[16, 32, 32], use_batch_norm=True, dropout=0): """ Model used in the paper "I...
0
0
0
2,996
0
3,462
0
64
356
a4e036509faa2256a7a9e09c740aa8cc9007b65a
1,704
py
Python
examples/irp_wind/Hornsrev_aep.py
DTUWindEnergy/TopFarm2
cba70b20431f7a828370447117fe2e7533edf7c2
[ "MIT" ]
4
2019-02-18T08:46:00.000Z
2021-01-28T06:35:52.000Z
examples/irp_wind/Hornsrev_aep.py
DTUWindEnergy/TopFarm2
cba70b20431f7a828370447117fe2e7533edf7c2
[ "MIT" ]
1
2019-11-26T12:12:12.000Z
2019-11-26T12:12:12.000Z
examples/irp_wind/Hornsrev_aep.py
DTUWindEnergy/TopFarm2
cba70b20431f7a828370447117fe2e7533edf7c2
[ "MIT" ]
8
2019-01-14T09:33:26.000Z
2021-06-30T11:56:03.000Z
import os from topfarm.cost_models.fuga import py_fuga fuga_path = os.path.abspath(os.path.dirname(py_fuga.__file__)) + '/Colonel/' if __name__ == '__main__': print(HornsrevAEP_Fuga()) print(HornsrevAEP_FUSEDWake_GCL())
42.6
116
0.72946
import os from fusedwake import fusedwake import numpy as np from topfarm.cost_models.fuga import py_fuga from topfarm.cost_models.fuga.py_fuga import PyFuga from topfarm.cost_models.fused_wake_wrappers import FusedWakeGCLWakeModel from topfarm.cost_models.utils.aep_calculator import AEPCalculator from topfarm.cost_mod...
0
0
0
0
0
1,059
0
212
200
7cc174b27a3a5124410ce82ecece72d829e47756
9,973
py
Python
ELCplotter_tester.py
mrawls/ELCtools
7e15bf24c453ed4300c6f19f01cff74c041158b8
[ "MIT" ]
2
2018-10-08T04:59:38.000Z
2021-01-19T08:10:04.000Z
ELCplotter_tester.py
mrawls/ELCtools
7e15bf24c453ed4300c6f19f01cff74c041158b8
[ "MIT" ]
1
2021-07-20T16:42:43.000Z
2021-07-20T16:42:43.000Z
ELCplotter_tester.py
mrawls/ELCtools
7e15bf24c453ed4300c6f19f01cff74c041158b8
[ "MIT" ]
1
2018-07-31T14:36:24.000Z
2018-07-31T14:36:24.000Z
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt ''' Meredith Rawls, Dec 2015 Plotting routine for initial 'test' runs of ELC. It will make a plot that has both light curve data w/fit and RV data w/fit. There are also residuals in the plots! (Strongly based on ELCplotter_unfold.p...
38.655039
115
0.702497
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import IndexLocator, FormatStrFormatter ''' Meredith Rawls, Dec 2015 Plotting routine for initial 'test' runs of ELC. It will make a plot that has both light curve data w/fit and RV data w/fit. There are also...
0
0
0
0
0
318
0
41
44
ea3901051a292a10d6c15b1c314255b8605ae047
655
py
Python
Python_Code/experimentFive/experimentFive_test2.py
xiaoandx/learningCode
2c41bc7199ef21a70d1935f32296d520e18f719f
[ "MIT" ]
13
2020-10-25T15:38:15.000Z
2022-02-21T02:21:24.000Z
Python_Code/experimentFive/experimentFive_test2.py
xiaoandx/learningCode
2c41bc7199ef21a70d1935f32296d520e18f719f
[ "MIT" ]
4
2020-10-26T08:37:27.000Z
2020-12-14T08:49:51.000Z
Python_Code/experimentFive/experimentFive_test2.py
xiaoandx/learningCode
2c41bc7199ef21a70d1935f32296d520e18f719f
[ "MIT" ]
10
2020-10-25T15:38:30.000Z
2021-09-15T03:54:39.000Z
""" Copyright (c) 2020 WEI.ZHOU. All rights reserved. The following code snippets are only used for circulation and cannot be used for business. If the code is used, no consent is required, but the author has nothing to do with any problems and consequences. In case of code problems, feedback can be made through the fo...
29.772727
95
0.674809
""" Copyright (c) 2020 WEI.ZHOU. All rights reserved. The following code snippets are only used for circulation and cannot be used for business. If the code is used, no consent is required, but the author has nothing to do with any problems and consequences. In case of code problems, feedback can be made through the fo...
45
0
0
0
0
0
0
0
0
71e3e1197df9eb06e7e634ae3138a713531bf1f2
595
py
Python
src/pyproject_api/__init__.py
graingert/pyproject-api
8304504643efc88061966c685eca4cd8958671c5
[ "MIT" ]
null
null
null
src/pyproject_api/__init__.py
graingert/pyproject-api
8304504643efc88061966c685eca4cd8958671c5
[ "MIT" ]
null
null
null
src/pyproject_api/__init__.py
graingert/pyproject-api
8304504643efc88061966c685eca4cd8958671c5
[ "MIT" ]
null
null
null
from ._frontend import (BackendFailed, CmdStatus, Frontend, MetadataForBuildWheelResult, RequiresBuildSdistResult, RequiresBuildWheelResult, SdistResult, WheelResult) from ._version import version from ._via_fresh_subprocess import SubprocessFrontend #: semantic version of the project __version__ = version __all__ = ...
20.517241
53
0.719328
from ._frontend import ( BackendFailed, CmdStatus, Frontend, MetadataForBuildWheelResult, RequiresBuildSdistResult, RequiresBuildWheelResult, SdistResult, WheelResult, ) from ._version import version from ._via_fresh_subprocess import SubprocessFrontend #: semantic version of the projec...
0
0
0
0
0
0
0
35
0
9f6ae539927188c3ccbaedb48cb3e751417e791e
1,483
py
Python
drafts/exercises/mnist.py
ItamarRocha/AI
134e4e39f7034657472d7996ce70f37ff7a6e74b
[ "MIT" ]
2
2020-06-23T16:28:26.000Z
2020-07-11T11:39:18.000Z
drafts/exercises/mnist.py
ItamarRocha/AI
134e4e39f7034657472d7996ce70f37ff7a6e74b
[ "MIT" ]
12
2021-09-08T02:38:57.000Z
2022-03-12T01:00:12.000Z
drafts/exercises/mnist.py
ItamarRocha/AI
134e4e39f7034657472d7996ce70f37ff7a6e74b
[ "MIT" ]
1
2021-05-07T15:22:50.000Z
2021-05-07T15:22:50.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 27 18:29:10 2019 @author: itamar """ from keras.datasets import mnist (train_images, train_labels), (test_images, test_labels) = mnist.load_data() train_images.shape len(train_labels) train_labels test_images.shape len(test_images) test_labels pr...
23.539683
76
0.710722
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 27 18:29:10 2019 @author: itamar """ from keras.datasets import mnist (train_images, train_labels), (test_images, test_labels) = mnist.load_data() train_images.shape len(train_labels) train_labels test_images.shape len(test_images) test_labels pr...
0
0
0
0
0
0
0
1
0
3f54db164b94291e4109a8565d89cdaaf68dbfba
2,264
py
Python
taxishare/anneal/preparations.py
SatoPj-mitou2018/demo-taxishare
f8701cac5d160d0cd94dae9a9a56cb84a3cdb9f0
[ "MIT" ]
null
null
null
taxishare/anneal/preparations.py
SatoPj-mitou2018/demo-taxishare
f8701cac5d160d0cd94dae9a9a56cb84a3cdb9f0
[ "MIT" ]
null
null
null
taxishare/anneal/preparations.py
SatoPj-mitou2018/demo-taxishare
f8701cac5d160d0cd94dae9a9a56cb84a3cdb9f0
[ "MIT" ]
null
null
null
from datetime import date import numpy as np import pandas as pd from scipy.stats import zscore def normalize(df): """ Parameters ---------- df: pandas.dataframe Returns ------- norm_df: pandas.dataframe """ def calc_age(born): """ ...
22.415842
84
0.587014
from datetime import date import numpy as np import pandas as pd from scipy.stats import zscore def normalize(df): """ 特徴量を標準化する。 Parameters ---------- df: pandas.dataframe 標準化前の特徴量データフレーム Returns ------- norm_df: pandas.dataframe 標準化された特徴量データフレーム """ def cal...
672
0
0
0
0
0
0
0
0
911b134dc6a86be73b332315c97a1543c0b6cc2d
740
py
Python
spotify_uri/__init__.py
zeroday0619/pyspotify-uri
d2b4cba6c02051901eda13742b9385315341dbb2
[ "MIT" ]
7
2021-01-10T13:28:55.000Z
2021-09-17T13:01:07.000Z
spotify_uri/__init__.py
zeroday0619/pyspotify-uri
d2b4cba6c02051901eda13742b9385315341dbb2
[ "MIT" ]
null
null
null
spotify_uri/__init__.py
zeroday0619/pyspotify-uri
d2b4cba6c02051901eda13742b9385315341dbb2
[ "MIT" ]
null
null
null
__version__ = "1.0.3"
25.517241
77
0.7
__version__ = "1.0.3" from spotify_uri.parse import parse as _parse from spotify_uri.spotify import SpotifyUri def parse(uri: str): return _parse(uri) def formatURI(_input: str) -> str: _uri: SpotifyUri = parse(_input) if bool(type(_input) == str) else _input return _uri.toURI() def formatEmbedURL(_i...
0
0
0
0
0
508
0
45
160
fc815432329bd50b5b3563f1a31416a62326e975
3,531
py
Python
cloudwine/inference.py
elmidelange/CloudWine
04f61c39c0256252569ed2cfdde196dc981a0b00
[ "MIT" ]
2
2020-06-13T00:56:13.000Z
2020-08-09T23:20:24.000Z
cloudwine/inference.py
elmidelange/CloudWine
04f61c39c0256252569ed2cfdde196dc981a0b00
[ "MIT" ]
1
2020-06-08T19:19:49.000Z
2020-06-08T19:19:49.000Z
cloudwine/inference.py
elmidelange/CloudWine
04f61c39c0256252569ed2cfdde196dc981a0b00
[ "MIT" ]
3
2020-06-05T09:25:28.000Z
2020-06-20T13:55:20.000Z
import nltk nltk.download('punkt') nltk.download('stopwords') nltk.download('wordnet') # Loads TF-IDF model and inferences input string # Loads TF-IDF model and inferences input string # Loads BERT embeddings and inferences input string
33
106
0.730105
import argparse import pandas as pd import numpy as np import pickle from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from nltk.tokenize import word_tokenize from nltk.corpus import stopwords import nltk nltk.download('punkt') nltk.download('stopwords')...
0
0
0
0
0
2,903
0
95
289
5da6029a6ba369a85c387ca30d12077ef7203cee
4,910
py
Python
frontera/utils/tester.py
TeamHG-Memex/frontera
06ab4002428528a2d8b67c1e82368cc5988b2228
[ "BSD-3-Clause" ]
3
2015-11-11T19:37:16.000Z
2017-03-15T13:33:54.000Z
frontera/utils/tester.py
TeamHG-Memex/frontera
06ab4002428528a2d8b67c1e82368cc5988b2228
[ "BSD-3-Clause" ]
null
null
null
frontera/utils/tester.py
TeamHG-Memex/frontera
06ab4002428528a2d8b67c1e82368cc5988b2228
[ "BSD-3-Clause" ]
2
2016-09-08T08:30:24.000Z
2018-10-02T22:00:47.000Z
from __future__ import absolute_import
35.839416
111
0.58391
from __future__ import absolute_import from collections import OrderedDict, deque from urlparse import urlparse class FrontierTester(object): def __init__(self, frontier, graph_manager, downloader_simulator, max_next_requests=0): self.frontier = frontier self.graph_manager = graph_manager ...
0
0
0
4,726
0
0
0
29
114
f295231c2c5bcf4995f2f897318fddbc3bbf1400
1,209
py
Python
get_tweets.py
gacarvalho/analyze-tweets-disney-plus
fd17c43c15bcaa1cc16501dfa7b3b620d12f3df5
[ "MIT" ]
3
2021-03-15T02:31:20.000Z
2021-03-16T19:29:02.000Z
get_tweets.py
gacarvalho/analyze-tweets-disney-plus
fd17c43c15bcaa1cc16501dfa7b3b620d12f3df5
[ "MIT" ]
null
null
null
get_tweets.py
gacarvalho/analyze-tweets-disney-plus
fd17c43c15bcaa1cc16501dfa7b3b620d12f3df5
[ "MIT" ]
null
null
null
from tweepy import OAuthHandler, Stream #faz requisicao de tweets ao Twitter from datetime import datetime # CADASTRAR AS CHAVES DE ACESSO consumer_key = "YGSFrzszgES6SFMtZTUghUhlw" consumer_secret = "TITEr8yC97JPTaiG9flVZrGc8INvFkObHpznB6NnupabE3OKx2" access_token = "1342352348497272833-J2FXw9MGDeiOQFSRLzsyJog94VO...
30.225
93
0.751034
import json from tweepy import OAuthHandler, Stream, StreamListener #faz requisicao de tweets ao Twitter from datetime import datetime # CADASTRAR AS CHAVES DE ACESSO consumer_key = "YGSFrzszgES6SFMtZTUghUhlw" consumer_secret = "TITEr8yC97JPTaiG9flVZrGc8INvFkObHpznB6NnupabE3OKx2" access_token = "134235234849727283...
12
0
0
263
0
0
0
6
49
7f0687c914a7105497485044516ecd34881ec454
432
py
Python
setup.py
jo-nas/pygitea
0937d26dbd33523c728e2eefa80f327d952864a5
[ "WTFPL" ]
null
null
null
setup.py
jo-nas/pygitea
0937d26dbd33523c728e2eefa80f327d952864a5
[ "WTFPL" ]
null
null
null
setup.py
jo-nas/pygitea
0937d26dbd33523c728e2eefa80f327d952864a5
[ "WTFPL" ]
2
2019-01-04T18:43:34.000Z
2021-10-18T17:43:25.000Z
#!/usr/env/bin python from setuptools import setup setup( name='pygitea', version='0.0.1', description='Gitea API wrapper for python', url='http://github.com/jo-nas/pygitea', author='Jonas', author_email='jonas@steinka.mp', install_requires=[ 'parse', 'requests' ], ...
20.571429
47
0.618056
#!/usr/env/bin python from setuptools import setup setup( name='pygitea', version='0.0.1', description='Gitea API wrapper for python', url='http://github.com/jo-nas/pygitea', author='Jonas', author_email='jonas@steinka.mp', install_requires=[ 'parse', 'requests' ], ...
0
0
0
0
0
0
0
0
0
25584d02d5183657403585eb275a864235199159
4,300
py
Python
pybitup/pce/expan.py
jcoheur/pybitup
6b31cbea7ae871a09aad154829eb85e599ce9214
[ "MIT" ]
2
2022-02-16T13:40:37.000Z
2022-02-16T13:41:12.000Z
pybitup/pce/expan.py
jcoheur/pybitup
6b31cbea7ae871a09aad154829eb85e599ce9214
[ "MIT" ]
2
2021-03-11T10:36:47.000Z
2021-03-15T16:47:44.000Z
pybitup/pce/expan.py
jcoheur/pybitup
6b31cbea7ae871a09aad154829eb85e599ce9214
[ "MIT" ]
null
null
null
from .poly import polyrecur from scipy import integrate from .tools import printer from copy import deepcopy import numpy as np # %% Polynomial Chaos # %% Univariate Expansion def transfo(invcdf,order,dist): """Maps an arbitrary random variable to another distribution""" nbrPoly = order+1 coef = np.zero...
27.564103
77
0.593721
from .poly import polyrecur from scipy import integrate from .tools import printer from copy import deepcopy import numpy as np # %% Polynomial Chaos class Expansion: """Class of polynomial chaos expansion""" def __init__(self,coef,poly): coef = np.array(coef) self.var = np.sum(coef[1:]**2,a...
0
0
0
734
0
0
0
0
23
fed2b0bb7db552e26ad977eb89f8483ac69e83cb
2,713
py
Python
unb_cli/unb/version.py
jacktrades/unb-cli
51cb451fc66352ca85ded03bfbc3bf01913f33ca
[ "MIT" ]
null
null
null
unb_cli/unb/version.py
jacktrades/unb-cli
51cb451fc66352ca85ded03bfbc3bf01913f33ca
[ "MIT" ]
null
null
null
unb_cli/unb/version.py
jacktrades/unb-cli
51cb451fc66352ca85ded03bfbc3bf01913f33ca
[ "MIT" ]
null
null
null
import subprocess from clams import Command from . import current_project version = Command( name='version', title='Utilities for versioning and releases.', description='Utilities for versioning and releases.', ) def _get_version(): """Read and return the project version number.""" from unb_cl...
24.889908
80
0.62477
import os import subprocess from clams import arg, Command from . import current_project version = Command( name='version', title='Utilities for versioning and releases.', description='Utilities for versioning and releases.', ) def _get_version(): """Read and return the project version number.""" ...
0
1,501
0
0
0
0
0
-7
137
6ee61b6e296d95c10f882a5b0e42f5f62e85b58e
2,403
py
Python
main/solutions/uncrossed_lines.py
techrabbit58/LeetCode30DaysMay2020Challenge
3798c5ce104e806372922a73b5ba66b29fc51dbd
[ "Unlicense" ]
1
2020-06-10T10:28:44.000Z
2020-06-10T10:28:44.000Z
main/solutions/uncrossed_lines.py
techrabbit58/LeetCode30DaysMay2020Challenge
3798c5ce104e806372922a73b5ba66b29fc51dbd
[ "Unlicense" ]
null
null
null
main/solutions/uncrossed_lines.py
techrabbit58/LeetCode30DaysMay2020Challenge
3798c5ce104e806372922a73b5ba66b29fc51dbd
[ "Unlicense" ]
null
null
null
""" Week 4, Day 4: Uncrossed Lines We write the integers of A and B (in the order they are given) on two separate horizontal lines. Now, we may draw connecting lines: a straight line connecting two numbers A[i] and B[j] such that: A[i] == B[j]; The line we draw does not intersect any other connecting (non-horiz...
27
102
0.587599
""" Week 4, Day 4: Uncrossed Lines We write the integers of A and B (in the order they are given) on two separate horizontal lines. Now, we may draw connecting lines: a straight line connecting two numbers A[i] and B[j] such that: A[i] == B[j]; The line we draw does not intersect any other connecting (non-horiz...
0
0
0
417
0
0
0
2
45
54978b7601bcb8c99b5e7286e3bb9ff5fe9e4e0d
5,500
py
Python
dpqueue.py
TouchTone/pyjsit
52eb3eafdbab82c8ef6ba340eeaa5a7e6446a36f
[ "MIT", "BSD-3-Clause" ]
1
2015-05-22T21:26:51.000Z
2015-05-22T21:26:51.000Z
dpqueue.py
TouchTone/pyjsit
52eb3eafdbab82c8ef6ba340eeaa5a7e6446a36f
[ "MIT", "BSD-3-Clause" ]
6
2015-01-02T22:29:38.000Z
2015-06-17T17:26:57.000Z
dpqueue.py
TouchTone/pyjsit
52eb3eafdbab82c8ef6ba340eeaa5a7e6446a36f
[ "MIT", "BSD-3-Clause" ]
null
null
null
#!/bin/python # Priority queue that allows updating priorities # Todo: don't do busy waiting... import time import Queue # Need to pull in exceptions if __name__ == "__main__": # Test... print "Creating..." dpq = DPQueue(maxsize = 5, prio = lambda e: e) print "Empty:", dpq.empty() ...
25.345622
65
0.467455
#!/bin/python # Priority queue that allows updating priorities # Todo: don't do busy waiting... import time from heapq import * # Basic heap implementation import Queue # Need to pull in exceptions from tools import * # For RWLock class DPQueue(object): """Thread-safe Priority queue that can update priorities...
0
0
0
4,334
0
0
0
-4
108
e690e30135a7c23fd19d28745ce8909768fa577a
1,005
py
Python
lottery_nums.py
ChangLuis/LearningSpider
84c2a53e6d6a77c0f0281e1a06cd2d0602059786
[ "MIT" ]
null
null
null
lottery_nums.py
ChangLuis/LearningSpider
84c2a53e6d6a77c0f0281e1a06cd2d0602059786
[ "MIT" ]
null
null
null
lottery_nums.py
ChangLuis/LearningSpider
84c2a53e6d6a77c0f0281e1a06cd2d0602059786
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup as BS params = {"p1":"108001","p2":"108136","l":"0","type":"5"} res = requests.post("http://www.9800.com.tw/trend.asp",data = params) lottery_page = BS(res.text,"html.parser") lottery_info = lottery_page.select("tbody")[4].select("td") data = [] for i in range(le...
33.5
101
0.614925
import requests from bs4 import BeautifulSoup as BS params = {"p1":"108001","p2":"108136","l":"0","type":"5"} res = requests.post("http://www.9800.com.tw/trend.asp",data = params) lottery_page = BS(res.text,"html.parser") lottery_info = lottery_page.select("tbody")[4].select("td") data = [] for i in range(le...
0
0
0
0
0
0
0
0
0
83d632003dc65364b9c3b47f315c7e542187635d
1,081
py
Python
cli/polyaxon/polyaxonfile/__init__.py
polyaxon/cli
3543c0220a8a7c06fc9573cd2a740f8ae4930641
[ "Apache-2.0" ]
null
null
null
cli/polyaxon/polyaxonfile/__init__.py
polyaxon/cli
3543c0220a8a7c06fc9573cd2a740f8ae4930641
[ "Apache-2.0" ]
1
2022-01-24T11:26:47.000Z
2022-03-18T23:17:58.000Z
cli/polyaxon/polyaxonfile/__init__.py
polyaxon/cli
3543c0220a8a7c06fc9573cd2a740f8ae4930641
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2022 Polyaxon, Inc. # # 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 ...
32.757576
74
0.778908
#!/usr/bin/python # # Copyright 2018-2022 Polyaxon, Inc. # # 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 ...
0
0
0
0
0
0
0
388
89
3a251362968be1df9abcf85907aac1648df9d37a
4,644
py
Python
artist/migrations/0001_initial.py
ssoumyajit/imgapi2
b2129f1d35d55e093a3d96272686ac25ea2cf7bb
[ "MIT" ]
null
null
null
artist/migrations/0001_initial.py
ssoumyajit/imgapi2
b2129f1d35d55e093a3d96272686ac25ea2cf7bb
[ "MIT" ]
null
null
null
artist/migrations/0001_initial.py
ssoumyajit/imgapi2
b2129f1d35d55e093a3d96272686ac25ea2cf7bb
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-07-18 10:36
56.634146
152
0.594961
# Generated by Django 3.1.7 on 2021-07-18 10:36 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_countries.fields class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.A...
0
0
0
4,433
0
0
0
50
112
0aa6ca5cc6dffd6848eb3fad981099a2c3c93ae1
381
py
Python
authtoken/migrations/0002_auto_20191020_1918.py
mentix02/Scrolls
b2df8b6061027dc9519e90740182a369356d9af9
[ "Apache-2.0" ]
null
null
null
authtoken/migrations/0002_auto_20191020_1918.py
mentix02/Scrolls
b2df8b6061027dc9519e90740182a369356d9af9
[ "Apache-2.0" ]
null
null
null
authtoken/migrations/0002_auto_20191020_1918.py
mentix02/Scrolls
b2df8b6061027dc9519e90740182a369356d9af9
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.6 on 2019-10-21 02:18
20.052632
52
0.593176
# Generated by Django 2.2.6 on 2019-10-21 02:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('authtoken', '0001_initial'), ] operations = [ migrations.AlterField( model_name='authtoken', name='valid', ...
0
0
0
267
0
0
0
19
46
fa241ad9dc644dc2b7a8120eb7212cf85a481968
5,812
py
Python
procrastinate/worker.py
marqov/procrastinate
0d8ccd1af89f44804b155e395c72892d5d7be052
[ "MIT" ]
null
null
null
procrastinate/worker.py
marqov/procrastinate
0d8ccd1af89f44804b155e395c72892d5d7be052
[ "MIT" ]
null
null
null
procrastinate/worker.py
marqov/procrastinate
0d8ccd1af89f44804b155e395c72892d5d7be052
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__)
33.402299
86
0.580351
import asyncio import logging import time from typing import Iterable, NoReturn, Optional, Set from procrastinate import app, exceptions, jobs, signals, tasks, types logger = logging.getLogger(__name__) class Worker: def __init__( self, app: app.App, queues: Optional[Iterable[str]] = Non...
0
0
3,699
1,884
0
0
0
63
112
e2a046744c1d193808431b848191976487b18e52
2,539
py
Python
sample/tensorflow/utils/dump_model.py
dujiangsu/FasterTransformer
0648b8839be02eafba1cdba511a41b4fd13e2c9e
[ "Apache-2.0" ]
777
2021-04-05T07:45:07.000Z
2022-03-31T20:40:00.000Z
sample/tensorflow/utils/dump_model.py
dujiangsu/FasterTransformer
0648b8839be02eafba1cdba511a41b4fd13e2c9e
[ "Apache-2.0" ]
119
2021-04-05T08:31:18.000Z
2022-03-31T04:50:25.000Z
sample/tensorflow/utils/dump_model.py
dujiangsu/FasterTransformer
0648b8839be02eafba1cdba511a41b4fd13e2c9e
[ "Apache-2.0" ]
135
2021-04-05T09:12:42.000Z
2022-03-31T09:36:58.000Z
# Copyright (c) 2020, NVIDIA CORPORATION. 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...
48.826923
164
0.745175
# Copyright (c) 2020, NVIDIA CORPORATION. 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...
0
0
0
0
0
0
0
-3
22
f1d43560ee9559740ede8d999987b9b115e0f92b
640
py
Python
shell/DBphoto.py
tomorrow00/TutorWeb
a5b41ab6f6ae2d92e5fd7e6e1290f11c65a8f93c
[ "MIT" ]
null
null
null
shell/DBphoto.py
tomorrow00/TutorWeb
a5b41ab6f6ae2d92e5fd7e6e1290f11c65a8f93c
[ "MIT" ]
null
null
null
shell/DBphoto.py
tomorrow00/TutorWeb
a5b41ab6f6ae2d92e5fd7e6e1290f11c65a8f93c
[ "MIT" ]
null
null
null
# coding=utf8 import MySQLdb conn = MySQLdb.connect( host='localhost', user='root', passwd='123456', db='TeacherSchema' ) cur = conn.cursor() cur.execute("SELECT COUNT(Teacher_Name) FROM Teacher;") count = cur.fetchall() count = count[0][0] print count for i in range(count): try: sql = "SELECT Teacher_Photo F...
21.333333
107
0.679688
# coding=utf8 import MySQLdb conn = MySQLdb.connect( host='localhost', user='root', passwd='123456', db='TeacherSchema' ) cur = conn.cursor() cur.execute("SELECT COUNT(Teacher_Name) FROM Teacher;") count = cur.fetchall() count = count[0][0] print count for i in range(count): try: sql = "SELECT Teacher_Photo F...
0
0
0
0
0
0
0
0
0
1a0096f3d4f2fb673a71b4ab030c43b567b17b2e
307
py
Python
tools/convert_mp3_to_wav.py
StasYazykov/alien-invasion
7c49bc446ed9b9576ea041621368573d95871ba8
[ "MIT" ]
null
null
null
tools/convert_mp3_to_wav.py
StasYazykov/alien-invasion
7c49bc446ed9b9576ea041621368573d95871ba8
[ "MIT" ]
null
null
null
tools/convert_mp3_to_wav.py
StasYazykov/alien-invasion
7c49bc446ed9b9576ea041621368573d95871ba8
[ "MIT" ]
null
null
null
""" Setup FFMPEG before!!! https://www.ffmpeg.org/download.html#build-windows """ from pydub import AudioSegment names = [ 'shot', 'explosion', 'explosion_1' ] for name in names: sound = AudioSegment.from_mp3(f"../sound/{name}.mp3") sound.export(f"../sound/{name}.wav", format="wav")
18.058824
57
0.648208
""" Setup FFMPEG before!!! https://www.ffmpeg.org/download.html#build-windows """ from pydub import AudioSegment names = [ 'shot', 'explosion', 'explosion_1' ] for name in names: sound = AudioSegment.from_mp3(f"../sound/{name}.mp3") sound.export(f"../sound/{name}.wav", format="wav")
0
0
0
0
0
0
0
0
0
22ae72eaf75e41f64668915c1d15c92c926eda75
412
py
Python
DegenerateArrow/home/urls.py
Asura0528/Degenerate-arrow
7f624027dbfd9345ddcf51bcdc2a5e7161e44f2e
[ "MIT" ]
1
2021-10-20T16:19:15.000Z
2021-10-20T16:19:15.000Z
DegenerateArrow/home/urls.py
Asura0528/Degenerate-arrow
7f624027dbfd9345ddcf51bcdc2a5e7161e44f2e
[ "MIT" ]
null
null
null
DegenerateArrow/home/urls.py
Asura0528/Degenerate-arrow
7f624027dbfd9345ddcf51bcdc2a5e7161e44f2e
[ "MIT" ]
null
null
null
from django.urls import path from home.views import IndexView, BlogView, DetailView, ToolView, ToolDetailView urlpatterns = [ path('', IndexView.as_view(), name='index'), path('blog/', BlogView.as_view(), name='blog'), path('detail/', DetailView.as_view(), name='detail'), path('tool/', ToolView.as_view...
412
412
0.684466
from django.urls import path from home.views import IndexView, BlogView, DetailView, ToolView, ToolDetailView urlpatterns = [ path('', IndexView.as_view(), name='index'), path('blog/', BlogView.as_view(), name='blog'), path('detail/', DetailView.as_view(), name='detail'), path('tool/', ToolView.as_view...
0
0
0
0
0
0
0
0
0
74f037f90d6edb2f81051ab3b8942e1ed02b9f66
23,029
py
Python
reconbf/lib/result.py
fallenpegasus/reconbf
bfd15bef549f011a3de885c3267d4f718223b798
[ "Apache-2.0" ]
45
2016-08-12T21:37:25.000Z
2022-03-29T00:21:29.000Z
reconbf/lib/result.py
fallenpegasus/reconbf
bfd15bef549f011a3de885c3267d4f718223b798
[ "Apache-2.0" ]
20
2016-08-11T07:42:28.000Z
2016-09-09T13:33:47.000Z
reconbf/lib/result.py
fallenpegasus/reconbf
bfd15bef549f011a3de885c3267d4f718223b798
[ "Apache-2.0" ]
6
2016-08-25T06:31:38.000Z
2019-09-11T04:29:36.000Z
# Copyright 2016 Hewlett Packard Enterprise Development LP # # 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...
33.472384
79
0.575058
# Copyright 2016 Hewlett Packard Enterprise Development LP # # 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...
0
775
0
12,719
0
2,118
0
-19
363
73e47859588e3406311a660531152a4ee31a01fc
1,559
py
Python
tests/test_dicomexplorer.py
rbrecheisen/barbell2
19d8c6aa6ddd1b730bb257fadbeacf2d1ac79fd6
[ "MIT" ]
null
null
null
tests/test_dicomexplorer.py
rbrecheisen/barbell2
19d8c6aa6ddd1b730bb257fadbeacf2d1ac79fd6
[ "MIT" ]
null
null
null
tests/test_dicomexplorer.py
rbrecheisen/barbell2
19d8c6aa6ddd1b730bb257fadbeacf2d1ac79fd6
[ "MIT" ]
null
null
null
COHORT_DIR = '/Volumes/USB_SECURE1/data/radiomics/projects/deepseg/data/mega/processed/NEWEPOC' COHORT_DCM_FILE = '/Volumes/USB_SECURE1/data/radiomics/projects/deepseg/data/mega/processed/NEWEPOC/003001_pre_PV_L3.dcm' COHORT_TAG_FILE = '/Volumes/USB_SECURE1/data/radiomics/projects/deepseg/data/mega/processed/NEWEPOC/...
28.87037
121
0.788326
import os import pytest from barbell2.dicomexplorer.dicomexplorer import DicomExplorer COHORT_DIR = '/Volumes/USB_SECURE1/data/radiomics/projects/deepseg/data/mega/processed/NEWEPOC' COHORT_DCM_FILE = '/Volumes/USB_SECURE1/data/radiomics/projects/deepseg/data/mega/processed/NEWEPOC/003001_pre_PV_L3.dcm' COHORT_TAG_F...
0
37
0
0
0
789
0
21
251
f0ba11440a57c43e54a9e22ec22969028fa20fb2
11,936
py
Python
nuitka/codegen/ConstantCodes.py
timgates42/Nuitka
536f39e37d8657ec750304bb1a93ccb19d1942af
[ "Apache-2.0" ]
1
2020-12-20T19:01:50.000Z
2020-12-20T19:01:50.000Z
nuitka/codegen/ConstantCodes.py
timgates42/Nuitka
536f39e37d8657ec750304bb1a93ccb19d1942af
[ "Apache-2.0" ]
1
2021-01-05T09:01:31.000Z
2021-01-05T09:01:31.000Z
nuitka/codegen/ConstantCodes.py
timgates42/Nuitka
536f39e37d8657ec750304bb1a93ccb19d1942af
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
31.829333
86
0.654742
# Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
0
0
0
0
0
2,918
0
82
46
11a710eb349bd4e2f77184f27918df7983003cf1
12,909
py
Python
Digital-Games/Mud-Online-Game/server/Server.py
wolganens/Computer-Science
a840a1a9656711aaacc873a8a06075ffd322a0d2
[ "MIT" ]
1
2018-09-01T14:03:28.000Z
2018-09-01T14:03:28.000Z
Digital-Games/Mud-Online-Game/server/Server.py
wolganens/Computer-Science
a840a1a9656711aaacc873a8a06075ffd322a0d2
[ "MIT" ]
null
null
null
Digital-Games/Mud-Online-Game/server/Server.py
wolganens/Computer-Science
a840a1a9656711aaacc873a8a06075ffd322a0d2
[ "MIT" ]
null
null
null
global commands commands = dict({ "room" : "Exibe a sala atual", "move <n(north), s(south), e(east), w(weast)>" : "Move o personagem para a direo desejada", "get_item <nome do item>" : "Pega um item do mapa e coloca no inventrio", "inventory" : "Exibe os itens do inventrio", "npc <nome do npc>" : "I...
40.340625
97
0.607173
import socket import threading import socketserver from Player import Player from Account import Account from World import World import re from copy import deepcopy global commands commands = dict({ "room" : "Exibe a sala atual", "move <n(north), s(south), e(east), w(weast)>" : "Move o personagem para a direção...
132
0
0
11,893
0
0
0
-11
244
d8669915ac9546e5d8f8a0c550f88c0e0634fe77
3,805
py
Python
wicarproject/utilities/flask_tracking/__init__.py
todhm/wicarproject
5a3ea7b70ba6649af75d9e9bb49683eb6f94b570
[ "MIT" ]
1
2018-04-20T04:58:50.000Z
2018-04-20T04:58:50.000Z
wicarproject/utilities/flask_tracking/__init__.py
todhm/wicarproject
5a3ea7b70ba6649af75d9e9bb49683eb6f94b570
[ "MIT" ]
7
2021-02-08T20:24:49.000Z
2022-03-11T23:26:33.000Z
wicarproject/utilities/flask_tracking/__init__.py
todhm/wicarproject
5a3ea7b70ba6649af75d9e9bb49683eb6f94b570
[ "MIT" ]
null
null
null
try: from flask_login import current_user except ImportError: current_user = None
35.231481
134
0.607884
import mongoengine import datetime import re import socket import time from bson.errors import InvalidStringData from flask import request from utilities.flask_tracking import documents from utilities.flask_tracking.utils import WSGICopyBody from mongoengine import Document try: from flask_login import current_u...
0
0
0
3,414
0
0
0
55
245
7d536dcdc033935a32c24f2588b7481cf9d479c9
2,456
py
Python
test/TEX/multi-line_include_options.py
azverkan/scons
704ddb9270e14c7771d0c58c04c7afa7bc009603
[ "MIT" ]
1
2015-11-04T22:22:10.000Z
2015-11-04T22:22:10.000Z
test/TEX/multi-line_include_options.py
azverkan/scons
704ddb9270e14c7771d0c58c04c7afa7bc009603
[ "MIT" ]
null
null
null
test/TEX/multi-line_include_options.py
azverkan/scons
704ddb9270e14c7771d0c58c04c7afa7bc009603
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
26.989011
73
0.738192
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
0
0
0
0
0
0
0
0
0
620be75e82b5a7d7986470b1668de1f914065e28
2,600
py
Python
plots/correlation_matrices/plot.py
manuel-rhdt/master-thesis
51806aabefaa66a06bf895cac248fe3bffb04ba7
[ "MIT" ]
null
null
null
plots/correlation_matrices/plot.py
manuel-rhdt/master-thesis
51806aabefaa66a06bf895cac248fe3bffb04ba7
[ "MIT" ]
null
null
null
plots/correlation_matrices/plot.py
manuel-rhdt/master-thesis
51806aabefaa66a06bf895cac248fe3bffb04ba7
[ "MIT" ]
null
null
null
from matplotlib import pyplot import seaborn as sns lamda = 0.005 kappa = 0.25 rho = 0.01 mu = 0.01 data = [] for n_dim in [10, 80, 640]: for dt in [1, 8, 64]: t = time_matrix(n_dim, dt) c_z = corr_z(t, rho, mu, lamda, kappa) data.append({'n_dim': n_dim, 'dt': dt, 'correlation': c_...
36.111111
162
0.625
import numpy as np from matplotlib import pyplot from matplotlib.colors import Normalize from scipy import stats from scipy.special import logsumexp from IPython.display import Markdown import seaborn as sns lamda = 0.005 kappa = 0.25 rho = 0.01 mu = 0.01 def sigma_ss(rho, mu, lamda, kappa): return kappa / lamda ...
0
0
0
0
0
1,458
0
46
386
960c902ece9d890e0669ec62dd52657bef659357
9,195
py
Python
py_dev_hammer/github_status_posting.py
declankeyesbevan/py-dev-hammer
6e5c8a0d35f70a082ec32aa94d01b15dfd8c440b
[ "MIT" ]
2
2019-04-18T21:51:18.000Z
2019-06-17T11:23:15.000Z
py_dev_hammer/github_status_posting.py
declankeyesbevan/py-dev-hammer
6e5c8a0d35f70a082ec32aa94d01b15dfd8c440b
[ "MIT" ]
null
null
null
py_dev_hammer/github_status_posting.py
declankeyesbevan/py-dev-hammer
6e5c8a0d35f70a082ec32aa94d01b15dfd8c440b
[ "MIT" ]
null
null
null
""" This carries out dynamic and static code analysis and POSTs the results to GitHub as statuses. Without passing statuses, a pull request cannot be merged. Dynamic tests require 100% passing to be considered a success. The static tests are informational only and will always generate success if they run correctly. """...
38.634454
100
0.698314
""" This carries out dynamic and static code analysis and POSTs the results to GitHub as statuses. Without passing statuses, a pull request cannot be merged. Dynamic tests require 100% passing to be considered a success. The static tests are informational only and will always generate success if they run correctly. """...
0
0
0
0
0
6,992
0
99
409
ce6cbf92c0572ce7bcc5fb50fce0e547805db9c4
1,647
py
Python
solutions/057_insert_interval.py
abawchen/leetcode
41d3b172a7694a46a860fbcb0565a3acccd000f2
[ "MIT" ]
null
null
null
solutions/057_insert_interval.py
abawchen/leetcode
41d3b172a7694a46a860fbcb0565a3acccd000f2
[ "MIT" ]
null
null
null
solutions/057_insert_interval.py
abawchen/leetcode
41d3b172a7694a46a860fbcb0565a3acccd000f2
[ "MIT" ]
null
null
null
# Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). # You may assume that the intervals were initially sorted according to their start times. # Example 1: # Given intervals [1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9]. # Example 2: # Given [1,2],[3,5],[...
36.6
106
0.603522
# Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). # You may assume that the intervals were initially sorted according to their start times. # Example 1: # Given intervals [1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9]. # Example 2: # Given [1,2],[3,5],[...
0
0
0
1,021
0
0
0
0
23
33f5e2f04ac8ce4f293dcba5be9901a24c497140
7,963
py
Python
helical_thread/helicalthread.py
winksaville/py-helical-thread
b1f98a6a1af48f7f6d277918c6d0237c8b85241a
[ "MIT" ]
null
null
null
helical_thread/helicalthread.py
winksaville/py-helical-thread
b1f98a6a1af48f7f6d277918c6d0237c8b85241a
[ "MIT" ]
2
2020-10-08T22:07:14.000Z
2020-10-13T00:33:06.000Z
helical_thread/helicalthread.py
winksaville/py-helical-thread
b1f98a6a1af48f7f6d277918c6d0237c8b85241a
[ "MIT" ]
null
null
null
from math import radians, sin, tan from taperable_helix import HelixLocation def helical_thread(ht: HelicalThread) -> ThreadHelixes: """ Given HelicalThread compute the internal and external helixes thread and returning them in ThreadHelixes. int_hexlix_radius, int_helixes, ext_helix_radius and ext...
36.527523
258
0.717192
from copy import deepcopy from dataclasses import dataclass, field from math import degrees, radians, sin, tan from typing import List from taperable_helix import Helix, HelixLocation @dataclass class HelicalThread(Helix): """ A set of fields used to represent a helical thread and passed as the parameter...
0
1,316
0
0
0
0
0
41
112
b25e69fc38d8825c19795cba3e5542aaaa90721e
871
py
Python
restapi/tests/test_db.py
nataliyah123/phageParser
bc05d76c23d37ee80ffa2bbf6e7e977341bab3ee
[ "MIT" ]
65
2017-05-10T15:26:18.000Z
2022-03-07T07:10:12.000Z
restapi/tests/test_db.py
nataliyah123/phageParser
bc05d76c23d37ee80ffa2bbf6e7e977341bab3ee
[ "MIT" ]
143
2017-03-22T22:55:16.000Z
2020-02-13T15:52:03.000Z
restapi/tests/test_db.py
nataliyah123/phageParser
bc05d76c23d37ee80ffa2bbf6e7e977341bab3ee
[ "MIT" ]
44
2017-03-22T20:47:16.000Z
2022-03-15T21:45:12.000Z
# Create your tests here.
24.194444
67
0.732491
import pytest # Create your tests here. from restapi.models import Organism, Repeat @pytest.fixture def organism(): organism_name = "Organism Name" accession_number = "NC_000000" return Organism(name=organism_name, accession=accession_number) @pytest.mark.django_db def test_model_can_create_an_organism...
0
690
0
0
0
0
0
14
136
36ad03578fbd4cf456a34a1ca1fb206bbfdf9321
3,596
py
Python
training/threshold_launch_all.py
waliens/weakseg
dbd02d2729ae998d89bce0e5585a8144351f1feb
[ "MIT" ]
null
null
null
training/threshold_launch_all.py
waliens/weakseg
dbd02d2729ae998d89bce0e5585a8144351f1feb
[ "MIT" ]
null
null
null
training/threshold_launch_all.py
waliens/weakseg
dbd02d2729ae998d89bce0e5585a8144351f1feb
[ "MIT" ]
null
null
null
if __name__ == "__main__": import sys main(sys.argv[1:])
35.254902
138
0.587875
import logging import os from clustertools import set_stdout_logging, ParameterSet, Experiment from clustertools.storage import PickleStorage from generic_threshold import TuneThresholdComputation from train_monuseg_selftrain_clustertools import env_parser def launch(exp_name, comp_indexes, **env_params): thres...
0
0
0
0
0
3,197
0
125
203
a75a263ae3275978f244dc8bac27acb2d3601033
2,840
py
Python
bb.py
xufuzhi/crnn_pytorch
0e07d1269339101f147a0d83bb41a006cd0406d9
[ "MIT" ]
null
null
null
bb.py
xufuzhi/crnn_pytorch
0e07d1269339101f147a0d83bb41a006cd0406d9
[ "MIT" ]
null
null
null
bb.py
xufuzhi/crnn_pytorch
0e07d1269339101f147a0d83bb41a006cd0406d9
[ "MIT" ]
null
null
null
import lmdb import numpy as np import cv2 as cv import time import os from os.path import sep as path_sep from os.path import join as path_join import torch import torch.nn as nn path = '/home/xfz/Projects/PycharmProjects/TextRecognitionDataGenerator-master/trdg/out' f_nameList = os.listdir(path) for n in f_nameLis...
24.912281
104
0.554225
import lmdb import numpy as np import cv2 as cv from itertools import islice import time import os from os.path import sep as path_sep from os.path import join as path_join import torch import torch.nn as nn import torchvision path = '/home/xfz/Projects/PycharmProjects/TextRecognitionDataGenerator-master/trdg/out' ...
168
163
0
70
0
0
0
4
67
871bd408f6825032da50b04b58cfe9556b0affbf
5,657
py
Python
tasks.py
kkuuba/RemoteDownloadApp
3309413cc103dbdb8846bc04d956f25417aae65e
[ "MIT" ]
null
null
null
tasks.py
kkuuba/RemoteDownloadApp
3309413cc103dbdb8846bc04d956f25417aae65e
[ "MIT" ]
null
null
null
tasks.py
kkuuba/RemoteDownloadApp
3309413cc103dbdb8846bc04d956f25417aae65e
[ "MIT" ]
null
null
null
import os threads = [] # all threads list tasks_list = [] # all tasks list def start_received_request_action(data): """ Main function which extract task type and start proper action. Then return response. :param data: :return: response string """ if data["action"] == "check_status": ...
33.473373
112
0.586707
import youtube_dl import datetime import threading import requests import re import time import os threads = [] # all threads list tasks_list = [] # all tasks list def start_received_request_action(data): """ Main function which extract task type and start proper action. Then return response. :param d...
0
0
0
4,255
0
0
0
-43
155
0afd0f3258f5d2d8989f155e6e423b8f0d31ea32
1,478
py
Python
python/hongong/ch07/07_1.py
gangserver/py_test
869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4
[ "Apache-2.0" ]
null
null
null
python/hongong/ch07/07_1.py
gangserver/py_test
869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4
[ "Apache-2.0" ]
null
null
null
python/hongong/ch07/07_1.py
gangserver/py_test
869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4
[ "Apache-2.0" ]
null
null
null
from tensorflow import keras import matplotlib.pyplot as plt from sklearn.linear_model import SGDClassifier from sklearn.model_selection import cross_validate import numpy as np from sklearn.model_selection import train_test_split (train_input, train_target), (test_input, test_target) =\ keras.datasets.fashion_mn...
30.163265
80
0.780108
from tensorflow import keras import matplotlib.pyplot as plt from sklearn.linear_model import SGDClassifier from sklearn.model_selection import cross_validate import numpy as np from sklearn.model_selection import train_test_split (train_input, train_target), (test_input, test_target) =\ keras.datasets.fashion_mn...
15
0
0
0
0
0
0
0
0
9819c7b7eb6bafe32bbed7d5ce5ac16f938ab47b
3,731
py
Python
src/plasmid_verification/infrastructure/service/error_probability_sample_trimming_service.py
Midnighter/plasmid_verification
844b38047b1bf19fa9903299a1e6470583b9c3d5
[ "Apache-2.0" ]
null
null
null
src/plasmid_verification/infrastructure/service/error_probability_sample_trimming_service.py
Midnighter/plasmid_verification
844b38047b1bf19fa9903299a1e6470583b9c3d5
[ "Apache-2.0" ]
null
null
null
src/plasmid_verification/infrastructure/service/error_probability_sample_trimming_service.py
Midnighter/plasmid_verification
844b38047b1bf19fa9903299a1e6470583b9c3d5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021, Moritz E. Beber. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.869159
87
0.629322
# Copyright (c) 2021, Moritz E. Beber. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
0
2,663
0
210
0
0
0
79
114
a8e2f087a78a168da5dd007f37155dde5ccd18b0
190
py
Python
other/cap_huaxia_fund.py
thedestiny/fund_python
20f55a6b40e70cf9217c9406375653d8aea093d1
[ "Apache-2.0" ]
1
2022-02-14T02:58:02.000Z
2022-02-14T02:58:02.000Z
other/cap_huaxia_fund.py
thedestiny/fund_python
20f55a6b40e70cf9217c9406375653d8aea093d1
[ "Apache-2.0" ]
null
null
null
other/cap_huaxia_fund.py
thedestiny/fund_python
20f55a6b40e70cf9217c9406375653d8aea093d1
[ "Apache-2.0" ]
null
null
null
import requests req_url = "https://www.chinaamc.com/indexfundvalue.js" response = requests.get(req_url) print(response.apparent_encoding) response.encoding = "UTF-8" print(response.text)
19
54
0.784211
import requests req_url = "https://www.chinaamc.com/indexfundvalue.js" response = requests.get(req_url) print(response.apparent_encoding) response.encoding = "UTF-8" print(response.text)
0
0
0
0
0
0
0
0
0
3598ca72244cf9a4dc7bdfd6299f529aa2bb2a1e
7,291
py
Python
alsaloop.py
loichu/alsaloop
dfeca261e2723f594309ea3e585f93eb34cd28b6
[ "MIT" ]
null
null
null
alsaloop.py
loichu/alsaloop
dfeca261e2723f594309ea3e585f93eb34cd28b6
[ "MIT" ]
null
null
null
alsaloop.py
loichu/alsaloop
dfeca261e2723f594309ea3e585f93eb34cd28b6
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Copyright (c) 2020 Modul 9/HiFiBerry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
35.740196
117
0.656289
#!/usr/bin/env python ''' Copyright (c) 2020 Modul 9/HiFiBerry Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
0
0
0
0
0
826
0
0
92
a2472b8255a2d5c90e168c0d65b74bc731052a7c
4,485
py
Python
transaction-processor/handler/car.py
mayankmk14/Manufacturing
2b8893210e2443ea04afa2f696f6ffbaf0f2a568
[ "MIT" ]
null
null
null
transaction-processor/handler/car.py
mayankmk14/Manufacturing
2b8893210e2443ea04afa2f696f6ffbaf0f2a568
[ "MIT" ]
null
null
null
transaction-processor/handler/car.py
mayankmk14/Manufacturing
2b8893210e2443ea04afa2f696f6ffbaf0f2a568
[ "MIT" ]
null
null
null
import logging import handler.utils as utils LOGGER = logging.getLogger(__name__)
44.405941
147
0.759866
import logging import hashlib import assets_pb2 as assets from sawtooth_sdk.processor.exceptions import InvalidTransaction import handler.addressing as Addressing import handler.utils as utils LOGGER = logging.getLogger(__name__) def create_car(payloadobj,signer,context,txId): formDetails = payloadobj.car LO...
0
0
0
0
0
4,232
0
60
111
6f2fae3b336ae14b5b9a45e248451090f7ad2b91
1,825
py
Python
archived/misc/post-processor/archive/lh.py
XiaoxiongXie/WRF-SUEWS
51f8d2359b394016e65121f3baab908b1ad4d89c
[ "MIT" ]
2
2020-09-24T09:15:31.000Z
2020-09-28T16:16:30.000Z
archived/misc/post-processor/archive/lh.py
XiaoxiongXie/WRF-SUEWS
51f8d2359b394016e65121f3baab908b1ad4d89c
[ "MIT" ]
3
2020-09-24T13:46:24.000Z
2020-10-01T09:54:17.000Z
archived/misc/post-processor/archive/lh.py
XiaoxiongXie/WRF-SUEWS
51f8d2359b394016e65121f3baab908b1ad4d89c
[ "MIT" ]
2
2020-10-01T09:46:58.000Z
2022-01-09T10:38:21.000Z
#!/usr/bin/env python from netCDF4 import Dataset import matplotlib.pyplot as plt from matplotlib.cm import get_cmap import cartopy.crs as crs from cartopy.feature import NaturalEarthFeature from wrf import ALL_TIMES, to_np, getvar, smooth2d, get_cartopy, cartopy_xlim, cartopy_ylim, latlon_coords # Open the NetCDF fi...
30.932203
106
0.737534
#!/usr/bin/env python from netCDF4 import Dataset import matplotlib.pyplot as plt from matplotlib.cm import get_cmap import cartopy.crs as crs from cartopy.feature import NaturalEarthFeature from wrf import ALL_TIMES, to_np, getvar, smooth2d, get_cartopy, cartopy_xlim, cartopy_ylim, latlon_coords # Open the NetCDF fi...
0
0
0
0
0
0
0
0
0
6dbd2946d5141f0060344f537b12a753d0d1316c
9,055
py
Python
app.py
Aarrtteemm123/Shopping-list
38b2143df69408d7502e8d588c5a479f295a7d9c
[ "MIT" ]
null
null
null
app.py
Aarrtteemm123/Shopping-list
38b2143df69408d7502e8d588c5a479f295a7d9c
[ "MIT" ]
null
null
null
app.py
Aarrtteemm123/Shopping-list
38b2143df69408d7502e8d588c5a479f295a7d9c
[ "MIT" ]
null
null
null
MyApp().run()
40.424107
113
0.622529
from kivy.storage.jsonstore import JsonStore from kivy.uix.boxlayout import BoxLayout from kivy.uix.floatlayout import FloatLayout from kivy.uix.screenmanager import Screen from kivymd.app import MDApp from kivy.lang import Builder from kivymd.uix.button import MDFlatButton, MDFloatingActionButton from kivymd.uix.dialo...
0
0
0
8,422
0
0
0
231
380
45c8c3839ce9fa0eb07689fae3e47641138f8273
3,976
py
Python
client.py
chvia223/python-networking
5016bac16be534cb99557414c46bd24e17bd44cc
[ "MIT" ]
null
null
null
client.py
chvia223/python-networking
5016bac16be534cb99557414c46bd24e17bd44cc
[ "MIT" ]
null
null
null
client.py
chvia223/python-networking
5016bac16be534cb99557414c46bd24e17bd44cc
[ "MIT" ]
null
null
null
import socket HEADER = 64 PORT = 5050 FORMAT = 'utf-8' DISCONNECT_MESSAGE = "!DISCONNECT" # SERVER = socket.gethostbyname(socket.gethostname()) SERVER = "192.168.0.155" ADDR = (SERVER, PORT) """ Calls track search endpoint and populates a dictionary with results. """ try: client = socket.socket(socket.AF_I...
32.064516
120
0.584759
from multiprocessing.sharedctypes import Value import socket import spotipy from spotipy.oauth2 import SpotifyClientCredentials HEADER = 64 PORT = 5050 FORMAT = 'utf-8' DISCONNECT_MESSAGE = "!DISCONNECT" # SERVER = socket.gethostbyname(socket.gethostname()) SERVER = "192.168.0.155" ADDR = (SERVER, PORT) def init_cl...
0
0
0
0
0
3,226
0
48
183
2b659a95e79523dc6dbc454ebe70ac949c0e88ad
178
py
Python
Ekeopara_Praise/Phase 2/LIST/Day43 Tasks/Task4.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Ekeopara_Praise/Phase 2/LIST/Day43 Tasks/Task4.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Ekeopara_Praise/Phase 2/LIST/Day43 Tasks/Task4.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
'''4. Write a Python program to generate groups of five consecutive numbers in a list. ''' l = [[5*i + j for j in range(1,6)] for i in range(5)] print(l) #Reference: w3resource
29.666667
90
0.679775
'''4. Write a Python program to generate groups of five consecutive numbers in a list. ''' l = [[5*i + j for j in range(1,6)] for i in range(5)] print(l) #Reference: w3resource
0
0
0
0
0
0
0
0
0
4f54f2ccd5f215b846830ebda095fb62b67d6fdf
12,147
py
Python
kursl/mcmc.py
laszukdawid/KurSL
2d7427a71d01f1599c2626da2359f9e495fa4d7e
[ "Apache-2.0" ]
3
2018-01-24T20:10:47.000Z
2020-01-06T23:27:14.000Z
kursl/mcmc.py
laszukdawid/KurSL
2d7427a71d01f1599c2626da2359f9e495fa4d7e
[ "Apache-2.0" ]
1
2018-01-12T05:24:13.000Z
2018-01-12T05:47:11.000Z
kursl/mcmc.py
laszukdawid/KurSL
2d7427a71d01f1599c2626da2359f9e495fa4d7e
[ "Apache-2.0" ]
1
2020-01-06T23:27:17.000Z
2020-01-06T23:27:17.000Z
#!/usr/bin/python # coding: UTF-8 # # Author: Dawid Laszuk # Contact: laszukdawid@gmail.com # # Feel free to contact for any information. from __future__ import division, print_function import logging import numpy as np from .kursl_model import KurSL # End of Class ###################################### # Exaple us...
32.392
103
0.56162
#!/usr/bin/python # coding: UTF-8 # # Author: Dawid Laszuk # Contact: laszukdawid@gmail.com # # Feel free to contact for any information. from __future__ import division, print_function import emcee import logging import numpy as np import time, datetime from .kursl_model import KurSL from .model import ModelWrapper ...
0
2,520
0
7,274
0
0
0
1
90
8041258dfbf3834cf80dcf7d8b33d6f06534a88f
2,941
py
Python
gpu_bestbuy.py
elithaxxor/gpu_scraper
065f33facadaf0bce9e6b5a4b95d1895b340058f
[ "MIT" ]
null
null
null
gpu_bestbuy.py
elithaxxor/gpu_scraper
065f33facadaf0bce9e6b5a4b95d1895b340058f
[ "MIT" ]
null
null
null
gpu_bestbuy.py
elithaxxor/gpu_scraper
065f33facadaf0bce9e6b5a4b95d1895b340058f
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import info # make sure this path is correct PATH = "C:\Program Files (x86)\ChromeDriver\chromedriver.exe" driver = webdr...
34.6
173
0.66202
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import info # make sure this path is correct PATH = "C:\Program Files (x86)\ChromeDriver\chromedriver.exe" driver = webdr...
0
0
0
0
0
0
0
0
0
ac0785eb6e8f573fd60308c40a0160d7225b62f0
15,306
py
Python
aws-network-firewall/operations.py
cs-shivaji-kolape/connector-aws-network-firewall
dea59e7bb3c434cf7b3c83764b0a3929071510c9
[ "MIT" ]
null
null
null
aws-network-firewall/operations.py
cs-shivaji-kolape/connector-aws-network-firewall
dea59e7bb3c434cf7b3c83764b0a3929071510c9
[ "MIT" ]
null
null
null
aws-network-firewall/operations.py
cs-shivaji-kolape/connector-aws-network-firewall
dea59e7bb3c434cf7b3c83764b0a3929071510c9
[ "MIT" ]
1
2021-12-17T08:28:33.000Z
2021-12-17T08:28:33.000Z
""" Copyright start Copyright (C) 2008 - 2021 Fortinet Inc. All rights reserved. FORTINET CONFIDENTIAL & FORTINET PROPRIETARY SOURCE CODE Copyright end """ from connectors.core.connector import get_logger logger = get_logger('aws-network-firewall') TEMP_CRED_ENDPOINT = 'http://169.254.169.254/latest/meta-data...
36.705036
117
0.650725
""" Copyright start Copyright (C) 2008 - 2021 Fortinet Inc. All rights reserved. FORTINET CONFIDENTIAL & FORTINET PROPRIETARY SOURCE CODE Copyright end """ import boto3, requests, json from connectors.core.connector import get_logger, ConnectorError logger = get_logger('aws-network-firewall') TEMP_CRED_ENDPO...
0
0
0
3,634
0
9,627
0
23
598
d63e4a467d3bca00f188583137b8940e30776ece
665
py
Python
hackerrank/13. regex and parsing/15.py
Eurydia/Xian-assignment
4a7e4bcd3d4999ea7429054fec1792064c96ff30
[ "MIT" ]
null
null
null
hackerrank/13. regex and parsing/15.py
Eurydia/Xian-assignment
4a7e4bcd3d4999ea7429054fec1792064c96ff30
[ "MIT" ]
null
null
null
hackerrank/13. regex and parsing/15.py
Eurydia/Xian-assignment
4a7e4bcd3d4999ea7429054fec1792064c96ff30
[ "MIT" ]
null
null
null
# Enter your code here. Read input from STDIN. Print output to STDOUTseen = '' import re for _ in range(1, int(input())+1): uid = str(input()) seen = '' valid = True if len(uid) == 10: for char in uid: if char not in seen and char.isalnum(): seen = seen + char ...
26.6
87
0.503759
# Enter your code here. Read input from STDIN. Print output to STDOUTseen = '' from string import ascii_uppercase, digits import re for _ in range(1, int(input())+1): uid = str(input()) seen = '' valid = True if len(uid) == 10: for char in uid: if char not in seen and char.isaln...
0
0
0
0
0
0
0
21
22
17b7f7b54d65da3b60ca22904903fde7bce6a3ea
9,286
py
Python
django_bitcoin/tasks.py
texib/bitcoin-zoo
69dc3443a5132ef02f340676a985e4ad9a244eed
[ "MIT" ]
1
2018-03-24T14:42:06.000Z
2018-03-24T14:42:06.000Z
django_bitcoin/tasks.py
kenttw/bitcoin-zoo
69dc3443a5132ef02f340676a985e4ad9a244eed
[ "MIT" ]
1
2015-04-21T03:47:07.000Z
2015-04-21T03:47:12.000Z
django_bitcoin/tasks.py
texib/bitcoin-zoo
69dc3443a5132ef02f340676a985e4ad9a244eed
[ "MIT" ]
null
null
null
from __future__ import with_statement from django.db import models
46.89899
123
0.689856
from __future__ import with_statement import datetime import random import hashlib import base64 from decimal import Decimal from django.db import models from django_bitcoin.utils import bitcoind from django_bitcoin import settings , models from django.utils.translation import ugettext as _ from django_bitcoin.models...
0
8,221
0
0
0
190
0
248
538
4bc7429b295385802f8890a45eedec78c502bd33
740
py
Python
test/test_add_contact_to_group.py
Sashatq/python_training
9e403db6e3bf5e17b8ce0d4d3d9887841720913c
[ "Apache-2.0" ]
null
null
null
test/test_add_contact_to_group.py
Sashatq/python_training
9e403db6e3bf5e17b8ce0d4d3d9887841720913c
[ "Apache-2.0" ]
null
null
null
test/test_add_contact_to_group.py
Sashatq/python_training
9e403db6e3bf5e17b8ce0d4d3d9887841720913c
[ "Apache-2.0" ]
null
null
null
# # # # # # #- # #
20.555556
106
0.762162
from model.contact import Contact from model.group import Group def test_add_contact_to_group(app, db): if len(db.get_contact_list()) == 0: app.contact.create.contact(Contact(name='for_group', lname="for_group")) app.group.create(Group(name="add_contact_here", header="add_contact_here", footer="add_co...
292
0
0
0
0
457
0
20
67
800fd32b0652a937b970d237c4fe071f077120c7
363
py
Python
resume.py
BananaLoaf/pix2pix-tf2-keras
8925941e8e5cd52563255e8e2cc58f03f7cc5cde
[ "MIT" ]
1
2021-08-08T16:30:34.000Z
2021-08-08T16:30:34.000Z
resume.py
BananaLoaf/pix2pix-tf2-keras
8925941e8e5cd52563255e8e2cc58f03f7cc5cde
[ "MIT" ]
null
null
null
resume.py
BananaLoaf/pix2pix-tf2-keras
8925941e8e5cd52563255e8e2cc58f03f7cc5cde
[ "MIT" ]
2
2020-03-24T14:31:42.000Z
2020-11-16T22:36:07.000Z
from pathlib import Path from tools.config import Config, ResumeConfig from tools.runner import CustomRunner if __name__ == '__main__': resume_config = ResumeConfig.cli("Pix2Pix Tensorflow 2 Keras implementation") config = Config.load(Path(resume_config.path).joinpath("config.json")) CustomRunner.resume(c...
36.3
81
0.790634
from pathlib import Path from tools.config import Config, ResumeConfig from tools.runner import CustomRunner if __name__ == '__main__': resume_config = ResumeConfig.cli("Pix2Pix Tensorflow 2 Keras implementation") config = Config.load(Path(resume_config.path).joinpath("config.json")) CustomRunner.resume(c...
0
0
0
0
0
0
0
0
0
6acb5d7172f11394af5532fc042454602331eba6
12,274
py
Python
synthesize.py
tranmanhdat/FastSpeech2
bc5e28e1463de2ba167ae9a2cf32e2d8aa366e02
[ "MIT" ]
null
null
null
synthesize.py
tranmanhdat/FastSpeech2
bc5e28e1463de2ba167ae9a2cf32e2d8aa366e02
[ "MIT" ]
null
null
null
synthesize.py
tranmanhdat/FastSpeech2
bc5e28e1463de2ba167ae9a2cf32e2d8aa366e02
[ "MIT" ]
null
null
null
import argparse import torch import yaml import numpy as np from torch.utils.data import DataLoader from g2p_en import G2p from utils.model import get_model, get_vocoder from utils.tools import to_device from dataset import TextDataset import time device = torch.device("cuda" if torch.cuda.is_available() ...
35.576812
98
0.559801
import re import argparse from string import punctuation from scipy.io import wavfile import torch import yaml import numpy as np from torch.utils.data import DataLoader from g2p_en import G2p from pypinyin import pinyin, Style from utils.model import get_model, get_vocoder from utils.tools import to_dev...
0
0
0
0
0
6,008
0
85
263
ef0c02fedf75e263733415cb1b6dfb1fda046eee
482
py
Python
examples/honeypot/topo.py
Dobrrk/minicps
955b0255b2ac79b11f501645b847169848e314d6
[ "MIT" ]
null
null
null
examples/honeypot/topo.py
Dobrrk/minicps
955b0255b2ac79b11f501645b847169848e314d6
[ "MIT" ]
null
null
null
examples/honeypot/topo.py
Dobrrk/minicps
955b0255b2ac79b11f501645b847169848e314d6
[ "MIT" ]
null
null
null
""" swat-s1 topology """
18.538462
42
0.572614
""" swat-s1 topology """ from mininet.topo import Topo as TopoBase from pinger import Pinger from plc2 import Plc2 from plc1 import Plc1 class Topo(TopoBase): NETMASK = '/24' NODES = [Plc1, Plc2, Pinger] def build(self): switch = self.addSwitch('s1') for node in Topo.NODES: ...
0
0
0
319
0
0
0
24
113
b81d6821a26835f297c3903bcbc442d359c7cbe5
2,396
py
Python
DesignPresentation/Amdhal.py
bjlemaire/DEM
b413304fd4d3368af73aff9743d1da9d7deb129e
[ "MIT" ]
null
null
null
DesignPresentation/Amdhal.py
bjlemaire/DEM
b413304fd4d3368af73aff9743d1da9d7deb129e
[ "MIT" ]
null
null
null
DesignPresentation/Amdhal.py
bjlemaire/DEM
b413304fd4d3368af73aff9743d1da9d7deb129e
[ "MIT" ]
1
2019-08-07T17:35:26.000Z
2019-08-07T17:35:26.000Z
import matplotlib.pyplot as plt import numpy as np from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) rc('text', usetex=True) c =0.9996 f = lambda p: 1/((1-c)+(c/p)) p_list = np.arange(1,1024) N=100 tsm = 18.4e-9 tnode = 65e-9 tproc = 0.08e-9 toff = 27e-3 T = N*N/6 dt = 0.24 ...
39.933333
155
0.632304
import matplotlib.pyplot as plt import numpy as np from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) rc('text', usetex=True) c =0.9996 f = lambda p: 1/((1-c)+(c/p)) p_list = np.arange(1,1024) N=100 tsm = 18.4e-9 tnode = 65e-9 tproc = 0.08e-9 toff = 27e-3 T = N*N/6 dt = 0.24 ...
0
0
0
0
0
278
0
0
46
d2c48659fa5d2855283695eacbcaa778092ba8f8
981
py
Python
src/example/python/read-single-psicquic-python3.py
PSICQUIC/psicquic-solr-ws
9bfe2665fe1071e524548136c66bc1f5c7df2b05
[ "CC-BY-4.0" ]
2
2021-04-30T13:10:50.000Z
2021-12-14T10:55:36.000Z
src/example/python/read-single-psicquic-python3.py
PSICQUIC/psicquic-solr-ws
9bfe2665fe1071e524548136c66bc1f5c7df2b05
[ "CC-BY-4.0" ]
null
null
null
src/example/python/read-single-psicquic-python3.py
PSICQUIC/psicquic-solr-ws
9bfe2665fe1071e524548136c66bc1f5c7df2b05
[ "CC-BY-4.0" ]
1
2018-10-23T11:22:24.000Z
2018-10-23T11:22:24.000Z
from urllib.request import urlopen # ------------------ MITAB FUNCTIONS ------------------ # ----------------------------------------------------- # Note that we are only going to get 10 interactions at most queryUrl = "http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query/BBC1?first...
26.513514
134
0.598369
from urllib.request import urlopen # ------------------ MITAB FUNCTIONS ------------------ def getXrefByDatabase(line, database): fields = line.split('|') for field in fields: parts = field.split(':') db = parts[0] value = parts[1].split('(')[0] if database == db: retur...
0
0
0
0
0
213
0
0
23
81bd654649daec8245593e95ab09d02d5ede25fb
2,240
py
Python
models/PasswordToken.py
PunitTailor55/RootTheBox
9662a1dc5830a03326257fced058fd7384685cff
[ "Apache-2.0" ]
null
null
null
models/PasswordToken.py
PunitTailor55/RootTheBox
9662a1dc5830a03326257fced058fd7384685cff
[ "Apache-2.0" ]
null
null
null
models/PasswordToken.py
PunitTailor55/RootTheBox
9662a1dc5830a03326257fced058fd7384685cff
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sep 6, 2020 @author: eljeffe Copyright 2020 Root the Box 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/licen...
32
88
0.688839
# -*- coding: utf-8 -*- """ Created on Sep 6, 2020 @author: eljeffe Copyright 2020 Root the Box 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/licen...
0
657
0
592
0
0
0
122
200