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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
07c741e4ee7583cf8bb4947c9a88d2da52327f36 | 2,392 | py | Python | src/grover.py | Amorteza1376/quantum-computing-search-algorithms | cffaa568cbebe31cf62eff0e3b71c097803a81f5 | [
"Apache-2.0"
] | 1 | 2022-02-28T00:06:31.000Z | 2022-02-28T00:06:31.000Z | src/grover.py | AMorteza/Quantum-Computing-Search-Algorithms | cffaa568cbebe31cf62eff0e3b71c097803a81f5 | [
"Apache-2.0"
] | null | null | null | src/grover.py | AMorteza/Quantum-Computing-Search-Algorithms | cffaa568cbebe31cf62eff0e3b71c097803a81f5 | [
"Apache-2.0"
] | null | null | null | import sys
import warnings
if not sys.warnoptions:
warnings.simplefilter("ignore")
import math
from absl import app
import numpy as np
import lib.helper as helper
import lib.ops as ops
import lib.state as state
def make_f(d: int = 3, r: int = 1):
"""Construct function that will return 1 for 'solutions' bits."""... | 28.47619 | 79 | 0.636706 | import sys
import warnings
if not sys.warnoptions:
warnings.simplefilter("ignore")
import math
from absl import app
import numpy as np
import lib.helper as helper
import lib.ops as ops
import lib.state as state
def make_f(d: int = 3, r: int = 1):
"""Construct function that will return 1 for 'solutions' bits."""... | 0 | 0 | 0 | 0 | 0 | 224 | 0 | 0 | 49 |
e5ce4702df7e69c0e66d62077f16278bad6f765b | 1,062 | py | Python | mundo2/ex070.py | dilsonm/CeV | 8043be36b2da187065691d23ed5cb40fd65f806f | [
"MIT"
] | null | null | null | mundo2/ex070.py | dilsonm/CeV | 8043be36b2da187065691d23ed5cb40fd65f806f | [
"MIT"
] | null | null | null | mundo2/ex070.py | dilsonm/CeV | 8043be36b2da187065691d23ed5cb40fd65f806f | [
"MIT"
] | null | null | null | '''Crie um programa que leia o nome e o preco de varios produtos. O programa devera perguntar se o usuario vai continuar.
No final mostre:
a) Qual o total gasto na compra
b) Quantos produtos custam mais de R$1000.
c) Qual o nome do produto mais barato. '''
sair = 'N'
compras = 0
prdcaro = 0
nomeprd ... | 30.342857 | 121 | 0.606403 | '''Crie um programa que leia o nome e o preco de varios produtos. O programa devera perguntar se o usuario vai continuar.
No final mostre:
a) Qual é o total gasto na compra
b) Quantos produtos custam mais de R$1000.
c) Qual é o nome do produto mais barato. '''
sair = 'N'
compras = 0
prdcaro = 0
nomepr... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9c51c1ac7ebb3cce0139dcd86ecdc00b1bfeba0a | 138 | py | Python | volume/app-django/apps/portfolio/urls.py | chriswmann/chriswmann.me | 55c0dac72c63b1c22c27123be8c60c93b27628eb | [
"MIT"
] | null | null | null | volume/app-django/apps/portfolio/urls.py | chriswmann/chriswmann.me | 55c0dac72c63b1c22c27123be8c60c93b27628eb | [
"MIT"
] | null | null | null | volume/app-django/apps/portfolio/urls.py | chriswmann/chriswmann.me | 55c0dac72c63b1c22c27123be8c60c93b27628eb | [
"MIT"
] | null | null | null | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'', views.HomeView.as_view(), name='home'),
]
| 17.25 | 56 | 0.615942 | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'', views.HomeView.as_view(), name='home'),
]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b8883f61b286cf4cf60d36e45c1448f49746e3dd | 6,169 | py | Python | pylitho_post2.py | larskaislaniemi/PyLitho | ad64642b63196448b0d93d0f44ed89fb1ffbefa6 | [
"BSD-3-Clause"
] | null | null | null | pylitho_post2.py | larskaislaniemi/PyLitho | ad64642b63196448b0d93d0f44ed89fb1ffbefa6 | [
"BSD-3-Clause"
] | null | null | null | pylitho_post2.py | larskaislaniemi/PyLitho | ad64642b63196448b0d93d0f44ed89fb1ffbefa6 | [
"BSD-3-Clause"
] | null | null | null | try:
import cPickle as pickle
except:
| 34.853107 | 186 | 0.5278 | import os
import numpy as np
import csv
import pandas as pd
import sys
try:
import cPickle as pickle
except:
import pickle
import matplotlib.pyplot as plt
import progressbar as pb
import interpolate as ip
def readData(path=None, outfilename=None, maxmodels=None, everytstep=1, exclcondition="False"):
DATA... | 0 | 0 | 0 | 0 | 0 | 5,907 | 0 | -31 | 251 |
efd50737439f7e376a3ee4d299357fe33822a578 | 640 | py | Python | 4.py | kwondohun0308/Beakjoon | 65e8c1015bcb3bb757d8056525034ee333ecb681 | [
"MIT"
] | null | null | null | 4.py | kwondohun0308/Beakjoon | 65e8c1015bcb3bb757d8056525034ee333ecb681 | [
"MIT"
] | null | null | null | 4.py | kwondohun0308/Beakjoon | 65e8c1015bcb3bb757d8056525034ee333ecb681 | [
"MIT"
] | null | null | null | try:
f = open("fruit.txt", "r")
a = int(f.readline())
o = int(f.readline())
g = int(f.readline())
f.close()
except:
a,o,g = 0,0,0
while True:
print(" ",a,", ",o,", ",g," .")
S,t = input(" ( q 0 ) : ").split()
t = int(t)
if S == 'apple' :
a += t
elif S == 'ora... | 21.333333 | 66 | 0.421875 | try:
f = open("fruit.txt", "r")
a = int(f.readline())
o = int(f.readline())
g = int(f.readline())
f.close()
except:
a,o,g = 0,0,0
while True:
print("현재 재고는 사과",a,"개, 오렌지",o,"개, 포도",g,"개 입니다.")
S,t = input("변동할 재고와 갯수를 입력해주세요(저장하고 나갈때는 q 0 입력) : ").split()
t = int(t)
if S == ... | 141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bc31ee97f9847865fe19612ed1d30ac5f92e43c2 | 1,468 | py | Python | Software/Sandbox/Integracion numérica/tuneo_parametros/int_prueba_max_step.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Sandbox/Integracion numérica/tuneo_parametros/int_prueba_max_step.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Sandbox/Integracion numérica/tuneo_parametros/int_prueba_max_step.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | """
Created on Sun Feb 2 13:28:48 2020
@author: matias
"""
import numpy as np
from matplotlib import pyplot as plt
from scipy.interpolate import interp1d
from scipy.constants import c as c_luz #metros/segundos
c_luz_norm = c_luz/1000
import sys
import os
from os.path import join as osjoin
from pc_path import defini... | 21.275362 | 72 | 0.684605 | """
Created on Sun Feb 2 13:28:48 2020
@author: matias
"""
import numpy as np
from matplotlib import pyplot as plt
from scipy.interpolate import interp1d
from scipy.constants import c as c_luz #metros/segundos
c_luz_norm = c_luz/1000
import sys
import os
from os.path import join as osjoin
from pc_path import defini... | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eb44d15ad19bfd0177557fa07f008e8d3ca115ed | 7,152 | py | Python | Diccionario.py | JSNavas/Dicionario-Python | 618d8c45229dc297d67f1f826f093dfc720c50a0 | [
"MIT"
] | null | null | null | Diccionario.py | JSNavas/Dicionario-Python | 618d8c45229dc297d67f1f826f093dfc720c50a0 | [
"MIT"
] | null | null | null | Diccionario.py | JSNavas/Dicionario-Python | 618d8c45229dc297d67f1f826f093dfc720c50a0 | [
"MIT"
] | null | null | null | import os
diccionario = []
crearArchivo()
cargarArchivo()
menu = True
while menu == True:
os.system("clear")
print "\t\t\t [DICCIONARIO]"
print "\t\t\t -------------\n"
print " 1. AGREGAR AL DICCIONARIO"
print " 2. MOSTRAR DICCIONARIO"
print " 3. BUSCAR EN EL DICCIO... | 25.726619 | 100 | 0.460011 | import os
diccionario = []
def crearArchivo():
archivo = open("Terminos.txt", "a")
archivo.close()
def cargarArchivo():
archivo = open("Terminos.txt", "r")
linea = archivo.readline()
if linea:
while linea:
if linea[-1] == '\n':
linea = linea[:-1]
... | 0 | 0 | 0 | 0 | 0 | 3,842 | 0 | 0 | 161 |
2072751443062854040f695cd23e0d625db6c2eb | 3,349 | py | Python | surf_dist.py | ibesora/SurfaceDistanceCalculator | 840d0b27f879aa3ba6bd4ec8066df0aa524406b5 | [
"MIT"
] | 1 | 2021-03-15T10:12:18.000Z | 2021-03-15T10:12:18.000Z | surf_dist.py | ibesora/SurfaceDistanceCalculator | 840d0b27f879aa3ba6bd4ec8066df0aa524406b5 | [
"MIT"
] | null | null | null | surf_dist.py | ibesora/SurfaceDistanceCalculator | 840d0b27f879aa3ba6bd4ec8066df0aa524406b5 | [
"MIT"
] | null | null | null |
DefaultPreFilePath = 'data/pre.data'
DefaultPostFilePath = 'data/post.data'
MetersPerPixel = 30
MetersPerHeightValue = 11
if __name__ == '__main__':
exit(main())
| 49.25 | 120 | 0.709167 | from argparse import ArgumentParser
import numpy as np
from calculator import computeSurfaceDistance
DefaultPreFilePath = 'data/pre.data'
DefaultPostFilePath = 'data/post.data'
MetersPerPixel = 30
MetersPerHeightValue = 11
def main() -> int:
parser = ArgumentParser('Surface distance calculator')
parser.add_ar... | 0 | 0 | 0 | 0 | 0 | 3,057 | 0 | 35 | 89 |
aa7d2c53faff7de89f0f1925e6ceaf202713feca | 14,540 | py | Python | user_systems/migrations/0001_initial.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 22 | 2015-01-16T01:36:32.000Z | 2020-06-08T00:46:18.000Z | user_systems/migrations/0001_initial.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 8 | 2015-12-28T18:56:19.000Z | 2019-04-01T17:33:48.000Z | user_systems/migrations/0001_initial.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 13 | 2015-01-13T20:56:22.000Z | 2022-02-23T06:01:17.000Z | # -*- coding: utf-8 -*-
| 68.262911 | 172 | 0.600825 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'UserOperatingSystem'
db.create_table('user_systems_useroperatingsystem', (
('id'... | 0 | 0 | 0 | 14,387 | 0 | 0 | 0 | 18 | 111 |
549e626f410981991a678bd5437641542844793b | 1,094 | py | Python | Example/feature-3.1.0/tools/bin/mygetsequence.py | MukundhMurthy/NucleicNet | fca09d38b9a70d2c402414df7cc06b9dd2824449 | [
"BSD-3-Clause"
] | 1 | 2021-01-30T18:41:53.000Z | 2021-01-30T18:41:53.000Z | Example/feature-3.1.0/tools/bin/mygetsequence.py | MukundhMurthy/NucleicNet | fca09d38b9a70d2c402414df7cc06b9dd2824449 | [
"BSD-3-Clause"
] | null | null | null | Example/feature-3.1.0/tools/bin/mygetsequence.py | MukundhMurthy/NucleicNet | fca09d38b9a70d2c402414df7cc06b9dd2824449 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
import sys
import time
from Bio import Fasta
DEFAULT_DICT_FILE = '/project1/structure/mliang/pdb/derived_data/pdb_seqres.idx'
DEFAULT_OUTFH = sys.stdout
dict_file = DEFAULT_DICT_FILE
outfh = DEFAULT_OUTFH
start_time = time.time()
fdict = Fasta.Dictionary(dict_file)
elapse_time = time.time() -... | 25.44186 | 80 | 0.665448 | #! /usr/bin/env python
import sys,os
import time
from Bio import Fasta
DEFAULT_DICT_FILE = '/project1/structure/mliang/pdb/derived_data/pdb_seqres.idx'
DEFAULT_OUTFH = sys.stdout
dict_file = DEFAULT_DICT_FILE
outfh = DEFAULT_OUTFH
start_time = time.time()
fdict = Fasta.Dictionary(dict_file)
elapse_time = time.time(... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 |
bb4dabbb4ba6dc924b84d9a9d0643a666e34e4a3 | 288 | py | Python | zillowdb/__init__.py | MacHu-GWU/zillowdb-project | 020266257311fa667a3b5fcca15450eb00584aaf | [
"MIT"
] | null | null | null | zillowdb/__init__.py | MacHu-GWU/zillowdb-project | 020266257311fa667a3b5fcca15450eb00584aaf | [
"MIT"
] | null | null | null | zillowdb/__init__.py | MacHu-GWU/zillowdb-project | 020266257311fa667a3b5fcca15450eb00584aaf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
http://www.zillow.com/browse/homes/
Zillow:
State -> County -> Zipcode -> Street -> Address
"""
__version__ = "0.0.1"
__author__ = "Sanhe Hu"
__license__ = "MIT"
__short_description__ = "Zillow Database Crawler" | 19.2 | 49 | 0.690972 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
http://www.zillow.com/browse/homes/
Zillow有一个页面按照层级列出了所有房产的具体地址信息:
State -> County -> Zipcode -> Street -> Address
"""
__version__ = "0.0.1"
__author__ = "Sanhe Hu"
__license__ = "MIT"
__short_description__ = "Zillow Database Crawler" | 69 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d9e475f8437f69bff1a079c827e541ff173b19ed | 6,099 | py | Python | SqlMaster/migrations/0001_initial.py | lakesayriver/smartcom | 8e489b00a7c1429066a3051b9a1e53ca95a1bbb2 | [
"Apache-2.0"
] | null | null | null | SqlMaster/migrations/0001_initial.py | lakesayriver/smartcom | 8e489b00a7c1429066a3051b9a1e53ca95a1bbb2 | [
"Apache-2.0"
] | null | null | null | SqlMaster/migrations/0001_initial.py | lakesayriver/smartcom | 8e489b00a7c1429066a3051b9a1e53ca95a1bbb2 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2 on 2019-04-27 16:33
| 57.537736 | 168 | 0.603378 | # Generated by Django 2.2 on 2019-04-27 16:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Domain',
fields=[
... | 378 | 0 | 0 | 5,828 | 0 | 0 | 0 | 30 | 68 |
541de982602d6f7fa4f1d4748d86c549c85b7b73 | 60,894 | py | Python | tencentcloud/monitor/v20180724/monitor_client.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | tencentcloud/monitor/v20180724/monitor_client.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | tencentcloud/monitor/v20180724/monitor_client.py | qin5506/tencentcloud-sdk-python | e9c59d80beabf75fb96456bb8d7a53400346fe9a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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... | 42.112033 | 150 | 0.600404 | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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... | 3,375 | 0 | 0 | 58,873 | 0 | 0 | 0 | 132 | 113 |
68c69de9d67320a2c62f8d5e26e5eeb254839f08 | 20,288 | py | Python | third_party/spider/baselines/seq2seq_attention_copy/seq2seq/models/attention_copying_seq2seq.py | chenyangh/tensor2struct-public | d3257cba6d76d3c658a58a78f687d986bdc755cf | [
"MIT"
] | 69 | 2021-04-14T06:35:07.000Z | 2022-03-31T18:35:05.000Z | third_party/spider/baselines/seq2seq_attention_copy/seq2seq/models/attention_copying_seq2seq.py | chenyangh/tensor2struct-public | d3257cba6d76d3c658a58a78f687d986bdc755cf | [
"MIT"
] | 19 | 2018-12-17T20:42:11.000Z | 2020-02-12T21:29:51.000Z | third_party/spider/baselines/seq2seq_attention_copy/seq2seq/models/attention_copying_seq2seq.py | chenyangh/tensor2struct-public | d3257cba6d76d3c658a58a78f687d986bdc755cf | [
"MIT"
] | 22 | 2019-03-16T05:57:27.000Z | 2020-10-25T04:34:54.000Z | """
Sequence to Sequence models with attention-based copying of input
and/or schema.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
| 44.984479 | 82 | 0.651814 | """
Sequence to Sequence models with attention-based copying of input
and/or schema.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from pydoc import locate
import tensorflow as tf
from tensorflow.python.ops imp... | 0 | 401 | 0 | 19,272 | 0 | 0 | 0 | 103 | 272 |
8c99b2792282d5548ada76c9f6db887524af2b66 | 485 | py | Python | post/migrations/0003_post_parent.py | sh3b/social_app | 64aadd05570373ea75834b53b0b4abd2b16c8451 | [
"MIT"
] | null | null | null | post/migrations/0003_post_parent.py | sh3b/social_app | 64aadd05570373ea75834b53b0b4abd2b16c8451 | [
"MIT"
] | 4 | 2021-06-04T23:11:02.000Z | 2022-02-10T11:23:57.000Z | post/migrations/0003_post_parent.py | shuayb/social_app | 64aadd05570373ea75834b53b0b4abd2b16c8451 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-12-04 20:58
| 24.25 | 121 | 0.637113 | # Generated by Django 2.2.7 on 2019-12-04 20:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('post', '0002_remove_comment_liked'),
]
operations = [
migrations.AddField(
model_name='post',
... | 0 | 0 | 0 | 338 | 0 | 0 | 0 | 30 | 68 |
b3beb3f3fbcde569409595a1a7e2ad617fffe935 | 116,631 | py | Python | parser/team19/BDTytus/Gramatica/parsetab.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/team19/BDTytus/Gramatica/parsetab.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/team19/BDTytus/Gramatica/parsetab.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftpuntobipuntoleftcomarightigualleftcor1cor2leftmasmenosleftasteriscodivporcentajeleftpotrightumenosumasleftpar1par2leftt_orleftt_andleftdiferenteleftmayormenormayori... | 436.820225 | 82,344 | 0.683026 |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftpuntobipuntoleftcomarightigualleftcor1cor2leftmasmenosleftasteriscodivporcentajeleftpotrightumenosumasleftpar1par2leftt_orleftt_andleftdiferenteleftmayormenormayori... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
19fbdd2e1c1c42236f2864987e90cd49e299e014 | 1,237 | py | Python | example/dzh.py | tigersean/datafeed | 65853faeff8a8632d2431bea68214637bdfa27f2 | [
"Apache-2.0"
] | 75 | 2015-01-28T23:41:08.000Z | 2021-09-15T08:50:34.000Z | example/dzh.py | tigersean/datafeed | 65853faeff8a8632d2431bea68214637bdfa27f2 | [
"Apache-2.0"
] | 6 | 2015-05-26T02:46:23.000Z | 2020-05-27T13:36:19.000Z | example/dzh.py | tigersean/datafeed | 65853faeff8a8632d2431bea68214637bdfa27f2 | [
"Apache-2.0"
] | 48 | 2015-01-20T13:17:00.000Z | 2020-12-23T14:45:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 yinhm
import datetime
import os
import sys
import numpy as np
ROOT_PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '..')
sys.path[0:0] = [ROOT_PATH]
from cStringIO import StringIO
from datafeed.client import Client
from datafeed.datast... | 25.770833 | 75 | 0.692805 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 yinhm
import datetime
import os
import sys
import numpy as np
ROOT_PATH = os.path.join(os.path.realpath(os.path.dirname(__file__)), '..')
sys.path[0:0] = [ROOT_PATH]
from cStringIO import StringIO
from datafeed.client import Client
from datafeed.datast... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 44 |
72321c81122ee738a2705d6e60dc83a15bda2c2c | 4,296 | py | Python | tests/unit/test_parse_stack.py | Matykocska/tracerface | d4e0de1518aa554c6e909a398baba7c2d2ed19fd | [
"Apache-2.0"
] | 1 | 2020-01-29T20:43:42.000Z | 2020-01-29T20:43:42.000Z | tests/unit/test_parse_stack.py | Matykocska/tracerface | d4e0de1518aa554c6e909a398baba7c2d2ed19fd | [
"Apache-2.0"
] | 3 | 2020-01-30T18:49:42.000Z | 2020-04-23T17:33:41.000Z | tests/unit/test_parse_stack.py | m-sch/tracerface | cc6f63b5c0a2816fb1ad37b4310b7db7c1fae288 | [
"Apache-2.0"
] | 1 | 2021-02-12T21:48:51.000Z | 2021-02-12T21:48:51.000Z | #!/usr/bin/env python3
from unittest import main
if __name__ == '__main__':
main()
| 36.40678 | 94 | 0.542132 | #!/usr/bin/env python3
from unittest import main, TestCase
from tracerface.parse_stack import parse_stack
class TestParseStack(TestCase):
def test_parse_stack_returns_empty_graph_for_empty_stack(self):
result = parse_stack([])
self.assertDictEqual(result.nodes, {})
self.assertDictEqual(r... | 0 | 0 | 0 | 4,125 | 0 | 0 | 0 | 35 | 46 |
7232f53ddc98ac677e5e01a5228a39bae9bad1e3 | 310 | py | Python | onmt/__init__.py | demiguo/OpenNMT-py | 7516bdd82db3880e03dcc91ce094fb240f23f6c8 | [
"MIT"
] | 1 | 2018-03-28T20:51:39.000Z | 2018-03-28T20:51:39.000Z | onmt/__init__.py | demiguo/OpenNMT-py | 7516bdd82db3880e03dcc91ce094fb240f23f6c8 | [
"MIT"
] | null | null | null | onmt/__init__.py | demiguo/OpenNMT-py | 7516bdd82db3880e03dcc91ce094fb240f23f6c8 | [
"MIT"
] | null | null | null | import onmt.io
import onmt.translate
import onmt.Models
import onmt.ViModels
import onmt.Loss
from onmt.Trainer import Trainer, Statistics
from onmt.Optim import Optim
# For flake8 compatibility
__all__ = [onmt.Loss, onmt.Models, onmt.ViModels,
Trainer, Optim, Statistics, onmt.io, onmt.translate]
| 25.833333 | 63 | 0.777419 | import onmt.io
import onmt.translate
import onmt.Models
import onmt.ViModels
import onmt.Loss
from onmt.Trainer import Trainer, Statistics
from onmt.Optim import Optim
# For flake8 compatibility
__all__ = [onmt.Loss, onmt.Models, onmt.ViModels,
Trainer, Optim, Statistics, onmt.io, onmt.translate]
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5624f3c0b3622285a79e81c45560b1e929823a40 | 626 | py | Python | scripts/set-executable.py | JeremyTsaii/HyperPlannerCourses | a77a84abcd5ceef7f065e2b6bb144c73a39417bc | [
"MIT"
] | 1 | 2020-12-09T03:50:58.000Z | 2020-12-09T03:50:58.000Z | scripts/set-executable.py | JeremyTsaii/HyperPlannerCourses | a77a84abcd5ceef7f065e2b6bb144c73a39417bc | [
"MIT"
] | null | null | null | scripts/set-executable.py | JeremyTsaii/HyperPlannerCourses | a77a84abcd5ceef7f065e2b6bb144c73a39417bc | [
"MIT"
] | null | null | null | # https://stackoverflow.com/questions/57964626/permissions-denied-when-trying-to-invoke-go-aws-lambda-function
| 32.947368 | 111 | 0.730032 | # https://stackoverflow.com/questions/57964626/permissions-denied-when-trying-to-invoke-go-aws-lambda-function
import zipfile
import time
def make_info(filename):
info = zipfile.ZipInfo(filename)
info.date_time = time.localtime()
info.external_attr = 0x81ed0000
info.create_system = 3
retur... | 0 | 0 | 0 | 0 | 0 | 437 | 0 | -17 | 95 |
0780df72f6086fe5ae8bfdfa3a2e0b0826a3415b | 5,467 | py | Python | scripts/prepare_phenotype_table.py | davidaknowles/leafcutter_conda | 0da89c167d75077f46635add5613e6bdf3992473 | [
"Apache-2.0"
] | null | null | null | scripts/prepare_phenotype_table.py | davidaknowles/leafcutter_conda | 0da89c167d75077f46635add5613e6bdf3992473 | [
"Apache-2.0"
] | null | null | null | scripts/prepare_phenotype_table.py | davidaknowles/leafcutter_conda | 0da89c167d75077f46635add5613e6bdf3992473 | [
"Apache-2.0"
] | null | null | null | import sys
from optparse import OptionParser
if __name__ == "__main__":
parser = OptionParser(usage="usage: %prog [-p num_PCs] input_perind.counts.gz")
parser.add_option("-p", "--pcs", dest="npcs", default = 50, help="number of PCs output")
(options, args) = parser.parse_args()
if len(args)==0:
... | 32.349112 | 207 | 0.53009 | import sys
import gzip
import numpy as np
import scipy as sc
import pickle
from optparse import OptionParser
from sklearn.decomposition import PCA
from sklearn import preprocessing
from sklearn import linear_model
from scipy.stats import rankdata
from scipy.stats import norm
def qqnorm(x):
n=len(x)
a=3.... | 0 | 0 | 0 | 0 | 297 | 4,345 | 0 | 33 | 273 |
039470bd602cb48ddba72f3262f9a89bfc4b6e64 | 10,586 | py | Python | python/pipeline/codex/exec/pipeline.py | eric-czech/codex | 23e880d483bf4c57809ebbd214640f6246c8fd37 | [
"Apache-2.0"
] | null | null | null | python/pipeline/codex/exec/pipeline.py | eric-czech/codex | 23e880d483bf4c57809ebbd214640f6246c8fd37 | [
"Apache-2.0"
] | null | null | null | python/pipeline/codex/exec/pipeline.py | eric-czech/codex | 23e880d483bf4c57809ebbd214640f6246c8fd37 | [
"Apache-2.0"
] | null | null | null | """CODEX preprocessing pipeline core logic
This is not intended to be run directly but rather used by mutliple external
interfaces to implement the core process that comprises CODEX processing.
"""
import logging
logger = logging.getLogger(__name__)
# Set 1 hour time limit on tile loading/reading operations
TIMEOUT =... | 38.919118 | 139 | 0.655111 | """CODEX preprocessing pipeline core logic
This is not intended to be run directly but rather used by mutliple external
interfaces to implement the core process that comprises CODEX processing.
"""
import os, logging, itertools, queue
import numpy as np
from os import path as osp
from threading import Thread
from time... | 0 | 514 | 0 | 3,048 | 0 | 6,052 | 0 | 181 | 447 |
829cf6135b77a1b187e819e046112f22a3e142c1 | 4,885 | py | Python | tests/test_cli.py | douglatornell/nemo_nowcast | 1b9181c29eee34a83e34869d13a0c0bf607882fa | [
"Apache-2.0"
] | 1 | 2020-02-06T01:10:27.000Z | 2020-02-06T01:10:27.000Z | tests/test_cli.py | douglatornell/nemo_nowcast | 1b9181c29eee34a83e34869d13a0c0bf607882fa | [
"Apache-2.0"
] | 3 | 2021-04-06T18:03:49.000Z | 2021-12-13T21:17:34.000Z | tests/test_cli.py | 43ravens/NEMO_Nowcast | 1b9181c29eee34a83e34869d13a0c0bf607882fa | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2021 Doug Latornell, 43ravens
# 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... | 33.006757 | 86 | 0.67042 | # Copyright 2016-2021 Doug Latornell, 43ravens
# 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 | 699 | 0 | 3,285 | 0 | 0 | 0 | 23 | 249 |
c45b95cbe547cf9cbd5631528c0fed6294c764c7 | 6,381 | py | Python | DSN/OLSRplots.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | DSN/OLSRplots.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | DSN/OLSRplots.py | SDRAST/Data_Reduction | f007d716b5c28c086910a81206cffaf37ff6368c | [
"Apache-2.0"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
| 31.279412 | 108 | 0.589876 | import datetime
import logging
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from matplotlib.ticker import FuncFormatter
from matplotlib.ticker import FormatStrFormatter
import numpy as np
import math
logger = logging.getLogger(__name__)
def plot(data):
# Convert to time offs... | 0 | 0 | 0 | 0 | 0 | 6,080 | 0 | 48 | 199 |
6c14f186e4484734e0a2a6b5985933064b5d7ee2 | 3,227 | py | Python | python/pex/wx/slider.py | JiveHelix/pex | d3cbe0e437e803fb4af6fe153de0cf3f61a3a6d6 | [
"MIT"
] | null | null | null | python/pex/wx/slider.py | JiveHelix/pex | d3cbe0e437e803fb4af6fe153de0cf3f61a3a6d6 | [
"MIT"
] | null | null | null | python/pex/wx/slider.py | JiveHelix/pex | d3cbe0e437e803fb4af6fe153de0cf3f61a3a6d6 | [
"MIT"
] | null | null | null | ##
# @file slider.py
#
# @brief A wx.Slider connected to a pex.RangeInterface node.
#
# @author Jive Helix (jivehelix@gmail.com)
# @date 06 Jun 2020
# @copyright Jive Helix
# Licensed under the MIT license. See LICENSE file.
from __future__ import annotations
from .. import pex
| 29.336364 | 77 | 0.629997 | ##
# @file slider.py
#
# @brief A wx.Slider connected to a pex.RangeInterface node.
#
# @author Jive Helix (jivehelix@gmail.com)
# @date 06 Jun 2020
# @copyright Jive Helix
# Licensed under the MIT license. See LICENSE file.
from __future__ import annotations
from typing import Generic, Any, TypeVar
import wx
from ..... | 0 | 0 | 0 | 2,696 | 0 | 0 | 0 | 69 | 180 |
9e54d5911d68fe0d9d93f7939f85d4b3588abf97 | 395 | py | Python | pyes/engine/queryset.py | zrlram/pyes | ea495a85167b5ab56d8fac906d3719d53f2587f8 | [
"BSD-3-Clause"
] | 1 | 2016-01-15T06:54:52.000Z | 2016-01-15T06:54:52.000Z | pyes/engine/queryset.py | zrlram/pyes | ea495a85167b5ab56d8fac906d3719d53f2587f8 | [
"BSD-3-Clause"
] | null | null | null | pyes/engine/queryset.py | zrlram/pyes | ea495a85167b5ab56d8fac906d3719d53f2587f8 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'alberto'
# Delete rules
DO_NOTHING = 0
NULLIFY = 1
CASCADE = 2
DENY = 3
| 11.969697 | 41 | 0.698734 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'alberto'
# Delete rules
DO_NOTHING = 0
NULLIFY = 1
CASCADE = 2
DENY = 3
class DoesNotExist(Exception):
pass
class MultipleObjectsReturned(Exception):
pass
class InvalidQueryError(Exception):
pass
class OperationError(Exception):
pass
... | 0 | 0 | 0 | 119 | 0 | 0 | 0 | 0 | 138 |
0c85185d3ccba1053bbeb6ae9ed7e1c5a5862f41 | 1,523 | py | Python | ch46-机器学习-K近邻/1-kNN.py | makelove/OpenCV-Python-Tutorial | e428d648f7aa50d6a0fb4f4d0fb1bd1a600fef41 | [
"MIT"
] | 2,875 | 2016-10-21T01:33:22.000Z | 2022-03-30T12:15:28.000Z | ch46-机器学习-K近邻/1-kNN.py | makelove/OpenCV-Python-Tutorial | e428d648f7aa50d6a0fb4f4d0fb1bd1a600fef41 | [
"MIT"
] | 12 | 2017-07-18T14:24:27.000Z | 2021-07-04T10:32:25.000Z | ch46-机器学习-K近邻/1-kNN.py | makelove/OpenCV-Python-Tutorial | e428d648f7aa50d6a0fb4f4d0fb1bd1a600fef41 | [
"MIT"
] | 1,066 | 2017-03-11T01:43:28.000Z | 2022-03-29T14:52:41.000Z | # -*- coding: utf-8 -*-
# @Time : 2017/7/13 7:17
# @Author : play4fun
# @File : 1-kNN.py
# @Software: PyCharm
"""
1-kNN.py:
k
k kNN
"""
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Feature set containing (x,y) values of 25 known/training data
trainData = np.random.randint(0, 100,... | 25.813559 | 65 | 0.674984 | # -*- coding: utf-8 -*-
# @Time : 2017/7/13 下午7:17
# @Author : play4fun
# @File : 1-kNN.py
# @Software: PyCharm
"""
1-kNN.py:
k 的取值最好为奇数
根据 k 个 最近邻居进行分类的方法 称为 kNN
权重
距离近的具有更高的权重, 距离远的权重更低
"""
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Feature set containing (x,y) values of 25 known/tra... | 483 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b32175425214865c9dd32c64af1f4cb916d3625b | 865 | py | Python | poco/drivers/unity3d/test/tutorial/buttons_and_labels.py | felixonmars/Poco | f44bf05501bb54561c15ef1b7ad5e5342ba96110 | [
"Apache-2.0"
] | 1 | 2019-12-19T14:06:04.000Z | 2019-12-19T14:06:04.000Z | poco/drivers/unity3d/test/tutorial/buttons_and_labels.py | felixonmars/Poco | f44bf05501bb54561c15ef1b7ad5e5342ba96110 | [
"Apache-2.0"
] | null | null | null | poco/drivers/unity3d/test/tutorial/buttons_and_labels.py | felixonmars/Poco | f44bf05501bb54561c15ef1b7ad5e5342ba96110 | [
"Apache-2.0"
] | 1 | 2022-02-06T10:27:41.000Z | 2022-02-06T10:27:41.000Z | # coding=utf-8
if __name__ == '__main__':
from airtest.core.api import connect_device
connect_device('Android:///')
import pocounit
pocounit.main()
| 27.903226 | 69 | 0.601156 | # coding=utf-8
import time
from poco.drivers.unity3d.test.tutorial.case import TutorialCase
class ButtonsAndLabelsTutorial(TutorialCase):
def runTest(self):
self.poco('btn_start').click()
self.poco(text='basic').click()
star = self.poco('star_single')
if star.exists():
... | 0 | 0 | 0 | 597 | 0 | 0 | 0 | 33 | 68 |
c5ab3612499c4751ef3cdabd9f75dfe4d55d690b | 2,791 | py | Python | autoio/mess_io/writer/_etrans.py | sjklipp/autoio | e2b471e9c9dec933319c98a30d4d519ca5d47645 | [
"Apache-2.0"
] | null | null | null | autoio/mess_io/writer/_etrans.py | sjklipp/autoio | e2b471e9c9dec933319c98a30d4d519ca5d47645 | [
"Apache-2.0"
] | 1 | 2022-02-15T19:35:14.000Z | 2022-02-15T19:35:14.000Z | autoio/mess_io/writer/_etrans.py | sjklipp/autoio | e2b471e9c9dec933319c98a30d4d519ca5d47645 | [
"Apache-2.0"
] | 13 | 2020-06-24T05:21:11.000Z | 2021-05-05T19:58:30.000Z | """
Writes the energy transfer section of a MESS input file
"""
import os
from ioformat import build_mako_str
# OBTAIN THE PATH TO THE DIRECTORY CONTAINING THE TEMPLATES #
SRC_PATH = os.path.dirname(os.path.realpath(__file__))
TEMPLATE_PATH = os.path.join(SRC_PATH, 'templates')
SECTION_PATH = os.path.join(TEMPLATE_P... | 34.036585 | 79 | 0.663561 | """
Writes the energy transfer section of a MESS input file
"""
import os
from ioformat import build_mako_str
# OBTAIN THE PATH TO THE DIRECTORY CONTAINING THE TEMPLATES #
SRC_PATH = os.path.dirname(os.path.realpath(__file__))
TEMPLATE_PATH = os.path.join(SRC_PATH, 'templates')
SECTION_PATH = os.path.join(TEMPLATE_P... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9852ce69d9d099cdb1ac59ae840558471ebda9a9 | 1,842 | py | Python | mnm/common/templatetags/paginator.py | agateblue/mnm | adf45c5f86611851ef3f51b60c30150095dba638 | [
"MIT"
] | 2 | 2021-02-09T06:49:24.000Z | 2021-07-19T00:44:39.000Z | mnm/common/templatetags/paginator.py | agateblue/mnm | adf45c5f86611851ef3f51b60c30150095dba638 | [
"MIT"
] | null | null | null | mnm/common/templatetags/paginator.py | agateblue/mnm | adf45c5f86611851ef3f51b60c30150095dba638 | [
"MIT"
] | 1 | 2021-06-07T10:39:07.000Z | 2021-06-07T10:39:07.000Z | # Based on: http://www.djangosnippets.org/snippets/73/
#
# Modified by Sean Reifschneider to be smarter about surrounding page
# link context. For usage documentation see:
#
# http://www.tummy.com/Community/Articles/django-pagination/
from django import template
register = template.Library()
def paginator(c... | 32.892857 | 79 | 0.677524 | # Based on: http://www.djangosnippets.org/snippets/73/
#
# Modified by Sean Reifschneider to be smarter about surrounding page
# link context. For usage documentation see:
#
# http://www.tummy.com/Community/Articles/django-pagination/
from django import template
register = template.Library()
def paginator(c... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
9371d0a71f17fd2b0bb6c278d4e571d05df5f7e5 | 5,043 | py | Python | src/Python/Visualization/QuadricVisualization.py | sankhesh/vtk-examples | 2d50e847ad62ce0eb71b66c029ad8abb302cd39f | [
"Apache-2.0"
] | null | null | null | src/Python/Visualization/QuadricVisualization.py | sankhesh/vtk-examples | 2d50e847ad62ce0eb71b66c029ad8abb302cd39f | [
"Apache-2.0"
] | null | null | null | src/Python/Visualization/QuadricVisualization.py | sankhesh/vtk-examples | 2d50e847ad62ce0eb71b66c029ad8abb302cd39f | [
"Apache-2.0"
] | 1 | 2022-02-16T08:20:41.000Z | 2022-02-16T08:20:41.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
if __name__ == '__main__':
main()
| 29.319767 | 72 | 0.688479 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import vtk
def main():
colors = vtk.vtkNamedColors()
renderer = vtk.vtkRenderer()
renderWindow = vtk.vtkRenderWindow()
renderWindow.AddRenderer(renderer)
interactor = vtk.vtkRenderWindowInteractor()
interactor.SetRenderWindow(renderWindow)
... | 0 | 0 | 0 | 0 | 0 | 4,825 | 0 | -11 | 138 |
fa65f02583726a5d9fcb1c58e9267baaa87e34d8 | 1,062 | py | Python | manage.py | benjaminhuanghuang/rest_bank_project | 6e1f04f3aaf90418b44e51ccfcb4bba290d86825 | [
"MIT"
] | null | null | null | manage.py | benjaminhuanghuang/rest_bank_project | 6e1f04f3aaf90418b44e51ccfcb4bba290d86825 | [
"MIT"
] | null | null | null | manage.py | benjaminhuanghuang/rest_bank_project | 6e1f04f3aaf90418b44e51ccfcb4bba290d86825 | [
"MIT"
] | null | null | null | from app import create_app
from flask_script import Manager, Server
app = create_app('production')
manager = Manager(app)
server = Server(port=9527)
manager.add_command("run", server)
if __name__ == '__main__':
manager.run()
| 25.285714 | 71 | 0.669492 | from app import create_app
from app.models.user import User
from flask_script import Manager, Server
app = create_app('production')
manager = Manager(app)
server = Server(port=9527)
manager.add_command("run", server)
@manager.command
def test():
from subprocess import call
call(['nosetests', '-v',
'... | 0 | 726 | 0 | 0 | 0 | 0 | 0 | 11 | 91 |
d1fd0a49ab84af32632c8827662d853198d1f33f | 1,211 | py | Python | feature_extraction/pkt2fft/pkt2csv_with_label.py | GTA-UFRJ-team/FENED | adb6443bc4bbdfd77d35ea1615dae79edc3a7942 | [
"MIT"
] | null | null | null | feature_extraction/pkt2fft/pkt2csv_with_label.py | GTA-UFRJ-team/FENED | adb6443bc4bbdfd77d35ea1615dae79edc3a7942 | [
"MIT"
] | null | null | null | feature_extraction/pkt2fft/pkt2csv_with_label.py | GTA-UFRJ-team/FENED | adb6443bc4bbdfd77d35ea1615dae79edc3a7942 | [
"MIT"
] | null | null | null | # coding:utf-8
#
# Author: Lucas Airam Castro de Souza
# Laboratory: Grupo de Teleinformtica e Automao
# University: Universidade Federal do Rio de Janeiro
#
#
#
#
#
#
#
#
# Usage: python pkt2csv.py <pcap_path> <path_to_write> <pcap_class> -1 or 1
import pickle
import pyshark
import sys
pcap_file = pyshark.FileCap... | 22.849057 | 84 | 0.585467 | # coding:utf-8
#
# Author: Lucas Airam Castro de Souza
# Laboratory: Grupo de Teleinformática e Automação
# University: Universidade Federal do Rio de Janeiro
#
#
#
#
#
#
#
#
# Usage: python pkt2csv.py <pcap_path> <path_to_write> <pcap_class> -1 or 1
import pickle
import pyshark
import sys
pcap_file = pyshark.File... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fe0c161458b6669fde0dd0890ec591ecd5dfb46c | 3,422 | py | Python | med_social/views/site.py | ExpoAshique/ProveBanking__s | f0b45fffea74d00d14014be27aa50fe5f42f6903 | [
"MIT"
] | null | null | null | med_social/views/site.py | ExpoAshique/ProveBanking__s | f0b45fffea74d00d14014be27aa50fe5f42f6903 | [
"MIT"
] | null | null | null | med_social/views/site.py | ExpoAshique/ProveBanking__s | f0b45fffea74d00d14014be27aa50fe5f42f6903 | [
"MIT"
] | null | null | null |
__all__ = ('HomeView', 'WaitListView', 'InviteView', 'GetVetted',
'InviteApplyView', 'ThankYou', 'About', 'HeartBeat',)
| 28.756303 | 123 | 0.678551 | from django.core.urlresolvers import reverse, reverse_lazy
from django.http import HttpResponseRedirect
from django.views.generic import TemplateView, DetailView, CreateView
from django.shortcuts import get_object_or_404, redirect
from allauth.account.adapter import get_adapter
from allauth.socialaccount.models import... | 0 | 0 | 0 | 2,542 | 0 | 0 | 0 | 287 | 451 |
632596081c5b35d045dac6f782cc3ba733c6dbf8 | 6,736 | py | Python | python/PyTorch-CartPole/bullets-simple-sb3.py | yisyang/playground | 7281b1c2f84f217c5537f6666b8fdef435b2c299 | [
"MIT"
] | null | null | null | python/PyTorch-CartPole/bullets-simple-sb3.py | yisyang/playground | 7281b1c2f84f217c5537f6666b8fdef435b2c299 | [
"MIT"
] | null | null | null | python/PyTorch-CartPole/bullets-simple-sb3.py | yisyang/playground | 7281b1c2f84f217c5537f6666b8fdef435b2c299 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
start()
| 30.757991 | 120 | 0.54617 | import click
import gym
from pynput import keyboard
from pynput.keyboard import Key
from stable_baselines3 import DQN
from stable_baselines3.dqn import MlpPolicy
from stable_baselines3.common.env_util import make_vec_env
from stable_baselines3.common.env_checker import check_env
@click.command()
@click.option('-m', '... | 0 | 2,520 | 0 | 1,344 | 0 | 2,455 | 0 | 104 | 268 |
be0eb67f7b9bf2b84cbc8deaa197c42bdd52376b | 825 | py | Python | src/control/vt_steering_controller/setup.py | Nova-UTD/navigator | 1db2c614f9c53fb012842b8653ae1bed58a7ffdf | [
"Apache-2.0"
] | 11 | 2021-11-26T14:06:51.000Z | 2022-03-18T16:49:33.000Z | src/control/vt_steering_controller/setup.py | Nova-UTD/navigator | 1db2c614f9c53fb012842b8653ae1bed58a7ffdf | [
"Apache-2.0"
] | 222 | 2021-10-29T22:00:27.000Z | 2022-03-29T20:56:34.000Z | src/control/vt_steering_controller/setup.py | Nova-UTD/navigator | 1db2c614f9c53fb012842b8653ae1bed58a7ffdf | [
"Apache-2.0"
] | 1 | 2021-12-10T18:05:03.000Z | 2021-12-10T18:05:03.000Z | from setuptools import setup
from glob import glob
import os
package_name = 'vt_steering_controller'
setup(
name=package_name,
version='1.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + pac... | 27.5 | 74 | 0.648485 | from setuptools import setup
from glob import glob
import os
package_name = 'vt_steering_controller'
setup(
name=package_name,
version='1.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + pac... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a085486a97ce5a97cd97744bff9c46f3b5d03d4c | 2,365 | py | Python | tests/three/test_tv_episodes.py | Cologler/ezapi-tmdb | 6a8a1a0a3da99cb18d11f47f1b40bbffb2a16be6 | [
"MIT"
] | 4 | 2017-05-16T02:30:52.000Z | 2021-07-01T13:21:27.000Z | tests/three/test_tv_episodes.py | Cologler/ezapi-tmdb | 6a8a1a0a3da99cb18d11f47f1b40bbffb2a16be6 | [
"MIT"
] | 4 | 2020-09-03T03:19:49.000Z | 2021-12-21T05:24:04.000Z | tests/three/test_tv_episodes.py | Cologler/ezapi-tmdb | 6a8a1a0a3da99cb18d11f47f1b40bbffb2a16be6 | [
"MIT"
] | 3 | 2021-02-15T18:13:08.000Z | 2021-04-10T03:53:58.000Z |
tv_id = 1418 # The Big Bang Theory
season_number = 12
episode_number = 1
| 27.183908 | 88 | 0.727696 | import pytest
from . import polite
tv_id = 1418 # The Big Bang Theory
season_number = 12
episode_number = 1
@polite
def test_get_tv_episode_details(tmdb):
assert tmdb.get_tv_episode_details(tv_id, season_number, episode_number) is not None
@polite
def test_get_tv_episode_changes(tmdb):
episode_id = tmdb... | 0 | 2,037 | 0 | 0 | 0 | 0 | 0 | -9 | 252 |
53e4835d9242d831a2e13eece8a0850b49e74299 | 2,952 | py | Python | utilipy/data_utils/tests/test_decorators.py | nstarman/utilipy | 17984942145d31126724df23500bafba18fb7516 | [
"BSD-3-Clause"
] | 2 | 2020-11-15T01:48:45.000Z | 2020-12-02T20:44:20.000Z | utilipy/data_utils/tests/test_decorators.py | nstarman/astroPHD | 17984942145d31126724df23500bafba18fb7516 | [
"BSD-3-Clause"
] | 22 | 2020-09-13T17:58:24.000Z | 2022-02-04T19:05:23.000Z | utilipy/data_utils/tests/test_decorators.py | nstarman/utilipy | 17984942145d31126724df23500bafba18fb7516 | [
"BSD-3-Clause"
] | 1 | 2020-04-21T22:41:01.000Z | 2020-04-21T22:41:01.000Z | # -*- coding: utf-8 -*-
"""Test data_util :mod:`~utilipy.data_utils.decorators`."""
__all__ = [
"test_idxDecorator_standard",
"test_idxDecorator_defaults",
"test_idxDecorator_new_decorator",
"test_idxDecorator_existing_function",
]
###################################################################... | 20.788732 | 78 | 0.4729 | # -*- coding: utf-8 -*-
"""Test data_util :mod:`~utilipy.data_utils.decorators`."""
__all__ = [
"test_idxDecorator_standard",
"test_idxDecorator_defaults",
"test_idxDecorator_new_decorator",
"test_idxDecorator_existing_function",
]
###################################################################... | 0 | 151 | 0 | 0 | 0 | 12 | 0 | 0 | 104 |
831e486a51ca30a5152ea0678cd55e2428b54903 | 4,448 | py | Python | node/make_config.py | hiramf/cardocker | 0a3c3897e39af89aa09f1fbb7b9b5bf47833cd8d | [
"MIT"
] | null | null | null | node/make_config.py | hiramf/cardocker | 0a3c3897e39af89aa09f1fbb7b9b5bf47833cd8d | [
"MIT"
] | null | null | null | node/make_config.py | hiramf/cardocker | 0a3c3897e39af89aa09f1fbb7b9b5bf47833cd8d | [
"MIT"
] | null | null | null | import logging
import os
import secrets
from urllib import request
import yaml
logging.basicConfig(level=logging.DEBUG,
# Use Jormungandr logging format
format='%(asctime)s.%(msecs)03d %(levelname)-8s %(message)s',
datefmt='%b %d %H:%M:%S',
... | 35.023622 | 89 | 0.654676 | import logging
import os
import secrets
import socket
import sys
from timeit import default_timer as timer
from urllib import request
import yaml
logging.basicConfig(level=logging.DEBUG,
# Use Jormungandr logging format
format='%(asctime)s.%(msecs)03d %(levelname)-8s %(message... | 0 | 0 | 0 | 0 | 0 | 805 | 0 | 1 | 89 |
1a05197544e1a4fdf2c8f4c0861ec0668bf4ae2a | 310 | py | Python | ex057.py | mateusguida/ExerciciosPython | 70f2df0a2a7bfd152205bcce228e2161c11f5888 | [
"MIT"
] | null | null | null | ex057.py | mateusguida/ExerciciosPython | 70f2df0a2a7bfd152205bcce228e2161c11f5888 | [
"MIT"
] | null | null | null | ex057.py | mateusguida/ExerciciosPython | 70f2df0a2a7bfd152205bcce228e2161c11f5888 | [
"MIT"
] | null | null | null | import os
os.system("cls") #limpa janela terminal antes da execuo
sexo = str(input("Informe seu sexo: [M/F] ")).strip().upper()[0]
while sexo not in 'MmFf':
print(sexo)
sexo = str(input("Dados invlidos. Informe seu sexo: [M/F] ")).strip().upper()[0]
print(f'Sexo {sexo} registrado com sucesso!')
| 28.181818 | 85 | 0.664516 | import os
os.system("cls") #limpa janela terminal antes da execução
sexo = str(input("Informe seu sexo: [M/F] ")).strip().upper()[0]
while sexo not in 'MmFf':
print(sexo)
sexo = str(input("Dados inválidos. Informe seu sexo: [M/F] ")).strip().upper()[0]
print(f'Sexo {sexo} registrado com sucesso!')
| 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
600e8b8e415d5e978d743be23312d6ea3d660243 | 5,516 | py | Python | model/DFN.py | SultanAbuGhazal/CGNet | f10b976b984ba09be26b902ed4da97cd1311cf17 | [
"MIT"
] | 230 | 2018-09-19T12:40:35.000Z | 2022-03-28T03:00:01.000Z | model/DFN.py | cyanymore/CGNet | cfccea377a6f0a659e807e8759c82dbffba02d7f | [
"MIT"
] | 27 | 2018-11-22T02:59:14.000Z | 2021-10-06T10:19:16.000Z | model/DFN.py | cyanymore/CGNet | cfccea377a6f0a659e807e8759c82dbffba02d7f | [
"MIT"
] | 54 | 2018-11-16T02:34:39.000Z | 2022-03-25T06:57:21.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: Xiangtai(lxtpku@pku.edu.cn)
# Implementation of Paper Learning a Discriminative Feature Network for Semantic Segmentation (CVPR2018)(face_plus_plus)
import torch
import torch.nn as nn
#from torchvision.models import resnet101
__all__ = ["DFN"]
if __name__ == '... | 36.773333 | 120 | 0.618927 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: Xiangtai(lxtpku@pku.edu.cn)
# Implementation of Paper Learning a Discriminative Feature Network for Semantic Segmentation (CVPR2018)(face_plus_plus)
import torch
import torch.nn as nn
from model.resnet import resnet101
#from torchvision.models import resnet101
_... | 0 | 0 | 0 | 4,861 | 0 | 0 | 0 | 13 | 91 |
b4e3ab9bfe09de17aafc408152b9ac73a386dc08 | 681 | py | Python | possibleYears.py | ben-dent/Contract-Cheating-Analysis | 28999b5ac73dbb6f4a65ef3d8f8dd4db677c42df | [
"MIT"
] | null | null | null | possibleYears.py | ben-dent/Contract-Cheating-Analysis | 28999b5ac73dbb6f4a65ef3d8f8dd4db677c42df | [
"MIT"
] | null | null | null | possibleYears.py | ben-dent/Contract-Cheating-Analysis | 28999b5ac73dbb6f4a65ef3d8f8dd4db677c42df | [
"MIT"
] | null | null | null | import sqlite3 as lite
con = lite.connect('JobDetails.db')
cur = con.cursor()
cur.execute("SELECT ReviewID, DateRange FROM Reviews")
results = cur.fetchall()
for result in results:
rID = result[0]
r = result[1]
split = r.split("-")
slash = r.split("/")
if len(split) == 1:
years = str(2... | 21.967742 | 98 | 0.550661 | import sqlite3 as lite
con = lite.connect('JobDetails.db')
cur = con.cursor()
cur.execute("SELECT ReviewID, DateRange FROM Reviews")
results = cur.fetchall()
for result in results:
rID = result[0]
r = result[1]
split = r.split("-")
slash = r.split("/")
if len(split) == 1:
years = str(2... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
88007f97d0685f5597a4ffc988c7191ca747d589 | 97 | py | Python | pandasql/run_test.py | nikicc/anaconda-recipes | 9c611a5854bf41bbc5e7ed9853dc71c0851a62ef | [
"BSD-3-Clause"
] | 130 | 2015-07-28T03:41:21.000Z | 2022-03-16T03:07:41.000Z | pandasql/run_test.py | nikicc/anaconda-recipes | 9c611a5854bf41bbc5e7ed9853dc71c0851a62ef | [
"BSD-3-Clause"
] | 119 | 2015-08-01T00:54:06.000Z | 2021-01-05T13:00:46.000Z | pandasql/run_test.py | nikicc/anaconda-recipes | 9c611a5854bf41bbc5e7ed9853dc71c0851a62ef | [
"BSD-3-Clause"
] | 72 | 2015-07-29T02:35:56.000Z | 2022-02-26T14:31:15.000Z | import unittest
import pandasql.tests.test_pandasql
unittest.main(pandasql.tests.test_pandasql)
| 19.4 | 43 | 0.865979 | import unittest
import pandasql.tests.test_pandasql
unittest.main(pandasql.tests.test_pandasql)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1c2bab093580a45c29e395e0ee2a8e16331e5f1d | 7,116 | py | Python | eodag/plugins/crunch/filter_overlap.py | sbrunato/eodag | 70aa45515b7b7c11326419abcf616979e7b6e024 | [
"Apache-2.0"
] | 149 | 2019-12-13T21:12:36.000Z | 2022-03-26T09:56:31.000Z | eodag/plugins/crunch/filter_overlap.py | sbrunato/eodag | 70aa45515b7b7c11326419abcf616979e7b6e024 | [
"Apache-2.0"
] | 200 | 2020-06-18T17:30:58.000Z | 2022-03-30T09:54:59.000Z | eodag/plugins/crunch/filter_overlap.py | sbrunato/eodag | 70aa45515b7b7c11326419abcf616979e7b6e024 | [
"Apache-2.0"
] | 23 | 2019-12-12T14:36:49.000Z | 2022-03-29T07:11:28.000Z | # -*- coding: utf-8 -*-
# Copyright 2021, CS GROUP - France, https://www.csgroup.eu/
#
# This file is part of EODAG project
# https://www.github.com/CS-SI/EODAG
#
# 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 c... | 42.610778 | 111 | 0.56113 | # -*- coding: utf-8 -*-
# Copyright 2021, CS GROUP - France, https://www.csgroup.eu/
#
# This file is part of EODAG project
# https://www.github.com/CS-SI/EODAG
#
# 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 c... | 0 | 0 | 0 | 6,081 | 0 | 0 | 0 | 71 | 94 |
00219cfd9b60966bd9ae5f6c6467986bd3c1455c | 488 | py | Python | eNMS/__init__.py | afourmy/e-napalm | 622c531bf2251917b17461a895dc26f891588ddf | [
"MIT"
] | 25 | 2017-11-21T09:05:55.000Z | 2017-12-13T09:43:42.000Z | eNMS/__init__.py | afourmy/e-napalm | 622c531bf2251917b17461a895dc26f891588ddf | [
"MIT"
] | 11 | 2017-11-18T21:49:42.000Z | 2017-12-08T09:49:13.000Z | eNMS/__init__.py | afourmy/e-napalm | 622c531bf2251917b17461a895dc26f891588ddf | [
"MIT"
] | 2 | 2017-11-30T20:46:32.000Z | 2017-12-07T23:33:07.000Z |
initialize()
| 23.238095 | 47 | 0.764344 | from eNMS.controller import controller
from eNMS.custom import CustomApp # noqa: F401
from eNMS.database import db
from eNMS.environment import env
from eNMS.forms import form_factory
from eNMS.server import server
from eNMS.variables import vs
def initialize():
server.register_plugins()
first_init = db._ini... | 0 | 0 | 0 | 0 | 0 | 203 | 0 | 78 | 191 |
1c021bc0e405cbdfa70c4f051fe29c5f0b00acf8 | 1,336 | py | Python | mathipy/__init__.py | BatiDyDx/maths-tools-python | e9a58aa669b5f36d7ee01402fe1f16a1db7b0e50 | [
"MIT"
] | 1 | 2021-02-02T02:58:38.000Z | 2021-02-02T02:58:38.000Z | mathipy/__init__.py | BatiDyDx/maths-tools-python | e9a58aa669b5f36d7ee01402fe1f16a1db7b0e50 | [
"MIT"
] | null | null | null | mathipy/__init__.py | BatiDyDx/maths-tools-python | e9a58aa669b5f36d7ee01402fe1f16a1db7b0e50 | [
"MIT"
] | null | null | null | __version__ = '0.1dev'
from . import (math, arithmetic, datastr, functions, numeric_operations)
from .math import (linalg, polynomial, statistics)
from .arithmetic import (Variable)
from .functions import (AbsoluteValue, BinomialDistribution, ComplexFunction, Exponential, Linear, Log, NormalDistribution, NRoot, Qua... | 17.813333 | 104 | 0.652695 | __version__ = '0.1dev'
from . import (
math,
arithmetic,
datastr,
functions,
numeric_operations
)
from .math import (
complex_math,
ntheory,
calculus,
geometry,
trigonometry,
linalg,
polynomial,
statistics,
quaternion,
octonion,
)
from .arithmetic import (
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 449 | 68 |
4c7270885d997bb44774f0d0228b132952cb7ea2 | 2,035 | py | Python | cpymad_lhc/coupling_knob.py | JoschD/cpymad_lhc | 15eb15e5d8bfd497d756ae95982f4023f8100b7a | [
"MIT"
] | null | null | null | cpymad_lhc/coupling_knob.py | JoschD/cpymad_lhc | 15eb15e5d8bfd497d756ae95982f4023f8100b7a | [
"MIT"
] | null | null | null | cpymad_lhc/coupling_knob.py | JoschD/cpymad_lhc | 15eb15e5d8bfd497d756ae95982f4023f8100b7a | [
"MIT"
] | null | null | null | """
Coupling Knob
------------------
Creates a coupling knob from current optics.
Not implemented yet. TODO!
"""
from operator import itemgetter
from typing import Sequence
# from optics_functions.coupling import coupling_via_cmatrix
import pandas as pd
from cpymad.madx import Madx
import logging
LOG = logging.get... | 30.833333 | 112 | 0.700737 | """
Coupling Knob
------------------
Creates a coupling knob from current optics.
Not implemented yet. TODO!
"""
from operator import itemgetter
from typing import Sequence
# from optics_functions.coupling import coupling_via_cmatrix
import pandas as pd
from cpymad.madx import Madx
import numpy as np
import logging... | 0 | 0 | 0 | 0 | 0 | 536 | 0 | -3 | 95 |
5bc9479464c05faa6678a012db1074871118915e | 1,704 | py | Python | Model/G2E/seq2seq/Layers/Decoder.py | Yottaxx/T-LSTM | 92618d8c3ee2418b194a2e1592512548da955b77 | [
"MIT"
] | 9 | 2020-05-23T05:40:27.000Z | 2021-11-19T01:29:36.000Z | Model/G2E/seq2seq/Layers/Decoder.py | ayyyq/T-LSTM | 36dbc88ac710d3925851cd87c2368ecfc7061b70 | [
"MIT"
] | 1 | 2020-11-29T04:35:52.000Z | 2021-01-29T07:39:37.000Z | Model/G2E/seq2seq/Layers/Decoder.py | Yottaxx/T-LSTM | 92618d8c3ee2418b194a2e1592512548da955b77 | [
"MIT"
] | 2 | 2020-10-26T13:42:49.000Z | 2020-11-01T02:01:33.000Z | import torch.nn as nn
import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = Decoder(10, 10*3, 1).to(device)
x = torch.rand(4, 5, 10).to(device)
h = torch.rand(4, 5, 20).to(device)
trigger = torch.tensor([1, 2, 3, 4]).to(device)
mask = torch.ones(4, 5).to(device)
out = model(h, x... | 36.255319 | 101 | 0.610329 | import torch.nn as nn
import torch.nn.functional as F
import torch
class Decoder(nn.Module):
def __init__(self, in_size, out_size, num_layers, dropout=0.3, bi=True):
super(Decoder, self).__init__()
self.in_size = in_size
self.out_size = out_size
self.linear_a = nn.Linear(in_size*3,... | 0 | 0 | 0 | 1,296 | 0 | 0 | 0 | 10 | 45 |
c52225fbf11940b1b3c3870dc266dd41e8aaf53c | 4,491 | py | Python | openstack_dashboard/test/integration_tests/pages/identity/projectspage.py | Tesora-Release/tesora-horizon | 4b0f26d48551783c1fe3ae362d1f8d27570195a9 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/test/integration_tests/pages/identity/projectspage.py | Tesora-Release/tesora-horizon | 4b0f26d48551783c1fe3ae362d1f8d27570195a9 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/test/integration_tests/pages/identity/projectspage.py | Tesora-Release/tesora-horizon | 4b0f26d48551783c1fe3ae362d1f8d27570195a9 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 37.425 | 78 | 0.672233 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 0 | 826 | 0 | 2,817 | 0 | 0 | 0 | 162 | 113 |
864a0c9bbe245e56c77fbc8c499c30468b0d8f25 | 3,215 | py | Python | pxr/base/tf/testenv/testTfPyOptional.py | yurivict/USD | 3b097e3ba8fabf1777a1256e241ea15df83f3065 | [
"Apache-2.0"
] | 1 | 2018-02-23T05:39:27.000Z | 2018-02-23T05:39:27.000Z | pxr/base/tf/testenv/testTfPyOptional.py | yurivict/USD | 3b097e3ba8fabf1777a1256e241ea15df83f3065 | [
"Apache-2.0"
] | null | null | null | pxr/base/tf/testenv/testTfPyOptional.py | yurivict/USD | 3b097e3ba8fabf1777a1256e241ea15df83f3065 | [
"Apache-2.0"
] | 1 | 2020-10-24T00:43:14.000Z | 2020-10-24T00:43:14.000Z | #!/pxrpythonsubst
#
# Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
... | 42.866667 | 95 | 0.690513 | #!/pxrpythonsubst
#
# Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
... | 0 | 0 | 0 | 1,966 | 0 | 0 | 0 | -11 | 45 |
83d102470d63238232c3b2ad24f1ea92933153c0 | 937 | py | Python | Python-37.py | fabiobarreto-data-science/Data-Science---Let-s-Code | df60c8351141d3fcbd96589c4dd27e1054fed712 | [
"MIT"
] | null | null | null | Python-37.py | fabiobarreto-data-science/Data-Science---Let-s-Code | df60c8351141d3fcbd96589c4dd27e1054fed712 | [
"MIT"
] | null | null | null | Python-37.py | fabiobarreto-data-science/Data-Science---Let-s-Code | df60c8351141d3fcbd96589c4dd27e1054fed712 | [
"MIT"
] | null | null | null | """
Desafio 1 | Faa um programa que pea para o usurio digitar o nome e a idade de um aluno e o nmero de provas que esse aluno fez. Depois, o programa deve pedir para o usurio digitar as notas de cada prova do aluno. Ao final o programa deve imprimir uma lista contendo:
a. Nome do aluno na posio 0
b. Idade do aluno na... | 24.025641 | 270 | 0.696905 | """
Desafio 1 | Faça um programa que peça para o usuário digitar o nome e a idade de um aluno e o número de provas que esse aluno fez. Depois, o programa deve pedir para o usuário digitar as notas de cada prova do aluno. Ao final o programa deve imprimir uma lista contendo:
a. Nome do aluno na posição 0
b. Idade do a... | 38 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1b45a4e1596f65fd16d89aa55b989ee9e19a6048 | 3,500 | py | Python | webServer/person.py | ndkjing/usv | 132e021432a0344a22914aaf68da7d7955d7331f | [
"MIT"
] | null | null | null | webServer/person.py | ndkjing/usv | 132e021432a0344a22914aaf68da7d7955d7331f | [
"MIT"
] | null | null | null | webServer/person.py | ndkjing/usv | 132e021432a0344a22914aaf68da7d7955d7331f | [
"MIT"
] | 1 | 2021-09-04T10:27:30.000Z | 2021-09-04T10:27:30.000Z | import get_eviz_url
if __name__ == '__main__':
obj = DetectVideo()
# detect_img(src="person.png")
# ()
src_rtmp = get_eviz_url.get_url(serial_str='F77671789')
#
obj.detect_video(src=src_rtmp)
| 32.71028 | 78 | 0.551429 | import cv2 as cv
import numpy as np
import time
import get_eviz_url
import upload_file
class DetectVideo:
def __init__(self):
self.last_save_time = None
self.save_interval = 300 # 暂时设置保存间隔时间300秒
self.max_save_interval = 5 * 60 * 60 # 暂时设置最大保存间隔时间5*60*60秒
ip_local = '192.168.199.1... | 231 | 1,194 | 0 | 1,917 | 0 | 0 | 0 | -21 | 111 |
091807ab6c335f03ebfb4b06c41eabdb8c75d816 | 354 | py | Python | app/lib/db_query/tweets/__init__.py | MichaelCurrin/twitterverse | 9629f848377e4346be833db70f11c593cc0d7b6c | [
"MIT"
] | 10 | 2019-03-22T07:07:41.000Z | 2022-01-26T00:57:45.000Z | app/lib/db_query/tweets/__init__.py | MichaelCurrin/twitterverse | 9629f848377e4346be833db70f11c593cc0d7b6c | [
"MIT"
] | 70 | 2017-07-12T19:49:38.000Z | 2020-09-02T10:03:28.000Z | app/lib/db_query/tweets/__init__.py | MichaelCurrin/twitterverse | 9629f848377e4346be833db70f11c593cc0d7b6c | [
"MIT"
] | 2 | 2017-06-30T07:13:39.000Z | 2020-12-04T00:39:12.000Z | """
Initialization file for tweets library module.
These exist here in lib as some of them are useful as help functions of other
scripts (such as getting available campaigns). However, these could be moved to
utils/reporting/ as individual scripts. And they could be called directly or
with make, to avoid having multip... | 39.333333 | 79 | 0.79096 | """
Initialization file for tweets library module.
These exist here in lib as some of them are useful as help functions of other
scripts (such as getting available campaigns). However, these could be moved to
utils/reporting/ as individual scripts. And they could be called directly or
with make, to avoid having multip... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7c7994cba3a9ae7a756dcd57ac8ceeab2a0ef3d7 | 1,345 | py | Python | examples/cython/usm_memory/reference_black_scholes.py | diptorupd/dpctl | 99aba3bd4a1f4d963c97a15815160085241ffbed | [
"Apache-2.0"
] | 39 | 2020-09-29T16:00:59.000Z | 2022-03-30T19:08:05.000Z | examples/cython/usm_memory/reference_black_scholes.py | PokhodenkoSA/pydppl | 9b8644b167a2bc9d1067e5c0d13d3abef0bff82b | [
"Apache-2.0"
] | 600 | 2020-09-22T22:47:43.000Z | 2022-03-31T16:20:13.000Z | examples/cython/usm_memory/reference_black_scholes.py | PokhodenkoSA/dpctl | 9b8644b167a2bc9d1067e5c0d13d3abef0bff82b | [
"Apache-2.0"
] | 14 | 2020-10-02T09:45:56.000Z | 2022-02-08T09:20:25.000Z | # Data Parallel Control (dpctl)
#
# Copyright 2020-2021 Intel Corporation
#
# 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.... | 24.017857 | 74 | 0.575465 | # Data Parallel Control (dpctl)
#
# Copyright 2020-2021 Intel Corporation
#
# 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 | 0 | 0 | 0 | 0 | 668 | 0 | -10 | 46 |
2899cff6619ff353de2e5650df03c94fa51b4b97 | 483 | py | Python | raven/views/base_api.py | dantin/raven | 4cf741174532aacbcd71696eafcf1bd302651b2e | [
"BSD-3-Clause"
] | null | null | null | raven/views/base_api.py | dantin/raven | 4cf741174532aacbcd71696eafcf1bd302651b2e | [
"BSD-3-Clause"
] | null | null | null | raven/views/base_api.py | dantin/raven | 4cf741174532aacbcd71696eafcf1bd302651b2e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
| 20.125 | 80 | 0.699793 | # -*- coding: utf-8 -*-
import logging
from typing import List
from flask_appbuilder import ModelRestApi
logger = logging.getLogger(__name__)
class BaseRavenModelRestApi(ModelRestApi):
"""
Extends FAB's ModelResApi to implement specific raven generic functionality.
"""
csrf_exempt = False
add_... | 0 | 0 | 0 | 314 | 0 | 0 | 0 | 22 | 68 |
8393003c530ece2565148a8192507f484b6930db | 151 | py | Python | yager/core/version.py | undp/yager | c8a1e471fa7c5ec962cb62d2a64fb93db4bbb378 | [
"MIT"
] | 1 | 2021-05-23T17:20:38.000Z | 2021-05-23T17:20:38.000Z | yager/core/version.py | undp/yager | c8a1e471fa7c5ec962cb62d2a64fb93db4bbb378 | [
"MIT"
] | 1 | 2020-10-20T02:57:08.000Z | 2020-10-20T07:26:54.000Z | yager/core/version.py | undp/yager | c8a1e471fa7c5ec962cb62d2a64fb93db4bbb378 | [
"MIT"
] | 2 | 2021-05-23T17:20:44.000Z | 2022-03-25T01:18:11.000Z | # -*- coding: utf-8 -*-
"""App version module."""
from .. import __version__
def get_version():
"""Return app version."""
return __version__
| 16.777778 | 29 | 0.622517 | # -*- coding: utf-8 -*-
"""App version module."""
from .. import __version__
def get_version():
"""Return app version."""
return __version__
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ca3517f873b528a68972d8a98a499d953c5ffd47 | 199 | py | Python | code/python/other_structure_struct.py | evmorov/ruby-coffeescript | 1c61c5ce351509b210e26feceee6efab0b255442 | [
"MIT"
] | 29 | 2016-06-15T09:19:18.000Z | 2022-03-21T14:34:47.000Z | code/python/other_structure_struct.py | evmorov/ruby-coffeescript | 1c61c5ce351509b210e26feceee6efab0b255442 | [
"MIT"
] | 7 | 2016-06-16T07:02:43.000Z | 2020-01-08T21:12:30.000Z | code/python/other_structure_struct.py | evmorov/ruby-coffeescript | 1c61c5ce351509b210e26feceee6efab0b255442 | [
"MIT"
] | 7 | 2016-06-15T14:57:46.000Z | 2021-12-09T17:57:22.000Z |
print(Customer('Dave', '123 Main').greeting())
| 24.875 | 67 | 0.688442 | import collections
class Customer(collections.namedtuple('Customer', 'name address')):
def greeting(self):
return "Hello %s!" % self.name
print(Customer('Dave', '123 Main').greeting())
| 0 | 0 | 0 | 109 | 0 | 0 | 0 | -3 | 45 |
eaf28efccb42d2a9eb9fa1612b33f1f1a6fbea67 | 152 | py | Python | package/cc_pathlib/__init__.py | yota-code/cc-pathlib | 8f752192d99455185888e1fe4ec3ea8020daeff7 | [
"0BSD"
] | null | null | null | package/cc_pathlib/__init__.py | yota-code/cc-pathlib | 8f752192d99455185888e1fe4ec3ea8020daeff7 | [
"0BSD"
] | null | null | null | package/cc_pathlib/__init__.py | yota-code/cc-pathlib | 8f752192d99455185888e1fe4ec3ea8020daeff7 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
| 19 | 44 | 0.789474 | #!/usr/bin/env python3
from cc_pathlib.path import Path
from cc_pathlib.case import CaseCollation
from cc_pathlib.uniw import UniversalWriter
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 71 |
d2064fed0834f29f5a4d5844db178d84d4a5a264 | 1,199 | py | Python | fastweb/util/thread.py | BSlience/fastweb | 2c1b956e9846c4205d0201d39d09891d088754e4 | [
"Apache-2.0"
] | 123 | 2017-06-06T04:59:07.000Z | 2019-07-11T10:20:35.000Z | fastweb/util/thread.py | BSlience/fastweb | 2c1b956e9846c4205d0201d39d09891d088754e4 | [
"Apache-2.0"
] | null | null | null | fastweb/util/thread.py | BSlience/fastweb | 2c1b956e9846c4205d0201d39d09891d088754e4 | [
"Apache-2.0"
] | 2 | 2017-06-28T05:58:39.000Z | 2018-09-25T00:18:33.000Z | # coding:utf8
| 22.622642 | 61 | 0.574646 | # coding:utf8
from threading import Thread, Event
from fastweb.util.log import recorder
class FThread(Thread):
"""封装系统thread,方便线程停止"""
_fthreads = []
def __init__(self, name, task, period=0, frequency=-1):
"""初始化线程
:parameter:
- `name`: 线程名
- `task`: 任务函数,线程名会作为参数传递给... | 303 | 110 | 0 | 874 | 0 | 0 | 0 | 30 | 69 |
0148750e974da2d7cf0f9b400430d284d1f294fe | 10,563 | py | Python | packages/syft/tests/syft/core/tensor/adp/phi_tensor_test.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | packages/syft/tests/syft/core/tensor/adp/phi_tensor_test.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | packages/syft/tests/syft/core/tensor/adp/phi_tensor_test.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | # third party
import numpy as np
import pytest
# syft absolute
import syft as sy
from syft.core.adp.data_subject import DataSubject
from syft.core.tensor.autodp.phi_tensor import PhiTensor as PT
from syft.core.tensor.tensor import Tensor
def test_eq(
reference_data: np.ndarray,
upper_bound: np.ndar... | 27.797368 | 98 | 0.667235 | # third party
import numpy as np
import pytest
# syft absolute
import syft as sy
from syft.core.adp.data_subject import DataSubject
from syft.core.tensor.autodp.phi_tensor import PhiTensor as PT
from syft.core.tensor.tensor import Tensor
@pytest.fixture
def ishan() -> DataSubject:
return DataSubject(name="φhisha... | 4 | 1,507 | 0 | 0 | 0 | 1,201 | 0 | 0 | 253 |
2177bc70a0844667a22a1abe8b27f7bf5a1cff60 | 6,449 | py | Python | isee/infrastructure/configure.py | team-mayes/isEE | c22d7cc78a43f0c0a7b2ec18fbc3b628ddef8d54 | [
"BSD-3-Clause"
] | null | null | null | isee/infrastructure/configure.py | team-mayes/isEE | c22d7cc78a43f0c0a7b2ec18fbc3b628ddef8d54 | [
"BSD-3-Clause"
] | 1 | 2021-09-17T18:20:36.000Z | 2021-10-06T16:56:34.000Z | isee/infrastructure/configure.py | team-mayes/isEE | c22d7cc78a43f0c0a7b2ec18fbc3b628ddef8d54 | [
"BSD-3-Clause"
] | null | null | null | """
configure.py
Takes user input file and returns settings namespace object
"""
import argparse
import os
from jinja2 import Environment, FileSystemLoader
def configure(input_file, user_working_directory=''):
"""
Configure the settings namespace based on the config file.
Parameters
----------
in... | 37.935294 | 184 | 0.641495 | """
configure.py
Takes user input file and returns settings namespace object
"""
import argparse
import pytraj # to support pytraj calls in input file
import mdtraj # to support mdtraj calls in the input file
import numpy # to support numpy calls in input file
import numpy as np # to support numpy... | 0 | 0 | 0 | 3,444 | 0 | 0 | 0 | -69 | 416 |
08c6d8e51ddbbf8996189a2b5db8ec22a4e92b8d | 4,094 | py | Python | ArvoreBinariaDeBusca.py | RosarioMvs/PythonAlgorithms | 69588d9fe642e02c76f948e6d120e0477d114247 | [
"Apache-2.0"
] | null | null | null | ArvoreBinariaDeBusca.py | RosarioMvs/PythonAlgorithms | 69588d9fe642e02c76f948e6d120e0477d114247 | [
"Apache-2.0"
] | null | null | null | ArvoreBinariaDeBusca.py | RosarioMvs/PythonAlgorithms | 69588d9fe642e02c76f948e6d120e0477d114247 | [
"Apache-2.0"
] | null | null | null |
# Arvore Binaria de Busca em Python
# Kelvin Salton do Prado
# 2015
############# Metodos de Busca #############
############################################
############ Metodo de Insercao ############
############################################
########### Metodos de Impressao ###########
ImprimeAr... | 23.129944 | 79 | 0.604299 |
# Arvore Binaria de Busca em Python
# Kelvin Salton do Prado
# 2015
class Arvore:
def __init__(self, chave):
self.chave = chave;
self.esquerda = None;
self.direita = None;
############# Metodos de Busca #############
def buscaRecursiva(no, chave):
if no is None:
print str(chave) + ' nao f... | 0 | 0 | 0 | 97 | 0 | 2,061 | 0 | 0 | 293 |
234277f79faade3ae3d913a2e5111ccaf5457e47 | 757 | py | Python | 4_Recursion/recursive_tree.py | AnthonyRChao/Problem-Solving-With-Algorithms-And-Data-Structures | be29b46b9f4e579644ca2d44675c0ce7dcb29b3b | [
"MIT"
] | 6 | 2020-09-28T08:18:01.000Z | 2022-01-15T19:38:38.000Z | 4_Recursion/recursive_tree.py | AnthonyRChao/Problem-Solving-With-Algorithms-And-Data-Structures | be29b46b9f4e579644ca2d44675c0ce7dcb29b3b | [
"MIT"
] | null | null | null | 4_Recursion/recursive_tree.py | AnthonyRChao/Problem-Solving-With-Algorithms-And-Data-Structures | be29b46b9f4e579644ca2d44675c0ce7dcb29b3b | [
"MIT"
] | 3 | 2020-09-28T08:18:05.000Z | 2021-04-24T21:22:28.000Z | """
Use the turtle module to draw a tree recursively.
"""
main()
| 20.459459 | 61 | 0.616909 | """
Use the turtle module to draw a tree recursively.
"""
import turtle
from random import randrange
def tree(branch_len, thickness, t):
if branch_len > 5:
branch_angle = randrange(15, 45)
branch_decrement = randrange(10,20)
t.pensize(thickness)
t.forward(branch_len)
t.ri... | 0 | 0 | 0 | 0 | 0 | 597 | 0 | -1 | 91 |
f3f4c564278abdeaa095f01289b355f5c1b62d62 | 10,226 | py | Python | model/ivy/examples/ivyprobe.py | achrafJhidri/LeCompteEstBon | 06e1a3b3ca1ea9db2807e942ab8ab1bfe050ef90 | [
"MIT"
] | null | null | null | model/ivy/examples/ivyprobe.py | achrafJhidri/LeCompteEstBon | 06e1a3b3ca1ea9db2807e942ab8ab1bfe050ef90 | [
"MIT"
] | null | null | null | model/ivy/examples/ivyprobe.py | achrafJhidri/LeCompteEstBon | 06e1a3b3ca1ea9db2807e942ab8ab1bfe050ef90 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""An ivyprobe script for ivy-python
"""
import getopt
import os
import sys
import time
try:
except ImportError:
pass
# The next line taken from https://pythonhosted.org/six/
# Copyright (c) 2010-2016 Benjamin Peterson
PY2 = sys.version_info[0] == 2
IVYAPPNAME = 'pyivyprobe'
on_die_accept... | 31.95625 | 121 | 0.527968 | #!/usr/bin/env python
"""An ivyprobe script for ivy-python
"""
import getopt
import os
import signal
import sys
import time
from ivy.std_api import *
try:
import readline
except ImportError:
pass
# The next line taken from https://pythonhosted.org/six/
# Copyright (c) 2010-2016 Benjamin Peterson
PY2 = sys.ve... | 0 | 0 | 0 | 0 | 0 | 1,744 | 0 | -10 | 278 |
13f0bf3f81720f7d748fb3f51e9a0deabec5c318 | 2,619 | py | Python | code/threed/bunny-8.py | geo7/scientific-visualization-book | 71f6bac4db7ee2f26e88052fe7faa800303d8b00 | [
"BSD-2-Clause"
] | 2 | 2021-11-17T15:10:09.000Z | 2021-12-24T13:31:10.000Z | code/threed/bunny-8.py | WuShichao/scientific-visualization-book | 389766215aa6b234ed1cf560a3768437d41d1d37 | [
"BSD-2-Clause"
] | 1 | 2021-12-12T11:37:48.000Z | 2021-12-12T11:39:00.000Z | code/threed/bunny-8.py | WuShichao/scientific-visualization-book | 389766215aa6b234ed1cf560a3768437d41d1d37 | [
"BSD-2-Clause"
] | 2 | 2021-12-30T12:20:07.000Z | 2022-02-24T06:36:41.000Z | # ----------------------------------------------------------------------------
# Title: Scientific Visualisation - Python & Matplotlib
# Author: Nicolas P. Rougier
# License: BSD
# ----------------------------------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
from mat... | 27.861702 | 86 | 0.498282 | # ----------------------------------------------------------------------------
# Title: Scientific Visualisation - Python & Matplotlib
# Author: Nicolas P. Rougier
# License: BSD
# ----------------------------------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
from mat... | 0 | 0 | 0 | 0 | 0 | 952 | 0 | 0 | 115 |
51d2d075f4d0557cd2911f1eddc617e7a8ab3538 | 2,254 | py | Python | usernames.py | bellisk/junkdrawer | 82aed500678ed60be61170c91371a4fc357b0e0c | [
"MIT"
] | null | null | null | usernames.py | bellisk/junkdrawer | 82aed500678ed60be61170c91371a4fc357b0e0c | [
"MIT"
] | null | null | null | usernames.py | bellisk/junkdrawer | 82aed500678ed60be61170c91371a4fc357b0e0c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8
"""
On sites where I don't want to use my standard username (@alexwlchan) --
for example, if I'm starring content but not creating anything -- I create
alliterative usernames from the names provided by Docker.
e.g. on GitHub I might use "goofy_galileo"
This script generates... | 24.769231 | 99 | 0.562999 | #!/usr/bin/env python
# -*- encoding: utf-8
"""
On sites where I don't want to use my standard username (@alexwlchan) --
for example, if I'm starring content but not creating anything -- I create
alliterative usernames from the names provided by Docker.
e.g. on GitHub I might use "goofy_galileo"
This script generates... | 2 | 0 | 0 | 0 | 0 | 1,462 | 0 | -28 | 138 |
5de2a6d52bf943d56f35adeb9187f13e7f5ef367 | 1,634 | py | Python | weblogic/domain/set_domain_web_app.py | codejsha/infrastructure | 01ff58fea0a7980fce30e37cb02a7c1217c46d9f | [
"Apache-2.0"
] | 4 | 2021-02-13T03:39:38.000Z | 2022-01-30T19:41:43.000Z | weblogic/domain/set_domain_web_app.py | codejsha/infrastructure | 01ff58fea0a7980fce30e37cb02a7c1217c46d9f | [
"Apache-2.0"
] | null | null | null | weblogic/domain/set_domain_web_app.py | codejsha/infrastructure | 01ff58fea0a7980fce30e37cb02a7c1217c46d9f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
domain_name = os.environ['DOMAIN_NAME']
admin_server_listen_address = os.environ['ADMIN_SERVER_LISTEN_ADDRESS']
admin_server_listen_port = os.environ['ADMIN_SERVER_LISTEN_PORT']
admin_username = os.environ['ADMIN_USERNAME']
admin_password = os.environ['ADMIN_PASSWORD']
#########################... | 32.039216 | 89 | 0.700122 | #!/usr/bin/env python
domain_name = os.environ['DOMAIN_NAME']
admin_server_listen_address = os.environ['ADMIN_SERVER_LISTEN_ADDRESS']
admin_server_listen_port = os.environ['ADMIN_SERVER_LISTEN_PORT']
admin_username = os.environ['ADMIN_USERNAME']
admin_password = os.environ['ADMIN_PASSWORD']
#########################... | 0 | 0 | 0 | 0 | 0 | 943 | 0 | 0 | 23 |
675d9bc20bcb17ec6618dcfe4c7cdd3fbae6a54a | 430 | py | Python | psstguy.py | cshoe/psstguy | 949e41e0618c94af55839cc85ae61c198e0f6f31 | [
"MIT"
] | null | null | null | psstguy.py | cshoe/psstguy | 949e41e0618c94af55839cc85ae61c198e0f6f31 | [
"MIT"
] | null | null | null | psstguy.py | cshoe/psstguy | 949e41e0618c94af55839cc85ae61c198e0f6f31 | [
"MIT"
] | null | null | null |
PSSTGUY_TEMPLATE = """
|
|
|
|
|
|
|
| _
|.) {SECRET_TXT}
|
|
"""
if __name__ == '__main__':
cli()
| 13.4375 | 67 | 0.593023 | import argparse
PSSTGUY_TEMPLATE = """
┻┳|
┻┳|
┳┻|
┳┻|
┻┳|
┳┻|
┻┳|
┳┻| _
┻┳|•.•) {SECRET_TXT}
┳┻|⊂ノ
┻┳|
"""
def psstguy(secret_txt):
return PSSTGUY_TEMPLATE.format(SECRET_TXT=secret_txt)
def cli():
parser = argparse.ArgumentParser()
parser.add_argument('secret', type=str, help='Text to wh... | 78 | 0 | 0 | 0 | 0 | 220 | 0 | -6 | 68 |
1cd671c3be5a64d763588f759743f8475e24b225 | 1,325 | py | Python | dags/hooks/launch_hook.py | Baeke/airflow-training-skeleton | 2ba3bf3b4fb6ed2dc46343f28e0c0c94018ea0e6 | [
"Apache-2.0"
] | null | null | null | dags/hooks/launch_hook.py | Baeke/airflow-training-skeleton | 2ba3bf3b4fb6ed2dc46343f28e0c0c94018ea0e6 | [
"Apache-2.0"
] | null | null | null | dags/hooks/launch_hook.py | Baeke/airflow-training-skeleton | 2ba3bf3b4fb6ed2dc46343f28e0c0c94018ea0e6 | [
"Apache-2.0"
] | null | null | null | # hook gets lauches from an api
| 28.804348 | 98 | 0.676981 | # hook gets lauches from an api
import os
import pathlib
import subprocess
import re
import time
import posixpath
import requests
import airflow
from airflow.hooks.base_hook import BaseHook
from airflow.exceptions import AirflowException
from airflow.utils import apply_defaults
from airflow.utils.log.logging_mixin im... | 0 | 294 | 0 | 668 | 0 | 0 | 0 | 40 | 289 |
6c27827373bf9f3e70133f9726ca95c89e845dbd | 10,166 | py | Python | pypet/tests/unittests/link_test.py | dilawar/pypet | 98673767d1e310a36ca1dcd9fe5b0d51e496db37 | [
"BSD-3-Clause"
] | 85 | 2015-01-16T11:50:40.000Z | 2021-12-26T08:15:42.000Z | pypet/tests/unittests/link_test.py | sthagen/pypet | 2769c74eff55c165c9002cc67611b96b1d2377ea | [
"BSD-3-Clause"
] | 51 | 2015-01-10T14:00:12.000Z | 2021-09-11T17:42:35.000Z | pypet/tests/unittests/link_test.py | sthagen/pypet | 2769c74eff55c165c9002cc67611b96b1d2377ea | [
"BSD-3-Clause"
] | 20 | 2015-01-16T11:51:15.000Z | 2021-12-26T08:15:44.000Z | __author__ = 'Robert Meyer'
from pypet.tests.testutils.ioutils import run_suite, parse_args
if __name__ == '__main__':
opt_args = parse_args()
run_suite(**opt_args) | 30.346269 | 95 | 0.647354 | __author__ = 'Robert Meyer'
from pypet import Trajectory, pypetexceptions, PickleResult
from pypet.tests.testutils.data import TrajectoryComparator
from pypet.tests.testutils.ioutils import make_temp_dir, run_suite, parse_args
import pypet.pypetexceptions as pex
class LinkTrajectoryTests(TrajectoryComparator):
... | 0 | 0 | 0 | 9,797 | 0 | 0 | 0 | 105 | 90 |
e01f0e2130ccb200cc8849e5c809e32f8c7481c0 | 10,752 | py | Python | main.py | anilgurses/DentalBioFeature | 530b4e9423d7a4a23e228af5e2c79e5e9c1c0ba2 | [
"MIT"
] | 3 | 2020-06-20T22:54:04.000Z | 2020-07-28T01:09:40.000Z | main.py | anilgurses/DentalBioFeature | 530b4e9423d7a4a23e228af5e2c79e5e9c1c0ba2 | [
"MIT"
] | 6 | 2020-11-13T18:55:26.000Z | 2022-02-10T01:44:49.000Z | main.py | anilgurses/DentalBioFeature | 530b4e9423d7a4a23e228af5e2c79e5e9c1c0ba2 | [
"MIT"
] | 2 | 2020-07-28T01:09:42.000Z | 2021-02-24T13:18:08.000Z | import torch.nn as nn
import torch.nn.init as init
from torchvision import models
import torchvision.models as models
import torch.optim as optim
from torch.utils.tensorboard import SummaryWriter
import argparse
from data_load import tooth_data_load
learning_rate = 0.001
num_epochs = 30
num_classes = 2
writer = Summ... | 33.6 | 174 | 0.62128 | import torch
import torch.nn as nn
import torch.nn.init as init
import numpy as np
import pandas as pd
import torchvision
import cv2
from torchvision import transforms, utils, models
from tqdm import tqdm
from torch.utils.data import Dataset, DataLoader, ConcatDataset
import torchvision.models as models
from os import ... | 0 | 0 | 0 | 0 | 0 | 8,096 | 0 | 141 | 424 |
c1037305b47a670583e889aa11054e81cd5c4e4e | 944 | py | Python | Problem Solving Strategy/Bruteforce/recursive/code6.5 picnic.py | homveloper/Algorithm | ae2e063d75a3ecc2537f97ede002450b45da4aa5 | [
"Apache-2.0"
] | null | null | null | Problem Solving Strategy/Bruteforce/recursive/code6.5 picnic.py | homveloper/Algorithm | ae2e063d75a3ecc2537f97ede002450b45da4aa5 | [
"Apache-2.0"
] | null | null | null | Problem Solving Strategy/Bruteforce/recursive/code6.5 picnic.py | homveloper/Algorithm | ae2e063d75a3ecc2537f97ede002450b45da4aa5 | [
"Apache-2.0"
] | null | null | null | import random as r
from pprint import pprint
N = r.randint(2,10)
taken = [False for i in range(N)]
areFriends = setFriends(N)
pprint(setFriends(5))
print(N)
print(countParing(taken)) | 20.977778 | 67 | 0.573093 | import random as r
from pprint import pprint
N = r.randint(2,10)
taken = [False for i in range(N)]
def setFriends(N):
areFriends = [[False for i in range(N)] for i in range(N)]
for i in range(N):
for j in range(N):
if r.randint(0,4) == 4:
areFriends[i][j] = True
... | 0 | 0 | 0 | 0 | 0 | 713 | 0 | 0 | 46 |
4ba7b6e557b558066b308278cf237435af7ba35e | 1,719 | py | Python | batchfile/_functions.py | tassaron2/batchfile.py | b336281edf31f0989ef34ac07921587d82137ca6 | [
"MIT"
] | 1 | 2021-01-14T02:33:23.000Z | 2021-01-14T02:33:23.000Z | batchfile/_functions.py | tassaron2/batchfile.py | b336281edf31f0989ef34ac07921587d82137ca6 | [
"MIT"
] | 1 | 2021-07-27T04:41:34.000Z | 2022-01-30T22:30:47.000Z | batchfile/_functions.py | tassaron2/batchfile.py | b336281edf31f0989ef34ac07921587d82137ca6 | [
"MIT"
] | 1 | 2021-01-14T02:33:09.000Z | 2021-01-14T02:33:09.000Z | import os
import logging
from subprocess import call as system_call
if os.name == "nt":
else:
def find_sensitive_path(insensitive_path, dir=None):
"""
Borrowed from https://stackoverflow.com/a/37708342
Returns a case-sensitive filepath when given a case-insensitive path
"""
if dir is None:
... | 25.279412 | 86 | 0.630599 | import os
import logging
from subprocess import call as system_call
def make_debug_log():
try:
if os.path.exists("debug.log"):
os.remove("debug.log")
fh = logging.FileHandler("debug.log")
except PermissionError:
fh = logging.StreamHandler()
fh.setFormatter(
logg... | 0 | 0 | 0 | 0 | 0 | 729 | 0 | 0 | 123 |
93efafaae5cbedcbeb03d58613437820eb9eb7b2 | 922 | py | Python | tests/test_math.py | Roberto-Rod/tau-intro-to-pytest | 7aa9edffd48bb815556a204820b3084512d8595c | [
"Apache-2.0"
] | null | null | null | tests/test_math.py | Roberto-Rod/tau-intro-to-pytest | 7aa9edffd48bb815556a204820b3084512d8595c | [
"Apache-2.0"
] | null | null | null | tests/test_math.py | Roberto-Rod/tau-intro-to-pytest | 7aa9edffd48bb815556a204820b3084512d8595c | [
"Apache-2.0"
] | null | null | null |
#----------------------------------------------------------
# Imports
#----------------------------------------------------------
#----------------------------------------------------------
# Simple test function
#----------------------------------------------------------
#----------------------------------... | 26.342857 | 60 | 0.286334 |
#----------------------------------------------------------
# Imports
#----------------------------------------------------------
import pytest
#----------------------------------------------------------
# Simple test function
#----------------------------------------------------------
def test_one_plus_... | 0 | 0 | 0 | 0 | 0 | 210 | 0 | -8 | 100 |
ce6d3a7aac811d27e2eca71adc5e2853a59ccd62 | 1,512 | py | Python | tests/utils.py | bigchaindb/bigchaindb-coalaip | d3269c52fe1efa5e09e527619f866ab88eb28b5b | [
"Apache-2.0"
] | 12 | 2016-12-13T09:47:52.000Z | 2018-05-09T16:17:50.000Z | tests/utils.py | bigchaindb/pycoalaip-bigchaindb | d3269c52fe1efa5e09e527619f866ab88eb28b5b | [
"Apache-2.0"
] | 34 | 2016-08-25T20:52:37.000Z | 2018-10-31T10:11:23.000Z | tests/utils.py | COALAIP/pycoalaip-bigchaindb | d3269c52fe1efa5e09e527619f866ab88eb28b5b | [
"Apache-2.0"
] | 8 | 2018-11-15T16:35:27.000Z | 2021-09-06T16:50:43.000Z | from time import sleep
from pytest import fail
def poll_result(fn, result_test_fn, *, max_checks=5, interval=1):
"""Polling utility for cases where we need to wait for BigchainDB
processing. After 'max_checks' attempts, will fail the test with the
last result.
Args:
fn (func): polling func... | 32.170213 | 77 | 0.648148 | from time import sleep
from pytest import fail
def poll_bdb_transaction_valid(driver, tx_id):
return poll_result(
lambda: driver.transactions.status(tx_id),
lambda result: result.get('status') == 'valid')
def poll_bdb_transaction(driver, tx_id):
return poll_result(
lambda: driver.tr... | 0 | 0 | 0 | 0 | 0 | 403 | 0 | 0 | 46 |
33985149ea1d0987285c00a442e1f49b20d1db48 | 1,733 | py | Python | test/test_twitter_controller.py | williamstrong/twitterdatahelper | 4d027d5ca981ec34cea18a1ba227bdf9c209a067 | [
"MIT"
] | null | null | null | test/test_twitter_controller.py | williamstrong/twitterdatahelper | 4d027d5ca981ec34cea18a1ba227bdf9c209a067 | [
"MIT"
] | null | null | null | test/test_twitter_controller.py | williamstrong/twitterdatahelper | 4d027d5ca981ec34cea18a1ba227bdf9c209a067 | [
"MIT"
] | null | null | null |
# @unittest.skip
# @unittest.skip
| 25.865672 | 68 | 0.686671 | import unittest
from social_networks.twitter_controller.twitter_api import *
@unittest.skip
class TestTweets(unittest.TestCase):
def setUp(self):
self.db = Database("test")
self.db.create_collection("test")
self.collection_search = "test"
self.tweets = Tweets().api
def test_... | 0 | 938 | 0 | 588 | 0 | 0 | 0 | 33 | 134 |
740b40ea3c7841056150821499cc4460e7ef82c2 | 6,406 | py | Python | pyro/infer/reparam/hmm.py | nipunbatra/pyro | d5b0545c4f992d435692080db6969314a2c32f05 | [
"Apache-2.0"
] | 4,959 | 2017-11-03T14:39:17.000Z | 2019-02-04T16:14:30.000Z | pyro/infer/reparam/hmm.py | nipunbatra/pyro | d5b0545c4f992d435692080db6969314a2c32f05 | [
"Apache-2.0"
] | 985 | 2017-11-03T14:27:56.000Z | 2019-02-02T18:52:54.000Z | pyro/infer/reparam/hmm.py | nipunbatra/pyro | d5b0545c4f992d435692080db6969314a2c32f05 | [
"Apache-2.0"
] | 564 | 2017-11-03T15:05:55.000Z | 2019-01-31T14:02:29.000Z | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
| 39.300613 | 86 | 0.581486 | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
import pyro.distributions as dist
from .reparam import Reparam
class LinearHMMReparam(Reparam):
"""
Auxiliary variable reparameterizer for
:class:`~pyro.distributions.LinearHMM` random variables.
This defers to comp... | 0 | 0 | 0 | 6,233 | 0 | 0 | 0 | 19 | 69 |
6a5389932969a16f5465b3e30ab45e70089777c9 | 5,028 | py | Python | models.py | ericlearning/dynamic-budget-network | 2c3af2d8a30546223c2b2430285dbe02395cdafe | [
"MIT"
] | 1 | 2021-05-18T10:54:06.000Z | 2021-05-18T10:54:06.000Z | models.py | ericlearning/dynamic-budget-network | 2c3af2d8a30546223c2b2430285dbe02395cdafe | [
"MIT"
] | null | null | null | models.py | ericlearning/dynamic-budget-network | 2c3af2d8a30546223c2b2430285dbe02395cdafe | [
"MIT"
] | null | null | null | import torch.nn as nn
| 36.970588 | 111 | 0.559268 | import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicBlock(nn.Module):
expansion = 1
def __init__(self, ic, oc, stride, dilation):
super(BasicBlock, self).__init__()
self.conv1 = nn.Conv2d(ic, oc, 3, stride, dilation, dilation, bias=False)
self.bn1 = nn.BatchNor... | 0 | 0 | 0 | 4,174 | 0 | 662 | 0 | 1 | 163 |
488ef511a7ad4be358f487fba7bd273f5d4e467c | 338 | py | Python | setup.py | jsza/tempus-map-updater | 3a122b5a454caec0fd36e0470c0fb61c4e77151c | [
"MIT"
] | null | null | null | setup.py | jsza/tempus-map-updater | 3a122b5a454caec0fd36e0470c0fb61c4e77151c | [
"MIT"
] | null | null | null | setup.py | jsza/tempus-map-updater | 3a122b5a454caec0fd36e0470c0fb61c4e77151c | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name="mapupdater",
packages=find_packages() + ["twisted.plugins"],
install_requires=[
"autobahn == 0.13.0",
"twisted >= 15.0.0",
"treq",
"bs4",
"html5lib",
"service_identity >= 14.0.0"
],
include_pa... | 18.777778 | 51 | 0.56213 | from setuptools import find_packages, setup
setup(
name="mapupdater",
packages=find_packages() + ["twisted.plugins"],
install_requires=[
"autobahn == 0.13.0",
"twisted >= 15.0.0",
"treq",
"bs4",
"html5lib",
"service_identity >= 14.0.0"
],
include_pa... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
46da6b0e41f484404c71eeac80d9a1860465d912 | 4,329 | py | Python | revolutiontech/tests.py | RevolutionTech/revolutiontech.ca | a3f0f1526812554938674c4fc9e7ea90ed4ffe6d | [
"0BSD"
] | null | null | null | revolutiontech/tests.py | RevolutionTech/revolutiontech.ca | a3f0f1526812554938674c4fc9e7ea90ed4ffe6d | [
"0BSD"
] | 171 | 2017-11-02T05:39:37.000Z | 2022-03-07T01:13:53.000Z | revolutiontech/tests.py | RevolutionTech/revolutiontech.ca | a3f0f1526812554938674c4fc9e7ea90ed4ffe6d | [
"0BSD"
] | 1 | 2018-01-13T08:11:26.000Z | 2018-01-13T08:11:26.000Z | """
:Created: 18 September 2016
:Author: Lucas Connors
"""
| 33.3 | 109 | 0.678448 | """
:Created: 18 September 2016
:Author: Lucas Connors
"""
from django.apps import apps
from django.contrib.auth.models import User
from django.db import connection
from django.db.migrations.executor import MigrationExecutor
from django.test import TransactionTestCase
from django.utils.text import slugify
from pigeon... | 0 | 81 | 0 | 3,616 | 0 | 0 | 0 | 256 | 313 |
2975af89f566b9c1600b28d91830a51d9d0eb967 | 710 | py | Python | 37.py | kumaya/dcp | ffcd5f82382a201eaf5a83d39823e0b1da8203f7 | [
"Apache-2.0"
] | null | null | null | 37.py | kumaya/dcp | ffcd5f82382a201eaf5a83d39823e0b1da8203f7 | [
"Apache-2.0"
] | null | null | null | 37.py | kumaya/dcp | ffcd5f82382a201eaf5a83d39823e0b1da8203f7 | [
"Apache-2.0"
] | null | null | null | # The power set of a set is the set of all its subsets.
# Write a function that, given a set, generates its power set.
# For example, given the set {1, 2, 3},
# it should return {{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}.
import math
if __name__ == "__main__":
inp = [1, 2, 3]
print "Power set:",... | 28.4 | 74 | 0.556338 | # The power set of a set is the set of all its subsets.
# Write a function that, given a set, generates its power set.
# For example, given the set {1, 2, 3},
# it should return {{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}.
import math
def power_set(inp, inp_size):
pow_set_size = int(math.pow(2, inp_si... | 0 | 0 | 0 | 0 | 0 | 341 | 0 | 0 | 23 |
81412bd5920489b7b302c99e7696722d6bbe293c | 1,448 | py | Python | setup.py | d0ugal/PyExecJS | a48570034f0e2303c7f01f916b22ca274ab1bb78 | [
"MIT"
] | 1 | 2016-05-25T14:55:10.000Z | 2016-05-25T14:55:10.000Z | setup.py | d0ugal/PyExecJS | a48570034f0e2303c7f01f916b22ca274ab1bb78 | [
"MIT"
] | null | null | null | setup.py | d0ugal/PyExecJS | a48570034f0e2303c7f01f916b22ca274ab1bb78 | [
"MIT"
] | 1 | 2020-04-26T20:40:34.000Z | 2020-04-26T20:40:34.000Z | #!/usr/bin/env python3
# -*- coding: ascii -*-
from __future__ import division, with_statement
from setuptools import setup, find_packages
import sys
import io
version = '1.3.0'
author = "Omoto Kenji"
license = "MIT License"
author_email = 'doloopwhile@gmail.com'
with io.open('README.rst', encoding='ascii') as fp:
... | 29.55102 | 54 | 0.65884 | #!/usr/bin/env python3
# -*- coding: ascii -*-
from __future__ import division, with_statement
from setuptools import setup, find_packages
import sys
import io
version = '1.3.0'
author = "Omoto Kenji"
license = "MIT License"
author_email = 'doloopwhile@gmail.com'
with io.open('README.rst', encoding='ascii') as fp:
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cbaef834272d4e86be138549c828d2a510836668 | 392 | py | Python | djangocms_baseplugins/image/tests/test_plugin.py | benzkji/djangocms-baseplugins | 7f041a030ed93dcdec70e4ca777b841846b8f2f2 | [
"MIT"
] | 2 | 2019-04-14T01:31:22.000Z | 2020-03-05T13:06:57.000Z | djangocms_baseplugins/image/tests/test_plugin.py | benzkji/djangocms-baseplugins | 7f041a030ed93dcdec70e4ca777b841846b8f2f2 | [
"MIT"
] | 32 | 2017-04-04T09:28:06.000Z | 2021-08-18T16:23:02.000Z | djangocms_baseplugins/image/tests/test_plugin.py | bnzk/djangocms-baseplugins | 7f041a030ed93dcdec70e4ca777b841846b8f2f2 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
| 30.153846 | 74 | 0.841837 | from __future__ import unicode_literals
from django.test import TestCase
from djangocms_baseplugins.baseplugin.tests.base import BasePluginTestCase
from djangocms_baseplugins.image.cms_plugins import ImagePlugin
class ImagePluginTests(BasePluginTestCase, TestCase):
plugin_class = ImagePlugin
plugin_settings... | 0 | 0 | 0 | 154 | 0 | 0 | 0 | 106 | 91 |
592b5225e55304e085b4d1b8120049e5622fc81e | 1,744 | py | Python | covid-ie-counties.py | jonathanoneill/covid-19-ie-counties | 96e41ecc21db51605ae0b56de2a8f120a4f3cf51 | [
"MIT"
] | null | null | null | covid-ie-counties.py | jonathanoneill/covid-19-ie-counties | 96e41ecc21db51605ae0b56de2a8f120a4f3cf51 | [
"MIT"
] | null | null | null | covid-ie-counties.py | jonathanoneill/covid-19-ie-counties | 96e41ecc21db51605ae0b56de2a8f120a4f3cf51 | [
"MIT"
] | null | null | null | import argparse
import requests
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
# Get command line arguments
parser = argparse.ArgumentParser()
parser.add_argument("--county", help="county name - default: Cork", default="Cork")
parser.add_argument("--days", help="number of days to... | 38.755556 | 158 | 0.737385 | import argparse
import requests
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
# Get command line arguments
parser = argparse.ArgumentParser()
parser.add_argument("--county", help="county name - default: Cork", default="Cork")
parser.add_argument("--days", help="number of days to... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6b8010c53ea890d81e8752f02649b787826a7d3c | 513 | py | Python | deepx/initialization/util.py | sharadmv/deepx | 07470e7a579a63427de1d5ff90b9fd00d3f54b61 | [
"MIT"
] | 74 | 2015-11-13T02:26:37.000Z | 2021-07-29T11:00:45.000Z | deepx/initialization/util.py | sharadmv/deepx | 07470e7a579a63427de1d5ff90b9fd00d3f54b61 | [
"MIT"
] | 21 | 2015-12-12T20:33:55.000Z | 2019-04-03T02:49:42.000Z | deepx/initialization/util.py | sharadmv/deepx | 07470e7a579a63427de1d5ff90b9fd00d3f54b61 | [
"MIT"
] | 19 | 2015-11-23T10:07:01.000Z | 2021-08-30T17:06:00.000Z | import numpy as np
def compute_fans(shape):
"""
Taken from Keras compute_fans
"""
if len(shape) == 2:
fan_in = shape[0]
fan_out = shape[1]
elif len(shape) in {3, 4, 5}:
receptive_field_size = np.prod(shape[:-2])
fan_in = shape[-2] * receptive_field_size
fan_o... | 27 | 50 | 0.588694 | import numpy as np
def compute_fans(shape):
"""
Taken from Keras compute_fans
"""
if len(shape) == 2:
fan_in = shape[0]
fan_out = shape[1]
elif len(shape) in {3, 4, 5}:
receptive_field_size = np.prod(shape[:-2])
fan_in = shape[-2] * receptive_field_size
fan_o... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fcec1691c6e2bb66894ac1c871b88b9a8c33c212 | 6,561 | py | Python | backuppy/plugin.py | bartfeenstra/backuppy | bd9e5f98e5431829054ba18c8c4096d4c548a5cb | [
"MIT"
] | null | null | null | backuppy/plugin.py | bartfeenstra/backuppy | bd9e5f98e5431829054ba18c8c4096d4c548a5cb | [
"MIT"
] | 63 | 2018-03-04T12:04:27.000Z | 2018-07-14T12:08:51.000Z | backuppy/plugin.py | bartfeenstra/backuppy | bd9e5f98e5431829054ba18c8c4096d4c548a5cb | [
"MIT"
] | null | null | null | """Discover plugins."""
from functools import partial
from backuppy.location import PathSource, PathTarget, SshTarget, FirstAvailableTarget
from backuppy.notifier import NotifySendNotifier, CommandNotifier, FileNotifier, StdioNotifier
def _new(available_plugin_types, configuration, plugin_type, plugin_configuration_... | 38.368421 | 117 | 0.729919 | """Discover plugins."""
from functools import partial
from backuppy.location import PathSource, PathTarget, SshTarget, FirstAvailableTarget
from backuppy.notifier import NotifySendNotifier, CommandNotifier, FileNotifier, StdioNotifier
def _new(available_plugin_types, configuration, plugin_type, plugin_configuration_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e9e5379debd85027f14aad4d5ec00b0471ba2e19 | 5,412 | py | Python | realms/cards.py | zmitchell/realms | f2c2ec4c68849482c482b4400e6a07d98fe65ca9 | [
"MIT"
] | 3 | 2021-01-17T21:42:19.000Z | 2021-09-02T04:46:54.000Z | realms/cards.py | zmitchell/realms | f2c2ec4c68849482c482b4400e6a07d98fe65ca9 | [
"MIT"
] | 128 | 2017-05-20T17:37:00.000Z | 2018-01-13T13:59:28.000Z | realms/cards.py | zmitchell/realms | f2c2ec4c68849482c482b4400e6a07d98fe65ca9 | [
"MIT"
] | 2 | 2020-12-16T14:19:19.000Z | 2021-01-17T21:43:53.000Z | # -*- coding: utf-8 -*-
"""
.. module:: card
:synopsis: Encapsulate card behavior
.. moduleauthor:: Zach Mitchell <zmitchell@fastmail.com>
"""
| 29.57377 | 90 | 0.637842 | # -*- coding: utf-8 -*-
"""
.. module:: card
:synopsis: Encapsulate card behavior
.. moduleauthor:: Zach Mitchell <zmitchell@fastmail.com>
"""
from enum import Enum
from functools import total_ordering
from uuid import uuid4
class Card(object):
""" Represents a card in the game
Parameters
----------... | 0 | 653 | 0 | 4,407 | 0 | 0 | 0 | 16 | 182 |
7c0cd505979ff77714a4d97b684c6bf114bd5562 | 2,220 | py | Python | bolo/src/bolo/models.py | KrazyKahunaGuy/Bolo-Backend-Basic-Authentication- | a0c893674ecf3c73d6c5267298334167dd400670 | [
"BSD-3-Clause"
] | null | null | null | bolo/src/bolo/models.py | KrazyKahunaGuy/Bolo-Backend-Basic-Authentication- | a0c893674ecf3c73d6c5267298334167dd400670 | [
"BSD-3-Clause"
] | null | null | null | bolo/src/bolo/models.py | KrazyKahunaGuy/Bolo-Backend-Basic-Authentication- | a0c893674ecf3c73d6c5267298334167dd400670 | [
"BSD-3-Clause"
] | null | null | null | from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
| 29.210526 | 73 | 0.682883 | from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.exc import SQLAlchemyError
db = SQLAlchemy()
class User(db.Model):
"""User object model."""
id = db.Column(db.Integer, primary_key=True)
userna... | 0 | 461 | 0 | 1,499 | 0 | 0 | 0 | 81 | 112 |
2b7ea922b1b50864ba47e5d425f50e2e7cb8cb6f | 876 | py | Python | settings.py | imnobody0396/Nancy-The-Virtual-Assistant | 4016f9bc3741b1f59e298034aa6160e095f56ecf | [
"MIT"
] | null | null | null | settings.py | imnobody0396/Nancy-The-Virtual-Assistant | 4016f9bc3741b1f59e298034aa6160e095f56ecf | [
"MIT"
] | null | null | null | settings.py | imnobody0396/Nancy-The-Virtual-Assistant | 4016f9bc3741b1f59e298034aa6160e095f56ecf | [
"MIT"
] | null | null | null | ### Author - Raghav Maheshwari ###
#from wolframalpha import Client
from os import listdir
#app_id = "KHHH6P-HTUJE286QJ"
#client = Client(app_id)
LOGO_PATH = '/home/imnobody0396/Documents/Nancy-The-Virtual-Assistant/logo.png'
#LOGO_PATH = '/home/imnobody0396/Desktop/nancy.png'
HOME_DIR = '/home/imnobody0396/'
DRI... | 32.444444 | 84 | 0.736301 | ### Author - Raghav Maheshwari ###
import notify2
#from wolframalpha import Client
from os import listdir
def nancy_notify(text): #Desktop Notification
notify2.init('Nancy')
n = notify2.Notification('Nancy', text, icon=LOGO_PATH)
n.show()
#app_id = "KHHH6P-HTUJE286QJ"
#client = Client(app_id)
LOGO_... | 0 | 0 | 0 | 0 | 0 | 127 | 0 | -7 | 46 |
679661a570c502742ca61d7ab4cf33d5b5d080ab | 132 | py | Python | plugins/hash_md5.py | JeffKwasha/hachit | 3e406009f123dcc52565ad1fc6b7d3ef94990cb3 | [
"Apache-2.0"
] | 2 | 2018-06-26T18:08:45.000Z | 2018-07-24T19:58:15.000Z | plugins/hash_md5.py | JeffKwasha/hachit | 3e406009f123dcc52565ad1fc6b7d3ef94990cb3 | [
"Apache-2.0"
] | null | null | null | plugins/hash_md5.py | JeffKwasha/hachit | 3e406009f123dcc52565ad1fc6b7d3ef94990cb3 | [
"Apache-2.0"
] | null | null | null |
doc = {
'name': 'hash_md5',
'inputs' : ['whitelist_csv', 'vt_hash', 'et_hash_dns'],
'id': 'hash',
'cache': None,
}
| 16.5 | 59 | 0.507576 |
doc = {
'name': 'hash_md5',
'inputs' : ['whitelist_csv', 'vt_hash', 'et_hash_dns'],
'id': 'hash',
'cache': None,
}
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
65352633be477e5cd00a949652749d1ce542a8df | 4,840 | py | Python | __init__.py | lex/gg-no-re | 127fe1b39471cd6f48e980138a2089be91b72962 | [
"BSD-3-Clause"
] | null | null | null | __init__.py | lex/gg-no-re | 127fe1b39471cd6f48e980138a2089be91b72962 | [
"BSD-3-Clause"
] | 21 | 2015-03-31T08:36:19.000Z | 2020-07-14T09:08:07.000Z | __init__.py | lex/gg-no-re | 127fe1b39471cd6f48e980138a2089be91b72962 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import (Flask)
app = Flask(__name__)
app.config['STATIC_FOLDER'] = 'static'
if __name__ == '__main__':
app.debug = True
app.run(host='0.0.0.0')
| 23.609756 | 90 | 0.540496 | # -*- coding: utf-8 -*-
from flask import (Flask,
request,
render_template,
redirect,
url_for,
jsonify)
import json
from ming import (create_datastore,
Session,
collection,
Field,
Document,
schema)
from bson.objectid import ObjectId
fro... | 0 | 3,547 | 0 | 0 | 0 | 0 | 0 | 700 | 391 |
22178a7be13446a3b89077bdda26ce8f363a7beb | 5,622 | py | Python | soc_016_conflict_protest_events/contents/src/__init__.py | bapludow/nrt-scripts | 99ed87e73b9428b9b3ee2d57f8d6b236b3892c5f | [
"MIT"
] | null | null | null | soc_016_conflict_protest_events/contents/src/__init__.py | bapludow/nrt-scripts | 99ed87e73b9428b9b3ee2d57f8d6b236b3892c5f | [
"MIT"
] | null | null | null | soc_016_conflict_protest_events/contents/src/__init__.py | bapludow/nrt-scripts | 99ed87e73b9428b9b3ee2d57f8d6b236b3892c5f | [
"MIT"
] | 1 | 2018-09-22T05:27:13.000Z | 2018-09-22T05:27:13.000Z | import logging
import requests
from collections import OrderedDict
import datetime
import cartosql
# Constants
LATEST_URL = 'https://api.acleddata.com/acled/read?page={page}'
MIN_PAGES = 10
MAX_PAGES = 200
CLEAR_TABLE_FIRST = False
CARTO_TABLE = 'soc_016_conflict_protest_events'
CARTO_SCHEMA = OrderedDict([
("th... | 30.389189 | 88 | 0.559765 | import os
import logging
import sys
import requests
from collections import OrderedDict
import datetime
import cartosql
# Constants
LATEST_URL = 'https://api.acleddata.com/acled/read?page={page}'
MIN_PAGES = 10
MAX_PAGES = 200
CLEAR_TABLE_FIRST = False
CARTO_TABLE = 'soc_016_conflict_protest_events'
CARTO_SCHEMA = O... | 0 | 0 | 0 | 0 | 0 | 984 | 0 | -23 | 67 |
4a1dacaacc72e64dff6c38cd7602e3a9155640fd | 8,000 | py | Python | custom/icds/management/commands/sanitize_phone_numbers.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2020-05-05T13:10:01.000Z | 2020-05-05T13:10:01.000Z | custom/icds/management/commands/sanitize_phone_numbers.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2019-12-09T14:00:14.000Z | 2019-12-09T14:00:14.000Z | custom/icds/management/commands/sanitize_phone_numbers.py | MaciejChoromanski/commcare-hq | fd7f65362d56d73b75a2c20d2afeabbc70876867 | [
"BSD-3-Clause"
] | 5 | 2015-11-30T13:12:45.000Z | 2019-07-01T19:27:07.000Z | from __future__ import absolute_import
from __future__ import unicode_literals
DOMAIN = "icds-cas"
CASE_TYPE = "person"
DATE_OF_REGISTRATION_PROPERTY = "date_of_registration"
PHONE_NUMBER_PROPERTY = "contact_phone_number"
HAS_MOBILE_PROPERTY = "has_mobile"
HAS_MOBILE_PROPERTY_NO_VALUE = "no"
CASE_ITERATION_COUNT = 10... | 40 | 112 | 0.67425 | from __future__ import absolute_import
from __future__ import unicode_literals
import csv342 as csv
import six
import sys
import time
from datetime import (
datetime,
date,
timedelta,
)
from io import open
from xml.etree import cElementTree as ElementTree
from django.core.management.base import BaseComma... | 0 | 0 | 0 | 6,003 | 0 | 612 | 0 | 387 | 470 |
6b3e6d9ab97884dda29f48787a2b106d9158e326 | 3,752 | py | Python | mesService/modules/RabbitMQ/interface_con.py | mabotech/mes_sv | 7d16e9176b5f58295f0eb8984a7291921c89603d | [
"MIT"
] | 2 | 2020-04-01T01:39:13.000Z | 2020-04-08T01:01:29.000Z | mesService/modules/RabbitMQ/interface_con.py | mabotech/mes_sv | 7d16e9176b5f58295f0eb8984a7291921c89603d | [
"MIT"
] | 1 | 2020-06-03T13:36:46.000Z | 2020-06-03T13:36:46.000Z | mesService/modules/RabbitMQ/interface_con.py | mabotech/mes_sv | 7d16e9176b5f58295f0eb8984a7291921c89603d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @createTime : 2020/3/24 13:56
# @author :
# @fileName: mq_rpc_server.py
# @email: jiangqiao.wang@mabotech.com
func_dict = {
"DeviationOrder": {"parse_xml": "parse_xml", "insertDatabase": "insertDatabase"},
"BomOrder": {"parse_xml": "parse_xml", "insertDatabase": "insertDatabase"}... | 39.494737 | 103 | 0.703891 | # -*- coding: utf-8 -*-
# @createTime : 2020/3/24 13:56
# @author : 王江桥
# @fileName: mq_rpc_server.py
# @email: jiangqiao.wang@mabotech.com
import json
import os
import sys
import pika
from mesService.modules.RabbitMQ import logger
from mesService.modules.ERPInterface.erp_to_mes.deviartion.receive_deviating import ... | 384 | 0 | 0 | 0 | 0 | 2,248 | 0 | 396 | 331 |
5f455ec3720963f93456637150632dd3e1384567 | 376 | py | Python | CRL/crl_console.py | mrakitin/bnl-crl | 2e7fd5c3faef900ad96752a786ad53675a71c500 | [
"Apache-2.0"
] | null | null | null | CRL/crl_console.py | mrakitin/bnl-crl | 2e7fd5c3faef900ad96752a786ad53675a71c500 | [
"Apache-2.0"
] | 1 | 2016-06-23T03:53:11.000Z | 2016-06-23T04:11:53.000Z | CRL/crl_console.py | mrakitin/CRL | 2e7fd5c3faef900ad96752a786ad53675a71c500 | [
"Apache-2.0"
] | null | null | null | from CRL import CRL, DEFAULTS_FILE
from console_utils import console
if __name__ == '__main__':
"""
Example of execution:
$ python crl_console.py --cart_ids 2 4 6 7 8 --energy=21500 --p0=6.52
"d","d_ideal","f","p0","p1","p1_ideal"
0.000372455276869,-0.0669574652539,1.04864377922,6.52,1.2496275447... | 26.857143 | 85 | 0.680851 | from CRL import CRL, DEFAULTS_FILE
from console_utils import console
if __name__ == '__main__':
"""
Example of execution:
$ python crl_console.py --cart_ids 2 4 6 7 8 --energy=21500 --p0=6.52
"d","d_ideal","f","p0","p1","p1_ideal"
0.000372455276869,-0.0669574652539,1.04864377922,6.52,1.2496275447... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d9f2eb70574d44d33177b279b349d26b5f2c74fe | 1,080 | py | Python | dephell/commands/package_search.py | OliverHofkens/dephell | 6303f416018910668f1635b70cd828a2fd2b2d9e | [
"MIT"
] | 1,880 | 2019-03-21T10:08:25.000Z | 2022-03-31T12:41:55.000Z | dephell/commands/package_search.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 356 | 2019-03-21T19:08:56.000Z | 2021-01-08T17:45:43.000Z | dephell/commands/package_search.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 157 | 2019-04-23T01:13:37.000Z | 2022-03-24T22:41:18.000Z | # built-in
# app
| 30 | 98 | 0.64537 | # built-in
from argparse import REMAINDER, ArgumentParser
# app
from ..actions import make_json
from ..config import builders
from ..repositories import get_repo
from .base import BaseCommand
class PackageSearchCommand(BaseCommand):
"""Search packages on PyPI.org or Anaconda Cloud.
"""
@staticmethod
... | 0 | 309 | 0 | 554 | 0 | 0 | 0 | 65 | 133 |
5d37edd8588ff31c1bd517b216162c3226989c3f | 783 | py | Python | applications/tensorflow/cnns/inference/tests/test_get_weights.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/inference/tests/test_get_weights.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/inference/tests/test_get_weights.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | # Copyright (c) 2019 Graphcore Ltd. All rights reserved.
import sys
from pathlib import Path
sys.path.append(Path(__file__).parent.parent.as_posix())
| 34.043478 | 110 | 0.713921 | # Copyright (c) 2019 Graphcore Ltd. All rights reserved.
import pytest
import sys
import tempfile
from pathlib import Path
sys.path.append(Path(__file__).parent.parent.as_posix())
from get_weights import get_weights # noqa
@pytest.mark.parametrize('model_name', ['VGG16', 'VGG19', 'ResNet101'])
def test_unsupporte... | 0 | 508 | 0 | 0 | 0 | 0 | 0 | 0 | 121 |
4a486cd402d49964353a2cab6691bbd1d7bb7169 | 2,676 | py | Python | alf/examples/qrsac_halfcheetah_conf.py | Ji4chenLi/alf | c42ea1156baed47d78747231e96d6b2e91ef73ad | [
"Apache-2.0"
] | null | null | null | alf/examples/qrsac_halfcheetah_conf.py | Ji4chenLi/alf | c42ea1156baed47d78747231e96d6b2e91ef73ad | [
"Apache-2.0"
] | null | null | null | alf/examples/qrsac_halfcheetah_conf.py | Ji4chenLi/alf | c42ea1156baed47d78747231e96d6b2e91ef73ad | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 Horizon Robotics and ALF Contributors. 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... | 31.857143 | 105 | 0.779522 | # Copyright (c) 2021 Horizon Robotics and ALF Contributors. 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... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 44 |
c9234d54134295b07632d883d6d704a05391555c | 12,815 | py | Python | hera_pspec/tests/test_pspecbeam.py | adeliegorce/hera_pspec | 4d2fe17e2015b02b16683b29e2fd5530066dfd7b | [
"BSD-3-Clause"
] | 10 | 2018-01-28T06:59:22.000Z | 2021-02-23T19:23:09.000Z | hera_pspec/tests/test_pspecbeam.py | adeliegorce/hera_pspec | 4d2fe17e2015b02b16683b29e2fd5530066dfd7b | [
"BSD-3-Clause"
] | 314 | 2017-06-30T04:10:58.000Z | 2022-03-18T16:34:37.000Z | hera_pspec/tests/test_pspecbeam.py | adeliegorce/hera_pspec | 4d2fe17e2015b02b16683b29e2fd5530066dfd7b | [
"BSD-3-Clause"
] | 3 | 2017-10-26T00:21:01.000Z | 2022-01-21T20:59:18.000Z | from .. import pspecbeam, conversions
| 43.148148 | 120 | 0.612876 | import unittest, os
import pytest
import numpy as np
import pyuvdata as uv
from .. import pspecbeam, conversions
from hera_pspec.data import DATA_PATH
class Test_DataSet(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def runTest(self):
pass
def test_init... | 0 | 0 | 0 | 12,640 | 0 | 0 | 0 | 3 | 133 |
41da4c4cbe2cb06c57446c4f03b94412006622e1 | 7,804 | py | Python | graph_model/model_utils.py | abwilf/Factorized | 64e7d2a54bbfbc8b1c5a2130f2b941c376402fe6 | [
"MIT"
] | 22 | 2021-03-18T22:17:59.000Z | 2022-01-26T22:04:57.000Z | graph_model/model_utils.py | abwilf/Factorized | 64e7d2a54bbfbc8b1c5a2130f2b941c376402fe6 | [
"MIT"
] | 3 | 2021-06-10T15:09:32.000Z | 2022-01-05T07:15:48.000Z | graph_model/model_utils.py | abwilf/Factorized | 64e7d2a54bbfbc8b1c5a2130f2b941c376402fe6 | [
"MIT"
] | 7 | 2021-03-18T22:00:26.000Z | 2022-03-07T01:21:33.000Z | # noinspection PyTypeChecker
import torch
import operator
from functools import reduce
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
# NOTE: This is deprecated
# noinspection PyTypeChecker
def build_temporal_clique(node_index_aggr, node_types_aggr, order=1):
"""
Build the temporal ... | 47.877301 | 115 | 0.662096 | # noinspection PyTypeChecker
import torch
import operator
from functools import reduce
from torch import Tensor
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
# NOTE: This is deprecated
# noinspection PyTypeChecker
def build_temporal_clique(node_index_aggr, node_types_aggr, order=1):
"... | 0 | 0 | 0 | 0 | 0 | 770 | 0 | 3 | 69 |