hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
7900996eb1d7fb9f6c9c731ffebd5a50edb0db98
374
py
Python
scale_image.py
JorgeGarciaIrazabal/ml-face-detector
11321ac13fdb02c17072f134a0a838779b483cfe
[ "Apache-2.0" ]
null
null
null
scale_image.py
JorgeGarciaIrazabal/ml-face-detector
11321ac13fdb02c17072f134a0a838779b483cfe
[ "Apache-2.0" ]
null
null
null
scale_image.py
JorgeGarciaIrazabal/ml-face-detector
11321ac13fdb02c17072f134a0a838779b483cfe
[ "Apache-2.0" ]
null
null
null
#%% import cv2 from pathlib import Path #%% root = Path(__file__).resolve().absolute().parent jorge_path = root / "jorge" jorge_dst_path = root / "jorge_100" marissa_path = root / "marissa" marissa_dst_path = root / "marissa_100" #%% for f in jorge_path.iterdir(): old_image = cv2.imread(str(f)) ...
22
50
0.663102
import cv2 from pathlib import Path root = Path(__file__).resolve().absolute().parent jorge_path = root / "jorge" jorge_dst_path = root / "jorge_100" marissa_path = root / "marissa" marissa_dst_path = root / "marissa_100" for f in jorge_path.iterdir(): old_image = cv2.imread(str(f)) image = cv...
true
true
7900999d8d9a583be7467034c092ce097ab720c0
441
py
Python
data/scripts/templates/object/tangible/deed/faction_perk/hq/shared_hq_s05.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/deed/faction_perk/hq/shared_hq_s05.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/deed/faction_perk/hq/shared_hq_s05.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/deed/faction_perk/hq/shared_hq_s05.iff" result.attribute_template_i...
25.941176
75
0.721088
true
true
790099a3b5a04d1fd21626d7782c716678795487
514
py
Python
VENV/lib/python3.6/site-packages/PyInstaller/hooks/hook-netCDF4.py
workingyifei/display-pattern-generator
b27be84c6221fa93833f283109870737b05bfbf6
[ "MIT" ]
3
2018-11-27T06:30:23.000Z
2021-05-30T15:56:32.000Z
VENV/lib/python3.6/site-packages/PyInstaller/hooks/hook-netCDF4.py
workingyifei/display-pattern-generator
b27be84c6221fa93833f283109870737b05bfbf6
[ "MIT" ]
1
2018-11-15T02:00:31.000Z
2021-12-06T02:20:32.000Z
VENV/lib/python3.6/site-packages/PyInstaller/hooks/hook-netCDF4.py
workingyifei/display-pattern-generator
b27be84c6221fa93833f283109870737b05bfbf6
[ "MIT" ]
1
2020-11-06T18:46:35.000Z
2020-11-06T18:46:35.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2015-2017, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
39.538462
78
0.529183
hiddenimports = ['netCDF4.utils', 'netcdftime']
true
true
79009a0e172bb334196352ff179af9fc27fa35c8
18,400
py
Python
illustrip.py
ksburaya/aphantasia
de9d430dee7108abfcb1b19eb2d8d806b8e5d899
[ "MIT" ]
1
2021-11-17T10:17:47.000Z
2021-11-17T10:17:47.000Z
illustrip.py
ksburaya/aphantasia
de9d430dee7108abfcb1b19eb2d8d806b8e5d899
[ "MIT" ]
null
null
null
illustrip.py
ksburaya/aphantasia
de9d430dee7108abfcb1b19eb2d8d806b8e5d899
[ "MIT" ]
null
null
null
# coding: UTF-8 import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import warnings warnings.filterwarnings("ignore") import argparse import numpy as np import shutil import PIL import time from imageio import imread, imsave from googletrans import Translator import torch import torchvision import torch.nn.functional as ...
49.329759
170
0.598804
import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import warnings warnings.filterwarnings("ignore") import argparse import numpy as np import shutil import PIL import time from imageio import imread, imsave from googletrans import Translator import torch import torchvision import torch.nn.functional as F from torchvis...
true
true
79009a415910d76735237b1e2ab606e420652e3d
296
py
Python
Python 3 - Curso completo/exercicio049.py
PedroMunizdeMatos/Estudos-e-Projetos
5949c1f2a80100c1e2db56c7b60f5f0475c0d1dc
[ "MIT" ]
null
null
null
Python 3 - Curso completo/exercicio049.py
PedroMunizdeMatos/Estudos-e-Projetos
5949c1f2a80100c1e2db56c7b60f5f0475c0d1dc
[ "MIT" ]
null
null
null
Python 3 - Curso completo/exercicio049.py
PedroMunizdeMatos/Estudos-e-Projetos
5949c1f2a80100c1e2db56c7b60f5f0475c0d1dc
[ "MIT" ]
null
null
null
# Refaça o exercicio009, mostrando a tabuada de um número que um usuário escolher utilizando FOR. print('=-='*3) print('TABUADA') print('=-='*3) m = 0 n = int(input('Digite o número que deseja saber a tabuada: ')) for c in range(1, 11): m = n * c print('{} x {} = {}.'.format(n, c, m))
24.666667
97
0.611486
print('=-='*3) print('TABUADA') print('=-='*3) m = 0 n = int(input('Digite o número que deseja saber a tabuada: ')) for c in range(1, 11): m = n * c print('{} x {} = {}.'.format(n, c, m))
true
true
79009c1afff10844c5894a7cdc1561d5a428b4f3
466
py
Python
dorchester/point.py
eyeseast/dorchester
72b6641ca8837cce01114c620869d055a00d9b66
[ "Apache-2.0" ]
3
2021-04-09T21:07:46.000Z
2021-07-26T05:17:23.000Z
dorchester/point.py
eyeseast/dorchester
72b6641ca8837cce01114c620869d055a00d9b66
[ "Apache-2.0" ]
33
2021-04-08T17:32:39.000Z
2022-03-30T15:38:23.000Z
dorchester/point.py
eyeseast/dorchester
72b6641ca8837cce01114c620869d055a00d9b66
[ "Apache-2.0" ]
null
null
null
# this is here to avoid a circular import from collections import namedtuple class Point(namedtuple("Point", ["x", "y", "group", "fid"])): @property def __geo_interface__(self): return {"type": "Point", "coordinates": (self.x, self.y)} def as_feature(self): geometry = self.__geo_interface...
33.285714
82
0.641631
from collections import namedtuple class Point(namedtuple("Point", ["x", "y", "group", "fid"])): @property def __geo_interface__(self): return {"type": "Point", "coordinates": (self.x, self.y)} def as_feature(self): geometry = self.__geo_interface__ properties = {"group": self.gr...
true
true
79009cd0b7ce5709a71cc30bd5fdc5a155fff4f4
3,559
gyp
Python
src/prediction/prediction_test.gyp
dancerj/mozc
a5a4927c1f709d2ff0c681585c746f73a434e4c9
[ "BSD-3-Clause" ]
null
null
null
src/prediction/prediction_test.gyp
dancerj/mozc
a5a4927c1f709d2ff0c681585c746f73a434e4c9
[ "BSD-3-Clause" ]
1
2021-06-30T14:59:51.000Z
2021-06-30T15:31:56.000Z
src/prediction/prediction_test.gyp
dancerj/mozc
a5a4927c1f709d2ff0c681585c746f73a434e4c9
[ "BSD-3-Clause" ]
1
2022-03-25T09:01:39.000Z
2022-03-25T09:01:39.000Z
# Copyright 2010-2020, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and ...
40.908046
74
0.688677
{ 'variables': { 'relative_dir': 'prediction', 'gen_out_dir': '<(SHARED_INTERMEDIATE_DIR)/<(relative_dir)', }, 'targets': [ { 'target_name': 'prediction_test', 'type': 'executable', 'sources': [ 'dictionary_predictor_test.cc', 'user_histor...
true
true
79009cd3ebc42252a8c8d8816598bfd6c1ce6dd9
1,169
py
Python
airflow/contrib/hooks/gcp_cloud_build_hook.py
IGIT-CN/airflow
a6e5bcd59198afe5716813e84ebc4c59eade532c
[ "Apache-2.0" ]
8
2017-04-20T16:15:44.000Z
2020-10-11T13:44:10.000Z
airflow/contrib/hooks/gcp_cloud_build_hook.py
IGIT-CN/airflow
a6e5bcd59198afe5716813e84ebc4c59eade532c
[ "Apache-2.0" ]
219
2017-03-15T18:40:16.000Z
2022-02-28T22:52:43.000Z
airflow/contrib/hooks/gcp_cloud_build_hook.py
IGIT-CN/airflow
a6e5bcd59198afe5716813e84ebc4c59eade532c
[ "Apache-2.0" ]
4
2020-07-17T14:02:28.000Z
2022-02-23T04:29:58.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
40.310345
96
0.775021
import warnings from airflow.providers.google.cloud.hooks.cloud_build import CloudBuildHook warnings.warn( "This module is deprecated. Please use `airflow.providers.google.cloud.hooks.cloud_build`.", DeprecationWarning, stacklevel=2 )
true
true
79009d32adde13c522a2b7ab816dceb84c6045fd
1,979
py
Python
sandbox/legacy_plot_code/plot_icd_vs_colorgrad_vs_sersic.py
boada/ICD
c1bfedf5f8e5b0e9f77c6d1194bf1e0266d7efd8
[ "MIT" ]
null
null
null
sandbox/legacy_plot_code/plot_icd_vs_colorgrad_vs_sersic.py
boada/ICD
c1bfedf5f8e5b0e9f77c6d1194bf1e0266d7efd8
[ "MIT" ]
null
null
null
sandbox/legacy_plot_code/plot_icd_vs_colorgrad_vs_sersic.py
boada/ICD
c1bfedf5f8e5b0e9f77c6d1194bf1e0266d7efd8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # File: plot_icd_vs_colorgrad.py # Created on: Tue 08 May 2012 11:03:26 AM CDT # Last Change: Sun 21 Oct 2012 02:43:33 PM CDT # Purpose of script: <+INSERT+> # Author: Steven Boada import pylab as pyl from mk_galaxy_struc import mk_galaxy_struc galaxies = mk_galaxy_struc() f1 = pyl.figure(1,fig...
29.537313
79
0.624558
import pylab as pyl from mk_galaxy_struc import mk_galaxy_struc galaxies = mk_galaxy_struc() f1 = pyl.figure(1,figsize=(8,8)) f1s1 = f1.add_subplot(221) f1s2 = f1.add_subplot(222) f1s3 = f1.add_subplot(223) f1s4 = f1.add_subplot(224) for galaxy in galaxies: if galaxy.ston_I >= 30. and galaxy.Color_grad !=...
true
true
79009dcadfd004abaca7cf03dd82a7c65de93b90
972
py
Python
chapter12/examples/example02.py
YordanIH/Intro_to_CS_w_Python
eebbb8efd7ef0d07be9bc45b6b1e8f20737ce01a
[ "MIT" ]
null
null
null
chapter12/examples/example02.py
YordanIH/Intro_to_CS_w_Python
eebbb8efd7ef0d07be9bc45b6b1e8f20737ce01a
[ "MIT" ]
null
null
null
chapter12/examples/example02.py
YordanIH/Intro_to_CS_w_Python
eebbb8efd7ef0d07be9bc45b6b1e8f20737ce01a
[ "MIT" ]
null
null
null
#Find,Remove,Find """Return a tuple of the indices of the two smallest values in list L. >>> items = [809, 834, 477, 478, 307, 122, 96, 102, 324, 476] >>> find_two_smallest(items) (6, 7) >>> items == [809, 834, 477, 478, 307, 122, 96, 102, 324, 476] True """ from typing import List, Tuple def fin...
24.3
70
0.614198
from typing import List, Tuple def find_two_smallest(L:List[float]) -> Tuple[int, int]: smallest = min(L) min1 = L.index(smallest) L.remove(smallest) next_smallest = min(L) min2 = L.index(next_smallest) L.insert(min1, smallest) if min1 <= min2: min2 +=1 ...
true
true
79009e394b41ee662959a7f12813a047e779881f
1,623
py
Python
smoothot/tests/test_projection.py
cptq/smooth-ot
a165c0c949730ec0490a0670352e04c39762062c
[ "BSD-2-Clause" ]
null
null
null
smoothot/tests/test_projection.py
cptq/smooth-ot
a165c0c949730ec0490a0670352e04c39762062c
[ "BSD-2-Clause" ]
null
null
null
smoothot/tests/test_projection.py
cptq/smooth-ot
a165c0c949730ec0490a0670352e04c39762062c
[ "BSD-2-Clause" ]
null
null
null
import numpy as np from sklearn.utils.testing import assert_array_almost_equal from smoothot.projection import projection_simplex def _projection_simplex(v, z=1): """ Old implementation for test and benchmark purposes. The arguments v and z should be a vector and a scalar, respectively. """ n_fea...
28.473684
78
0.650647
import numpy as np from sklearn.utils.testing import assert_array_almost_equal from smoothot.projection import projection_simplex def _projection_simplex(v, z=1): n_features = v.shape[0] u = np.sort(v)[::-1] cssv = np.cumsum(u) - z ind = np.arange(n_features) + 1 cond = u - cssv / ind > 0 rho...
true
true
7900a0013c282cba7d5fba70491bdfc7a24c2c82
10,659
py
Python
src/rdb/tests/rdb_test_runner.py
vatelzh/daos
3aca9ae033946ca24179ba0a180c0b8422cd2738
[ "Apache-2.0" ]
1
2019-11-28T07:26:38.000Z
2019-11-28T07:26:38.000Z
src/rdb/tests/rdb_test_runner.py
vatelzh/daos
3aca9ae033946ca24179ba0a180c0b8422cd2738
[ "Apache-2.0" ]
52
2019-12-04T05:47:10.000Z
2020-06-09T03:26:12.000Z
src/rdb/tests/rdb_test_runner.py
vatelzh/daos
3aca9ae033946ca24179ba0a180c0b8422cd2738
[ "Apache-2.0" ]
8
2019-12-04T08:26:00.000Z
2020-06-09T07:40:11.000Z
#!/usr/bin/python # Copyright (c) 2018-2019 Intel Corporation # # 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, m...
34.383871
82
0.638334
# or disclose this software are subject to the terms of the Apache License as # provided in Contract No. 8F-30005. # Any reproduction of computer software, computer software documentation, or # portions thereof marked with this legend must also reproduce the markings. """ This script runs the rd...
false
true
7900a012d73d2c6e3706b7e5adc64f9e5d1aa94e
3,769
py
Python
app/services/pool/pool.py
somespecialone/clever-inspect
8735e0b445c8e7e9b83c627d4a5fbed1428c1891
[ "MIT" ]
1
2022-03-12T05:44:12.000Z
2022-03-12T05:44:12.000Z
app/services/pool/pool.py
somespecialone/clever-inspect
8735e0b445c8e7e9b83c627d4a5fbed1428c1891
[ "MIT" ]
null
null
null
app/services/pool/pool.py
somespecialone/clever-inspect
8735e0b445c8e7e9b83c627d4a5fbed1428c1891
[ "MIT" ]
null
null
null
import logging import asyncio from steam.ext.csgo import Client from steam.ext.csgo.enums import Language from steam.ext.csgo.backpack import BaseInspectedItem from steam.protobufs import GCMsgProto, EMsg, MsgProto from steam.protobufs.client_server import CMsgClientLicenseListLicense from steam_tradeoffer_manager.ba...
22.704819
120
0.613425
import logging import asyncio from steam.ext.csgo import Client from steam.ext.csgo.enums import Language from steam.ext.csgo.backpack import BaseInspectedItem from steam.protobufs import GCMsgProto, EMsg, MsgProto from steam.protobufs.client_server import CMsgClientLicenseListLicense from steam_tradeoffer_manager.ba...
true
true
7900a0a926aa64ad95ee205dd355f50cf4263d59
470
py
Python
example/manage.py
peterbe/django-jingo-offline-compressor
282cb4a0cea3a0f3b4c9c00b8ee4be8ed9cf9ce7
[ "BSD-3-Clause" ]
1
2015-05-17T08:20:05.000Z
2015-05-17T08:20:05.000Z
example/manage.py
peterbe/django-jingo-offline-compressor
282cb4a0cea3a0f3b4c9c00b8ee4be8ed9cf9ce7
[ "BSD-3-Clause" ]
null
null
null
example/manage.py
peterbe/django-jingo-offline-compressor
282cb4a0cea3a0f3b4c9c00b8ee4be8ed9cf9ce7
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import os import sys import warnings if __name__ == "__main__": here = os.path.dirname(__file__) there = os.path.join(here, '..') there = os.path.abspath(there) sys.path.insert(0, there) print "NOTE Using jingo_offline_compressor from %s" % there os.environ.setdefault("DJ...
26.111111
71
0.725532
import os import sys import warnings if __name__ == "__main__": here = os.path.dirname(__file__) there = os.path.join(here, '..') there = os.path.abspath(there) sys.path.insert(0, there) print "NOTE Using jingo_offline_compressor from %s" % there os.environ.setdefault("DJANGO_SETTINGS_MODULE"...
false
true
7900a0af06525ec857da6ff0a1ff1daab53be7dc
3,120
py
Python
dayu_widgets_mvc/item_view_set.py
muyr/dayu_widgets_mvc
902766359caf6b5f9d0becf5e346569a26d5674d
[ "MIT" ]
3
2019-09-12T07:33:26.000Z
2022-03-21T07:11:19.000Z
dayu_widgets/item_view_set.py
kanbang/dayu_widgets
6ff101e6c6f8fcf10e5cb578023a12ccdcef9164
[ "MIT" ]
null
null
null
dayu_widgets/item_view_set.py
kanbang/dayu_widgets
6ff101e6c6f8fcf10e5cb578023a12ccdcef9164
[ "MIT" ]
1
2022-02-16T14:19:54.000Z
2022-02-16T14:19:54.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################### # Author: Mu yanru # Date : 2018.5 # Email : muyanru345@163.com ################################################################### from dayu_widgets.item_model import MSortFilterModel, MTableModel from d...
39.493671
106
0.690705
true
true
7900a134932544acc96a287638e2783a6497123c
808
py
Python
nlu/components/lemmatizer.py
sumanthratna/nlu
acde6879d776116051d4cbe909268ab8946989b5
[ "Apache-2.0" ]
1
2020-09-25T22:55:13.000Z
2020-09-25T22:55:13.000Z
nlu/components/lemmatizer.py
sumanthratna/nlu
acde6879d776116051d4cbe909268ab8946989b5
[ "Apache-2.0" ]
null
null
null
nlu/components/lemmatizer.py
sumanthratna/nlu
acde6879d776116051d4cbe909268ab8946989b5
[ "Apache-2.0" ]
null
null
null
from nlu import * from nlu.pipe_components import SparkNLUComponent from sparknlp.annotator import * class Lemmatizer(SparkNLUComponent): def __init__(self,component_name='lemma', language='en', component_type='lemmatizer', get_default=False,model = None, sparknlp_reference=''): component_name = 'lemmatiz...
44.888889
145
0.709158
from nlu import * from nlu.pipe_components import SparkNLUComponent from sparknlp.annotator import * class Lemmatizer(SparkNLUComponent): def __init__(self,component_name='lemma', language='en', component_type='lemmatizer', get_default=False,model = None, sparknlp_reference=''): component_name = 'lemmatiz...
true
true
7900a3cb2fe883116b5dddf46e9f623d2757d39e
302
py
Python
setup.py
ferlzc/youtube-dl-flask
afc01922c70650a05919c071f176c72479e5bf47
[ "Unlicense" ]
null
null
null
setup.py
ferlzc/youtube-dl-flask
afc01922c70650a05919c071f176c72479e5bf47
[ "Unlicense" ]
null
null
null
setup.py
ferlzc/youtube-dl-flask
afc01922c70650a05919c071f176c72479e5bf47
[ "Unlicense" ]
null
null
null
from setuptools import setup setup( name='yt-dl', version = "0.1.0", author = "Fernando Luiz Cola", author_email ="fernando.cola@emc-logic.com", license = "MIT", install_requires=[ 'Flask', 'youtube-dl', ], )
21.571429
52
0.480132
from setuptools import setup setup( name='yt-dl', version = "0.1.0", author = "Fernando Luiz Cola", author_email ="fernando.cola@emc-logic.com", license = "MIT", install_requires=[ 'Flask', 'youtube-dl', ], )
true
true
7900a408abb0e85cf06173bbfa8c45244a7a51e4
10,433
py
Python
pubs.py
Ibrahimmohamed33/web
4cbeba3ab9b83bfa780dcf84dc3bad9b9ac188a0
[ "MIT" ]
null
null
null
pubs.py
Ibrahimmohamed33/web
4cbeba3ab9b83bfa780dcf84dc3bad9b9ac188a0
[ "MIT" ]
null
null
null
pubs.py
Ibrahimmohamed33/web
4cbeba3ab9b83bfa780dcf84dc3bad9b9ac188a0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # an ugly hack to convert some stuff into other stuff... # EDIT THESE ##################################################################### names_to_highlight = ['Eren AM', 'Delmont TO', 'Esen ÖC', 'Lee STM', ...
44.776824
266
0.557749
sup>Co-senior authors</span>') if pub['doi'] in self.info: info = self.info[pub['doi']] A(' <div class="%s">' % ('pub-info' if info['featured_image'] else 'pub-info-no-image')) if info['featured_image']: A(' <div class="pub-featured-image">') ...
true
true
7900a4680b4f1b5c6b30355fbfadf81023efdc8c
319
py
Python
rewrite_multi_pis_ansilbe_hosts.py
yujmo/python
ff4802cd0ab00ba91f9ca466e52a39ce5da44791
[ "Apache-2.0" ]
null
null
null
rewrite_multi_pis_ansilbe_hosts.py
yujmo/python
ff4802cd0ab00ba91f9ca466e52a39ce5da44791
[ "Apache-2.0" ]
null
null
null
rewrite_multi_pis_ansilbe_hosts.py
yujmo/python
ff4802cd0ab00ba91f9ca466e52a39ce5da44791
[ "Apache-2.0" ]
null
null
null
with open('/home/pi/kown_hosts') as kown_f,open('/home/pi/cache_hosts') as cache_f: kown_hosts = kown_f.readlines() cache_hosts = set(cache_f.readlines()) kown_hosts = [host.split() for host in kown_hosts] with open('/etc/ansible/hosts','w') as wf: wf.writelines([x.split()[1]+"\n" for x in cache_hosts])
35.444444
83
0.689655
with open('/home/pi/kown_hosts') as kown_f,open('/home/pi/cache_hosts') as cache_f: kown_hosts = kown_f.readlines() cache_hosts = set(cache_f.readlines()) kown_hosts = [host.split() for host in kown_hosts] with open('/etc/ansible/hosts','w') as wf: wf.writelines([x.split()[1]+"\n" for x in cache_hosts])
true
true
7900a4f625b92fbaf650baeb2d4607ac690945d2
7,545
py
Python
pcs_images_packages_read.py
moonman81/pc-toolbox
c88c6291118eab0f01add173243d3d1eacc39496
[ "MIT" ]
null
null
null
pcs_images_packages_read.py
moonman81/pc-toolbox
c88c6291118eab0f01add173243d3d1eacc39496
[ "MIT" ]
null
null
null
pcs_images_packages_read.py
moonman81/pc-toolbox
c88c6291118eab0f01add173243d3d1eacc39496
[ "MIT" ]
null
null
null
""" Get a list of Packages in CI, Deployed, or all Images """ from __future__ import print_function from pc_lib import pc_api, pc_utility # --Configuration-- # parser = pc_utility.get_arg_parser() parser.add_argument( '--mode', type=str, choices=['ci', 'deployed', 'all'], default='all', help='(Op...
37.351485
129
0.605302
from __future__ import print_function from pc_lib import pc_api, pc_utility parser = pc_utility.get_arg_parser() parser.add_argument( '--mode', type=str, choices=['ci', 'deployed', 'all'], default='all', help='(Optional) - Report on CI, Deployed, or all Images.') parser.add_argument( '--packa...
true
true
7900a610a7fe99f11beeab17e51704daf0e039b4
11,974
py
Python
simba/make/simbaerrno.py
ghsecuritylab/N17
2291615396e97923ffd655d1087222f6fb1f86bd
[ "MIT" ]
325
2015-11-12T15:21:39.000Z
2022-01-11T09:39:36.000Z
simba/make/simbaerrno.py
ghsecuritylab/N17
2291615396e97923ffd655d1087222f6fb1f86bd
[ "MIT" ]
216
2016-01-02T10:57:11.000Z
2021-08-25T05:36:51.000Z
simba/make/simbaerrno.py
ghsecuritylab/N17
2291615396e97923ffd655d1087222f6fb1f86bd
[ "MIT" ]
101
2015-12-28T16:21:27.000Z
2022-03-29T11:59:01.000Z
errno_map = { "1": { "comment": "Operation not permitted", "name": "EPERM" }, "2": { "comment": "No such file or directory", "name": "ENOENT" }, "3": { "comment": "No such process", "name": "ESRCH" }, "4": { "comment": "Interrupte...
23.11583
70
0.431769
errno_map = { "1": { "comment": "Operation not permitted", "name": "EPERM" }, "2": { "comment": "No such file or directory", "name": "ENOENT" }, "3": { "comment": "No such process", "name": "ESRCH" }, "4": { "comment": "Interrupte...
true
true
7900a7398b9d2533f4dca9741bca6b386cc6c3b5
6,338
py
Python
pysnmp-with-texts/SNMP-MPD-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/SNMP-MPD-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/SNMP-MPD-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module SNMP-MPD-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SNMP-MPD-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:08:13 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
132.041667
921
0.778321
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint = mibBuild...
true
true
7900a8c0407ae7c15d6cfc7568abb10ddbe5149f
8,602
py
Python
py3k-sympy/sympy/logic/tests/test_boolalg.py
cielavenir/sympy
ada04faf48a4eb6c1529e8a5d49a6f2f9ce2616e
[ "BSD-3-Clause" ]
null
null
null
py3k-sympy/sympy/logic/tests/test_boolalg.py
cielavenir/sympy
ada04faf48a4eb6c1529e8a5d49a6f2f9ce2616e
[ "BSD-3-Clause" ]
null
null
null
py3k-sympy/sympy/logic/tests/test_boolalg.py
cielavenir/sympy
ada04faf48a4eb6c1529e8a5d49a6f2f9ce2616e
[ "BSD-3-Clause" ]
null
null
null
from sympy.logic.boolalg import to_cnf, eliminate_implications, distribute_and_over_or, \ compile_rule, conjuncts, disjuncts, to_int_repr, fuzzy_not, Boolean, is_cnf from sympy import symbols, And, Or, Xor, Not, Nand, Nor, Implies, Equivalent, ITE from sympy.utilities.pytest import raises, XFAIL def test_overloadi...
32.097015
89
0.562892
from sympy.logic.boolalg import to_cnf, eliminate_implications, distribute_and_over_or, \ compile_rule, conjuncts, disjuncts, to_int_repr, fuzzy_not, Boolean, is_cnf from sympy import symbols, And, Or, Xor, Not, Nand, Nor, Implies, Equivalent, ITE from sympy.utilities.pytest import raises, XFAIL def test_overloadi...
true
true
7900abe356ffbddc2bca77051f275782bc7c99b1
317
py
Python
Curso-em-video-Python3-mundo3/ex108/moeda.py
bernardombraga/Solucoes-exercicios-cursos-gratuitos
0347a8325443fce84e0a753c96f523a22858537b
[ "MIT" ]
null
null
null
Curso-em-video-Python3-mundo3/ex108/moeda.py
bernardombraga/Solucoes-exercicios-cursos-gratuitos
0347a8325443fce84e0a753c96f523a22858537b
[ "MIT" ]
null
null
null
Curso-em-video-Python3-mundo3/ex108/moeda.py
bernardombraga/Solucoes-exercicios-cursos-gratuitos
0347a8325443fce84e0a753c96f523a22858537b
[ "MIT" ]
null
null
null
def metade(x=0): res = x / 2 return res def dobro(x=0): res = 2 * x return res def aumentar(x=0, y=0): res = x * (1 + y / 100) return res def reduzir(x=0, y=0): res = x * (1 - y / 100) return res def moeda(x=0, m='R$'): res = f'{m}{x:.2f}'.replace('.', ',') return res
13.208333
41
0.473186
def metade(x=0): res = x / 2 return res def dobro(x=0): res = 2 * x return res def aumentar(x=0, y=0): res = x * (1 + y / 100) return res def reduzir(x=0, y=0): res = x * (1 - y / 100) return res def moeda(x=0, m='R$'): res = f'{m}{x:.2f}'.replace('.', ',') return res
true
true
7900abe9e8f5740b6c211d610c43b0b312b958a2
3,294
py
Python
ucsmsdk/mometa/bios/BiosVfExecuteDisableBit.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/bios/BiosVfExecuteDisableBit.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/bios/BiosVfExecuteDisableBit.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for BiosVfExecuteDisableBit ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class BiosVfExecuteDisableBitConsts: SUPPORTED_BY_DEFAULT_NO = "no" SUPPORTED_BY_DEFAULT_YES = ...
57.789474
287
0.687007
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class BiosVfExecuteDisableBitConsts: SUPPORTED_BY_DEFAULT_NO = "no" SUPPORTED_BY_DEFAULT_YES = "yes" VP_EXECUTE_DISABLE_BIT_DISABLED = "disabled" VP_EXECUTE_DISABLE_BIT_ENABLED = "e...
true
true
7900ace9ad04d258678c59834b1a699500f361bd
881
py
Python
Python/SearchInsertPosition.py
TonnyL/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
205
2017-11-16T08:38:46.000Z
2022-03-06T05:50:03.000Z
Python/SearchInsertPosition.py
santosh241/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
3
2018-04-10T10:17:52.000Z
2020-12-11T08:00:09.000Z
Python/SearchInsertPosition.py
santosh241/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
28
2018-04-10T06:42:42.000Z
2021-09-14T14:15:39.000Z
# -*- coding: UTF-8 -*- # Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. # # You may assume no duplicates in the array. # # Here are few examples. # [1,3,5,6], 5 → 2 # [1,3,5,6], 2 → 1 # [1,3,5,6], 7 → 4 # [1,3,5...
26.69697
156
0.523269
class SearchInsertPosition(object): def searchInsert(self, nums, target): if nums is None or len(nums) == 0: return 0 for i in range(0, len(nums)): if nums[i] == target: return i elif nums[i] < target: if (i + 1 < len...
true
true
7900ad817cfd6b053661207065b1a9129af1ae48
401
py
Python
kweetservice/kweetservice/wsgi.py
teunw/JEA6-Kweeter
9da250bc4717e5c17297e8d2bc9ee0e39b6d53e6
[ "MIT" ]
null
null
null
kweetservice/kweetservice/wsgi.py
teunw/JEA6-Kweeter
9da250bc4717e5c17297e8d2bc9ee0e39b6d53e6
[ "MIT" ]
18
2018-02-18T20:17:33.000Z
2018-02-28T19:51:33.000Z
kweetservice/kweetservice/wsgi.py
teunw/JEA6-Kweeter
9da250bc4717e5c17297e8d2bc9ee0e39b6d53e6
[ "MIT" ]
1
2018-02-26T14:28:44.000Z
2018-02-26T14:28:44.000Z
""" WSGI config for kweetservice project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_...
23.588235
78
0.790524
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "kweetservice.settings") application = get_wsgi_application()
true
true
7900ae0b72de776f42176f7055e913242b485667
1,619
py
Python
test/unit/test_router.py
RedHatOfficial/receptor
0eb9f0e3bd3b25bce948f7a2f43562f181a630a1
[ "Apache-2.0" ]
6
2020-07-12T05:56:21.000Z
2022-03-09T11:43:53.000Z
test/unit/test_router.py
RedHatOfficial/receptor
0eb9f0e3bd3b25bce948f7a2f43562f181a630a1
[ "Apache-2.0" ]
7
2020-07-06T15:51:06.000Z
2021-08-18T18:55:26.000Z
test/unit/test_router.py
RedHatOfficial/receptor
0eb9f0e3bd3b25bce948f7a2f43562f181a630a1
[ "Apache-2.0" ]
3
2020-06-25T21:03:42.000Z
2021-08-09T01:27:48.000Z
import pytest from receptor.router import MeshRouter test_networks = [ ( [ ("a", "b", 1), ("a", "d", 1), ("a", "f", 1), ("b", "d", 1), ("b", "c", 1), ("c", "e", 1), ("c", "h", 1), ("c", "j", 1), ("e"...
31.745098
88
0.413218
import pytest from receptor.router import MeshRouter test_networks = [ ( [ ("a", "b", 1), ("a", "d", 1), ("a", "f", 1), ("b", "d", 1), ("b", "c", 1), ("c", "e", 1), ("c", "h", 1), ("c", "j", 1), ("e"...
true
true
7900ae3e4053dc3a0b8e6c2dd8401574c3f4af7a
5,212
py
Python
chefboost/training/Preprocess.py
anapaulamendes/chefboost
4628154f054cb6c79ab3f69a642d597c1265b202
[ "MIT" ]
322
2019-03-06T15:01:32.000Z
2022-03-30T12:26:30.000Z
chefboost/training/Preprocess.py
anapaulamendes/chefboost
4628154f054cb6c79ab3f69a642d597c1265b202
[ "MIT" ]
21
2019-09-03T17:55:56.000Z
2022-03-23T06:29:42.000Z
chefboost/training/Preprocess.py
anapaulamendes/chefboost
4628154f054cb6c79ab3f69a642d597c1265b202
[ "MIT" ]
86
2019-05-02T19:55:54.000Z
2022-03-23T03:33:06.000Z
import numpy as np import math from chefboost.training import Training #from training import Training def processContinuousFeatures(algorithm, df, column_name, entropy, config): #if True: if df[column_name].nunique() <= 20: unique_values = sorted(df[column_name].unique()) else: unique_values = ...
39.18797
158
0.700691
import numpy as np import math from chefboost.training import Training def processContinuousFeatures(algorithm, df, column_name, entropy, config): if df[column_name].nunique() <= 20: unique_values = sorted(df[column_name].unique()) else: unique_values = [] df_mean = df[column_name].mean(...
true
true
7900ae9cfe9061026d17775927a526a9e50184bb
1,144
py
Python
release/stubs.min/System/Windows/Controls/__init___parts/InkCanvasEditingMode.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
182
2017-06-27T02:26:15.000Z
2022-03-30T18:53:43.000Z
release/stubs.min/System/Windows/Controls/__init___parts/InkCanvasEditingMode.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
28
2017-06-27T13:38:23.000Z
2022-03-15T11:19:44.000Z
release/stubs.min/System/Windows/Controls/__init___parts/InkCanvasEditingMode.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
67
2017-06-28T09:43:59.000Z
2022-03-20T21:17:10.000Z
class InkCanvasEditingMode(Enum,IComparable,IFormattable,IConvertible): """ Specifies the editing mode for the System.Windows.Controls.InkCanvas enum InkCanvasEditingMode,values: EraseByPoint (5),EraseByStroke (6),GestureOnly (2),Ink (1),InkAndGesture (3),None (0),Select (4) """ def __eq__(self,*args):...
27.902439
215
0.682692
class InkCanvasEditingMode(Enum,IComparable,IFormattable,IConvertible): """ Specifies the editing mode for the System.Windows.Controls.InkCanvas enum InkCanvasEditingMode,values: EraseByPoint (5),EraseByStroke (6),GestureOnly (2),Ink (1),InkAndGesture (3),None (0),Select (4) """ def __eq__(self,*args):...
false
true
7900b278925c5fb0d6dc23776c83c90adc49ccaf
3,613
py
Python
jd_fanli.py
w123113/loon
0efa307483f1da818b44a36d7ec797ad417a5b53
[ "Apache-2.0" ]
null
null
null
jd_fanli.py
w123113/loon
0efa307483f1da818b44a36d7ec797ad417a5b53
[ "Apache-2.0" ]
null
null
null
jd_fanli.py
w123113/loon
0efa307483f1da818b44a36d7ec797ad417a5b53
[ "Apache-2.0" ]
2
2021-11-06T00:45:46.000Z
2022-01-18T07:56:47.000Z
""" const $ = new Env("京东饭粒"); 京东饭粒任务 活动入口:https://u.jd.com/ytWx4w0 每天60豆小毛,爱要不要 cron: 46 9 * * * jd_fanli.py """ import os import time import re import requests import random proxies = {"http": None, "https": None} def randomstr(num): randomstr = "" for i in range(num): randomstr = randomstr + ra...
33.453704
331
0.599779
import os import time import re import requests import random proxies = {"http": None, "https": None} def randomstr(num): randomstr = "" for i in range(num): randomstr = randomstr + random.choice("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") return randomstr def randomstr1...
true
true
7900b395f9f262044bbea20a2bff4d6f3c340218
3,229
py
Python
source/interprocedural_analyses/taint/test/integration/via_type_of.py
joehendrix/pyre-check
23693455b1e0b4a7287efba9337be6bbfe23ada4
[ "MIT" ]
1
2022-02-10T10:51:32.000Z
2022-02-10T10:51:32.000Z
source/interprocedural_analyses/taint/test/integration/via_type_of.py
joehendrix/pyre-check
23693455b1e0b4a7287efba9337be6bbfe23ada4
[ "MIT" ]
null
null
null
source/interprocedural_analyses/taint/test/integration/via_type_of.py
joehendrix/pyre-check
23693455b1e0b4a7287efba9337be6bbfe23ada4
[ "MIT" ]
null
null
null
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import enum from builtins import _test_sink, _test_source from typing import Annotated, Any, Dict, List class Test1_C: x: int = 0 ...
17.741758
65
0.635491
import enum from builtins import _test_sink, _test_source from typing import Annotated, Any, Dict, List class Test1_C: x: int = 0 y: str = "y" z: Annotated[str, "test1"] = "z" def test1_alarm1(): c = Test1_C(_test_source()) _test_sink(c.x) def test1_alarm2(): c = Test1_C(_te...
true
true
7900b43bbe6367311223bee3a8ad519eced17a32
4,602
py
Python
simcse/train_unsup.py
Macielyoung/sentence_representation_matching
aa33147eb870a805f69dbc54c2177b11a94cf814
[ "Apache-2.0" ]
22
2022-01-24T10:08:39.000Z
2022-03-31T10:47:05.000Z
simcse/train_unsup.py
Macielyoung/sentence_representation_matching
aa33147eb870a805f69dbc54c2177b11a94cf814
[ "Apache-2.0" ]
3
2022-03-06T11:52:25.000Z
2022-03-15T06:32:17.000Z
simcse/train_unsup.py
Macielyoung/sentence_representation_matching
aa33147eb870a805f69dbc54c2177b11a94cf814
[ "Apache-2.0" ]
5
2022-02-28T09:13:04.000Z
2022-03-22T12:50:09.000Z
# -*- coding: utf-8 -*- # @Time : 2021/6/10 # @Author : kaka import argparse import logging import os from config import Params from datasets import load_dataset import torch import torch.nn.functional as F from torch.utils.data import DataLoader from tqdm import tqdm from transformers import AutoTokenizer impor...
38.35
124
0.651673
import argparse import logging import os from config import Params from datasets import load_dataset import torch import torch.nn.functional as F from torch.utils.data import DataLoader from tqdm import tqdm from transformers import AutoTokenizer import numpy as np from SimCSE import SimCSE os.environ["CUDA_VISIB...
true
true
7900b4fc822a05a014be892f51a80210696f3a13
865
py
Python
josephus.py
rhthomas/Python-Interview-Problems-for-Practice
cb713c13f6d70851dbde6337944a77940dfabff2
[ "MIT" ]
null
null
null
josephus.py
rhthomas/Python-Interview-Problems-for-Practice
cb713c13f6d70851dbde6337944a77940dfabff2
[ "MIT" ]
null
null
null
josephus.py
rhthomas/Python-Interview-Problems-for-Practice
cb713c13f6d70851dbde6337944a77940dfabff2
[ "MIT" ]
1
2020-08-21T04:08:42.000Z
2020-08-21T04:08:42.000Z
# Problem: N soldiers are standing in a circle and # first person has sword and he kills the 2nd person # and gives the sword to the third person and so on # till 99th person kills the 100th person gives the # sword back to the first person, this goes on till # only one person survives. Print the survivor. ...
37.608696
76
0.678613
def josephus(people, step=2): if step<=1: print("Enter step value, greater than 1") else: step -= 1 kill = step while(len(people) > 1): print(people.pop(kill)) kill = (kill + step) % len(people) print(people[0], "is safe") num = int(input("Enter the number of so...
true
true
7900b61193b6ea07e230a1500d503e1cdaf6fd68
2,269
py
Python
airflow/executors/celery_executor.py
fengzhongzhu1621/xAirflow
4ecd136eb662d44a4f8d7b9262eca5f2d9f91ec0
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
3
2018-08-31T05:27:36.000Z
2019-04-10T13:09:18.000Z
airflow/executors/celery_executor.py
fengzhongzhu1621/xAirflow
4ecd136eb662d44a4f8d7b9262eca5f2d9f91ec0
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/executors/celery_executor.py
fengzhongzhu1621/xAirflow
4ecd136eb662d44a4f8d7b9262eca5f2d9f91ec0
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
34.907692
76
0.75584
import subprocess import os from celery import Celery from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG from airflow.exceptions import AirflowException from airflow import configuration from xTool.utils.log.logging_mixin import LoggingMixin from xTool.utils.module_loading imp...
true
true
7900b737bfa055d4ccba8b5ba8bf4355f56555bc
2,455
py
Python
topy/data/H8T_K.py
TarcisioLOliveira/topy
060da675e6494fee63fa5547befcb1f8ecc39fdc
[ "MIT" ]
1
2021-01-25T00:13:34.000Z
2021-01-25T00:13:34.000Z
topy/data/H8T_K.py
TarcisioLOliveira/topy
060da675e6494fee63fa5547befcb1f8ecc39fdc
[ "MIT" ]
null
null
null
topy/data/H8T_K.py
TarcisioLOliveira/topy
060da675e6494fee63fa5547befcb1f8ecc39fdc
[ "MIT" ]
null
null
null
""" # ============================================================================= # Creates the stiffness matrix as requested, using the material properties # provided in the TPD file (for v2020 files). # # Author: William Hunter, Tarcísio L. de Oliveira # Copyright (C) 2008, 2015, William Hunter. # Copyright (C) 2...
32.733333
79
0.479837
""" # ============================================================================= # Creates the stiffness matrix as requested, using the material properties # provided in the TPD file (for v2020 files). # # Author: William Hunter, Tarcísio L. de Oliveira # Copyright (C) 2008, 2015, William Hunter. # Copyright (C) 2...
false
true
7900b77822db44af6327d63ca1ffd3f9069f8a81
30,988
py
Python
tempest/api/compute/base.py
AurelienLourot/tempest
4d14a22a1a0eb7aaa4aafb917273baa0739f55c3
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/base.py
AurelienLourot/tempest
4d14a22a1a0eb7aaa4aafb917273baa0739f55c3
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/base.py
AurelienLourot/tempest
4d14a22a1a0eb7aaa4aafb917273baa0739f55c3
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
45.637703
79
0.639635
import time from oslo_log import log as logging from tempest.common import compute from tempest.common import waiters from tempest import config from tempest import exceptions from tempest.lib.common import api_microversion_fixture from tempest.lib.common import api_version_request from tempest.lib.com...
true
true
7900ba4754c926164dd2748f4d59fd2fbccbf00f
8,660
py
Python
resolwe_bio/processes/import_data/basespace.py
plojyon/resolwe-bio
45d001a78fcc387b5e3239a34c9da7f40d789022
[ "Apache-2.0" ]
null
null
null
resolwe_bio/processes/import_data/basespace.py
plojyon/resolwe-bio
45d001a78fcc387b5e3239a34c9da7f40d789022
[ "Apache-2.0" ]
null
null
null
resolwe_bio/processes/import_data/basespace.py
plojyon/resolwe-bio
45d001a78fcc387b5e3239a34c9da7f40d789022
[ "Apache-2.0" ]
null
null
null
"""Import a file from Illumina BaseSpace.""" import atexit import gzip import os import time import traceback from pathlib import Path from requests import RequestException, Session from resolwe.process import ( BooleanField, FileField, GroupField, IntegerField, Persistence, Process, Secr...
31.376812
95
0.588337
import atexit import gzip import os import time import traceback from pathlib import Path from requests import RequestException, Session from resolwe.process import ( BooleanField, FileField, GroupField, IntegerField, Persistence, Process, SecretField, StringField, ) class BaseSpace...
true
true
7900bab0a051ba38431bfff59c78d0990bb8525f
541
py
Python
registration/migrations/0014_eventresult_timestamp.py
arpanpathak/college-fest-management
186ffe78deed7ae4904e809412d84883e669b6bf
[ "MIT" ]
1
2022-01-02T05:40:59.000Z
2022-01-02T05:40:59.000Z
registration/migrations/0014_eventresult_timestamp.py
arpanpathak/college-fest-management
186ffe78deed7ae4904e809412d84883e669b6bf
[ "MIT" ]
null
null
null
registration/migrations/0014_eventresult_timestamp.py
arpanpathak/college-fest-management
186ffe78deed7ae4904e809412d84883e669b6bf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-04 21:24 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('registration', '0013_eventresult_scoresubmittedby'), ] ...
24.590909
90
0.661738
from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('registration', '0013_eventresult_scoresubmittedby'), ] operations = [ migrations.AddField( model_name='ev...
true
true
7900bb2b2ee9fba61fcbb0da0c5eec57fc3b5c33
24,465
py
Python
qa/rpc-tests/fundrawtransaction.py
alik918/esmacoin
9966b5a1b76a8fbeb98ca86e084fe3d9e00d88b1
[ "MIT" ]
null
null
null
qa/rpc-tests/fundrawtransaction.py
alik918/esmacoin
9966b5a1b76a8fbeb98ca86e084fe3d9e00d88b1
[ "MIT" ]
null
null
null
qa/rpc-tests/fundrawtransaction.py
alik918/esmacoin
9966b5a1b76a8fbeb98ca86e084fe3d9e00d88b1
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * # Creat...
40.438017
214
0.556019
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class RawTransactionsTest(BitcoinTestFramework): def setup_chain(self): print("Initializing test directory "+self.options.tmpdir) initialize_chain_clean(self.options.tmpdir, 4) def setup_net...
false
true
7900bb9023551be02622f799fbbf23980df6b488
3,956
py
Python
src/wad.blog/wad/blog/portlets/categories.py
potzenheimer/buildout.wad
0ebf9518b5707d65d93655e3ff38c54eb0d21335
[ "MIT" ]
null
null
null
src/wad.blog/wad/blog/portlets/categories.py
potzenheimer/buildout.wad
0ebf9518b5707d65d93655e3ff38c54eb0d21335
[ "MIT" ]
null
null
null
src/wad.blog/wad/blog/portlets/categories.py
potzenheimer/buildout.wad
0ebf9518b5707d65d93655e3ff38c54eb0d21335
[ "MIT" ]
null
null
null
import urllib2 from zope.interface import implements from plone.portlets.interfaces import IPortletDataProvider from plone.app.portlets.portlets import base from Products.CMFCore.utils import getToolByName from zope import schema from zope.formlib import form from Products.Five.browser.pagetemplatefile import ViewPa...
32.694215
77
0.671638
import urllib2 from zope.interface import implements from plone.portlets.interfaces import IPortletDataProvider from plone.app.portlets.portlets import base from Products.CMFCore.utils import getToolByName from zope import schema from zope.formlib import form from Products.Five.browser.pagetemplatefile import ViewPa...
true
true
7900bc108c778c3c4e52e8399f72b060d1309c3d
1,376
py
Python
pytorch/unet_3d/unet_model.py
mistermoutan/ModelsGenesis
98af7075b93311fe655e9692773eb1ce015b8bd0
[ "MIT" ]
null
null
null
pytorch/unet_3d/unet_model.py
mistermoutan/ModelsGenesis
98af7075b93311fe655e9692773eb1ce015b8bd0
[ "MIT" ]
null
null
null
pytorch/unet_3d/unet_model.py
mistermoutan/ModelsGenesis
98af7075b93311fe655e9692773eb1ce015b8bd0
[ "MIT" ]
null
null
null
""" Full assembly of the parts to form the complete network """ import torch.nn.functional as F from .unet_parts import * from .channels import C class UNet3D(nn.Module): def __init__(self, n_channels, n_classes, bilinear=True, apply_sigmoid_to_output=False): super(UNet3D, self).__init__() self....
34.4
124
0.582849
import torch.nn.functional as F from .unet_parts import * from .channels import C class UNet3D(nn.Module): def __init__(self, n_channels, n_classes, bilinear=True, apply_sigmoid_to_output=False): super(UNet3D, self).__init__() self.n_channels = n_channels self.n_classes = n_classes ...
true
true
7900bc42ab9f4255009df4547d5f39d3d7822f52
5,411
py
Python
sweetie_bot_flexbe_states/src/sweetie_bot_flexbe_states/internal/set_joint_state_base.py
sweetie-bot-project/sweetie_bot_flexbe_behaviors
d8511564bb9d6125838b4373263fb68a8b858d70
[ "BSD-3-Clause" ]
null
null
null
sweetie_bot_flexbe_states/src/sweetie_bot_flexbe_states/internal/set_joint_state_base.py
sweetie-bot-project/sweetie_bot_flexbe_behaviors
d8511564bb9d6125838b4373263fb68a8b858d70
[ "BSD-3-Clause" ]
null
null
null
sweetie_bot_flexbe_states/src/sweetie_bot_flexbe_states/internal/set_joint_state_base.py
sweetie-bot-project/sweetie_bot_flexbe_behaviors
d8511564bb9d6125838b4373263fb68a8b858d70
[ "BSD-3-Clause" ]
1
2019-12-23T05:06:26.000Z
2019-12-23T05:06:26.000Z
#!/usr/bin/env python from itertools import izip import xmlrpclib import rospy from rospy.rostime import Time, Duration from flexbe_core import EventState as Dummy from flexbe_core import Logger from flexbe_core.proxy import ProxyPublisher, ProxySubscriberCached, ProxyActionClient from sensor_msgs.msg import JointSt...
42.273438
145
0.656441
from itertools import izip import xmlrpclib import rospy from rospy.rostime import Time, Duration from flexbe_core import EventState as Dummy from flexbe_core import Logger from flexbe_core.proxy import ProxyPublisher, ProxySubscriberCached, ProxyActionClient from sensor_msgs.msg import JointState from sweetie_bot_...
false
true
7900bca39ae064b8c0d6d9f0022b2d8517f1fcf6
1,793
py
Python
crawling_scraping/bin/rst2odt_prepstyles.py
litteletips/crawling_scraping-scrapy_tool
6d70b4d2a91f2d2bebcc5266ed43ad9be4723bc0
[ "MIT" ]
null
null
null
crawling_scraping/bin/rst2odt_prepstyles.py
litteletips/crawling_scraping-scrapy_tool
6d70b4d2a91f2d2bebcc5266ed43ad9be4723bc0
[ "MIT" ]
16
2021-03-19T09:44:52.000Z
2022-03-12T00:22:14.000Z
crawling_scraping/bin/rst2odt_prepstyles.py
litteletips/crawling_scraping
6d70b4d2a91f2d2bebcc5266ed43ad9be4723bc0
[ "MIT" ]
null
null
null
#!/Users/yaroten/Library/Mobile Documents/com~apple~CloudDocs/git/crawling_scraping/crawling_scraping/bin/python3 # $Id: rst2odt_prepstyles.py 5839 2009-01-07 19:09:28Z dkuhlman $ # Author: Dave Kuhlman <dkuhlman@rexx.com> # Copyright: This module has been placed in the public domain. """ Fix a word-processor-generat...
26.367647
113
0.650307
from lxml import etree import sys import zipfile from tempfile import mkstemp import shutil import os NAMESPACES = { "style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0", "fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" } def prepstyle(filename): zin = zipfile.ZipFi...
true
true
7900bd9606d025b5b0dd85fe04ca40f0cfa02f0d
1,046
py
Python
cocasync/errors.py
cree-py/cocasync
4705009077e270b6dd45b7be67d15bfdf3387e5a
[ "MIT" ]
2
2018-02-01T03:15:07.000Z
2018-02-03T23:35:17.000Z
cocasync/errors.py
cree-py/cocasync
4705009077e270b6dd45b7be67d15bfdf3387e5a
[ "MIT" ]
null
null
null
cocasync/errors.py
cree-py/cocasync
4705009077e270b6dd45b7be67d15bfdf3387e5a
[ "MIT" ]
null
null
null
class Error(Exception): '''Base Error.''' def __init__(self): self.error = 'Fatal error occured.' super().__init__(self.error) class ArgError(Error): '''Argument Error.''' def __init__(self): self.error = 'Incorrect argument passed.' super().__init__(self.error) class MissingArg(ArgError): '''Argument ...
22.255319
63
0.685468
class Error(Exception): def __init__(self): self.error = 'Fatal error occured.' super().__init__(self.error) class ArgError(Error): def __init__(self): self.error = 'Incorrect argument passed.' super().__init__(self.error) class MissingArg(ArgError): def __init__(self, arg): self.error = f'{arg} is a ...
true
true
7900bdb85d1491014b72fb3cfe40f55a5812474a
1,283
py
Python
tests/test_remove_emphasises.py
PoWWoP/wiki-dump-reader
a7c195f132753a1f411ba2615410910fbf8c6888
[ "MIT" ]
18
2019-03-05T13:09:07.000Z
2022-01-27T20:45:11.000Z
tests/test_remove_emphasises.py
PoWWoP/wiki-dump-reader
a7c195f132753a1f411ba2615410910fbf8c6888
[ "MIT" ]
2
2019-03-21T17:59:38.000Z
2019-09-20T22:16:11.000Z
tests/test_remove_emphasises.py
PoWWoP/wiki-dump-reader
a7c195f132753a1f411ba2615410910fbf8c6888
[ "MIT" ]
5
2019-10-06T13:47:33.000Z
2022-02-25T15:11:04.000Z
import unittest from wiki_dump_reader import Cleaner class TestRemoveEmphasis(unittest.TestCase): def setUp(self): self.cleaner = Cleaner() def test_remove_emphasis_bold(self): text = "'''游戏工具编程'''是指采用各种开发工具进行开发修改[[电脑]]、[[电视]][[游戏]]的过程。主要的开发工具有以下几大类" expected = '游戏工具编程是指采用各种开发工具进行开发修...
47.518519
97
0.62198
import unittest from wiki_dump_reader import Cleaner class TestRemoveEmphasis(unittest.TestCase): def setUp(self): self.cleaner = Cleaner() def test_remove_emphasis_bold(self): text = "'''游戏工具编程'''是指采用各种开发工具进行开发修改[[电脑]]、[[电视]][[游戏]]的过程。主要的开发工具有以下几大类" expected = '游戏工具编程是指采用各种开发工具进行开发修...
true
true
7900bdd57c5f7c38660175436a08e2b93e5ced2e
137,949
py
Python
tools/python/dex.py
gdawg/redex
857c8dc08c93d2d768bff768dad3d1ff56750690
[ "MIT" ]
null
null
null
tools/python/dex.py
gdawg/redex
857c8dc08c93d2d768bff768dad3d1ff56750690
[ "MIT" ]
null
null
null
tools/python/dex.py
gdawg/redex
857c8dc08c93d2d768bff768dad3d1ff56750690
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division from __future__ import print_function import b...
33.531599
80
0.546804
from __future__ import absolute_import from __future__ import division from __future__ import print_function import bisect import copy import dict_utils import file_extract from file_extract import AutoParser import numbers import operator import optparse import os import re import six import string import sys...
true
true
7900be472ce54029e928c5b6b03f12aca07184c7
2,515
py
Python
nipype/interfaces/slicer/filtering/extractskeleton.py
oliver-contier/nipype
07af08f98a69d3d95b4384facb09f8b8cef5fda2
[ "Apache-2.0" ]
1
2019-03-25T14:11:18.000Z
2019-03-25T14:11:18.000Z
venv/Lib/site-packages/nipype/interfaces/slicer/filtering/extractskeleton.py
mysnyldz/Tez-Analizi
47e149bbd6a9e865e9242e50fb7ca1a18adfc640
[ "MIT" ]
1
2017-01-05T01:24:33.000Z
2017-01-05T01:24:33.000Z
venv/Lib/site-packages/nipype/interfaces/slicer/filtering/extractskeleton.py
mysnyldz/Tez-Analizi
47e149bbd6a9e865e9242e50fb7ca1a18adfc640
[ "MIT" ]
1
2020-01-17T17:30:26.000Z
2020-01-17T17:30:26.000Z
# -*- coding: utf-8 -*- # -*- coding: utf8 -*- """Autogenerated file - DO NOT EDIT If you spot a bug, please report it on the mailing list and/or change the generator.""" from nipype.interfaces.base import ( CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, ...
33.986486
310
0.702584
from nipype.interfaces.base import ( CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath, ) import os class ExtractSkeletonInputSpec(CommandLineInputSpec): InputImageFileName = File(posit...
true
true
7900bf81fcf2a7857264845fa2fc05dd3f8ad6d3
615
py
Python
tests/test_terms.py
SimonGreenhill/pycldf
3730a399828d4d985ce814da4b1e2008d4733889
[ "Apache-2.0" ]
null
null
null
tests/test_terms.py
SimonGreenhill/pycldf
3730a399828d4d985ce814da4b1e2008d4733889
[ "Apache-2.0" ]
null
null
null
tests/test_terms.py
SimonGreenhill/pycldf
3730a399828d4d985ce814da4b1e2008d4733889
[ "Apache-2.0" ]
null
null
null
import pytest def test_terms(): from pycldf.terms import TERMS assert 'alignment' in TERMS.properties with pytest.raises(ValueError): TERMS.is_cldf_uri('http://cldf.clld.org/404') assert not TERMS.is_cldf_uri('http://example.org') assert TERMS.is_cldf_uri('http://cldf.clld.org/v1.0/term...
29.285714
75
0.710569
import pytest def test_terms(): from pycldf.terms import TERMS assert 'alignment' in TERMS.properties with pytest.raises(ValueError): TERMS.is_cldf_uri('http://cldf.clld.org/404') assert not TERMS.is_cldf_uri('http://example.org') assert TERMS.is_cldf_uri('http://cldf.clld.org/v1.0/term...
true
true
7900c02aaef03de97f13c50a8da2a3a249b26c37
2,722
py
Python
Economic Growth & GDP per capita.py
ph7klw76/Data_science_project
5b99c49d44e6858269c4220135ea4c2e0f0bcdef
[ "MIT" ]
null
null
null
Economic Growth & GDP per capita.py
ph7klw76/Data_science_project
5b99c49d44e6858269c4220135ea4c2e0f0bcdef
[ "MIT" ]
null
null
null
Economic Growth & GDP per capita.py
ph7klw76/Data_science_project
5b99c49d44e6858269c4220135ea4c2e0f0bcdef
[ "MIT" ]
null
null
null
import pandas as pd data=pd.read_csv("C:/Users/user/Documents/API_NY.GDP.PCAP.CD_DS2_en_csv_v2_1068945.csv") #your raw data obtained from world bank import pandas as pd import matplotlib.pyplot as plt fulldataonly=data.dropna() listofcountry=fulldataonly['Country Name'] listofcountry=list(listofcountry) def findco...
29.268817
129
0.649522
import pandas as pd data=pd.read_csv("C:/Users/user/Documents/API_NY.GDP.PCAP.CD_DS2_en_csv_v2_1068945.csv") import pandas as pd import matplotlib.pyplot as plt fulldataonly=data.dropna() listofcountry=fulldataonly['Country Name'] listofcountry=list(listofcountry) def findcountryrow(country): for i in range(l...
true
true
7900c0445d4afec44b0d6b71c36456ee9de99eaf
7,440
py
Python
VIT/Train.py
HzcIrving/DLRL_PlayGround
0db9a4bdb87130d1d26aea1591ef74cbe6aaa43b
[ "MIT" ]
27
2022-01-27T09:22:59.000Z
2022-02-22T03:22:52.000Z
VIT/Train.py
HzcIrving/DLRL-PlayGround
0db9a4bdb87130d1d26aea1591ef74cbe6aaa43b
[ "MIT" ]
null
null
null
VIT/Train.py
HzcIrving/DLRL-PlayGround
0db9a4bdb87130d1d26aea1591ef74cbe6aaa43b
[ "MIT" ]
null
null
null
#! /usr/bin/enc python # -*- coding: utf-8 -*- # author: Irving He # email: 1910646@tongji.edu.cn import logging import argparse import os import random import numpy as np from tqdm import tqdm import datetime from datetime import timedelta import torch import torch.distributed as dist from Data_utils import get_l...
33.665158
117
0.620699
import logging import argparse import os import random import numpy as np from tqdm import tqdm import datetime from datetime import timedelta import torch import torch.distributed as dist from Data_utils import get_loader from Data_utils import CONFIGS from Model import VITransModel from Utils import WarmupCos...
true
true
7900c0c46baf4b0bbaeaee4eba13785e8a541fb5
1,872
py
Python
tool/conanfile.py
Bjoe/tinyrefl
b7296be55e75024289fe11e2d696d4227fc09f0b
[ "MIT" ]
241
2018-05-10T14:27:04.000Z
2022-03-26T10:38:04.000Z
tool/conanfile.py
Bjoe/tinyrefl
b7296be55e75024289fe11e2d696d4227fc09f0b
[ "MIT" ]
1
2019-08-03T17:40:28.000Z
2019-08-20T13:08:54.000Z
tool/conanfile.py
Bjoe/tinyrefl
b7296be55e75024289fe11e2d696d4227fc09f0b
[ "MIT" ]
15
2018-05-10T17:34:24.000Z
2022-01-20T23:02:44.000Z
from conans import ConanFile, CMake import os class TinyreflTool(ConanFile): name = 'tinyrefl-tool' version = '0.4.1' url = 'https://github.com/Manu343726/tinyrefl' description = ' A work in progress minimal C++ static reflection API and codegen tool' scm = { 'type': 'git', 'url': 'http...
31.728814
90
0.563568
from conans import ConanFile, CMake import os class TinyreflTool(ConanFile): name = 'tinyrefl-tool' version = '0.4.1' url = 'https://github.com/Manu343726/tinyrefl' description = ' A work in progress minimal C++ static reflection API and codegen tool' scm = { 'type': 'git', 'url': 'http...
true
true
7900c1de0146d8e223f0e1fbdb220f0b4221f81f
669
py
Python
use.py
esoterik0/scrabble-comp
3ec06e0c5135f0f1abff58d0a1e7997b5e6f41bd
[ "MIT" ]
null
null
null
use.py
esoterik0/scrabble-comp
3ec06e0c5135f0f1abff58d0a1e7997b5e6f41bd
[ "MIT" ]
null
null
null
use.py
esoterik0/scrabble-comp
3ec06e0c5135f0f1abff58d0a1e7997b5e6f41bd
[ "MIT" ]
null
null
null
import twl wolf = twl.Wolf() def split(wolf, end=7): return [wolf.len(n)() for n in range(2, end+1)] def spell(ltrs, wild=0): return split(wolf.wild(ltrs, wild), len(ltrs)+wild) def _munge(func, fix, ltrs, wild=0): return split(func(fix).wild(fix+ltrs, wild), len(fix+ltrs)+wild) def starts(fix, ltr...
19.676471
68
0.638266
import twl wolf = twl.Wolf() def split(wolf, end=7): return [wolf.len(n)() for n in range(2, end+1)] def spell(ltrs, wild=0): return split(wolf.wild(ltrs, wild), len(ltrs)+wild) def _munge(func, fix, ltrs, wild=0): return split(func(fix).wild(fix+ltrs, wild), len(fix+ltrs)+wild) def starts(fix, ltr...
true
true
7900c23e71e10e049df576a8faa1b1a99c90b927
854
py
Python
api/app.py
ThorntonMatthewD/Bot-Detector-Core-Files
cf74e90010701b5ddbc5cd12b04ba27eeac21491
[ "BSD-2-Clause" ]
null
null
null
api/app.py
ThorntonMatthewD/Bot-Detector-Core-Files
cf74e90010701b5ddbc5cd12b04ba27eeac21491
[ "BSD-2-Clause" ]
null
null
null
api/app.py
ThorntonMatthewD/Bot-Detector-Core-Files
cf74e90010701b5ddbc5cd12b04ba27eeac21491
[ "BSD-2-Clause" ]
null
null
null
from concurrent.futures.process import ProcessPoolExecutor import api.Config import api.middleware from api.Config import app from api.routers import (feedback, hiscore, label, legacy, legacy_debug, player, prediction, report, scraper) app.include_router(hiscore.router) app.include_router(pl...
25.878788
72
0.757611
from concurrent.futures.process import ProcessPoolExecutor import api.Config import api.middleware from api.Config import app from api.routers import (feedback, hiscore, label, legacy, legacy_debug, player, prediction, report, scraper) app.include_router(hiscore.router) app.include_router(pl...
true
true
7900c24f12f07c54fb8d03bc0a4d4d5182d2fcce
609
py
Python
hog_cpp/fhog/get_hog.py
ElnuraMusaoglu/KernelizedCorrelationFilter
78eab4297218b107cf7688e7e7c76d79b5609893
[ "MIT" ]
1
2021-07-21T08:40:48.000Z
2021-07-21T08:40:48.000Z
hog_cpp/fhog/get_hog.py
ElnuraMusaoglu/SingleObjectTracking
282a6312be23f6c4bce3b38c19045a1d1a3bce3b
[ "MIT" ]
null
null
null
hog_cpp/fhog/get_hog.py
ElnuraMusaoglu/SingleObjectTracking
282a6312be23f6c4bce3b38c19045a1d1a3bce3b
[ "MIT" ]
null
null
null
from hog_cpp.fhog import fhog import numpy as np ''' https://github.com/lawpdas/fhog-python ''' def get_hog(img): M = np.zeros(img.shape[:2], dtype='float32') O = np.zeros(img.shape[:2], dtype='float32') H = np.zeros([img.shape[0] // 4, img.shape[1] // 4, 32], dtype='float32') # python3 fhog.gradient...
21
88
0.599343
from hog_cpp.fhog import fhog import numpy as np def get_hog(img): M = np.zeros(img.shape[:2], dtype='float32') O = np.zeros(img.shape[:2], dtype='float32') H = np.zeros([img.shape[0] // 4, img.shape[1] // 4, 32], dtype='float32') fhog.gradientMag(img.astype(np.float32), M, O) fhog.gradientHist(...
true
true
7900c2d0466c33908fcedf4c30abaf275484dfac
1,240
py
Python
test/test_dashboard.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
11
2016-05-30T17:16:45.000Z
2021-06-11T19:32:59.000Z
test/test_dashboard.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
25
2016-05-02T23:05:19.000Z
2020-11-18T22:43:20.000Z
test/test_dashboard.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
30
2016-04-29T17:17:11.000Z
2022-02-11T04:58:37.000Z
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
30.243902
409
0.726613
from __future__ import absolute_import import unittest import wavefront_api_client from wavefront_api_client.models.dashboard import Dashboard from wavefront_api_client.rest import ApiException class TestDashboard(unittest.TestCase): def setUp(self): pass def tearDown(self): pass ...
true
true
7900c31976870a6b511804ec56f46af19c8af321
5,343
py
Python
configs/ddod/swin.py
VietDunghacker/VarifocalNet
f57917afb3c29ceba1d3c4f824d10b9cc53aaa40
[ "Apache-2.0" ]
null
null
null
configs/ddod/swin.py
VietDunghacker/VarifocalNet
f57917afb3c29ceba1d3c4f824d10b9cc53aaa40
[ "Apache-2.0" ]
null
null
null
configs/ddod/swin.py
VietDunghacker/VarifocalNet
f57917afb3c29ceba1d3c4f824d10b9cc53aaa40
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py', '../_base_/swa.py' ] # model settings model = dict( type='ATSS', pretrained = 'https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_base_patch4_window7_224_22k.pth', backbo...
26.984848
121
0.685944
_base_ = [ '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py', '../_base_/swa.py' ] model = dict( type='ATSS', pretrained = 'https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_base_patch4_window7_224_22k.pth', backbone=dict( type=...
true
true
7900c3c0e778bfd876a804489fa7878ff9fbd507
219
py
Python
13)Abstract classes.py
SriCharan220800/RomanReigns
0ec11c65fa0cfa6264f162c5e3f2ba5e45986fbb
[ "MIT" ]
null
null
null
13)Abstract classes.py
SriCharan220800/RomanReigns
0ec11c65fa0cfa6264f162c5e3f2ba5e45986fbb
[ "MIT" ]
null
null
null
13)Abstract classes.py
SriCharan220800/RomanReigns
0ec11c65fa0cfa6264f162c5e3f2ba5e45986fbb
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod class Book(object, metaclass=ABCMeta): def __init__(self,title,author): self.title=title self.author=author @abstractmethod def display(): pass
27.375
40
0.680365
from abc import ABCMeta, abstractmethod class Book(object, metaclass=ABCMeta): def __init__(self,title,author): self.title=title self.author=author @abstractmethod def display(): pass
true
true
7900c408cec8c2c2c9cb20810011990a9d0f2f78
2,854
py
Python
bitshares/account.py
silverchen0402/python-bitshares
aafbcf5cd09e7bca99dd156fd60b9df8ba508630
[ "MIT" ]
102
2018-04-08T23:05:00.000Z
2022-03-31T10:10:03.000Z
bitshares/account.py
silverchen0402/python-bitshares
aafbcf5cd09e7bca99dd156fd60b9df8ba508630
[ "MIT" ]
246
2018-04-03T12:35:49.000Z
2022-02-28T10:44:28.000Z
bitshares/account.py
silverchen0402/python-bitshares
aafbcf5cd09e7bca99dd156fd60b9df8ba508630
[ "MIT" ]
128
2018-04-14T01:39:12.000Z
2022-03-25T08:56:51.000Z
# -*- coding: utf-8 -*- from .amount import Amount from .instance import BlockchainInstance from graphenecommon.account import ( Account as GrapheneAccount, AccountUpdate as GrapheneAccountUpdate, ) from bitsharesbase import operations @BlockchainInstance.inject class Account(GrapheneAccount): """ Thi...
29.729167
87
0.662929
from .amount import Amount from .instance import BlockchainInstance from graphenecommon.account import ( Account as GrapheneAccount, AccountUpdate as GrapheneAccountUpdate, ) from bitsharesbase import operations @BlockchainInstance.inject class Account(GrapheneAccount): def define_classes(self): ...
true
true
7900c487556224959505e315e98519b2ba0eb018
22,124
py
Python
ludwig/models/modules/recurrent_modules.py
rajputakhil/ludwig
dd1a37ea1018db6624f05d72c34ae8b0f7068e6c
[ "Apache-2.0" ]
null
null
null
ludwig/models/modules/recurrent_modules.py
rajputakhil/ludwig
dd1a37ea1018db6624f05d72c34ae8b0f7068e6c
[ "Apache-2.0" ]
null
null
null
ludwig/models/modules/recurrent_modules.py
rajputakhil/ludwig
dd1a37ea1018db6624f05d72c34ae8b0f7068e6c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
45.805383
153
0.557991
import collections import logging import tensorflow as tf from tensorflow.contrib.rnn import MultiRNNCell, LSTMStateTuple from tensorflow.python.framework import dtypes, tensor_shape from tensorflow.python.framework import ops from tensorflow.python.util import nest from ludwig.models.modules....
true
true
7900c550ff1e1959f9941584bd74e59841f443d9
8,106
py
Python
layers.py
wangxiaoyunanne/TAGCN
9f2df35e1586f49efcd6d4706e3edd2499c1c6f1
[ "MIT" ]
19
2018-02-17T23:21:33.000Z
2021-03-06T00:41:52.000Z
layers.py
wangxiaoyunanne/TAGCN
9f2df35e1586f49efcd6d4706e3edd2499c1c6f1
[ "MIT" ]
1
2020-10-24T12:15:34.000Z
2021-04-21T08:55:43.000Z
layers.py
wangxiaoyunanne/TAGCN
9f2df35e1586f49efcd6d4706e3edd2499c1c6f1
[ "MIT" ]
9
2018-04-02T08:04:15.000Z
2019-12-10T09:29:06.000Z
from inits import * import tensorflow as tf flags = tf.app.flags FLAGS = flags.FLAGS # global unique layer ID dictionary for layer name assignment _LAYER_UIDS = {} def get_layer_uid(layer_name=''): """Helper function, assigns unique layer IDs.""" if layer_name not in _LAYER_UIDS: _LAYER_UIDS[layer_n...
31.297297
175
0.576733
from inits import * import tensorflow as tf flags = tf.app.flags FLAGS = flags.FLAGS _LAYER_UIDS = {} def get_layer_uid(layer_name=''): if layer_name not in _LAYER_UIDS: _LAYER_UIDS[layer_name] = 1 return 1 else: _LAYER_UIDS[layer_name] += 1 return _LAYER_UIDS[layer_name] ...
true
true
7900c7bac81dcda626efb8e505fa4df9aa38aeb8
2,940
py
Python
low_level_simulation/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/rosbridge_protocol.py
abiantorres/autonomous-vehicles-system-simulation
3f0112036b2b270f5055729c648a1310976df933
[ "Apache-2.0" ]
60
2021-09-07T12:42:48.000Z
2022-03-12T09:30:36.000Z
low_level_simulation/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/rosbridge_protocol.py
abiantorres/autonomous-vehicles-system-simulation
3f0112036b2b270f5055729c648a1310976df933
[ "Apache-2.0" ]
1
2021-04-30T21:19:51.000Z
2021-04-30T21:19:51.000Z
low_level_simulation/src/rosbridge_suite/rosbridge_library/src/rosbridge_library/rosbridge_protocol.py
abiantorres/autonomous-vehicles-system-simulation
3f0112036b2b270f5055729c648a1310976df933
[ "Apache-2.0" ]
1
2021-09-14T07:39:48.000Z
2021-09-14T07:39:48.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
46.666667
140
0.793537
from __future__ import print_function from rosbridge_library.protocol import Protocol from rosbridge_library.capabilities.call_service import CallService from rosbridge_library.capabilities.advertise import Advertise from rosbridge_library.capabilities.publish import Publish from rosbrid...
true
true
7900c81da9f5cd9a737c8d27983858f055be3fde
30,656
py
Python
stacks/XIAOMATECH/1.0/services/BEACON/package/scripts/beacon.py
tvorogme/dataops
acfa21df42a20768c004c6630a064f4e38e280b2
[ "Apache-2.0" ]
3
2019-08-13T01:44:16.000Z
2019-12-10T04:05:56.000Z
stacks/XIAOMATECH/1.0/services/BEACON/package/scripts/beacon.py
tvorogme/dataops
acfa21df42a20768c004c6630a064f4e38e280b2
[ "Apache-2.0" ]
null
null
null
stacks/XIAOMATECH/1.0/services/BEACON/package/scripts/beacon.py
tvorogme/dataops
acfa21df42a20768c004c6630a064f4e38e280b2
[ "Apache-2.0" ]
7
2019-05-29T17:35:25.000Z
2021-12-04T07:55:10.000Z
import os.path import time from resource_management.core.exceptions import Fail from resource_management.core.source import Template from resource_management.core.source import StaticFile from resource_management.core.source import DownloadSource from resource_management.core.resources import Execute from resource_man...
65.926882
151
0.479123
import os.path import time from resource_management.core.exceptions import Fail from resource_management.core.source import Template from resource_management.core.source import StaticFile from resource_management.core.source import DownloadSource from resource_management.core.resources import Execute from resource_man...
false
true
7900c983b6c77702216c835dde7ae52ea81aa9b8
39,525
py
Python
pandas/tests/indexes/datetimes/test_arithmetic.py
wla80/pandas
dccfee53ff68dfa2c42a7571f26ba640694aa547
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/indexes/datetimes/test_arithmetic.py
wla80/pandas
dccfee53ff68dfa2c42a7571f26ba640694aa547
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/indexes/datetimes/test_arithmetic.py
wla80/pandas
dccfee53ff68dfa2c42a7571f26ba640694aa547
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import warnings from datetime import datetime, timedelta import operator import pytest import numpy as np import pandas as pd from pandas.compat.numpy import np_datetime64_compat import pandas.util.testing as tm from pandas.errors import PerformanceWarning, NullFrequencyError from pandas impo...
40.126904
79
0.559089
import warnings from datetime import datetime, timedelta import operator import pytest import numpy as np import pandas as pd from pandas.compat.numpy import np_datetime64_compat import pandas.util.testing as tm from pandas.errors import PerformanceWarning, NullFrequencyError from pandas import (Timestamp, Timedelt...
true
true
7900c9cc64f98dcf97c1b398ea6136afc3e8ab40
67
py
Python
params.py
iskrich/simplechat
9692334dbc6db0491541947fd8495d2ac0c7205c
[ "MIT" ]
1
2017-10-18T09:53:14.000Z
2017-10-18T09:53:14.000Z
params.py
iskrich/simplechat
9692334dbc6db0491541947fd8495d2ac0c7205c
[ "MIT" ]
null
null
null
params.py
iskrich/simplechat
9692334dbc6db0491541947fd8495d2ac0c7205c
[ "MIT" ]
null
null
null
host = "localhost" port = 1111 max_users = 100 buffer_size = 1024
11.166667
18
0.716418
host = "localhost" port = 1111 max_users = 100 buffer_size = 1024
true
true
7900cac2ad9844d2b8c439dd2e7e2b2e8737dd78
6,082
py
Python
tests/test_codetesting.py
paullinnerud/fontbakery
666b3425b14f6c59a43cddf30279ca2fdc6e714e
[ "Apache-2.0" ]
null
null
null
tests/test_codetesting.py
paullinnerud/fontbakery
666b3425b14f6c59a43cddf30279ca2fdc6e714e
[ "Apache-2.0" ]
null
null
null
tests/test_codetesting.py
paullinnerud/fontbakery
666b3425b14f6c59a43cddf30279ca2fdc6e714e
[ "Apache-2.0" ]
null
null
null
import os from glyphsLib import GSFont import pytest from fontbakery.codetesting import ( assert_PASS, assert_results_contain, assert_SKIP, GLYPHSAPP_TEST_FILE, PATH_TEST_DATA, portable_path, TEST_FILE, ) from fontbakery.message import Message from fontbakery.status import PASS, FAIL, WARN...
27.151786
87
0.66853
import os from glyphsLib import GSFont import pytest from fontbakery.codetesting import ( assert_PASS, assert_results_contain, assert_SKIP, GLYPHSAPP_TEST_FILE, PATH_TEST_DATA, portable_path, TEST_FILE, ) from fontbakery.message import Message from fontbakery.status import PASS, FAIL, WARN...
true
true
7900cb853894cab710d9bb81e68dd9a97f3bd9b0
18,534
py
Python
caper/cromwell_rest_api.py
procha2/caper
e9ea0baa3517178ce7b850df8a59eba6479fbcb6
[ "MIT" ]
31
2019-06-20T15:34:23.000Z
2022-03-19T13:58:42.000Z
caper/cromwell_rest_api.py
procha2/caper
e9ea0baa3517178ce7b850df8a59eba6479fbcb6
[ "MIT" ]
66
2019-06-25T20:12:16.000Z
2022-03-29T17:07:50.000Z
caper/cromwell_rest_api.py
procha2/caper
e9ea0baa3517178ce7b850df8a59eba6479fbcb6
[ "MIT" ]
11
2019-10-21T20:35:10.000Z
2021-09-08T22:15:38.000Z
import fnmatch import io import logging from uuid import UUID import requests from requests.exceptions import ConnectionError, HTTPError from .cromwell_metadata import CromwellMetadata logger = logging.getLogger(__name__) def requests_error_handler(func): """Re-raise ConnectionError with help message. Cont...
33.334532
95
0.563721
import fnmatch import io import logging from uuid import UUID import requests from requests.exceptions import ConnectionError, HTTPError from .cromwell_metadata import CromwellMetadata logger = logging.getLogger(__name__) def requests_error_handler(func): def wrapper(*args, **kwargs): try: ...
true
true
7900cb93d03fe060411436ade4a2d3ad8af0f33a
578
py
Python
dataent/patches/v11_0/rename_email_alert_to_notification.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
dataent/patches/v11_0/rename_email_alert_to_notification.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
6
2020-03-24T17:15:56.000Z
2022-02-10T18:41:31.000Z
dataent/patches/v11_0/rename_email_alert_to_notification.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import dataent from dataent.model.rename_doc import rename_doc def execute(): if dataent.db.table_exists("Email Alert Recipient") and not dataent.db.table_exists("Notification Recipient"): rename_doc('DocType', 'Email Alert Recipient', 'Notification Recipient') dataent.relo...
44.461538
111
0.780277
from __future__ import unicode_literals import dataent from dataent.model.rename_doc import rename_doc def execute(): if dataent.db.table_exists("Email Alert Recipient") and not dataent.db.table_exists("Notification Recipient"): rename_doc('DocType', 'Email Alert Recipient', 'Notification Recipient') dataent.relo...
true
true
7900cc319516ba4743eb1499d221e0b3583ac6c5
27,165
py
Python
zzh/mllib/model/_deep_fm.py
zhangzhenhu/zzh
ebacd9c0c46a0a537d014550bd2bff0a85452a6e
[ "MIT" ]
null
null
null
zzh/mllib/model/_deep_fm.py
zhangzhenhu/zzh
ebacd9c0c46a0a537d014550bd2bff0a85452a6e
[ "MIT" ]
null
null
null
zzh/mllib/model/_deep_fm.py
zhangzhenhu/zzh
ebacd9c0c46a0a537d014550bd2bff0a85452a6e
[ "MIT" ]
null
null
null
""" Tensorflow implementation of DeepFM """ import numpy as np import tensorflow as tf import tensorflow.compat.v1 as tf1 from sklearn.base import BaseEstimator, TransformerMixin from sklearn.metrics import roc_auc_score from time import time from tensorflow.contrib.layers.python.layers import batch_norm as batch_norm...
45.732323
146
0.57817
import numpy as np import tensorflow as tf import tensorflow.compat.v1 as tf1 from sklearn.base import BaseEstimator, TransformerMixin from sklearn.metrics import roc_auc_score from time import time from tensorflow.contrib.layers.python.layers import batch_norm as batch_norm from sklearn import metrics import os impo...
true
true
7900cceb71bac89841602d5cf4d5c758a3009a4d
2,092
py
Python
python/hsfs/constructor/join.py
DhananjayMukhedkar/feature-store-api
8d3726911d56876a3ad5e2e55b0ac5e1b610d4dd
[ "Apache-2.0" ]
null
null
null
python/hsfs/constructor/join.py
DhananjayMukhedkar/feature-store-api
8d3726911d56876a3ad5e2e55b0ac5e1b610d4dd
[ "Apache-2.0" ]
null
null
null
python/hsfs/constructor/join.py
DhananjayMukhedkar/feature-store-api
8d3726911d56876a3ad5e2e55b0ac5e1b610d4dd
[ "Apache-2.0" ]
null
null
null
# # Copyright 2020 Logical Clocks AB # # 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 ag...
29.885714
76
0.640057
from hsfs import util from hsfs.constructor import query import humps class Join: INNER = "INNER" LEFT = "LEFT" RIGHT = "RIGHT" FULL = "FULL" CROSS = "CROSS" LEFT_SEMI_JOIN = "LEFT_SEMI_JOIN" COMMA = "COMMA" def __init__(self, query, on, left_on, right_on, join_type, p...
true
true
7900cf807768f81af7a8afeee1f467074b04189f
16,579
py
Python
official/nlp/transformer/utils/metrics.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
153
2020-10-25T13:58:04.000Z
2022-03-07T06:01:54.000Z
official/nlp/transformer/utils/metrics.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
11
2020-07-13T08:29:00.000Z
2022-03-24T07:21:09.000Z
official/nlp/transformer/utils/metrics.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
23
2020-10-25T14:44:47.000Z
2021-03-31T02:12:13.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.765784
93
0.701671
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import math import numpy as np import six from six.moves import xrange import tensorflow.compat.v1 as tf def _pad_tensors_to_same_length(x, y): with tf.name_scope("pad_t...
true
true
7900d070d6a3db889d18a3209b1393fcb34e551c
3,446
py
Python
kubernetes_py/utils/HttpRequest.py
Unacademy/kubernetes-py
ad6150c2e27369590dc7a7330fe296bc45755cff
[ "Apache-2.0" ]
null
null
null
kubernetes_py/utils/HttpRequest.py
Unacademy/kubernetes-py
ad6150c2e27369590dc7a7330fe296bc45755cff
[ "Apache-2.0" ]
null
null
null
kubernetes_py/utils/HttpRequest.py
Unacademy/kubernetes-py
ad6150c2e27369590dc7a7330fe296bc45755cff
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # import re import base64 import json import os import tempfile import requests import urllib3 from kubernetes_py.utils.ConvertData import conver...
31.327273
120
0.578642
import re import base64 import json import os import tempfile import requests import urllib3 from kubernetes_py.utils.ConvertData import convert from six.moves.urllib.parse import urlencode RE_VALID_SSL_IP = re.compile( r'^https://(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-...
true
true
7900d0da85aba71c44cb6fb642ef10d47ab012c5
4,420
py
Python
core/dbt/parser/read_files.py
tconbeer/dbt
bf867f6aff79fd9dad98ed36ceecd4aa181fe106
[ "Apache-2.0" ]
null
null
null
core/dbt/parser/read_files.py
tconbeer/dbt
bf867f6aff79fd9dad98ed36ceecd4aa181fe106
[ "Apache-2.0" ]
null
null
null
core/dbt/parser/read_files.py
tconbeer/dbt
bf867f6aff79fd9dad98ed36ceecd4aa181fe106
[ "Apache-2.0" ]
null
null
null
from dbt.clients.system import load_file_contents from dbt.contracts.files import ( FilePath, ParseFileType, SourceFile, FileHash, AnySourceFile, SchemaSourceFile ) from dbt.parser.schemas import yaml_from_file from dbt.parser.search import FilesystemSearcher # This loads the files contents and creates the Sourc...
37.457627
88
0.722398
from dbt.clients.system import load_file_contents from dbt.contracts.files import ( FilePath, ParseFileType, SourceFile, FileHash, AnySourceFile, SchemaSourceFile ) from dbt.parser.schemas import yaml_from_file from dbt.parser.search import FilesystemSearcher def load_source_file( path: FilePath, parse_...
true
true
7900d11a0ef28b695663f599916955db69023cfb
5,046
py
Python
docs/source/conf.py
fccg/DeepCTR
ed5cd0dbef7c249087734b3aba0c8326988f367f
[ "Apache-2.0" ]
1
2020-05-16T07:49:03.000Z
2020-05-16T07:49:03.000Z
docs/source/conf.py
fccg/DeepCTR
ed5cd0dbef7c249087734b3aba0c8326988f367f
[ "Apache-2.0" ]
null
null
null
docs/source/conf.py
fccg/DeepCTR
ed5cd0dbef7c249087734b3aba0c8326988f367f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
29.682353
79
0.649822
import os import sys sys.path.insert(0, os.path.abspath('../../')) project = 'DeepCTR' copyright = '2017-present, Weichen Shen' author = 'Weichen Shen' version = '' release = '0.7.4' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig', 'sphinx...
true
true
7900d1b99e0b3aa1837b18a6a088ca63cc1001b1
8,697
py
Python
trains/utilities/args.py
noklam/trains
70536544ed5e2b9aac8576ef2eaaef31c99ca670
[ "Apache-2.0" ]
1
2020-11-19T14:00:40.000Z
2020-11-19T14:00:40.000Z
trains/utilities/args.py
noklam/trains
70536544ed5e2b9aac8576ef2eaaef31c99ca670
[ "Apache-2.0" ]
null
null
null
trains/utilities/args.py
noklam/trains
70536544ed5e2b9aac8576ef2eaaef31c99ca670
[ "Apache-2.0" ]
null
null
null
""" Argparse utilities""" import sys from six import PY2 from argparse import ArgumentParser try: from argparse import _SubParsersAction except ImportError: _SubParsersAction = type(None) class PatchArgumentParser: _original_parse_args = None _original_parse_known_args = None _original_add_subpars...
44.147208
118
0.64505
import sys from six import PY2 from argparse import ArgumentParser try: from argparse import _SubParsersAction except ImportError: _SubParsersAction = type(None) class PatchArgumentParser: _original_parse_args = None _original_parse_known_args = None _original_add_subparsers = None _add_subpar...
true
true
7900d2473c3fa2ce82d560135117afc6aa006234
7,330
py
Python
lib/loss/loss_contrast.py
wenguanwang/ContrastiveSeg
9a381b9799c16d81e18d8f9f25ab509b93fb56de
[ "MIT" ]
2
2021-02-08T12:19:29.000Z
2021-02-08T12:44:39.000Z
lib/loss/loss_contrast.py
wenguanwang/ContrastiveSeg
9a381b9799c16d81e18d8f9f25ab509b93fb56de
[ "MIT" ]
null
null
null
lib/loss/loss_contrast.py
wenguanwang/ContrastiveSeg
9a381b9799c16d81e18d8f9f25ab509b93fb56de
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from abc import ABC import torch import torch.nn as nn import torch.nn.functional as F from lib.loss.loss_helper import FSAuxCELoss, FSAuxRMILoss from lib.utils.tools.logger import Logger as Log class Pixel...
37.783505
112
0.600136
from __future__ import absolute_import from __future__ import division from __future__ import print_function from abc import ABC import torch import torch.nn as nn import torch.nn.functional as F from lib.loss.loss_helper import FSAuxCELoss, FSAuxRMILoss from lib.utils.tools.logger import Logger as Log class Pixel...
true
true
7900d46a2baa198770770d7af12bb901c90491f1
10,096
py
Python
arvet/batch_analysis/tests/test_task.py
jskinn/arvet
742cf3e7ee8848c4efebfaa887fc9c0fd90a06e9
[ "BSD-2-Clause" ]
2
2021-05-27T21:48:34.000Z
2021-06-12T02:58:44.000Z
arvet/batch_analysis/tests/test_task.py
jskinn/arvet
742cf3e7ee8848c4efebfaa887fc9c0fd90a06e9
[ "BSD-2-Clause" ]
null
null
null
arvet/batch_analysis/tests/test_task.py
jskinn/arvet
742cf3e7ee8848c4efebfaa887fc9c0fd90a06e9
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2017, John Skinner import unittest import numpy as np import arvet.database.tests.database_connection as dbconn from arvet.config.path_manager import PathManager import arvet.batch_analysis.task as task class MockTask(task.Task): def run_task(self, path_manager: PathManager): pass def...
38.830769
98
0.682448
import unittest import numpy as np import arvet.database.tests.database_connection as dbconn from arvet.config.path_manager import PathManager import arvet.batch_analysis.task as task class MockTask(task.Task): def run_task(self, path_manager: PathManager): pass def get_unique_name(self) -> str: ...
true
true
7900d49d1d2eaf87ea485b7e74eda877b00c7350
221
py
Python
mocks/colorlamp/driver/handler.py
NetSys/dspace
c3e2942501288ae06b41d2daf1b81424c812b34d
[ "Apache-2.0" ]
8
2021-05-28T13:17:34.000Z
2021-11-16T07:55:52.000Z
mocks/colorlamp/driver/handler.py
digi-project/sosp21-artifact
1b4a11c648e456c9ff9d74f16b09f4238d6694a0
[ "BSD-3-Clause" ]
15
2021-05-25T18:07:13.000Z
2022-01-03T20:00:59.000Z
mocks/colorlamp/driver/handler.py
isabella232/dspace
c3e2942501288ae06b41d2daf1b81424c812b34d
[ "Apache-2.0" ]
4
2021-05-23T21:40:45.000Z
2021-05-31T12:27:44.000Z
import digi import digi.on as on @on.control def h0(c): for k, v in c.items(): v["status"] = v.get("intent", v.get("status", "undef")) if __name__ == '__main__': digi.run()
15.785714
53
0.502262
import digi import digi.on as on @on.control def h0(c): for k, v in c.items(): v["status"] = v.get("intent", v.get("status", "undef")) if __name__ == '__main__': digi.run()
true
true
7900d5ab0506baaaa16a58f67a048474145f0bb8
1,115
py
Python
plugins/speaker_sonos.py
mrusme/melon
c84fcf7762e1f2a3bd6ac904889107fa6d0240e6
[ "MIT" ]
4
2019-04-15T22:36:26.000Z
2022-03-19T05:18:27.000Z
plugins/speaker_sonos.py
mrusme/melon
c84fcf7762e1f2a3bd6ac904889107fa6d0240e6
[ "MIT" ]
null
null
null
plugins/speaker_sonos.py
mrusme/melon
c84fcf7762e1f2a3bd6ac904889107fa6d0240e6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding=utf8 from soco import SoCo import socket # http://docs.python-soco.com/en/latest/getting_started.html class SpeakerSonos: def __init__(self): print("SpeakerSonos initialized!") def do(self, params): speaker = SoCo(socket.gethostbyname(params['host'])) p...
27.195122
88
0.613453
from soco import SoCo import socket class SpeakerSonos: def __init__(self): print("SpeakerSonos initialized!") def do(self, params): speaker = SoCo(socket.gethostbyname(params['host'])) print(speaker.groups) if 'volume' in params: speaker.volume = params['volum...
true
true
7900d64adfee9736390458fffaa5666126ab6721
673
py
Python
app_common/maps/type_bank.py
zhanghe06/bearing_project
78a20fc321f72d3ae05c7ab7e52e01d02904e3fc
[ "MIT" ]
1
2020-06-21T04:08:26.000Z
2020-06-21T04:08:26.000Z
app_common/maps/type_bank.py
zhanghe06/bearing_project
78a20fc321f72d3ae05c7ab7e52e01d02904e3fc
[ "MIT" ]
13
2019-10-18T17:19:32.000Z
2022-01-13T00:44:43.000Z
app_common/maps/type_bank.py
zhanghe06/bearing_project
78a20fc321f72d3ae05c7ab7e52e01d02904e3fc
[ "MIT" ]
5
2019-02-07T03:15:16.000Z
2021-09-04T14:06:28.000Z
#!/usr/bin/env python # encoding: utf-8 """ @author: zhanghe @software: PyCharm @file: type_bank.py @time: 2019-08-17 18:23 """ from __future__ import unicode_literals from flask_babel import lazy_gettext as _ from app_common.maps.default import DEFAULT_SEARCH_CHOICES_INT, DEFAULT_SELECT_CHOICES_INT # 银行类型(1:基本账户,...
24.035714
90
0.768202
from __future__ import unicode_literals from flask_babel import lazy_gettext as _ from app_common.maps.default import DEFAULT_SEARCH_CHOICES_INT, DEFAULT_SELECT_CHOICES_INT TYPE_BANK_BASIC = 1 TYPE_BANK_GENERAL = 2 TYPE_BANK_DICT = { TYPE_BANK_BASIC: _('Basic Account'), TYPE_BANK_GENERAL: _('General ...
true
true
7900d6acf9be3cb2028ad605adb2bd8c32e6bb7f
784
py
Python
ws2122-lspm/Lib/site-packages/pm4py/visualization/decisiontree/__init__.py
Malekhy/ws2122-lspm
e4dc8b801d12f862b8ef536a0f125f346f085a00
[ "MIT" ]
1
2022-01-19T04:02:46.000Z
2022-01-19T04:02:46.000Z
ws2122-lspm/Lib/site-packages/pm4py/visualization/decisiontree/__init__.py
Malekhy/ws2122-lspm
e4dc8b801d12f862b8ef536a0f125f346f085a00
[ "MIT" ]
1
2021-11-19T07:21:48.000Z
2021-11-19T07:21:48.000Z
ws2122-lspm/Lib/site-packages/pm4py/visualization/decisiontree/__init__.py
Malekhy/ws2122-lspm
e4dc8b801d12f862b8ef536a0f125f346f085a00
[ "MIT" ]
1
2022-01-14T17:15:38.000Z
2022-01-14T17:15:38.000Z
''' This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de). PM4Py 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 late...
43.555556
76
0.741071
from pm4py.visualization.decisiontree import variants, visualizer
true
true
7900d777362f253e961712b251030149b01865cf
948
py
Python
cpu.py
SudoSpartanDan/CribbagePythonGame
1c71663b721a4048713d9616d1540953c6729bd8
[ "MIT" ]
null
null
null
cpu.py
SudoSpartanDan/CribbagePythonGame
1c71663b721a4048713d9616d1540953c6729bd8
[ "MIT" ]
null
null
null
cpu.py
SudoSpartanDan/CribbagePythonGame
1c71663b721a4048713d9616d1540953c6729bd8
[ "MIT" ]
null
null
null
import random from player import Player from hand import Hand class CPU(Player): def __init__(self, name: str): super().__init__(name) self.hand = Hand() def discard(self): if(self.hand == None or len(self.hand) <= 0): raise RuntimeError('No cards to discard') retur...
39.5
89
0.646624
import random from player import Player from hand import Hand class CPU(Player): def __init__(self, name: str): super().__init__(name) self.hand = Hand() def discard(self): if(self.hand == None or len(self.hand) <= 0): raise RuntimeError('No cards to discard') retur...
true
true
7900d8592362e59cdda73d392170065dfa23de31
1,572
py
Python
qcschema/dev/wavefunction/result_wavefunction.py
bennybp/QCSchema
25454ee1f4b971db7dc929b0861070bb8535bf51
[ "BSD-3-Clause" ]
58
2018-10-18T18:28:45.000Z
2022-01-15T12:48:47.000Z
qcschema/dev/wavefunction/result_wavefunction.py
chenxin199261/QCSchema
54fabe98ae3f31994371e0bfdfc6739dc5a84581
[ "BSD-3-Clause" ]
37
2017-06-12T21:21:07.000Z
2018-09-10T15:29:33.000Z
qcschema/dev/wavefunction/result_wavefunction.py
chenxin199261/QCSchema
54fabe98ae3f31994371e0bfdfc6739dc5a84581
[ "BSD-3-Clause" ]
22
2017-06-14T21:35:50.000Z
2018-06-21T09:39:17.000Z
""" The primary specified return wavefunction quantities. """ result_wavefunction = {} # Orbitals result_wavefunction["orbitals_a"] = { "type": "string", "description": "Alpha-spin orbitals in the AO basis of the primary return. " } result_wavefunction["orbitals_b"] = { "type": "string", "descripti...
22.782609
82
0.683206
result_wavefunction = {} result_wavefunction["orbitals_a"] = { "type": "string", "description": "Alpha-spin orbitals in the AO basis of the primary return. " } result_wavefunction["orbitals_b"] = { "type": "string", "description": "Beta-spin orbitals in the AO basis of the primary return." } resu...
true
true
7900d8af5798146104427537eab428dc891105e5
270
py
Python
Lib/site-packages/jupyterhub/apihandlers/__init__.py
KarmaScripter/PiggyPy
25ba1d0c8933a0cb655f09db6c228f74f4d52894
[ "MIT" ]
null
null
null
Lib/site-packages/jupyterhub/apihandlers/__init__.py
KarmaScripter/PiggyPy
25ba1d0c8933a0cb655f09db6c228f74f4d52894
[ "MIT" ]
null
null
null
Lib/site-packages/jupyterhub/apihandlers/__init__.py
KarmaScripter/PiggyPy
25ba1d0c8933a0cb655f09db6c228f74f4d52894
[ "MIT" ]
null
null
null
from . import auth from . import groups from . import hub from . import proxy from . import services from . import users from .base import * default_handlers = [] for mod in (auth, hub, proxy, users, groups, services): default_handlers.extend(mod.default_handlers)
22.5
55
0.744444
from . import auth from . import groups from . import hub from . import proxy from . import services from . import users from .base import * default_handlers = [] for mod in (auth, hub, proxy, users, groups, services): default_handlers.extend(mod.default_handlers)
true
true
7900d960bb77c55b384e70a32bb712279682d68e
2,002
py
Python
Score/Cosine_Score.py
Wenhao-Yang/DeepSpeaker-pytorch
99eb8de3357c85e2b7576da2a742be2ffd773ead
[ "MIT" ]
8
2020-08-26T13:32:56.000Z
2022-01-18T21:05:46.000Z
Score/Cosine_Score.py
Wenhao-Yang/DeepSpeaker-pytorch
99eb8de3357c85e2b7576da2a742be2ffd773ead
[ "MIT" ]
1
2020-07-24T17:06:16.000Z
2020-07-24T17:06:16.000Z
Score/Cosine_Score.py
Wenhao-Yang/DeepSpeaker-pytorch
99eb8de3357c85e2b7576da2a742be2ffd773ead
[ "MIT" ]
5
2020-12-11T03:31:15.000Z
2021-11-23T15:57:55.000Z
#!/usr/bin/env python # encoding: utf-8 """ @Author: yangwenhao @Contact: 874681044@qq.com @Software: PyCharm @File: Cosine.py @Time: 19-6-26 下午9:43 @Overview: Implement Cosine Score for speaker identification! Enrollment set files will be in the 'Data/enroll_set.npy' and the classes-to-index file is 'Data/enroll_clas...
31.777778
116
0.708791
import numpy as np import torch.nn as nn ENROLL_FILE = "Data/xvector/enroll/extract_adagrad-lr0.1-wd0.0-embed512-alpha10.npy" ENROLL_CLASS = "Data/enroll_classes.npy" TEST_FILE = "Data/xvector/test/extract_adagrad-lr0.1-wd0.0-embed512-alpha10.npy" TEST_CLASS = "Data/test_classes.npy" def normalize(narray, order...
true
true
7900d9a40824d06c9887dc864384391121ea5c4d
2,455
py
Python
qiskit/extensions/standard/rzz.py
christians94/qiskit-sdk-py
5c1c68a5aa3dcccdf5c10f9eb307383ebb40826b
[ "Apache-2.0" ]
null
null
null
qiskit/extensions/standard/rzz.py
christians94/qiskit-sdk-py
5c1c68a5aa3dcccdf5c10f9eb307383ebb40826b
[ "Apache-2.0" ]
1
2018-08-08T17:56:06.000Z
2018-08-08T17:56:06.000Z
qiskit/extensions/standard/rzz.py
christians94/qiskit-sdk-py
5c1c68a5aa3dcccdf5c10f9eb307383ebb40826b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017 IBM RESEARCH. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
33.630137
79
0.619552
from qiskit import CompositeGate from qiskit import Gate from qiskit import QuantumCircuit from qiskit._instructionset import InstructionSet from qiskit._quantumregister import QuantumRegister from qiskit.extensions.standard import header class RZZGate(Gate): def __init__(self, theta, ctl, tgt...
true
true
7900da9e36f2ba7266ac4dc95795cd987e6d7000
6,502
py
Python
Pipes/pipeline-scripts/NGOPT/ngopt.py
niaid/Nephele
13f58f86cdb5afc449bdaa26616865b535cf3b25
[ "Unlicense" ]
7
2017-11-29T02:55:29.000Z
2021-06-09T19:44:07.000Z
Pipes/pipeline-scripts/NGOPT/ngopt.py
niaid/Nephele
13f58f86cdb5afc449bdaa26616865b535cf3b25
[ "Unlicense" ]
1
2018-07-12T18:18:14.000Z
2018-07-12T18:18:14.000Z
Pipes/pipeline-scripts/NGOPT/ngopt.py
niaid/Nephele
13f58f86cdb5afc449bdaa26616865b535cf3b25
[ "Unlicense" ]
8
2017-10-10T09:26:19.000Z
2021-02-26T21:47:23.000Z
#!/usr/bin/env python ############################################################## # $Id$ # Project: MiSeq Metagenomic Assembly pipeline for Nephele project # Language: Python 2.7 # Author: Alex Levitsky # History: July 2015 Start of development ############################################################## ...
33.515464
131
0.557521
true
true
7900dbc6aa4b4d75c778bd208f6acd60c9380ba2
758
py
Python
rssbot/utils.py
autogestion/pubgate-rssbot
3d87bc0554fadb3e0a3d09d1331478de4188b242
[ "BSD-3-Clause" ]
4
2018-11-01T05:54:22.000Z
2022-03-01T13:35:51.000Z
rssbot/utils.py
autogestion/pubgate-rssbot
3d87bc0554fadb3e0a3d09d1331478de4188b242
[ "BSD-3-Clause" ]
null
null
null
rssbot/utils.py
autogestion/pubgate-rssbot
3d87bc0554fadb3e0a3d09d1331478de4188b242
[ "BSD-3-Clause" ]
2
2018-11-12T14:54:04.000Z
2020-12-14T19:39:53.000Z
import re find_image_scheme = re.compile(r'(?P<image_construction><img\b[^>]*src="(?P<image_url>[^"]+?)"[^>]*?\/>)') # find_link_around_image_scheme = re.compile(r"<a\b[^>]*>(.*?)<img\b(.*?)<\/a>") def move_image_to_attachment(content, attachment_object): # collect images from the post body intext_image_l...
28.074074
106
0.604222
import re find_image_scheme = re.compile(r'(?P<image_construction><img\b[^>]*src="(?P<image_url>[^"]+?)"[^>]*?\/>)') # find_link_around_image_scheme = re.compile(r"<a\b[^>]*>(.*?)<img\b(.*?)<\/a>") def move_image_to_attachment(content, attachment_object): # collect images from the post body intext_image_l...
true
true
7900dc7a3aa3d85c5256af3c449f044adaee7723
3,160
py
Python
tools/calibration/process_dataset_callbacks/collect_results_callback.py
zhoub/dldt
e42c01cf6e1d3aefa55e2c5df91f1054daddc575
[ "Apache-2.0" ]
null
null
null
tools/calibration/process_dataset_callbacks/collect_results_callback.py
zhoub/dldt
e42c01cf6e1d3aefa55e2c5df91f1054daddc575
[ "Apache-2.0" ]
null
null
null
tools/calibration/process_dataset_callbacks/collect_results_callback.py
zhoub/dldt
e42c01cf6e1d3aefa55e2c5df91f1054daddc575
[ "Apache-2.0" ]
null
null
null
""" Copyright (C) 2018-2019 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
35.505618
85
0.67943
import openvino.inference_engine as ie from ..infer_raw_results import InferRawResults from ..aggregated_statistics import AggregatedStatistics class CollectResultsCallback: def __init__( self, network: ie.IENetwork, exec_network: ie.ExecutableNetwork, collect_resuls: bool = True,...
true
true
7900dd2b02d354a18e38927e3530f070279d236b
9,162
py
Python
compiler/characterizer/measurements.py
lekez2005/OpenRAM
608e4b81f1763727e7efe087d591c76956869fe6
[ "BSD-3-Clause" ]
null
null
null
compiler/characterizer/measurements.py
lekez2005/OpenRAM
608e4b81f1763727e7efe087d591c76956869fe6
[ "BSD-3-Clause" ]
null
null
null
compiler/characterizer/measurements.py
lekez2005/OpenRAM
608e4b81f1763727e7efe087d591c76956869fe6
[ "BSD-3-Clause" ]
null
null
null
# See LICENSE for licensing information. # # Copyright (c) 2016-2019 Regents of the University of California and The Board # of Regents for the Oklahoma Agricultural and Mechanical College # (acting for and on behalf of Oklahoma State University) # All rights reserved. # import debug from tech import drc, parameter, sp...
45.356436
118
0.697337
import debug from tech import drc, parameter, spice from abc import ABC, abstractmethod from .stimuli import * from .charutils import * class spice_measurement(ABC): def __init__(self, measure_name, measure_scale=None, has_port=True): self.name = measure_name self.measure_scale = me...
true
true
7900dd9d0973ef7c36be228897c5f941063ca9e6
17,766
py
Python
webots/controllers/ur_controller/kinematics/inverse.py
EmilRyberg/P8LH7Grounding
406fdf4ce9afd160df3d7105fedea563a284974b
[ "MIT" ]
1
2021-02-09T12:13:28.000Z
2021-02-09T12:13:28.000Z
webots/controllers/ur_controller/kinematics/inverse.py
EmilRyberg/P8LH7Grounding
406fdf4ce9afd160df3d7105fedea563a284974b
[ "MIT" ]
null
null
null
webots/controllers/ur_controller/kinematics/inverse.py
EmilRyberg/P8LH7Grounding
406fdf4ce9afd160df3d7105fedea563a284974b
[ "MIT" ]
null
null
null
import math import numpy as np from kinematics.forward import ForwardKinematics from kinematics.kinematics import Kinematics from kinematics.solution import InverseKinematicsShoulderSolution, InverseKinematicsSpecificSolution, \ InverseKinematicsSolution, InverseKinematicsWristSolution class InverseKinematics(K...
53.836364
147
0.672295
import math import numpy as np from kinematics.forward import ForwardKinematics from kinematics.kinematics import Kinematics from kinematics.solution import InverseKinematicsShoulderSolution, InverseKinematicsSpecificSolution, \ InverseKinematicsSolution, InverseKinematicsWristSolution class InverseKinematics(K...
true
true
7900dde40c879fb214488626b1afbfb9444c7685
1,364
py
Python
account/models.py
pauljherrera/avantiweb
40b87e754e68a0e2adcf5e1640d5e2e0c8637d0a
[ "MIT" ]
null
null
null
account/models.py
pauljherrera/avantiweb
40b87e754e68a0e2adcf5e1640d5e2e0c8637d0a
[ "MIT" ]
null
null
null
account/models.py
pauljherrera/avantiweb
40b87e754e68a0e2adcf5e1640d5e2e0c8637d0a
[ "MIT" ]
null
null
null
from django.db import models from django.conf import settings from django.contrib.auth.models import User from django.db.models.signals import post_save # Create your models here. class Profile(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL) date_of_birth = models.DateField(blank=True, null=Tru...
30.311111
75
0.744868
from django.db import models from django.conf import settings from django.contrib.auth.models import User from django.db.models.signals import post_save class Profile(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL) date_of_birth = models.DateField(blank=True, null=True) photo = models.ImageFi...
true
true
7900de374b0b26464a2f4577d5e9c14335ef0962
330
py
Python
shots/admin.py
leigh90/TheLumiere
779ce93f2b27fd83f891803bdc5304b14767c794
[ "MIT" ]
1
2021-07-30T03:43:50.000Z
2021-07-30T03:43:50.000Z
shots/admin.py
leigh90/TheLumiere
779ce93f2b27fd83f891803bdc5304b14767c794
[ "MIT" ]
null
null
null
shots/admin.py
leigh90/TheLumiere
779ce93f2b27fd83f891803bdc5304b14767c794
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import Location,Category,Image # Register your models here. admin.site.register(Location) admin.site.register(Category) admin.site.register(Image) class Image(admin.ModelAdmin): search_fields = ('image_...
23.571429
43
0.778788
from __future__ import unicode_literals from django.contrib import admin from .models import Location,Category,Image admin.site.register(Location) admin.site.register(Category) admin.site.register(Image) class Image(admin.ModelAdmin): search_fields = ('image_category')
true
true
7900deb515d717fd4af09ce55feb3c93fa384b5e
40,611
py
Python
unit_tests/events/plugins/test_zaza_events_plugins_conncheck.py
wolsen/zaza
351f3580b7b1ce4e74bd3b40caacbce218110476
[ "ECL-2.0", "Apache-2.0" ]
10
2018-02-09T16:32:02.000Z
2021-05-18T14:19:23.000Z
unit_tests/events/plugins/test_zaza_events_plugins_conncheck.py
wolsen/zaza
351f3580b7b1ce4e74bd3b40caacbce218110476
[ "ECL-2.0", "Apache-2.0" ]
243
2018-03-23T02:10:26.000Z
2022-03-25T12:32:31.000Z
unit_tests/events/plugins/test_zaza_events_plugins_conncheck.py
wolsen/zaza
351f3580b7b1ce4e74bd3b40caacbce218110476
[ "ECL-2.0", "Apache-2.0" ]
34
2017-12-07T08:10:32.000Z
2022-02-04T13:12:58.000Z
# Copyright 2021 Canonical Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
43.203191
79
0.641698
import mock import subprocess import unit_tests.utils as tests_utils import zaza.events.plugins.conncheck as conncheck class TestAutoConfigureFunction(tests_utils.BaseTestCase): def setUp(self): super().setUp() self.patch_object(conncheck, 'logger', name='mock_logger') s...
true
true
7900df3bf1d0564e2953ce25cfb4f96a4dab68f2
10,914
py
Python
scripts/slave/extract_build.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/extract_build.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/extract_build.py
bopopescu/build
4e95fd33456e552bfaf7d94f7d04b19273d1c534
[ "BSD-3-Clause" ]
1
2020-07-23T11:05:06.000Z
2020-07-23T11:05:06.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A tool to extract a build, executed by a buildbot slave. """ import optparse import os import shutil import sys import tracebac...
39.400722
80
0.678761
"""A tool to extract a build, executed by a buildbot slave. """ import optparse import os import shutil import sys import traceback import urllib from common import chromium_utils from slave import build_directory from slave import slave_utils class ExtractHandler(object): def __init__(self, url, archive_name...
false
true
7900df46c3f5fbc6ffed783bcf49342a16fafa3b
8,813
py
Python
EQUATIONS/InternalEnergyEquation.py
mmicromegas/ransX
2faaa786e00cfd14dce0e18f0793cd0252428d2a
[ "BSD-2-Clause" ]
4
2019-04-22T11:43:47.000Z
2020-09-16T00:28:15.000Z
EQUATIONS/InternalEnergyEquation.py
mmicromegas/ransX
2faaa786e00cfd14dce0e18f0793cd0252428d2a
[ "BSD-2-Clause" ]
34
2019-07-01T09:11:00.000Z
2022-03-30T13:35:43.000Z
EQUATIONS/InternalEnergyEquation.py
mmicromegas/ransX
2faaa786e00cfd14dce0e18f0793cd0252428d2a
[ "BSD-2-Clause" ]
1
2020-09-16T00:28:17.000Z
2020-09-16T00:28:17.000Z
import numpy as np import matplotlib.pyplot as plt from UTILS.Calculus import Calculus from UTILS.SetAxisLimit import SetAxisLimit from UTILS.Tools import Tools from UTILS.Errors import Errors import sys # Theoretical background https://arxiv.org/abs/1401.5176 # Mocak, Meakin, Viallet, Arnett, 2014, Compressible Hyd...
36.874477
125
0.572336
import numpy as np import matplotlib.pyplot as plt from UTILS.Calculus import Calculus from UTILS.SetAxisLimit import SetAxisLimit from UTILS.Tools import Tools from UTILS.Errors import Errors import sys class InternalEnergyEquation(Calculus, SetAxisLimit, Tools, Errors, object): def __init__(self, filename, ...
true
true
7900e013a5cc4ed433eea3300f9c40a98db9911f
12,327
py
Python
cif_tools.py
cwaitt/zse
4330397ddf84dafaa0af7bddd25756e008cb3ff5
[ "MIT" ]
3
2021-07-08T19:38:40.000Z
2022-02-18T10:51:11.000Z
cif_tools.py
cwaitt/zse
4330397ddf84dafaa0af7bddd25756e008cb3ff5
[ "MIT" ]
null
null
null
cif_tools.py
cwaitt/zse
4330397ddf84dafaa0af7bddd25756e008cb3ff5
[ "MIT" ]
6
2020-09-29T18:19:54.000Z
2022-03-18T14:44:15.000Z
__all__ = ['read_cif','cif_site_labels'] from ase.io import read from ase.spacegroup import spacegroup import sys import os import logging from math import * import numpy as np import pkg_resources import warnings warnings.filterwarnings("ignore") path = '.temp_files/' filepath = pkg_resources.resource_filename(__na...
29.632212
99
0.532814
__all__ = ['read_cif','cif_site_labels'] from ase.io import read from ase.spacegroup import spacegroup import sys import os import logging from math import * import numpy as np import pkg_resources import warnings warnings.filterwarnings("ignore") path = '.temp_files/' filepath = pkg_resources.resource_filename(__na...
true
true
7900e0ee2d6332f9b7ff856016da19bff7c11496
74
py
Python
jacdac/midi_output/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-15T21:30:36.000Z
2022-02-15T21:30:36.000Z
jacdac/midi_output/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
null
null
null
jacdac/midi_output/__init__.py
microsoft/jacdac-python
712ad5559e29065f5eccb5dbfe029c039132df5a
[ "MIT" ]
1
2022-02-08T19:32:45.000Z
2022-02-08T19:32:45.000Z
# Autogenerated file. from .client import MidiOutputClient # type: ignore
24.666667
51
0.797297
from .client import MidiOutputClient
true
true
7900e18324371e2870e0cf7dd9a4d0470bb97f1c
672
py
Python
electeez_auth/test_otp.py
Joneswn/Baloti
c499666dd9e2553fac88130dea2b6e9df8278234
[ "MIT" ]
1
2022-02-24T17:30:53.000Z
2022-02-24T17:30:53.000Z
electeez_auth/test_otp.py
Joneswn/Baloti
c499666dd9e2553fac88130dea2b6e9df8278234
[ "MIT" ]
null
null
null
electeez_auth/test_otp.py
Joneswn/Baloti
c499666dd9e2553fac88130dea2b6e9df8278234
[ "MIT" ]
2
2021-10-06T11:52:41.000Z
2022-01-20T11:07:27.000Z
from datetime import timedelta import pytest from django.utils import timezone from electeez_auth.models import User @pytest.mark.django_db def test_otp(client): user = User.objects.create(email='otp@example.com') token = user.otp_new(redirect='valid') response = client.post(token.path) assert respo...
25.846154
60
0.696429
from datetime import timedelta import pytest from django.utils import timezone from electeez_auth.models import User @pytest.mark.django_db def test_otp(client): user = User.objects.create(email='otp@example.com') token = user.otp_new(redirect='valid') response = client.post(token.path) assert respo...
true
true
7900e27a0a7531447f93206bf2dcde0bf5f2b194
819
py
Python
docker/test/integration/minifi/core/MqttBrokerContainer.py
rustammendel/nifi-minifi-cpp
3a3615debb9129e7b954827debccaecc68b66006
[ "Apache-2.0" ]
null
null
null
docker/test/integration/minifi/core/MqttBrokerContainer.py
rustammendel/nifi-minifi-cpp
3a3615debb9129e7b954827debccaecc68b66006
[ "Apache-2.0" ]
null
null
null
docker/test/integration/minifi/core/MqttBrokerContainer.py
rustammendel/nifi-minifi-cpp
3a3615debb9129e7b954827debccaecc68b66006
[ "Apache-2.0" ]
null
null
null
import logging from .Container import Container class MqttBrokerContainer(Container): def __init__(self, name, vols, network, image_store, command=None): super().__init__(name, 'mqtt-broker', vols, network, image_store, command) def get_startup_finished_log_entry(self): return "mosquitto vers...
32.76
82
0.634921
import logging from .Container import Container class MqttBrokerContainer(Container): def __init__(self, name, vols, network, image_store, command=None): super().__init__(name, 'mqtt-broker', vols, network, image_store, command) def get_startup_finished_log_entry(self): return "mosquitto vers...
true
true