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
d364bdbd28d8ed858b03da345dde950627f0fb0c
217
py
Python
Cursoemvideo/Aulas/aula11b.py
gentildf/Python
bb333e55b197492eac1294619ca7b13ef57bb631
[ "MIT" ]
1
2021-03-16T13:07:29.000Z
2021-03-16T13:07:29.000Z
Cursoemvideo/Aulas/aula11b.py
gentildf/Python
bb333e55b197492eac1294619ca7b13ef57bb631
[ "MIT" ]
null
null
null
Cursoemvideo/Aulas/aula11b.py
gentildf/Python
bb333e55b197492eac1294619ca7b13ef57bb631
[ "MIT" ]
null
null
null
print('\033[31mOl mundo!\033[m') print('\033[33mMeu nome \033[32mDnis Fernando\033[m') print('\033[4mEsse texto um texto sublinhado\033[m.') print('\033[7;30mEsse texto est escrito com cores ao inverso.\033[m')
54.25
70
0.732719
print('\033[31mOlá mundo!\033[m') print('\033[33mMeu nome é \033[32mDênis Fernando\033[m') print('\033[4mEsse texto é um texto sublinhado\033[m.') print('\033[7;30mEsse texto está escrito com cores ao inverso.\033[m')
10
0
0
0
0
0
0
0
0
bf0f9e7b2d6f65011c8843e7df4bdc920221bcf2
3,117
py
Python
app/models/models.py
andela-pijege/docman
347535a819160e885380761adbe6f45924ef05de
[ "MIT" ]
1
2021-08-28T23:30:27.000Z
2021-08-28T23:30:27.000Z
app/models/models.py
andela-pijege/docman
347535a819160e885380761adbe6f45924ef05de
[ "MIT" ]
null
null
null
app/models/models.py
andela-pijege/docman
347535a819160e885380761adbe6f45924ef05de
[ "MIT" ]
2
2020-09-03T20:31:11.000Z
2021-03-29T11:52:06.000Z
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy()
31.484848
104
0.651588
from flask import current_app from datetime import datetime from werkzeug.security import check_password_hash, generate_password_hash from itsdangerous import (TimedJSONWebSignatureSerializer as Serializer, BadSignature, SignatureExpired) from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() class CRUDMixin(obje...
0
0
0
2,722
0
0
0
151
180
09a303228ef3e3085e3bf1a179aa2a5e9ed50c5d
678
py
Python
BOJ/review/boj_14889.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
BOJ/review/boj_14889.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
BOJ/review/boj_14889.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
# BOJ 14889 import sys from itertools import combinations si = sys.stdin.readline n = int(si()) graph = [list(map(int, si().split())) for _ in range(n)] people = [i for i in range(n)] # . team = list(combinations(people, n // 2)) size = len(team) start = team[: size // 2] link = list(reversed(team[size // 2 :]...
18.324324
56
0.585546
# BOJ 14889 import sys from itertools import combinations si = sys.stdin.readline def psum(team): s = 0 for i in team: for j in team: s += graph[i][j] return s n = int(si()) graph = [list(map(int, si().split())) for _ in range(n)] people = [i for i in range(n)] # 모든 반으로 쪼갠 경우에 대해서 고...
51
0
0
0
0
88
0
0
23
3c6c1db3f93f9ec578ba8acdc64c5593fb0d5456
1,242
py
Python
Machine Learning/Daten verarbeiten/Daten komprimieren.py
stanman71/Python
fe442e421362b22f61d05235e835a568d9ce3aef
[ "MIT" ]
1
2019-02-18T18:56:07.000Z
2019-02-18T18:56:07.000Z
Machine Learning/Daten verarbeiten/Daten komprimieren.py
stanman71/Python
fe442e421362b22f61d05235e835a568d9ce3aef
[ "MIT" ]
null
null
null
Machine Learning/Daten verarbeiten/Daten komprimieren.py
stanman71/Python
fe442e421362b22f61d05235e835a568d9ce3aef
[ "MIT" ]
null
null
null
""" Mglichkeit um Daten zu komprieren und den Informationsverlust abzuschtzen """ ## ########################## ## Teil 0: Einlesen der Daten ## ########################## import pandas as pd train = pd.read_csv("./Python_Training/Machine Learning/Daten verarbeiten/CSV/train.csv.bz2") test = pd.read_...
26.425532
94
0.600644
""" Möglichkeit um Daten zu komprieren und den Informationsverlust abzuschätzen """ ## ########################## ## Teil 0: Einlesen der Daten ## ########################## import pandas as pd train = pd.read_csv("./Python_Training/Machine Learning/Daten verarbeiten/CSV/train.csv.bz2") test = pd.rea...
6
0
0
0
0
0
0
30
25
a8ab576bfa3326952b85ca3f968b9318097b134e
632
py
Python
{{ cookiecutter.project_slug }}/tests/test_{{ cookiecutter.project_slug }}.py
John15321/cookiecutter-poetic-python
0e916f34c15801be2222061e3a690691294da4f5
[ "MIT" ]
null
null
null
{{ cookiecutter.project_slug }}/tests/test_{{ cookiecutter.project_slug }}.py
John15321/cookiecutter-poetic-python
0e916f34c15801be2222061e3a690691294da4f5
[ "MIT" ]
7
2022-02-22T16:18:02.000Z
2022-03-02T18:10:42.000Z
{{ cookiecutter.project_slug }}/tests/test_{{ cookiecutter.project_slug }}.py
John15321/cookiecutter-poetic-python
0e916f34c15801be2222061e3a690691294da4f5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Basic tests on the package.""" import toml from {{ cookiecutter.project_slug }} import __version__ def get_version() -> str: """Get version of the package from the ``pyproject.toml`` file. Returns: -------- Pcakge version. """ root_project_directory = "../" ...
25.28
81
0.642405
# -*- coding: utf-8 -*- """Basic tests on the package.""" import toml from {{ cookiecutter.project_slug }} import __version__ def get_version() -> str: """Get version of the package from the ``pyproject.toml`` file. Returns: -------- Pcakge version. """ root_project_directory = "../" ...
0
0
0
0
0
0
0
0
0
64c61e9a0cabb427ceb64fe03a881ccd91839667
1,210
py
Python
lab6/createDataset.py
mazarbaloch/UEF-AILab-2021
6bec5c1a9625c5ab6e91cdc29e2a51b1dcb872f2
[ "CC0-1.0" ]
3
2021-09-12T03:43:53.000Z
2021-09-27T09:47:36.000Z
lab6/createDataset.py
mazarbaloch/UEF-AILab-2021
6bec5c1a9625c5ab6e91cdc29e2a51b1dcb872f2
[ "CC0-1.0" ]
null
null
null
lab6/createDataset.py
mazarbaloch/UEF-AILab-2021
6bec5c1a9625c5ab6e91cdc29e2a51b1dcb872f2
[ "CC0-1.0" ]
null
null
null
import pathlib #Path to the directory where the original dataset was uncompressed original_dir = pathlib.Path("../data/dogs-vs-cats/train") #Directory where we will store our smaller dataset new_base_dir = pathlib.Path("../data/cats_vs_dogs_small") #A function to copy cat and dog images from index start_index to #in...
44.814815
83
0.744628
import os, shutil, pathlib #Path to the directory where the original dataset was uncompressed original_dir = pathlib.Path("../data/dogs-vs-cats/train") #Directory where we will store our smaller dataset new_base_dir = pathlib.Path("../data/cats_vs_dogs_small") #A function to copy cat and dog images from index start_...
0
0
0
0
0
325
0
12
22
33ebdea098a95c76e2a116fbb8ab373784366bc7
234
py
Python
day10/matrix1.py
nikhilsamninan/python-files
15198459081097058a939b40b5e8ef754e578fe0
[ "Apache-2.0" ]
null
null
null
day10/matrix1.py
nikhilsamninan/python-files
15198459081097058a939b40b5e8ef754e578fe0
[ "Apache-2.0" ]
null
null
null
day10/matrix1.py
nikhilsamninan/python-files
15198459081097058a939b40b5e8ef754e578fe0
[ "Apache-2.0" ]
null
null
null
matrix = [[1,2,3],[4,5,6],[7,8,9]] tran_matrix=[[0,0,0],[0,0,0],[0,0,0]] for i in range(len(matrix)): for j in range(len(matrix[0])): tran_matrix[j][i] = matrix[i][j] for r in tran_matrix: print(r) # print(tran_matrix)
29.25
40
0.581197
matrix = [[1,2,3],[4,5,6],[7,8,9]] tran_matrix=[[0,0,0],[0,0,0],[0,0,0]] for i in range(len(matrix)): for j in range(len(matrix[0])): tran_matrix[j][i] = matrix[i][j] for r in tran_matrix: print(r) # print(tran_matrix)
0
0
0
0
0
0
0
0
0
c924d9c26d48569acbe74cdfc0eeb09896586afd
315
py
Python
minimi_quadrati/es/ese9.py
luigi-borriello00/Metodi_SIUMerici
cf1407c0ad432a49a96dcd08303213e48723c57a
[ "MIT" ]
4
2021-06-23T14:47:46.000Z
2021-07-07T08:39:27.000Z
minimi_quadrati/es/ese9.py
luigi-borriello00/Metodi_SIUMerici
cf1407c0ad432a49a96dcd08303213e48723c57a
[ "MIT" ]
null
null
null
minimi_quadrati/es/ese9.py
luigi-borriello00/Metodi_SIUMerici
cf1407c0ad432a49a96dcd08303213e48723c57a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ ese9 """ import numpy as np import math f= lambda x: np.sin(2*math.pi*x) x=np.linspace(-1,1,22) y1=f(x); y2=y1.copy() y2=y2+0.0002*np.random.randn(22,)
17.5
56
0.673016
# -*- coding: utf-8 -*- """ ese9 """ import numpy as np import numpy.linalg as npl from funzioni_Interpolazione_Polinomiale import InterpL import math import matplotlib.pyplot as plt f= lambda x: np.sin(2*math.pi*x) x=np.linspace(-1,1,22) y1=f(x); y2=y1.copy() y2=y2+0.0002*np.random.randn(22,)
0
0
0
0
0
0
0
49
69
771f183ec2c7d2a982fbb28a83b2b88709a1c068
1,523
py
Python
cli/app/blender/operators/fileio.py
breezykermo/vframe_synthetic
33c8d30aa22c7252f7c6af1d3ef12840fb0eb443
[ "MIT" ]
null
null
null
cli/app/blender/operators/fileio.py
breezykermo/vframe_synthetic
33c8d30aa22c7252f7c6af1d3ef12840fb0eb443
[ "MIT" ]
null
null
null
cli/app/blender/operators/fileio.py
breezykermo/vframe_synthetic
33c8d30aa22c7252f7c6af1d3ef12840fb0eb443
[ "MIT" ]
null
null
null
import sys import importlib sys.path.append('/work/vframe_synthetic/vframe_synthetic') from app.utils import log_utils # reload application python modules importlib.reload(log_utils) # shortcuts log = log_utils.Logger.getLogger() # --------------------------------------------------------------------------- # Mange ...
26.258621
77
0.650689
import sys from os.path import join from pathlib import Path import importlib import math import random import pandas as pd import bpy sys.path.append('/work/vframe_synthetic/vframe_synthetic') from app.utils import log_utils from app.settings import app_cfg # reload application python modules importlib.reload(log_u...
0
0
0
942
0
0
0
-14
179
17e287f3a8b363524628516f10246225f5c3d27f
10,202
py
Python
devito/passes/iet/linearization.py
reguly/devito
543b7be41ddbf1faa90224cca3824767756c9390
[ "MIT" ]
1
2022-01-25T02:20:52.000Z
2022-01-25T02:20:52.000Z
devito/passes/iet/linearization.py
reguly/devito
543b7be41ddbf1faa90224cca3824767756c9390
[ "MIT" ]
null
null
null
devito/passes/iet/linearization.py
reguly/devito
543b7be41ddbf1faa90224cca3824767756c9390
[ "MIT" ]
null
null
null
from collections import defaultdict import numpy as np from devito.ir import (BlankLine, Call, DummyExpr, Dereference, Expression, PointerCast, FindNodes, FindSymbols, Transformer) from devito.symbolics import (retrieve_indexed, uxreplace) from devito.tools import Bunch, DefaultOrderedDict, filter_ordered, flatten, pr...
34.819113
89
0.617624
from collections import defaultdict from functools import singledispatch import numpy as np from devito.data import FULL from devito.ir import (BlankLine, Call, DummyExpr, Dereference, Expression, List, PointerCast, PragmaTransfer, FindNodes, FindSymbols, Transformer) fro...
0
1,762
0
0
0
2,058
0
262
272
320c219504fcbadfde59dc059e9aa04e9e3fba8e
8,567
py
Python
Stack-PointerNetworks-KoreanDep.Parsing_with_chunking-/neuronlp2/nn/_functions/variational_rnn.py
kmounlp/Chunk
1a9d6ce94a275a0fcfadf94dc161c4e69776eeee
[ "MIT" ]
9
2019-09-03T11:03:45.000Z
2021-09-19T05:38:25.000Z
Stack-PointerNetworks-KoreanDep.Parsing_with_chunking-/neuronlp2/nn/_functions/variational_rnn.py
kmounlp/Chunk
1a9d6ce94a275a0fcfadf94dc161c4e69776eeee
[ "MIT" ]
1
2019-11-04T21:02:01.000Z
2019-11-12T10:03:41.000Z
DLR/neuronlp2/nn/_functions/variational_rnn.py
rizwan09/SBCR
3354cb9b2a95a16c8b8950667d44fa2881400048
[ "Apache-2.0" ]
1
2020-09-30T12:24:22.000Z
2020-09-30T12:24:22.000Z
__author__ = 'max'
32.086142
113
0.595658
__author__ = 'max' import torch from torch.nn._functions.thnn import rnnFusedPointwise as fusedBackend from torch.nn import functional as F def VarRNNReLUCell(input, hidden, w_ih, w_hh, b_ih=None, b_hh=None, noise_in=None, noise_hidden=None): if noise_in is not None: input = input * noise_in if noise...
0
0
0
0
0
8,138
0
55
343
0d9890491297d9b06d1bef90b9898ace65aed426
7,393
py
Python
sdk/python/pulumi_linode/image.py
Charliekenney23/pulumi-linode
523c58758c8f5b78219c670ba1aad6c6fd46c07a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_linode/image.py
Charliekenney23/pulumi-linode
523c58758c8f5b78219c670ba1aad6c6fd46c07a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_linode/image.py
Charliekenney23/pulumi-linode
523c58758c8f5b78219c670ba1aad6c6fd46c07a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi
48.320261
255
0.659949
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from . import utilities, tables class Image(p...
0
1,817
0
5,246
0
0
0
-3
134
52f1f715c6dffa62cc558dea8769854f1e7eab3a
868
py
Python
medium/dummy.py
mariuszlitwin/roark
85cd394544a89c61069890c3d6b011372f5c174b
[ "Apache-2.0" ]
1
2016-11-17T00:44:06.000Z
2016-11-17T00:44:06.000Z
medium/dummy.py
mariuszlitwin/roark
85cd394544a89c61069890c3d6b011372f5c174b
[ "Apache-2.0" ]
null
null
null
medium/dummy.py
mariuszlitwin/roark
85cd394544a89c61069890c3d6b011372f5c174b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -*- encoding: UTF-8 -*-
29.931034
133
0.62788
#!/usr/bin/python3 # -*- encoding: UTF-8 -*- import time import hashlib import oth.roark.exceptions class dummy: roark_status = dict() bot_list = dict() api_key = None; def check_access(self, received_access_token): if self.api_key: m = hashlib.md5() m.update(self.ap...
0
0
0
742
0
0
0
-11
92
11ba8c3faddc663af94a52bdeb0eb3a45d60f911
330
py
Python
gestaoemp/lib/python3.6/site-packages/pysignfe/corr_unicode.py
jasonrosa92/gestaoempresa
c942c7cb5ff3bd299da94df11eab49b7dd0c7d71
[ "MIT" ]
null
null
null
gestaoemp/lib/python3.6/site-packages/pysignfe/corr_unicode.py
jasonrosa92/gestaoempresa
c942c7cb5ff3bd299da94df11eab49b7dd0c7d71
[ "MIT" ]
null
null
null
gestaoemp/lib/python3.6/site-packages/pysignfe/corr_unicode.py
jasonrosa92/gestaoempresa
c942c7cb5ff3bd299da94df11eab49b7dd0c7d71
[ "MIT" ]
1
2020-11-04T08:45:57.000Z
2020-11-04T08:45:57.000Z
# -*- coding: utf-8 -*- try: unicode = unicode except NameError: # Se 'unicode', utilizando versao Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' esta definido, deve ser Python 2 str = str unicode = unicode bytes = str basestring = ...
20.625
48
0.615152
# -*- coding: utf-8 -*- try: unicode = unicode except NameError: # Se 'unicode', utilizando versao Python 3 str = str unicode = str bytes = bytes basestring = (str,bytes) else: # 'unicode' esta definido, deve ser Python 2 str = str unicode = unicode bytes = str basestring = ...
0
0
0
0
0
0
0
0
0
5a000f4edb0fa8051c5ce1ab6c4368bc5e8f4e01
2,390
py
Python
Round 3/datacenter-duplex.py
enigma-pattern/GoogleCodeJam-2019
558c57209a90319d31da13a58f8da60ca56d9f0a
[ "MIT" ]
54
2019-04-07T06:19:19.000Z
2022-01-19T10:58:00.000Z
Round 3/datacenter-duplex.py
Escapist-007/GoogleCodeJam-2019
bfa4f2a9585c710f3bbc176b9f8aa4d2ee0a4ce4
[ "MIT" ]
1
2019-06-02T18:20:30.000Z
2019-06-02T18:40:32.000Z
Round 3/datacenter-duplex.py
Escapist-007/GoogleCodeJam-2019
bfa4f2a9585c710f3bbc176b9f8aa4d2ee0a4ce4
[ "MIT" ]
21
2019-04-10T04:32:03.000Z
2021-07-22T22:38:53.000Z
# Copyright (c) 2019 kamyu. All rights reserved. # # Google Code Jam 2019 Round 3 - Problem C. Datacenter Duplex # https://codingcompetitions.withgoogle.com/codejam/round/0000000000051707/0000000000158f1c # # Time: O(R * C) # Space: O(R * C) # for case in xrange(input()): print 'Case #%d: %s' % (case+1, datacente...
34.142857
98
0.524268
# Copyright (c) 2019 kamyu. All rights reserved. # # Google Code Jam 2019 Round 3 - Problem C. Datacenter Duplex # https://codingcompetitions.withgoogle.com/codejam/round/0000000000051707/0000000000158f1c # # Time: O(R * C) # Space: O(R * C) # class UnionFind(object): def __init__(self, n): self.set = ran...
0
0
0
455
0
1,534
0
0
69
093748985dc52b09a01ab950865100fc85012db0
5,057
py
Python
tilda/.config/i3/i3-autoname-workspaces.py
fatty-arbuckle/dotty
9143b09248c4331916162776e16f47612928a578
[ "MIT" ]
null
null
null
tilda/.config/i3/i3-autoname-workspaces.py
fatty-arbuckle/dotty
9143b09248c4331916162776e16f47612928a578
[ "MIT" ]
null
null
null
tilda/.config/i3/i3-autoname-workspaces.py
fatty-arbuckle/dotty
9143b09248c4331916162776e16f47612928a578
[ "MIT" ]
null
null
null
# This script listens for i3 events and updates workspace names to show icons # for running programs. It contains icons for a few programs, but more can # easily be added by inserting them into WINDOW_ICONS below. # # Dependencies # * xorg-xprop - install through system package manager # * i3ipc - install with pip or...
31.216049
94
0.684596
# This script listens for i3 events and updates workspace names to show icons # for running programs. It contains icons for a few programs, but more can # easily be added by inserting them into WINDOW_ICONS below. # # Dependencies # * xorg-xprop - install through system package manager # * i3ipc - install with pip or...
0
0
0
0
0
1,496
0
-19
200
f36d4c5cd6ee5078af056f412b5f2d885d2f4c2b
806
py
Python
CursoEmVideo/pythonProject/ex036.py
cassio645/Aprendendo-python
17a8b5a0e7abc3342d24841ed28093db13d2c130
[ "MIT" ]
null
null
null
CursoEmVideo/pythonProject/ex036.py
cassio645/Aprendendo-python
17a8b5a0e7abc3342d24841ed28093db13d2c130
[ "MIT" ]
null
null
null
CursoEmVideo/pythonProject/ex036.py
cassio645/Aprendendo-python
17a8b5a0e7abc3342d24841ed28093db13d2c130
[ "MIT" ]
null
null
null
#aprovando emprestimo from time import sleep cores = {'limpar': '\033[m', 'verde': '\033[32m', 'vermelho': '\033[31m', 'pretob': '\033[7;30m' } casa = float(input('Qual o valor da casa? R$ ')) salario = float(input('Qual valor do seu salrio? R$ ')) anos = int(input('Em quantos anos ...
33.583333
77
0.645161
#aprovando emprestimo from time import sleep cores = {'limpar': '\033[m', 'verde': '\033[32m', 'vermelho': '\033[31m', 'pretob': '\033[7;30m' } casa = float(input('Qual o valor da casa? R$ ')) salario = float(input('Qual valor do seu salário? R$ ')) anos = int(input('Em quantos anos...
10
0
0
0
0
0
0
0
0
1aa5a076002ca89929cc576a8abdd3d94bdeb617
798
py
Python
leet/dynamic/coinChange.py
monishshah18/python-cp-cheatsheet
a5514b08816959de1198156f7764c54a7a585f20
[ "Apache-2.0" ]
140
2020-10-21T13:23:52.000Z
2022-03-31T15:09:45.000Z
leet/dynamic/coinChange.py
stacykutyepov/python-cp-cheatsheet
a00a57e1b36433648d1cace331e15ff276cef189
[ "Apache-2.0" ]
1
2021-07-22T14:01:25.000Z
2021-07-22T14:01:25.000Z
leet/dynamic/coinChange.py
stacykutyepov/python-cp-cheatsheet
a00a57e1b36433648d1cace331e15ff276cef189
[ "Apache-2.0" ]
33
2020-10-21T14:17:02.000Z
2022-03-25T11:25:03.000Z
""" sort coins 11, greatest to least (Greedy) 11 - 5 6 - 5 1 - 2 1 - 1 1,3,4 (Greedy) 4, 1, 1 = 6 (Optimal) 3, 3 = 6 1,3,4 6 = b(5) + 1 6 = b(3) + 3 0 1 2 3 4 5 6 7 8 9 10 11 a: amount 1 3 4 c: coins 0 1 2 1 1 2 2 dp # if total can be reached if c == amount: dp[a] = 1 #...
18.136364
63
0.487469
""" sort coins 11, greatest to least (Greedy) 11 - 5 6 - 5 1 - 2 1 - 1 1,3,4 (Greedy) 4, 1, 1 = 6 (Optimal) 3, 3 = 6 1,3,4 6 = b(5) + 1 6 = b(3) + 3 0 1 2 3 4 5 6 7 8 9 10 11 a: amount 1 3 4 c: coins 0 1 2 1 1 2 2 dp # if total can be reached if c == amount: dp[a] = 1 #...
0
0
0
315
0
0
0
0
23
6b597281aceaed79f3ad7e1b1aa2443600fd91e6
429
py
Python
src/python/publisher.py
PC-ProgettoMIA/edge
bad4bde354e1e15f20ac02308354cb770d4d7f1d
[ "Apache-2.0" ]
null
null
null
src/python/publisher.py
PC-ProgettoMIA/edge
bad4bde354e1e15f20ac02308354cb770d4d7f1d
[ "Apache-2.0" ]
null
null
null
src/python/publisher.py
PC-ProgettoMIA/edge
bad4bde354e1e15f20ac02308354cb770d4d7f1d
[ "Apache-2.0" ]
null
null
null
import paho.mqtt.client as mqtt import time if __name__ == '__main__': client = mqtt.Client("MIA") client.connect("mqtt.localhost", 1883) while True: client.publish("house/mia", publishDT()) time.sleep(1)
22.578947
87
0.668998
import atomic_store import paho.mqtt.client as mqtt import json import time def publishDT(): with atomic_store.open('src/resources/digital_twin.json', default=dict()) as store: dt = store.value return json.dumps(dt) if __name__ == '__main__': client = mqtt.Client("MIA") client.connect("m...
0
0
0
0
0
138
0
-12
67
92228581659a3396ae63f53d0612b65652488950
946
py
Python
Algo_Ds_Notes-master/Algo_Ds_Notes-master/Reversal_Linked_List/Reversal_Linked_List.py
rajatenzyme/Coding-Journey-
65a0570153b7e3393d78352e78fb2111223049f3
[ "MIT" ]
null
null
null
Algo_Ds_Notes-master/Algo_Ds_Notes-master/Reversal_Linked_List/Reversal_Linked_List.py
rajatenzyme/Coding-Journey-
65a0570153b7e3393d78352e78fb2111223049f3
[ "MIT" ]
null
null
null
Algo_Ds_Notes-master/Algo_Ds_Notes-master/Reversal_Linked_List/Reversal_Linked_List.py
rajatenzyme/Coding-Journey-
65a0570153b7e3393d78352e78fb2111223049f3
[ "MIT" ]
null
null
null
from __future__ import print_function #used for modifying how print works #chain together the node. n3 will be head while n0 the tail n0 = Node(4,None) n1 = Node(3,n0) n2 = Node(2,n1) n3 = Node(1,n2) head = n3 # the head of the nodes print("Before Reverse", end=" ") while head: print(head.data ,end=" ") head...
24.25641
73
0.630021
from __future__ import print_function #used for modifying how print works class Node(object): def __init__(self, data=None, next_node=None): self.data =data self.next_node = next_node def reverse_iterative(self,n): last = None current = n while(current is not None): ...
0
0
0
380
0
0
0
0
23
027b870e5044ddce352c3a69703ab9ea2c8d0fe8
730
py
Python
examples/recommendations_service/test_activity_recommendations.py
qdamian/htmlviz
15997663c442995145f3a3f6b800d1bc371bd4d5
[ "MIT" ]
null
null
null
examples/recommendations_service/test_activity_recommendations.py
qdamian/htmlviz
15997663c442995145f3a3f6b800d1bc371bd4d5
[ "MIT" ]
null
null
null
examples/recommendations_service/test_activity_recommendations.py
qdamian/htmlviz
15997663c442995145f3a3f6b800d1bc371bd4d5
[ "MIT" ]
null
null
null
""" A suite of functional tests for the activity recommendation service. """
29.2
68
0.734247
""" A suite of functional tests for the activity recommendation service. """ import requests def test_recommends_to_go_hiking_if_the_weather_is_sunny(): _given_weather_is('sunny') response = requests.get('http://127.0.0.1:8080/recommendation') response.raise_for_status() assert response.text == 'go hi...
0
0
0
0
0
565
0
-6
91
cb462d5a830f5991894aba52d7358d331cf45650
1,419
py
Python
quiz2/bronianprocess.py
realwaynesun/statistical-finance
425a499acaefdeb0e45aabb31b8464ca56f9c973
[ "MIT" ]
null
null
null
quiz2/bronianprocess.py
realwaynesun/statistical-finance
425a499acaefdeb0e45aabb31b8464ca56f9c973
[ "MIT" ]
null
null
null
quiz2/bronianprocess.py
realwaynesun/statistical-finance
425a499acaefdeb0e45aabb31b8464ca56f9c973
[ "MIT" ]
null
null
null
import scipy.stats as stats initial = 50 time = 1/6 mu = 0.18 sigma = 0.2 value = 55 per = 0.9 e, s = dts(initial, time, mu, sigma) E, SD = dtls(initial, time, mu, sigma) LE, LSD = ls(initial, time, mu, sigma) interval = conint(LE, LSD, per) p = p(value, LE, LSD) print("\n") print("S gives that the mean and the standa...
28.959184
104
0.615927
import numpy as np import math from sympy import * import scipy.stats as stats def dts(initial, time, mu, sigma): e=initial*exp(mu*time) s=sigma*initial*sqrt(time) return e, s def dtls(initial, time, mu, sigma): E=initial*exp(mu*time) V=(initial**2)*exp(2*mu*time)*(exp(time*sigma**2)-1) SD=sqr...
0
0
0
0
0
505
0
-15
181
0fec1aa4ec0e2fd65e4adb94526572c2e34f1a89
19,497
py
Python
pixel_battle/pixel_battle/grabber.py
andreymal/stuff
33f9c7c80efc29b29fb0e14116eb641f53e45ccc
[ "MIT" ]
9
2017-12-07T21:28:07.000Z
2020-10-11T17:29:55.000Z
pixel_battle/pixel_battle/grabber.py
andreymal/stuff
33f9c7c80efc29b29fb0e14116eb641f53e45ccc
[ "MIT" ]
null
null
null
pixel_battle/pixel_battle/grabber.py
andreymal/stuff
33f9c7c80efc29b29fb0e14116eb641f53e45ccc
[ "MIT" ]
3
2019-10-11T10:07:05.000Z
2020-01-27T21:05:15.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import argparse from typing import Optional, TextIO default_url = "https://pixel-dev.w84.vkforms.ru/api/data" default_top_url = "https://pixel-dev.w84.vkforms.ru/api/top" user_agent = "Mozilla/5.0; pixel_battle/0.3.4 (grabber; https://github.com/andreymal/stuf...
35.12973
163
0.607888
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import json import time import argparse import traceback from io import BytesIO from datetime import datetime from urllib.request import Request, urlopen from typing import Any, Optional, Tuple, List, Dict, TextIO import dataclasses from dataclasses i...
3,184
1,691
0
0
0
15,190
0
25
429
2d1781726f04278b58acad2956f2d29450d4200a
404
py
Python
Earlyatesting2.py
SukhatankarSV/AutoNavigator
11eb9fd6e93adc6653dd89cc0faf841864e68792
[ "MIT" ]
null
null
null
Earlyatesting2.py
SukhatankarSV/AutoNavigator
11eb9fd6e93adc6653dd89cc0faf841864e68792
[ "MIT" ]
null
null
null
Earlyatesting2.py
SukhatankarSV/AutoNavigator
11eb9fd6e93adc6653dd89cc0faf841864e68792
[ "MIT" ]
null
null
null
from serial import Serial import time arduino = Serial('COM3', 9600) time.sleep(5) print("value1") arduino.write(b'forward_on\n') time.sleep(2) print("value1") arduino.write(b'forward_off\n') time.sleep(2) print("value1") arduino.write(b'forward_off\n') time.sleep(2) arduino.write(b'forward_off\n') time.s...
21.263158
32
0.732673
from serial import Serial import requests from PIL import Image from io import BytesIO import time import uuid arduino = Serial('COM3', 9600) time.sleep(5) print("value1") arduino.write(b'forward_on\n') time.sleep(2) print("value1") arduino.write(b'forward_off\n') time.sleep(2) print("value1") arduino.wr...
0
0
0
0
0
0
0
-15
92
5c9de1151ba6139d004514c7e389d1980978055d
2,798
py
Python
cgi-bin/audio.py
sugar-activities/4430-activity
3d6b804347778ea1eba91611dd782e483860f30e
[ "MIT" ]
null
null
null
cgi-bin/audio.py
sugar-activities/4430-activity
3d6b804347778ea1eba91611dd782e483860f30e
[ "MIT" ]
null
null
null
cgi-bin/audio.py
sugar-activities/4430-activity
3d6b804347778ea1eba91611dd782e483860f30e
[ "MIT" ]
null
null
null
#!/usr/bin/python import os, sys from subprocess import call, Popen, PIPE import cgi, cgitb from path import path from sugar.datastore import datastore html = "<li id=xxxx onclick=manageAudio('xxxx','yyyy')>" html = html+"<p>xxxx</p></li>" ogg_types = ['audio/ogg'] #script to insert audio clip in activity - source.tx...
34.54321
87
0.598999
#!/usr/bin/python import os, sys from subprocess import call, Popen, PIPE import cgi, cgitb from path import path from sugar.datastore import datastore html = "<li id=xxxx onclick=manageAudio('xxxx','yyyy')>" html = html+"<p>xxxx</p></li>" ogg_types = ['audio/ogg'] #script to insert audio clip in activity - source.tx...
0
0
0
0
0
0
0
0
0
11ff0858c1f1b427fedd73a555ad08d55100cadf
692
py
Python
demo/celery.py
StitiFatah/Django_Rest_Framework_BoilerPlate
19e3fe41027853c0e491bdf97acb89c10c2ab0b4
[ "MIT" ]
null
null
null
demo/celery.py
StitiFatah/Django_Rest_Framework_BoilerPlate
19e3fe41027853c0e491bdf97acb89c10c2ab0b4
[ "MIT" ]
null
null
null
demo/celery.py
StitiFatah/Django_Rest_Framework_BoilerPlate
19e3fe41027853c0e491bdf97acb89c10c2ab0b4
[ "MIT" ]
null
null
null
#from __future__ import absolute_import, unicode_literals #import os #from celery import Celery # set the default Django settings module for the 'celery' program. # os.environ.setdefault('DJANGO_SETTINGS_MODULE', # 'django-news-aggreg.settings.base') # app = Celery('django-news-aggreg') # Us...
26.615385
68
0.745665
#from __future__ import absolute_import, unicode_literals #import os #from celery import Celery # set the default Django settings module for the 'celery' program. # os.environ.setdefault('DJANGO_SETTINGS_MODULE', # 'django-news-aggreg.settings.base') # app = Celery('django-news-aggreg') # Us...
0
0
0
0
0
0
0
0
0
c9f494a45c0be4de80eb1b9fbf1895a4cb8109dc
2,097
py
Python
packages/syft/src/syft/core/tensor/smpc/utils.py
vishalbelsare/PySyft
fb04404fcfbef82fad1fb47407b35a24e9afb599
[ "Apache-1.1" ]
8,428
2017-08-10T09:17:49.000Z
2022-03-31T08:20:14.000Z
packages/syft/src/syft/core/tensor/smpc/utils.py
Starry1024/PySyft
6b2cb4ca3a54e8bb2e61d549bf7773aa955d7468
[ "Apache-2.0" ]
4,779
2017-08-09T23:19:00.000Z
2022-03-29T11:49:36.000Z
packages/syft/src/syft/core/tensor/smpc/utils.py
Starry1024/PySyft
6b2cb4ca3a54e8bb2e61d549bf7773aa955d7468
[ "Apache-2.0" ]
2,307
2017-08-10T08:52:12.000Z
2022-03-30T05:36:07.000Z
"""Utils functions that might be used into any module.""" # stdlib from typing import Any from typing import Dict # third party import numpy as np RING_SIZE_TO_TYPE: Dict[int, np.dtype] = { 2 ** 32: np.dtype("int32"), 2: np.dtype("bool"), # Special case: need to do reconstruct and share with XOR } TYPE_TO_...
23.561798
86
0.634239
"""Utils functions that might be used into any module.""" # stdlib from functools import lru_cache import operator from typing import Any from typing import Dict from typing import Tuple from typing import cast # third party import numpy as np RING_SIZE_TO_TYPE: Dict[int, np.dtype] = { 2 ** 32: np.dtype("int32")...
0
1,204
0
0
0
0
0
9
157
677fc3d4c8cbf6227daa00b887073cacdc70c189
3,292
py
Python
xwing/network/connection.py
victorpoluceno/xwing
a6d2b9ddfa1bdf383cbf52d4dc81035222ebeefa
[ "ISC" ]
12
2016-10-15T16:46:24.000Z
2018-12-04T16:57:48.000Z
xwing/network/connection.py
victorpoluceno/xwing
a6d2b9ddfa1bdf383cbf52d4dc81035222ebeefa
[ "ISC" ]
44
2016-04-21T21:59:37.000Z
2016-10-22T16:16:09.000Z
xwing/network/connection.py
victorpoluceno/xwing
a6d2b9ddfa1bdf383cbf52d4dc81035222ebeefa
[ "ISC" ]
2
2016-08-22T04:25:21.000Z
2020-12-03T20:55:30.000Z
import logging log = logging.getLogger(__name__) EOL = b'\n' HEARTBEAT = b'HEARTBEAT' HEARTBEAT_SIGNAL = b'HEARTBEAT_SIGNAL' HEARTBEAT_ACK = b'HEARTBEAT_ACK' INITIAL_HEARBEAT_LIVENESS = 3 connection_map = { 'real': Connection, }
27.663866
77
0.611482
import asyncio import time import logging log = logging.getLogger(__name__) from xwing.exceptions import HeartbeatFailureError, ConnectionAlreadyExists EOL = b'\n' HEARTBEAT = b'HEARTBEAT' HEARTBEAT_SIGNAL = b'HEARTBEAT_SIGNAL' HEARTBEAT_ACK = b'HEARTBEAT_ACK' INITIAL_HEARBEAT_LIVENESS = 3 class Repository: d...
0
0
1,603
1,240
0
36
0
37
136
dae5d7876b3b59b44e5689bea9952dd0d3ca995f
239
py
Python
dgp/src/data_generation_exceptions.py
ccclab-bigdata/cdml-neurips2020
85d4810aa630e4ce57acc75244b4508d09ea4b94
[ "BSD-3-Clause" ]
38
2020-12-06T14:14:07.000Z
2022-02-24T08:16:33.000Z
dgp/src/data_generation_exceptions.py
ccclab-bigdata/cdml-neurips2020
85d4810aa630e4ce57acc75244b4508d09ea4b94
[ "BSD-3-Clause" ]
null
null
null
dgp/src/data_generation_exceptions.py
ccclab-bigdata/cdml-neurips2020
85d4810aa630e4ce57acc75244b4508d09ea4b94
[ "BSD-3-Clause" ]
10
2020-12-21T19:26:16.000Z
2022-02-23T09:17:42.000Z
""" Copyright (c) 2020 by Impulse Innovations Ltd. Private and confidential. Part of the causaLens product. """
29.875
103
0.736402
""" Copyright (c) 2020 by Impulse Innovations Ltd. Private and confidential. Part of the causaLens product. """ class DataGenerationException(Exception): """ Raised when the data generation fails, e.g., produces non-finite data. """
0
0
0
103
0
0
0
0
23
169b865b214403cdc18c28e26bebfe3325e18c0a
2,489
py
Python
cupy/_manipulation/basic.py
twmht/cupy
1f518ec72672ad35af59c4af9fd7243c785fdbce
[ "MIT" ]
null
null
null
cupy/_manipulation/basic.py
twmht/cupy
1f518ec72672ad35af59c4af9fd7243c785fdbce
[ "MIT" ]
null
null
null
cupy/_manipulation/basic.py
twmht/cupy
1f518ec72672ad35af59c4af9fd7243c785fdbce
[ "MIT" ]
null
null
null
import numpy from cupy import _core from cupy._core import _fusion_interface from cupy._core import fusion from cupy._sorting import search from cupy_backends.cuda.api import runtime def copyto(dst, src, casting='same_kind', where=None): """Copies values from one array to another with broadcasting. This fun...
30.728395
78
0.650462
import numpy from cupy import _core from cupy._core import _fusion_interface from cupy._core import fusion from cupy._sorting import search from cupy_backends.cuda.api import runtime def copyto(dst, src, casting='same_kind', where=None): """Copies values from one array to another with broadcasting. This fun...
0
0
0
0
0
247
0
0
23
a5932eb843c4058d794406b2c0a5189f07330790
1,782
py
Python
examples/example_rep.py
fengjixuchui/microx
c17171ebf63315438d58b31e7b29e326fa084cec
[ "Apache-2.0" ]
78
2017-01-05T23:17:53.000Z
2019-10-10T14:51:16.000Z
examples/example_rep.py
fengjixuchui/microx
c17171ebf63315438d58b31e7b29e326fa084cec
[ "Apache-2.0" ]
17
2020-02-02T16:00:46.000Z
2021-09-26T17:40:39.000Z
examples/example_rep.py
fengjixuchui/microx
c17171ebf63315438d58b31e7b29e326fa084cec
[ "Apache-2.0" ]
10
2017-04-02T20:11:56.000Z
2019-06-25T15:36:01.000Z
#!/usr/bin/env python3 # Copyright (c) 2019 Trail of Bits, Inc., all rights reserved. import microx import traceback if __name__ == "__main__": # Disassembly: # lea edi, [esp - 32] # mov eax, 0x41 # mov ecx, 32 # rep stosb # # lea esi, [esp - 32] # lea edi, [esp - 64] # mov ecx, 3...
27.84375
220
0.571829
#!/usr/bin/env python3 # Copyright (c) 2019 Trail of Bits, Inc., all rights reserved. import microx import traceback if __name__ == "__main__": # Disassembly: # lea edi, [esp - 32] # mov eax, 0x41 # mov ecx, 32 # rep stosb # # lea esi, [esp - 32] # lea edi, [esp - 64] # mov ecx, 3...
0
0
0
0
0
0
0
0
0
23e36fe27ede98afdfcda44c883230516d6969de
1,824
py
Python
card.py
darshu-kheni/Card-Deliver
899e101b6d1fce8434ab71ce0d223fad76a92cda
[ "CC0-1.0" ]
1
2020-05-21T06:34:52.000Z
2020-05-21T06:34:52.000Z
card.py
darshu-kheni/Card-Deliver
899e101b6d1fce8434ab71ce0d223fad76a92cda
[ "CC0-1.0" ]
null
null
null
card.py
darshu-kheni/Card-Deliver
899e101b6d1fce8434ab71ce0d223fad76a92cda
[ "CC0-1.0" ]
null
null
null
# ------------------------------------- This is Created by Darshan R Kheni ------------------------------------- # # ---------------------------------------------------- Enjoy --------------------------------------------------- # deck = Deck() # creating object of Deck class shuffled = deck.shuffle() ...
24.986301
115
0.474232
# ------------------------------------- This is Created by Darshan R Kheni ------------------------------------- # # ---------------------------------------------------- Enjoy --------------------------------------------------- # import random class Card(object): def __init__(self, shape, val): ...
0
0
0
1,276
0
0
0
-8
100
6b6e37634752262ba425a8bb676b0275e3b48ea4
2,056
py
Python
merge-k-sorted-lists.py
kwanhur/leetcode
62c297ce16c3c622d4d3740906362deda54abe0c
[ "MIT" ]
null
null
null
merge-k-sorted-lists.py
kwanhur/leetcode
62c297ce16c3c622d4d3740906362deda54abe0c
[ "MIT" ]
null
null
null
merge-k-sorted-lists.py
kwanhur/leetcode
62c297ce16c3c622d4d3740906362deda54abe0c
[ "MIT" ]
null
null
null
#! /usr/bin/env python # _*_ coding:utf-8 _*_ if __name__ == '__main__': so = Solution() test([genList([1, 4, 5]), genList([1, 3, 4]), genList([2, 6])]) test([genList([]), genList([1, 3, 4]), genList([])]) test([genList([1, 4, 5]), genList([]), genList([6])]) test([genList([]), genList([])...
21.642105
67
0.412451
#! /usr/bin/env python # _*_ coding:utf-8 _*_ class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): def mergeKLists(self, lists): if not lists: return ret = [] for l in lists: while l: ...
0
0
0
1,240
0
312
0
0
119
419acf5e412d7d59980237790c825a06e536c0b4
1,152
py
Python
topics/admin.py
mblacklock/sohkahtoa
89623b436dc1adf482308f22aa1eba81db343fde
[ "MIT" ]
null
null
null
topics/admin.py
mblacklock/sohkahtoa
89623b436dc1adf482308f22aa1eba81db343fde
[ "MIT" ]
null
null
null
topics/admin.py
mblacklock/sohkahtoa
89623b436dc1adf482308f22aa1eba81db343fde
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from topics.models import Subtopic, Topic, Year # Register your models here. admin.site.register(Year, YearAdmin) admin.site.register(Topic, TopicAdmin) admin.site.register(Subtopic, SubtopicAdmin)
26.181818
73
0.684028
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from topics.models import Subtopic, Topic, Year # Register your models here. class TopicInline(admin.TabularInline): model = Topic extra = 0 prepopulated_fields = {'slug':('name',)} class SubtopicInline(adm...
0
0
0
738
0
0
0
0
115
5c1b887296769375f7adb990a627fde27621f260
2,202
py
Python
ex_study_nonces2.py
robertsdotpm/rand
5a551e25fff9b183a197f44f1ecc542ba95648cc
[ "Unlicense" ]
2
2020-06-04T10:51:50.000Z
2021-05-05T03:55:09.000Z
ex_study_nonces2.py
robertsdotpm/rand
5a551e25fff9b183a197f44f1ecc542ba95648cc
[ "Unlicense" ]
null
null
null
ex_study_nonces2.py
robertsdotpm/rand
5a551e25fff9b183a197f44f1ecc542ba95648cc
[ "Unlicense" ]
null
null
null
import seaborn as sns sns.set_theme(color_codes=True) tips = sns.load_dataset("tips") print(tips.to_dict()) """ x = { "col_name": { "row index": value, "row index + 1": value } } """ exit() freq_table_a = {} freq_table_b = {} cpow = CPoW() for n in range(0, 1): nonce_info = [] cpow.fingerprint = None ...
19.486726
100
0.609446
from params import * from utils import * from shared_pow import * from compress import * import numpy as np import seaborn as sns import matplotlib.pyplot as plt sns.set_theme(color_codes=True) tips = sns.load_dataset("tips") print(tips.to_dict()) """ x = { "col_name": { "row index": value, "row index + 1": va...
0
0
0
0
0
0
0
8
133
d64f553fc49df205944bf28d9d5e675d4ac345a7
1,690
py
Python
stacks/XIAOMATECH/1.0/services/JIRA/package/scripts/confluence.py
tvorogme/dataops
acfa21df42a20768c004c6630a064f4e38e280b2
[ "Apache-2.0" ]
3
2019-08-13T01:44:16.000Z
2019-12-10T04:05:56.000Z
stacks/XIAOMATECH/1.0/services/JIRA/package/scripts/confluence.py
tvorogme/dataops
acfa21df42a20768c004c6630a064f4e38e280b2
[ "Apache-2.0" ]
null
null
null
stacks/XIAOMATECH/1.0/services/JIRA/package/scripts/confluence.py
tvorogme/dataops
acfa21df42a20768c004c6630a064f4e38e280b2
[ "Apache-2.0" ]
7
2019-05-29T17:35:25.000Z
2021-12-04T07:55:10.000Z
if __name__ == "__main__": Confluence().execute()
31.296296
93
0.697041
from resource_management.core.resources.system import Execute from resource_management.libraries.script import Script from resource_management.core.resources.system import File from resource_management.core.source import InlineTemplate from resource_management.core.resources.system import Directory from resource_manage...
0
0
0
872
0
309
0
250
201
d14c61706fde4ffed109e8cdffef8b481aed62d5
152
py
Python
python/exercicios mundo 1/ex003/ex002.py
LEXW3B/PYTHON
1ae54ea709c008bd7fab7602e034773610e7985e
[ "MIT" ]
1
2022-01-05T08:51:16.000Z
2022-01-05T08:51:16.000Z
python/exercicios mundo 1/ex003/ex002.py
LEXW3B/PYTHON
1ae54ea709c008bd7fab7602e034773610e7985e
[ "MIT" ]
null
null
null
python/exercicios mundo 1/ex003/ex002.py
LEXW3B/PYTHON
1ae54ea709c008bd7fab7602e034773610e7985e
[ "MIT" ]
null
null
null
n1 = int(input('digite um numero: ')) print('o sucessor do seu numero {}'.format(n1 + 1)) print('o antecessor do seu numero {}'.format(n1 - 1))
38
55
0.631579
n1 = int(input('digite um numero: ')) print('o sucessor do seu numero é {}'.format(n1 + 1)) print('o antecessor do seu numero é {}'.format(n1 - 1))
4
0
0
0
0
0
0
0
0
23973175b75d9ce5c3e54a40b802637595910f9b
117
py
Python
Desafio112.py
VictorCastao/Curso-em-Video-Python
aeee8baaa73c04b839a27ae37ba24ecc0b863075
[ "MIT" ]
null
null
null
Desafio112.py
VictorCastao/Curso-em-Video-Python
aeee8baaa73c04b839a27ae37ba24ecc0b863075
[ "MIT" ]
null
null
null
Desafio112.py
VictorCastao/Curso-em-Video-Python
aeee8baaa73c04b839a27ae37ba24ecc0b863075
[ "MIT" ]
null
null
null
from utilidadesCeV import dados, moeda num = dados.leiaDinheiro('Digite o nmero: ') moeda.resumo('R$', num, 10, 10)
29.25
45
0.726496
from utilidadesCeV import dados, moeda num = dados.leiaDinheiro('Digite o número: ') moeda.resumo('R$', num, 10, 10)
2
0
0
0
0
0
0
0
0
08272d7e3a10d80bca8788a7d2ae1e1ea9526be1
104
py
Python
filter_plugins/filter_functions/string_utils.py
vardaofthevalier/ansible-examples
195f8adfee16a6214b265942cc8272fa51da73d3
[ "MIT" ]
null
null
null
filter_plugins/filter_functions/string_utils.py
vardaofthevalier/ansible-examples
195f8adfee16a6214b265942cc8272fa51da73d3
[ "MIT" ]
null
null
null
filter_plugins/filter_functions/string_utils.py
vardaofthevalier/ansible-examples
195f8adfee16a6214b265942cc8272fa51da73d3
[ "MIT" ]
null
null
null
# split a string by the given separator
34.666667
39
0.769231
# split a string by the given separator def split(string, separator): return string.split(separator)
0
0
0
0
0
43
0
0
22
fb0074a00736a1bf6d003c817076fbb514d44c3b
4,712
py
Python
src/media/tools/movies/namelist.py
cjcodeproj/medialibrary
466ba475561f7701fe41ebe196aaf789a0aa7237
[ "MIT" ]
null
null
null
src/media/tools/movies/namelist.py
cjcodeproj/medialibrary
466ba475561f7701fe41ebe196aaf789a0aa7237
[ "MIT" ]
29
2021-09-06T00:46:30.000Z
2022-03-23T16:47:04.000Z
src/media/tools/movies/namelist.py
cjcodeproj/medialibrary
466ba475561f7701fe41ebe196aaf789a0aa7237
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Module to report on all named within a movie ''' # pylint: disable=R0801 import os import argparse from media.tools.common import (load_media_dev, compile_movies, random_sample_list) def extract_from_list(in_dict, in_crew_job, in_job_title, in_movie_title): ''' Extract the name of...
32.054422
78
0.546265
#!/usr/bin/env python ''' Module to report on all named within a movie ''' # pylint: disable=R0801 import os import argparse from media.tools.common import ( load_media_dev, compile_movies, random_sample_list ) class NameJobTitleMap(): '''Crewname object that lists every job role in every title....
0
258
0
1,347
0
0
0
18
23
5eabe108f60196928356261e0840e6b29955ab7e
8,206
py
Python
training/loss_control.py
bruinxiong/DisentangledFaceGAN
625e2077493fdc96bcab6105fc4b39185dd820ad
[ "MIT" ]
200
2020-04-24T11:25:36.000Z
2020-09-03T19:40:49.000Z
training/loss_control.py
bruinxiong/DisentangledFaceGAN
625e2077493fdc96bcab6105fc4b39185dd820ad
[ "MIT" ]
12
2020-06-10T01:54:25.000Z
2020-08-04T09:54:44.000Z
training/loss_control.py
bruinxiong/DisentangledFaceGAN
625e2077493fdc96bcab6105fc4b39185dd820ad
[ "MIT" ]
25
2020-04-28T23:33:09.000Z
2020-08-19T01:12:10.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # Losses for imitative and contrastive learning #--------------------------------------------------------------------------- #---------------------------------------------------------------------------- # Imitative losses # L1 loss between ren...
40.623762
139
0.703753
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # Losses for imitative and contrastive learning import tensorflow as tf from dnnlib.tflib.autosummary import autosummary from training.networks_recon import R_Net from training.networks_id import Perceptual_Net from training.networks_parser impor...
0
0
0
0
0
6,879
0
95
376
8ab85b73de75771fb44d5c972a2fa11e3c439597
9,647
py
Python
tests/test_api.py
ronanmu/enigma2.py
768207655c7aa90a6a241a9a8cc7826f7235fc89
[ "MIT" ]
null
null
null
tests/test_api.py
ronanmu/enigma2.py
768207655c7aa90a6a241a9a8cc7826f7235fc89
[ "MIT" ]
null
null
null
tests/test_api.py
ronanmu/enigma2.py
768207655c7aa90a6a241a9a8cc7826f7235fc89
[ "MIT" ]
null
null
null
""" tests.test_api ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the api Copyright (c) 2018 Ronan Murray <https://github.com/ronanmu> Licensed under the MIT license. """ # pylint: disable=protected-access # def test_get_picon_name(self): # self.assertEqual(enigma2.api.Engima2Device.get_picon_name('RT One'), ...
39.699588
117
0.670157
""" tests.test_api ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the api Copyright (c) 2018 Ronan Murray <https://github.com/ronanmu> Licensed under the MIT license. """ # pylint: disable=protected-access import os, sys import unittest import requests_mock from tests.sample_responses import (SAMPLE_ABOUT, SAMPLE_STATUS_I...
2
7,030
0
1,304
0
0
0
298
183
c40d8976343960d99429363f61dd841f3cd708b5
309
py
Python
seedstar_django_challenge/task1/models.py
sisqology/seedstar_django_challenge
83062eede010a12e06619e8e8c4adcdab0c89a80
[ "MIT" ]
null
null
null
seedstar_django_challenge/task1/models.py
sisqology/seedstar_django_challenge
83062eede010a12e06619e8e8c4adcdab0c89a80
[ "MIT" ]
null
null
null
seedstar_django_challenge/task1/models.py
sisqology/seedstar_django_challenge
83062eede010a12e06619e8e8c4adcdab0c89a80
[ "MIT" ]
1
2018-03-06T07:57:17.000Z
2018-03-06T07:57:17.000Z
from __future__ import unicode_literals
30.9
56
0.779935
from __future__ import unicode_literals from django.db import models class Users(models.Model): name = models.CharField(max_length=200) email = models.CharField(max_length=60, unique=True) created_at = models.DateTimeField(auto_now=True) updated_at = models.DateTimeField(auto_now_add=True)
0
0
0
216
0
0
0
7
46
5bc753484ef237bb15ac19e05082e4a5b61dd2a8
1,317
py
Python
python_new/test.py
ikim-quantum/Jabc
e98278ecb5daa7f239daadf573a2de36997aa644
[ "MIT" ]
null
null
null
python_new/test.py
ikim-quantum/Jabc
e98278ecb5daa7f239daadf573a2de36997aa644
[ "MIT" ]
null
null
null
python_new/test.py
ikim-quantum/Jabc
e98278ecb5daa7f239daadf573a2de36997aa644
[ "MIT" ]
null
null
null
import numpy as np from Jabc import Jabc, Jabc2 import matplotlib.pyplot as plt omega = np.exp(np.pi * 1j * 2 / 3) r = (np.sqrt(3)+1) / (np.sqrt(3)-1) # 4 qubits zs = [1, omega, omega**2, 0] zs_A = [zs[0]] zs_B = [zs[1]] zs_C = [zs[2]] zs_D = [zs[3]] X = [z.real for z in zs] Y = [z.imag for z in zs] color= ["red", "...
24.849057
109
0.596052
import numpy as np from Jabc import Jabc, Jabc2 import matplotlib.pyplot as plt omega = np.exp(np.pi * 1j * 2 / 3) r = (np.sqrt(3)+1) / (np.sqrt(3)-1) # 4 qubits zs = [1, omega, omega**2, 0] zs_A = [zs[0]] zs_B = [zs[1]] zs_C = [zs[2]] zs_D = [zs[3]] X = [z.real for z in zs] Y = [z.imag for z in zs] color= ["red", "...
0
0
0
0
0
0
0
0
0
17573c7cb4b240abc792479a39c0e9f4a5b0fc59
5,571
py
Python
tests/hydropper/testcases/microvm/functional/test_microvm_cpu_features.py
ican2002/stratorvirt
b8e9b675ae0fac9e359a2096cc818f92c4f11c30
[ "MulanPSL-1.0" ]
66
2020-10-27T02:48:24.000Z
2022-03-05T14:24:08.000Z
tests/hydropper/testcases/microvm/functional/test_microvm_cpu_features.py
ican2002/stratorvirt
b8e9b675ae0fac9e359a2096cc818f92c4f11c30
[ "MulanPSL-1.0" ]
null
null
null
tests/hydropper/testcases/microvm/functional/test_microvm_cpu_features.py
ican2002/stratorvirt
b8e9b675ae0fac9e359a2096cc818f92c4f11c30
[ "MulanPSL-1.0" ]
9
2020-12-27T08:06:04.000Z
2022-02-22T11:28:34.000Z
# Copyright (c) 2021 Huawei Technologies Co.,Ltd. All rights reserved. # # StratoVirt is licensed under Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan # PSL v2. # You may obtain a copy of Mulan PSL v2 at: # http:#license.coscl.org.cn/MulanPSL2 # THIS SOFTWARE IS PRO...
31.653409
106
0.639024
# Copyright (c) 2021 Huawei Technologies Co.,Ltd. All rights reserved. # # StratoVirt is licensed under Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan # PSL v2. # You may obtain a copy of Mulan PSL v2 at: # http:#license.coscl.org.cn/MulanPSL2 # THIS SOFTWARE IS PRO...
0
1,999
0
66
0
2,470
0
-26
272
b4269c0f1ab95d847b0c15ce1d9198abf3bb16db
1,899
py
Python
config.py
ShubinZhang/Non-contact-optical-thermometry
c73746bc7e1914b28b52eb744121ea2d0e735238
[ "MIT" ]
null
null
null
config.py
ShubinZhang/Non-contact-optical-thermometry
c73746bc7e1914b28b52eb744121ea2d0e735238
[ "MIT" ]
null
null
null
config.py
ShubinZhang/Non-contact-optical-thermometry
c73746bc7e1914b28b52eb744121ea2d0e735238
[ "MIT" ]
null
null
null
#Settings for up-conversion thermometry setting_dict_upconversion = { #Instrument connection setting "chromex_port": 1, #spectrometer port number "filter_wheel": 2, #filter wheel port number "shutter_port": 3, #shutter port number "shutter_line": 1, #shutter line number #Measuremnt setting...
45.214286
78
0.662454
#Settings for up-conversion thermometry setting_dict_upconversion = { #Instrument connection setting "chromex_port": 1, #spectrometer port number "filter_wheel": 2, #filter wheel port number "shutter_port": 3, #shutter port number "shutter_line": 1, #shutter line number #Measuremnt setting...
0
0
0
0
0
0
0
0
0
a89e08a73614c215c6993e4412c2fb48ad4c666d
1,271
py
Python
fastapi_mvc/cli/cli.py
rszamszur/fastapi-mvc
98670eda3b485cfe25850773dcc1ae7ae5feced9
[ "MIT" ]
98
2021-12-21T18:45:07.000Z
2022-03-27T08:48:37.000Z
fastapi_mvc/cli/cli.py
rszamszur/fastapi-mvc
98670eda3b485cfe25850773dcc1ae7ae5feced9
[ "MIT" ]
48
2021-12-21T16:06:56.000Z
2022-03-26T17:28:57.000Z
fastapi_mvc/cli/cli.py
rszamszur/fastapi-mvc
98670eda3b485cfe25850773dcc1ae7ae5feced9
[ "MIT" ]
16
2022-01-05T14:21:50.000Z
2022-02-13T17:55:07.000Z
"""Command-line interface - root.""" import sys from fastapi_mvc.cli.new import get_new_cmd from fastapi_mvc.cli.run import run from fastapi_mvc.cli.generate import get_generate_cmd from fastapi_mvc.utils import global_except_hook sys.excepthook = global_except_hook cmd_help = """\ Developer productivity tool for mak...
21.913793
79
0.667191
"""Command-line interface - root.""" import logging import sys import click from fastapi_mvc.cli.new import get_new_cmd from fastapi_mvc.cli.run import run from fastapi_mvc.cli.generate import get_generate_cmd from fastapi_mvc.utils import global_except_hook sys.excepthook = global_except_hook cmd_help = """\ Develo...
0
658
0
0
0
0
0
-16
68
7fef6626ed00bdd9afdf4780c00e049c2cb6c56f
11,146
py
Python
src/python/module/nifty/graph/__init__.py
DerThorsten/n3p
c4bd4cd90f20e68f0dbd62587aba28e4752a0ac1
[ "MIT" ]
38
2016-06-29T07:42:50.000Z
2021-12-09T09:25:25.000Z
src/python/module/nifty/graph/__init__.py
tbullmann/nifty
00119fd4753817b931272d6d3120b6ebd334882a
[ "MIT" ]
62
2016-07-27T16:07:53.000Z
2022-03-30T17:24:36.000Z
src/python/module/nifty/graph/__init__.py
tbullmann/nifty
00119fd4753817b931272d6d3120b6ebd334882a
[ "MIT" ]
20
2016-01-25T21:21:52.000Z
2021-12-09T09:25:16.000Z
# sphinx_gallery_thumbnail_number = 4 from __future__ import absolute_import from . import _graph as __graph from .. import Configuration from . opt import multicut from . opt import lifted_multicut from . opt import mincut from . opt import minstcut import numpy __all__ = [] for key in __graph.__dict__.keys(): ...
37.402685
125
0.686524
# sphinx_gallery_thumbnail_number = 4 from __future__ import absolute_import from . import _graph as __graph from ._graph import * from .. import Configuration from . import opt from . opt import multicut from . opt import lifted_multicut from . opt import mincut from . opt import minstcut import numpy from functool...
0
0
0
613
0
1,396
0
-16
248
d1393c2324bc494a3207530948291a814300da08
371
py
Python
tests/test_01.py
crawles/tdd_python_examples
d58b167af046d73ca99e7aa7356513feaaa072af
[ "MIT" ]
null
null
null
tests/test_01.py
crawles/tdd_python_examples
d58b167af046d73ca99e7aa7356513feaaa072af
[ "MIT" ]
null
null
null
tests/test_01.py
crawles/tdd_python_examples
d58b167af046d73ca99e7aa7356513feaaa072af
[ "MIT" ]
1
2018-08-02T15:43:21.000Z
2018-08-02T15:43:21.000Z
import sys sys.path.insert(0, '../examples')
20.611111
41
0.641509
import sys sys.path.insert(0, '../examples') from compare_lists import lists_equal class TestListsEqual: def test_empty_list(self): assert lists_equal([],[]) def test_1ele(self): assert lists_equal([1],[1]) def test_1_2ele(self): assert not lists_equal([1],[1,2]) def test_1...
0
0
0
265
0
0
0
16
46
b82a0215b89eb5ec8b20f1230e05dd1747244585
969
py
Python
moztrap/model/tags/models.py
mbeko/moztrap
db75e1f8756ef2c0c39652a66302b19c8afa0256
[ "BSD-2-Clause" ]
null
null
null
moztrap/model/tags/models.py
mbeko/moztrap
db75e1f8756ef2c0c39652a66302b19c8afa0256
[ "BSD-2-Clause" ]
null
null
null
moztrap/model/tags/models.py
mbeko/moztrap
db75e1f8756ef2c0c39652a66302b19c8afa0256
[ "BSD-2-Clause" ]
null
null
null
""" Models for tags. """
26.189189
76
0.654283
""" Models for tags. """ from django.db import models from ..mtmodel import MTModel from ..core.models import Product class Tag(MTModel): """A tag.""" name = models.CharField(db_index=True, max_length=100) description = models.TextField(blank=True) # tags may be product-specific or global (in whic...
0
0
0
824
0
0
0
27
90
35d4a22b5cd2ba07a4f7fdd466a6611c9b94adee
1,971
py
Python
scripts/transform2.py
zhongguotu/ecs289c-precimonious
2c33f99eef616de9ffa5edc4c6e37ff09760ce6b
[ "BSD-3-Clause" ]
null
null
null
scripts/transform2.py
zhongguotu/ecs289c-precimonious
2c33f99eef616de9ffa5edc4c6e37ff09760ce6b
[ "BSD-3-Clause" ]
null
null
null
scripts/transform2.py
zhongguotu/ecs289c-precimonious
2c33f99eef616de9ffa5edc4c6e37ff09760ce6b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Transform the bitcode file with the given configuration return 1 bitcode file is valid, threshold satisfied 0 bitcode file is invalid, threshold not satisfied -1 LLVM transformation passes failure -3 modified bitcode file execution failure """
30.796875
78
0.624049
#!/usr/bin/env python import os import platform import sys from subprocess import call """ Transform the bitcode file with the given configuration return 1 bitcode file is valid, threshold satisfied 0 bitcode file is invalid, threshold not satisfied -1 LLVM transformation passes failure -3 m...
0
0
0
0
0
1,584
0
-23
112
d5006a8f1aad2991e184ad4a3cb210146f3adbdd
2,594
py
Python
DataStructure/ArrayDeque.py
flyinglandlord/BUAA-SAE-DataStructure-2021
7eb686465b18b125115e03b39e6d83e4ed7a30cb
[ "MIT" ]
2
2022-03-31T01:43:24.000Z
2022-03-31T02:05:14.000Z
DataStructure/ArrayDeque.py
flyinglandlord/BUAA-SAE-DataStructure-2021
7eb686465b18b125115e03b39e6d83e4ed7a30cb
[ "MIT" ]
null
null
null
DataStructure/ArrayDeque.py
flyinglandlord/BUAA-SAE-DataStructure-2021
7eb686465b18b125115e03b39e6d83e4ed7a30cb
[ "MIT" ]
null
null
null
if __name__ == "__main__": D = ArrayDeque() D.add_last(5) print(D) D.add_first(3) print(D) D.add_first(7) print(D) D.delete_last() print(D) print(len(D)) D.delete_last() print(D) D.delete_last() print(D) D.add_first(6) print(D) D.add_first(8) pr...
24.704762
104
0.555898
from Exception import Empty class ArrayDeque: DEFAULT_CAPACITY = 2 def __init__(self): self._data = [None] * ArrayDeque.DEFAULT_CAPACITY self._front = 0 self._rear = 0 self._size = 0 self._capacity = ArrayDeque.DEFAULT_CAPACITY def is_empty(self): return ...
120
0
0
2,153
0
0
0
6
45
16a21fa95ceb80dd4e8fb07490374fbc59fce169
568
py
Python
examples/twoAxesOneCamera.py
chiluf/visvis.dev
373846ea25044b7ca50f44c63dab4248e14deacd
[ "BSD-3-Clause" ]
null
null
null
examples/twoAxesOneCamera.py
chiluf/visvis.dev
373846ea25044b7ca50f44c63dab4248e14deacd
[ "BSD-3-Clause" ]
null
null
null
examples/twoAxesOneCamera.py
chiluf/visvis.dev
373846ea25044b7ca50f44c63dab4248e14deacd
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ This example shows how to use the same camera for multiple axes, which can be helpful if for example the axes show a different view on the same data. """ import visvis as vv app = vv.use() # Read lena im1 = vv.imread('lena.png') # Our second image is a thresholded image im2 = im1 > 100 ...
18.322581
69
0.704225
#!/usr/bin/env python """ This example shows how to use the same camera for multiple axes, which can be helpful if for example the axes show a different view on the same data. """ import visvis as vv app = vv.use() # Read lena im1 = vv.imread('lena.png') # Our second image is a thresholded image im2 = im1 > 100 ...
0
0
0
0
0
0
0
0
0
1aa4d7f3bf801fec8dba4c8929bbd136a2c1edf3
2,926
py
Python
Image Segmentation/train.py
ShivamRajSharma/PyTorch
114537ebbae878a5522adcfe262f936fd9c2368d
[ "MIT" ]
5
2020-09-13T07:53:48.000Z
2021-12-03T12:53:05.000Z
Image Segmentation/train.py
ShivamRajSharma/PyTorch
114537ebbae878a5522adcfe262f936fd9c2368d
[ "MIT" ]
null
null
null
Image Segmentation/train.py
ShivamRajSharma/PyTorch
114537ebbae878a5522adcfe262f936fd9c2368d
[ "MIT" ]
1
2021-05-04T16:24:39.000Z
2021-05-04T16:24:39.000Z
import torch.nn as nn if __name__ == "__main__": run()
27.603774
147
0.644908
import CONFIG import UNet import engine import DataLoader import predict import numpy as np import os import torch import torch.nn as nn from sklearn.model_selection import train_test_split import albumentations as alb def run(): path = CONFIG.INPUT_PATH x_ray_image_names = os.listdir(path + '/CXR_png/') ...
0
0
0
0
0
2,644
0
-23
244
c31cb0bde2cde67f9a5a29f63c9ba7ffc3703880
7,225
py
Python
scripts/aws/server_option_parser.py
xhochy/cryptominisat
3bbc4b5463c1003139949ac98772ed8505b8928c
[ "MIT" ]
3
2019-02-07T11:23:56.000Z
2020-11-18T18:10:23.000Z
scripts/aws/server_option_parser.py
xhochy/cryptominisat
3bbc4b5463c1003139949ac98772ed8505b8928c
[ "MIT" ]
6
2020-06-05T14:42:46.000Z
2020-07-15T19:13:09.000Z
scripts/aws/server_option_parser.py
xhochy/cryptominisat
3bbc4b5463c1003139949ac98772ed8505b8928c
[ "MIT" ]
6
2020-06-05T13:32:05.000Z
2021-12-05T22:45:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2018 Mate Soos # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in th...
37.051282
130
0.602215
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2018 Mate Soos # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in th...
0
0
0
202
0
6,049
0
-34
134
545f49f9631b0d3152bc78528f7476a158b124d1
72,043
py
Python
pyNastran/bdf/cards/contact.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
1
2021-08-02T09:49:24.000Z
2021-08-02T09:49:24.000Z
pyNastran/bdf/cards/contact.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
null
null
null
pyNastran/bdf/cards/contact.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
null
null
null
""" Defines the following contact cards: nx contact: - BCONP - BLSEG - BCPARA - BCRPARA - BCTPARA - BCTADD - BCTSET - BSURF - BSURFS - BFRIC msc contact: - BCAUTOP (todo) - BCBDPRP (todo) - BCBMRAD (todo) - BCBODY (todo) - BCBODY1 (todo) - BCBZIER (todo) - BCGRID (todo) - BCHANGE (todo) - BCMATL ...
40.45087
120
0.498133
""" Defines the following contact cards: nx contact: - BCONP - BLSEG - BCPARA - BCRPARA - BCTPARA - BCTADD - BCTSET - BSURF - BSURFS - BFRIC msc contact: - BCAUTOP (todo) - BCBDPRP (todo) - BCBMRAD (todo) - BCBODY (todo) - BCBODY1 (todo) - BCBZIER (todo) - BCGRID (todo) - BCHANGE (todo) - BCMATL ...
42
41,074
0
28,866
0
0
0
288
415
56abe97fcbef72f22e5fbbed5afe130779d1e821
4,624
py
Python
img2code.py
ekinakyurek/lexsym
58e2261fd18812aef3a2c5b8796aba7522a61941
[ "MIT" ]
null
null
null
img2code.py
ekinakyurek/lexsym
58e2261fd18812aef3a2c5b8796aba7522a61941
[ "MIT" ]
null
null
null
img2code.py
ekinakyurek/lexsym
58e2261fd18812aef3a2c5b8796aba7522a61941
[ "MIT" ]
null
null
null
from absl import app, flags FLAGS = flags.FLAGS flags.DEFINE_string("modeltype", default='VQVAE', help='VAE, VQVAE, TODO: fix this flag for filter model') flags.DEFINE_string("imgsize", default='128,128', help='resize dimension for input images') if __name__ == "__main__"...
32.111111
98
0.500865
import os from absl import app, flags from seq2seq import hlog from torch.utils.data import DataLoader from tqdm import tqdm import options from src import utils from src.vqvae import VectorQuantizedVAE from src import parallel from src.datasets import get_data FLAGS = flags.FLAGS flags.DEFINE_string("modeltype",...
0
0
0
0
0
3,978
0
36
270
145d1f449e93f2d492a7505804e0b73d73912387
673
py
Python
utils/community/util/pre_data.py
logomanwolf/GServer
85467521df144608168f8004390e0a5294a654bd
[ "Apache-2.0" ]
null
null
null
utils/community/util/pre_data.py
logomanwolf/GServer
85467521df144608168f8004390e0a5294a654bd
[ "Apache-2.0" ]
4
2021-03-02T00:20:11.000Z
2022-03-03T22:44:45.000Z
utils/community/util/pre_data.py
logomanwolf/GServer
85467521df144608168f8004390e0a5294a654bd
[ "Apache-2.0" ]
null
null
null
groundTruth="E:/Download/social_network/email-Eu-core-department-labels.txt/email-Eu-core-department-labels.txt" edgeList="E:\Download\social_network\email-EuAll.txt\Email-EuAll.txt" if __name__ == "__main__": preData()
35.421053
112
0.695394
import numpy as np import networkx as nx groundTruth="E:/Download/social_network/email-Eu-core-department-labels.txt/email-Eu-core-department-labels.txt" edgeList="E:\Download\social_network\email-EuAll.txt\Email-EuAll.txt" def preData(): G=nx.read_edgelist(edgeList) size=len(nx.nodes(G)) edges=G.edges() ...
0
0
0
0
0
362
0
-3
91
b354366964326c28298b5df2359a7e3a90e05396
626
py
Python
Depreciated/Bridge/main.py
lightTuring/chess-ai
c22cfcdf6e7c8b464a33b7291b3143e878a7c6d3
[ "MIT" ]
6
2020-03-06T12:54:03.000Z
2020-12-27T15:08:44.000Z
Depreciated/Bridge/main.py
SageScroll18144/Last-chess-ai
b9567f1b0d52eb72ce05846f5e707f0f33aba1e0
[ "MIT" ]
null
null
null
Depreciated/Bridge/main.py
SageScroll18144/Last-chess-ai
b9567f1b0d52eb72ce05846f5e707f0f33aba1e0
[ "MIT" ]
2
2020-03-28T01:46:09.000Z
2020-09-21T19:01:33.000Z
import Client as client import communication_serial as little_board #it's just an example. Change please the name mainly for job with SO Windown and Linux name_board = '/dev/ttyUSB0' value_of_baudRate= 9600 b = little_board.Board(name_board, value_of_baudRate) b.begin() while True: #receiving the command mo...
24.076923
86
0.693291
import Client as client import communication_serial as little_board #it's just an example. Change please the name mainly for job with SO Windown and Linux name_board = '/dev/ttyUSB0' value_of_baudRate= 9600 b = little_board.Board(name_board, value_of_baudRate) b.begin() while True: #receiving the command mo...
0
0
0
0
0
0
0
0
0
7f6368aa495ec0f1f1495e9e603aa1b1fc1d0254
3,591
py
Python
schooner/db/assistant/CourseAssistant.py
Jasata/utu-schooner
fc6f23c843160dcc2549762580fb31d6388cd042
[ "MIT" ]
null
null
null
schooner/db/assistant/CourseAssistant.py
Jasata/utu-schooner
fc6f23c843160dcc2549762580fb31d6388cd042
[ "MIT" ]
null
null
null
schooner/db/assistant/CourseAssistant.py
Jasata/utu-schooner
fc6f23c843160dcc2549762580fb31d6388cd042
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Schooner - Course Management System # University of Turku / Faculty of Technilogy / Department of Computing # (c) 2021, Jani Tammi <jasata@utu.fi> # # CourseAssistant.py - Data dictionary class for assistant.assistant # 2021-09-06 Initial version. # # # Consider thi...
32.944954
230
0.495127
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Schooner - Course Management System # University of Turku / Faculty of Technilogy / Department of Computing # (c) 2021, Jani Tammi <jasata@utu.fi> # # CourseAssistant.py - Data dictionary class for assistant.assistant # 2021-09-06 Initial version. # # # Consider thi...
0
789
0
2,399
0
0
0
0
23
be43ec785c623d7a0027dbe8ef59e0e31d16e266
555
py
Python
pokemon_entities/migrations/0006_auto_20200425_1825.py
stikbomb/pokemons_map
bb907d445d2b2f1b9dc0bd518be1188d977b3e0a
[ "MIT" ]
null
null
null
pokemon_entities/migrations/0006_auto_20200425_1825.py
stikbomb/pokemons_map
bb907d445d2b2f1b9dc0bd518be1188d977b3e0a
[ "MIT" ]
5
2020-02-12T02:55:42.000Z
2022-02-10T13:54:47.000Z
pokemon_entities/migrations/0006_auto_20200425_1825.py
stikbomb/pokemons_map
bb907d445d2b2f1b9dc0bd518be1188d977b3e0a
[ "MIT" ]
null
null
null
# Generated by Django 2.2.3 on 2020-04-25 18:25
27.75
169
0.675676
# Generated by Django 2.2.3 on 2020-04-25 18:25 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('pokemon_entities', '0005_auto_20200424_2048'), ] operations = [ migrations.AlterField( model_na...
14
0
0
401
0
0
0
30
68
4357b20c796212b704bfa18c32e99d25d0441024
176
py
Python
logquacious/constants.py
tonysyu/logquacious
e1c9b2079c14d84e6aeb05f39e1fe18ee1ada646
[ "MIT" ]
35
2018-10-08T01:34:10.000Z
2021-04-01T07:30:44.000Z
logquacious/constants.py
tonysyu/logquacious
e1c9b2079c14d84e6aeb05f39e1fe18ee1ada646
[ "MIT" ]
12
2018-10-04T02:02:03.000Z
2019-05-07T23:30:47.000Z
logquacious/constants.py
tonysyu/logquacious
e1c9b2079c14d84e6aeb05f39e1fe18ee1ada646
[ "MIT" ]
2
2018-10-07T20:55:42.000Z
2019-12-13T07:38:17.000Z
import logging LOG_LEVEL_NAMES = [ 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL', ] LOG_LEVELS = {getattr(logging, name) for name in LOG_LEVEL_NAMES}
12.571429
65
0.619318
import logging LOG_LEVEL_NAMES = [ 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL', ] LOG_LEVELS = {getattr(logging, name) for name in LOG_LEVEL_NAMES}
0
0
0
0
0
0
0
0
0
747d56d9ae67b96f74dd8d63d62425cb56173490
4,766
py
Python
TranskribusDU/graph/pkg_GraphBinaryConjugateSegmenter/GraphBinaryConjugateSegmenter_DOM.py
Transkribus/TranskribusDU
61028ee5f5f39f435bf9c461f8073e75bca344ac
[ "BSD-3-Clause" ]
20
2017-01-24T20:08:25.000Z
2021-10-30T15:20:44.000Z
TranskribusDU/graph/pkg_GraphBinaryConjugateSegmenter/GraphBinaryConjugateSegmenter_DOM.py
Transkribus/TranskribusDU
61028ee5f5f39f435bf9c461f8073e75bca344ac
[ "BSD-3-Clause" ]
11
2017-06-27T11:41:42.000Z
2020-10-12T04:59:25.000Z
TranskribusDU/graph/pkg_GraphBinaryConjugateSegmenter/GraphBinaryConjugateSegmenter_DOM.py
Transkribus/TranskribusDU
61028ee5f5f39f435bf9c461f8073e75bca344ac
[ "BSD-3-Clause" ]
5
2017-01-12T15:55:34.000Z
2019-10-10T05:13:20.000Z
# -*- coding: utf-8 -*- """ Train, test, predict steps for a graph-based model using a binary conjugate (two classes on the primal edges) Structured machine learning, currently using graph-CRF or Edge Convolution Network Copyright NAVER(C) 2019 JL. Meunier Developed for the EU proje...
40.389831
98
0.560638
# -*- coding: utf-8 -*- """ Train, test, predict steps for a graph-based model using a binary conjugate (two classes on the primal edges) Structured machine learning, currently using graph-CRF or Edge Convolution Network Copyright NAVER(C) 2019 JL. Meunier Developed for the EU proje...
3
0
0
4,033
0
0
0
98
114
86cdb864d54ab430074eaeee59b02f1c3dec3f74
837
py
Python
invenio_requests/records/models.py
fenekku/invenio-requests
132451d9ac99e63512fb4920003f5eff42b115c7
[ "MIT" ]
null
null
null
invenio_requests/records/models.py
fenekku/invenio-requests
132451d9ac99e63512fb4920003f5eff42b115c7
[ "MIT" ]
null
null
null
invenio_requests/records/models.py
fenekku/invenio-requests
132451d9ac99e63512fb4920003f5eff42b115c7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2021 TU Wien. # # Invenio-Requests is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Base classes for requests in Invenio."""
27.9
75
0.749104
# -*- coding: utf-8 -*- # # Copyright (C) 2021 TU Wien. # # Invenio-Requests is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Base classes for requests in Invenio.""" import abc import uuid from datetime import datetime from inveni...
0
0
0
386
0
0
0
39
157
ec3abe19d2bdd3e1cabdc54e2cd35a2cad34bb4e
4,743
py
Python
pybots/src/environments/earth.py
aivian/robots
6827886916e36432ce1d806f0a78edef6c9270d9
[ "MIT" ]
null
null
null
pybots/src/environments/earth.py
aivian/robots
6827886916e36432ce1d806f0a78edef6c9270d9
[ "MIT" ]
null
null
null
pybots/src/environments/earth.py
aivian/robots
6827886916e36432ce1d806f0a78edef6c9270d9
[ "MIT" ]
1
2021-09-24T17:08:30.000Z
2021-09-24T17:08:30.000Z
import environments.atmosphere as atmosphere constants = { 'g0': 9.80665, #NIST http://physics.nist.gov/Pubs/SP330/sp330.pdf 'm': 5.972365e24, #wgs84 'a': 6378137.00, #wgs84 'omega': 7292115e-10, #wgs84 'r0': 6356766.0, #USSA 1976 'air': { 'M': 28.9644, #USSA 1976 'Cp': 1005.7, ...
26.20442
70
0.481552
import numpy import environments.atmosphere as atmosphere constants = { 'g0': 9.80665, #NIST http://physics.nist.gov/Pubs/SP330/sp330.pdf 'm': 5.972365e24, #wgs84 'a': 6378137.00, #wgs84 'omega': 7292115e-10, #wgs84 'r0': 6356766.0, #USSA 1976 'air': { 'M': 28.9644, #USSA 1976 '...
0
0
0
4,142
0
0
0
-9
45
932f89c3759d0c71f0ee43b7b3b8c53f43b64783
292
py
Python
app/orders/admin.py
gurnitha/2022-django4-marketplace-jfu
9d59c405c7a9ddf15ccf2056ee3882f4674b99d8
[ "Unlicense" ]
null
null
null
app/orders/admin.py
gurnitha/2022-django4-marketplace-jfu
9d59c405c7a9ddf15ccf2056ee3882f4674b99d8
[ "Unlicense" ]
null
null
null
app/orders/admin.py
gurnitha/2022-django4-marketplace-jfu
9d59c405c7a9ddf15ccf2056ee3882f4674b99d8
[ "Unlicense" ]
null
null
null
# app/order/admin.py # Django modules # Locals # Register your models here.
14.6
43
0.773973
# app/order/admin.py # Django modules from django.contrib import admin # Locals from app.orders.models import Orders, Sales # Register your models here. @admin.register(Orders) class OrdersAdmin(admin.ModelAdmin): pass @admin.register(Sales) class SalesAdmin(admin.ModelAdmin): pass
0
88
0
0
0
0
0
33
90
c939123dae5925d1727a371174a5cad011e134d1
158
py
Python
CodeChef/LONG/SEPT15/Problem D/gen.py
VastoLorde95/Competitive-Programming
6c990656178fb0cd33354cbe5508164207012f24
[ "MIT" ]
170
2017-07-25T14:47:29.000Z
2022-01-26T19:16:31.000Z
CodeChef/LONG/SEPT15/Problem D/gen.py
navodit15/Competitive-Programming
6c990656178fb0cd33354cbe5508164207012f24
[ "MIT" ]
null
null
null
CodeChef/LONG/SEPT15/Problem D/gen.py
navodit15/Competitive-Programming
6c990656178fb0cd33354cbe5508164207012f24
[ "MIT" ]
55
2017-07-28T06:17:33.000Z
2021-10-31T03:06:22.000Z
t = 5 n = 8 print t for _ in xrange(t): x = randrange(1,n+1) print x for _ in xrange(x): print randrange(-50,51), randrange(-50,51)
15.8
44
0.64557
from random import * t = 5 n = 8 print t for _ in xrange(t): x = randrange(1,n+1) print x for _ in xrange(x): print randrange(-50,51), randrange(-50,51)
0
0
0
0
0
0
0
-1
22
cf33ba68402f8ab63963def8be8bb71bce36a165
2,247
py
Python
aoc/event2016/day24/solve.py
rjbatista/AoC
5c6ca4bcb376c24ec730eb12fd7044f5326ee473
[ "MIT" ]
null
null
null
aoc/event2016/day24/solve.py
rjbatista/AoC
5c6ca4bcb376c24ec730eb12fd7044f5326ee473
[ "MIT" ]
null
null
null
aoc/event2016/day24/solve.py
rjbatista/AoC
5c6ca4bcb376c24ec730eb12fd7044f5326ee473
[ "MIT" ]
null
null
null
######## # PART 1 example = read_input("event2016/day24/example.txt") assert solve_for(example, False) == 14 p1 = read_input("event2016/day24/input.txt") answer = solve_for(p1, False) print("Part 1 =", answer) assert answer == 502 # check with accepted answer ######## # PART 2 #print(solve_for(example, True)...
22.928571
76
0.559413
from collections import deque import itertools ######## # PART 1 def read_input(fn): f = open(fn) inp_map = [] for line in f: inp_map += [line.strip()] f.close() return inp_map def find_all_in_map(inp_map): return [(inp_map[y][x], x, y) for y in range(len(inp_map)) ...
0
0
0
0
0
1,658
0
3
159
c43afd2078bd199ad9119099ea30b35e7c3322dd
7,071
py
Python
tests/test_default_utils.py
OrtnerMichael/magPyLib
4c7e7f56f6e0b915ec0e024c172c460fa80126e5
[ "BSD-2-Clause" ]
null
null
null
tests/test_default_utils.py
OrtnerMichael/magPyLib
4c7e7f56f6e0b915ec0e024c172c460fa80126e5
[ "BSD-2-Clause" ]
null
null
null
tests/test_default_utils.py
OrtnerMichael/magPyLib
4c7e7f56f6e0b915ec0e024c172c460fa80126e5
[ "BSD-2-Clause" ]
null
null
null
from copy import deepcopy import pytest from magpylib._src.defaults.defaults_utility import get_defaults_dict from magpylib._src.defaults.defaults_utility import linearize_dict from magpylib._src.defaults.defaults_utility import magic_to_dict from magpylib._src.defaults.defaults_utility import MagicProperties from mag...
31.566964
87
0.585631
from copy import deepcopy import pytest from magpylib._src.defaults.defaults_utility import color_validator from magpylib._src.defaults.defaults_utility import COLORS_MATPLOTLIB_TO_PLOTLY from magpylib._src.defaults.defaults_utility import get_defaults_dict from magpylib._src.defaults.defaults_utility import lineariz...
0
1,584
0
206
0
0
0
104
145
79b30bb49e058a0fbe239b31541334e1941aadbe
919
py
Python
Algorithms/MergeSort/merge_sort.py
ParthMandaliya/data-structures-algorithms
6d6ed40f461598a6b7f4a909ca3e017d699967be
[ "MIT" ]
null
null
null
Algorithms/MergeSort/merge_sort.py
ParthMandaliya/data-structures-algorithms
6d6ed40f461598a6b7f4a909ca3e017d699967be
[ "MIT" ]
null
null
null
Algorithms/MergeSort/merge_sort.py
ParthMandaliya/data-structures-algorithms
6d6ed40f461598a6b7f4a909ca3e017d699967be
[ "MIT" ]
null
null
null
if __name__ == '__main__': test_cases = [ [10, 3, 15, 7, 8, 23, 98, 29], [], [3], [9,8,7,2], [1,2,3,4,5] ] for arr in test_cases: merge_sort(arr) print("Sorted:", arr)
18.38
44
0.453754
def merge_sort(arr): if len(arr) <= 1: return midpoint = len(arr) // 2 left = arr[:midpoint] right = arr[midpoint:] merge_sort(left) merge_sort(right) merge_sorted_arrays(arr, left, right) def merge_sorted_arrays(data, arr_1, arr_2): len_a = len(arr_1) len_b = len(arr_2)...
0
0
0
0
0
637
0
0
45
7bca3e1d9c7cb23f015b9461165411dc1986cfab
480
py
Python
rdisq/payload.py
gregie156/rdisq
bed3028997f7f64d956b2731437febfc5f2d0061
[ "MIT" ]
1
2015-09-08T06:12:14.000Z
2015-09-08T06:12:14.000Z
rdisq/payload.py
gregie156/rdisq
bed3028997f7f64d956b2731437febfc5f2d0061
[ "MIT" ]
null
null
null
rdisq/payload.py
gregie156/rdisq
bed3028997f7f64d956b2731437febfc5f2d0061
[ "MIT" ]
2
2016-12-16T10:17:39.000Z
2020-06-13T14:37:57.000Z
__author__ = 'smackware' from collections import namedtuple if TYPE_CHECKING: RequestPayload = namedtuple("RequestPayload", "task_id timeout args kwargs")
21.818182
76
0.766667
__author__ = 'smackware' from typing import * from collections import namedtuple if TYPE_CHECKING: from rdisq.consts import ServiceUid RequestPayload = namedtuple("RequestPayload", "task_id timeout args kwargs") class SessionResult(NamedTuple): result: Any session_data: Dict class ResponsePayload(Name...
0
0
0
214
0
0
0
13
95
40bd680bab1cc9a4333b4bde8b530e97d177422e
23,339
py
Python
sympy/polys/groebnertools.py
skieffer/sympy
23ab5c14881aef21409918939e0c8b78b7fcb06f
[ "BSD-3-Clause" ]
1
2021-08-06T07:38:42.000Z
2021-08-06T07:38:42.000Z
sympy/polys/groebnertools.py
Nbede/sympy
2ead5bfe4716c36e1c0839c25aa6dc87cd85b0f2
[ "BSD-3-Clause" ]
5
2021-09-14T07:51:13.000Z
2021-11-20T19:19:11.000Z
sympy/polys/groebnertools.py
sonntagsgesicht/sympy
fd94b018b0266fa9a04f463218a0d424ee11ae10
[ "BSD-3-Clause" ]
null
null
null
"""Groebner bases algorithms. """ from sympy.core.symbol import Dummy from sympy.polys.monomials import monomial_mul, monomial_lcm, monomial_divides, term_div from sympy.polys.orderings import lex from sympy.polys.polyerrors import DomainError from sympy.polys.polyconfig import query def groebner(seq, ring, method=N...
27.044032
116
0.550666
"""Groebner bases algorithms. """ from sympy.core.symbol import Dummy from sympy.polys.monomials import monomial_mul, monomial_lcm, monomial_divides, term_div from sympy.polys.orderings import lex from sympy.polys.polyerrors import DomainError from sympy.polys.polyconfig import query def groebner(seq, ring, method=N...
0
0
0
0
0
2,528
0
0
223
e198e9392bb93769a0a278cb30af5cc8e2c8addc
2,143
py
Python
benchmark/generate_benchmark.py
pablocael/vptree-cpp
ba979fe452b9d05d45e4c09a26dfbed64095c303
[ "MIT" ]
8
2021-11-28T05:38:01.000Z
2022-03-08T17:02:53.000Z
benchmark/generate_benchmark.py
pablocael/vptree-cpp
ba979fe452b9d05d45e4c09a26dfbed64095c303
[ "MIT" ]
null
null
null
benchmark/generate_benchmark.py
pablocael/vptree-cpp
ba979fe452b9d05d45e4c09a26dfbed64095c303
[ "MIT" ]
null
null
null
import json import matplotlib.pyplot as plt from matplotlib.ticker import StrMethodFormatter faiss_l2_data = None with open("benchmark/results/faiss_l2_test_result.json", "r") as read_file: faiss_l2_data = json.load(read_file) pyvptree_l2_data = None with open("benchmark/results/pyvptree_l2_test_result.json", "r"...
40.433962
88
0.70322
import json import matplotlib.pyplot as plt from matplotlib.ticker import StrMethodFormatter faiss_l2_data = None with open("benchmark/results/faiss_l2_test_result.json", "r") as read_file: faiss_l2_data = json.load(read_file) pyvptree_l2_data = None with open("benchmark/results/pyvptree_l2_test_result.json", "r"...
0
0
0
0
0
0
0
0
0
2c0a76fe361fe122ffb1f789a8d5422b5892cea3
2,999
py
Python
webserver_pkg/webserver_pkg/webserver.py
jsspric/aws-deepracer-webserver-pkg
0bf008684ab54d3c47225554abdf5efc7362d59a
[ "Apache-2.0" ]
53
2021-04-27T20:15:06.000Z
2022-03-16T07:37:00.000Z
deepracer_follow_the_leader_ws/webserver_pkg/webserver_pkg/webserver.py
amitjain-3/add_deepracer
e100e1c40530d436eab0479c7b706d967bf61963
[ "Apache-2.0" ]
1
2021-04-18T11:47:17.000Z
2021-04-18T11:47:17.000Z
deepracer_follow_the_leader_ws/webserver_pkg/webserver_pkg/webserver.py
amitjain-3/add_deepracer
e100e1c40530d436eab0479c7b706d967bf61963
[ "Apache-2.0" ]
23
2021-04-15T15:52:57.000Z
2022-03-07T16:53:40.000Z
#!/usr/bin/env python ################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 ...
46.138462
87
0.663555
#!/usr/bin/env python ################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 ...
0
0
0
0
0
0
0
0
0
b4f2aae2ac15c371539c072830aec294427e16a4
849
py
Python
bot/client.py
drmhdh/drpdf2img
1228587403ad195b450d44169db1f7ad8570d0e0
[ "Apache-2.0" ]
1
2022-01-12T11:40:00.000Z
2022-01-12T11:40:00.000Z
bot/client.py
drmhdh/drpdf2img
1228587403ad195b450d44169db1f7ad8570d0e0
[ "Apache-2.0" ]
null
null
null
bot/client.py
drmhdh/drpdf2img
1228587403ad195b450d44169db1f7ad8570d0e0
[ "Apache-2.0" ]
null
null
null
# (c) @AbirHasan2005 from configs import Config LOGGER = Config.LOGGER log = LOGGER.getLogger(__name__) #class Client(RawClient, New): app = Bot() app.run()
21.225
70
0.597173
# (c) @AbirHasan2005 from typing import Union from pyromod import listen from pyrogram import Client from pyrogram.storage import Storage from configs import Config LOGGER = Config.LOGGER log = LOGGER.getLogger(__name__) #class Client(RawClient, New): class Bot(Client): """ Custom Bot Class """ def _...
0
0
133
406
0
0
0
29
111
ecc92abed6487dd674785afd61f4d362fd24e530
958
py
Python
code/intro-first-day-numpy-stats.py
Vegpathology/phyto-data-viz
8a6047de30b48932b73f287930520bb4ea7c7b9d
[ "CC-BY-4.0" ]
60
2015-08-21T12:00:46.000Z
2022-02-22T01:26:41.000Z
code/intro-first-day-numpy-stats.py
Vegpathology/phyto-data-viz
8a6047de30b48932b73f287930520bb4ea7c7b9d
[ "CC-BY-4.0" ]
560
2015-08-17T20:39:52.000Z
2022-02-04T15:45:04.000Z
code/intro-first-day-numpy-stats.py
Vegpathology/phyto-data-viz
8a6047de30b48932b73f287930520bb4ea7c7b9d
[ "CC-BY-4.0" ]
134
2015-08-17T13:19:08.000Z
2022-03-11T11:56:25.000Z
"""Example for first day of class in Intro""" import urllib2 import numpy as np import matplotlib.pyplot as plt import statsmodels.api as sm url = "http://esapubs.org/archive/ecol/E084/093/Mammal_lifehistories_v2.txt" web_data = urllib2.urlopen(url) data = np.genfromtxt(web_data, delimiter='\t', names=True, dtype=Non...
34.214286
85
0.651357
"""Example for first day of class in Intro""" import urllib2 import pandas as pd import numpy as np import matplotlib.pyplot as plt import statsmodels.api as sm url = "http://esapubs.org/archive/ecol/E084/093/Mammal_lifehistories_v2.txt" web_data = urllib2.urlopen(url) data = np.genfromtxt(web_data, delimiter='\t', n...
0
0
0
0
0
0
0
-2
22
d4f813850eadc9d14756d50ae6856fb1254b3536
14,407
py
Python
pysnmp-with-texts/BAY-STACK-NES-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/BAY-STACK-NES-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/BAY-STACK-NES-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module BAY-STACK-NES-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BAY-STACK-NES-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:35:52 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
123.136752
1,594
0.791351
# # PySNMP MIB module BAY-STACK-NES-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BAY-STACK-NES-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:35:52 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
0
0
0
0
0
0
0
0
0
71202936db12d7b8c80f38f79e67c9749fbd6fb2
1,973
py
Python
utils/blur_utils.py
gistvision/DIPsureWithSTE
853faac97a451e6430b47f4d4da54c6d08a7ee50
[ "MIT" ]
25
2021-09-06T06:56:32.000Z
2022-03-23T01:12:23.000Z
utils/blur_utils.py
scott-mao/DIP-denosing
853faac97a451e6430b47f4d4da54c6d08a7ee50
[ "MIT" ]
1
2021-11-19T12:14:53.000Z
2021-11-22T14:03:57.000Z
utils/blur_utils.py
scott-mao/DIP-denosing
853faac97a451e6430b47f4d4da54c6d08a7ee50
[ "MIT" ]
5
2021-10-18T13:35:03.000Z
2022-03-08T09:34:55.000Z
# - blur image - exactly like the NCSR is doing it - # - the inverse function H -
36.537037
102
0.596047
from .REDutils import * from models.downsampler import Downsampler # - blur image - exactly like the NCSR is doing it - def get_fft_h(im, blur_type): assert blur_type in ['uniform_blur', 'gauss_blur'], "blur_type can be or 'uniform' or 'gauss'" ch, h, w = im.shape fft_h = np.zeros((h,w),) if blur_...
0
0
0
0
0
1,728
0
23
134
044d9645872171b69747d53cab00b77ba53b77b2
101
py
Python
photologue/__init__.py
anderdl/test2repo
0b615c901066da60369a01ab77914f5f682ed49d
[ "BSD-3-Clause" ]
null
null
null
photologue/__init__.py
anderdl/test2repo
0b615c901066da60369a01ab77914f5f682ed49d
[ "BSD-3-Clause" ]
null
null
null
photologue/__init__.py
anderdl/test2repo
0b615c901066da60369a01ab77914f5f682ed49d
[ "BSD-3-Clause" ]
null
null
null
import os __version__ = '3.2.dev0' PHOTOLOGUE_APP_DIR = os.path.dirname(os.path.abspath(__file__))
16.833333
63
0.762376
import os __version__ = '3.2.dev0' PHOTOLOGUE_APP_DIR = os.path.dirname(os.path.abspath(__file__))
0
0
0
0
0
0
0
0
0
686f061b79d0d573a7a30ab893175a624fdacc68
7,620
py
Python
src/generate-plot-images.py
BooleanJulien/Stock-Price-Trend-Volatility-Analysis
b8b99167d0aed1a71eadd4be64d186660c92d4ef
[ "MIT" ]
1
2021-12-01T21:43:12.000Z
2021-12-01T21:43:12.000Z
src/generate-plot-images.py
BooleanJulien/Stock-Price-Trend-Volatility-Analysis
b8b99167d0aed1a71eadd4be64d186660c92d4ef
[ "MIT" ]
17
2021-11-18T23:49:24.000Z
2021-12-10T20:08:45.000Z
src/generate-plot-images.py
BooleanJulien/Stock-Price-Trend-Volatility-Analysis
b8b99167d0aed1a71eadd4be64d186660c92d4ef
[ "MIT" ]
7
2021-11-19T01:00:12.000Z
2021-12-11T02:13:24.000Z
# author : Group 30 - Block 3 - MDS UBC # date : 2021-11-19 """Collects a .csv file containing the stocks price and trends volatility data and generates a number of volatility plots. Usage: generate-plot-images.py --in_file=<in_file> --out_folder=<out_folder> Options: --in_file=<in_file> Path (including file...
34.324324
136
0.624803
# author : Group 30 - Block 3 - MDS UBC # date : 2021-11-19 """Collects a .csv file containing the stocks price and trends volatility data and generates a number of volatility plots. Usage: generate-plot-images.py --in_file=<in_file> --out_folder=<out_folder> Options: --in_file=<in_file> Path (including file...
0
0
0
0
0
6,924
0
-15
90
3fe135e9a0a389c39b5f3a85cc529a9aa1bce14c
12,689
py
Python
model/specs.py
SamuelBrand1/covid-19-in-households-public
a0740d85f8f9fb1ae67dbd9c5a92f1085e4d9ea1
[ "Apache-2.0" ]
null
null
null
model/specs.py
SamuelBrand1/covid-19-in-households-public
a0740d85f8f9fb1ae67dbd9c5a92f1085e4d9ea1
[ "Apache-2.0" ]
null
null
null
model/specs.py
SamuelBrand1/covid-19-in-households-public
a0740d85f8f9fb1ae67dbd9c5a92f1085e4d9ea1
[ "Apache-2.0" ]
null
null
null
'''Module containing model specifications''' from numpy import arange, array, ones TWO_AGE_SIR_SPEC = { 'compartmental_structure': 'SIR', # This is which subsystem key to use 'AR': 0.45, # Secondary attack probability 'R*': 1.1, # Household-level reproduction number...
49.373541
131
0.56214
'''Module containing model specifications''' from copy import deepcopy from numpy import arange, array, multiply, ones from numpy.random import rand def draw_random_two_age_SEPIR_specs(spec, AR_pars = [0.25, 0.75], rec_pars = [1, 7], inc_pars = [1, 10]...
0
0
0
0
0
1,935
0
22
68
dc05fd132a552d5ef9c0f6e5504f72274bb33d6b
8,567
py
Python
aws_deploy_package/twilio/rest/preview/understand/assistant/dialogue.py
anandhakrishnanh1998/Twilio-Chat-Bot
bb5cb02e363deb4c31a24cae6b0fd0b893ef2e20
[ "MIT" ]
1
2020-01-18T08:06:57.000Z
2020-01-18T08:06:57.000Z
aws_deploy_package/twilio/rest/preview/understand/assistant/dialogue.py
anandhakrishnanh1998/Twilio-Chat-Bot
bb5cb02e363deb4c31a24cae6b0fd0b893ef2e20
[ "MIT" ]
9
2019-12-05T00:49:12.000Z
2021-09-08T01:31:25.000Z
flask/lib/python3.6/site-packages/twilio/rest/preview/understand/assistant/dialogue.py
JOFLIX/grapevines
34576e01184570d79cc140b42ffb71d322132da6
[ "MIT", "Unlicense" ]
null
null
null
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """
32.086142
104
0.639197
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource f...
0
1,363
0
6,755
0
0
0
122
203
0dae17a9b08e674302b907d4366c72baa27bc2f7
1,244
py
Python
src/utils.py
nik7273/computational-medical-knowledge
03357fc63382bed49509d7860f87a3d010f03018
[ "Apache-2.0" ]
null
null
null
src/utils.py
nik7273/computational-medical-knowledge
03357fc63382bed49509d7860f87a3d010f03018
[ "Apache-2.0" ]
null
null
null
src/utils.py
nik7273/computational-medical-knowledge
03357fc63382bed49509d7860f87a3d010f03018
[ "Apache-2.0" ]
1
2019-09-17T18:38:44.000Z
2019-09-17T18:38:44.000Z
# -*- coding: utf-8 -*- #UTILITIES import nltk import string from nltk.corpus import stopwords ''' def jaccard(file1, file2): lst1 = set(open(file1,'rb').read().splitlines()) lst2 = set(open(file2,'rb').read().splitlines()) return float(len(lst1 & lst2))/len(lst1 | lst2) ''' def filestream_to_word_list(fs...
34.555556
104
0.700161
# -*- coding: utf-8 -*- #UTILITIES import nltk import string from nltk.collocations import * from nltk.corpus import stopwords def bigramFinder(FileA): bigram_measures = nltk.collocations.BigramAssocMeasures() with open(FileA,'rb') as infile: finder = BigramCollocationFinder.from_words(nltk.word_token...
0
0
0
0
0
349
0
10
69
3b1001e5bc45e0e211fae92d8fa151d660204e82
79
py
Python
tests/__init__.py
CSIRO-enviro-informatics/pyproms
40b320bdff4e41c3195a50b13695bbfb0bfa1548
[ "MIT" ]
1
2019-04-10T00:31:52.000Z
2019-04-10T00:31:52.000Z
tests/__init__.py
CSIRO-enviro-informatics/pyproms
40b320bdff4e41c3195a50b13695bbfb0bfa1548
[ "MIT" ]
4
2018-05-02T04:54:22.000Z
2018-05-04T00:39:14.000Z
tests/__init__.py
CSIRO-enviro-informatics/pyproms
40b320bdff4e41c3195a50b13695bbfb0bfa1548
[ "MIT" ]
3
2018-05-04T02:07:31.000Z
2019-01-02T11:36:24.000Z
import tests.activity_tests import tests.entity_tests
26.333333
27
0.898734
import tests.activity_tests import tests.entity_tests import tests.report_tests
0
0
0
0
0
0
0
4
22
00e036a2e9e4848bfc6909904585adc083f144c9
9,510
py
Python
service/tests/unittests/testEndpoints.py
ehenneken/test_app
a619c2c860754b53488e64c06cfbfc2664299bec
[ "MIT" ]
1
2020-04-10T08:02:16.000Z
2020-04-10T08:02:16.000Z
service/tests/unittests/testEndpoints.py
ehenneken/test_app
a619c2c860754b53488e64c06cfbfc2664299bec
[ "MIT" ]
null
null
null
service/tests/unittests/testEndpoints.py
ehenneken/test_app
a619c2c860754b53488e64c06cfbfc2664299bec
[ "MIT" ]
null
null
null
import sys import os PROJECT_HOME = os.path.abspath( os.path.join(os.path.dirname(__file__), '../../')) sys.path.append(PROJECT_HOME)
42.837838
143
0.614406
import sys import os PROJECT_HOME = os.path.abspath( os.path.join(os.path.dirname(__file__), '../../')) sys.path.append(PROJECT_HOME) from flask.ext.testing import TestCase from flask import request from flask import url_for, Flask import unittest import requests import time import app import json import httpretty ...
0
8,758
0
409
0
0
0
-16
221
a2796c3aade7103209bf5d592dbfbaca6f469c90
6,563
py
Python
lectures/extensions/hyperbolic_discounting/replication_code/.mywaflib/waflib/extras/cross_gnu.py
loikein/ekw-lectures
a2f5436f10515ab26eab323fca8c37c91bdc5dcd
[ "MIT" ]
4
2019-11-15T15:21:27.000Z
2020-07-08T15:04:30.000Z
lectures/extensions/hyperbolic_discounting/replication_code/.mywaflib/waflib/extras/cross_gnu.py
loikein/ekw-lectures
a2f5436f10515ab26eab323fca8c37c91bdc5dcd
[ "MIT" ]
9
2019-11-18T15:54:36.000Z
2020-07-14T13:56:53.000Z
lectures/extensions/hyperbolic_discounting/replication_code/.mywaflib/waflib/extras/cross_gnu.py
loikein/ekw-lectures
a2f5436f10515ab26eab323fca8c37c91bdc5dcd
[ "MIT" ]
3
2021-01-25T15:41:30.000Z
2021-09-21T08:51:36.000Z
#!/usr/bin/python # Tool to provide dedicated variables for cross-compilation __author__ = __maintainer__ = "Jrme Carretero <cJ-waf@zougloub.eu>" __copyright__ = "Jrme Carretero, 2014" """ This tool allows to use environment variables to define cross-compilation variables intended for build variants. The variables a...
27.809322
105
0.631114
#!/usr/bin/python # Tool to provide dedicated variables for cross-compilation __author__ = __maintainer__ = "Jérôme Carretero <cJ-waf@zougloub.eu>" __copyright__ = "Jérôme Carretero, 2014" """ This tool allows to use environment variables to define cross-compilation variables intended for build variants. The variabl...
8
3,402
0
0
0
0
0
19
185
e0f948f04ea77bcc9d721f76ddae345a6a6f2dbd
7,249
py
Python
CommandMsg.py
aalhag24/Networking-Group-Chat-Application
11ebda971cdf9c749696d2e2a493be7f546584e4
[ "MIT" ]
null
null
null
CommandMsg.py
aalhag24/Networking-Group-Chat-Application
11ebda971cdf9c749696d2e2a493be7f546584e4
[ "MIT" ]
null
null
null
CommandMsg.py
aalhag24/Networking-Group-Chat-Application
11ebda971cdf9c749696d2e2a493be7f546584e4
[ "MIT" ]
null
null
null
# # This class is automatically generated by mig. DO NOT EDIT THIS FILE. # This class implements a Python interface to the 'CommandMsg' # message type. # # The default size of this message type in bytes. DEFAULT_MESSAGE_SIZE = 28 # The Active Message type associated with this message. AM_TYPE = 99
24.407407
96
0.562009
# # This class is automatically generated by mig. DO NOT EDIT THIS FILE. # This class implements a Python interface to the 'CommandMsg' # message type. # import tinyos.message.Message # The default size of this message type in bytes. DEFAULT_MESSAGE_SIZE = 28 # The Active Message type associated with this message. A...
0
0
0
6,889
0
0
0
8
46
2be4f59ac52caf236012d43d60bb65a6124574ae
2,346
py
Python
pokemons/migrations/0003_auto_20210124_1754.py
Qmanes/test_mo
f175f3d623d499473d88d2357769a3259b9b7484
[ "MIT" ]
null
null
null
pokemons/migrations/0003_auto_20210124_1754.py
Qmanes/test_mo
f175f3d623d499473d88d2357769a3259b9b7484
[ "MIT" ]
null
null
null
pokemons/migrations/0003_auto_20210124_1754.py
Qmanes/test_mo
f175f3d623d499473d88d2357769a3259b9b7484
[ "MIT" ]
null
null
null
# Generated by Django 3.1.5 on 2021-01-24 17:54
35.545455
115
0.541773
# Generated by Django 3.1.5 on 2021-01-24 17:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('pokemons', '0002_basestat_base_stat'), ] operations = [ migrations.CreateModel( name='Ability',...
0
0
0
2,199
0
0
0
30
68
f7f66c3c0c6462f3632cfe81922054428ced6e5b
2,026
py
Python
forms.py
Gilberthtx/AirDash2
cd2cde4d8f96a517110c130c02e9d859b8739d56
[ "MIT" ]
null
null
null
forms.py
Gilberthtx/AirDash2
cd2cde4d8f96a517110c130c02e9d859b8739d56
[ "MIT" ]
null
null
null
forms.py
Gilberthtx/AirDash2
cd2cde4d8f96a517110c130c02e9d859b8739d56
[ "MIT" ]
null
null
null
# this method will check if the email already exists '''FORM FOR REGISTERING''' '''FORM FOR LOGIN''' '''FORM FOR SEARCH''' '''FORM TO REMOVE FLIGHT'''
20.059406
94
0.547878
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import (DataRequired, Regexp, ValidationError, Email, Length, EqualTo) from models import User # this method will check if the email already exists def email_exists(form, field): if User.select().w...
0
0
0
1,393
0
142
0
123
203
0c114eeb8fa1e873bbdab8b1633a4c3a221dce34
6,792
py
Python
EfficiencyPlotter.py
anovak10/plots
235934e6200a8283a210f0dba9de8b4f1f3a7b7a
[ "MIT" ]
null
null
null
EfficiencyPlotter.py
anovak10/plots
235934e6200a8283a210f0dba9de8b4f1f3a7b7a
[ "MIT" ]
null
null
null
EfficiencyPlotter.py
anovak10/plots
235934e6200a8283a210f0dba9de8b4f1f3a7b7a
[ "MIT" ]
null
null
null
# for varname, xmin, xmax in zip(["LepPt","METPt", "TAGPt", "TPRIMEM", "WPt", "lepJetPt","ZPRIMEM"],[50,0,0,0,0,0,200],[500,900,1400,1800,1200,1000,3000])[0:1]: varplot(varname, xmin, xmax)
33.294118
284
0.672556
# import os import math from array import array import optparse import ROOT from ROOT import * import scipy import Plotting_Header from Plotting_Header import * def varplot(varname, xmin, xmax, trigger="3", normed=False, stacked=False): VAR = [varname, 50, xmin, xmax] YT = "events / "+str((VAR[3]-VAR[2])/VAR[1])+" G...
0
0
0
0
0
6,412
0
-39
221
fa8e19c6819ac58d9e3bc44cf4fe7bb2f001999c
393
py
Python
komoju/api/test.py
shimakaze-git/komoju-py
de4d0f250cbbdf3169c54faf401bd67879dc2849
[ "MIT" ]
1
2021-04-01T19:47:19.000Z
2021-04-01T19:47:19.000Z
komoju/api/test.py
shimakaze-git/komoju-py
de4d0f250cbbdf3169c54faf401bd67879dc2849
[ "MIT" ]
null
null
null
komoju/api/test.py
shimakaze-git/komoju-py
de4d0f250cbbdf3169c54faf401bd67879dc2849
[ "MIT" ]
null
null
null
from requests.auth import HTTPBasicAuth import requests url = "https://komoju.com/api/v1/payments" user = "" req = requests.get(url, auth=HTTPBasicAuth(user, '')) # print(req) # print(dir(req)) # print(req.text) payload = { 'amount': 100, 'currency': "test", 'external_order_num': 100 } print(len(paylo...
15.72
53
0.653944
from requests.auth import HTTPBasicAuth import requests url = "https://komoju.com/api/v1/payments" user = "" req = requests.get(url, auth=HTTPBasicAuth(user, '')) # print(req) # print(dir(req)) # print(req.text) payload = { 'amount': 100, 'currency': "test", 'external_order_num': 100 } print(len(paylo...
0
0
0
0
0
0
0
0
0
e834eb1668fd41b8847acc3876b6b2fe8f330eaa
619
py
Python
pynomalous/learning/predicting.py
marcoDige/Anomalous
4b9b3a7c27d4b5ea26efa536268859623e73e4dd
[ "Unlicense" ]
2
2020-06-29T17:24:23.000Z
2021-03-19T00:27:10.000Z
pynomalous/learning/predicting.py
marcoDige/Anomalous
4b9b3a7c27d4b5ea26efa536268859623e73e4dd
[ "Unlicense" ]
4
2020-11-13T18:56:42.000Z
2022-02-10T01:54:51.000Z
pynomalous/learning/predicting.py
marcoDige/Anomalous
4b9b3a7c27d4b5ea26efa536268859623e73e4dd
[ "Unlicense" ]
2
2020-08-30T10:44:04.000Z
2020-09-07T21:47:24.000Z
""" Contrains functions relative to predicting using the neural networks """ import os from keras.models import load_model def load_trained_net(mal): """ Generates a neural network, loads in the neural network the pretrained weights and returns it :param mal: the mal the net has to recognize :param ...
26.913043
97
0.720517
""" Contrains functions relative to predicting using the neural networks """ import os from pynomalous.learning.training import get_model from keras.models import load_model def load_trained_net(mal): """ Generates a neural network, loads in the neural network the pretrained weights and returns it :par...
0
0
0
0
0
0
0
29
23
83a84811db76dc11fc4356b90e5e712088891aa3
9,697
py
Python
reference/NumpyDL-master/docs/tutorials/cnn_visualization.py
code4bw/deep-np
f477d7d3bd88bae8cea408926b3cc4509f78c9d0
[ "MIT" ]
186
2017-04-04T07:37:00.000Z
2021-02-25T11:56:48.000Z
reference/NumpyDL-master/docs/tutorials/cnn_visualization.py
code4bw/deep-np
f477d7d3bd88bae8cea408926b3cc4509f78c9d0
[ "MIT" ]
9
2017-05-07T12:42:45.000Z
2019-11-06T19:45:33.000Z
reference/NumpyDL-master/docs/tutorials/cnn_visualization.py
code4bw/deep-np
f477d7d3bd88bae8cea408926b3cc4509f78c9d0
[ "MIT" ]
74
2017-04-04T06:41:07.000Z
2021-02-19T12:58:36.000Z
# -*- coding: utf-8 -*- # start try: import tensorflow as tf import numpy as np import os except ImportError: raise ValueError("Please install tensorflow and matplotlib.") # start with 0.1 so reLu isnt always 0 # the convolution with padding of 1 on each side, and moves by 1. # max pooling basi...
35.520147
115
0.637723
# -*- coding: utf-8 -*- # start try: import tensorflow as tf import numpy as np import pickle from tensorflow.python.platform import gfile from random import randint import os from scipy.misc import imsave from matplotlib import pyplot as plt except ImportError: raise ValueError("Pl...
0
0
0
0
0
5,651
0
43
333
15c14ed10d75974defa377c8a58d058134a55d32
639
py
Python
associator/table_tt_curve.py
SeanMica/PyAPA
87cfc879108ba3ab30777fbfbb4a624599fb300f
[ "MIT" ]
4
2020-11-19T04:16:37.000Z
2020-11-21T01:12:54.000Z
associator/table_tt_curve.py
SeanMica/PyAPA
87cfc879108ba3ab30777fbfbb4a624599fb300f
[ "MIT" ]
null
null
null
associator/table_tt_curve.py
SeanMica/PyAPA
87cfc879108ba3ab30777fbfbb4a624599fb300f
[ "MIT" ]
null
null
null
from sqlalchemy.ext.declarative import declarative_base BASE_TT_CURVE=declarative_base()
31.95
77
0.622848
from sqlalchemy import * from sqlalchemy.ext.declarative import declarative_base BASE_TT_CURVE=declarative_base() class TT_CURVE(BASE_TT_CURVE): __tablename__='TT_C_Table' id = Column(Integer, primary_key=True) sta = Column(String(5)) # y = ax+b , where x = s_p time, y = p travel time ...
0
0
0
502
0
0
0
3
45
7c81f5232e1ca974ff746c9ecaa9b80c31e9f2b0
959
py
Python
parsl/configs/osg.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
parsl/configs/osg.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
parsl/configs/osg.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
from parsl.config import Config from parsl.providers import CondorProvider from parsl.executors import HighThroughputExecutor from parsl.addresses import address_by_query config = Config( executors=[ HighThroughputExecutor( label='OSG_HTEX', address=address_by_query(), m...
35.518519
123
0.584984
from parsl.config import Config from parsl.providers import CondorProvider from parsl.executors import HighThroughputExecutor from parsl.addresses import address_by_query config = Config( executors=[ HighThroughputExecutor( label='OSG_HTEX', address=address_by_query(), m...
0
0
0
0
0
0
0
0
0
dbeccdcd94431d53cd0cf3c0c804c8da687a9fb8
4,404
py
Python
spikelearn/data/preprocessing.py
EstevaoVieira/spikelearn
060206558cc37c31493f1c9f01412d90375403cb
[ "MIT" ]
null
null
null
spikelearn/data/preprocessing.py
EstevaoVieira/spikelearn
060206558cc37c31493f1c9f01412d90375403cb
[ "MIT" ]
null
null
null
spikelearn/data/preprocessing.py
EstevaoVieira/spikelearn
060206558cc37c31493f1c9f01412d90375403cb
[ "MIT" ]
null
null
null
import scipy.stats as st import numpy as np import collections def kernel_smooth(spike_vector, sigma, edges, bin_size=None, padding='symmetric', border_correction = False): """ Receives an array of spike times (point-process like), and smoothes it by convolving with a _gaussian_ kernel, of width *sigma*. T...
34.40625
131
0.662125
import scipy.stats as st import numpy as np import pandas as pd import collections def kernel_smooth(spike_vector, sigma, edges, bin_size=None, padding='symmetric', border_correction = False): """ Receives an array of spike times (point-process like), and smoothes it by convolving with a _gaussian_ kernel,...
0
0
0
0
0
147
0
-2
45
a843a9ce3551f2945cc70a5dde57c31a9e77630e
11,300
py
Python
alipay/aop/api/domain/AlipayBossFncApbillTotalbillamtQueryModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayBossFncApbillTotalbillamtQueryModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayBossFncApbillTotalbillamtQueryModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*-
34.346505
103
0.56885
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayBossFncApbillTotalbillamtQueryModel(object): def __init__(self): self._ar_no = None self._bill_invoice_link_statuses = None self._bill_no = None self._bill_t...
0
3,881
0
7,281
0
0
0
21
68
c190f67b1a2e67a9f15643db0be0556bf56a0108
1,239
py
Python
contrail_api_cli_extra/migration/lb.py
Ya-S/contrail-api-cli-extra
2ebe996523d2eb22991a9078d8997a52ccd1af38
[ "MIT" ]
1
2020-03-08T12:15:01.000Z
2020-03-08T12:15:01.000Z
contrail_api_cli_extra/migration/lb.py
Ya-S/contrail-api-cli-extra
2ebe996523d2eb22991a9078d8997a52ccd1af38
[ "MIT" ]
1
2017-03-28T09:33:26.000Z
2017-03-28T10:18:37.000Z
contrail_api_cli_extra/migration/lb.py
Ya-S/contrail-api-cli-extra
2ebe996523d2eb22991a9078d8997a52ccd1af38
[ "MIT" ]
2
2017-03-28T09:13:42.000Z
2019-01-16T14:06:26.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals
36.441176
94
0.650525
# -*- coding: utf-8 -*- from __future__ import unicode_literals from contrail_api_cli.resource import Collection from contrail_api_cli.utils import printo from contrail_api_cli.exceptions import ResourceNotFound from contrail_api_cli.schema import require_schema from contrail_api_cli.command import Command class Mig...
0
535
0
371
0
0
0
134
134
5378530ab0714cfc9201d130b6a36558594591e2
4,703
py
Python
lale/lib/aif360/prejudice_remover.py
mfeffer/lale
57b58843c7c14dc2e5658244280f2c1918bf030b
[ "Apache-2.0" ]
null
null
null
lale/lib/aif360/prejudice_remover.py
mfeffer/lale
57b58843c7c14dc2e5658244280f2c1918bf030b
[ "Apache-2.0" ]
null
null
null
lale/lib/aif360/prejudice_remover.py
mfeffer/lale
57b58843c7c14dc2e5658244280f2c1918bf030b
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 IBM 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 # # Unless required by applicable law or agreed to in writing, ...
37.325397
176
0.642143
# Copyright 2020 IBM 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 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
538
0
0
0
69
46
09290fb3b783b84fd44b667186dcb2e9db0a9e5f
3,301
py
Python
model.py
wayne980/Person_reID_baseline_pytorch
36746abd7a63a2804b256d870ab81a36f7ccd105
[ "MIT" ]
1
2019-08-26T23:22:35.000Z
2019-08-26T23:22:35.000Z
model.py
wayne980/Person_reID_baseline_pytorch
36746abd7a63a2804b256d870ab81a36f7ccd105
[ "MIT" ]
null
null
null
model.py
wayne980/Person_reID_baseline_pytorch
36746abd7a63a2804b256d870ab81a36f7ccd105
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch.autograd import Variable ###################################################################### # Defines the new fc layer and classification layer # |--Linear--|--bn--|--relu--|--Linear--| # Define the ResNet50-based Model # Define the DenseNet121-based Model # debug ...
32.048544
70
0.617389
import torch import torch.nn as nn from torch.nn import init from torchvision import models from torch.autograd import Variable ###################################################################### def weights_init_kaiming(m): classname = m.__class__.__name__ # print(classname) if classname.find('Conv') !...
0
0
0
2,008
0
616
0
13
155