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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6f287737e8f9a92a8575fc5d8732553d4c087291 | 3,155 | py | Python | questions/q139_bst_verification/code.py | aadhityasw/Competitive-Programs | 901a48d35f024a3a87c32a45b7f4531e8004a203 | [
"MIT"
] | null | null | null | questions/q139_bst_verification/code.py | aadhityasw/Competitive-Programs | 901a48d35f024a3a87c32a45b7f4531e8004a203 | [
"MIT"
] | 1 | 2021-05-15T07:56:51.000Z | 2021-05-15T07:56:51.000Z | questions/q139_bst_verification/code.py | aadhityasw/Competitive-Programs | 901a48d35f024a3a87c32a45b7f4531e8004a203 | [
"MIT"
] | null | null | null |
# return True if the given tree is a BST, else return False
# Tree Node
# Function to Build Tree
if __name__=="__main__":
t=int(input())
for _ in range(0,t):
s=input()
root=buildTree(s)
if isBST(root):
print(1)
else:
print(0)
| 25.039683 | 81 | 0.511886 | def checkLeft(root, val) :
flag = True
if root.left :
flag = flag and (root.data > root.left.data)
if flag :
flag = flag and checkLeft(root.left, root.data)
if flag and root.right :
flag = flag and (root.data < root.right.data) and (root.right.data < val)
... | 0 | 0 | 0 | 94 | 0 | 2,605 | 0 | 8 | 134 |
1b983f664b2417a2b32581b312bdd6182cc222cb | 171 | py | Python | fixture.py | twocucao/tifa | f703fd27f54000e7d51f06d2456d09cc79e0ab72 | [
"MIT"
] | 71 | 2020-04-16T04:28:45.000Z | 2022-03-31T22:45:11.000Z | fixture.py | twocucao/tifa | f703fd27f54000e7d51f06d2456d09cc79e0ab72 | [
"MIT"
] | 6 | 2021-05-13T06:32:38.000Z | 2022-03-04T01:18:34.000Z | fixture.py | twocucao/tifa | f703fd27f54000e7d51f06d2456d09cc79e0ab72 | [
"MIT"
] | 12 | 2021-05-01T08:43:11.000Z | 2022-03-29T00:58:54.000Z | from tifa.globals import db
from tifa.db.dal import Dal
from tifa.models.system import Staff
dal = Dal(db.session)
dal.add(
Staff,
name="hey tea",
)
dal.commit()
| 15.545455 | 36 | 0.707602 | from tifa.globals import db
from tifa.db.dal import Dal
from tifa.models.system import Staff
dal = Dal(db.session)
dal.add(
Staff,
name="hey tea",
)
dal.commit()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b0e5d6ebee8f222cf53308028e793f255e89bf3b | 3,616 | py | Python | shell/shell.py | utep-cs-systems-courses/os-shell-IppikiOukami | 7d2b61d13eda2d395578c50d82891202ed68ae67 | [
"BSD-3-Clause"
] | null | null | null | shell/shell.py | utep-cs-systems-courses/os-shell-IppikiOukami | 7d2b61d13eda2d395578c50d82891202ed68ae67 | [
"BSD-3-Clause"
] | null | null | null | shell/shell.py | utep-cs-systems-courses/os-shell-IppikiOukami | 7d2b61d13eda2d395578c50d82891202ed68ae67 | [
"BSD-3-Clause"
] | null | null | null |
# Needs to determine functionality for symbols within commands
runShell()
| 43.047619 | 109 | 0.402102 | import os, sys, re, myIO
# Needs to determine functionality for symbols within commands
def runShell():
while True: #keep active prompt
pid = os.getpid()
os.environ['PS1'] = '$ ' #change PS1 to '$ '
... | 0 | 0 | 0 | 0 | 0 | 3,426 | 0 | 3 | 110 |
394d741759bb8933781763eedcda95d98a758cf1 | 999 | py | Python | gerar_cadastros.py | jwestarb/bazar | 3433e6e554f8335968d3b2a4175fb2f84eee0623 | [
"MIT"
] | null | null | null | gerar_cadastros.py | jwestarb/bazar | 3433e6e554f8335968d3b2a4175fb2f84eee0623 | [
"MIT"
] | null | null | null | gerar_cadastros.py | jwestarb/bazar | 3433e6e554f8335968d3b2a4175fb2f84eee0623 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bazar.settings")
import django
django.setup()
from core.models import Cadastro
for i in range(1, 1000 ):
cad = Cadastro()
cad.senha = i
cad.cpf = generate_cpf()
cad.nome = 'Teste {}'.format(i)
cad.email = 'teste{}@... | 27 | 75 | 0.630631 | # -*- coding: utf-8 -*-
import os, sys
import random
import time
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bazar.settings")
import django
django.setup()
from core.models import Cadastro
def strTimeProp(start, end, format, prop):
stime = time.mktime(time.strptime(start, format))
etime = time.mktime(tim... | 0 | 0 | 0 | 0 | 0 | 543 | 0 | -13 | 113 |
a1178d3374263026cb4e256232bb78964f451d98 | 423 | py | Python | openff/evaluator/properties/__init__.py | jaketanderson/openff-evaluator | 68541612fb0dacacc909d02f273c66ae830051d5 | [
"MIT"
] | 14 | 2019-02-01T18:56:58.000Z | 2019-12-10T18:01:38.000Z | openff/evaluator/properties/__init__.py | jaketanderson/openff-evaluator | 68541612fb0dacacc909d02f273c66ae830051d5 | [
"MIT"
] | 168 | 2019-01-31T19:54:11.000Z | 2020-02-05T21:47:00.000Z | openff/evaluator/properties/__init__.py | jaketanderson/openff-evaluator | 68541612fb0dacacc909d02f273c66ae830051d5 | [
"MIT"
] | 4 | 2019-05-01T17:45:24.000Z | 2019-11-11T19:34:28.000Z | from .binding import HostGuestBindingAffinity
from .density import Density, ExcessMolarVolume
from .dielectric import DielectricConstant
from .enthalpy import EnthalpyOfMixing, EnthalpyOfVaporization
from .solvation import SolvationFreeEnergy
__all__ = [
HostGuestBindingAffinity,
Density,
ExcessMolarVolume... | 26.4375 | 62 | 0.813239 | from .binding import HostGuestBindingAffinity
from .density import Density, ExcessMolarVolume
from .dielectric import DielectricConstant
from .enthalpy import EnthalpyOfMixing, EnthalpyOfVaporization
from .solvation import SolvationFreeEnergy
__all__ = [
HostGuestBindingAffinity,
Density,
ExcessMolarVolume... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
02f6b9792df9b33527642307503831fcee4f605d | 3,753 | py | Python | Dr. CovidAI/Dr. CovidAI/flaskblog/pool.py | Shreyas-l/Dr.CovidAI | a09eb779db8d7f38fe4545d3ab71fac8a78f1054 | [
"MIT"
] | null | null | null | Dr. CovidAI/Dr. CovidAI/flaskblog/pool.py | Shreyas-l/Dr.CovidAI | a09eb779db8d7f38fe4545d3ab71fac8a78f1054 | [
"MIT"
] | 1 | 2020-04-13T15:56:55.000Z | 2020-04-13T15:56:55.000Z | Dr. CovidAI/Dr. CovidAI/flaskblog/pool.py | Shreyas-l/CODE19-Pyrocrats | a09eb779db8d7f38fe4545d3ab71fac8a78f1054 | [
"MIT"
] | null | null | null | # import Dataset as ds
FILTER_THRESHOLD_PERC = 30
POOL_BUFFER_SIZE = 10
POOL_SIZE = 5
# if __name__ == '__main__':
# # add_to_dataset("Powai", 80)
# main()
| 25.705479 | 72 | 0.57021 | import random
# import Dataset as ds
from flaskblog import poolData
from flaskblog import DoctorData as doctor
FILTER_THRESHOLD_PERC = 30
POOL_BUFFER_SIZE = 10
POOL_SIZE = 5
def filterData(Data):
filteredData = {}
for entry in Data:
if Data[entry]["probability"] >= FILTER_THRESHOLD_PERC... | 0 | 0 | 0 | 0 | 0 | 3,299 | 0 | 22 | 245 |
74211b9f44eda3bdfa330383a5572f869c791fd9 | 982 | py | Python | fec/home/templatetags/commissioners.py | rds0751/fec-cms | 833cdac7240d056ed234ed5b503a2407e1fee1ce | [
"CC0-1.0"
] | 47 | 2015-09-09T14:23:30.000Z | 2019-12-29T13:58:41.000Z | fec/home/templatetags/commissioners.py | rds0751/fec-cms | 833cdac7240d056ed234ed5b503a2407e1fee1ce | [
"CC0-1.0"
] | 1,634 | 2015-08-19T16:36:28.000Z | 2018-03-09T18:22:23.000Z | fec/home/templatetags/commissioners.py | rds0751/fec-cms | 833cdac7240d056ed234ed5b503a2407e1fee1ce | [
"CC0-1.0"
] | 27 | 2015-08-20T02:10:13.000Z | 2021-02-14T10:51:18.000Z |
from django import template
register = template.Library()
| 36.37037 | 102 | 0.744399 | import re
from django import template
from home.models import CommissionerPage
from django.db.models import Q
register = template.Library()
@register.inclusion_tag('partials/current-commissioners.html')
def current_commissioners():
chair_commissioner = CommissionerPage.objects.filter(commissioner_title__startswi... | 0 | 817 | 0 | 0 | 0 | 0 | 0 | 16 | 89 |
310b5cec21158c4c326c81089013a9315b2179fc | 17,955 | py | Python | utils/density_plotting.py | dewyeon/toy2d | e84f1b8b951bb1e85cb38ce5c4aae8734d6ed7de | [
"MIT"
] | 1 | 2022-02-28T12:16:46.000Z | 2022-02-28T12:16:46.000Z | utils/density_plotting.py | dewyeon/toy2d | e84f1b8b951bb1e85cb38ce5c4aae8734d6ed7de | [
"MIT"
] | null | null | null | utils/density_plotting.py | dewyeon/toy2d | e84f1b8b951bb1e85cb38ce5c4aae8734d6ed7de | [
"MIT"
] | null | null | null | import torch
import os
import numpy as np
import math
from einops import rearrange
import logging
logger = logging.getLogger(__name__)
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
_GCONST_ = -0.9189385332046727 # ln(sqrt(2*pi))
def positionalencoding2d(D, H, W):
"""
:param D: dimens... | 44.007353 | 163 | 0.63208 | import torch
import os
import numpy as np
import math
from einops import rearrange
import logging
logger = logging.getLogger(__name__)
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
_GCONST_ = -0.9189385332046727 # ln(sqrt(2*pi))
def get_logp_z(z):
# import pdb; pdb.set_trace()
C = 2
... | 21 | 5,369 | 0 | 0 | 0 | 2,733 | 0 | 0 | 200 |
e4b233da694ed06213976a63834211a2dbec0e7a | 4,995 | py | Python | gent/math/sampling.py | flywinged/TGL | a567ae717e7f9390eb9a5ce3383e5b796389af05 | [
"MIT"
] | 1 | 2020-06-19T18:59:02.000Z | 2020-06-19T18:59:02.000Z | gent/math/sampling.py | flywinged/TGL | a567ae717e7f9390eb9a5ce3383e5b796389af05 | [
"MIT"
] | 16 | 2020-06-17T22:26:18.000Z | 2020-07-28T21:39:10.000Z | gent/math/sampling.py | flywinged/TGL | a567ae717e7f9390eb9a5ce3383e5b796389af05 | [
"MIT"
] | null | null | null | # # Copyright Clayton Brown 2019. See LICENSE file.
# import numpy
# from types import FunctionType
# from csaps import UnivariateCubicSmoothingSpline
# class ProbabilityDistribution:
# '''
# Function to handle probability distributions.
# Parameters
# ----------
# distributionFun... | 42.692308 | 142 | 0.635035 | # # Copyright Clayton Brown 2019. See LICENSE file.
# import numpy
# from types import FunctionType
# from csaps import UnivariateCubicSmoothingSpline
# class ProbabilityDistribution:
# '''
# Function to handle probability distributions.
# Parameters
# ----------
# distributionFun... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2e38dfc3cf9121c3e4750bb120c68978804a6342 | 927 | py | Python | server/app/api/__init__.py | chrisng93/restaurant-picker | c21b6da2c13c8a163a4beeaa3317ac793f8674d7 | [
"MIT"
] | 1 | 2017-05-04T14:43:04.000Z | 2017-05-04T14:43:04.000Z | server/app/api/__init__.py | chrisng93/dished. | c21b6da2c13c8a163a4beeaa3317ac793f8674d7 | [
"MIT"
] | 45 | 2017-04-27T03:39:58.000Z | 2017-05-04T02:42:37.000Z | server/app/api/__init__.py | chrisng93/dished. | c21b6da2c13c8a163a4beeaa3317ac793f8674d7 | [
"MIT"
] | null | null | null | """
API core
"""
from ..common import core
def create_app():
""" Returns API application instance """
app = core.create_app(__name__, __path__)
# Custom error handlers
# app.errorhandler(ExampleError)(on_example_error)
app.errorhandler(404)(on_404)
return app
| 22.609756 | 76 | 0.582524 | """
API core
"""
from functools import wraps
from flask import jsonify
from ..common import core
def create_app():
""" Returns API application instance """
app = core.create_app(__name__, __path__)
# Custom error handlers
# app.errorhandler(ExampleError)(on_example_error)
app.errorhandler(40... | 0 | 342 | 0 | 0 | 0 | 190 | 0 | 10 | 90 |
c70d51ee1a5f2d449d7b51e44cefe7be13906c2a | 893 | py | Python | coders/coder.py | Thesys-lab/learned-coded-computation | c5c32bcfb7cc4a9f52079f648373e6972c19eff9 | [
"Apache-2.0"
] | 8 | 2019-03-05T02:33:46.000Z | 2020-08-31T00:49:45.000Z | coders/coder.py | Thesys-lab/learned-coded-computation | c5c32bcfb7cc4a9f52079f648373e6972c19eff9 | [
"Apache-2.0"
] | null | null | null | coders/coder.py | Thesys-lab/learned-coded-computation | c5c32bcfb7cc4a9f52079f648373e6972c19eff9 | [
"Apache-2.0"
] | 3 | 2019-03-05T02:33:48.000Z | 2020-06-14T13:52:06.000Z | import torch.nn as nn
| 26.264706 | 75 | 0.539754 | import torch
import torch.nn as nn
class Coder(nn.Module):
"""
Base class for implementing encoders and decoders. All new encoders and
decoders should derive from this class.
"""
def __init__(self, num_in, num_out, in_dim):
"""
Parameters
----------
num_in: int... | 0 | 0 | 0 | 834 | 0 | 0 | 0 | -9 | 45 |
2839540be7e44689389b51080513e8c27c181ad6 | 5,277 | py | Python | util_transform.py | DerekGloudemans/I24-MOTION-examples | cc542e96bf16d9ba3bf971d53faf31ac9d72db42 | [
"MIT"
] | 1 | 2021-06-12T00:53:05.000Z | 2021-06-12T00:53:05.000Z | util_transform.py | DerekGloudemans/I24-MOTION-examples | cc542e96bf16d9ba3bf971d53faf31ac9d72db42 | [
"MIT"
] | null | null | null | util_transform.py | DerekGloudemans/I24-MOTION-examples | cc542e96bf16d9ba3bf971d53faf31ac9d72db42 | [
"MIT"
] | null | null | null | # contains utility functions relevant for image and coordinate transformation
from __future__ import division
from itertools import combinations
import json
import numpy as np
import cv2
def get_best_transform(x,y):
"""
given a set of N points in both x and y space, finds the best (lowest avg error)
... | 32.176829 | 88 | 0.567368 | # contains utility functions relevant for image and coordinate transformation
from __future__ import division
from itertools import combinations
import json
import numpy as np
import cv2
def get_best_transform(x,y):
"""
given a set of N points in both x and y space, finds the best (lowest avg error)
... | 0 | 0 | 0 | 0 | 0 | 295 | 0 | 0 | 23 |
569f8079d548bf4d08ebe4449569ea28cde1fcb4 | 5,434 | py | Python | haros_plugin_pbt_gen/selectors.py | git-afsantos/haros-plugin-pbt | 388c990117f357fa2079be48918fd3486c895597 | [
"MIT"
] | null | null | null | haros_plugin_pbt_gen/selectors.py | git-afsantos/haros-plugin-pbt | 388c990117f357fa2079be48918fd3486c895597 | [
"MIT"
] | 6 | 2019-10-23T08:13:32.000Z | 2020-02-11T18:58:26.000Z | haros_plugin_pbt_gen/selectors.py | git-afsantos/haros-plugin-pbt | 388c990117f357fa2079be48918fd3486c895597 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
# Copyright 2019 Andr Santos
###############################################################################
# Imports
###############################################################################
#############################################################... | 29.058824 | 79 | 0.552079 | # -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
# Copyright © 2019 André Santos
###############################################################################
# Imports
###############################################################################
from builtins import map
from builtins import object
from bu... | 4 | 504 | 0 | 4,066 | 0 | 15 | 0 | 14 | 219 |
bc768e2189aa9164745726a107794394ee08e4c1 | 865 | py | Python | development/compare_amino_jsons.py | mriglobal/vorpal | 5dd590863e1831df2020d7a70ccdea7807cb88d1 | [
"MIT"
] | 3 | 2021-08-28T06:51:31.000Z | 2022-02-28T21:59:54.000Z | development/compare_amino_jsons.py | mriglobal/vorpal | 5dd590863e1831df2020d7a70ccdea7807cb88d1 | [
"MIT"
] | null | null | null | development/compare_amino_jsons.py | mriglobal/vorpal | 5dd590863e1831df2020d7a70ccdea7807cb88d1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 1 11:46:37 2021
@author: colin
"""
import json
import argparse
parser = argparse.ArgumentParser(description="compare two amino alphabet clusterings")
parser.add_argument('-f', '--files', type=is_file, nargs=2, default=None,
h... | 20.116279 | 86 | 0.67052 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 1 11:46:37 2021
@author: colin
"""
import json
import argparse
import os
def is_file(string):
if os.path.isfile(string):
return string
else:
raise ValueError("Not a file")
parser = argparse.ArgumentParser(description="compare two amino alp... | 0 | 0 | 0 | 0 | 0 | 83 | 0 | -12 | 45 |
eb12fc6b29a934d4686d5db491393e262d899e41 | 72 | py | Python | snli/wae-stochastic/gl.py | yq-wen/probabilistic_nlg | 545a0a82eaba005be77d50ad25c6cb7267e16676 | [
"MIT"
] | 28 | 2019-03-03T05:12:51.000Z | 2022-01-15T14:05:39.000Z | snli/wae-stochastic/gl.py | yq-wen/probabilistic_nlg | 545a0a82eaba005be77d50ad25c6cb7267e16676 | [
"MIT"
] | 6 | 2019-07-04T11:39:32.000Z | 2022-02-09T23:29:03.000Z | snli/wae-stochastic/gl.py | sndean/probabilistic_nlg | fab94d63a742951d9e198f3b2a90db87ffa23b8a | [
"MIT"
] | 8 | 2019-04-02T15:36:41.000Z | 2021-05-17T16:02:56.000Z | config_fingerprint = None
config = None
log_writer = None
isTrain = True | 18 | 25 | 0.791667 | config_fingerprint = None
config = None
log_writer = None
isTrain = True | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4807e1c5cb477e1942efc6a13dd78cdc2f0fabe4 | 4,212 | py | Python | cpc_models/WideResNet_Encoder.py | fanld/CPCV2-PyTorch | 01f2f82ef48303b11ba40c2a2af7e35068d1cfc9 | [
"MIT"
] | 11 | 2020-11-01T07:49:15.000Z | 2021-12-30T04:40:50.000Z | cpc_models/WideResNet_Encoder.py | fanld/CPCV2-PyTorch | 01f2f82ef48303b11ba40c2a2af7e35068d1cfc9 | [
"MIT"
] | 4 | 2020-11-01T07:50:16.000Z | 2021-11-02T15:17:08.000Z | cpc_models/WideResNet_Encoder.py | fanld/CPCV2-PyTorch | 01f2f82ef48303b11ba40c2a2af7e35068d1cfc9 | [
"MIT"
] | 3 | 2021-10-17T13:23:36.000Z | 2022-03-01T03:11:30.000Z | # Based on:
# https://github.com/meliketoy/wide-resnet.pytorch/blob/master/networks/wide_resnet.py
import torch.nn as nn
| 35.694915 | 109 | 0.614672 | # Based on:
# https://github.com/meliketoy/wide-resnet.pytorch/blob/master/networks/wide_resnet.py
import torch
import torch.nn as nn
import torch.nn.functional as F
def norm2d(planes, norm):
if norm == "none":
return nn.Identity()
elif norm == "batch":
return nn.BatchNorm2d(planes)
elif ... | 0 | 0 | 0 | 3,656 | 0 | 317 | 0 | 1 | 114 |
897210b0e9a4c35a4d9e314e95bbaa6310d9eeb9 | 4,297 | py | Python | api/app.py | BojanaZ/SeamlessMDD | 94302cc1d253eb26794e906c9e648c2ea569f851 | [
"MIT"
] | null | null | null | api/app.py | BojanaZ/SeamlessMDD | 94302cc1d253eb26794e906c9e648c2ea569f851 | [
"MIT"
] | 1 | 2021-12-13T20:56:06.000Z | 2021-12-13T20:56:06.000Z | api/app.py | BojanaZ/SeamlessMDD | 94302cc1d253eb26794e906c9e648c2ea569f851 | [
"MIT"
] | null | null | null | from transformation.generator_handler import GeneratorHandler
from transformation.data_manipulation import DataManipulation
if __name__ == '__main__':
data_manipulation = DataManipulation()
data_manipulation = data_manipulation.load_from_dill()
handler = GeneratorHandler().load_from_dill()
app = cre... | 38.366071 | 89 | 0.624156 | import os
from flask import Flask, request, jsonify, make_response
from transformation.generator_handler import GeneratorHandler
from transformation.generators.documents_output_generator import DocumentsOutputGenerator
from transformation.generators.generator_register import GeneratorRegister
from metamodel.model imp... | 0 | 3,262 | 0 | 0 | 0 | 331 | 0 | 181 | 135 |
05629dbee3fb53ef7bf67684d32d0d4ea0c3fd42 | 2,693 | py | Python | DataProcess.py | huangzz119/capstone_project2 | 26c994a41dbc7e8e399e090ead19879b7cf9d7d3 | [
"MIT"
] | 7 | 2020-01-22T11:14:05.000Z | 2022-03-28T06:06:30.000Z | DataProcess.py | huangzz119/capstone_project2 | 26c994a41dbc7e8e399e090ead19879b7cf9d7d3 | [
"MIT"
] | null | null | null | DataProcess.py | huangzz119/capstone_project2 | 26c994a41dbc7e8e399e090ead19879b7cf9d7d3 | [
"MIT"
] | 4 | 2020-01-22T11:14:21.000Z | 2021-03-25T07:20:28.000Z | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
def date_process(data):
"""
:param data: original data
:return: groups: dict type: key is date and the corresponding intraday volumn size
"""
data_filter = data[data.isna().any(axis=1)]
data_filter["reshape_time"] = pd.to_d... | 23.622807 | 121 | 0.62941 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
def date_process(data):
"""
:param data: original data
:return: groups: dict type: key is date and the corresponding intraday volumn size
"""
data_filter = data[data.isna().any(axis=1)]
data_filter["reshape_time"] = pd.to_d... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e666b61555013b0e5b7fee947e9da81fa5dcf415 | 4,602 | py | Python | aether/sdk/drf/serializers.py | eHealthAfrica/aether-django-sdk-library | fc371af89bfed155d465049320f32bf43860d001 | [
"Apache-2.0"
] | 1 | 2020-05-04T21:05:11.000Z | 2020-05-04T21:05:11.000Z | aether/sdk/drf/serializers.py | eHealthAfrica/aether-django-sdk-library | fc371af89bfed155d465049320f32bf43860d001 | [
"Apache-2.0"
] | 3 | 2019-09-30T15:45:43.000Z | 2020-04-29T08:12:37.000Z | aether/sdk/drf/serializers.py | eHealthAfrica/aether-django-sdk-library | fc371af89bfed155d465049320f32bf43860d001 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019 by eHealth Africa : http://www.eHealthAfrica.org
#
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with
# the License. Y... | 31.306122 | 94 | 0.676445 | # Copyright (C) 2019 by eHealth Africa : http://www.eHealthAfrica.org
#
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with
# the License. Y... | 0 | 0 | 0 | 2,935 | 0 | 391 | 0 | 126 | 319 |
2250088bf6a9f45b786e35a18f78e9d2ceb0c736 | 4,249 | py | Python | src/graphing/graph.py | Billlynch/COMP37111 | 40c2baba5b268b517a253e4680fdb1f06816be4a | [
"MIT"
] | null | null | null | src/graphing/graph.py | Billlynch/COMP37111 | 40c2baba5b268b517a253e4680fdb1f06816be4a | [
"MIT"
] | null | null | null | src/graphing/graph.py | Billlynch/COMP37111 | 40c2baba5b268b517a253e4680fdb1f06816be4a | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib
matplotlib.use('TkAgg')
from matplotlib import pyplot as plt
import csv
frameDeltas = []
physicsDeltas = []
openGLDeltas = []
drawCallDeltas = []
particleCounts = []
rowCount = 5120
fifth = 1024
with open('analysisResultSpaceOpenCL.csv', newline='\n') as csvfile:
analysisRes... | 32.937984 | 174 | 0.718522 | import numpy as np
import matplotlib
matplotlib.use('TkAgg')
from matplotlib import pyplot as plt
import csv
from scipy.optimize import curve_fit
frameDeltas = []
physicsDeltas = []
openGLDeltas = []
drawCallDeltas = []
particleCounts = []
rowCount = 5120
fifth = 1024
with open('analysisResultSpaceOpenCL.csv', newl... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 22 |
8a96b2526a46d3c7c2a012249d54841cf7b58463 | 2,018 | py | Python | tests/conftest.py | old-rob/cptac | 9b33893dd11c9320628a751c8840783a6ce81957 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | old-rob/cptac | 9b33893dd11c9320628a751c8840783a6ce81957 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | old-rob/cptac | 9b33893dd11c9320628a751c8840783a6ce81957 | [
"Apache-2.0"
] | null | null | null | import sys
# TODO: figure out what cwd of pytest is
sys.path.insert(0, "cptac/tests/")
# Setting autouse=True here makes it so that this method always runs before any tests
### Download all datasets
# Must have autouse=True or else this never gets called
| 29.676471 | 85 | 0.645193 | import pytest
import cptac
import sys
# TODO: figure out what cwd of pytest is
sys.path.insert(0, "cptac/tests/")
from tests.cancer import Cancer
import curses
# Setting autouse=True here makes it so that this method always runs before any tests
@pytest.fixture(scope="session", autouse=True)
def get_datasets_lists():... | 0 | 1,619 | 0 | 0 | 0 | 0 | 0 | -15 | 155 |
5246c8ad28a258f334d2822be1fcdafb23d8cfd2 | 2,105 | py | Python | test.py | glongh/research-computer-vision-bg-removal | c91b45f166f8470fb23efa60d3dd7a832786f0c2 | [
"MIT"
] | 1 | 2020-04-13T16:05:23.000Z | 2020-04-13T16:05:23.000Z | test.py | glongh/research-computer-vision-bg-removal | c91b45f166f8470fb23efa60d3dd7a832786f0c2 | [
"MIT"
] | null | null | null | test.py | glongh/research-computer-vision-bg-removal | c91b45f166f8470fb23efa60d3dd7a832786f0c2 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
filename = '33-1.jpg'
img = cv2.imread(filename) # read image
img = cv2.resize(img, (640, 480)) # resize it
img = cv2.blur(img, (3, 3)) # blur to remove noise
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) # BGR to HSV
cv2.namedWindow('Result Image (BGR)') # window to display image
... | 30.071429 | 80 | 0.691686 | import cv2
import numpy as np
def trackbar_callback(self):
pass
filename = '33-1.jpg'
img = cv2.imread(filename) # read image
img = cv2.resize(img, (640, 480)) # resize it
img = cv2.blur(img, (3, 3)) # blur to remove noise
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) # BGR to HSV
cv2.namedWindow('Result Ima... | 0 | 0 | 0 | 0 | 0 | 16 | 0 | 0 | 23 |
f8bdd069fe1ac13cc2e941eb6106286f5268a6cf | 1,029 | py | Python | pdffitx/modeling/core.py | st3107/pdffitx | c746f6dfaf5656e9bb62508a9847c00567b34bbe | [
"BSD-3-Clause"
] | 1 | 2022-03-10T11:59:34.000Z | 2022-03-10T11:59:34.000Z | pdffitx/modeling/core.py | st3107/pdffitx | c746f6dfaf5656e9bb62508a9847c00567b34bbe | [
"BSD-3-Clause"
] | null | null | null | pdffitx/modeling/core.py | st3107/pdffitx | c746f6dfaf5656e9bb62508a9847c00567b34bbe | [
"BSD-3-Clause"
] | 2 | 2020-12-14T18:38:43.000Z | 2022-03-30T00:25:35.000Z | """Core of the PDFfitx."""
| 25.097561 | 78 | 0.716229 | """Core of the PDFfitx."""
from typing import Dict, Union
from diffpy.srfit.equation.builder import EquationFactory
from diffpy.srfit.fitbase import FitRecipe, FitContribution
from diffpy.srfit.fitbase import FitResults
from diffpy.srfit.pdf import PDFGenerator, DebyePDFGenerator
class MyContribution(FitContribution... | 0 | 339 | 0 | 336 | 0 | 0 | 0 | 144 | 180 |
2e48961d31368175ff9eb670bb694502f2dadf9f | 8,172 | py | Python | psana/psana/pscalib/geometry/SegGeometryEpixHR2x2V1.py | ZhenghengLi/lcls2 | 94e75c6536954a58c8937595dcac295163aa1cdf | [
"BSD-3-Clause-LBNL"
] | 16 | 2017-11-09T17:10:56.000Z | 2022-03-09T23:03:10.000Z | psana/psana/pscalib/geometry/SegGeometryEpixHR2x2V1.py | ZhenghengLi/lcls2 | 94e75c6536954a58c8937595dcac295163aa1cdf | [
"BSD-3-Clause-LBNL"
] | 6 | 2017-12-12T19:30:05.000Z | 2020-07-09T00:28:33.000Z | psana/psana/pscalib/geometry/SegGeometryEpixHR2x2V1.py | ZhenghengLi/lcls2 | 94e75c6536954a58c8937595dcac295163aa1cdf | [
"BSD-3-Clause-LBNL"
] | 25 | 2017-09-18T20:02:43.000Z | 2022-03-27T22:27:42.000Z | #!/usr/bin/env python
"""
Class :py:class:`SegGeometryEpixHR2x2V1` describes the EpixHR2x2V1 sensor geometry
===================================================================================
In this class we use natural matrix notations like in data array
\n We assume that
\n * sensor consists of 2x2 ASICs has 288 r... | 33.62963 | 111 | 0.580396 | #!/usr/bin/env python
"""
Class :py:class:`SegGeometryEpixHR2x2V1` describes the EpixHR2x2V1 sensor geometry
===================================================================================
In this class we use natural matrix notations like in data array
\n We assume that
\n * sensor consists of 2x2 ASICs has 288 r... | 0 | 0 | 0 | 1,012 | 0 | 3,026 | 0 | 59 | 300 |
ea37237ae6fa200b3f83ee1cde035eabb1e90dc3 | 597 | py | Python | wltp/__init__.py | ankostis/wltp | c95462cadbcab32d4fc94f8ea8bf9d85a0a3763e | [
"Apache-2.0"
] | 11 | 2017-05-22T18:31:01.000Z | 2021-11-08T12:20:07.000Z | wltp/__init__.py | ankostis/wltp | c95462cadbcab32d4fc94f8ea8bf9d85a0a3763e | [
"Apache-2.0"
] | 11 | 2016-08-09T13:37:13.000Z | 2020-03-31T20:33:20.000Z | wltp/__init__.py | JRCSTU/wltp | 18650f372044371ed994a161a93473a75e76d2a9 | [
"Apache-2.0"
] | 6 | 2017-11-30T10:22:32.000Z | 2020-12-03T14:04:55.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2013-2020 European Commission (JRC);
# Licensed under the EUPL (the 'Licence');
# You may not use this work except in compliance with the Licence.
# You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
"""
wltp: generate WLTC gear-shifts bas... | 31.421053 | 73 | 0.730318 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2013-2020 European Commission (JRC);
# Licensed under the EUPL (the 'Licence');
# You may not use this work except in compliance with the Licence.
# You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
"""
wltp: generate WLTC gear-shifts bas... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 23 |
293b07eea420cdfc371779e574c4f2ae19015f9c | 6,387 | py | Python | graphene_mongoengine/converter.py | ramarivera/graphene-mongoengine | 1020674233993bba98454b1850f184f7b79a614e | [
"MIT"
] | null | null | null | graphene_mongoengine/converter.py | ramarivera/graphene-mongoengine | 1020674233993bba98454b1850f184f7b79a614e | [
"MIT"
] | null | null | null | graphene_mongoengine/converter.py | ramarivera/graphene-mongoengine | 1020674233993bba98454b1850f184f7b79a614e | [
"MIT"
] | null | null | null | """ Contains conversion logic between Mongoengine Fields and Graphene Types """
from graphene import (List, Dynamic, Field)
from .fields import create_connection_field
from .utils import (get_field_description, field_is_required)
# pylint: disable=W0622
def convert_mongoengine_field(field, registry=None):
"""... | 35.287293 | 90 | 0.7783 | """ Contains conversion logic between Mongoengine Fields and Graphene Types """
from singledispatch import singledispatch
from graphene import (
String, Boolean, Int, Float, List,
ID, Dynamic, Field
)
from graphene.types.json import JSONString
from graphene.types.datetime import DateTime
from mongoengine.fi... | 0 | 3,949 | 0 | 0 | 0 | 0 | 0 | 782 | 344 |
a91627687f701f1e786a9dfdfc4b5c63f259087e | 1,046 | py | Python | beetsplug/synoindex.py | nnutter/beetsplug-synoupdate | efb871d14e2aab035edd5b1eb84f338bd6c72eaa | [
"MIT"
] | 1 | 2019-08-30T20:08:14.000Z | 2019-08-30T20:08:14.000Z | beetsplug/synoindex.py | nnutter/beets-synoindex | efb871d14e2aab035edd5b1eb84f338bd6c72eaa | [
"MIT"
] | null | null | null | beetsplug/synoindex.py | nnutter/beets-synoindex | efb871d14e2aab035edd5b1eb84f338bd6c72eaa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Updates the Synology (music) index whenever the beets library is changed.
This assumes beets is being run on Synology DiskStation Manager so synoindex is
available. Besides enabling the plugin no configuration is needed.
"""
| 32.6875 | 79 | 0.681644 | # -*- coding: utf-8 -*-
"""Updates the Synology (music) index whenever the beets library is changed.
This assumes beets is being run on Synology DiskStation Manager so synoindex is
available. Besides enabling the plugin no configuration is needed.
"""
from subprocess import run
from beets.plugins import BeetsPlugi... | 0 | 0 | 0 | 700 | 0 | 0 | 0 | 21 | 69 |
028dcb80f622499343570a62bcd9366252b41849 | 927 | py | Python | tests/app/urls.py | zvolsky/django-smoke-tests | 049a6b92013c78f44c5ec9cb55d9978f391af3d7 | [
"MIT"
] | 17 | 2017-12-04T15:18:16.000Z | 2021-04-22T11:32:25.000Z | tests/app/urls.py | zvolsky/django-smoke-tests | 049a6b92013c78f44c5ec9cb55d9978f391af3d7 | [
"MIT"
] | 19 | 2017-12-28T15:17:46.000Z | 2022-03-30T12:38:16.000Z | tests/app/urls.py | zvolsky/django-smoke-tests | 049a6b92013c78f44c5ec9cb55d9978f391af3d7 | [
"MIT"
] | 8 | 2017-12-28T12:31:09.000Z | 2021-11-01T15:28:23.000Z | from django.conf.urls import url
from .views import (app_view, skipped_app_view, view_with_decorator_with_wraps, view_with_decorator_without_wraps)
url_patterns_with_decorator_with_wraps = [
url(
r'^decorator-with-wraps/$', view_with_decorator_with_wraps,
name='decorator_with_wraps'
),
]
# v... | 27.264706 | 98 | 0.740022 | from django.conf.urls import url
from .views import (
app_view,
skipped_app_view,
view_with_decorator_with_wraps,
view_with_decorator_without_wraps
)
url_patterns_with_decorator_with_wraps = [
url(
r'^decorator-with-wraps/$', view_with_decorator_with_wraps,
name='decorator_with_wr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0 |
5dd1213dd3f73209ea765012dee6ad96ca31a19a | 3,856 | py | Python | intake_informaticslab/datasources/__init__.py | informatics-lab/met_office_datasets | ef0664ab8434be88cbfdd69550ba710ee7b789da | [
"MIT"
] | 5 | 2021-01-27T14:17:59.000Z | 2021-07-09T15:58:24.000Z | intake_informaticslab/datasources/__init__.py | informatics-lab/met_office_datasets | ef0664ab8434be88cbfdd69550ba710ee7b789da | [
"MIT"
] | 6 | 2021-01-22T11:10:54.000Z | 2021-03-09T20:47:31.000Z | intake_informaticslab/datasources/__init__.py | informatics-lab/met_office_datasets | ef0664ab8434be88cbfdd69550ba710ee7b789da | [
"MIT"
] | 4 | 2021-02-02T20:06:04.000Z | 2021-07-14T09:35:21.000Z |
DATA_DELAY = 24 + 6 # num hours from current time that data is available
| 29.891473 | 127 | 0.606068 | import datetime
from intake.catalog.local import YAMLFilesCatalog
from intake.source.base import Schema
from intake_xarray.base import DataSourceMixin
from intake_informaticslab import __version__
from .dataset import MODataset
from .utils import datetime_to_iso_str
DATA_DELAY = 24 + 6 # num hours from current tim... | 0 | 0 | 0 | 3,439 | 0 | 0 | 0 | 113 | 226 |
0fc663fadf5973ff1122258488801ebf6e8060b0 | 5,776 | py | Python | opentumblrqt/gui/TumblrTextEdit.py | ialex/opentumblr-qt | 395c5708b7f72d88fa7d13ebf8ba8908c984f045 | [
"MIT"
] | 2 | 2015-01-10T13:42:51.000Z | 2015-08-08T05:11:31.000Z | opentumblrqt/gui/TumblrTextEdit.py | ialex/opentumblr-qt | 395c5708b7f72d88fa7d13ebf8ba8908c984f045 | [
"MIT"
] | null | null | null | opentumblrqt/gui/TumblrTextEdit.py | ialex/opentumblr-qt | 395c5708b7f72d88fa7d13ebf8ba8908c984f045 | [
"MIT"
] | null | null | null | #!/usr/bin/python
'''
Created on 06/11/2009
@author: iAlex
'''
| 41.855072 | 131 | 0.578947 | #!/usr/bin/python
from PyQt4 import QtCore, QtGui
'''
Created on 06/11/2009
@author: iAlex
'''
class TumblrTextEdit(QtGui.QVBoxLayout):
'''
Especial Text Editor for Tumblr it allow to create bold,italic,strike text as well
insert links and image it includes a preview
'''
pariente = None
... | 0 | 0 | 0 | 5,622 | 0 | 0 | 0 | 10 | 45 |
1d3e218e9ff31fea56897e054ced615bea468069 | 2,114 | py | Python | test/do_not_test_missing_imagedata_rid.py | usr3/docx2python | 3d0cdd6b94388e7dd2318cb61c9bb99da8853b77 | [
"MIT"
] | null | null | null | test/do_not_test_missing_imagedata_rid.py | usr3/docx2python | 3d0cdd6b94388e7dd2318cb61c9bb99da8853b77 | [
"MIT"
] | null | null | null | test/do_not_test_missing_imagedata_rid.py | usr3/docx2python | 3d0cdd6b94388e7dd2318cb61c9bb99da8853b77 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# _*_ coding: utf-8 _*_
"""Skip image element when imagedata r:id cannot be found.
:author: Shay Hill
:created: 11/15/2020
User forky2 sent a docx file with an empty imagedata element:
`<v:imagedata croptop="-65520f" cropbottom="65520f"/>`
Docx2python expects to encounter
`<v:imagedata r:id=... | 39.148148 | 94 | 0.714759 | #!/usr/bin/env python3
# _*_ coding: utf-8 _*_
"""Skip image element when imagedata r:id cannot be found.
:author: Shay Hill
:created: 11/15/2020
User forky2 sent a docx file with an empty imagedata element:
`<v:imagedata croptop="-65520f" cropbottom="65520f"/>`
Docx2python expects to encounter
`<v:imagedata r:id=... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2f0901b8e7b8a26002b250aeeddd07d8dee9922f | 354 | py | Python | Staircase.py | LuisAngelHM/python | a9b9db0e561c4e675c462ee3a30c3326c00b7aa2 | [
"MIT"
] | null | null | null | Staircase.py | LuisAngelHM/python | a9b9db0e561c4e675c462ee3a30c3326c00b7aa2 | [
"MIT"
] | null | null | null | Staircase.py | LuisAngelHM/python | a9b9db0e561c4e675c462ee3a30c3326c00b7aa2 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
tamanio = int(input("Ingresa el numero de escalones: "))
staircase(tamanio) | 23.6 | 60 | 0.567797 | def spaces(n, i):
countSpace= n-i
spaces = " "*countSpace
return spaces
def staircase(n):
for i in range(1, n+1):
cadena = spaces(n,i)
steps = "#"*i
cadena = cadena+steps
print(cadena)
if __name__ == "__main__":
tamanio = int(input("Ingresa el numero de esc... | 0 | 0 | 0 | 0 | 0 | 193 | 0 | 0 | 45 |
fc03f1fc6f9a03d52a977d8f259768d6fb7c0bfc | 469 | py | Python | tests/task_return.py | mfrasca/fibra | c9363f311dc07b43bdfddcbf1f3084290278f535 | [
"Unlicense"
] | null | null | null | tests/task_return.py | mfrasca/fibra | c9363f311dc07b43bdfddcbf1f3084290278f535 | [
"Unlicense"
] | null | null | null | tests/task_return.py | mfrasca/fibra | c9363f311dc07b43bdfddcbf1f3084290278f535 | [
"Unlicense"
] | null | null | null | from __future__ import print_function
if __name__ == "__main__":
test()
| 16.172414 | 59 | 0.620469 | from __future__ import print_function
import fibra
def task_y():
print("task_y is starting")
v = yield task_z()
print("task_y received", v, "from task_z, expected 3.")
def task_z():
print("task_z is starting")
yield None
yield None
yield fibra.Return(3)
yield fibra.Return(4)
pri... | 0 | 0 | 0 | 0 | 250 | 51 | 0 | -9 | 92 |
5dbe9653030804a0267511445d68e3214014ec92 | 21 | py | Python | midnight_catalog/templatetags/__init__.py | webadmin87/midnight | b60b3b257b4d633550b82a692f3ea3756c62a0a9 | [
"BSD-3-Clause"
] | 1 | 2015-11-20T12:42:39.000Z | 2015-11-20T12:42:39.000Z | midnight_catalog/templatetags/__init__.py | webadmin87/midnight | b60b3b257b4d633550b82a692f3ea3756c62a0a9 | [
"BSD-3-Clause"
] | 3 | 2020-02-11T21:21:12.000Z | 2021-06-10T17:23:56.000Z | midnight_news/templatetags/__init__.py | webadmin87/midnight | b60b3b257b4d633550b82a692f3ea3756c62a0a9 | [
"BSD-3-Clause"
] | 1 | 2015-11-04T09:23:31.000Z | 2015-11-04T09:23:31.000Z | __author__ = 'anton'
| 10.5 | 20 | 0.714286 | __author__ = 'anton'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0a14e0e86e5680630f0fa7fc981299a0bc8afdb2 | 4,132 | py | Python | 033/main.py | joserc87/project-euler | 43b124bfd8085b45642c1b247bb6d949853df1cf | [
"Apache-2.0"
] | null | null | null | 033/main.py | joserc87/project-euler | 43b124bfd8085b45642c1b247bb6d949853df1cf | [
"Apache-2.0"
] | null | null | null | 033/main.py | joserc87/project-euler | 43b124bfd8085b45642c1b247bb6d949853df1cf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import math
""" \brief Calcula tantos primos como se indique y los guarda en un
vector
\param primos Un vector de primos
\param hasta El mayor nmero que queremos comprobar si es primo. Si
hasta es primo, se aadir al vector
"""
#################################################... | 28.108844 | 100 | 0.505082 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import math
""" \brief Calcula tantos primos como se indique y los guarda en un
vector
\param primos Un vector de primos
\param hasta El mayor número que queremos comprobar si es primo. Si
hasta es primo, se añadirá al vector
"""
def calcularPrimos (primos, hasta):
cambia=... | 30 | 0 | 0 | 0 | 0 | 1,741 | 0 | 0 | 133 |
89f6e657fa274b97dd90c7e1c2c703a73254c1c0 | 233 | py | Python | tccli/services/postgres/__init__.py | hapsyou/tencentcloud-cli-intl-en | fa8ba71164484f9a2be4b983080a1de08606c0b0 | [
"Apache-2.0"
] | null | null | null | tccli/services/postgres/__init__.py | hapsyou/tencentcloud-cli-intl-en | fa8ba71164484f9a2be4b983080a1de08606c0b0 | [
"Apache-2.0"
] | null | null | null | tccli/services/postgres/__init__.py | hapsyou/tencentcloud-cli-intl-en | fa8ba71164484f9a2be4b983080a1de08606c0b0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
| 46.6 | 74 | 0.849785 | # -*- coding: utf-8 -*-
from tccli.services.postgres.postgres_client import register_arg
from tccli.services.postgres.postgres_client import get_actions_info
from tccli.services.postgres.postgres_client import AVAILABLE_VERSION_LIST
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 66 |
50bba0c4be93ed1e97d0cb63a34b0af81e62ae0f | 3,725 | py | Python | Source/SourceFiles/OP2RigSettings.py | BlenderAddonsArchive/OpenPose-to-Blender-Facial-Capture-Transfer | 1c1cec7a3fa5e4d6195630ecea7b095beefa6417 | [
"MIT"
] | 198 | 2020-04-27T07:52:51.000Z | 2022-03-22T08:08:32.000Z | Source/SourceFiles/OP2RigSettings.py | BlenderAddonsArchive/OpenPose-to-Blender-Facial-Capture-Transfer | 1c1cec7a3fa5e4d6195630ecea7b095beefa6417 | [
"MIT"
] | 14 | 2020-05-15T23:10:08.000Z | 2022-01-07T19:10:13.000Z | Source/SourceFiles/OP2RigSettings.py | BlenderAddonsArchive/OpenPose-to-Blender-Facial-Capture-Transfer | 1c1cec7a3fa5e4d6195630ecea7b095beefa6417 | [
"MIT"
] | 51 | 2020-04-30T12:20:19.000Z | 2022-03-31T10:14:02.000Z | #class ListIndex(bpy.types.IntProperty):
#list_index: bpy.props.IntProperty(name = "Index for my_list", default = 0)
# bpy.types.Scene.list_index = IntProperty(name = "Index for my_list", default = 0)
#class MyBoneMapIndex(bpy.types.PropertyGroup):
# use an annotation
#bone_index : bpy.props.Int... | 32.391304 | 105 | 0.624161 | import bpy
class OpenPoseToRigifySettings(bpy.types.PropertyGroup):
facial_capture: bpy.props.BoolProperty(
name="Facial Capture",
description="As We read in the JSON files do we apply facial capture to the character",
default = True
)
body_capture: bpy.props.BoolPrope... | 0 | 0 | 0 | 2,881 | 0 | 243 | 0 | -11 | 97 |
a7c8ee6f18fd748ac197bfee18d656dc031e9031 | 24,375 | py | Python | src/nti/webhooks/subscriptions.py | NextThought/nti.webhooks | 2015a02fba8d4ca1811a76872a2266c5e85d5728 | [
"Apache-2.0"
] | 1 | 2020-10-20T09:23:57.000Z | 2020-10-20T09:23:57.000Z | src/nti/webhooks/subscriptions.py | NextThought/nti.webhooks | 2015a02fba8d4ca1811a76872a2266c5e85d5728 | [
"Apache-2.0"
] | 7 | 2020-06-23T22:10:37.000Z | 2020-12-04T20:27:45.000Z | src/nti/webhooks/subscriptions.py | NextThought/nti.webhooks | 2015a02fba8d4ca1811a76872a2266c5e85d5728 | [
"Apache-2.0"
] | 1 | 2020-10-28T19:58:12.000Z | 2020-10-28T19:58:12.000Z | # -*- coding: utf-8 -*-
"""
Subscription implementations.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
logger = __import__('logging').getLogger(__name__)
global_subscription_registry = GlobalSubscriptionComponents('global_subscription_regi... | 40.490033 | 124 | 0.691282 | # -*- coding: utf-8 -*-
"""
Subscription implementations.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import time
from zope import component
from zope.event import notify
from zope.interface import Interface
from zope.interface import im... | 0 | 14,812 | 0 | 5,339 | 0 | 427 | 0 | 1,587 | 1,529 |
c12b5754c734daabe04be21fb189a26b595bb688 | 452 | py | Python | test/run/t300.py | timmartin/skulpt | 2e3a3fbbaccc12baa29094a717ceec491a8a6750 | [
"MIT"
] | 2,671 | 2015-01-03T08:23:25.000Z | 2022-03-31T06:15:48.000Z | test/run/t300.py | timmartin/skulpt | 2e3a3fbbaccc12baa29094a717ceec491a8a6750 | [
"MIT"
] | 972 | 2015-01-05T08:11:00.000Z | 2022-03-29T13:47:15.000Z | test/run/t300.py | timmartin/skulpt | 2e3a3fbbaccc12baa29094a717ceec491a8a6750 | [
"MIT"
] | 845 | 2015-01-03T19:53:36.000Z | 2022-03-29T18:34:22.000Z | # Test the comparison of sets
l = [1,2,3,4,1,1]
print l
s = set(l)
print s
print '# equal'
eq = set(l)
print eq
print '# forwards'
print s.isdisjoint(eq)
print s > eq
print s.issuperset(eq)
print s >= eq
print s == eq
print s != eq
print s.issubset(eq)
print s <= eq
print s < eq
print '# backwards'
print eq.isdisjoi... | 14.125 | 29 | 0.65708 | # Test the comparison of sets
l = [1,2,3,4,1,1]
print l
s = set(l)
print s
print '# equal'
eq = set(l)
print eq
print '# forwards'
print s.isdisjoint(eq)
print s > eq
print s.issuperset(eq)
print s >= eq
print s == eq
print s != eq
print s.issubset(eq)
print s <= eq
print s < eq
print '# backwards'
print eq.isdisjoi... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5a391e283681d1ccf2aa930e34881f302215cfb4 | 324 | py | Python | try2.py | krishna-prasath/My_programs | 96bac29eb448beda2dda439ac7adea7a5343c066 | [
"bzip2-1.0.6"
] | null | null | null | try2.py | krishna-prasath/My_programs | 96bac29eb448beda2dda439ac7adea7a5343c066 | [
"bzip2-1.0.6"
] | null | null | null | try2.py | krishna-prasath/My_programs | 96bac29eb448beda2dda439ac7adea7a5343c066 | [
"bzip2-1.0.6"
] | null | null | null | import socket
# create a socket object
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# get local machine name
host = socket.gethostname()
port = 9999
# connection to hostname on the port.
s.connect((host, port))
# Receive no more than 1024 bytes
msg = s.recv(1024)
s.close()
print (msg.decode('ascii')... | 24.923077 | 54 | 0.709877 | import socket
# create a socket object
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# get local machine name
host = socket.gethostname()
port = 9999
# connection to hostname on the port.
s.connect((host, port))
# Receive no more than 1024 bytes
msg = s.recv(1024)
s.close()
print (msg.decode('ascii')... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fb46f913f73f634fab5f357f86e72550900b35ca | 5,355 | py | Python | BusFinderServer/busparser.py | CampusHackTeamMeme/WheresTheBus | 27e4d0a76c174be277c00269ae2c5175b16c4a83 | [
"MIT"
] | null | null | null | BusFinderServer/busparser.py | CampusHackTeamMeme/WheresTheBus | 27e4d0a76c174be277c00269ae2c5175b16c4a83 | [
"MIT"
] | null | null | null | BusFinderServer/busparser.py | CampusHackTeamMeme/WheresTheBus | 27e4d0a76c174be277c00269ae2c5175b16c4a83 | [
"MIT"
] | null | null | null | import argparse
ROUTES_URL = 'http://api.bus.southampton.ac.uk/dump/routes'
STOPS_URL = 'http://api.bus.southampton.ac.uk/dump/stops'
OPERATORS_URL = 'http://api.bus.southampton.ac.uk/dump/operators'
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--create_db", a... | 28.484043 | 124 | 0.613072 | import argparse
import os
import sqlite3
import requests
ROUTES_URL = 'http://api.bus.southampton.ac.uk/dump/routes'
STOPS_URL = 'http://api.bus.southampton.ac.uk/dump/stops'
OPERATORS_URL = 'http://api.bus.southampton.ac.uk/dump/operators'
def create_stops_and_routes(conn):
c = conn.cursor()
# Create hist... | 0 | 0 | 0 | 0 | 0 | 4,580 | 0 | -25 | 320 |
11cb2903072574df07e408c796300c4e5afeff07 | 2,461 | py | Python | example_project/django_mptt_example/tests/test_util.py | JMSoler7/django-mptt-admin | c0755a025e0337bb5a3873e560de522054e5278e | [
"Apache-2.0"
] | null | null | null | example_project/django_mptt_example/tests/test_util.py | JMSoler7/django-mptt-admin | c0755a025e0337bb5a3873e560de522054e5278e | [
"Apache-2.0"
] | null | null | null | example_project/django_mptt_example/tests/test_util.py | JMSoler7/django-mptt-admin | c0755a025e0337bb5a3873e560de522054e5278e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
| 31.551282 | 112 | 0.659488 | # coding=utf-8
from uuid import UUID
from django.test import TestCase
from django_mptt_admin.util import get_tree_queryset, get_tree_from_queryset, get_javascript_value, serialize_id
from ..models import Country
from .utils import read_testdata
class UtilTestCase(TestCase):
def setUp(self):
super(Util... | 2 | 0 | 0 | 2,187 | 0 | 0 | 0 | 120 | 137 |
7570e4fdc68c8e7f80c8b49961d78a1885748fd8 | 1,444 | py | Python | watch_n_learn/authentication/main.py | aaritp-search/watch-n-learn-4 | af1d3df18c3e2bb5841cd01d3c65333d0f197436 | [
"MIT"
] | null | null | null | watch_n_learn/authentication/main.py | aaritp-search/watch-n-learn-4 | af1d3df18c3e2bb5841cd01d3c65333d0f197436 | [
"MIT"
] | null | null | null | watch_n_learn/authentication/main.py | aaritp-search/watch-n-learn-4 | af1d3df18c3e2bb5841cd01d3c65333d0f197436 | [
"MIT"
] | null | null | null | from typing import TypeVar
from fastapi.responses import Response
from fastapi_login.fastapi_login import LoginManager
from watch_n_learn.helper.environment import FASTAPI_LOGIN_TOKEN_VALUE
FASTAPI_LOGIN_COOKIE_NAME = "watch_n_learn-authentication-token"
_BaseResponse = TypeVar("_BaseResponse", bound=Response)
login... | 28.88 | 72 | 0.792244 | from contextlib import contextmanager
from typing import Optional, TypeVar
from fastapi.concurrency import contextmanager_in_threadpool
from fastapi.exceptions import HTTPException
from fastapi.requests import Request
from fastapi.responses import Response
from fastapi_login.fastapi_login import LoginManager
from wat... | 0 | 241 | 215 | 0 | 0 | 183 | 0 | 161 | 203 |
f372766907a314175e0c6e20c07b3757f1e953bd | 18,189 | py | Python | src/autogluon_contrib_nlp/models/roberta.py | zhilongli/autogluon-contrib-nlp | d5b2bb0da7cd860f746fd6bd837210a051988fc8 | [
"Apache-2.0"
] | 3 | 2020-07-31T02:49:15.000Z | 2021-11-19T00:10:58.000Z | src/autogluon_contrib_nlp/models/roberta.py | zhilongli/autogluon-contrib-nlp | d5b2bb0da7cd860f746fd6bd837210a051988fc8 | [
"Apache-2.0"
] | null | null | null | src/autogluon_contrib_nlp/models/roberta.py | zhilongli/autogluon-contrib-nlp | d5b2bb0da7cd860f746fd6bd837210a051988fc8 | [
"Apache-2.0"
] | 2 | 2022-01-14T01:29:44.000Z | 2022-01-14T15:54:28.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 38.052301 | 93 | 0.580296 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 0 | 13,441 | 0 | 0 | 0 | 56 | 0 | 120 | 292 |
984689ffb19cea3028e10e9678bb64509f64308e | 6,318 | py | Python | vm_supervisor/storage.py | cpascariello/aleph-vm | 1b4920bec211ef3bd379e9359f57f06b9308c1a1 | [
"MIT"
] | null | null | null | vm_supervisor/storage.py | cpascariello/aleph-vm | 1b4920bec211ef3bd379e9359f57f06b9308c1a1 | [
"MIT"
] | null | null | null | vm_supervisor/storage.py | cpascariello/aleph-vm | 1b4920bec211ef3bd379e9359f57f06b9308c1a1 | [
"MIT"
] | null | null | null | """
This module is in charge of providing the source code corresponding to a 'code id'.
In this prototype, it returns a hardcoded example.
In the future, it should connect to an Aleph node and retrieve the code from there.
"""
import logging
logger = logging.getLogger(__name__)
| 35.296089 | 87 | 0.639126 | """
This module is in charge of providing the source code corresponding to a 'code id'.
In this prototype, it returns a hardcoded example.
In the future, it should connect to an Aleph node and retrieve the code from there.
"""
import asyncio
import json
import hashlib
import logging
import os
import re
from os.path im... | 0 | 0 | 5,081 | 0 | 0 | 352 | 0 | 146 | 450 |
a4b95f11d8d0cf48477805e93a163e136fed05ea | 1,047 | py | Python | moviebot/nlu/annotation/operator.py | benebjoern/XAI_MovieBot | fbf47aba22081dd2efe9b89d5797da2dc143f15e | [
"MIT"
] | 2 | 2021-05-27T09:48:04.000Z | 2021-12-01T11:05:12.000Z | moviebot/nlu/annotation/operator.py | benebjoern/XAI_MovieBot | fbf47aba22081dd2efe9b89d5797da2dc143f15e | [
"MIT"
] | 20 | 2020-09-18T17:59:32.000Z | 2021-04-12T11:09:29.000Z | moviebot/nlu/annotation/operator.py | benebjoern/XAI_MovieBot | fbf47aba22081dd2efe9b89d5797da2dc143f15e | [
"MIT"
] | 5 | 2020-09-10T19:49:25.000Z | 2021-07-30T05:46:29.000Z | """The Operator class defines acceptable operators.
It will be used to identify dialogue act item operator
"""
__author__ = 'Javeria Habib'
| 20.529412 | 64 | 0.48042 | """The Operator class defines acceptable operators.
It will be used to identify dialogue act item operator
"""
__author__ = 'Javeria Habib'
from enum import Enum
class Operator(Enum):
"""The Operator class defines acceptable operators.
It will be used to identify dialogue act item operator"""
EQ = 1
... | 0 | 0 | 0 | 859 | 0 | 0 | 0 | 0 | 46 |
c362cf8baed3b231565c981936f60c2f3c3ee748 | 13,443 | py | Python | datumaro/plugins/coco_format/extractor.py | the-linh-ai/datumaro | 88584da4391d25ecede96169a9640cd9010bb47c | [
"MIT"
] | null | null | null | datumaro/plugins/coco_format/extractor.py | the-linh-ai/datumaro | 88584da4391d25ecede96169a9640cd9010bb47c | [
"MIT"
] | null | null | null | datumaro/plugins/coco_format/extractor.py | the-linh-ai/datumaro | 88584da4391d25ecede96169a9640cd9010bb47c | [
"MIT"
] | null | null | null | # Copyright (C) 2019-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
| 37.974576 | 83 | 0.568846 | # Copyright (C) 2019-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
from typing import Any
import logging as log
import os.path as osp
from attrs import define
import pycocotools.mask as mask_utils
from datumaro.components.annotation import (
AnnotationType, Bbox, Caption, CompiledMask, Label, LabelCate... | 0 | 324 | 0 | 12,140 | 0 | 0 | 0 | 427 | 474 |
ed49c514a197b16b3a8cfc497957ea2ff90492ba | 218 | py | Python | python/unit-test/py/PascalTriangle.py | dacozai/algorithm-diary | 8ed5e119e4450e92e63276047ef19bbf422c2770 | [
"MIT"
] | 1 | 2019-10-17T08:34:55.000Z | 2019-10-17T08:34:55.000Z | python/unit-test/py/PascalTriangle.py | dacozai/algorithm-diary | 8ed5e119e4450e92e63276047ef19bbf422c2770 | [
"MIT"
] | 1 | 2020-05-24T08:32:13.000Z | 2020-05-24T08:32:13.000Z | python/unit-test/py/PascalTriangle.py | dacozai/algorithm-diary | 8ed5e119e4450e92e63276047ef19bbf422c2770 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../..')
num = 5
print(pascalTriangle(num))
assert(2 == pascalTriangle(num))
print("All pass") | 19.818182 | 56 | 0.715596 | import sys
sys.path.append('../..')
from typing import Set, Dict, Tuple, Sequence, List, Any
from src.array._118_Pascal import *
num = 5
print(pascalTriangle(num))
assert(2 == pascalTriangle(num))
print("All pass") | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 45 |
64e6c42b82836f975db585989185b3d83e1045d4 | 5,231 | py | Python | cell_tools/_RNA/_funcs/_filter_static_genes.py | mvinyard/cell-tools | 2482ccbe13c7a5cc06d575adefe0158026c8e03b | [
"MIT"
] | 1 | 2022-01-11T20:00:44.000Z | 2022-01-11T20:00:44.000Z | cell_tools/_RNA/_funcs/_filter_static_genes.py | mvinyard/cell-tools | 2482ccbe13c7a5cc06d575adefe0158026c8e03b | [
"MIT"
] | null | null | null | cell_tools/_RNA/_funcs/_filter_static_genes.py | mvinyard/cell-tools | 2482ccbe13c7a5cc06d575adefe0158026c8e03b | [
"MIT"
] | null | null | null |
# _filter_static_genes.py
__module_name__ = "_filter_static_genes.py"
__author__ = ", ".join(["Michael E. Vinyard"])
__email__ = ", ".join(["vinyard@g.harvard.edu",])
# package imports #
# --------------- #
import licorice
import scipy.optimize
import numpy as np
from ._calculate_running_quantile import _calculate... | 25.89604 | 97 | 0.636398 |
# _filter_static_genes.py
__module_name__ = "_filter_static_genes.py"
__author__ = ", ".join(["Michael E. Vinyard"])
__email__ = ", ".join(["vinyard@g.harvard.edu",])
# package imports #
# --------------- #
import licorice
import scipy.optimize
import matplotlib.pyplot as plt
import numpy as np
import vinplots
fro... | 0 | 0 | 0 | 0 | 0 | 2,097 | 0 | 4 | 190 |
ae4c462ba74a0705ad6b88b01ed3ce395d3f25fe | 1,318 | py | Python | example/main.py | Euraxluo/fast_job | e396b4990bdb99b5fa2f7aabe3995ca396e1d58c | [
"MIT"
] | 1 | 2022-03-10T12:21:21.000Z | 2022-03-10T12:21:21.000Z | example/main.py | Euraxluo/fast_job | e396b4990bdb99b5fa2f7aabe3995ca396e1d58c | [
"MIT"
] | null | null | null | example/main.py | Euraxluo/fast_job | e396b4990bdb99b5fa2f7aabe3995ca396e1d58c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Time: 2021-10-20 11:17
# Copyright (c) 2021
# author: Euraxluo
from loguru import logger
import logging
import HTMLReport.src.tools.result as test_result # type:ignore
import HTMLReport.src.test_runner as test_runner # type:ignore
logger.getLogger = logging.getLogger # type:ignore
test_r... | 31.380952 | 98 | 0.544765 | # -*- coding: utf-8 -*-
# Time: 2021-10-20 11:17
# Copyright (c) 2021
# author: Euraxluo
import unittest
from loguru import logger
import logging
import HTMLReport.src.tools.result as test_result # type:ignore
import HTMLReport.src.test_runner as test_runner # type:ignore
logger.getLogger = logging.getLogger # ty... | 57 | 0 | 0 | 787 | 0 | 0 | 0 | -6 | 45 |
38b86302119dc770ad8efa1359e7c146b86d0aee | 49,671 | py | Python | ding/model/common/head.py | kxzxvbk/DI-engine | ce286cdec3d7c991c21888608313b16dd7abe872 | [
"Apache-2.0"
] | 1 | 2022-03-21T16:15:39.000Z | 2022-03-21T16:15:39.000Z | ding/model/common/head.py | jiaruonan/DI-engine | 268d77db3cb54401b2cfc83e2bc3ec87c31e7b83 | [
"Apache-2.0"
] | null | null | null | ding/model/common/head.py | jiaruonan/DI-engine | 268d77db3cb54401b2cfc83e2bc3ec87c31e7b83 | [
"Apache-2.0"
] | null | null | null | import torch.nn as nn
head_cls_map = {
# discrete
'discrete': DiscreteHead,
'dueling': DuelingHead,
'sdn': StochasticDuelingHead,
'distribution': DistributionHead,
'rainbow': RainbowHead,
'qrdqn': QRDQNHead,
'quantile': QuantileHead,
# continuous
'regression': Regres... | 43.995571 | 120 | 0.557871 | from typing import Optional, Dict
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Normal, Independent
from ding.torch_utils import fc_block, noise_block, NoiseLinearLayer, MLP
from ding.rl_utils import beta_function_map
from ding.utils import lists_to_dic... | 4 | 0 | 0 | 48,683 | 0 | 0 | 0 | 137 | 431 |
48188b382ae011b2aa2f451c013cfd43367599fe | 767 | py | Python | libs/urllibs/BloomFilter.py | Evelca1N/K-Spider | 46819bf93a9337cdf8adc410c6ddc4be29ee3b52 | [
"MIT"
] | 3 | 2015-06-18T08:13:49.000Z | 2015-07-06T06:06:20.000Z | libs/urllibs/BloomFilter.py | Evelca1N/K-Spider | 46819bf93a9337cdf8adc410c6ddc4be29ee3b52 | [
"MIT"
] | null | null | null | libs/urllibs/BloomFilter.py | Evelca1N/K-Spider | 46819bf93a9337cdf8adc410c6ddc4be29ee3b52 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding:utf-8 -*-
| 24.741935 | 61 | 0.603651 | # !/usr/bin/env python
# -*- coding:utf-8 -*-
import mmh3
from bitarray import bitarray
from random import randint
class BloomFilter(object):
def __init__(self, size, hash_count=10):
self.size = size
self.hash_count = hash_count
self.bit_array = bitarray(size)
self.bit_array.set... | 0 | 0 | 0 | 625 | 0 | 0 | 0 | 3 | 91 |
6fd30eab7e53ff6e36257e7826cf9968c01b460b | 643 | py | Python | blog/admin.py | merveealpay/django-blog-project | 329c98e27878f0935079dd678e22d52934bbd5fa | [
"MIT"
] | null | null | null | blog/admin.py | merveealpay/django-blog-project | 329c98e27878f0935079dd678e22d52934bbd5fa | [
"MIT"
] | null | null | null | blog/admin.py | merveealpay/django-blog-project | 329c98e27878f0935079dd678e22d52934bbd5fa | [
"MIT"
] | null | null | null | from django.contrib import admin
from blog.models import Category
admin.site.register(Category)
| 21.433333 | 59 | 0.685848 | from django.contrib import admin
from blog.models import Category, Article, Comment, Contact
admin.site.register(Category)
@admin.register(Article)
class ArticleAdmin(admin.ModelAdmin):
search_fields = ('title', 'detail')
list_display = (
'title', 'created_date', 'updated_date'
)
@admin.regist... | 0 | 446 | 0 | 0 | 0 | 0 | 0 | 27 | 69 |
863ef8ba5469921007e2897540124b46f724bbee | 6,881 | py | Python | src/openprocurement/tender/belowthreshold/views/complaint.py | scrubele/prozorro-testing | 42b93ea2f25d8cc40e66c596f582c7c05e2a9d76 | [
"Apache-2.0"
] | null | null | null | src/openprocurement/tender/belowthreshold/views/complaint.py | scrubele/prozorro-testing | 42b93ea2f25d8cc40e66c596f582c7c05e2a9d76 | [
"Apache-2.0"
] | 2 | 2021-03-25T23:27:04.000Z | 2022-03-21T22:18:15.000Z | src/openprocurement/tender/belowthreshold/views/complaint.py | scrubele/prozorro-testing | 42b93ea2f25d8cc40e66c596f582c7c05e2a9d76 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
| 42.475309 | 120 | 0.630868 | # -*- coding: utf-8 -*-
from openprocurement.api.utils import (
get_now,
context_unpack,
json_view,
set_ownership,
APIResource,
raise_operation_error,
)
from openprocurement.tender.core.utils import save_tender, optendersresource, apply_patch
from openprocurement.tender.core.validation import ... | 0 | 6,169 | 0 | 0 | 0 | 0 | 0 | 550 | 137 |
fa1b454254d0e70f5214b69b38bbe0b2508f6432 | 3,064 | py | Python | tests/tests.py | CetusGroup/csiface-css | 337c12c36518cb0f299981fcf8c2eff5ea2c40f2 | [
"MIT"
] | null | null | null | tests/tests.py | CetusGroup/csiface-css | 337c12c36518cb0f299981fcf8c2eff5ea2c40f2 | [
"MIT"
] | null | null | null | tests/tests.py | CetusGroup/csiface-css | 337c12c36518cb0f299981fcf8c2eff5ea2c40f2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from css import style
sm = style.CsStyleManager()
rules = sm.link(open('test.css').read())
p1 = P('paragraph1')
p2 = P('p2', p1, 'note')
a1 = A('a1', p2)
h2 = H2('caption', p1)
assert sm.calc(p1, rules) == {'color': 'red', 'font-family': None, u'margin': u'0'}
assert sm.calc(p2, rules) =... | 40.315789 | 163 | 0.710183 | # -*- coding: utf-8 -*-
from css import style
class Widget:
def __init__(self, name, parent=None, styleClass=None):
self._name = name
self._parent = parent
self._styleClass = styleClass
self._styles = {
'color': 'red'
}
self._children = {}
if self._parent is not None:
self._parent._children[sel... | 0 | 0 | 0 | 697 | 0 | 0 | 0 | 0 | 92 |
6159e286e0a96a17bf880feed836071f19f88ad0 | 4,911 | py | Python | Bidirectional_interface/Haptics/API_Calls/main.py | medioman22/Bidirectional_Interface | e69f0c48f32ea122dec3a84db058a33786c666c5 | [
"MIT"
] | null | null | null | Bidirectional_interface/Haptics/API_Calls/main.py | medioman22/Bidirectional_Interface | e69f0c48f32ea122dec3a84db058a33786c666c5 | [
"MIT"
] | null | null | null | Bidirectional_interface/Haptics/API_Calls/main.py | medioman22/Bidirectional_Interface | e69f0c48f32ea122dec3a84db058a33786c666c5 | [
"MIT"
] | 1 | 2019-10-15T11:45:29.000Z | 2019-10-15T11:45:29.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import socket, struct
import time
import json
import sys
import os
DISTANCE_THRESHOLD = 0.5
MAXIMUM_MOTOR_INPUT = 99
with_connection = True
if with_connection:
print("Establishing the connection to the BBG device...")
else:
print("Ignoring the connection...")
i... | 38.669291 | 149 | 0.580941 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import socket, struct
import select
import time
import json
import sys
import os
DISTANCE_THRESHOLD = 0.5
MAXIMUM_MOTOR_INPUT = 99
with_connection = True
if with_connection:
print("Establishing the connection to the BBG device...")
else:
print("Ignoring the conne... | 0 | 0 | 0 | 0 | 0 | 681 | 0 | -8 | 67 |
c499abc16299e6fad13f23666b92c1d0e117cdc4 | 2,693 | py | Python | ImageTracker/ImageTracker.py | Engin-Boot/transfer-images-s1b13 | 22e62c72669dc40d47854e7c6a01f2922fb1dc44 | [
"MIT"
] | null | null | null | ImageTracker/ImageTracker.py | Engin-Boot/transfer-images-s1b13 | 22e62c72669dc40d47854e7c6a01f2922fb1dc44 | [
"MIT"
] | null | null | null | ImageTracker/ImageTracker.py | Engin-Boot/transfer-images-s1b13 | 22e62c72669dc40d47854e7c6a01f2922fb1dc44 | [
"MIT"
] | null | null | null | import sys
DiagnosisTrackerfilename="DiagnosisTracker.csv"
if __name__ == "__main__":
images_path=sys.argv[1] #Path of all images folder
check_new_file_and_update_in_csv(images_path) #check new image file and update in CSV
print("CSV File checked and updated")
y=showCSVData(Diag... | 40.19403 | 121 | 0.715188 | import pandas as pd
import sys
import os
import csv
DiagnosisTrackerfilename="DiagnosisTracker.csv"
def addNewFileNameToCsv(DiagnosisTrackerfilename,new_file): #add new row(new Image File) to CSV
diagnosis_data=pd.read_csv(DiagnosisTrackerfilename)
new_row = {'ImageFileName': new_file, 'Status':'Diagnosis... | 0 | 0 | 0 | 0 | 0 | 2,097 | 0 | -25 | 181 |
abae56be0eebeedec60cc46207513515f49a0e80 | 222 | py | Python | pydash/apps.py | xx-tone/django-app-pydash | 4bd77dc263f68524e747e7e4954d5cfed2a87b77 | [
"MIT"
] | null | null | null | pydash/apps.py | xx-tone/django-app-pydash | 4bd77dc263f68524e747e7e4954d5cfed2a87b77 | [
"MIT"
] | 2 | 2020-06-05T21:36:23.000Z | 2021-06-10T21:37:18.000Z | pydash/apps.py | xx-tone/django-app-pydash | 4bd77dc263f68524e747e7e4954d5cfed2a87b77 | [
"MIT"
] | 1 | 2019-06-27T01:27:26.000Z | 2019-06-27T01:27:26.000Z | from __future__ import unicode_literals
| 20.181818 | 39 | 0.702703 | from __future__ import unicode_literals
from django.apps import AppConfig
class LocalAppConfig(AppConfig):
name = 'pydash'
def ready(self):
# from . import signals_handler
return super().ready()
| 0 | 0 | 0 | 124 | 0 | 0 | 0 | 12 | 45 |
50278fa7d5807066d0f84bbfd446836beb36cf8a | 8,474 | py | Python | tests/test_eshop.py | custom-components/sensor.nintendo_wishlis | 6709a5c1b6e323494e7449fa1ac24e61100fc302 | [
"Apache-2.0"
] | 13 | 2020-05-07T21:31:51.000Z | 2022-02-09T01:53:53.000Z | tests/test_eshop.py | custom-components/sensor.nintendo_wishlis | 6709a5c1b6e323494e7449fa1ac24e61100fc302 | [
"Apache-2.0"
] | 19 | 2019-07-24T08:10:06.000Z | 2022-02-05T04:09:34.000Z | tests/test_eshop.py | custom-components/sensor.nintendo_wishlis | 6709a5c1b6e323494e7449fa1ac24e61100fc302 | [
"Apache-2.0"
] | 5 | 2019-12-13T17:48:52.000Z | 2020-07-06T07:45:31.000Z | """Test the Eshop class."""
from pytest_homeassistant_custom_component.async_mock import Mock
from custom_components.nintendo_wishlist.eshop import (NO_BOX_ART_URL, EShop, get_percent_off)
def test_get_percent_off():
"""Test get_percent_off returns correct value."""
original_price = 14.99
sale_price = 8... | 29.22069 | 83 | 0.547439 | """Test the Eshop class."""
import pytest
from pytest_homeassistant_custom_component.async_mock import AsyncMock, Mock, patch
from custom_components.nintendo_wishlist.eshop import (
NO_BOX_ART_URL,
EShop,
get_percent_off,
)
@pytest.fixture
def client_mock():
"""Pytest fixture to mock the algoliasearc... | 0 | 609 | 3,929 | 0 | 0 | 0 | 0 | 25 | 137 |
e5062fbc947307a665c06082159a8fe9625082c4 | 250 | py | Python | src/genie/libs/parser/iosxe/tests/ShowPlatformSoftwareFedSwitchActivePtpDomain/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/iosxe/tests/ShowPlatformSoftwareFedSwitchActivePtpDomain/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/iosxe/tests/ShowPlatformSoftwareFedSwitchActivePtpDomain/cli/equal/golden_output2_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output = {
"domain_number":{
0:{
"message_event_ip_dscp":59,
"message_general_ip_dscp":47,
"profile_state":"disabled",
"profile_type":"DEFAULT",
"transport_method":"802.3"
}
}
}
| 20.833333 | 38 | 0.548 | expected_output = {
"domain_number":{
0:{
"message_event_ip_dscp":59,
"message_general_ip_dscp":47,
"profile_state":"disabled",
"profile_type":"DEFAULT",
"transport_method":"802.3"
}
}
}
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6a8447b7bedbf2834f92c566ec43b25fea3dd9bc | 1,903 | py | Python | tests/test_PowerSpectrum.py | sambit-giri/21cmtools | 5a5977f918abdc80e8fa9470a58667b58441c20b | [
"MIT"
] | 11 | 2018-05-05T12:39:26.000Z | 2022-01-20T20:10:18.000Z | tests/test_PowerSpectrum.py | sambit-giri/21cmtools | 5a5977f918abdc80e8fa9470a58667b58441c20b | [
"MIT"
] | 11 | 2019-12-23T19:17:01.000Z | 2022-02-08T15:26:13.000Z | tests/test_PowerSpectrum.py | garrelt/tools21cm | ba6aa185ced0cd73263e5750df02d6a54a545a98 | [
"MIT"
] | 9 | 2018-03-20T07:24:30.000Z | 2022-03-22T07:22:12.000Z | import numpy as np
import tools21cm as t2c
box_dims = 200
dims = [128,128,128]
gauss = np.random.normal(loc=0., scale=1., size=dims)
kbins = 10
mubins = 2
def test_cross_power_spectrum_1d():
'''
With this test, cross_power_spectrum_nd and radial_average are also test.
'''
pp, kk = t2c.cross_power_spectrum_1... | 36.596154 | 133 | 0.686285 | import numpy as np
import tools21cm as t2c
box_dims = 200
dims = [128,128,128]
gauss = np.random.normal(loc=0., scale=1., size=dims)
kbins = 10
mubins = 2
def test_cross_power_spectrum_1d():
'''
With this test, cross_power_spectrum_nd and radial_average are also test.
'''
pp, kk = t2c.cross_power_spectrum_1... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c36a63d30ae4a47f4f2b5a1b7a2a3f170c61ad20 | 4,286 | py | Python | python/graphics.py | msimms/LibMath | 21bfb3937fb88a0791abe233be23af53452e601d | [
"MIT"
] | 2 | 2019-03-19T15:02:01.000Z | 2020-11-21T00:37:54.000Z | python/graphics.py | msimms/LibMath | 21bfb3937fb88a0791abe233be23af53452e601d | [
"MIT"
] | null | null | null | python/graphics.py | msimms/LibMath | 21bfb3937fb88a0791abe233be23af53452e601d | [
"MIT"
] | 1 | 2019-05-10T07:15:04.000Z | 2019-05-10T07:15:04.000Z | # MIT License
#
# Copyright (c) 2019 Michael J Simms. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
... | 41.211538 | 177 | 0.65189 | # MIT License
#
# Copyright (c) 2019 Michael J Simms. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1edb498d62f0674425fa97e479ba4c580578d464 | 5,179 | py | Python | src/ocgis/test/test_360.py | doutriaux1/ocgis | 989573258e6fcbeeb8b92d66bf5f6a43a34c2662 | [
"BSD-3-Clause"
] | 1 | 2016-09-08T14:35:44.000Z | 2016-09-08T14:35:44.000Z | src/ocgis/test/test_360.py | doutriaux1/ocgis | 989573258e6fcbeeb8b92d66bf5f6a43a34c2662 | [
"BSD-3-Clause"
] | null | null | null | src/ocgis/test/test_360.py | doutriaux1/ocgis | 989573258e6fcbeeb8b92d66bf5f6a43a34c2662 | [
"BSD-3-Clause"
] | null | null | null | import unittest
if __name__ == "__main__":
# import sys;sys.argv = ['', 'Test360.test_high_res']
unittest.main() | 34.072368 | 117 | 0.609577 | import unittest
from datetime import datetime
import numpy as np
import netCDF4 as nc
from ocgis.api.operations import OcgOperations
from ocgis.util.shp_cabinet import ShpCabinet
from shapely.geometry.polygon import Polygon
from ocgis import env
from ocgis.api.interpreter import OcgInterpreter
from ocgis.util.inspect i... | 0 | 438 | 0 | 4,254 | 0 | 0 | 0 | 120 | 244 |
541d67c02ef185c6f0b1dcfe69e55e727b375a73 | 9,837 | py | Python | comma/comma.py | zbanks/comma | 75f77d659a47a777b6790b2e47114a0355bbf0cc | [
"MIT"
] | 1 | 2020-06-15T02:22:14.000Z | 2020-06-15T02:22:14.000Z | comma/comma.py | zbanks/comma | 75f77d659a47a777b6790b2e47114a0355bbf0cc | [
"MIT"
] | null | null | null | comma/comma.py | zbanks/comma | 75f77d659a47a777b6790b2e47114a0355bbf0cc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
try:
from StringIO import StringIO
except ImportError:
__all__ = ("CommaDialect", "CommaRow", "Comma", "make_backup")
| 36.568773 | 145 | 0.600183 | #!/usr/bin/env python
import csv
import datetime
import os
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
__all__ = ("CommaDialect", "CommaRow", "Comma", "make_backup")
class CommaDialect(csv.Dialect):
delimiter = ","
doublequote = True
escapechar = None
line... | 0 | 172 | 0 | 8,739 | 0 | 621 | 0 | -27 | 185 |
536e69b7f446e2d85d7b4c89a09698724694f79e | 965 | py | Python | logger.py | andyts93/plex-coming-soon | f7d83f2bf6d41675af4e772dcb2cecf545d9e3ba | [
"MIT"
] | 1 | 2020-03-17T22:54:43.000Z | 2020-03-17T22:54:43.000Z | logger.py | andyts93/plex-coming-soon | f7d83f2bf6d41675af4e772dcb2cecf545d9e3ba | [
"MIT"
] | 1 | 2020-05-05T21:38:38.000Z | 2020-05-18T10:43:27.000Z | logger.py | andyts93/plex-coming-soon | f7d83f2bf6d41675af4e772dcb2cecf545d9e3ba | [
"MIT"
] | null | null | null | import logging
import sys
import os
from logging.handlers import TimedRotatingFileHandler
LOG_FILE_NAME = os.path.dirname(__file__)+'/logs/log.log'
# set up formatting
formatter = logging.Formatter('[%(asctime)s] %(levelname)s (%(process)d) %(module)s:%(lineno)d %(message)s')
# set up logging to STDOUT for... | 29.242424 | 109 | 0.75544 | import logging
import sys
import os
from logging.handlers import TimedRotatingFileHandler
LOG_FILE_NAME = os.path.dirname(__file__)+'/logs/log.log'
# set up formatting
formatter = logging.Formatter('[%(asctime)s] %(levelname)s (%(process)d) %(module)s:%(lineno)d %(message)s')
# set up logging to STDOUT for... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
50be1ef4606cc232b810a0ddef2863b57c98abfa | 8,832 | py | Python | turbo_patreon.py | ffsit/turbo-sticks | 7914ae115e46cc714322fee3334febed2b8406ed | [
"BSD-2-Clause"
] | null | null | null | turbo_patreon.py | ffsit/turbo-sticks | 7914ae115e46cc714322fee3334febed2b8406ed | [
"BSD-2-Clause"
] | null | null | null | turbo_patreon.py | ffsit/turbo-sticks | 7914ae115e46cc714322fee3334febed2b8406ed | [
"BSD-2-Clause"
] | 1 | 2020-06-05T19:02:06.000Z | 2020-06-05T19:02:06.000Z | import sys
# Local Imports
this = sys.modules[__name__]
# TODO: change this into a TempSessionClerk that gets shared between greenlets
# Temp session store (uses expiration_interval instead of session_max_age)
this.sessions = {}
# Create session, store session token and return it
# Check session stored in cookie... | 33.581749 | 79 | 0.543591 | import sys
import json
from time import time
from requests_oauthlib import OAuth2Session
from collections import OrderedDict
# Local Imports
import turbo_config as config
import turbo_util as util
from turbo_db import DBSession
this = sys.modules[__name__]
# TODO: change this into a TempSessionClerk that gets shared... | 0 | 0 | 0 | 0 | 0 | 7,658 | 0 | 47 | 400 |
b7561fa0056e56ce010b9ea1bb66620bbaaae11f | 2,971 | py | Python | tests/test_checks.py | peara/cert-verifier | 5f9428732a5c662a7e5b3fe4d62975f5ea49dfd6 | [
"MIT"
] | 46 | 2016-10-12T22:27:06.000Z | 2022-01-18T23:06:06.000Z | tests/test_checks.py | BlockCertsSmartContract/cert-verifier | ead034183cde31e34890bdd883668749c56c2351 | [
"MIT"
] | 11 | 2016-09-28T04:55:32.000Z | 2021-01-30T13:07:23.000Z | tests/test_checks.py | BlockCertsSmartContract/cert-verifier | ead034183cde31e34890bdd883668749c56c2351 | [
"MIT"
] | 63 | 2016-11-14T20:29:22.000Z | 2021-12-15T07:47:47.000Z | import unittest
if __name__ == '__main__':
unittest.main()
| 36.679012 | 103 | 0.708179 | import unittest
from cert_core import to_certificate_model
from mock import Mock
from cert_verifier.checks import *
class TestVerify(unittest.TestCase):
def test_compare_hashes_v1_1(self):
content_to_verify = '{"abc123": true}'.encode('utf-8')
mock_transaction = Mock()
mock_transaction.... | 0 | 0 | 0 | 2,780 | 0 | 0 | 0 | 34 | 91 |
304daaea4e0fa0929d162b799df320ca30bff23c | 87 | py | Python | weather/admin.py | BurhanH/weather-app | 9c523db9603f84e3760e020e4464f752fd27dd58 | [
"MIT"
] | null | null | null | weather/admin.py | BurhanH/weather-app | 9c523db9603f84e3760e020e4464f752fd27dd58 | [
"MIT"
] | null | null | null | weather/admin.py | BurhanH/weather-app | 9c523db9603f84e3760e020e4464f752fd27dd58 | [
"MIT"
] | 2 | 2019-06-16T23:35:17.000Z | 2020-07-13T20:07:34.000Z | from django.contrib import admin
from . models import City
admin.site.register(City)
| 14.5 | 32 | 0.793103 | from django.contrib import admin
from . models import City
admin.site.register(City)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
64508448d2a65ed05c71e29420557e78cb644ef8 | 5,045 | py | Python | sw/python-wrapper/main.py | JakubAndrysek/E-paper-board-ESP32 | 538febf9775d31835b9f2fa61cd37ae120238fce | [
"MIT"
] | null | null | null | sw/python-wrapper/main.py | JakubAndrysek/E-paper-board-ESP32 | 538febf9775d31835b9f2fa61cd37ae120238fce | [
"MIT"
] | null | null | null | sw/python-wrapper/main.py | JakubAndrysek/E-paper-board-ESP32 | 538febf9775d31835b9f2fa61cd37ae120238fce | [
"MIT"
] | null | null | null | import json
from flask import Flask
from dotenv import dotenv_values
import datetime
app = Flask(__name__)
# file .env
# USERNAME=username
# PASSWORD=password
# API_KEY=api_key
config = dotenv_values(".env")
def request_data(message: str):
"""! @brief Vytvo odpov na poadavek.
@param message: Zprva, kter se ... | 28.027778 | 116 | 0.650545 | import json
from flask import Flask, request, abort
from dotenv import dotenv_values
from skola_online import SkolaOnline
from fablab import Fablab
from salina import Salina
from alojz import Alojz
from functools import wraps
import datetime
import time
from pprint import *
app = Flask(__name__)
# file .env
# USERNAM... | 94 | 3,201 | 0 | 0 | 0 | 168 | 0 | 36 | 331 |
4b2d42d6679543a895f48efa4b6af7356faffb48 | 2,298 | py | Python | epytope/Data/pssms/smmpmbec/mat/A_26_02_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 7 | 2021-02-01T18:11:28.000Z | 2022-01-31T19:14:07.000Z | epytope/Data/pssms/smmpmbec/mat/A_26_02_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 22 | 2021-01-02T15:25:23.000Z | 2022-03-14T11:32:53.000Z | epytope/Data/pssms/smmpmbec/mat/A_26_02_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 4 | 2021-05-28T08:50:38.000Z | 2022-03-14T11:45:32.000Z | A_26_02_9 = {0: {'A': 0.109, 'C': -0.186, 'E': -0.694, 'D': -0.616, 'G': 0.238, 'F': -0.231, 'I': 0.156, 'H': -0.098, 'K': 0.739, 'M': -0.153, 'L': 0.27, 'N': -0.117, 'Q': 0.048, 'P': 0.109, 'S': -0.019, 'R': 0.694, 'T': -0.034, 'W': -0.351, 'V': 0.229, 'Y': -0.093}, 1: {'A': -0.866, 'C': 0.214, 'E': 0.5, 'D': 0.294, '... | 2,298 | 2,298 | 0.394691 | A_26_02_9 = {0: {'A': 0.109, 'C': -0.186, 'E': -0.694, 'D': -0.616, 'G': 0.238, 'F': -0.231, 'I': 0.156, 'H': -0.098, 'K': 0.739, 'M': -0.153, 'L': 0.27, 'N': -0.117, 'Q': 0.048, 'P': 0.109, 'S': -0.019, 'R': 0.694, 'T': -0.034, 'W': -0.351, 'V': 0.229, 'Y': -0.093}, 1: {'A': -0.866, 'C': 0.214, 'E': 0.5, 'D': 0.294, '... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1f88283e3c5cc65506bbed46a83762a847d33d81 | 7,531 | py | Python | lib/model/repn/relpn_target_layer.py | brbzjl/my_graph_rcnn | a758ca9ab837df70ff5a6c1ce0ac901afcbef24e | [
"MIT"
] | 4 | 2019-06-04T11:03:39.000Z | 2019-12-24T08:46:41.000Z | lib/model/repn/relpn_target_layer.py | brbzjl/my_graph_rcnn | a758ca9ab837df70ff5a6c1ce0ac901afcbef24e | [
"MIT"
] | 2 | 2019-06-11T12:21:43.000Z | 2020-09-01T04:08:12.000Z | lib/model/repn/relpn_target_layer.py | brbzjl/my_graph_rcnn | a758ca9ab837df70ff5a6c1ce0ac901afcbef24e | [
"MIT"
] | 1 | 2019-12-24T08:46:44.000Z | 2019-12-24T08:46:44.000Z | # --------------------------------------------------------
# Faster R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick and Sean Bell
# --------------------------------------------------------
# ------------------------------------------------------... | 44.827381 | 126 | 0.609481 | # --------------------------------------------------------
# Faster R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick and Sean Bell
# --------------------------------------------------------
# ------------------------------------------------------... | 0 | 0 | 0 | 6,803 | 0 | 0 | 0 | 96 | 156 |
73ce5db01b6dfade0f9838137e60fbeb7db3fad4 | 19,966 | py | Python | pli/objutils.py | flynx/pli | 805234daba05d21698123883fabf4a877f2af8c1 | [
"BSD-3-Clause"
] | 1 | 2016-05-08T06:29:25.000Z | 2016-05-08T06:29:25.000Z | pli/objutils.py | flynx/pli | 805234daba05d21698123883fabf4a877f2af8c1 | [
"BSD-3-Clause"
] | null | null | null | pli/objutils.py | flynx/pli | 805234daba05d21698123883fabf4a877f2af8c1 | [
"BSD-3-Clause"
] | null | null | null | #=======================================================================
__version__ = '''0.0.22'''
__sub_version__ = '''20120704184132'''
__copyright__ = '''(c) Alex A. Naanou 2003-2008'''
#-----------------------------------------------------------------------
import sys
#----------------------------------------... | 31.641838 | 146 | 0.630221 | #=======================================================================
__version__ = '''0.0.22'''
__sub_version__ = '''20120704184132'''
__copyright__ = '''(c) Alex A. Naanou 2003-2008'''
#-----------------------------------------------------------------------
import types
import new
import sys
#---------------... | 0 | 1,840 | 0 | 13,321 | 0 | 509 | 0 | -20 | 226 |
e70ee3dd32583e25714a280f91b4da7f0dce0f08 | 9,887 | py | Python | sdks/python/.tox/py27gcp/lib/python2.7/site-packages/google/oauth2/flow.py | YYTVicky/kafka | b0f3eb276fa034b215570cd4f837851d9fb9166a | [
"Apache-2.0"
] | 35 | 2016-09-22T22:53:14.000Z | 2020-02-13T15:12:21.000Z | sdks/python/.tox/py27gcp/lib/python2.7/site-packages/google/oauth2/flow.py | axbaretto/presto | f137d2709db42b5c3e4d43a631832a8f74853065 | [
"Apache-2.0"
] | 28 | 2020-03-04T22:01:48.000Z | 2022-03-12T00:59:47.000Z | sdks/python/.tox/py27gcp/lib/python2.7/site-packages/google/oauth2/flow.py | axbaretto/presto | f137d2709db42b5c3e4d43a631832a8f74853065 | [
"Apache-2.0"
] | 88 | 2016-11-27T02:16:11.000Z | 2020-02-28T05:10:26.000Z | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 38.173745 | 79 | 0.658238 | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 0 | 2,935 | 0 | 4,808 | 0 | 0 | 0 | -2 | 68 |
03b7001fe0f5ae5469adaaa86f3e9d4ac2b49d88 | 2,429 | py | Python | Day 48 - Cookie Clicker Game/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | 2 | 2021-12-07T00:39:57.000Z | 2021-12-07T01:44:21.000Z | Day 48 - Cookie Clicker Game/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | null | null | null | Day 48 - Cookie Clicker Game/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | 1 | 2021-09-12T14:02:27.000Z | 2021-09-12T14:02:27.000Z | """
This program plays the cookie clicker game in an aoutmated way using the Selenium Webdriver Browser
"""
# Import required libraries
if __name__ == '__main__':
main()
| 33.273973 | 112 | 0.61548 | """
This program plays the cookie clicker game in an aoutmated way using the Selenium Webdriver Browser
"""
# Import required libraries
from selenium import webdriver
from time import time
def main():
chrome_driver_path = 'C:/Development/chromedriver.exe' # TODO: Download the driver and use your folder path
... | 0 | 0 | 0 | 0 | 0 | 2,175 | 0 | 9 | 67 |
4d427057d4a5cf2d3900052cee6fe7eec179a12c | 1,166 | py | Python | c2dh_nerd/ner/spacy.py | C2DH/c2dh_nerd | b0ff7649aa3d1e98c217c518d8f9a3d75870f6c0 | [
"MIT"
] | null | null | null | c2dh_nerd/ner/spacy.py | C2DH/c2dh_nerd | b0ff7649aa3d1e98c217c518d8f9a3d75870f6c0 | [
"MIT"
] | null | null | null | c2dh_nerd/ner/spacy.py | C2DH/c2dh_nerd | b0ff7649aa3d1e98c217c518d8f9a3d75870f6c0 | [
"MIT"
] | null | null | null |
MODELS_MAPPING = {
'small_en': 'en_core_web_sm',
'small_multi': 'xx_ent_wiki_sm',
# 'large_en': 'en_core_web_lg'
}
| 31.513514 | 107 | 0.72813 |
from .ner import NER, TextOrSentences, text_to_sentences, sentences_to_text
from .result import NerResult, NerResultEntity
from .mapping import ONTONOTES_TO_WIKIPEDIA_LABEL_MAPPING
MODELS_MAPPING = {
'small_en': 'en_core_web_sm',
'small_multi': 'xx_ent_wiki_sm',
# 'large_en': 'en_core_web_lg'
}
def as_ner_resu... | 0 | 0 | 161 | 418 | 0 | 236 | 0 | 115 | 113 |
33dcc4c47a3ca0f7d702a7d664fcf915b5370e6f | 2,976 | py | Python | pythonExcelReader/opencv-people-counter-master/raspberry.py | amirsaleh-salehzadeh/BehaveNet | 1dcdfa3d9efd022f29f37495be15f9657c5e7374 | [
"MIT"
] | 1 | 2019-03-06T13:45:23.000Z | 2019-03-06T13:45:23.000Z | pythonExcelReader/opencv-people-counter-master/raspberry.py | amirsaleh-salehzadeh/BehaveNet | 1dcdfa3d9efd022f29f37495be15f9657c5e7374 | [
"MIT"
] | null | null | null | pythonExcelReader/opencv-people-counter-master/raspberry.py | amirsaleh-salehzadeh/BehaveNet | 1dcdfa3d9efd022f29f37495be15f9657c5e7374 | [
"MIT"
] | 1 | 2019-12-19T15:12:53.000Z | 2019-12-19T15:12:53.000Z | import imutils
import cv2
from picamera.array import PiRGBArray
from picamera import PiCamera
avg = None
xvalues = list()
motion = list()
count1 = 0
count2 = 0
with PiCamera(resolution=(640,480), framerate=30) as camera:
with PiRGBArray(camera, size=(640,480)) as rawCapture:
for f in camera.capture_contin... | 35.855422 | 113 | 0.510081 | import numpy as np
import time
import imutils
import cv2
from picamera.array import PiRGBArray
from picamera import PiCamera
avg = None
xvalues = list()
motion = list()
count1 = 0
count2 = 0
def find_majority(k):
myMap = {}
maximum = ( '', 0 ) # (occurring element, occurrences)
for n in k:
if n in ... | 0 | 0 | 0 | 0 | 0 | 274 | 0 | -13 | 66 |
88a8511449d166aa00e31f502f264b20d8a22a86 | 5,735 | py | Python | LeeftijdsgroepenLandelijk.py | Corona-Locator-Nederland/corona-locator-nederland | 82727736a38894644843c548265fec3df6b52643 | [
"MIT"
] | null | null | null | LeeftijdsgroepenLandelijk.py | Corona-Locator-Nederland/corona-locator-nederland | 82727736a38894644843c548265fec3df6b52643 | [
"MIT"
] | null | null | null | LeeftijdsgroepenLandelijk.py | Corona-Locator-Nederland/corona-locator-nederland | 82727736a38894644843c548265fec3df6b52643 | [
"MIT"
] | null | null | null | # %%
from IPython import get_ipython
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
get_ipython().run_line_magic('run', 'setup')
# %% leeftijdsgroepen: download RIVM data
#leeftijdsgroepen = SimpleNamespace()
# %% Download de bevolkings cijfers van CBS, uitgespl... | 40.964286 | 176 | 0.632781 | # %%
from IPython import get_ipython
from IPython.core.display import display
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
get_ipython().run_line_magic('run', 'setup')
# %% leeftijdsgroepen: download RIVM data
#leeftijdsgroepen = SimpleNamespace()
@run
def cell... | 0 | 4,855 | 0 | 0 | 0 | 0 | 0 | 19 | 88 |
bd52b8ca37efd0230e66a9a874bd7d3e4d4b4e83 | 6,422 | py | Python | etcd_watcher/etcd_client.py | tony-yin/etcd_watcher | 452a68d15ca38b7a572870cfef7a25c5035808b7 | [
"MIT"
] | 4 | 2019-08-23T11:30:00.000Z | 2020-06-15T00:44:00.000Z | etcd_watcher/etcd_client.py | aland-zhang/etcd_watcher | 452a68d15ca38b7a572870cfef7a25c5035808b7 | [
"MIT"
] | 1 | 2021-11-15T17:48:58.000Z | 2021-11-15T17:48:58.000Z | etcd_watcher/etcd_client.py | aland-zhang/etcd_watcher | 452a68d15ca38b7a572870cfef7a25c5035808b7 | [
"MIT"
] | 1 | 2020-07-10T03:46:01.000Z | 2020-07-10T03:46:01.000Z | import sys
import traceback
from log import get_logger
logger = get_logger(__name__, '/var/log/etcd_watcher.log')
if __name__ == "__main__":
try:
args = sys.argv
logger.info("etcd client args: {}".format(str(args)))
if len(args) < 2:
logger.error("Invalid parameter length!")... | 32.933333 | 77 | 0.541732 | import sys
import etcd
import traceback
from log import get_logger
logger = get_logger(__name__, '/var/log/etcd_watcher.log')
class EtcdClient(object):
def __init__(self):
self.hostname = get_hostname()
self.connect()
self.ttl = 60
self.store_dir = '/etcd_watcher'
self.mas... | 0 | 0 | 0 | 4,431 | 0 | 96 | 0 | -10 | 68 |
bc1ce66b367f6a0de981e7f173abc81e14af0dc1 | 482 | py | Python | ocha/libs/scp_utils.py | Blesproject/GENERATOR | a56c6ee6086dcd268bd021355131f0c23508b12d | [
"MIT"
] | 1 | 2019-01-27T16:32:24.000Z | 2019-01-27T16:32:24.000Z | ocha/libs/scp_utils.py | Blesproject/GENERATOR | a56c6ee6086dcd268bd021355131f0c23508b12d | [
"MIT"
] | 5 | 2020-03-24T16:41:48.000Z | 2021-04-30T20:45:32.000Z | ocha/libs/scp_utils.py | hammer-code/ocha-cli | bd066318ddebfaaa7c30d8bff997e2b111400001 | [
"MIT"
] | null | null | null | import paramiko
import os
CURR_DIR = os.getcwd()
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
| 21.909091 | 71 | 0.724066 | import paramiko
import os
from ocha.libs import utils
CURR_DIR = os.getcwd()
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
def ssh_connect(host, username, key_filename=None):
try:
ssh.connect(host, username=username, key_filename=key_filename)
except Exception ... | 0 | 0 | 0 | 0 | 0 | 271 | 0 | 6 | 68 |
d0acb10e66ad224fd4c8a1fa5346abef03cc290e | 2,348 | py | Python | model_training/04_clean_others.py | linsalrob/PhANNs | ba96a57226ea811fd5a284170367547cd35f9c03 | [
"MIT"
] | 10 | 2020-07-16T16:26:23.000Z | 2022-02-25T13:59:16.000Z | model_training/04_clean_others.py | linsalrob/PhANNs | ba96a57226ea811fd5a284170367547cd35f9c03 | [
"MIT"
] | 8 | 2020-08-26T16:08:39.000Z | 2022-02-23T20:36:25.000Z | model_training/04_clean_others.py | linsalrob/PhANNs | ba96a57226ea811fd5a284170367547cd35f9c03 | [
"MIT"
] | 3 | 2019-12-11T00:36:57.000Z | 2021-07-23T01:00:45.000Z | # -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.3.0
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# --... | 35.044776 | 314 | 0.704003 | # -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.3.0
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# --... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | -16 | 44 |
b10915282524ed32b82e2a2ce9dc5e9938f27e41 | 3,845 | py | Python | Blender/RT_ParticleExporter/ParticleExporter_UI.py | rectdev/BlenderToUnityParticleTransfer | 134536d9997c5e7a16a64ce98f0e559667fe1be3 | [
"MIT"
] | null | null | null | Blender/RT_ParticleExporter/ParticleExporter_UI.py | rectdev/BlenderToUnityParticleTransfer | 134536d9997c5e7a16a64ce98f0e559667fe1be3 | [
"MIT"
] | null | null | null | Blender/RT_ParticleExporter/ParticleExporter_UI.py | rectdev/BlenderToUnityParticleTransfer | 134536d9997c5e7a16a64ce98f0e559667fe1be3 | [
"MIT"
] | null | null | null | import bpy
import sys
import os
dir = os.path.dirname(bpy.data.filepath)
if not dir in sys.path:
sys.path.append(dir)
classes = [
PEProperties,
PEXPORT_PT_main_panel,
PEXPORT_OT_Export,
PEXPORT_OT_GetParticles,
]
if __name__ == "__main__":
register() | 29.806202 | 108 | 0.677503 | import bpy
import sys
import os
dir = os.path.dirname(bpy.data.filepath)
if not dir in sys.path:
sys.path.append(dir)
from RT_ParticleExporter.ParticleExporter import ParticleExporter
class PEProperties(bpy.types.PropertyGroup):
ps_container: bpy.props.PointerProperty(name="Particle System", type=bpy.types.O... | 0 | 0 | 0 | 3,115 | 0 | 241 | 0 | 44 | 161 |
42e4f948a7de361821a41895fb05cdaab2a378c9 | 1,349 | py | Python | src/booze/util_test.py | slobberchops/booze | e7d5fc8f61ce0431d7a7180c7e62724c3b5fc39d | [
"Apache-2.0"
] | null | null | null | src/booze/util_test.py | slobberchops/booze | e7d5fc8f61ce0431d7a7180c7e62724c3b5fc39d | [
"Apache-2.0"
] | null | null | null | src/booze/util_test.py | slobberchops/booze | e7d5fc8f61ce0431d7a7180c7e62724c3b5fc39d | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Rafe Kaplan
#
# 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, soft... | 26.45098 | 74 | 0.684952 | # Copyright 2015 Rafe Kaplan
#
# 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, soft... | 0 | 96 | 0 | 544 | 0 | 0 | 0 | 1 | 69 |
f2539ff16147d9eb15dae25f80b5d0a85fe560f8 | 1,209 | py | Python | setup.py | ankitaliya/csv_db_package | 4c61a26132c7ce1de4440c1fc0ca6cf1ee39c0a3 | [
"MIT"
] | null | null | null | setup.py | ankitaliya/csv_db_package | 4c61a26132c7ce1de4440c1fc0ca6cf1ee39c0a3 | [
"MIT"
] | null | null | null | setup.py | ankitaliya/csv_db_package | 4c61a26132c7ce1de4440c1fc0ca6cf1ee39c0a3 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as file:
long_description = file.read()
setuptools.setup(
name="csv_db_package",
version="0.0.3",
author="Ankita Liya",
author_email="ankitaliya321@gmail.com",
description="This package is found useful for those who wants to modif... | 39 | 115 | 0.661704 | import setuptools
with open("README.md", "r", encoding="utf-8") as file:
long_description = file.read()
setuptools.setup(
name="csv_db_package",
version="0.0.3",
author="Ankita Liya",
author_email="ankitaliya321@gmail.com",
description="This package is found useful for those who wants to modif... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bde6a40044f20673c0be26b98b6cac3adc58bc61 | 2,429 | py | Python | Script.py | DAWOODSKYM/PYQT5 | c61f5f822ef464a9c56a0c6f3f516deff02b0078 | [
"MIT"
] | null | null | null | Script.py | DAWOODSKYM/PYQT5 | c61f5f822ef464a9c56a0c6f3f516deff02b0078 | [
"MIT"
] | null | null | null | Script.py | DAWOODSKYM/PYQT5 | c61f5f822ef464a9c56a0c6f3f516deff02b0078 | [
"MIT"
] | null | null | null | from PyQt5 import QtWidgets
import sys
app = QtWidgets.QApplication([])
win = MainPage()
win.show()
try:
sys.exit(app.exec())
except:
print("EXITING") | 47.627451 | 234 | 0.714286 | import PyQt5
from PyQt5 import QtWidgets, uic
from PyQt5.uic import loadUi
from PyQt5.QtWidgets import QApplication,QMainWindow,QDialog,QWidget
import arcpy
import os
import sys
class MainPage(QMainWindow):
def __init__(self):
super(MainPage,self).__init__()
loadUi("GUI_file.ui",self)
self.... | 0 | 0 | 0 | 2,079 | 0 | 0 | 0 | 29 | 145 |
67a3b50bacd054935a4c7e881b37392ffc85a9d8 | 1,506 | py | Python | quarrel/types/emoji.py | mrvillage/quarrel | 6a8ea9cbf714daedd1f2d84d7c84f3aad0e3b63d | [
"MIT"
] | 2 | 2022-01-26T02:30:29.000Z | 2022-01-26T03:24:10.000Z | quarrel/types/emoji.py | mrvillage/quarrel | 6a8ea9cbf714daedd1f2d84d7c84f3aad0e3b63d | [
"MIT"
] | null | null | null | quarrel/types/emoji.py | mrvillage/quarrel | 6a8ea9cbf714daedd1f2d84d7c84f3aad0e3b63d | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2021-present Village
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, mer... | 32.042553 | 75 | 0.77822 | """
The MIT License (MIT)
Copyright (c) 2021-present Village
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, mer... | 0 | 0 | 0 | 207 | 0 | 0 | 0 | 35 | 114 |
10546e4fcc8399ee68a64c25bfd10e7e464e06f6 | 3,718 | py | Python | opencv_project_python-master/opencv_project_python-master/10.apdx/face_swap.py | dongrami0425/Python_OpenCV-Study | c7faee4f63720659280c3222ba5abfe27740d1f4 | [
"MIT"
] | null | null | null | opencv_project_python-master/opencv_project_python-master/10.apdx/face_swap.py | dongrami0425/Python_OpenCV-Study | c7faee4f63720659280c3222ba5abfe27740d1f4 | [
"MIT"
] | null | null | null | opencv_project_python-master/opencv_project_python-master/10.apdx/face_swap.py | dongrami0425/Python_OpenCV-Study | c7faee4f63720659280c3222ba5abfe27740d1f4 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import dlib
# ---
detector = dlib.get_frontal_face_detector()
predictor = dlib.shape_predictor('./shape_predictor_68_face_landmarks.dat')
# ---
# ---
# ---
if __name__ == '__main__' :
# ---
img1 = cv2.imread('../img/boy_face.jpg')
img2 = cv2.imread(... | 36.811881 | 80 | 0.561592 | import cv2
import numpy as np
import dlib
import sys
# 얼굴 검출기와 랜드마크 검출기 생성 --- ①
detector = dlib.get_frontal_face_detector()
predictor = dlib.shape_predictor('./shape_predictor_68_face_landmarks.dat')
# 얼굴 및 랜드마크 검출해서 좌표 반환하는 함수 ---②
def getPoints(img):
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
rects = de... | 447 | 0 | 0 | 0 | 0 | 2,051 | 0 | -11 | 92 |
3969219adc6146502fe0b09f4f21e232407d2343 | 173 | py | Python | reddit_credentials.py | ablimdev/wsb-sentiment-analysis | fb0ac5ff27afd36db3644fb5dc366cf37e985cd3 | [
"MIT"
] | null | null | null | reddit_credentials.py | ablimdev/wsb-sentiment-analysis | fb0ac5ff27afd36db3644fb5dc366cf37e985cd3 | [
"MIT"
] | null | null | null | reddit_credentials.py | ablimdev/wsb-sentiment-analysis | fb0ac5ff27afd36db3644fb5dc366cf37e985cd3 | [
"MIT"
] | null | null | null | #input your own client info from
#reddit>user settings>privacy &security>manage third-party app authorization
CLIENT_ID = ""
CLIENT_SECRETS = ""
USER_AGENT = "" # any input | 34.6 | 76 | 0.763006 | #input your own client info from
#reddit>user settings>privacy &security>manage third-party app authorization
CLIENT_ID = ""
CLIENT_SECRETS = ""
USER_AGENT = "" # any input | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bf998bba6bef57b6f159ec1123d0433a4eca879b | 13,740 | py | Python | class-21-3-24/common/models/model.py | ZZh2333/PublicOpinionAnalysisandSocialComputing | cea79370183c3e0c2fdda4641f79309bd40ddb93 | [
"MIT"
] | 1 | 2021-03-28T05:57:30.000Z | 2021-03-28T05:57:30.000Z | class-21-3-24/common/models/model.py | ZZh2333/PublicOpinionAnalysisandSocialComputing | cea79370183c3e0c2fdda4641f79309bd40ddb93 | [
"MIT"
] | null | null | null | class-21-3-24/common/models/model.py | ZZh2333/PublicOpinionAnalysisandSocialComputing | cea79370183c3e0c2fdda4641f79309bd40ddb93 | [
"MIT"
] | null | null | null | # coding: utf-8
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
t_4sdian = db.Table(
'4sdian',
db.Column('id', db.Integer),
db.Column('loyalty', db.Float(asdecimal=True)),
db.Column('frequency', db.Integer),
db.Column('money', db.Float(asdecimal=True)),
db.Column('L', db.Text),
... | 35.688312 | 111 | 0.652183 | # coding: utf-8
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
t_4sdian = db.Table(
'4sdian',
db.Column('id', db.Integer),
db.Column('loyalty', db.Float(asdecimal=True)),
db.Column('frequency', db.Integer),
db.Column('money', db.Float(asdecimal=True)),
db.Column('L', db.Text),
... | 69 | 0 | 0 | 2,998 | 0 | 0 | 0 | 0 | 138 |
b70b69c228607bfe89975afa799dc396a96fd171 | 627 | py | Python | djaimes/machine-learning/discover.py | alexisperumal/ucsd_data_science_final_project | 91dbd79379e7e48bb35493bc8877f39ca17ed897 | [
"MIT"
] | 1 | 2020-05-03T04:44:01.000Z | 2020-05-03T04:44:01.000Z | djaimes/machine-learning/discover.py | gthompsonku/predicting_covid_with_bloodtest | b3590479eb341c6128976e95fd94aeb31dc4e7c9 | [
"MIT"
] | null | null | null | djaimes/machine-learning/discover.py | gthompsonku/predicting_covid_with_bloodtest | b3590479eb341c6128976e95fd94aeb31dc4e7c9 | [
"MIT"
] | 1 | 2021-09-29T23:27:26.000Z | 2021-09-29T23:27:26.000Z | import glob as gl
import pandas as pd
# Read original data
fname = 'diagnosis-of-covid-19-and-its-clinical-spectrum.csv'
path = gl.glob(f'../../**//**/{fname}')
df = pd.read_csv(path[0])
# Choose interesting columns and remove missing data
with open('data-columns.txt', 'r') as f:
colnames = f.read().splitlines()
df... | 28.5 | 62 | 0.695375 | import glob as gl
import pandas as pd
# Read original data
fname = 'diagnosis-of-covid-19-and-its-clinical-spectrum.csv'
path = gl.glob(f'../../**//**/{fname}')
df = pd.read_csv(path[0])
# Choose interesting columns and remove missing data
with open('data-columns.txt', 'r') as f:
colnames = f.read().splitlines()
df... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
93c40741eacb28fbc8a8e60f4c9b551e1a031bd7 | 885 | py | Python | vendor/iphone-dataprotection/python_scripts/crypto/aes.py | trailofbits/ios-integrity-validator | 2090e6321cd313493c6f3746866411d865cde6ab | [
"BSD-2-Clause"
] | 19 | 2019-04-27T15:09:22.000Z | 2022-03-27T14:06:15.000Z | vendor/iphone-dataprotection/python_scripts/crypto/aes.py | trailofbits/ios-integrity-validator | 2090e6321cd313493c6f3746866411d865cde6ab | [
"BSD-2-Clause"
] | null | null | null | vendor/iphone-dataprotection/python_scripts/crypto/aes.py | trailofbits/ios-integrity-validator | 2090e6321cd313493c6f3746866411d865cde6ab | [
"BSD-2-Clause"
] | 4 | 2020-11-10T19:23:01.000Z | 2022-02-25T02:10:19.000Z |
ZEROIV = "\x00"*16
def removePadding(blocksize, s):
'Remove rfc 1423 padding from string.'
n = ord(s[-1]) # last byte contains number of padding bytes
if n > blocksize or n > len(s):
raise Exception('invalid padding')
return s[:-n]
| 32.777778 | 64 | 0.622599 | from Crypto.Cipher import AES
ZEROIV = "\x00"*16
def removePadding(blocksize, s):
'Remove rfc 1423 padding from string.'
n = ord(s[-1]) # last byte contains number of padding bytes
if n > blocksize or n > len(s):
raise Exception('invalid padding')
return s[:-n]
def AESdecryptCBC(da... | 0 | 0 | 0 | 0 | 0 | 537 | 0 | 8 | 73 |
820768b33f2100415e1aa5af7ba098a6637b64d8 | 292 | py | Python | setup.py | wizath/pysett | 6a9a4d3c5ae118e5bfcd1b5996e85a12b989138a | [
"MIT"
] | null | null | null | setup.py | wizath/pysett | 6a9a4d3c5ae118e5bfcd1b5996e85a12b989138a | [
"MIT"
] | null | null | null | setup.py | wizath/pysett | 6a9a4d3c5ae118e5bfcd1b5996e85a12b989138a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
setup(name='pysett',
version='0.1',
description='python xml setting parser',
author='wizath',
author_email='wm.goldio@gmail.com',
url='https://github.com/wizath/pysett',
packages=['pysett'],
)
| 22.461538 | 46 | 0.626712 | #!/usr/bin/env python
from distutils.core import setup
setup(name='pysett',
version='0.1',
description='python xml setting parser',
author='wizath',
author_email='wm.goldio@gmail.com',
url='https://github.com/wizath/pysett',
packages=['pysett'],
)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2124b710d6ed0734ee590c8a84339148be1f5cec | 11,478 | py | Python | logpli.py | ghkonrad/logpli | 7ef7def5d01dac733855fbda1190ea2b85dbfe3d | [
"Apache-2.0"
] | null | null | null | logpli.py | ghkonrad/logpli | 7ef7def5d01dac733855fbda1190ea2b85dbfe3d | [
"Apache-2.0"
] | null | null | null | logpli.py | ghkonrad/logpli | 7ef7def5d01dac733855fbda1190ea2b85dbfe3d | [
"Apache-2.0"
] | 1 | 2020-10-07T09:38:17.000Z | 2020-10-07T09:38:17.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#############################################################################
# Copyright 2018 Konrad Sakowski, Stanislaw Krukowski, Pawel Strak
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with ... | 31.105691 | 215 | 0.625545 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#############################################################################
# Copyright 2018 Konrad Sakowski, Stanislaw Krukowski, Pawel Strak
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with ... | 20 | 0 | 0 | 0 | 0 | 7,871 | 0 | -26 | 341 |
bb376023cae707cb955c09c9084d7432877d7637 | 1,055 | py | Python | Packs/ML/Scripts/ImportMLModel/ImportMLModel_test.py | ddi-danielsantander/content | 67e2edc404f50c332d928dbdbce00a447bb5532f | [
"MIT"
] | 1 | 2021-08-07T00:21:58.000Z | 2021-08-07T00:21:58.000Z | Packs/ML/Scripts/ImportMLModel/ImportMLModel_test.py | ddi-danielsantander/content | 67e2edc404f50c332d928dbdbce00a447bb5532f | [
"MIT"
] | 14 | 2019-08-29T12:38:34.000Z | 2020-10-28T11:46:49.000Z | Packs/ML/Scripts/ImportMLModel/ImportMLModel_test.py | ddi-danielsantander/content | 67e2edc404f50c332d928dbdbce00a447bb5532f | [
"MIT"
] | 2 | 2020-10-11T18:01:32.000Z | 2020-10-14T03:21:23.000Z |
done = False
| 29.305556 | 81 | 0.647393 | from ImportMLModel import main
import demistomock as demisto
done = False
def test_main(mocker):
mocker.patch.object(demisto, 'args', return_value={
"entryID": 'id',
"modelName": 'model'
})
def get_file_path(entry_id):
return {'path': './TestData/entry_file'}
def execute_co... | 0 | 0 | 0 | 0 | 0 | 955 | 0 | 17 | 68 |
cf2f17aa286b83419fdc901a8bfd64ee01353fc8 | 4,049 | py | Python | tick.py | Mause/tuya_graphing | 8fa92b81ea01ca4253001179088054164e683b97 | [
"MIT"
] | null | null | null | tick.py | Mause/tuya_graphing | 8fa92b81ea01ca4253001179088054164e683b97 | [
"MIT"
] | null | null | null | tick.py | Mause/tuya_graphing | 8fa92b81ea01ca4253001179088054164e683b97 | [
"MIT"
] | null | null | null | from typing import TypeVar
import tinytuya
from pytz import timezone
PERTH = timezone("Australia/Perth")
T = TypeVar("T")
d = tinytuya.Cloud()
if __name__ == "__main__":
main()
| 22.747191 | 80 | 0.568535 | import json
from datetime import date, datetime, timedelta
from typing import Any, Generator, Generic, List, Optional, TypeVar
import pandas as pd
import plotly.express as px
import tinytuya
from pydantic import BaseModel
from pydantic.generics import GenericModel
from pytemperature import f2c
from pytz import timezon... | 0 | 0 | 0 | 362 | 845 | 2,100 | 0 | 115 | 430 |
0a7d26b261e998232d98217b45d11837b1f00517 | 1,852 | py | Python | agilkia/__init__.py | PHILAE-PROJECT/agilkia | d54741fd7e4b1c965db9a9f87ffcbeec1c9a68ef | [
"MIT"
] | 1 | 2022-02-08T08:14:56.000Z | 2022-02-08T08:14:56.000Z | agilkia/__init__.py | PHILAE-PROJECT/agilkia | d54741fd7e4b1c965db9a9f87ffcbeec1c9a68ef | [
"MIT"
] | null | null | null | agilkia/__init__.py | PHILAE-PROJECT/agilkia | d54741fd7e4b1c965db9a9f87ffcbeec1c9a68ef | [
"MIT"
] | null | null | null | """Automated smart testing strategies for web services.
This 'agilkia' package is for testing web services and managing set of traces.
Traces may come from user interactions, or from automated test suites, etc.
The main data structure for traces is the ``TraceSet``:
* class TraceSet supports loading/saving traces as ... | 47.487179 | 88 | 0.739201 | """Automated smart testing strategies for web services.
This 'agilkia' package is for testing web services and managing set of traces.
Traces may come from user interactions, or from automated test suites, etc.
The main data structure for traces is the ``TraceSet``:
* class TraceSet supports loading/saving traces as ... | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 45 |
5b97aeace18bf670fdbce20903c1639711b6c378 | 395 | py | Python | django_rq_dashboard/urls.py | BureauxLocaux/django-rq-dashboard | 2fd78d37130f90e0fe5bd34014177a5bb219eb6b | [
"BSD-3-Clause"
] | 53 | 2015-01-24T19:38:57.000Z | 2022-02-08T11:22:17.000Z | django_rq_dashboard/urls.py | domengorjup/django-rq-dashboard | 2fd78d37130f90e0fe5bd34014177a5bb219eb6b | [
"BSD-3-Clause"
] | 19 | 2015-09-16T16:46:06.000Z | 2020-07-27T22:46:01.000Z | django_rq_dashboard/urls.py | domengorjup/django-rq-dashboard | 2fd78d37130f90e0fe5bd34014177a5bb219eb6b | [
"BSD-3-Clause"
] | 37 | 2015-01-21T05:21:49.000Z | 2020-09-15T14:33:51.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.stats, name='rq_stats'),
url(r'^queues/(?P<queue>.+)/$', views.queue, name='rq_queue'),
url(r'^workers/(?P<worker>.+)/$', views.worker, name='rq_worker'),
url(r'^jobs/(?P<job>.+)/$', views.job, name='rq_job'),
u... | 30.384615 | 77 | 0.602532 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.stats, name='rq_stats'),
url(r'^queues/(?P<queue>.+)/$', views.queue, name='rq_queue'),
url(r'^workers/(?P<worker>.+)/$', views.worker, name='rq_worker'),
url(r'^jobs/(?P<job>.+)/$', views.job, name='rq_job'),
u... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
55adcf0a4ba882a11d46a202edbd2b2319c17bd4 | 7,160 | py | Python | ihec/ihec_data_hub.py | ENCODE-DCC/pyencoded-tools | bcaf9994d69a80a2eda8455399fe34e8f25c436a | [
"MIT"
] | 9 | 2016-08-23T15:59:12.000Z | 2021-07-16T00:54:54.000Z | ihec/ihec_data_hub.py | ENCODE-DCC/pyencoded-tools | bcaf9994d69a80a2eda8455399fe34e8f25c436a | [
"MIT"
] | 12 | 2016-11-18T18:56:42.000Z | 2021-03-11T20:25:14.000Z | ihec/ihec_data_hub.py | ENCODE-DCC/pyencoded-tools | bcaf9994d69a80a2eda8455399fe34e8f25c436a | [
"MIT"
] | 14 | 2016-02-17T04:24:07.000Z | 2020-02-28T21:36:19.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Print experiment.xml
# https://github.com/IHEC/ihec-metadata/blob/master/specs/Ihec_metadata_specification.md
# Ihec_metadata_specification.md:
# Chromatin Accessibility, WGBS, MeDIP-Seq, MRE-Seq, ChIP-Seq, RNA-Seq
# I added ATAC-seq, RRBS following existing data for... | 33.148148 | 127 | 0.523184 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Print experiment.xml
# https://github.com/IHEC/ihec-metadata/blob/master/specs/Ihec_metadata_specification.md
# Ihec_metadata_specification.md:
# Chromatin Accessibility, WGBS, MeDIP-Seq, MRE-Seq, ChIP-Seq, RNA-Seq
# I added ATAC-seq, RRBS following existing data for... | 0 | 0 | 0 | 0 | 0 | 4,151 | 0 | -40 | 135 |
11a26023d8cb8f36aac49e798c74a814265f62b9 | 6,385 | py | Python | spaceplanner/models.py | prznoc/osplanner | c58ff129fde3f1513738cf27f9d3692fb7d549ea | [
"MIT"
] | null | null | null | spaceplanner/models.py | prznoc/osplanner | c58ff129fde3f1513738cf27f9d3692fb7d549ea | [
"MIT"
] | null | null | null | spaceplanner/models.py | prznoc/osplanner | c58ff129fde3f1513738cf27f9d3692fb7d549ea | [
"MIT"
] | null | null | null | from django.utils.translation import ugettext_lazy as _
| 54.110169 | 152 | 0.708379 | from django.db import models
from django.core.validators import MaxValueValidator, MinValueValidator
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import receiver
from .app_logic import calendar_functions
c... | 0 | 239 | 0 | 5,711 | 0 | 0 | 0 | 128 | 248 |
c252be054b6b6f382cd8d93859206a6a437a1d61 | 7,337 | py | Python | fee/embedding/loader.py | FEE-Fair-Embedding-Engine/FEE | 013a540069ef433d579e4ea2e5f21aa2a3f86815 | [
"MIT"
] | 8 | 2020-09-26T13:27:25.000Z | 2020-12-15T04:00:53.000Z | fee/embedding/loader.py | FEE-Fair-Embedding-Engine/FEE | 013a540069ef433d579e4ea2e5f21aa2a3f86815 | [
"MIT"
] | null | null | null | fee/embedding/loader.py | FEE-Fair-Embedding-Engine/FEE | 013a540069ef433d579e4ea2e5f21aa2a3f86815 | [
"MIT"
] | 2 | 2020-11-24T13:47:10.000Z | 2021-09-15T12:35:57.000Z | # from tqdl import download
# if __name__ == "__main__":
# E = WE().load(ename = "glove-wiki-gigaword-100", normalize=True)
# print(E.v('dog'))
# print(E) | 31.625 | 94 | 0.507428 | import zipfile
import os
# from tqdl import download
from tqdm import tqdm
import re
import gc
import numpy as np
import codecs
import gensim.downloader as api
from gensim.test.utils import get_tmpfile
class WE():
"""The Word embedding class.
The main class that facilitates the word embedding struct... | 0 | 0 | 0 | 6,949 | 0 | 0 | 0 | -24 | 242 |
6c12f88bb477400ceca80b74e1b2f790582c0e79 | 6,818 | py | Python | alvadescpy/wrapper.py | ECRL/alvaDescPy | f90178ccdfe70fbf9c3982eeb6759beb60b33f78 | [
"MIT"
] | 3 | 2021-05-28T07:52:35.000Z | 2022-01-03T21:29:01.000Z | alvadescpy/wrapper.py | ECRL/alvaDescPy | f90178ccdfe70fbf9c3982eeb6759beb60b33f78 | [
"MIT"
] | null | null | null | alvadescpy/wrapper.py | ECRL/alvaDescPy | f90178ccdfe70fbf9c3982eeb6759beb60b33f78 | [
"MIT"
] | 2 | 2020-07-06T01:54:55.000Z | 2020-10-07T11:43:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# alvadescpy/wrapper.py
# v.0.1.2
# Developed in 2019 by Travis Kessler <travis.j.kessler@gmail.com>
#
# contains `alvadesc` function, a wrapper for alvaDesc software
#
# stdlib. imports
from subprocess import PIPE, Popen
from typing import TypeVar
import platform
# pat... | 36.459893 | 89 | 0.623057 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# alvadescpy/wrapper.py
# v.0.1.2
# Developed in 2019 by Travis Kessler <travis.j.kessler@gmail.com>
#
# contains `alvadesc` function, a wrapper for alvaDesc software
#
# stdlib. imports
from subprocess import check_output, PIPE, Popen, call
from csv import writer, QUOTE... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 44 |