hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
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
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7494be913e0253f7134ae282db90450099e8324
29,431
py
Python
lime/scripts/qc_datasets/ht_off_opt.py
choderalab/gin
9082431d8b664699a898c1e2fa490a18737d6e2d
[ "MIT" ]
24
2019-07-20T22:37:09.000Z
2021-07-07T07:13:56.000Z
lime/scripts/qc_datasets/ht_off_opt.py
choderalab/gin
9082431d8b664699a898c1e2fa490a18737d6e2d
[ "MIT" ]
3
2021-05-10T05:29:59.000Z
2022-02-10T00:15:05.000Z
lime/scripts/qc_datasets/ht_off_opt.py
kuano-ai/gimlet
9082431d8b664699a898c1e2fa490a18737d6e2d
[ "MIT" ]
8
2019-08-09T17:30:20.000Z
2021-12-01T13:27:46.000Z
# ============================================================================= # imports # ============================================================================= import os import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) t...
34.706368
101
0.45639
import os import sys os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) tf.autograph.set_verbosity(3) from sklearn import metrics import gin import lime import pandas as pd import numpy as np TRANSLATION = { 6: 0, 7: 1, 8: 2...
true
true
f7494ca07d0155c16055cc563133a9131bfa2a9d
2,932
py
Python
test/CXX/CXXCOMSTR.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
1,403
2017-11-23T14:24:01.000Z
2022-03-30T20:59:39.000Z
test/CXX/CXXCOMSTR.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
3,708
2017-11-27T13:47:12.000Z
2022-03-29T17:21:17.000Z
test/CXX/CXXCOMSTR.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
281
2017-12-01T23:48:38.000Z
2022-03-31T15:25:44.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
34.093023
76
0.713847
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons _python_ = TestSCons._python_ test = TestSCons.TestSCons() test.file_fixture('mycompile.py') alt_cpp_suffix=test.get_alt_cpp_suffix() test.write('SConstruct', """ env = Environment(CXXCOM = r'%(_python_)s mycom...
true
true
f7494d22037f2e1ad12c3ae143d067288ddc4cbd
566
py
Python
faasmcli/faasmcli/util/config.py
mfournial/Faasm
f6c48b8b38b78c1b14a7b5557f3bccad9d4424ae
[ "Apache-2.0" ]
1
2020-04-21T07:33:42.000Z
2020-04-21T07:33:42.000Z
faasmcli/faasmcli/util/config.py
mfournial/Faasm
f6c48b8b38b78c1b14a7b5557f3bccad9d4424ae
[ "Apache-2.0" ]
4
2020-02-03T18:54:32.000Z
2020-05-13T18:28:28.000Z
faasmcli/faasmcli/util/config.py
mfournial/Faasm
f6c48b8b38b78c1b14a7b5557f3bccad9d4424ae
[ "Apache-2.0" ]
null
null
null
import configparser from os import makedirs from os.path import exists from faasmcli.util.env import FAASM_CONFIG_FILE, FAASM_HOME def get_faasm_config(): if not exists(FAASM_HOME): makedirs(FAASM_HOME, exist_ok=True) config = configparser.ConfigParser() if not exists(FAASM_CONFIG_FILE): ...
22.64
69
0.696113
import configparser from os import makedirs from os.path import exists from faasmcli.util.env import FAASM_CONFIG_FILE, FAASM_HOME def get_faasm_config(): if not exists(FAASM_HOME): makedirs(FAASM_HOME, exist_ok=True) config = configparser.ConfigParser() if not exists(FAASM_CONFIG_FILE): ...
true
true
f7494d6fdcbede39ce6d89974d432408881d55dd
3,822
py
Python
sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py
sima-zhu/azure-sdk-for-python
a413dc783f0df7dc65e9c2ef9762fabff1708c4e
[ "MIT" ]
2
2019-05-17T21:24:53.000Z
2020-02-12T11:13:42.000Z
sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py
sima-zhu/azure-sdk-for-python
a413dc783f0df7dc65e9c2ef9762fabff1708c4e
[ "MIT" ]
null
null
null
sdk/textanalytics/azure-ai-textanalytics/tests/test_encoding.py
sima-zhu/azure-sdk-for-python
a413dc783f0df7dc65e9c2ef9762fabff1708c4e
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import pytest import platform import functools from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.credential...
43.431818
184
0.697017
import pytest import platform import functools from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.credentials import AzureKeyCredential from testcase import TextAnalyticsTest, GlobalTextAnalyticsAccountPreparer from testcase import TextAnalyticsClientPreparer as _TextA...
true
true
f7494e232418752a78f12d949eb960c2a39e32ba
11,460
py
Python
python3/vdebug/connection.py
aleixq/vdebug
3484f1aa73d26c40bfb6144aec97438009c2fed4
[ "MIT" ]
568
2015-01-02T17:56:55.000Z
2018-03-12T05:34:15.000Z
python3/vdebug/connection.py
aleixq/vdebug
3484f1aa73d26c40bfb6144aec97438009c2fed4
[ "MIT" ]
182
2018-03-12T16:43:18.000Z
2022-02-27T12:06:40.000Z
python3/vdebug/connection.py
aleixq/vdebug
3484f1aa73d26c40bfb6144aec97438009c2fed4
[ "MIT" ]
92
2015-02-23T03:36:31.000Z
2018-02-16T05:26:00.000Z
import errno import queue import socket import sys import threading import time import asyncio import xml.etree.ElementTree as ET from . import log class ConnectionHandler: """Handles read and write operations to a given socket.""" def __init__(self, socket, address): """Accept the socket used for r...
33.217391
118
0.582897
import errno import queue import socket import sys import threading import time import asyncio import xml.etree.ElementTree as ET from . import log class ConnectionHandler: def __init__(self, socket, address): self.sock = socket self.address = address def __del__(self): self.close()...
true
true
f7494fd976786236231da194b90556f35bac7c4b
1,945
py
Python
gen_vocab_vecs.py
jacksonwalters/wordchef
3edc2f8d5cbbaa064245ebaae923da68cae6556f
[ "MIT" ]
null
null
null
gen_vocab_vecs.py
jacksonwalters/wordchef
3edc2f8d5cbbaa064245ebaae923da68cae6556f
[ "MIT" ]
null
null
null
gen_vocab_vecs.py
jacksonwalters/wordchef
3edc2f8d5cbbaa064245ebaae923da68cae6556f
[ "MIT" ]
null
null
null
import spacy, numpy, random, pickle, pandas, sys import sklearn.neighbors as nbs from spacy.lookups import load_lookups MIN_PROB = -18 #load NLP tool spaCy print("Loading spaCy...") nlp=spacy.load("en_core_web_lg") print("spaCy loaded.") #load lexeme probability table lookups = load_lookups("en", ["lexeme_prob"]) n...
37.403846
130
0.758355
import spacy, numpy, random, pickle, pandas, sys import sklearn.neighbors as nbs from spacy.lookups import load_lookups MIN_PROB = -18 print("Loading spaCy...") nlp=spacy.load("en_core_web_lg") print("spaCy loaded.") lookups = load_lookups("en", ["lexeme_prob"]) nlp.vocab.lookups.add_table("lexeme_prob", lookups....
true
true
f7494fee212b077823d5655a55ce7f25bb79dbf3
506
py
Python
setup.py
bertrand-faure/popcorn
757ceee636bd5c4973373efde0f99943f94e4e19
[ "MIT" ]
11
2021-03-03T17:34:24.000Z
2021-11-20T02:27:01.000Z
setup.py
bertrand-faure/popcorn
757ceee636bd5c4973373efde0f99943f94e4e19
[ "MIT" ]
null
null
null
setup.py
bertrand-faure/popcorn
757ceee636bd5c4973373efde0f99943f94e4e19
[ "MIT" ]
4
2021-01-12T10:01:00.000Z
2021-12-03T10:08:11.000Z
from setuptools import setup setup(name='popcorn', version='0.0.1', description='Tomographic reconstruction tools, phase_contrast and spectral imaging', url='https://github.com/DoctorEmmetBrown/popcorn', author='Emmanuel Brun', author_email='emmanuel.brun@inserm.fr', license='MIT', ...
33.733333
95
0.642292
from setuptools import setup setup(name='popcorn', version='0.0.1', description='Tomographic reconstruction tools, phase_contrast and spectral imaging', url='https://github.com/DoctorEmmetBrown/popcorn', author='Emmanuel Brun', author_email='emmanuel.brun@inserm.fr', license='MIT', ...
true
true
f7495056e0c2c4ece49089887f538e84e703a1de
10,511
py
Python
pymatgen/analysis/interfaces/coherent_interfaces.py
naik-aakash/pymatgen
394e0d71bf1d1025fcf75498cbb16aa3f41ce78c
[ "MIT" ]
null
null
null
pymatgen/analysis/interfaces/coherent_interfaces.py
naik-aakash/pymatgen
394e0d71bf1d1025fcf75498cbb16aa3f41ce78c
[ "MIT" ]
null
null
null
pymatgen/analysis/interfaces/coherent_interfaces.py
naik-aakash/pymatgen
394e0d71bf1d1025fcf75498cbb16aa3f41ce78c
[ "MIT" ]
null
null
null
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module provides classes to store, generate, and manipulate material interfaces. """ from itertools import product from typing import Iterator, Optional, Tuple, Union import numpy as np from scipy.linalg import polar ...
36.244828
114
0.634383
from itertools import product from typing import Iterator, Optional, Tuple, Union import numpy as np from scipy.linalg import polar from pymatgen.analysis.elasticity.strain import Deformation from pymatgen.analysis.interfaces.zsl import ZSLGenerator, fast_norm from pymatgen.core import Structure from pymatgen.core...
true
true
f74950706a60c920426ecd4bc066d2a1cba07251
4,290
py
Python
src/task.py
jorsanpe/schedbot
a80d2a21e982815a7b6038e6c1fe9bd3c3987632
[ "Apache-2.0" ]
null
null
null
src/task.py
jorsanpe/schedbot
a80d2a21e982815a7b6038e6c1fe9bd3c3987632
[ "Apache-2.0" ]
null
null
null
src/task.py
jorsanpe/schedbot
a80d2a21e982815a7b6038e6c1fe9bd3c3987632
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2016 Jordi Sánchez # # 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...
25.535714
95
0.568531
from datetime import datetime import copy def compare_dates(date1, date2): if date1 < date2: return -1 elif date1 > date2: return 1 else: return 0 def compare_end_dates(date1, date2): if date1 and date2: return compare_dates(date1, date2) elif date1...
true
true
f749515c45eb2418b6d7c82ddfb65bbd2005cf95
487
py
Python
task2.py
vladgafarov/xmljson
cceb58728c58903136305d1bd22c158acc4d6845
[ "MIT" ]
null
null
null
task2.py
vladgafarov/xmljson
cceb58728c58903136305d1bd22c158acc4d6845
[ "MIT" ]
null
null
null
task2.py
vladgafarov/xmljson
cceb58728c58903136305d1bd22c158acc4d6845
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET import json from urllib.request import urlopen data = urlopen('https://lenta.ru/rss').read().decode('utf8') root = ET.fromstring(data) news = [] for event in root.findall(r'./channel/item'): event_dict = {} for child in event: event_dict[child.tag] = child.text ...
28.647059
78
0.691992
import xml.etree.ElementTree as ET import json from urllib.request import urlopen data = urlopen('https://lenta.ru/rss').read().decode('utf8') root = ET.fromstring(data) news = [] for event in root.findall(r'./channel/item'): event_dict = {} for child in event: event_dict[child.tag] = child.text ...
true
true
f74951b2d8a2cf56969f772ddf74af4b8e8ac0ec
13,557
py
Python
envs/gym-track2d/gym_track2d/envs/track_1v1.py
venom12138/active_tracking_rl
813342c322f8f710fc0f9ccf2a5d0746f955144f
[ "MIT" ]
2
2022-03-03T02:19:28.000Z
2022-03-10T14:59:33.000Z
envs/gym-track2d/gym_track2d/envs/track_1v1.py
venom12138/active_tracking_rl
813342c322f8f710fc0f9ccf2a5d0746f955144f
[ "MIT" ]
null
null
null
envs/gym-track2d/gym_track2d/envs/track_1v1.py
venom12138/active_tracking_rl
813342c322f8f710fc0f9ccf2a5d0746f955144f
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from matplotlib import colors import gym from gym import spaces from gym.utils import seeding from gym_track2d.envs.generators import RandomMazeGenerator, RandomBlockMazeGenerator from gym_track2d.envs.navigator import Navigator, RamAgent class Track1v1Env(gym.Env): ...
40.957704
126
0.588331
import numpy as np import matplotlib.pyplot as plt from matplotlib import colors import gym from gym import spaces from gym.utils import seeding from gym_track2d.envs.generators import RandomMazeGenerator, RandomBlockMazeGenerator from gym_track2d.envs.navigator import Navigator, RamAgent class Track1v1Env(gym.Env): ...
true
true
f7495266fd2e8d316ab9521e3ac94c0ce4f2f7d8
20,929
py
Python
src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/media/quicktime_mov.py
Mikevin/hobbits
0a99aa97a34abe06a8c0542acd5c96e1a7078ec4
[ "MIT" ]
null
null
null
src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/media/quicktime_mov.py
Mikevin/hobbits
0a99aa97a34abe06a8c0542acd5c96e1a7078ec4
[ "MIT" ]
null
null
null
src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/media/quicktime_mov.py
Mikevin/hobbits
0a99aa97a34abe06a8c0542acd5c96e1a7078ec4
[ "MIT" ]
null
null
null
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from pkg_resources import parse_version import kaitaistruct from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO from enum import Enum import collections if parse_version(kaitaistruct.__version__) < parse_versi...
43.602083
290
0.571121
from pkg_resources import parse_version import kaitaistruct from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO from enum import Enum import collections if parse_version(kaitaistruct.__version__) < parse_version('0.9'): raise Exception("Incompatible Kaitai Struct Python API: 0.9 or later is required, b...
true
true
f74953267fd7af46676bd267b0170d8c2a965f30
23,886
py
Python
ucsmsdk/mometa/nfs/NfsMountInst.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
78
2015-11-30T14:10:05.000Z
2022-02-13T00:29:08.000Z
ucsmsdk/mometa/nfs/NfsMountInst.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
113
2015-11-20T09:42:46.000Z
2022-03-16T16:53:29.000Z
ucsmsdk/mometa/nfs/NfsMountInst.py
Kego/ucsmsdk
244f283a5c295cf746110bb96686d079b19927ce
[ "Apache-2.0" ]
86
2015-12-12T08:22:18.000Z
2022-01-23T03:56:34.000Z
"""This module contains the general information for NfsMountInst ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class NfsMountInstConsts: ADMIN_STATE_MOUNT = "mount" ADMIN_STATE_NONE = "none" ADMIN_STATE_REMOUNT = ...
88.140221
3,774
0.762329
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class NfsMountInstConsts: ADMIN_STATE_MOUNT = "mount" ADMIN_STATE_NONE = "none" ADMIN_STATE_REMOUNT = "remount" ADMIN_STATE_UNMOUNT = "unmount" CLIENT_CONFIG_STATE_CONFIGURED = ...
true
true
f74953fdf17e207ecfcc926369ce31fc06940ddc
6,585
py
Python
babyai_sr/rl/utils/penv.py
thomasaunger/babyai_sr
27fba5fb960640ebc405de83d5ab75b8c6d50ad7
[ "BSD-3-Clause" ]
null
null
null
babyai_sr/rl/utils/penv.py
thomasaunger/babyai_sr
27fba5fb960640ebc405de83d5ab75b8c6d50ad7
[ "BSD-3-Clause" ]
null
null
null
babyai_sr/rl/utils/penv.py
thomasaunger/babyai_sr
27fba5fb960640ebc405de83d5ab75b8c6d50ad7
[ "BSD-3-Clause" ]
null
null
null
import gym from gym_minigrid.minigrid import OBJECT_TO_IDX, COLOR_TO_IDX from multiprocessing import Process, Pipe def get_global(env, obs): # get global view grid = env.grid # position agent x, y = env.agent_pos # rotate to match agent's orientation for i in range(env.agent_dir + 1):...
36.381215
193
0.569476
import gym from gym_minigrid.minigrid import OBJECT_TO_IDX, COLOR_TO_IDX from multiprocessing import Process, Pipe def get_global(env, obs): grid = env.grid x, y = env.agent_pos for i in range(env.agent_dir + 1): # rotate grid grid = grid.rotate_left() ...
true
true
f74954ac6428b4c154e8ded35fde75f46646d834
68,037
py
Python
src/transformers/models/roberta/modeling_roberta.py
djroxx2000/transformers
77770ec79883343d32051cfb6a04f64523cd8df1
[ "Apache-2.0" ]
35
2021-08-30T09:31:41.000Z
2021-12-21T11:30:49.000Z
src/transformers/models/roberta/modeling_roberta.py
djroxx2000/transformers
77770ec79883343d32051cfb6a04f64523cd8df1
[ "Apache-2.0" ]
9
2021-06-08T22:35:33.000Z
2021-10-04T08:53:44.000Z
src/transformers/models/roberta/modeling_roberta.py
djroxx2000/transformers
77770ec79883343d32051cfb6a04f64523cd8df1
[ "Apache-2.0" ]
2
2021-08-31T09:09:59.000Z
2021-09-10T07:59:03.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
43.308084
213
0.669606
import math import torch import torch.utils.checkpoint from packaging import version from torch import nn from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss from ...activations import ACT2FN, gelu from ...file_utils import ( add_code_sample_docstrings, add_start_docstrings, ...
true
true
f74954b481036a0c49e54d972a110495437aa0e3
6,161
py
Python
mayan/apps/sources/apps.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
1
2021-06-17T18:24:25.000Z
2021-06-17T18:24:25.000Z
mayan/apps/sources/apps.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
7
2020-06-06T00:01:04.000Z
2022-01-13T01:47:17.000Z
mayan/apps/sources/apps.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.common.apps import MayanAppConfig from mayan.apps.common.classes import MissingItem from mayan.apps.common.html_widgets import TwoStateWidget from mayan.apps.common.menus import ( menu_...
37.339394
84
0.663691
from __future__ import absolute_import, unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.common.apps import MayanAppConfig from mayan.apps.common.classes import MissingItem from mayan.apps.common.html_widgets import TwoStateWidget from mayan.apps.common.menus import ( menu_...
true
true
f74954ed8c7075a5c9e83c84f0a7f61bd1d2dab9
766
py
Python
src/flaskFormRequest/validators/boolean.py
edcilo/flaskFormRequest
5d346ab8821bdc6653dab9607f8a5d3d992b59d9
[ "MIT" ]
null
null
null
src/flaskFormRequest/validators/boolean.py
edcilo/flaskFormRequest
5d346ab8821bdc6653dab9607f8a5d3d992b59d9
[ "MIT" ]
null
null
null
src/flaskFormRequest/validators/boolean.py
edcilo/flaskFormRequest
5d346ab8821bdc6653dab9607f8a5d3d992b59d9
[ "MIT" ]
null
null
null
import re from typing import Union from .validator import Validator, ValidationError, StopValidation class Boolean(Validator): true_types = (True, "true", 1, "1",) false_types = (False, "false", 0, "0") def __init__(self, message: Union[str, None] = None, parse: bool = True) -> None: self.parse =...
30.64
85
0.637076
import re from typing import Union from .validator import Validator, ValidationError, StopValidation class Boolean(Validator): true_types = (True, "true", 1, "1",) false_types = (False, "false", 0, "0") def __init__(self, message: Union[str, None] = None, parse: bool = True) -> None: self.parse =...
true
true
f7495547104a00a2335f43a5cf9f2be4d4e3f115
281
py
Python
src/base_client.py
ryanclanigan/messaging-bridge
50f1e2f75e55360a41e81bfa2f07cde81f3ee659
[ "MIT" ]
null
null
null
src/base_client.py
ryanclanigan/messaging-bridge
50f1e2f75e55360a41e81bfa2f07cde81f3ee659
[ "MIT" ]
10
2020-07-10T23:17:48.000Z
2020-07-15T21:51:11.000Z
src/base_client.py
ryanclanigan/messaging-bridge
50f1e2f75e55360a41e81bfa2f07cde81f3ee659
[ "MIT" ]
null
null
null
class BaseClient: def send_message(self, text=None, urls=None): pass @staticmethod def get_client_name(): pass def is_threadable(self) -> bool: pass def run_client(self, *args): pass def get_run_args(self): pass
15.611111
49
0.58363
class BaseClient: def send_message(self, text=None, urls=None): pass @staticmethod def get_client_name(): pass def is_threadable(self) -> bool: pass def run_client(self, *args): pass def get_run_args(self): pass
true
true
f749584573a73af077766f6d6a643a8d0ac8cf94
688
py
Python
py_solutions_21-30/Euler_22.py
tijko/Project-Euler
d953a2bf6932c2c4e1235409fedf760add65a0ba
[ "MIT" ]
null
null
null
py_solutions_21-30/Euler_22.py
tijko/Project-Euler
d953a2bf6932c2c4e1235409fedf760add65a0ba
[ "MIT" ]
1
2022-03-15T02:49:09.000Z
2022-03-15T02:49:09.000Z
py_solutions_21-30/Euler_22.py
tijko/Project-Euler
d953a2bf6932c2c4e1235409fedf760add65a0ba
[ "MIT" ]
null
null
null
# Number amount of names from __future__ import print_function from operator import add from functools import reduce import timeit import os start = timeit.default_timer() def euler_22(): with open(os.path.abspath('').strip('py_solutions_21-30') + '/euler_txt/names1.tx...
25.481481
70
0.616279
from __future__ import print_function from operator import add from functools import reduce import timeit import os start = timeit.default_timer() def euler_22(): with open(os.path.abspath('').strip('py_solutions_21-30') + '/euler_txt/names1.txt') as f: name_l...
true
true
f74958810488a66a14ec09cf46dc806d5f8aeb10
34,616
py
Python
settree/set_rf.py
ranigb/Set-Tree
fa3971f9a8ef98dbfd0f6de654efcde3006a197b
[ "MIT" ]
17
2021-07-26T01:03:59.000Z
2022-01-23T10:31:56.000Z
settree/set_rf.py
ranigb/Set-Tree
fa3971f9a8ef98dbfd0f6de654efcde3006a197b
[ "MIT" ]
2
2021-12-10T09:53:48.000Z
2022-01-25T17:08:41.000Z
settree/set_rf.py
ranigb/Set-Tree
fa3971f9a8ef98dbfd0f6de654efcde3006a197b
[ "MIT" ]
3
2021-09-14T11:39:35.000Z
2022-01-23T06:51:48.000Z
import numbers from warnings import catch_warnings, simplefilter, warn import threading from abc import ABCMeta, abstractmethod import numpy as np from scipy.sparse import issparse from scipy.sparse import hstack as sparse_hstack from joblib import Parallel, delayed from sklearn.base import ClassifierMixin, Regressor...
38.505006
99
0.593541
import numbers from warnings import catch_warnings, simplefilter, warn import threading from abc import ABCMeta, abstractmethod import numpy as np from scipy.sparse import issparse from scipy.sparse import hstack as sparse_hstack from joblib import Parallel, delayed from sklearn.base import ClassifierMixin, Regressor...
true
true
f74959f1794d63d86a99d0bbf4f7c523d22281a1
5,114
py
Python
v3io_gputils/mpijob.py
sahare92/v3io-gputils
8d18c6b5b8d9051967295b75836708ffa645df81
[ "Apache-2.0" ]
null
null
null
v3io_gputils/mpijob.py
sahare92/v3io-gputils
8d18c6b5b8d9051967295b75836708ffa645df81
[ "Apache-2.0" ]
null
null
null
v3io_gputils/mpijob.py
sahare92/v3io-gputils
8d18c6b5b8d9051967295b75836708ffa645df81
[ "Apache-2.0" ]
null
null
null
from copy import deepcopy from os import environ from pprint import pprint import yaml from kubernetes import client, config from kubernetes.client.rest import ApiException _mpijob_template = { 'apiVersion': 'kubeflow.org/v1alpha1', 'kind': 'MPIJob', 'metadata': { 'name': '', 'namespace': 'default-tenant'...
32.993548
115
0.555534
from copy import deepcopy from os import environ from pprint import pprint import yaml from kubernetes import client, config from kubernetes.client.rest import ApiException _mpijob_template = { 'apiVersion': 'kubeflow.org/v1alpha1', 'kind': 'MPIJob', 'metadata': { 'name': '', 'namespace': 'default-tenant'...
true
true
f7495ba43acbcb315aed92c1defc93d42993f3c8
484
py
Python
profiles_api/urls.py
AhmedElmougy/profiles-rest-api
a128c9e327f19afcbb1fcb4c29aae01b8ee1b5f4
[ "BSD-3-Clause" ]
null
null
null
profiles_api/urls.py
AhmedElmougy/profiles-rest-api
a128c9e327f19afcbb1fcb4c29aae01b8ee1b5f4
[ "BSD-3-Clause" ]
null
null
null
profiles_api/urls.py
AhmedElmougy/profiles-rest-api
a128c9e327f19afcbb1fcb4c29aae01b8ee1b5f4
[ "BSD-3-Clause" ]
null
null
null
from django.urls import include, path from rest_framework import routers from profiles_api import views router = routers.DefaultRouter() router.register(r'users', views.UserViewSet) # Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browsable API. urlpatterns = [ path(''...
30.25
82
0.75
from django.urls import include, path from rest_framework import routers from profiles_api import views router = routers.DefaultRouter() router.register(r'users', views.UserViewSet) urlpatterns = [ path('', include(router.urls)), path('login/', views.UserLoginApiView.as_view()), path('api-auth/', inclu...
true
true
f7495cd832343cb4fbfbf2a2fc4d6e5df3d3258a
748
py
Python
backend/device_registry/migrations/0089_auto_20200323_1008.py
ealmonte32/api
702254c48677cf5a6f2fe298bced854299868eef
[ "MIT" ]
null
null
null
backend/device_registry/migrations/0089_auto_20200323_1008.py
ealmonte32/api
702254c48677cf5a6f2fe298bced854299868eef
[ "MIT" ]
7
2020-12-04T22:01:16.000Z
2022-02-10T09:47:59.000Z
backend/device_registry/migrations/0089_auto_20200323_1008.py
ealmonte32/api
702254c48677cf5a6f2fe298bced854299868eef
[ "MIT" ]
2
2020-12-21T20:01:54.000Z
2021-01-13T07:08:01.000Z
# Generated by Django 2.2.11 on 2020-03-23 10:08 from django.db import migrations, models def update_default_credentials(apps, schema_editor): from device_registry.models import RecommendedActionStatus from device_registry.recommended_actions import AuditdNotInstalledAction RecommendedActionStatus.update...
28.769231
82
0.721925
from django.db import migrations, models def update_default_credentials(apps, schema_editor): from device_registry.models import RecommendedActionStatus from device_registry.recommended_actions import AuditdNotInstalledAction RecommendedActionStatus.update_all_devices(classes=[AuditdNotInstalledAction])...
true
true
f7495e2f7ab31eb5a18055b3cf2e0f0e59b75f3f
5,828
py
Python
example/ex_4_phase_diagrams/individual_size_plots.py
loevlie/ce_expansion
17417b9467914dd91ee8e0325cfdc3bd19ad7f1e
[ "MIT" ]
1
2020-11-04T08:01:22.000Z
2020-11-04T08:01:22.000Z
example/ex_4_phase_diagrams/individual_size_plots.py
loevlie/ce_expansion
17417b9467914dd91ee8e0325cfdc3bd19ad7f1e
[ "MIT" ]
2
2021-04-19T23:45:54.000Z
2022-02-21T17:40:41.000Z
example/ex_4_phase_diagrams/individual_size_plots.py
loevlie/ce_expansion
17417b9467914dd91ee8e0325cfdc3bd19ad7f1e
[ "MIT" ]
3
2021-05-10T14:25:28.000Z
2022-02-18T01:09:05.000Z
import collections import os import sys import matplotlib.pyplot as plt import matplotlib.ticker as tick import numpy as np data = os.path.join(os.path.realpath(__file__), '..', '..', '..', 'data', 'larson_et_al') sys.path.append(data) import ce_expansion.npdb.db_inter DEFAULT_DPI = 600 # Dots per inch DEFAULT_POIN...
32.741573
115
0.604839
import collections import os import sys import matplotlib.pyplot as plt import matplotlib.ticker as tick import numpy as np data = os.path.join(os.path.realpath(__file__), '..', '..', '..', 'data', 'larson_et_al') sys.path.append(data) import ce_expansion.npdb.db_inter DEFAULT_DPI = 600 DEFAULT_POINTSIZE = 15 DEFA...
true
true
f7495e40ea37a34ed3bd24b17f804d693b9f4188
979
py
Python
kubernetes/test/test_v1_node_config_source.py
kevingessner/python
3f4d09d260cf0839fae8173852c69e0419188454
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_node_config_source.py
kevingessner/python
3f4d09d260cf0839fae8173852c69e0419188454
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_node_config_source.py
kevingessner/python
3f4d09d260cf0839fae8173852c69e0419188454
[ "Apache-2.0" ]
1
2018-07-19T16:37:20.000Z
2018-07-19T16:37:20.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.9.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
21.755556
105
0.713994
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_node_config_source import V1NodeConfigSource class TestV1NodeConfigSource(unittest.TestCase): def setUp(self): pass ...
true
true
f7495fbb2ba8fb8f6216cc573f05b2f0e6934efc
9,272
py
Python
backend/src/baserow/contrib/database/api/rows/serializers.py
lucastm/baserow
c5fd45b75c753cc5dfd3227902a79535fbe5ad0f
[ "MIT" ]
839
2020-07-20T13:29:34.000Z
2022-03-31T21:09:16.000Z
backend/src/baserow/contrib/database/api/rows/serializers.py
lucastm/baserow
c5fd45b75c753cc5dfd3227902a79535fbe5ad0f
[ "MIT" ]
28
2020-08-07T09:23:58.000Z
2022-03-01T22:32:40.000Z
backend/src/baserow/contrib/database/api/rows/serializers.py
lucastm/baserow
c5fd45b75c753cc5dfd3227902a79535fbe5ad0f
[ "MIT" ]
79
2020-08-04T01:48:01.000Z
2022-03-27T13:30:54.000Z
import logging from rest_framework import serializers from baserow.api.serializers import get_example_pagination_serializer_class from baserow.api.utils import get_serializer_class from baserow.contrib.database.fields.registries import field_type_registry from baserow.contrib.database.rows.registries import row_metad...
39.122363
87
0.693486
import logging from rest_framework import serializers from baserow.api.serializers import get_example_pagination_serializer_class from baserow.api.utils import get_serializer_class from baserow.contrib.database.fields.registries import field_type_registry from baserow.contrib.database.rows.registries import row_metad...
true
true
f7495fbe239a93f9ecc36c24cc53dbd6c6859a48
731
py
Python
dash-static-image-serve.py
oriolmirosa/dash-recipes
c01372292d60c3fd8c1f3a47bca6330c2b268ba4
[ "MIT" ]
932
2017-07-08T06:37:23.000Z
2022-03-31T11:10:07.000Z
dash-static-image-serve.py
oriolmirosa/dash-recipes
c01372292d60c3fd8c1f3a47bca6330c2b268ba4
[ "MIT" ]
29
2018-02-06T20:09:58.000Z
2021-08-24T06:01:11.000Z
dash-static-image-serve.py
oriolmirosa/dash-recipes
c01372292d60c3fd8c1f3a47bca6330c2b268ba4
[ "MIT" ]
301
2017-09-25T16:16:41.000Z
2022-03-24T23:48:59.000Z
import dash import dash_html_components as html import os import config STATIC_PREFIX = '/{}/static/'.format(config.DASH_APP_NAME) app = dash.Dash() app.layout = html.Div([ html.Img(src='{}my-image.png'.format(STATIC_PREFIX)) ]) # Static routes for on-premise are a little bit different than local # because th...
23.580645
72
0.723666
import dash import dash_html_components as html import os import config STATIC_PREFIX = '/{}/static/'.format(config.DASH_APP_NAME) app = dash.Dash() app.layout = html.Div([ html.Img(src='{}my-image.png'.format(STATIC_PREFIX)) ]) if 'DYNO' in os.environ: static_route = '/static/<path:path>' else: s...
true
true
f7495fddb1019b421cce9eacdf68999cf40727ea
63
py
Python
code/abc073_a_04.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
3
2019-08-16T16:55:48.000Z
2021-04-11T10:21:40.000Z
code/abc073_a_04.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
code/abc073_a_04.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
N = input() if "9" in N: print("Yes") else: print("No")
12.6
16
0.492063
N = input() if "9" in N: print("Yes") else: print("No")
true
true
f74961a726bb820d9b5a79e616e1078a430e3dd9
296
py
Python
baselinecore/templatetags/baseline_blog.py
loftylabs/baselinecore
0b89fefaef4594d3ba6845330e641ef24a2e7851
[ "MIT" ]
null
null
null
baselinecore/templatetags/baseline_blog.py
loftylabs/baselinecore
0b89fefaef4594d3ba6845330e641ef24a2e7851
[ "MIT" ]
null
null
null
baselinecore/templatetags/baseline_blog.py
loftylabs/baselinecore
0b89fefaef4594d3ba6845330e641ef24a2e7851
[ "MIT" ]
null
null
null
from django import template from baselinecore.models import BlogPage register = template.Library() @register.simple_tag(takes_context=True) def get_latest_posts(context): context.update( {'latest_blog_posts': BlogPage.objects.live().order_by('-datetime')[:5]} ) return ""
21.142857
80
0.72973
from django import template from baselinecore.models import BlogPage register = template.Library() @register.simple_tag(takes_context=True) def get_latest_posts(context): context.update( {'latest_blog_posts': BlogPage.objects.live().order_by('-datetime')[:5]} ) return ""
true
true
f74961bfad5575aad771b409d416e6b013272a3d
1,369
py
Python
OpenCV 102/Basic Image Processing Operations/auto-canny/auto_canny_practice.py
jjaramillo34/pyimagesearchuniversity_course
0a4a26c29a6f8122f6a03d3393ac01ebbc14a391
[ "MIT" ]
1
2022-03-13T16:52:58.000Z
2022-03-13T16:52:58.000Z
OpenCV 102/Basic Image Processing Operations/auto-canny/auto_canny_practice.py
jjaramillo34/pyimagesearchuniversity_course
0a4a26c29a6f8122f6a03d3393ac01ebbc14a391
[ "MIT" ]
null
null
null
OpenCV 102/Basic Image Processing Operations/auto-canny/auto_canny_practice.py
jjaramillo34/pyimagesearchuniversity_course
0a4a26c29a6f8122f6a03d3393ac01ebbc14a391
[ "MIT" ]
null
null
null
# USAGE # python auto_canny_practice.py --images images # import the necessary packages import numpy as np import argparse import glob import cv2 def auto_canny(image, sigma=0.33): # compute the median of the single channel pixel intensities v = np.median(image) # apply automatic Canny edge detection usin...
31.837209
74
0.685172
import numpy as np import argparse import glob import cv2 def auto_canny(image, sigma=0.33): v = np.median(image) lower = int(max(0, (1.0 - sigma) * v)) upper = int(min(255, (1.0 - sigma) * v)) edged = cv2.Canny(image, lower, upper) return edged ap = argparse.ArgumentParse...
true
true
f749621beafeefff485994fe245228d8759c3457
2,863
py
Python
homeassistant/components/lookin/__init__.py
tizzen33/core
2a1884a1f7a07848b8b63afd29f59c81f1ffaf62
[ "Apache-2.0" ]
7
2019-08-15T13:36:58.000Z
2020-03-18T10:46:29.000Z
homeassistant/components/lookin/__init__.py
tizzen33/core
2a1884a1f7a07848b8b63afd29f59c81f1ffaf62
[ "Apache-2.0" ]
87
2020-07-15T13:43:35.000Z
2022-03-23T07:43:10.000Z
homeassistant/components/lookin/__init__.py
marecabo/home-assistant
e33774a61e7fcc88aff752dfa4618dd26a746872
[ "Apache-2.0" ]
7
2018-10-04T10:12:45.000Z
2021-12-29T20:55:40.000Z
"""The lookin integration.""" from __future__ import annotations from datetime import timedelta import logging import aiohttp from aiolookin import ( LookInHttpProtocol, LookinUDPSubscriptions, MeteoSensor, SensorID, start_lookin_udp, ) from homeassistant.config_entries import ConfigEntry from ho...
31.811111
87
0.728956
from __future__ import annotations from datetime import timedelta import logging import aiohttp from aiolookin import ( LookInHttpProtocol, LookinUDPSubscriptions, MeteoSensor, SensorID, start_lookin_udp, ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_...
true
true
f74962ee4998f24a496fa7cc31206b63e1da728e
372
py
Python
app/encryption.py
robot2051/dto-digitalmarketplace-api
de5b1fe67a0ce2d665633b083005263739080903
[ "MIT" ]
null
null
null
app/encryption.py
robot2051/dto-digitalmarketplace-api
de5b1fe67a0ce2d665633b083005263739080903
[ "MIT" ]
null
null
null
app/encryption.py
robot2051/dto-digitalmarketplace-api
de5b1fe67a0ce2d665633b083005263739080903
[ "MIT" ]
null
null
null
from flask.ext.bcrypt import generate_password_hash, \ check_password_hash def authenticate_user(password, user): return not user.locked and checkpw(password, user.password) def hashpw(password): return generate_password_hash(password, 10).decode('utf-8') def checkpw(password, hashed_password): re...
24.8
63
0.784946
from flask.ext.bcrypt import generate_password_hash, \ check_password_hash def authenticate_user(password, user): return not user.locked and checkpw(password, user.password) def hashpw(password): return generate_password_hash(password, 10).decode('utf-8') def checkpw(password, hashed_password): re...
true
true
f7496322938d5ebb39115636ea2b74269f50ec73
4,958
py
Python
src/cpp/crfrnn_model.py
Teslain/crfasrnn_keras
144539c11774cf53321c359d19ce19b301f0be06
[ "MIT" ]
637
2017-07-29T09:34:46.000Z
2022-02-25T08:35:20.000Z
src/cpp/crfrnn_model.py
Teslain/crfasrnn_keras
144539c11774cf53321c359d19ce19b301f0be06
[ "MIT" ]
77
2017-08-10T02:09:04.000Z
2022-01-31T12:46:59.000Z
src/cpp/crfrnn_model.py
Teslain/crfasrnn_keras
144539c11774cf53321c359d19ce19b301f0be06
[ "MIT" ]
199
2017-07-30T04:50:46.000Z
2022-03-28T02:22:42.000Z
""" MIT License Copyright (c) 2017 Sadeep Jayasumana Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
42.376068
101
0.65591
from keras.models import Model from keras.layers import Conv2D, MaxPooling2D, Input, ZeroPadding2D, \ Dropout, Conv2DTranspose, Cropping2D, Add from crfrnn_layer import CrfRnnLayer def get_crfrnn_model_def(): channels, height, width = 3, 500, 500 input_shape = (height, width, 3) img_input = In...
true
true
f74964075d4734552ad2e197e6a202e15e44096e
61,441
py
Python
mne/io/meas_info.py
joewalter/mne-python
b0629bea7f5e8e94d9e2e889f45a35f9657e6dbc
[ "BSD-3-Clause" ]
null
null
null
mne/io/meas_info.py
joewalter/mne-python
b0629bea7f5e8e94d9e2e889f45a35f9657e6dbc
[ "BSD-3-Clause" ]
null
null
null
mne/io/meas_info.py
joewalter/mne-python
b0629bea7f5e8e94d9e2e889f45a35f9657e6dbc
[ "BSD-3-Clause" ]
null
null
null
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) from collections import Counter from copy import deepcopy from datetime import datetime as dt import os.path as op imp...
38.37664
79
0.584756
from collections import Counter from copy import deepcopy from datetime import datetime as dt import os.path as op import re import numpy as np from scipy import linalg from .pick import channel_type from .constants import FIFF from .open import fiff_open from .tree import dir_tree_find from .tag import read_ta...
true
true
f749647ad9184ed8a3a533bced97339705c1273d
3,550
py
Python
bindings/python/ensmallen/datasets/string/polaribacterspheli88.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/polaribacterspheli88.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/polaribacterspheli88.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Polaribacter sp. HelI88. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protei...
32.87037
223
0.676056
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def PolaribacterSpHeli88( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/stri...
true
true
f74965848f02b9846c7b53930c168e544fb8e38a
9,564
py
Python
python/cuml/benchmark/datagen.py
aerdem4/cuml
088763cda9fd5e363af092b1d05c155f256cf0d7
[ "Apache-2.0" ]
2
2020-12-19T23:34:37.000Z
2022-01-13T21:08:51.000Z
python/cuml/benchmark/datagen.py
aerdem4/cuml
088763cda9fd5e363af092b1d05c155f256cf0d7
[ "Apache-2.0" ]
null
null
null
python/cuml/benchmark/datagen.py
aerdem4/cuml
088763cda9fd5e363af092b1d05c155f256cf0d7
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
31.774086
102
0.674822
import cudf import gzip import functools import numpy as np import os import pandas as pd import cuml.datasets import sklearn.model_selection from urllib.request import urlretrieve from cuml.common import input_utils from numba import cuda def _gen_data_regression(n_samples, n_features, random_state=4...
true
true
f749665e1a1d159f8946df3f95c3d6bf9a882bb7
2,671
py
Python
azure-servicefabric/azure/servicefabric/models/deployed_service_type_info_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-servicefabric/azure/servicefabric/models/deployed_service_type_info_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-servicefabric/azure/servicefabric/models/deployed_service_type_info_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-10-16T13:08:23.000Z
2018-10-16T13:08:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
47.696429
189
0.687009
from msrest.serialization import Model class DeployedServiceTypeInfo(Model): _attribute_map = { 'service_type_name': {'key': 'ServiceTypeName', 'type': 'str'}, 'service_manifest_name': {'key': 'ServiceManifestName', 'type': 'str'}, 'code_package_name': {'key': 'CodePackageName'...
true
true
f7496779a763ba8d7b26e0440be8f9d90c0c9069
8,589
py
Python
graph_objs/layout/scene/yaxis/title/_font.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/layout/scene/yaxis/title/_font.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/layout/scene/yaxis/title/_font.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.scene.yaxis.title" _path_str = "layout.scene.yaxis.title.font" _valid_props = {"colo...
37.50655
84
0.567703
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): _parent_path_str = "layout.scene.yaxis.title" _path_str = "layout.scene.yaxis.title.font" _valid_props = {"color", "family", "size"} @pr...
true
true
f749683ff74312390cd48baab61fadedc2bce01f
11,002
py
Python
sympy/printing/tests/test_repr.py
pecan-pine/sympy
3219093a5ae34abd549acf0f4c1b67d419bddc2a
[ "BSD-3-Clause" ]
null
null
null
sympy/printing/tests/test_repr.py
pecan-pine/sympy
3219093a5ae34abd549acf0f4c1b67d419bddc2a
[ "BSD-3-Clause" ]
null
null
null
sympy/printing/tests/test_repr.py
pecan-pine/sympy
3219093a5ae34abd549acf0f4c1b67d419bddc2a
[ "BSD-3-Clause" ]
null
null
null
from typing import Any, Dict from sympy.testing.pytest import raises from sympy import (symbols, sympify, Function, Integer, Matrix, Abs, Rational, Float, S, WildFunction, ImmutableDenseMatrix, sin, true, false, ones, sqrt, root, AlgebraicNumber, Symbol, Dummy, Wild, MatrixSymbol) from sympy.combinatorics impo...
34.274143
185
0.609435
from typing import Any, Dict from sympy.testing.pytest import raises from sympy import (symbols, sympify, Function, Integer, Matrix, Abs, Rational, Float, S, WildFunction, ImmutableDenseMatrix, sin, true, false, ones, sqrt, root, AlgebraicNumber, Symbol, Dummy, Wild, MatrixSymbol) from sympy.combinatorics impo...
true
true
f74968fea89b1692959a83ce63f1e86bdef7b0b9
259
py
Python
src/moldoc/javascript/__init__.py
lukasturcani/moldoc
a8c183e88f99c59a05f6bb4920932197532b767e
[ "MIT" ]
11
2021-08-03T11:21:27.000Z
2021-08-15T18:45:50.000Z
src/moldoc/javascript/__init__.py
lukasturcani/moldoc
a8c183e88f99c59a05f6bb4920932197532b767e
[ "MIT" ]
null
null
null
src/moldoc/javascript/__init__.py
lukasturcani/moldoc
a8c183e88f99c59a05f6bb4920932197532b767e
[ "MIT" ]
null
null
null
from .mesh_config import get_mesh_config from .scene_config import get_scene_config from .atoms import get_atom_array from .bonds import get_bond_array __all__ = [ 'get_mesh_config', 'get_scene_config', 'get_atom_array', 'get_bond_array', ]
19.923077
42
0.764479
from .mesh_config import get_mesh_config from .scene_config import get_scene_config from .atoms import get_atom_array from .bonds import get_bond_array __all__ = [ 'get_mesh_config', 'get_scene_config', 'get_atom_array', 'get_bond_array', ]
true
true
f7496999b33498213ecef4e20b0c083cedaff934
457
py
Python
mindhome_alpha/erpnext/patches/v12_0/update_item_tax_template_company.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
mindhome_alpha/erpnext/patches/v12_0/update_item_tax_template_company.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
null
null
null
mindhome_alpha/erpnext/patches/v12_0/update_item_tax_template_company.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc('accounts', 'doctype', 'item_tax_template') item_tax_template_list = frappe.get_list('Item Tax Template') for template in item_tax_template_list: doc = frappe.get_doc('Item Tax Template', template.name) ...
35.153846
78
0.684902
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc('accounts', 'doctype', 'item_tax_template') item_tax_template_list = frappe.get_list('Item Tax Template') for template in item_tax_template_list: doc = frappe.get_doc('Item Tax Template', template.name) ...
true
true
f74969b84f18722f1e347c6e0552c545525c420a
36,830
py
Python
azure-iot-device/azure/iot/device/iothub/abstract_clients.py
eaenergy/azure-iot-sdk-python
dcfaa5ac2d64f7027cd1d6df186b6ec28892ca6d
[ "MIT" ]
null
null
null
azure-iot-device/azure/iot/device/iothub/abstract_clients.py
eaenergy/azure-iot-sdk-python
dcfaa5ac2d64f7027cd1d6df186b6ec28892ca6d
[ "MIT" ]
null
null
null
azure-iot-device/azure/iot/device/iothub/abstract_clients.py
eaenergy/azure-iot-sdk-python
dcfaa5ac2d64f7027cd1d6df186b6ec28892ca6d
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """This mo...
46.327044
124
0.676405
import six import abc import logging import threading import os import io import time from . import pipeline from azure.iot.device.common.auth import connection_string as cs from azure.iot.device.common.auth import sastoken as st from azure.iot.device.iothub import client_event from azure.iot.device import except...
true
true
f74969cb2f745d40d5789a14888ddb151fe56cfd
3,068
py
Python
profiles_api/views.py
juliansj78/profilers-rest-api
cdde5a16755b9f90beab386d29385caf4ebb484f
[ "MIT" ]
null
null
null
profiles_api/views.py
juliansj78/profilers-rest-api
cdde5a16755b9f90beab386d29385caf4ebb484f
[ "MIT" ]
6
2020-02-12T03:15:50.000Z
2022-02-10T10:52:52.000Z
profiles_api/views.py
juliansj78/profilers-rest-api
cdde5a16755b9f90beab386d29385caf4ebb484f
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from profiles_api import serializers class HelloApiView(APIView): """Test API View""" serializer_class = serializers.HelloSerializer def get(self, re...
32.989247
76
0.607888
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from profiles_api import serializers class HelloApiView(APIView): serializer_class = serializers.HelloSerializer def get(self, request, format=None): ...
true
true
f7496b5715e7015b563058f0e0b70d7e564cc10f
2,894
py
Python
azotea/reorg.py
guaix-ucm/azotea
fcd1f5c42bc147cd3f4998b2177a24dbb313e5ae
[ "MIT" ]
null
null
null
azotea/reorg.py
guaix-ucm/azotea
fcd1f5c42bc147cd3f4998b2177a24dbb313e5ae
[ "MIT" ]
null
null
null
azotea/reorg.py
guaix-ucm/azotea
fcd1f5c42bc147cd3f4998b2177a24dbb313e5ae
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # Copyright (c) 2020 # # See the LICENSE file for details # see the AUTHORS file for authors # ---------------------------------------------------------------------- #-------------------- # System wide imports # ----------...
24.525424
78
0.618867
import sys import os import os.path import glob import logging import shutil import subprocess import jdcal from .camera import CameraImage from .utils import LogCounter N_FILES = 50 log = logging.getLogger("azotea") def _copyfileobj_patched(fsrc, fdst, length=16*1024*1024): wh...
true
true
f7496c0734c27effadc839f41ebd0057fc54e383
1,221
py
Python
google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/__init__.py
renovate-bot/python-video-transcoder-1
e9c1c229fe88d200d0f60314814078e79e3f1524
[ "Apache-2.0" ]
5
2021-03-05T22:36:04.000Z
2022-02-01T09:58:04.000Z
google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/__init__.py
renovate-bot/python-video-transcoder-1
e9c1c229fe88d200d0f60314814078e79e3f1524
[ "Apache-2.0" ]
51
2020-08-24T15:43:20.000Z
2022-03-07T16:43:36.000Z
google/cloud/video/transcoder_v1beta1/services/transcoder_service/transports/__init__.py
renovate-bot/python-video-transcoder-1
e9c1c229fe88d200d0f60314814078e79e3f1524
[ "Apache-2.0" ]
8
2020-08-24T15:39:52.000Z
2022-02-24T17:43:24.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
35.911765
88
0.791974
from collections import OrderedDict from typing import Dict, Type from .base import TranscoderServiceTransport from .grpc import TranscoderServiceGrpcTransport from .grpc_asyncio import TranscoderServiceGrpcAsyncIOTransport _transport_registry = OrderedDict() _transport_registry["grpc"] = Transcode...
true
true
f7496c4bfea3978a7908dcde15cca60b5daa4495
2,290
py
Python
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/aio/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/aio/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/monitor/azure-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_generated/aio/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
44.038462
108
0.668996
from typing import Any from azure.core.configuration import Configuration from azure.core.pipeline import policies VERSION = "unknown" class AzureMonitorClientConfiguration(Configuration): def __init__( self, host: str = "https://dc.services.visualstudio.com", **kwargs: Any )...
true
true
f7496e5113a9feb1bd028005adc857c823c37eaa
18,412
py
Python
src/inmediag/admin.py
TechFitU/MDSOM
01f58277ec99051cc857de65ce6b240a177da19c
[ "MIT" ]
null
null
null
src/inmediag/admin.py
TechFitU/MDSOM
01f58277ec99051cc857de65ce6b240a177da19c
[ "MIT" ]
null
null
null
src/inmediag/admin.py
TechFitU/MDSOM
01f58277ec99051cc857de65ce6b240a177da19c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.auth.models import User, Group from django.contrib.auth.admin import UserAdmin, GroupAdmin from django.forms.models import BaseInlineFormSet from simple_history.admin import SimpleHistoryAdmin from ajax_select.admin import AjaxSelectAdmin fro...
39.595699
190
0.679883
from django.contrib import admin from django.contrib.auth.models import User, Group from django.contrib.auth.admin import UserAdmin, GroupAdmin from django.forms.models import BaseInlineFormSet from simple_history.admin import SimpleHistoryAdmin from ajax_select.admin import AjaxSelectAdmin from liststyle.admin impor...
true
true
f7496ed3f2c03793bc5eccea6918d29a9fe61e5b
2,351
py
Python
test/test_simple_decompression.py
dish59742/brotlicffi
d66b05406134a725fbd8dc6cd5df93dd10d251ed
[ "MIT" ]
111
2015-10-02T14:21:13.000Z
2020-11-06T16:48:13.000Z
test/test_simple_decompression.py
dish59742/brotlicffi
d66b05406134a725fbd8dc6cd5df93dd10d251ed
[ "MIT" ]
48
2015-10-04T15:08:06.000Z
2020-11-30T19:34:58.000Z
test/test_simple_decompression.py
dish59742/brotlicffi
d66b05406134a725fbd8dc6cd5df93dd10d251ed
[ "MIT" ]
21
2015-10-02T13:09:03.000Z
2020-11-03T21:29:02.000Z
# -*- coding: utf-8 -*- """ test_simple_decompression ~~~~~~~~~~~~~~~~~~~~~~~~~ Tests for decompression of single chunks. """ import brotlicffi import pytest def test_decompression(simple_compressed_file): """ Decompressing files returns their original form using decompress. """ with open(simple_com...
27.658824
79
0.686942
import brotlicffi import pytest def test_decompression(simple_compressed_file): with open(simple_compressed_file[0], 'rb') as f: uncompressed_data = f.read() with open(simple_compressed_file[1], 'rb') as f: compressed_data = f.read() assert brotlicffi.decompress(compressed_data) == unc...
true
true
f7496f7527754be3858faba5acd031ccb2bbb446
1,037
py
Python
libs/files.py
tm8r/MayaSquidCore
e3df89523c802384196df95440248c5be1d3b6ae
[ "MIT" ]
14
2019-03-16T14:54:57.000Z
2021-01-16T06:31:08.000Z
libs/files.py
tm8r/MayaSquidCore
e3df89523c802384196df95440248c5be1d3b6ae
[ "MIT" ]
null
null
null
libs/files.py
tm8r/MayaSquidCore
e3df89523c802384196df95440248c5be1d3b6ae
[ "MIT" ]
3
2019-04-12T07:14:21.000Z
2022-01-09T15:19:46.000Z
# -*- coding: utf-8 -*- u"""ファイル操作関連""" from __future__ import absolute_import, division, print_function from squid.vendor.Qt import QtGui import os _SIZE_SUFFIXES = ["B", "KB", "MB", "GB", "TB", "PB"] _FILE_PROTOCOL = "file:///" def convert_readable_file_size(nbytes): u"""HumanReadableなファイルサイズを返す Args: ...
18.854545
64
0.585342
from __future__ import absolute_import, division, print_function from squid.vendor.Qt import QtGui import os _SIZE_SUFFIXES = ["B", "KB", "MB", "GB", "TB", "PB"] _FILE_PROTOCOL = "file:///" def convert_readable_file_size(nbytes): i = 0 while nbytes >= 1024 and i < len(_SIZE_SUFFIXES) - 1: nbytes ...
true
true
f7497035853f2fe7d144f530052596a211924c17
8,153
py
Python
campdown/__init__.py
atwinkelman/campdown
7cc266ea91efb9cffbb91abdc6ccb15b8c5547f5
[ "MIT" ]
20
2016-05-08T19:00:30.000Z
2022-02-14T21:42:49.000Z
campdown/__init__.py
Catlinman/Campdown
523d7e62a9ad66c496ff610dec2ce75582689ed4
[ "MIT" ]
7
2015-07-12T21:22:27.000Z
2021-11-11T16:17:40.000Z
campdown/__init__.py
Catlinman/Campdown
523d7e62a9ad66c496ff610dec2ce75582689ed4
[ "MIT" ]
7
2016-01-25T19:56:09.000Z
2022-02-24T20:38:59.000Z
"""Campdown Usage: campdown <url> [--output=PATH] [--sleep=NUMBER] [--quiet] [--short] [--no-art] [--no-id3] [--no-missing] campdown (-h | --help) campdown (-v | --version) Options: -h, --help ...
34.693617
148
0.553293
import sys import os from docopt import docopt from .helpers import * from .track import Track from .album import Album from .discography import Discography import requests def cli(): args = docopt(__doc__, version="campdown 1.49") try: output_dir = args["--output"] ...
true
true
f74973d9500df2a60716f6795e13a103b2e2a2f7
1,295
py
Python
archive/piBot/PiBot.py
kringen/wingnut
73be4f8393720ff0932ab069543e5f2d2308296d
[ "MIT" ]
null
null
null
archive/piBot/PiBot.py
kringen/wingnut
73be4f8393720ff0932ab069543e5f2d2308296d
[ "MIT" ]
null
null
null
archive/piBot/PiBot.py
kringen/wingnut
73be4f8393720ff0932ab069543e5f2d2308296d
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import RPi.GPIO as GPIO import threading import queue import time import distance, motors, speak gettingCloseSpoken = False turningAroundSpoken = False def calculateManeuvers(objDist): global gettingCloseSpoken global turningAroundSpoken if(objDist < 10): #Turn around speedLeft = 25 spe...
24.433962
114
0.728185
import RPi.GPIO as GPIO import threading import queue import time import distance, motors, speak gettingCloseSpoken = False turningAroundSpoken = False def calculateManeuvers(objDist): global gettingCloseSpoken global turningAroundSpoken if(objDist < 10): speedLeft = 25 speedRight = 25 if(turningArou...
true
true
f74974768310bf2296f01ae876337f892c690817
5,362
py
Python
spiops/test/test_functions.py
ESASPICEService/spiops
0b6cdf9f9d528aa197e5d744b318edc6a3b91403
[ "MIT" ]
6
2018-09-25T10:58:52.000Z
2020-03-21T13:05:28.000Z
spiops/test/test_functions.py
ESASPICEService/spiops
0b6cdf9f9d528aa197e5d744b318edc6a3b91403
[ "MIT" ]
null
null
null
spiops/test/test_functions.py
ESASPICEService/spiops
0b6cdf9f9d528aa197e5d744b318edc6a3b91403
[ "MIT" ]
null
null
null
from spiops import spiops import spiceypy #def test_ckdiff(): # # resolution = 1000000 # tolerance = 0.0001 # deg # spacecraft_frame = 'ROS_LANDER' # target_frame = 'J2000' # mk = 'data/SPICE/ROSETTA/mk/ROS_CKDIFF_TEST.TM' # ck1 = 'data/SPICE/ROSETTA/mk/ROS_CKDIFF_TEST.TM' # ck2 = 'data/SPICE/ROS...
33.936709
121
0.581499
from spiops import spiops import spiceypy def test_hga_angles(): spiops.load('/Users/mcosta/SPICE/BEPICOLOMBO/kernels/mk/bc_ops_local.tm') (hga_az_el, hga_earth) = spiops.hga_angles('MP...
true
true
f74974b604878dfa7dc7362daed9d34c673a40d5
639
py
Python
biomixer-venv/bin/rst2man.py
growolff/BioMixer
522cc0189b1877243995b26e14653a6d160752d3
[ "MIT" ]
1
2020-08-21T01:01:07.000Z
2020-08-21T01:01:07.000Z
biomixer-venv/bin/rst2man.py
growolff/BioMixer
522cc0189b1877243995b26e14653a6d160752d3
[ "MIT" ]
null
null
null
biomixer-venv/bin/rst2man.py
growolff/BioMixer
522cc0189b1877243995b26e14653a6d160752d3
[ "MIT" ]
2
2020-09-10T22:39:34.000Z
2021-06-27T22:21:55.000Z
#!/home/shello/Documents/BioMixer/biomixer-venv/bin/python # Author: # Contact: grubert@users.sf.net # Copyright: This module has been placed in the public domain. """ man.py ====== This module provides a simple command line interface that uses the man page writer to output from ReStructuredText source. """ import ...
23.666667
80
0.773083
import locale try: locale.setlocale(locale.LC_ALL, '') except: pass from docutils.core import publish_cmdline, default_description from docutils.writers import manpage description = ("Generates plain unix manual documents. " + default_description) publish_cmdline(writer=manpage.Writer(), description=...
true
true
f749752e418dc5f33f044fbbb860c2379efe6322
22,334
py
Python
dfirtrack_api/tests/dfirtrack_main/system/test_system_api_views.py
thomas-kropeit/dfirtrack
b1e0e659af7bc8085cfe2d269ddc651f9f4ba585
[ "Apache-2.0" ]
null
null
null
dfirtrack_api/tests/dfirtrack_main/system/test_system_api_views.py
thomas-kropeit/dfirtrack
b1e0e659af7bc8085cfe2d269ddc651f9f4ba585
[ "Apache-2.0" ]
6
2022-03-16T12:30:51.000Z
2022-03-28T01:34:45.000Z
dfirtrack_api/tests/dfirtrack_main/system/test_system_api_views.py
thomas-kropeit/dfirtrack
b1e0e659af7bc8085cfe2d269ddc651f9f4ba585
[ "Apache-2.0" ]
null
null
null
import urllib.parse from datetime import datetime from django.contrib.auth.models import User from django.test import TestCase from django.utils import timezone from dfirtrack_main.models import ( Analysisstatus, Case, Company, Contact, Dnsname, Domain, Ip, Location, Os, Osarch...
40.241441
130
0.632936
import urllib.parse from datetime import datetime from django.contrib.auth.models import User from django.test import TestCase from django.utils import timezone from dfirtrack_main.models import ( Analysisstatus, Case, Company, Contact, Dnsname, Domain, Ip, Location, Os, Osarch...
true
true
f74975fb4a2ae3faec51e916416b8dc989886ec4
885
py
Python
app/views/curl.py
daghan/MarkDownBlog
63cc2d3993092138d8f66636cf8a19a76a88e2bb
[ "MIT" ]
25
2015-02-24T18:47:56.000Z
2022-03-27T22:21:48.000Z
app/views/curl.py
daghan/MarkDownBlog
63cc2d3993092138d8f66636cf8a19a76a88e2bb
[ "MIT" ]
2
2015-02-24T18:52:27.000Z
2020-01-13T09:21:57.000Z
app/views/curl.py
daghan/MarkDownBlog
63cc2d3993092138d8f66636cf8a19a76a88e2bb
[ "MIT" ]
11
2015-05-07T07:53:51.000Z
2022-03-27T22:07:34.000Z
# -*- coding: utf-8 -*- from datetime import datetime from flask import g, jsonify, request from flask_httpauth import HTTPBasicAuth from app import app, db from app.models import User, Post auth = HTTPBasicAuth() @auth.verify_password def verify_password(username, password): user = db.session.query(User).filt...
26.818182
87
0.674576
from datetime import datetime from flask import g, jsonify, request from flask_httpauth import HTTPBasicAuth from app import app, db from app.models import User, Post auth = HTTPBasicAuth() @auth.verify_password def verify_password(username, password): user = db.session.query(User).filter_by(username=username...
true
true
f7497600d642a7db6b364f43f0e0a50efd519232
3,453
py
Python
appengine/components/tools/log_since.py
stefb965/luci-py
e0a8a5640c4104e5c90781d833168aa8a8d1f24d
[ "Apache-2.0" ]
1
2017-10-30T15:08:10.000Z
2017-10-30T15:08:10.000Z
appengine/components/tools/log_since.py
stefb965/luci-py
e0a8a5640c4104e5c90781d833168aa8a8d1f24d
[ "Apache-2.0" ]
null
null
null
appengine/components/tools/log_since.py
stefb965/luci-py
e0a8a5640c4104e5c90781d833168aa8a8d1f24d
[ "Apache-2.0" ]
1
2020-07-05T19:54:40.000Z
2020-07-05T19:54:40.000Z
#!/usr/bin/env python # Copyright 2014 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Prints a short log from HEAD (or [end]) to a pseudo revision number.""" __version__ = '1.0' import optparse import subp...
31.108108
77
0.640023
__version__ = '1.0' import optparse import subprocess import sys import calculate_version def get_logs(root, pseudo_revision, mergebase, start, end): start_ref = '%s~%d' % (mergebase, pseudo_revision - start) end_ref = mergebase if end is not None: end_ref += '~%d' % (pseudo_revision - end) refs...
true
true
f74976440616fef712f54101414250f54395d6c8
9,652
py
Python
word_embeddings/test/core/readers.py
rist-ro/argo
a10c33346803239db8a64c104db7f22ec4e05bef
[ "MIT" ]
4
2020-12-07T19:13:13.000Z
2022-01-30T18:52:18.000Z
word_embeddings/test/core/readers.py
rist-ro/argo
a10c33346803239db8a64c104db7f22ec4e05bef
[ "MIT" ]
12
2020-09-25T22:41:28.000Z
2022-02-09T23:46:34.000Z
word_embeddings/test/core/readers.py
rist-ro/argo
a10c33346803239db8a64c104db7f22ec4e05bef
[ "MIT" ]
2
2021-03-02T18:31:04.000Z
2021-03-02T21:56:43.000Z
import numpy as np import operator, os, itertools from abc import ABC, abstractmethod import numexpr as ne ne.set_num_threads(20) def rmtxt(s): if s.endswith(".txt"): s=os.path.splitext(s)[0] return s def get_reader(inputfilename): basename=os.path.basename(inputfilename) reader=None if ba...
40.049793
185
0.638624
import numpy as np import operator, os, itertools from abc import ABC, abstractmethod import numexpr as ne ne.set_num_threads(20) def rmtxt(s): if s.endswith(".txt"): s=os.path.splitext(s)[0] return s def get_reader(inputfilename): basename=os.path.basename(inputfilename) reader=None if ba...
true
true
f74976745151952ece06c7b7ba542e0b63f53899
4,888
py
Python
mhp_extension/detectron2/projects/DensePose/densepose/data/dataset_mapper.py
Veronica1997/Human-segmantation
ef3bd6f94037a22831f412caf332dd3e19924540
[ "MIT" ]
707
2019-09-04T00:52:35.000Z
2022-03-31T07:46:41.000Z
mhp_extension/detectron2/projects/DensePose/densepose/data/dataset_mapper.py
Veronica1997/Human-segmantation
ef3bd6f94037a22831f412caf332dd3e19924540
[ "MIT" ]
60
2019-10-18T05:32:10.000Z
2022-03-25T03:10:20.000Z
mhp_extension/detectron2/projects/DensePose/densepose/data/dataset_mapper.py
Veronica1997/Human-segmantation
ef3bd6f94037a22831f412caf332dd3e19924540
[ "MIT" ]
149
2019-09-06T07:24:52.000Z
2022-03-22T04:55:03.000Z
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import torch from fvcore.common.file_io import PathManager from detectron2.data import MetadataCatalog from detectron2.data import detection_utils as utils from detectron2.data import transforms as T from .stru...
41.07563
100
0.652209
import copy import torch from fvcore.common.file_io import PathManager from detectron2.data import MetadataCatalog from detectron2.data import detection_utils as utils from detectron2.data import transforms as T from .structures import DensePoseDataRelative, DensePoseList, DensePoseTransformData class DatasetMap...
true
true
f749792ce3887de34fb7703611cfe1dc113cc897
3,186
py
Python
saiotx/__init__.py
rkr00t/saiotx
2f7321de3169c4e1e9dd7d61ce4686af213c2147
[ "MIT" ]
null
null
null
saiotx/__init__.py
rkr00t/saiotx
2f7321de3169c4e1e9dd7d61ce4686af213c2147
[ "MIT" ]
null
null
null
saiotx/__init__.py
rkr00t/saiotx
2f7321de3169c4e1e9dd7d61ce4686af213c2147
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals __version__ = '0.0.1' import frappe from frappe import _ from frappe.config import desktop def get_frappe_data(): return [ # Administration { "module_name": "Desk", "category": "Administration", "label": _("Tools"), "color": "#FFF5A7", ...
24.507692
77
0.597615
from __future__ import unicode_literals __version__ = '0.0.1' import frappe from frappe import _ from frappe.config import desktop def get_frappe_data(): return [ { "module_name": "Desk", "category": "Administration", "label": _("Tools"), "color": "#FFF5A7", "reverse": 1, "icon": "octicon oc...
true
true
f7497a3a02a4c1e7f828dc1f8d976a71391cca03
3,804
py
Python
nistats/version.py
PeerHerholz/nistats
a7f8da95efbedc3f33e7b579975096ae31fa15ab
[ "BSD-3-Clause" ]
1
2019-05-28T10:21:42.000Z
2019-05-28T10:21:42.000Z
nistats/version.py
mwegrzyn/nistats
7f600e766333f4e2dbbe4d456fc2fe8cc1bc0b8c
[ "BSD-3-Clause" ]
2
2019-12-18T14:40:01.000Z
2020-01-08T15:13:50.000Z
nistats/version.py
mwegrzyn/nistats
7f600e766333f4e2dbbe4d456fc2fe8cc1bc0b8c
[ "BSD-3-Clause" ]
null
null
null
# *- encoding: utf-8 -*- """ nistats version, required package versions, and utilities for checking """ # Author: Bertrand Thirion # License: simplified BSD # PEP0440 compatible formatted version, see: # https://www.python.org/dev/peps/pep-0440/ # # Generic release markers: # X.Y # X.Y.Z # For bugfix releases # # Admi...
31.7
78
0.64511
information.' % ( 'http://nistats.github.io/introduction.html#installation') REQUIRED_MODULE_METADATA = ( ('numpy', { 'min_version': '1.11', 'install_info': _NISTATS_INSTALL_MSG}), ('scipy', { 'min_version': '0.17', 'install_info': _NISTATS_INSTALL_MSG}), ('sk...
true
true
f7497d8712fd029a25bf3621c210603d647a77d2
31,698
py
Python
rioxarray/_io.py
aerisweather/rioxarray
1755f90ed827ea66477a235677c1c5ecd245833d
[ "ECL-2.0", "Apache-2.0" ]
269
2019-04-16T15:02:31.000Z
2022-03-31T08:10:13.000Z
rioxarray/_io.py
aerisweather/rioxarray
1755f90ed827ea66477a235677c1c5ecd245833d
[ "ECL-2.0", "Apache-2.0" ]
287
2019-04-17T02:51:12.000Z
2022-03-30T14:04:49.000Z
rioxarray/_io.py
aerisweather/rioxarray
1755f90ed827ea66477a235677c1c5ecd245833d
[ "ECL-2.0", "Apache-2.0" ]
43
2019-04-19T20:24:21.000Z
2022-03-25T15:36:56.000Z
""" Credits: This file was adopted from: https://github.com/pydata/xarray # noqa Source file: https://github.com/pydata/xarray/blob/1d7bcbdc75b6d556c04e2c7d7a042e4379e15303/xarray/backends/rasterio_.py # noqa """ import contextlib import os import re import threading import warnings import numpy as np import raster...
33.33123
127
0.618146
import contextlib import os import re import threading import warnings import numpy as np import rasterio from packaging import version from rasterio.errors import NotGeoreferencedWarning from rasterio.vrt import WarpedVRT from xarray import Dataset, IndexVariable from xarray.backends.common import BackendArray from ...
true
true
f7497e0f69216add9eb45ae8b148b4357441525a
8,558
py
Python
cogs/events.py
thyanin/Discord_Bot
7cfa1a1056d49e75de9bb3e343d0f81efd30b96d
[ "MIT" ]
null
null
null
cogs/events.py
thyanin/Discord_Bot
7cfa1a1056d49e75de9bb3e343d0f81efd30b96d
[ "MIT" ]
null
null
null
cogs/events.py
thyanin/Discord_Bot
7cfa1a1056d49e75de9bb3e343d0f81efd30b96d
[ "MIT" ]
null
null
null
import logging import discord from discord.ext import commands from core.state import global_state as gstate from core import ( bot_utility as utility, consts, timers, play_requests ) from core.play_requests import PlayRequestCategory from riot import riot_utility logger = logging.getLogger('events')...
43.222222
159
0.665226
import logging import discord from discord.ext import commands from core.state import global_state as gstate from core import ( bot_utility as utility, consts, timers, play_requests ) from core.play_requests import PlayRequestCategory from riot import riot_utility logger = logging.getLogger('events')...
true
true
f7497e22ec2fa7970e2dfdc56f589a3a69a00725
408
py
Python
packages/python/plotly/plotly/validators/funnel/_hoverinfosrc.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/funnel/_hoverinfosrc.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/funnel/_hoverinfosrc.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="funnel", **kwargs): super(HoverinfosrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
34
83
0.681373
import _plotly_utils.basevalidators class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="funnel", **kwargs): super(HoverinfosrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
true
true
f7497f1f4bb2a67d60b34325c900ce8e14e8d00d
3,202
py
Python
alipay/aop/api/request/AlipayCommerceEducateCampusExamineQueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/request/AlipayCommerceEducateCampusExamineQueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/request/AlipayCommerceEducateCampusExamineQueryRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayCommerceEducateCampusExamineQueryRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._versio...
25.015625
142
0.637726
import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayCommerceEducateCampusExamineQueryRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._version = "1.0" self._terminal_type = None...
true
true
f7497f3c649159ed1bd8b8e279e5fa320ef3de25
1,352
py
Python
py/vision/test1/test1.py
mabotech/mabo.io
7f646db9d5ee3cd0b137866bf8eaf295890f134c
[ "MIT" ]
null
null
null
py/vision/test1/test1.py
mabotech/mabo.io
7f646db9d5ee3cd0b137866bf8eaf295890f134c
[ "MIT" ]
null
null
null
py/vision/test1/test1.py
mabotech/mabo.io
7f646db9d5ee3cd0b137866bf8eaf295890f134c
[ "MIT" ]
1
2021-01-30T01:47:01.000Z
2021-01-30T01:47:01.000Z
import socket import gevent import cv2.cv as cv def main(): cv.NamedWindow("camera", 1) capture = cv.CaptureFromCAM(0) while True: img = cv.QueryFrame(capture) """ im_gray = cv.CreateImage(cv.GetSize(img),cv.IPL_DEPTH_8U,1) cv.CvtColor(img,im_gray,cv.CV_RGB2G...
26
91
0.576183
import socket import gevent import cv2.cv as cv def main(): cv.NamedWindow("camera", 1) capture = cv.CaptureFromCAM(0) while True: img = cv.QueryFrame(capture) cv.ShowImage('camera', img) DestroyWindow("camera") if _...
true
true
f7497fff58453f61dabaa8f1ffde61b8dd0c469b
6,402
py
Python
aws-inventory/lambda/inventory-lambdas.py
riamaria/antiope
ff27d7bb7a2f68789dfdbdc080810def4c7c2c32
[ "Apache-2.0" ]
null
null
null
aws-inventory/lambda/inventory-lambdas.py
riamaria/antiope
ff27d7bb7a2f68789dfdbdc080810def4c7c2c32
[ "Apache-2.0" ]
null
null
null
aws-inventory/lambda/inventory-lambdas.py
riamaria/antiope
ff27d7bb7a2f68789dfdbdc080810def4c7c2c32
[ "Apache-2.0" ]
null
null
null
import boto3 from botocore.exceptions import ClientError import json import os import time import datetime from dateutil import tz from lib.account import * from lib.common import * import logging logger = logging.getLogger() logger.setLevel(logging.INFO) logging.getLogger('botocore').setLevel(logging.WARNING) logg...
45.084507
154
0.643393
import boto3 from botocore.exceptions import ClientError import json import os import time import datetime from dateutil import tz from lib.account import * from lib.common import * import logging logger = logging.getLogger() logger.setLevel(logging.INFO) logging.getLogger('botocore').setLevel(logging.WARNING) logg...
true
true
f7498034f45424d9190f954d9ef346c6ce69db76
8,713
py
Python
app/api/v1/resources/regdevicedetails.py
Muazzama/Device-Registration-Subsystem
d6e3fba3ee2fa566422419a7b0b3ca01b553ac64
[ "Unlicense" ]
null
null
null
app/api/v1/resources/regdevicedetails.py
Muazzama/Device-Registration-Subsystem
d6e3fba3ee2fa566422419a7b0b3ca01b553ac64
[ "Unlicense" ]
null
null
null
app/api/v1/resources/regdevicedetails.py
Muazzama/Device-Registration-Subsystem
d6e3fba3ee2fa566422419a7b0b3ca01b553ac64
[ "Unlicense" ]
null
null
null
""" DRS Registration device resource package. Copyright (c) 2018-2019 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: ...
55.496815
844
0.673821
import json from flask import Response, request from flask_restful import Resource from marshmallow import ValidationError from flask_babel import lazy_gettext as _ from app import app, db from app.api.v1.helpers.error_handlers import REG_NOT_FOUND_MSG from app.api.v1.helpers.response import MIME_TYPES, CODES from ap...
true
true
f74980cff7216115309875726fd85579e0bdcbf0
6,275
py
Python
bitcoin/bloom.py
buzzkillb/exrproxy
fc1dbe6903d78115cdc7ed1bd83595f2ebc5c717
[ "MIT" ]
16
2018-06-20T20:03:40.000Z
2021-11-29T06:56:35.000Z
bitcoin/bloom.py
buzzkillb/exrproxy
fc1dbe6903d78115cdc7ed1bd83595f2ebc5c717
[ "MIT" ]
21
2021-02-04T01:37:44.000Z
2022-03-12T01:00:55.000Z
bitcoin/bloom.py
buzzkillb/exrproxy
fc1dbe6903d78115cdc7ed1bd83595f2ebc5c717
[ "MIT" ]
10
2018-06-19T01:46:05.000Z
2021-09-24T20:48:21.000Z
# Copyright (C) 2013-2014 The python-bitcoinlib developers # # This file is part of python-bitcoinlib. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoinlib, including this file, may be copied, modified, # propagated, or dist...
32.345361
126
0.634104
from __future__ import absolute_import, division, print_function, unicode_literals import struct import sys import math import bitcoin.core import bitcoin.core.serialize def _ROTL32(x, r): assert x <= 0xFFFFFFFF return ((x << r) & 0xFFFFFFFF) | (x >> (32 - r)) def MurmurHash3(nHashSeed, vDataToH...
true
true
f74980f1a8485c3faa8aa3097d098e75df7e3223
1,262
py
Python
HiveMind/allauth/account/migrations/0019_auto_20161206_0731.py
Jorbeatz/HiveMind
48e74bcc1bd58cb4850f8f2a5b44447ad4cb4a62
[ "MIT" ]
1
2019-06-26T19:23:55.000Z
2019-06-26T19:23:55.000Z
HiveMind/allauth/account/migrations/0019_auto_20161206_0731.py
Jorbeatz/HiveMind
48e74bcc1bd58cb4850f8f2a5b44447ad4cb4a62
[ "MIT" ]
null
null
null
HiveMind/allauth/account/migrations/0019_auto_20161206_0731.py
Jorbeatz/HiveMind
48e74bcc1bd58cb4850f8f2a5b44447ad4cb4a62
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-06 07:31 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
33.210526
129
0.616482
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('account', '0018_auto_20161205_...
true
true
f7498235bb262a293d410cbae3b46591d9aa8273
6,068
py
Python
cilantro_audit/create_completed_audit_page.py
bradlet/CilantroAudit
6a56d5fe3dd297fc646048e1e2ff6051d5e013c3
[ "MIT" ]
2
2019-12-07T22:04:28.000Z
2019-12-07T22:26:00.000Z
cilantro_audit/create_completed_audit_page.py
BaderAlshaya/CilantroAudit
6a56d5fe3dd297fc646048e1e2ff6051d5e013c3
[ "MIT" ]
142
2019-08-29T20:21:33.000Z
2019-12-07T21:55:39.000Z
cilantro_audit/create_completed_audit_page.py
BaderAlshaya/CilantroAudit
6a56d5fe3dd297fc646048e1e2ff6051d5e013c3
[ "MIT" ]
3
2019-11-13T18:32:44.000Z
2019-12-07T22:03:41.000Z
from datetime import datetime from kivy.app import App from kivy.uix.popup import Popup from kivy.uix.screenmanager import Screen from kivy.properties import ObjectProperty from kivy.properties import StringProperty from cilantro_audit import globals from cilantro_audit.constants import PROD_DB from cilantro_audit.c...
34.674286
108
0.659855
from datetime import datetime from kivy.app import App from kivy.uix.popup import Popup from kivy.uix.screenmanager import Screen from kivy.properties import ObjectProperty from kivy.properties import StringProperty from cilantro_audit import globals from cilantro_audit.constants import PROD_DB from cilantro_audit.c...
true
true
f74982bc68b935155bd52643a3bb36468c7f943b
913
py
Python
tests/request_schemes/test_deregister_request_data.py
futuresimple/triggear
d6b8511ba8550225e7c34bd52232327b2b89d972
[ "MIT" ]
14
2017-08-17T16:48:26.000Z
2019-07-10T12:11:49.000Z
tests/request_schemes/test_deregister_request_data.py
futuresimple/triggear
d6b8511ba8550225e7c34bd52232327b2b89d972
[ "MIT" ]
null
null
null
tests/request_schemes/test_deregister_request_data.py
futuresimple/triggear
d6b8511ba8550225e7c34bd52232327b2b89d972
[ "MIT" ]
null
null
null
import pytest from app.request_schemes.deregister_request_data import DeregisterRequestData pytestmark = pytest.mark.asyncio @pytest.mark.usefixtures('unstub') class TestDeregisterRequestData: @pytest.mark.parametrize("data", [ {'eventType': ''}, {'eventType': '', 'jobName': ''}, {'event...
38.041667
98
0.663746
import pytest from app.request_schemes.deregister_request_data import DeregisterRequestData pytestmark = pytest.mark.asyncio @pytest.mark.usefixtures('unstub') class TestDeregisterRequestData: @pytest.mark.parametrize("data", [ {'eventType': ''}, {'eventType': '', 'jobName': ''}, {'event...
true
true
f7498318bc0de1717c5904cbcc65e96d09dc43d4
2,056
py
Python
graphs/models/concept_discriminator.py
suvarnak/GenerativeFSLCovid
0bdeb4ed444c5c9d59697c71d0733fc3a100944c
[ "MIT" ]
null
null
null
graphs/models/concept_discriminator.py
suvarnak/GenerativeFSLCovid
0bdeb4ed444c5c9d59697c71d0733fc3a100944c
[ "MIT" ]
null
null
null
graphs/models/concept_discriminator.py
suvarnak/GenerativeFSLCovid
0bdeb4ed444c5c9d59697c71d0733fc3a100944c
[ "MIT" ]
null
null
null
""" discriminator model """ import torch import torch.nn as nn import torchvision.models as models import json from easydict import EasyDict as edict from graphs.weights_initializer import weights_init class EncoderModel(nn.Module): def __init__(self,config): super(EncoderModel, self).__init...
33.16129
111
0.595331
import torch import torch.nn as nn import torchvision.models as models import json from easydict import EasyDict as edict from graphs.weights_initializer import weights_init class EncoderModel(nn.Module): def __init__(self,config): super(EncoderModel, self).__init__() self.config = conf...
true
true
f749833b519eca60c2ae70fd72c38e6decefd258
9,769
py
Python
opacus/privacy_analysis.py
nhsx-mirror/SynthVAE
64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651
[ "MIT" ]
958
2020-08-28T15:34:15.000Z
2022-03-29T20:58:14.000Z
opacus/privacy_analysis.py
nhsx-mirror/SynthVAE
64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651
[ "MIT" ]
330
2020-08-28T07:11:02.000Z
2022-03-31T19:16:10.000Z
opacus/privacy_analysis.py
nhsx-mirror/SynthVAE
64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651
[ "MIT" ]
161
2020-08-28T06:12:10.000Z
2022-03-31T07:47:04.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved r""" *Based on Google's TF Privacy:* https://github.com/tensorflow/privacy/blob/master/tensorflow_privacy/privacy/analysis/rdp_accountant.py. *Here, we update this code to Python 3, and optimize dependencies.* Functionality ...
31.310897
136
0.604463
import math from typing import List, Tuple, Union import numpy as np from scipy import special ef _compute_log_a_for_int_alpha(q: float, sigma: float, alpha: int) -> float: log_a = -np.inf for i in range(alpha + 1): log_coef_i = ( math.log(special.binom(alpha, i)) +...
true
true
f74983a876175079c5477022079985ded134251a
8,477
py
Python
udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson02-miniflow/exercise07-backpropagation/miniflow.py
linksdl/futuretec-project-self_driving_cars_projects
38e8f14543132ec86a8bada8d708eefaef23fee8
[ "MIT" ]
null
null
null
udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson02-miniflow/exercise07-backpropagation/miniflow.py
linksdl/futuretec-project-self_driving_cars_projects
38e8f14543132ec86a8bada8d708eefaef23fee8
[ "MIT" ]
null
null
null
udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson02-miniflow/exercise07-backpropagation/miniflow.py
linksdl/futuretec-project-self_driving_cars_projects
38e8f14543132ec86a8bada8d708eefaef23fee8
[ "MIT" ]
null
null
null
""" # !/usr/bin/env python # -*- coding: utf-8 -*- @Time : 2022/3/26 16:58 @File : miniflow.py """ """ Implement the backward method of the Sigmoid node. """ import numpy as np class Node(object): """ Base class for nodes in the network. Arguments: `inbound_nodes`: A list of nod...
31.396296
118
0.583107
import numpy as np class Node(object): def __init__(self, inbound_nodes=[]): self.inbound_nodes = inbound_nodes self.value = None self.outbound_nodes = [] self.gradients = {} for node in inb...
true
true
f74983ee8d50d570e63ed6b2ab000638fe2a2536
5,283
py
Python
fkOnly.py
uw-biorobotics/IKBT
be1923b441e5bac6662baf64b186cd69f7e31e31
[ "BSD-3-Clause" ]
129
2017-11-17T15:59:31.000Z
2022-03-19T14:37:56.000Z
fkOnly.py
uw-biorobotics/IKBT
be1923b441e5bac6662baf64b186cd69f7e31e31
[ "BSD-3-Clause" ]
36
2018-03-07T01:18:45.000Z
2021-11-17T02:59:05.000Z
fkOnly.py
uw-biorobotics/IKBT
be1923b441e5bac6662baf64b186cd69f7e31e31
[ "BSD-3-Clause" ]
33
2017-09-22T22:42:37.000Z
2022-03-16T22:52:07.000Z
#!/usr/bin/python # # Test for full IK solutions of know robot(s) # Copyright 2017 University of Washington # Developed by Dianmu Zhang and Blake Hannaford # BioRobotics Lab, University of Washington # Redistribution and use in source and binary forms, with or without modification, are permitted provided that th...
35.456376
757
0.678592
import sympy as sp from sys import exit, argv import pickle import unittest import b3 as b3 import ikbtfunctions.helperfunctions as hf import ikbtfunctions.output_latex as ol import ikbtfunctions.output_python as op import ikbtfunctions.output_cpp as oc from ikbtfunctions.ik_robo...
true
true
f74984298a1c13152c51be8c5cdc1aa36d1c7025
5,894
py
Python
tomlev/__main__.py
thesimj/tomlev
a1ccad93d1f6179277d01d6e0f868635a0076c2d
[ "MIT" ]
null
null
null
tomlev/__main__.py
thesimj/tomlev
a1ccad93d1f6179277d01d6e0f868635a0076c2d
[ "MIT" ]
null
null
null
tomlev/__main__.py
thesimj/tomlev
a1ccad93d1f6179277d01d6e0f868635a0076c2d
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2022 Mykola Bubelich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publis...
32.032609
117
0.612657
import re from os import environ from os.path import expandvars from pathlib import Path from typing import Dict, Any, List, NamedTuple, Set, Optional try: from tomli import loads as tomli_loads except ImportError: tomli_loads = None __version__ = "0.0.4" RE_DOT_ENV = re.compile( r"^(?!\d+)(?P<name>[\w\...
true
true
f74984db61a4f872017583cefa3255fd3eb31770
230
py
Python
myapi/myapi/__init__.py
a472/send-email-alert
2b27511fbbef3f0b0a8a8f81065a8c38a5e4c978
[ "MIT" ]
3
2020-06-02T05:25:35.000Z
2021-01-08T00:56:12.000Z
myapi/myapi/__init__.py
a472/send-email-alert
2b27511fbbef3f0b0a8a8f81065a8c38a5e4c978
[ "MIT" ]
null
null
null
myapi/myapi/__init__.py
a472/send-email-alert
2b27511fbbef3f0b0a8a8f81065a8c38a5e4c978
[ "MIT" ]
1
2020-10-22T02:03:37.000Z
2020-10-22T02:03:37.000Z
from __future__ import absolute_import, unicode_literals # This will make sure the app is always imported when # Django starts so that shared_task will use this app. from .celery import app as celery_app __all__ = ('celery_app',)
38.333333
56
0.8
from __future__ import absolute_import, unicode_literals from .celery import app as celery_app __all__ = ('celery_app',)
true
true
f74985bea8ef177170657f70946e6195f6a8624f
1,660
py
Python
catalyst/contrib/models/segmentation/decoder/psp.py
sergeyshilin/catalyst
f4dfaac7bc3fe98b2a0a9cf0b4347b100750f82f
[ "Apache-2.0" ]
3
2019-11-02T05:37:06.000Z
2020-01-13T02:26:07.000Z
catalyst/contrib/models/segmentation/decoder/psp.py
sergeyshilin/catalyst
f4dfaac7bc3fe98b2a0a9cf0b4347b100750f82f
[ "Apache-2.0" ]
null
null
null
catalyst/contrib/models/segmentation/decoder/psp.py
sergeyshilin/catalyst
f4dfaac7bc3fe98b2a0a9cf0b4347b100750f82f
[ "Apache-2.0" ]
null
null
null
from typing import List from functools import partial import torch from .core import DecoderSpec from ..blocks.core import _get_block from ..blocks.psp import PSPBlock from ..abn import ABN class PSPDecoder(DecoderSpec): def __init__( self, in_channels: List[int], in_strides: List[int], ...
26.774194
69
0.61988
from typing import List from functools import partial import torch from .core import DecoderSpec from ..blocks.core import _get_block from ..blocks.psp import PSPBlock from ..abn import ABN class PSPDecoder(DecoderSpec): def __init__( self, in_channels: List[int], in_strides: List[int], ...
true
true
f74985f3ae652dd11d09264afda4285e3a8516c2
12,112
py
Python
tools/psa/release.py
leszekgrzegorek/mbed-os
31fb3f929b5460a3337b5771414a202e2e8ce38e
[ "Apache-2.0" ]
2
2019-10-22T08:34:09.000Z
2019-10-22T12:47:35.000Z
tools/psa/release.py
leszekgrzegorek/mbed-os
31fb3f929b5460a3337b5771414a202e2e8ce38e
[ "Apache-2.0" ]
12
2017-12-20T10:12:34.000Z
2018-11-07T21:17:37.000Z
tools/psa/release.py
leszekgrzegorek/mbed-os
31fb3f929b5460a3337b5771414a202e2e8ce38e
[ "Apache-2.0" ]
1
2019-07-09T17:41:41.000Z
2019-07-09T17:41:41.000Z
#!/usr/bin/python # Copyright (c) 2017-2018 ARM Limited # # SPDX-License-Identifier: Apache-2.0 # # 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-...
33.551247
109
0.615588
import os import subprocess import sys import shutil import logging import argparse FNULL = open(os.devnull, 'w') ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) sys.path.insert(0, ROOT) from tools.toolchains import TOOLCHAIN_CL...
true
true
f74985fdcf26dd9ce75ff1cd18f57bf3de27ea21
586
py
Python
kcss/migrations/0005_auto_20200730_1555.py
jyuno426/KCSS
0d23130e9e79f6089d2f942ff96cb414e17448f8
[ "MIT" ]
null
null
null
kcss/migrations/0005_auto_20200730_1555.py
jyuno426/KCSS
0d23130e9e79f6089d2f942ff96cb414e17448f8
[ "MIT" ]
null
null
null
kcss/migrations/0005_auto_20200730_1555.py
jyuno426/KCSS
0d23130e9e79f6089d2f942ff96cb414e17448f8
[ "MIT" ]
1
2022-02-16T10:09:50.000Z
2022-02-16T10:09:50.000Z
# Generated by Django 3.0.8 on 2020-07-30 06:55 from django.db import migrations, models import kcss.models class Migration(migrations.Migration): dependencies = [ ('kcss', '0004_auto_20200729_2327'), ] operations = [ migrations.RemoveField( model_name='conference', ...
24.416667
115
0.62116
from django.db import migrations, models import kcss.models class Migration(migrations.Migration): dependencies = [ ('kcss', '0004_auto_20200729_2327'), ] operations = [ migrations.RemoveField( model_name='conference', name='published_years', ), ...
true
true
f74986152a8154f43beea4b8188cb2427678c7bb
29,540
py
Python
src/domainClient/models/domain_public_adapter_web_api_models_v1_listings_commercial_search_request.py
diabolical-ninja/smart-property-search
0931c7c8195ec21cbd56768c9c84cea2927a9e1d
[ "MIT" ]
5
2021-04-12T04:10:42.000Z
2021-04-28T05:54:22.000Z
src/domainClient/models/domain_public_adapter_web_api_models_v1_listings_commercial_search_request.py
diabolical-ninja/smart-property-search
0931c7c8195ec21cbd56768c9c84cea2927a9e1d
[ "MIT" ]
35
2020-05-26T14:21:37.000Z
2022-03-29T16:14:42.000Z
src/domainClient/models/domain_public_adapter_web_api_models_v1_listings_commercial_search_request.py
diabolical-ninja/smart-property-search
0931c7c8195ec21cbd56768c9c84cea2927a9e1d
[ "MIT" ]
2
2020-05-26T14:02:12.000Z
2022-01-10T08:19:49.000Z
# coding: utf-8 """ Domain Group API V1 Provides public access to Domain's microservices # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class DomainPublicAdapterWebApiModelsV1Listin...
42.936047
3,775
0.684157
import pprint import re import six class DomainPublicAdapterWebApiModelsV1ListingsCommercialSearchRequest(object): swagger_types = { 'page_number': 'int', 'advertiser_id': 'int', 'page_size': 'int', 'property_types': 'list[str]', 'price': 'DomainPublicAdapterWebApiM...
true
true
f749862c734829d7252ec1f02be7833ad5ba0ccb
983
py
Python
tests/test_colors.py
deepjyoti30/simber
c4090198e6e8f6df1fce3011f827007cba80edea
[ "MIT" ]
15
2020-10-14T09:43:48.000Z
2021-11-24T22:00:27.000Z
tests/test_colors.py
deepjyoti30/simber
c4090198e6e8f6df1fce3011f827007cba80edea
[ "MIT" ]
3
2021-04-15T00:41:52.000Z
2022-03-09T18:44:03.000Z
tests/test_colors.py
deepjyoti30/simber
c4090198e6e8f6df1fce3011f827007cba80edea
[ "MIT" ]
3
2020-11-13T15:33:26.000Z
2020-12-22T18:10:25.000Z
"""Test the colors module of the logger.""" from simber.colors import ColorFormatter from colorama import Fore def test_color_formatter(): """Test the color_formatter method of the class""" s = "%gnana%" output = Fore.GREEN + "nana" + Fore.RESET assert ColorFormatter().format_colors(s) == output, "S...
27.305556
75
0.684639
from simber.colors import ColorFormatter from colorama import Fore def test_color_formatter(): s = "%gnana%" output = Fore.GREEN + "nana" + Fore.RESET assert ColorFormatter().format_colors(s) == output, "Should be `Green`" def test__replace_with_colors(): s = "%gnana%" output = Fore.GREEN + "n...
true
true
f749863bbee6fd43cc5663ed61ae90543ac2349e
300
py
Python
28/00/C.py
pylangstudy/201710
139cad34d40f23beac85800633ec2ed63d530bfd
[ "CC0-1.0" ]
null
null
null
28/00/C.py
pylangstudy/201710
139cad34d40f23beac85800633ec2ed63d530bfd
[ "CC0-1.0" ]
25
2017-10-03T00:12:53.000Z
2017-10-29T23:58:17.000Z
28/00/C.py
pylangstudy/201710
139cad34d40f23beac85800633ec2ed63d530bfd
[ "CC0-1.0" ]
null
null
null
import sqlite3 con = sqlite3.connect(":memory:") con.row_factory = sqlite3.Row cur = con.cursor() cur.execute("select 'John' as name, 42 as age") for row in cur: assert row[0] == row["name"] assert row["name"] == row["nAmE"] assert row[1] == row["age"] assert row[1] == row["AgE"]
21.428571
47
0.616667
import sqlite3 con = sqlite3.connect(":memory:") con.row_factory = sqlite3.Row cur = con.cursor() cur.execute("select 'John' as name, 42 as age") for row in cur: assert row[0] == row["name"] assert row["name"] == row["nAmE"] assert row[1] == row["age"] assert row[1] == row["AgE"]
true
true
f7498693b7dc59cc47cc114b6121bb1338c48315
6,487
py
Python
sdk/python/pulumi_openstack/loadbalancer/load_balancer.py
Frassle/pulumi-openstack
6fc26edd7c42e7c3d65a01cf9384148cc56466e4
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_openstack/loadbalancer/load_balancer.py
Frassle/pulumi-openstack
6fc26edd7c42e7c3d65a01cf9384148cc56466e4
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_openstack/loadbalancer/load_balancer.py
Frassle/pulumi-openstack
6fc26edd7c42e7c3d65a01cf9384148cc56466e4
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi import pulumi.runtime class LoadBalancer(pulumi.CustomResource): """ Manages a V2 loadbalancer resource within O...
42.123377
235
0.647449
import pulumi import pulumi.runtime class LoadBalancer(pulumi.CustomResource): def __init__(__self__, __name__, __opts__=None, admin_state_up=None, description=None, flavor=None, loadbalancer_provider=None, name=None, region=None, security_group_ids=None, tenant_id=None, vip_address=None, vip_subnet_id=None): ...
true
true
f74986ca13651958ecd1952e4092d5de73943895
85,485
py
Python
aesara/tensor/math.py
sagartomar/aesara
477f4e5dd757b1ccd3deaf59bf75fc27d7ab9cf6
[ "BSD-3-Clause" ]
1
2021-12-30T00:44:32.000Z
2021-12-30T00:44:32.000Z
aesara/tensor/math.py
sagartomar/aesara
477f4e5dd757b1ccd3deaf59bf75fc27d7ab9cf6
[ "BSD-3-Clause" ]
null
null
null
aesara/tensor/math.py
sagartomar/aesara
477f4e5dd757b1ccd3deaf59bf75fc27d7ab9cf6
[ "BSD-3-Clause" ]
null
null
null
import builtins import warnings import numpy as np from aesara import config, printing from aesara import scalar as aes from aesara.gradient import DisconnectedType from aesara.graph.basic import Apply, Variable from aesara.graph.op import COp, Op from aesara.graph.params_type import ParamsType from aesara.graph.type...
28.938727
148
0.599766
import builtins import warnings import numpy as np from aesara import config, printing from aesara import scalar as aes from aesara.gradient import DisconnectedType from aesara.graph.basic import Apply, Variable from aesara.graph.op import COp, Op from aesara.graph.params_type import ParamsType from aesara.graph.type...
true
true
f7498776d6d764986f833ad690614f69b1ffc640
9,945
py
Python
ldapauthkeys/authmap.py
Conan-Kudo/openssh-ldap-authkeys
62188a5bcbd5e766d7b132e2550074ab147f6dee
[ "MIT" ]
6
2019-02-17T02:00:17.000Z
2020-05-17T12:08:29.000Z
ldapauthkeys/authmap.py
Conan-Kudo/openssh-ldap-authkeys
62188a5bcbd5e766d7b132e2550074ab147f6dee
[ "MIT" ]
4
2019-02-18T16:42:00.000Z
2021-11-18T14:53:33.000Z
ldapauthkeys/authmap.py
Conan-Kudo/openssh-ldap-authkeys
62188a5bcbd5e766d7b132e2550074ab147f6dee
[ "MIT" ]
3
2019-02-17T11:15:39.000Z
2021-09-28T16:28:26.000Z
import re import pwd import grp import ldap.asyncsearch import ldap.filter import ldap.dn from ldapauthkeys.util import * from ldapauthkeys.logging import get_logger from ldapauthkeys.config import array_merge_unique # List of paths where we'll search for an authmap authmap_paths = [ './authmap', '/etc/openssh...
33.597973
134
0.543489
import re import pwd import grp import ldap.asyncsearch import ldap.filter import ldap.dn from ldapauthkeys.util import * from ldapauthkeys.logging import get_logger from ldapauthkeys.config import array_merge_unique authmap_paths = [ './authmap', '/etc/openssh-ldap-authkeys/authmap', ] class AuthorizedEntit...
true
true
f74988f65d0c99d6410a8a6300f6acd7f26fd340
303,156
py
Python
Packs/Base/Scripts/CommonServerPython/CommonServerPython.py
concentricai/demisto-content
ad8c66456b0dbcad62528a1483bcf0d6b8dd814e
[ "MIT" ]
1
2022-03-05T02:23:32.000Z
2022-03-05T02:23:32.000Z
Packs/Base/Scripts/CommonServerPython/CommonServerPython.py
concentricai/demisto-content
ad8c66456b0dbcad62528a1483bcf0d6b8dd814e
[ "MIT" ]
35
2022-03-14T12:40:27.000Z
2022-03-31T01:50:51.000Z
Packs/Base/Scripts/CommonServerPython/CommonServerPython.py
concentricai/demisto-content
ad8c66456b0dbcad62528a1483bcf0d6b8dd814e
[ "MIT" ]
2
2021-12-13T13:07:21.000Z
2022-03-05T02:23:34.000Z
"""Common functions script This script will be appended to each server script before being executed. Please notice that to add custom common code, add it to the CommonServerUserPython script. Note that adding code to CommonServerUserPython can override functions in CommonServerPython """ from __future__ import print_fu...
37.124173
738
0.592738
from __future__ import print_function import base64 import json import logging import os import re import socket import sys import time import traceback from random import randint import xml.etree.cElementTree as ET from collections import OrderedDict from datetime import datetime, timedelta from abc import abstractme...
true
true
f74989fc7d2f133f9063748e7f815bb8eac8c7d3
887
py
Python
src/instrumentation.py
mratsim/home-credit-default-risk
66bbe05d8a9345f4ba93f00bc8c4456244208503
[ "FSFAP" ]
78
2018-08-30T07:52:43.000Z
2022-02-24T20:58:22.000Z
src/instrumentation.py
mratsim/home-credit-default-risk
66bbe05d8a9345f4ba93f00bc8c4456244208503
[ "FSFAP" ]
1
2018-08-31T03:05:46.000Z
2018-08-31T06:45:04.000Z
src/instrumentation.py
mratsim/home-credit-default-risk
66bbe05d8a9345f4ba93f00bc8c4456244208503
[ "FSFAP" ]
21
2018-08-30T13:16:03.000Z
2022-01-16T10:18:51.000Z
import logging import os from functools import wraps from timeit import default_timer as timer def setup_logs(save_file): ## initialize logger logger = logging.getLogger("HomeCredit") logger.setLevel(logging.INFO) ## create the logging file handler fh = logging.FileHandler(save_file) ## create the loggin...
23.342105
72
0.708005
import logging import os from functools import wraps from timeit import default_timer as timer def setup_logs(save_file): .getLogger("HomeCredit") logger.setLevel(logging.INFO) file) ter = logging.Formatter("%(asctime)s - %(message)s") fh.setFormatter(formatter) ch.setFormatter(formatter) er.addHandle...
true
true
f7498a3e9f4ea446700e3abb57df95571b6294f5
8,274
py
Python
usuarios.py
rodrigomoreira777/POO2021.2
7c5d45148882337e4d72258f50f14eda8d42d1df
[ "MIT" ]
null
null
null
usuarios.py
rodrigomoreira777/POO2021.2
7c5d45148882337e4d72258f50f14eda8d42d1df
[ "MIT" ]
null
null
null
usuarios.py
rodrigomoreira777/POO2021.2
7c5d45148882337e4d72258f50f14eda8d42d1df
[ "MIT" ]
null
null
null
import abc import os from ferramentas_produtos import * from ferramentas_usuarios import * class Usuario(abc.ABC): licenca = None # Atributo de classe. def __init__(self, login, senha): self.login = login self.senha = senha self.licenca = Usuario.licenca def cadastra_produto(sel...
37.954128
118
0.575417
import abc import os from ferramentas_produtos import * from ferramentas_usuarios import * class Usuario(abc.ABC): licenca = None def __init__(self, login, senha): self.login = login self.senha = senha self.licenca = Usuario.licenca def cadastra_produto(self, data_entrega, qtd)...
true
true
f7498ca98e3074638851cf69a2ecdb40c1904d41
19,962
py
Python
ci-scripts/sanityCheckDeploy.py
danielgora/openair-hss
d1dc3c34dd94c14b4f64f492ff04f5f777160c22
[ "BSD-3-Clause" ]
null
null
null
ci-scripts/sanityCheckDeploy.py
danielgora/openair-hss
d1dc3c34dd94c14b4f64f492ff04f5f777160c22
[ "BSD-3-Clause" ]
null
null
null
ci-scripts/sanityCheckDeploy.py
danielgora/openair-hss
d1dc3c34dd94c14b4f64f492ff04f5f777160c22
[ "BSD-3-Clause" ]
null
null
null
#/* # * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more # * contributor license agreements. See the NOTICE file distributed with # * this work for additional information regarding copyright ownership. # * The OpenAirInterface Software Alliance licenses this file to You under # * the terms fo...
47.985577
415
0.594079
import os import re import sys import subprocess import time CI_NETWORK_DBN='192.168.28.0/26' CI_NETWORK_S11='192.168.28.128/26' CI_NETWORK_S6A='192.168.31.0/24' CI_NETWORK_S10='192.168.32.0/24' CI_NETWORK_S1C='192.168.33.0/24' CI_CASS_IP_ADDR='192.168.28.2' CI_HSS_DBN_ADDR='192.168.28.3' CI_HSS_S6A...
true
true
f7498cee3bd2e8141b4271bbdacedd2900ff2dfb
95,577
py
Python
pymatgen/electronic_structure/boltztrap.py
mailhexu/pymatgen
70da55dd860771eb9d38c306dbcd3f6b074b7a54
[ "MIT" ]
18
2019-06-15T18:08:21.000Z
2022-01-30T05:01:29.000Z
ComRISB/pyextern/pymatgen/pymatgen/electronic_structure/boltztrap.py
comscope/Comsuite
b80ca9f34c519757d337487c489fb655f7598cc2
[ "BSD-3-Clause" ]
null
null
null
ComRISB/pyextern/pymatgen/pymatgen/electronic_structure/boltztrap.py
comscope/Comsuite
b80ca9f34c519757d337487c489fb655f7598cc2
[ "BSD-3-Clause" ]
11
2019-06-05T02:57:55.000Z
2021-12-29T02:54:25.000Z
# coding: utf-8 from __future__ import division, unicode_literals, print_function import math import os import subprocess import tempfile import logging import numpy as np from monty.dev import requires from monty.json import jsanitize from monty.os import cd from monty.os.path import which from scipy.constants impo...
45.211447
113
0.504577
from __future__ import division, unicode_literals, print_function import math import os import subprocess import tempfile import logging import numpy as np from monty.dev import requires from monty.json import jsanitize from monty.os import cd from monty.os.path import which from scipy.constants import e, m_e from ...
true
true
f7498d61f21ad2d4b584ef01b2687cfec00ea134
602
py
Python
mycroft-core-dev/mycroft/fileOpener/__init__.py
edegeyer/masterarbeit
a310de258a325faf3f4283f9db5ccf57905d3c0e
[ "Apache-2.0" ]
null
null
null
mycroft-core-dev/mycroft/fileOpener/__init__.py
edegeyer/masterarbeit
a310de258a325faf3f4283f9db5ccf57905d3c0e
[ "Apache-2.0" ]
null
null
null
mycroft-core-dev/mycroft/fileOpener/__init__.py
edegeyer/masterarbeit
a310de258a325faf3f4283f9db5ccf57905d3c0e
[ "Apache-2.0" ]
null
null
null
# class that's used to open the local wave file, that's generated as spoken answer import socket class fileOpener(): def __init__(self): pass def openFile(self, uri): # TODO: set the IP to the one that's currently used by Loomo (find it by accessing Loomo's settings) LoomoIP = "192.16...
28.666667
108
0.593023
import socket class fileOpener(): def __init__(self): pass def openFile(self, uri): LoomoIP = "192.168.43.52" LoomoPort = 65433 with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((LoomoIP, LoomoPort)) with open (uri, 'rb')...
true
true
f7498dcb3ba8884cbcc200a082f087bad8375da2
19,116
py
Python
dca/visualization.py
petrapoklukar/DCA
e5b3f3481433306a4b33e712272f8bbf5e9d05ce
[ "MIT" ]
2
2022-02-14T15:54:22.000Z
2022-02-15T18:43:36.000Z
dca/visualization.py
petrapoklukar/DCA
e5b3f3481433306a4b33e712272f8bbf5e9d05ce
[ "MIT" ]
null
null
null
dca/visualization.py
petrapoklukar/DCA
e5b3f3481433306a4b33e712272f8bbf5e9d05ce
[ "MIT" ]
null
null
null
from dca.DCA import DelaunayGraph from dca.schemes import DelaunayGraphVisualizer import numpy as np import os import matplotlib as mpl if not "DISPLAY" in os.environ: print("no display found. Using non-interactive Agg backend") mpl.use("Agg") import matplotlib.pyplot as plt from matplotlib.lines import Line2D...
32.958621
98
0.574754
from dca.DCA import DelaunayGraph from dca.schemes import DelaunayGraphVisualizer import numpy as np import os import matplotlib as mpl if not "DISPLAY" in os.environ: print("no display found. Using non-interactive Agg backend") mpl.use("Agg") import matplotlib.pyplot as plt from matplotlib.lines import Line2D...
true
true
f7498ef06297fc390361044d756ff5e839396030
8,150
py
Python
contrib/devtools/update-translations.py
IONOSProject/Ionos
eb8e3ef3cec8d5b4cda5297592107bd2056511ed
[ "MIT" ]
null
null
null
contrib/devtools/update-translations.py
IONOSProject/Ionos
eb8e3ef3cec8d5b4cda5297592107bd2056511ed
[ "MIT" ]
null
null
null
contrib/devtools/update-translations.py
IONOSProject/Ionos
eb8e3ef3cec8d5b4cda5297592107bd2056511ed
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the follo...
38.625592
124
0.633865
from __future__ import division, print_function import subprocess import re import sys import os import io import xml.etree.ElementTree as ET TX = 'tx' SOURCE_LANG = 'ionos_en.ts' LOCALE_DIR = 'src/qt/locale' MIN_NUM_MESSAGES = 10 def check_at_repository_root(): if not os.path.exists('.git'): prin...
true
true
f7498f2cafb72ab0aac179c3eb572d00359543ce
2,887
py
Python
code.py
Parita-D/olympic-hero
8a809a6308146c09235af43379f29e7e5e83827d
[ "MIT" ]
null
null
null
code.py
Parita-D/olympic-hero
8a809a6308146c09235af43379f29e7e5e83827d
[ "MIT" ]
null
null
null
code.py
Parita-D/olympic-hero
8a809a6308146c09235af43379f29e7e5e83827d
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file data = pd.read_csv(path) data.rename(columns={"Total":"Total_Medals"}, inplace=True) data.head(10) #Code starts here # -------------- #Code starts here data['Better_Ev...
22.554688
117
0.699342
import pandas as pd import numpy as np import matplotlib.pyplot as plt data = pd.read_csv(path) data.rename(columns={"Total":"Total_Medals"}, inplace=True) data.head(10) data['Better_Event'] = np.where(data['Total_Summer']>data['Total_Winter'],'Summer', 'Winter') data['Better_Event'] = np.wher...
true
true
f74990008e2e817c17cd1c9cd83d67e1e652b138
1,810
py
Python
tests/pyre/descriptors/inheritance.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
3
2019-08-02T21:02:47.000Z
2021-09-08T13:59:43.000Z
tests/pyre/descriptors/inheritance.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
null
null
null
tests/pyre/descriptors/inheritance.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2019 all rights reserved # """ Verify that derived descriptors get harvested correctly """ def test(): # get the descriptor package from pyre import descriptors # get the base metaclass from pyre.patterns...
24.794521
83
0.61768
def test(): from pyre import descriptors from pyre.patterns.AttributeClassifier import AttributeClassifier class harvester(AttributeClassifier): def __new__(cls, name, bases, attributes): pile = [] for entryName, entry in ...
true
true
f749902511690ee044243b0c36bba823da91673f
905
py
Python
server_guardian/migrations/0005_auto_20160222_0420.py
bitmazk/django-server-guardian
1b6f642b8aa9abd03ef86f9879432cb0d0260375
[ "MIT" ]
null
null
null
server_guardian/migrations/0005_auto_20160222_0420.py
bitmazk/django-server-guardian
1b6f642b8aa9abd03ef86f9879432cb0d0260375
[ "MIT" ]
null
null
null
server_guardian/migrations/0005_auto_20160222_0420.py
bitmazk/django-server-guardian
1b6f642b8aa9abd03ef86f9879432cb0d0260375
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server_guardian', '0004_remove_server_logging'), ] operations = [ migrations.RemoveField( model_name='server', ...
26.617647
92
0.58232
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server_guardian', '0004_remove_server_logging'), ] operations = [ migrations.RemoveField( model_name='server', name='respon...
true
true
f74991912c1f079d7c18b3d24661d11d47f8139b
1,579
py
Python
authorizer/3/authorizer.py
mrmoss/lawl.org
16ea6d88b5ce5a900e290a7c4aa15b9a312e5e2a
[ "Unlicense" ]
1
2016-05-25T02:23:47.000Z
2016-05-25T02:23:47.000Z
authorizer/3/authorizer.py
mrmoss/lawl.org
16ea6d88b5ce5a900e290a7c4aa15b9a312e5e2a
[ "Unlicense" ]
null
null
null
authorizer/3/authorizer.py
mrmoss/lawl.org
16ea6d88b5ce5a900e290a7c4aa15b9a312e5e2a
[ "Unlicense" ]
1
2018-04-12T04:25:08.000Z
2018-04-12T04:25:08.000Z
#!/usr/bin/env python2 import employees import json import sys import urllib2 import pygame import time scoring_host='scoring.csc.uaf.edu' #scoring_host='127.0.0.1:8081' database=[] index=3 def authorize(department,id,issue,flag_id): global database global scoring_host lookup=employees.search(database,[id],True) ...
23.567164
79
0.666244
import employees import json import sys import urllib2 import pygame import time scoring_host='scoring.csc.uaf.edu' database=[] index=3 def authorize(department,id,issue,flag_id): global database global scoring_host lookup=employees.search(database,[id],True) lookup=json.loads(lookup) if len(lookup)>0: looku...
true
true
f74992d5efc609f71d39fd3764f3e6496782fd5e
1,377
py
Python
ansible/module_utils/facts/namespace.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
ansible/module_utils/facts/namespace.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
ansible/module_utils/facts/namespace.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
34.425
89
0.721133
from __future__ import (absolute_import, division, print_function) __metaclass__ = type class FactNamespace: def __init__(self, namespace_name): self.namespace_name = namespace_name def transform(self, name): return name def _underscore(self, name): return name.rep...
true
true
f74992d6285df6702e6c9abd4d6d79e8052495b5
151
py
Python
main.py
sdcal2008/pythonapps
43c733595278cd17b740521f31132de837cb7a65
[ "MIT" ]
null
null
null
main.py
sdcal2008/pythonapps
43c733595278cd17b740521f31132de837cb7a65
[ "MIT" ]
null
null
null
main.py
sdcal2008/pythonapps
43c733595278cd17b740521f31132de837cb7a65
[ "MIT" ]
null
null
null
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello from Azure!' if __name__ == '__main__': app.run()
15.1
28
0.675497
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello from Azure!' if __name__ == '__main__': app.run()
true
true