hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f70d2f11b4758a9155d2ff127345b99d02d4e582
4,519
py
Python
tensormonk/layers/routingcapsule.py
Tensor46/TensorMONK
67617d3fdf8fde072ba9cab42de7d67c79b17494
[ "MIT" ]
29
2018-07-06T23:57:23.000Z
2022-03-08T20:38:57.000Z
tensormonk/layers/routingcapsule.py
Johnson-yue/TensorMONK
1785132b82c685c3b3fc05b00dec46b1fccfc948
[ "MIT" ]
3
2018-12-14T22:21:26.000Z
2020-06-19T02:13:34.000Z
tensormonk/layers/routingcapsule.py
Johnson-yue/TensorMONK
1785132b82c685c3b3fc05b00dec46b1fccfc948
[ "MIT" ]
8
2018-07-06T23:58:03.000Z
2021-04-12T01:35:54.000Z
""" TensorMONK :: layers :: RoutingCapsule """ import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from ..activations import Activations class RoutingCapsule(nn.Module): r""" Routing capsule from Dynamic Routing Between Capsules. Implemented -- https://arxiv.org/pdf/1710.098...
41.458716
78
0.565833
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from ..activations import Activations class RoutingCapsule(nn.Module): def __init__(self, tensor_size, n_capsules: int = 10, capsule_length: int = 32, iteratio...
true
true
f70d317e35a1f8940c78beeb402a916845199a82
1,325
py
Python
storage.py
cgrinaldi/pocket_analytics
7a79458de82b186fd4d5078b28d765d3bafe12aa
[ "MIT" ]
null
null
null
storage.py
cgrinaldi/pocket_analytics
7a79458de82b186fd4d5078b28d765d3bafe12aa
[ "MIT" ]
null
null
null
storage.py
cgrinaldi/pocket_analytics
7a79458de82b186fd4d5078b28d765d3bafe12aa
[ "MIT" ]
null
null
null
import os import logging import pandas as pd from pathlib import Path logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) DIR_PATH = Path(os.path.dirname(os.path.abspath(__file__))) SINCE_PATH = DIR_PATH / Path('data/since.txt') ARTICLES_PATH = DIR_PATH / Path('data/articles.csv') def reco...
27.604167
76
0.678491
import os import logging import pandas as pd from pathlib import Path logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) DIR_PATH = Path(os.path.dirname(os.path.abspath(__file__))) SINCE_PATH = DIR_PATH / Path('data/since.txt') ARTICLES_PATH = DIR_PATH / Path('data/articles.csv') def reco...
true
true
f70d31954fdaae148038490efab8366f3216e8a3
2,638
py
Python
stdplugins/react.py
dqanshi/PornHub
162a7053ca7f2c0b3617b852559cfaf0502d94a7
[ "Apache-2.0" ]
55
2019-07-13T15:57:54.000Z
2021-09-20T16:50:42.000Z
stdplugins/react.py
dqanshi/PornHub
162a7053ca7f2c0b3617b852559cfaf0502d94a7
[ "Apache-2.0" ]
3
2019-04-20T08:34:01.000Z
2019-05-11T21:37:02.000Z
stdplugins/react.py
dqanshi/PornHub
162a7053ca7f2c0b3617b852559cfaf0502d94a7
[ "Apache-2.0" ]
450
2019-07-12T13:18:41.000Z
2022-03-29T18:47:42.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Command: .react happy|thinking|waving|wtf|love|confused|dead|sad|dog """ from telethon import events import random import asyncio @borg.on(events.NewMessage(pattern=r"\.react (.*)", outgoing=True)) async def _(event): if event.fwd_from: return input_s...
23.981818
76
0.264594
from telethon import events import random import asyncio @borg.on(events.NewMessage(pattern=r"\.react (.*)", outgoing=True)) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) if input_str in "happy": emoticons = [ "( ͡° ͜ʖ ͡°)", ...
true
true
f70d3284aa11915bd429474b764a1b4e9a3d1c85
2,545
py
Python
allauth/socialaccount/providers/google/views.py
sssbox/django-allauth
421ca0b6767ed9368775a722762ac5f9bebb9689
[ "MIT" ]
null
null
null
allauth/socialaccount/providers/google/views.py
sssbox/django-allauth
421ca0b6767ed9368775a722762ac5f9bebb9689
[ "MIT" ]
null
null
null
allauth/socialaccount/providers/google/views.py
sssbox/django-allauth
421ca0b6767ed9368775a722762ac5f9bebb9689
[ "MIT" ]
null
null
null
import requests from allauth.account.models import EmailAddress from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from allauth.socialaccount.m...
45.446429
120
0.588212
import requests from allauth.account.models import EmailAddress from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from allauth.socialaccount.m...
true
true
f70d32b067db3c1c8f19952d4da8b8a2722adacc
6,726
py
Python
src/oci/load_balancer/models/path_match_condition.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/load_balancer/models/path_match_condition.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/load_balancer/models/path_match_condition.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
40.763636
245
0.685251
from .rule_condition import RuleCondition from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class PathMatchCondition(RuleCondition): OPERATOR_EXACT_MATCH = "EXACT_MATCH" ...
true
true
f70d35c34c5be584cec5f7ef158f89b724b32c4e
1,840
py
Python
stanford/sms-tools/lectures/07-Sinusoidal-plus-residual-model/plots-code/hpsModel-sax-phrase.py
phunc20/dsp
e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886
[ "MIT" ]
1
2021-03-12T18:32:06.000Z
2021-03-12T18:32:06.000Z
stanford/sms-tools/lectures/07-Sinusoidal-plus-residual-model/plots-code/hpsModel-sax-phrase.py
phunc20/dsp
e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886
[ "MIT" ]
null
null
null
stanford/sms-tools/lectures/07-Sinusoidal-plus-residual-model/plots-code/hpsModel-sax-phrase.py
phunc20/dsp
e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, hanning, triang, blackmanharris, resample import math import sys, os, time sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import utilFunctions as UF import hpsModel as HPS (fs,...
30.163934
124
0.69837
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, hanning, triang, blackmanharris, resample import math import sys, os, time sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import utilFunctions as UF import hpsModel as HPS (fs,...
true
true
f70d364ff397d084be492c661c2aa263aedb24d2
8,784
py
Python
conformance-test.py
aheck/reflectrpc
9602d3b3f06d3d8ee8549788301e43b172a597f6
[ "MIT" ]
33
2016-06-12T15:25:07.000Z
2021-11-16T18:53:16.000Z
conformance-test.py
aheck/reflectrpc
9602d3b3f06d3d8ee8549788301e43b172a597f6
[ "MIT" ]
null
null
null
conformance-test.py
aheck/reflectrpc
9602d3b3f06d3d8ee8549788301e43b172a597f6
[ "MIT" ]
3
2016-10-10T20:50:41.000Z
2021-05-01T23:51:34.000Z
#!/usr/bin/env python3 from __future__ import unicode_literals from builtins import bytes, dict, list, int, float, str import argparse import json import sys import unittest from reflectrpc.client import RpcClient from reflectrpc.testing import ServerRunner server_program = None class ConformanceTest(unittest.Test...
43.058824
187
0.42327
from __future__ import unicode_literals from builtins import bytes, dict, list, int, float, str import argparse import json import sys import unittest from reflectrpc.client import RpcClient from reflectrpc.testing import ServerRunner server_program = None class ConformanceTest(unittest.TestCase): def ...
true
true
f70d36636215f58502603634e3405240e239ae00
156
py
Python
nagios_historian/__init__.py
matiasgrana/nagios_historian_plugin
5d1e014772859212c40d2478802cddcc8b63b792
[ "MIT" ]
9
2015-11-05T17:37:29.000Z
2019-07-16T08:07:54.000Z
nagios_historian/__init__.py
matiasgrana/nagios_historian_plugin
5d1e014772859212c40d2478802cddcc8b63b792
[ "MIT" ]
22
2016-09-19T18:22:40.000Z
2020-08-03T16:00:18.000Z
nagios_historian/__init__.py
matiasgrana/nagios_historian_plugin
5d1e014772859212c40d2478802cddcc8b63b792
[ "MIT" ]
1
2019-07-10T12:57:59.000Z
2019-07-10T12:57:59.000Z
import os # Read version from VERSION file __version__ = open( os.path.join(os.path.dirname(os.path.realpath(__file__)), 'VERSION') ).read().rstrip()
19.5
72
0.711538
import os __version__ = open( os.path.join(os.path.dirname(os.path.realpath(__file__)), 'VERSION') ).read().rstrip()
true
true
f70d36698c15ad1c46bd3fcb46d3fb4fd72f4b57
1,038
py
Python
day1/car.py
Flevian/andelabootcamp16
c2009344f4afe8c041ec836945031df60b56a1be
[ "MIT" ]
null
null
null
day1/car.py
Flevian/andelabootcamp16
c2009344f4afe8c041ec836945031df60b56a1be
[ "MIT" ]
null
null
null
day1/car.py
Flevian/andelabootcamp16
c2009344f4afe8c041ec836945031df60b56a1be
[ "MIT" ]
null
null
null
class Car(object): def __ini__(self, name, model, car_doors, car_wheels, speed = 0): if not name: self.name = "General" else: self.name = name if not model: self.model = "Gm" else: self.mo...
23.590909
77
0.423892
class Car(object): def __ini__(self, name, model, car_doors, car_wheels, speed = 0): if not name: self.name = "General" else: self.name = name if not model: self.model = "Gm" else: self.mo...
true
true
f70d366c5523eac9498fdf9d37425954f2be514f
1,869
py
Python
set/requirements/views.py
Protocomms/SysEng-Tools
8eea265b9143d1a00035e5ed9cb1ccb6ca5f6738
[ "MIT" ]
null
null
null
set/requirements/views.py
Protocomms/SysEng-Tools
8eea265b9143d1a00035e5ed9cb1ccb6ca5f6738
[ "MIT" ]
11
2020-07-31T20:44:46.000Z
2022-03-12T00:35:11.000Z
set/requirements/views.py
Protocomms/SysEng-Tools
8eea265b9143d1a00035e5ed9cb1ccb6ca5f6738
[ "MIT" ]
null
null
null
from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponseRedirect from django.urls import reverse from django.views import generic from .models import Requirement#, CreateRequirement from django.forms.models import model_to_dict # Create your views here. class RequirementIn...
30.145161
109
0.688604
from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponseRedirect from django.urls import reverse from django.views import generic from .models import Requirementfrom django.forms.models import model_to_dict class RequirementIndex(generic.ListView): model = Requirement ...
true
true
f70d36fbaeb3f06d7372ea993831ab7a53dce08b
256
py
Python
project/manage.py
fedjo/aat
79d95bd4ed0f19d974b1f73bbdfba7de1fd5e981
[ "Apache-2.0" ]
1
2019-09-30T02:43:54.000Z
2019-09-30T02:43:54.000Z
project/manage.py
fedjo/aat
79d95bd4ed0f19d974b1f73bbdfba7de1fd5e981
[ "Apache-2.0" ]
null
null
null
project/manage.py
fedjo/aat
79d95bd4ed0f19d974b1f73bbdfba7de1fd5e981
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencvFaceRec.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
23.272727
77
0.777344
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencvFaceRec.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
true
true
f70d3854e6948fd9c119e9cfae20a5a988332d39
1,306
py
Python
gae/chem/sparse/chem_train_single.py
neilswainston/gae
00ce67b8dd25e79055f55133f7775b20476c8995
[ "MIT" ]
null
null
null
gae/chem/sparse/chem_train_single.py
neilswainston/gae
00ce67b8dd25e79055f55133f7775b20476c8995
[ "MIT" ]
null
null
null
gae/chem/sparse/chem_train_single.py
neilswainston/gae
00ce67b8dd25e79055f55133f7775b20476c8995
[ "MIT" ]
null
null
null
''' (c) University of Liverpool 2020 All rights reserved. @author: neilswainston ''' # pylint: disable=invalid-name # pylint: disable=no-member # pylint: disable=wrong-import-order from rdkit import Chem import scipy from gae.tf import train_single import numpy as np import pandas as pd def _load_data(filename): ...
22.135593
74
0.624809
from rdkit import Chem import scipy from gae.tf import train_single import numpy as np import pandas as pd def _load_data(filename): df = pd.read_csv(filename) smiles = df['smiles'][0] adj, features = _get_data(smiles) return adj, features def _get_data(smiles): mol = Chem.MolFromSmiles(smiles)...
true
true
f70d39d8f506cacd8b8b858e73f2c94ccbc0cbec
4,486
py
Python
bitbots_head_behavior/src/bitbots_head_behavior/actions/search_recent_ball.py
Wangxinhui-bot/bitbots_behavior
7c6c5e3cba533fe06cb92083ed1bd45b5b6bc2fc
[ "MIT" ]
null
null
null
bitbots_head_behavior/src/bitbots_head_behavior/actions/search_recent_ball.py
Wangxinhui-bot/bitbots_behavior
7c6c5e3cba533fe06cb92083ed1bd45b5b6bc2fc
[ "MIT" ]
null
null
null
bitbots_head_behavior/src/bitbots_head_behavior/actions/search_recent_ball.py
Wangxinhui-bot/bitbots_behavior
7c6c5e3cba533fe06cb92083ed1bd45b5b6bc2fc
[ "MIT" ]
1
2020-07-12T12:58:07.000Z
2020-07-12T12:58:07.000Z
import math import rospy import tf2_ros as tf2 from geometry_msgs.msg import PointStamped from bitbots_head_behavior.actions.look_at import AbstractLookAt class SearchRecentBall(AbstractLookAt): """ This action looks at the last position the ball has been seen and starts searching it from this position o...
39.699115
160
0.68123
import math import rospy import tf2_ros as tf2 from geometry_msgs.msg import PointStamped from bitbots_head_behavior.actions.look_at import AbstractLookAt class SearchRecentBall(AbstractLookAt): def __init__(self, dsd, blackboard, parameters=None): super(SearchRecentBall, self).__init__(dsd, blackboard,...
true
true
f70d3a78c5cc9d7d2a2a2efa02252cafc3dc63f0
16,159
py
Python
linux/benji.py
ABHI1621/B.E.N.J.I.
56c608626c892290b82ba1e63e4f1275a1bd4686
[ "MIT" ]
null
null
null
linux/benji.py
ABHI1621/B.E.N.J.I.
56c608626c892290b82ba1e63e4f1275a1bd4686
[ "MIT" ]
1
2020-10-01T07:07:46.000Z
2020-10-01T07:08:08.000Z
linux/benji.py
ABHI1621/B.E.N.J.I.
56c608626c892290b82ba1e63e4f1275a1bd4686
[ "MIT" ]
1
2020-10-01T07:03:21.000Z
2020-10-01T07:03:21.000Z
import tkinter as tk from tkinter import ttk import re import os import wikipedia import time import webbrowser import json import requests import ctypes import youtube_dl import random import urllib import ssl from bs4 import BeautifulSoup from urllib.request import urlopen import speech_recognition as sr import reque...
32.513078
133
0.64181
import tkinter as tk from tkinter import ttk import re import os import wikipedia import time import webbrowser import json import requests import ctypes import youtube_dl import random import urllib import ssl from bs4 import BeautifulSoup from urllib.request import urlopen import speech_recognition as sr import reque...
false
true
f70d3b8d74636509a4cccf105621edfaad4be40e
8,020
py
Python
bpyCruft/baseplate.py
feurig/mysorrybot
020ac244b8fcd9bf7a45500691f356c5c057b8bc
[ "BSD-3-Clause" ]
null
null
null
bpyCruft/baseplate.py
feurig/mysorrybot
020ac244b8fcd9bf7a45500691f356c5c057b8bc
[ "BSD-3-Clause" ]
null
null
null
bpyCruft/baseplate.py
feurig/mysorrybot
020ac244b8fcd9bf7a45500691f356c5c057b8bc
[ "BSD-3-Clause" ]
null
null
null
import bpy holeDepth=5 holeRadius=1.5 bpy.ops.mesh.primitive_cube_add() gearHole = bpy.context.selected_objects[0] gearHole.name="GearHole" bpy.ops.transform.resize(value=(9, 14, holeDepth/2.0)) gearHole.location = (0,0,2) bpy.ops.mesh.primitive_cube_add() rightWheel = bpy.context.selected_objects[0] rightWheel.name...
36.788991
112
0.773441
import bpy holeDepth=5 holeRadius=1.5 bpy.ops.mesh.primitive_cube_add() gearHole = bpy.context.selected_objects[0] gearHole.name="GearHole" bpy.ops.transform.resize(value=(9, 14, holeDepth/2.0)) gearHole.location = (0,0,2) bpy.ops.mesh.primitive_cube_add() rightWheel = bpy.context.selected_objects[0] rightWheel.name...
true
true
f70d3bb67095fe2f01719c4bc86d38d222da6261
2,985
py
Python
tests/characterisation/test_t_plots.py
pauliacomi/adsutils
062653b38924d419d1235edf7909078ff98a163f
[ "MIT" ]
null
null
null
tests/characterisation/test_t_plots.py
pauliacomi/adsutils
062653b38924d419d1235edf7909078ff98a163f
[ "MIT" ]
null
null
null
tests/characterisation/test_t_plots.py
pauliacomi/adsutils
062653b38924d419d1235edf7909078ff98a163f
[ "MIT" ]
null
null
null
""" This test module has tests relating to t-plots All functions in /calculations/tplot.py are tested here. The purposes are: - testing the user-facing API function (tplot) - testing individual low level functions against known results. Functions are tested against pre-calculated values on real isotherms. Al...
32.802198
91
0.649581
import pytest from matplotlib.testing.decorators import cleanup from numpy import isclose import pygaps.characterisation.t_plots as pt import pygaps.parsing as pgp import pygaps.utilities.exceptions as pgEx from .conftest import DATA from .conftest import DATA_N77_PATH @pytest.mark.characterisation class TestTPlot...
true
true
f70d3c73acbab5565f9c3556f596694326f62bee
3,538
py
Python
deltalm/src/fairseq/optim/lr_scheduler/vaswani_lr_scheduler.py
mbrner/unilm
5988aa468a8b86e9a6689a601ca3b0263c74f0c5
[ "MIT" ]
4
2022-03-31T02:16:34.000Z
2022-03-31T15:38:50.000Z
deltalm/src/fairseq/optim/lr_scheduler/vaswani_lr_scheduler.py
mbrner/unilm
5988aa468a8b86e9a6689a601ca3b0263c74f0c5
[ "MIT" ]
null
null
null
deltalm/src/fairseq/optim/lr_scheduler/vaswani_lr_scheduler.py
mbrner/unilm
5988aa468a8b86e9a6689a601ca3b0263c74f0c5
[ "MIT" ]
null
null
null
# 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 collections import Collection from dataclasses import dataclass, field from typing import List from omegaconf import II from...
39.311111
128
0.661391
from collections import Collection from dataclasses import dataclass, field from typing import List from omegaconf import II from fairseq.dataclass import FairseqDataclass from fairseq.optim.lr_scheduler import FairseqLRScheduler, register_lr_scheduler @dataclass class VaswaniInverseSquareRootLRSchedul...
true
true
f70d3e0d2a7eef81c58d1cf06a1134bad00a1cc1
10,633
py
Python
simbdp3x1/death.py
JRF-2018/simbd
7a453562331cf5b41187a8c69e18ec3378004dc1
[ "ClArtistic" ]
null
null
null
simbdp3x1/death.py
JRF-2018/simbd
7a453562331cf5b41187a8c69e18ec3378004dc1
[ "ClArtistic" ]
10
2021-09-05T13:15:50.000Z
2022-02-10T06:48:46.000Z
simbdp3x1/death.py
JRF-2018/simbd
7a453562331cf5b41187a8c69e18ec3378004dc1
[ "ClArtistic" ]
null
null
null
#!/usr/bin/python3 __version__ = '0.0.1' # Time-stamp: <2021-09-25T07:39:16Z> ## Language: Japanese/UTF-8 """Simulation Buddhism Prototype No.3 x.1 - Death 死亡関連 """ ## ## Author: ## ## JRF ( http://jrf.cocolog-nifty.com/statuses/ (in Japanese)) ## ## License: ## ## The author is a Japanese. ## ...
35.092409
78
0.496849
__version__ = '0.0.1' import math import random import simbdp3x1.base as base from simbdp3x1.base import ARGS, Person0, Economy0 from simbdp3x1.common import Death, Tomb, np_clip from simbdp3x1.inherit import calc_inheritance_share class PersonDT (Person0): def is_dead (self): return sel...
true
true
f70d3e28da9aa68e8d861ebac687968a147701ef
284,723
py
Python
poker.py
TheArnabDey/PokerDataStyle
8eeffced3c337e76219b7c1ce1d43a5f4cfeea1b
[ "Apache-2.0" ]
null
null
null
poker.py
TheArnabDey/PokerDataStyle
8eeffced3c337e76219b7c1ce1d43a5f4cfeea1b
[ "Apache-2.0" ]
null
null
null
poker.py
TheArnabDey/PokerDataStyle
8eeffced3c337e76219b7c1ce1d43a5f4cfeea1b
[ "Apache-2.0" ]
null
null
null
import random import pandas as pd import numpy as np df1 = pd.read_csv('train.csv') df2 = pd.read_csv('train.csv') df3 = pd.read_csv('train.csv') df4 = pd.read_csv('train.csv') df5 = pd.read_csv('train.csv') for i in range(0,1000000): for k in range (1,5): x = 0 # Create Pre-Flop round ...
64.94594
152
0.261602
import random import pandas as pd import numpy as np df1 = pd.read_csv('train.csv') df2 = pd.read_csv('train.csv') df3 = pd.read_csv('train.csv') df4 = pd.read_csv('train.csv') df5 = pd.read_csv('train.csv') for i in range(0,1000000): for k in range (1,5): x = 0 if k == 1: ...
false
true
f70d3eb28e3833468cb085d6d0a882dcb7ea8f0e
1,839
py
Python
chat/api/config.py
MTAS101/chat
8c8bd620ee75bf95f2dd7367c1781268df1ef392
[ "FSFAP" ]
29
2021-10-04T07:56:00.000Z
2022-03-31T15:52:34.000Z
chat/api/config.py
MTAS101/chat
8c8bd620ee75bf95f2dd7367c1781268df1ef392
[ "FSFAP" ]
22
2021-10-05T10:35:19.000Z
2022-03-30T18:59:24.000Z
chat/api/config.py
MTAS101/chat
8c8bd620ee75bf95f2dd7367c1781268df1ef392
[ "FSFAP" ]
24
2021-10-04T15:19:00.000Z
2022-03-26T02:57:02.000Z
import frappe from frappe import _ from chat.utils import validate_token, get_admin_name, get_chat_settings, get_user_settings import json @frappe.whitelist(allow_guest=True) def settings(token): """Fetch and return the settings for a chat session Args: token (str): Guest token. """ config =...
31.169492
91
0.642741
import frappe from frappe import _ from chat.utils import validate_token, get_admin_name, get_chat_settings, get_user_settings import json @frappe.whitelist(allow_guest=True) def settings(token): config = { 'socketio_port': frappe.conf.socketio_port, 'user_email': frappe.session.user, 'is_...
true
true
f70d3ee6326dddc143a13c222e2879ede2cff915
251
py
Python
app/tt.py
koheimiya/do-what-you-want
05c09a40dfd736b7a98661db4e4a3158f8aa6946
[ "MIT" ]
null
null
null
app/tt.py
koheimiya/do-what-you-want
05c09a40dfd736b7a98661db4e4a3158f8aa6946
[ "MIT" ]
null
null
null
app/tt.py
koheimiya/do-what-you-want
05c09a40dfd736b7a98661db4e4a3158f8aa6946
[ "MIT" ]
null
null
null
import sys from taggedtree.repl import dispatch_subcommand from os.path import expanduser def main(): fname = expanduser("~/.tt.json") cmds = tuple(sys.argv[1:]) dispatch_subcommand(fname, cmds) if __name__ == "__main__": main()
15.6875
47
0.689243
import sys from taggedtree.repl import dispatch_subcommand from os.path import expanduser def main(): fname = expanduser("~/.tt.json") cmds = tuple(sys.argv[1:]) dispatch_subcommand(fname, cmds) if __name__ == "__main__": main()
true
true
f70d3f5b2c91ff951ad838a625d08e363897be0c
889
py
Python
flexget/plugins/operate/manual.py
thisirs/Flexget
4dacd31e89dd37c6c8afce0c11b37eeb177ebc0f
[ "MIT" ]
null
null
null
flexget/plugins/operate/manual.py
thisirs/Flexget
4dacd31e89dd37c6c8afce0c11b37eeb177ebc0f
[ "MIT" ]
null
null
null
flexget/plugins/operate/manual.py
thisirs/Flexget
4dacd31e89dd37c6c8afce0c11b37eeb177ebc0f
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.event import event log = logging.getLogger('manual') class ManualTask(object): """Only execute task when specified...
28.677419
75
0.686164
from __future__ import unicode_literals, division, absolute_import from builtins import * import logging from flexget import plugin from flexget.event import event log = logging.getLogger('manual') class ManualTask(object): schema = {'type': 'boolean'} @plugin.priority(255) def on_task_start(self, t...
true
true
f70d40728ff8806bbebbbe861321157ef170315d
10,439
py
Python
McsPyDataTools/McsPy/__init__.py
multichannelsystems/McsPyDataTools
45777d5955043cc6849ea2f01ea442aa19141edd
[ "BSD-Source-Code" ]
5
2019-01-02T09:02:07.000Z
2022-02-11T16:49:38.000Z
McsPyDataTools/McsPy/__init__.py
multichannelsystems/McsPyDataTools
45777d5955043cc6849ea2f01ea442aa19141edd
[ "BSD-Source-Code" ]
5
2019-06-25T12:34:59.000Z
2022-02-11T16:22:09.000Z
McsPyDataTools/McsPy/__init__.py
multichannelsystems/McsPyDataTools
45777d5955043cc6849ea2f01ea442aa19141edd
[ "BSD-Source-Code" ]
8
2019-09-27T13:37:02.000Z
2022-03-25T07:37:25.000Z
""" McsPy ~~~~~ McsPy is a Python module/package to read, handle and operate on HDF5-based raw data files converted from recordings of devices of the Multi Channel Systems MCS GmbH. :copyright: (c) 2020 by Multi Channel Systems MCS GmbH :license: see LICENSE for more details """ #p...
81.554688
191
0.569499
version = "0.4.1" class McsHdf5Protocols: SUPPORTED_PROTOCOLS = {"RawData" : (1, 3), "CMOS_MEA" : (1, 1), "InfoChannel" : (1, 1), "FrameEntityInfo" : (1, 1), "EventEntityInfo" : (1, 1), ...
true
true
f70d416fe594dadc0ec26cac20e8f55de4d883c0
100
py
Python
tests/test_JMuten_divide.py
J-Muten/git-advance-example
709b4b472b5cb7c6948ed5c1c8a67509d6c24290
[ "MIT" ]
null
null
null
tests/test_JMuten_divide.py
J-Muten/git-advance-example
709b4b472b5cb7c6948ed5c1c8a67509d6c24290
[ "MIT" ]
15
2021-11-29T13:15:19.000Z
2021-12-16T11:39:02.000Z
tests/test_JMuten_divide.py
J-Muten/git-advance-example
709b4b472b5cb7c6948ed5c1c8a67509d6c24290
[ "MIT" ]
5
2021-12-15T10:41:18.000Z
2021-12-16T11:02:56.000Z
from pythoncalculator.JMuten_divide import divide def test_divide(): assert divide(10, 2) == 5
20
49
0.75
from pythoncalculator.JMuten_divide import divide def test_divide(): assert divide(10, 2) == 5
true
true
f70d422dfb553f650cf697ee06e3e1d081511d5f
6,961
py
Python
diffusion_tensors/surface_integration.py
noegroup/membrane_kinetics
ee2da9e076e402dc83e886aac129144d7c58a69f
[ "CC0-1.0" ]
6
2020-04-17T14:01:51.000Z
2021-02-27T20:21:46.000Z
diffusion_tensors/surface_integration.py
noegroup/membrane_kinetics
ee2da9e076e402dc83e886aac129144d7c58a69f
[ "CC0-1.0" ]
null
null
null
diffusion_tensors/surface_integration.py
noegroup/membrane_kinetics
ee2da9e076e402dc83e886aac129144d7c58a69f
[ "CC0-1.0" ]
1
2020-12-21T11:44:13.000Z
2020-12-21T11:44:13.000Z
import numpy as np def build_local_integration_grid_circle(n_quad_points, r_c): # Guass-Legendre quadrature on the unit disk (by KyoungJoong Kim and ManSuk Song) if n_quad_points == 1: w_1 = 3.141592653589793 x_1 = 0.0 quad_point_x = np.array([x_1]) * r_c quad_point_y = np.a...
34.29064
115
0.531964
import numpy as np def build_local_integration_grid_circle(n_quad_points, r_c): if n_quad_points == 1: w_1 = 3.141592653589793 x_1 = 0.0 quad_point_x = np.array([x_1]) * r_c quad_point_y = np.array([x_1]) * r_c quad_weight = np.array([w_1]) * r_c * r_c elif n_q...
true
true
f70d42b00c7306d9bff2eb667c883b602a0a45fd
7,049
py
Python
test/hardware/test_verify_flash.py
bridadan/mbed-flasher
39d27a41926b7a3c8e8c29690cae9bf48583eb1d
[ "Apache-2.0" ]
null
null
null
test/hardware/test_verify_flash.py
bridadan/mbed-flasher
39d27a41926b7a3c8e8c29690cae9bf48583eb1d
[ "Apache-2.0" ]
null
null
null
test/hardware/test_verify_flash.py
bridadan/mbed-flasher
39d27a41926b7a3c8e8c29690cae9bf48583eb1d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Copyright 2016 ARM Limited 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 i...
40.745665
90
0.577387
import logging import unittest import time import os from test.hardware.test_helper import Helper import serial import six import mbed_lstools from mbed_flasher.flash import Flash from mbed_flasher.reset import Reset from mbed_flasher.return_codes import EXIT_CODE_SUCCESS def verify_output_per_device(serial_port, ...
true
true
f70d438684e9d50f2385e91f29d4bd80458028c7
1,418
py
Python
shipyard/urls.py
monokrome/shipyard
3a37105466e4ac30b260a6b40a467e0412b4fc13
[ "Apache-2.0" ]
null
null
null
shipyard/urls.py
monokrome/shipyard
3a37105466e4ac30b260a6b40a467e0412b4fc13
[ "Apache-2.0" ]
1
2021-06-11T00:01:57.000Z
2021-06-11T00:01:57.000Z
shipyard/urls.py
monokrome/shipyard
3a37105466e4ac30b260a6b40a467e0412b4fc13
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Evan Hazlett and contributors. # # 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 agree...
37.315789
74
0.739774
from django.conf.urls import patterns, include, url from tastypie.api import Api from django.contrib import admin admin.autodiscover() from containers.api import ContainerResource from applications.api import ApplicationResource from hosts.api import HostResource v1_api = Api(api_name='v1') v1_api.register(ContainerR...
true
true
f70d4471aadbd6ab8e56a12dd899adf2422311ec
1,564
py
Python
setup.py
horstmannmat/deezer-python
d3da4edc6cfff86e28989582e6347219b6791b94
[ "MIT" ]
null
null
null
setup.py
horstmannmat/deezer-python
d3da4edc6cfff86e28989582e6347219b6791b94
[ "MIT" ]
null
null
null
setup.py
horstmannmat/deezer-python
d3da4edc6cfff86e28989582e6347219b6791b94
[ "MIT" ]
null
null
null
import os import codecs from setuptools import setup def read(*paths): """Build a file path from *paths* and return the contents.""" with codecs.open(os.path.join(*paths), 'r', 'utf-8') as f: return f.read() version = '0.6.1' setup( name='deezer-python', version=version, description='A...
30.076923
93
0.582481
import os import codecs from setuptools import setup def read(*paths): with codecs.open(os.path.join(*paths), 'r', 'utf-8') as f: return f.read() version = '0.6.1' setup( name='deezer-python', version=version, description='A friendly wrapper library for the Deezer API', long_descriptio...
true
true
f70d4583662a9d03a08a1f93b419eca34ba39ff9
7,087
py
Python
rpython/translator/c/test/test_database.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
333
2015-08-08T18:03:38.000Z
2022-03-22T18:13:12.000Z
rpython/translator/c/test/test_database.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
7
2020-02-16T16:49:05.000Z
2021-11-26T09:00:56.000Z
rpython/translator/c/test/test_database.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
55
2015-08-16T02:41:30.000Z
2022-03-20T20:33:35.000Z
import sys from rpython.rtyper.lltypesystem.lltype import * from rpython.translator.translator import TranslationContext from rpython.translator.c.database import LowLevelDatabase from rpython.flowspace.model import Constant, Variable, SpaceOperation from rpython.flowspace.model import Block, Link, FunctionGraph from r...
27.257692
76
0.583604
import sys from rpython.rtyper.lltypesystem.lltype import * from rpython.translator.translator import TranslationContext from rpython.translator.c.database import LowLevelDatabase from rpython.flowspace.model import Constant, Variable, SpaceOperation from rpython.flowspace.model import Block, Link, FunctionGraph from r...
false
true
f70d458e831601c031df9f0499f7e8f9b12a5e19
1,457
py
Python
silverstrike/views/twilio1.py
JinHash5/ExpenseIt
937282709f3a8533492dcc8799476cd026b1fc21
[ "MIT" ]
1
2019-03-04T19:46:11.000Z
2019-03-04T19:46:11.000Z
silverstrike/views/twilio1.py
JinHash5/ExpenseIt
937282709f3a8533492dcc8799476cd026b1fc21
[ "MIT" ]
null
null
null
silverstrike/views/twilio1.py
JinHash5/ExpenseIt
937282709f3a8533492dcc8799476cd026b1fc21
[ "MIT" ]
null
null
null
# from twilio.rest import Client # # Your Account SID from twilio.com/console # account_sid = "AC4100c72954a1f9949fc4700a8d0594bb" # # Your Auth Token from twilio.com/console # auth_token = "e1529115d0f1a57b6b8e6b17644f6087" # client = Client(account_sid, auth_token) # message = client.messages \ # .create( # ...
29.734694
61
0.618394
def call1(): from twilio.rest import Client account_sid = 'AC09c050b96951b1bbed41f71ab5f2f472' auth_token = '8630c09dff748daf78bcc1436ba2e34a' client = Client(account_sid, auth_token) message = client.messages \ .create( body="The user wants to conne...
true
true
f70d4620b8f2a44ab6dd50b2e69d19bca9734cff
12,474
py
Python
src/lib/charm/openstack/keystone_saml_mellon.py
auria/charm-keystone-saml-mellon
7f882e9438f975a51b01fa889b98345c7028dfef
[ "Apache-2.0" ]
null
null
null
src/lib/charm/openstack/keystone_saml_mellon.py
auria/charm-keystone-saml-mellon
7f882e9438f975a51b01fa889b98345c7028dfef
[ "Apache-2.0" ]
null
null
null
src/lib/charm/openstack/keystone_saml_mellon.py
auria/charm-keystone-saml-mellon
7f882e9438f975a51b01fa889b98345c7028dfef
[ "Apache-2.0" ]
null
null
null
# # Copyright 2017 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 writing,...
35.039326
74
0.623537
import charmhelpers.core as core import charmhelpers.core.host as ch_host import charmhelpers.core.hookenv as hookenv import charmhelpers.core.unitdata as unitdata import charmhelpers.contrib.openstack.templating as os_templating import charmhelpers.contrib.openstack.utils as os_utils import charms_openstack.charm i...
true
true
f70d476fa67d3b300947a5d13c5d7de5d2079e26
16,293
py
Python
ta/volume.py
cutebomb/ta
9e7243139c7f587a67709824fbb99290e299980d
[ "MIT" ]
1
2020-02-04T18:51:52.000Z
2020-02-04T18:51:52.000Z
ta/volume.py
rmmitsuo/ta
2d3d292c6513f8dc30b277bffa6246475a8d27b1
[ "MIT" ]
null
null
null
ta/volume.py
rmmitsuo/ta
2d3d292c6513f8dc30b277bffa6246475a8d27b1
[ "MIT" ]
1
2020-02-21T23:46:42.000Z
2020-02-21T23:46:42.000Z
""" .. module:: volume :synopsis: Volume Indicators. .. moduleauthor:: Dario Lopez Padial (Bukosabino) """ import numpy as np import pandas as pd from ta.utils import IndicatorMixin, ema class AccDistIndexIndicator(IndicatorMixin): """Accumulation/Distribution Index (ADI) Acting as leading indicator o...
33.387295
115
0.650893
import numpy as np import pandas as pd from ta.utils import IndicatorMixin, ema class AccDistIndexIndicator(IndicatorMixin): def __init__(self, high: pd.Series, low: pd.Series, close: pd.Series, volume: pd.Series, fillna: bool = False): self._high = high self._low = low self._close = cl...
true
true
f70d476fffe2f1980986ff05933775e669076c90
3,791
py
Python
app/store/models.py
aliharby12/Advanced-Django-eCommerce
5c29fbd92de9fbf1015371cad86697da89e40fa0
[ "MIT" ]
null
null
null
app/store/models.py
aliharby12/Advanced-Django-eCommerce
5c29fbd92de9fbf1015371cad86697da89e40fa0
[ "MIT" ]
5
2021-04-08T21:54:46.000Z
2022-02-10T11:56:36.000Z
app/store/models.py
aliharby12/Advanced-Django-eCommerce
5c29fbd92de9fbf1015371cad86697da89e40fa0
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Customer(models.Model): """create customer model based on the default user""" user = models.OneToOneField(User, on_delete=models.CASCADE) name...
32.127119
80
0.678977
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Customer(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) name = models.CharField(max_length=255, null=True) email =...
true
true
f70d4817085ff6148af4fe0e82812e44f7c24342
4,489
py
Python
tests/test_bitmex_trio_websocket.py
andersea/bitmex_trio_websocket
47ad382828368ab8891b3be3d9cb92f3248203fa
[ "MIT" ]
1
2020-04-08T23:49:06.000Z
2020-04-08T23:49:06.000Z
tests/test_bitmex_trio_websocket.py
andersea/bitmex_trio_websocket
47ad382828368ab8891b3be3d9cb92f3248203fa
[ "MIT" ]
5
2020-02-16T20:30:00.000Z
2021-11-08T20:42:32.000Z
tests/test_bitmex_trio_websocket.py
andersea/bitmex_trio_websocket
47ad382828368ab8891b3be3d9cb92f3248203fa
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `bitmex_trio_websocket` package.""" from bitmex_trio_websocket.exceptions import BitMEXWebsocketApiError import os from random import random import pytest from async_generator import aclosing import pendulum from trio_websocket import ConnectionRejected, Web...
43.163462
145
0.618846
from bitmex_trio_websocket.exceptions import BitMEXWebsocketApiError import os from random import random import pytest from async_generator import aclosing import pendulum from trio_websocket import ConnectionRejected, WebSocketConnection, ConnectionClosed from bitmex_trio_websocket import open_bitmex_websocket, Bit...
true
true
f70d49016206483cc360ec860091db714fdee31c
47,779
py
Python
plotwrf.py
ksopan/Plotting_WRF_NetCDF
cbff4ad4310447db2f31b402202f428cef968f14
[ "MIT" ]
1
2021-09-01T00:42:32.000Z
2021-09-01T00:42:32.000Z
plotwrf.py
ksopan/Plotting_WRF_NetCDF
cbff4ad4310447db2f31b402202f428cef968f14
[ "MIT" ]
null
null
null
plotwrf.py
ksopan/Plotting_WRF_NetCDF
cbff4ad4310447db2f31b402202f428cef968f14
[ "MIT" ]
1
2019-06-10T01:21:26.000Z
2019-06-10T01:21:26.000Z
""" Sopan Kurkute University of Saskatchewan plotwrf.py Python 2.x Python script to plot various WRF model output. Plots are saved as PNG. example usage: plotwrf.py --infile filename.nc --sfc --tunit C --ppn -punit mm --td Will plot surface chart and dewpoint in Celcius and precipitation in mm. Use plotwrf.py -...
45.590649
167
0.628037
""" Sopan Kurkute University of Saskatchewan plotwrf.py Python 2.x Python script to plot various WRF model output. Plots are saved as PNG. example usage: plotwrf.py --infile filename.nc --sfc --tunit C --ppn -punit mm --td Will plot surface chart and dewpoint in Celcius and precipitation in mm. Use plotwrf.py -...
false
true
f70d4945de582b0d34eaad72ec0bb535b4999319
21,546
py
Python
doubly_stochastic_dgp/layers.py
kekeblom/Doubly-Stochastic-DGP
64e40a8c22514c9b7917f0c6b79ca11b2bd67ea3
[ "Apache-2.0" ]
null
null
null
doubly_stochastic_dgp/layers.py
kekeblom/Doubly-Stochastic-DGP
64e40a8c22514c9b7917f0c6b79ca11b2bd67ea3
[ "Apache-2.0" ]
null
null
null
doubly_stochastic_dgp/layers.py
kekeblom/Doubly-Stochastic-DGP
64e40a8c22514c9b7917f0c6b79ca11b2bd67ea3
[ "Apache-2.0" ]
3
2018-11-02T07:39:11.000Z
2019-04-18T16:39:11.000Z
# Copyright 2017 Hugh Salimbeni # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
40.424015
121
0.614267
import tensorflow as tf import numpy as np import gpflow from gpflow.params import Parameter, Parameterized from gpflow.conditionals import conditional, Kuu from gpflow.features import InducingPoints from gpflow.kullback_leiblers import gauss_kl from gpflow.priors import Gaussian as Gaussian_prior from gpflow import ...
true
true
f70d497415efea3d291f07eb3eeb037276d7fdc8
1,292
py
Python
modules/insult.py
intellivoid/Friendly-Telegram-Lydia
c252d723f8913a14c4c382171e82d727988a4cbe
[ "WTFPL" ]
null
null
null
modules/insult.py
intellivoid/Friendly-Telegram-Lydia
c252d723f8913a14c4c382171e82d727988a4cbe
[ "WTFPL" ]
null
null
null
modules/insult.py
intellivoid/Friendly-Telegram-Lydia
c252d723f8913a14c4c382171e82d727988a4cbe
[ "WTFPL" ]
null
null
null
from .. import loader import logging, random logger = logging.getLogger(__name__) def register(cb): cb(InsultMod()) class InsultMod(loader.Module): """Shouts at people""" def __init__(self): self.commands = {'insult':self.insultcmd} self.config = {} self.name = "Insulter" as...
39.151515
157
0.612229
from .. import loader import logging, random logger = logging.getLogger(__name__) def register(cb): cb(InsultMod()) class InsultMod(loader.Module): def __init__(self): self.commands = {'insult':self.insultcmd} self.config = {} self.name = "Insulter" async def insultcmd(self, mes...
true
true
f70d4b052c0344a9f683cf607ce15c7d287a513d
115
py
Python
equity_db/api/__init__.py
Alexd14/equity-db
d41dceae048443c938c5c681e08224d31ae5b847
[ "MIT" ]
null
null
null
equity_db/api/__init__.py
Alexd14/equity-db
d41dceae048443c938c5c681e08224d31ae5b847
[ "MIT" ]
null
null
null
equity_db/api/__init__.py
Alexd14/equity-db
d41dceae048443c938c5c681e08224d31ae5b847
[ "MIT" ]
1
2021-08-20T14:32:59.000Z
2021-08-20T14:32:59.000Z
from . import mongo_status from . import mongo_connection __all__ = [ 'mongo_status', 'mongo_connection' ]
16.428571
30
0.721739
from . import mongo_status from . import mongo_connection __all__ = [ 'mongo_status', 'mongo_connection' ]
true
true
f70d4bfe14837e926588c046ebcf71a412d2209a
1,875
pyw
Python
sccwatcher.pyw
TheRealBanana/SCCwatcher-GUI
4f697fd66b1caf7903c7692aa08e6e4c3246e2d2
[ "MIT" ]
3
2015-11-25T07:54:35.000Z
2016-07-17T11:08:27.000Z
sccwatcher.pyw
TheRealBanana/SCCwatcher-GUI
4f697fd66b1caf7903c7692aa08e6e4c3246e2d2
[ "MIT" ]
null
null
null
sccwatcher.pyw
TheRealBanana/SCCwatcher-GUI
4f697fd66b1caf7903c7692aa08e6e4c3246e2d2
[ "MIT" ]
null
null
null
#!/bin/env python2.7 ## SCCwatcher 2.0 ## ## ## ## sccwatcher.py ## ## ## ## Everything starts here ## ############################ import sys import re from settings_ui import * from PyQt4 import QtGui, QtCore #This is required to override the closeEvent...
32.894737
117
0.6064
import sys import re from settings_ui import * from PyQt4 import QtGui, QtCore class SCCMainWindow(QtGui.QMainWindow): def __init__(self, parent=None): super(SCCMainWindow, self).__init__(parent) self._user_accept_close = False self.setAcceptDrops(True) self.ui = None def clos...
true
true
f70d4c24e1b3af77406b5f675ce8dee99ff5a8eb
162
py
Python
protocoin/exceptions.py
hno/protocoin
bd0a5290d8d4c8d260ccb3737b1fe50f17ae272d
[ "BSD-4-Clause" ]
3
2015-11-17T14:57:05.000Z
2021-09-15T13:45:57.000Z
protocoin/exceptions.py
snare/protocoin
393575638d3dd4dca1b8821c4ac93b26c1691ce6
[ "BSD-4-Clause" ]
null
null
null
protocoin/exceptions.py
snare/protocoin
393575638d3dd4dca1b8821c4ac93b26c1691ce6
[ "BSD-4-Clause" ]
2
2015-11-17T14:57:11.000Z
2018-12-15T09:35:03.000Z
class NodeDisconnectException(Exception): """This exception is thrown when Protocoin detects a disconnection from the node it is connected.""" pass
23.142857
56
0.740741
class NodeDisconnectException(Exception): pass
true
true
f70d4d1f8c2e1272bc06c185720a4f0ef0fbcdad
1,490
py
Python
code/cyclical_figurate_numbers/sol_61.py
bhavinjawade/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
2
2020-07-16T08:16:32.000Z
2020-10-01T07:16:48.000Z
code/cyclical_figurate_numbers/sol_61.py
Psingh12354/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
null
null
null
code/cyclical_figurate_numbers/sol_61.py
Psingh12354/project-euler-solutions
56bf6a282730ed4b9b875fa081cf4509d9939d98
[ "Apache-2.0" ]
1
2021-05-07T18:06:08.000Z
2021-05-07T18:06:08.000Z
# -*- coding: utf-8 -*- ''' File name: code\cyclical_figurate_numbers\sol_61.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #61 :: Cyclical figurate numbers # # For more information see: # https://projecteuler.net/problem=61 # Problem S...
24.833333
214
0.695973
true
true
f70d4e070866cf2f8a1bfa7411b6f8693c6a139c
30,378
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/link_5d122e850068d22407103423c33741c8.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/link_5d122e850068d22407103423c33741c8.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/link_5d122e850068d22407103423c33741c8.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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, ...
61.369697
580
0.693726
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class Link(Base): __slots__ = () _SDM_NAME = 'link' _SDM_ATT_MAP = { 'ActorKey': 'actorKey', 'ActorPortNumber': 'actorPortNumber', 'ActorPortPriority': 'actorPortPriority', 'ActorSy...
true
true
f70d4e5f96f4be06cea52e9819f271db1d9f42af
1,683
py
Python
alchemyMapping_TopicModeling.py
renhaocui/ensembleTopic
dd33bcce4d0f81e3f3412c4ce9e92268ea77a0c6
[ "MIT" ]
1
2018-08-28T15:28:54.000Z
2018-08-28T15:28:54.000Z
alchemyMapping_TopicModeling.py
renhaocui/ensembleTopic
dd33bcce4d0f81e3f3412c4ce9e92268ea77a0c6
[ "MIT" ]
null
null
null
alchemyMapping_TopicModeling.py
renhaocui/ensembleTopic
dd33bcce4d0f81e3f3412c4ce9e92268ea77a0c6
[ "MIT" ]
null
null
null
__author__ = 'renhao.cui' import utilities from sklearn import cross_validation import combinedMapping as cm import modelUtility def alchemyTrainInfer(alchemy_train, alchemy_test, label_train, label_test, trainProbFlag): # model from A to B: model[A] = {B: score} (model, cand, candProb) = cm.mappingTrainer4(al...
37.4
154
0.69281
__author__ = 'renhao.cui' import utilities from sklearn import cross_validation import combinedMapping as cm import modelUtility def alchemyTrainInfer(alchemy_train, alchemy_test, label_train, label_test, trainProbFlag): (model, cand, candProb) = cm.mappingTrainer4(alchemy_train, label_train) predictions ...
false
true
f70d4ee874cab6863e0cf4aa22528446f9fbf63d
9,230
py
Python
tests/providers/aws/aws_dynamodb_test.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
3
2018-04-28T13:06:14.000Z
2020-06-09T02:39:44.000Z
tests/providers/aws/aws_dynamodb_test.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
1
2021-09-09T07:43:25.000Z
2021-09-09T10:47:56.000Z
tests/providers/aws/aws_dynamodb_test.py
Nowasky/PerfKitBenchmarker
cfa88e269eb373780910896ed4bdc8db09469753
[ "Apache-2.0" ]
6
2019-06-11T18:59:57.000Z
2021-03-02T19:14:42.000Z
"""Tests for perfkitbenchmarker.providers.aws.aws_dynamodb.""" import json import unittest from absl import flags from absl.testing import flagsaver from absl.testing import parameterized import mock from perfkitbenchmarker import errors from perfkitbenchmarker.providers.aws import aws_dynamodb from perfkitbenchmarke...
32.614841
86
0.689382
import json import unittest from absl import flags from absl.testing import flagsaver from absl.testing import parameterized import mock from perfkitbenchmarker import errors from perfkitbenchmarker.providers.aws import aws_dynamodb from perfkitbenchmarker.providers.aws import util from tests import pkb_common_test_c...
true
true
f70d50aff36efe6026325cd276be0cfef8204e3b
3,939
py
Python
huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/model/__init__.py
Adek06/huaweicloud-sdk-python-v3
3d13b27d089e04a1ae567cd649b3c5509e0391d2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/model/__init__.py
Adek06/huaweicloud-sdk-python-v3
3d13b27d089e04a1ae567cd649b3c5509e0391d2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/model/__init__.py
Adek06/huaweicloud-sdk-python-v3
3d13b27d089e04a1ae567cd649b3c5509e0391d2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import # import models into model package from huaweicloudsdkcloudpipeline.v2.model.batch_show_pipelines_status_request import BatchShowPipelinesStatusRequest from huaweicloudsdkcloudpipeline.v2.model.batch_show_pipelines_status_response import BatchShowPipelinesStatusR...
82.0625
118
0.920538
from __future__ import absolute_import from huaweicloudsdkcloudpipeline.v2.model.batch_show_pipelines_status_request import BatchShowPipelinesStatusRequest from huaweicloudsdkcloudpipeline.v2.model.batch_show_pipelines_status_response import BatchShowPipelinesStatusResponse from huaweicloudsdkcloudpipeline.v2.model.c...
true
true
f70d50e40ed4a8af315076b474db3d7bd8940ba3
1,391
py
Python
datasciencebox/tests/salt/utils.py
danielfrg/datasciencebox
6b7aa642c6616a46547035fcb815acc1de605a6f
[ "Apache-2.0" ]
26
2015-01-20T22:49:05.000Z
2019-04-24T22:57:22.000Z
datasciencebox/tests/salt/utils.py
danielfrg/datasciencebox
6b7aa642c6616a46547035fcb815acc1de605a6f
[ "Apache-2.0" ]
1
2015-04-16T23:40:39.000Z
2015-08-12T23:48:00.000Z
datasciencebox/tests/salt/utils.py
danielfrg/datasciencebox
6b7aa642c6616a46547035fcb815acc1de605a6f
[ "Apache-2.0" ]
7
2015-04-20T04:07:05.000Z
2019-11-02T16:41:48.000Z
import pytest import os import sys import json from click.testing import CliRunner from ...cli.main import cli from ...core.project import Project remotetest = pytest.mark.skipif('TEST_DSBFILE' not in os.environ, reason="Environment variable 'TEST_DSBFILE' is required") def get_te...
27.27451
90
0.6578
import pytest import os import sys import json from click.testing import CliRunner from ...cli.main import cli from ...core.project import Project remotetest = pytest.mark.skipif('TEST_DSBFILE' not in os.environ, reason="Environment variable 'TEST_DSBFILE' is required") def get_te...
true
true
f70d515c859ba9963bb3f08e663ef395c41d6fe3
692
py
Python
tests/module/input_module_tests/test_ir.py
drecali/pymodi
8edf7269104efca48f65e5a118edc9fd136d6217
[ "MIT" ]
1
2020-08-20T01:54:35.000Z
2020-08-20T01:54:35.000Z
tests/module/input_module_tests/test_ir.py
drecali/pymodi
8edf7269104efca48f65e5a118edc9fd136d6217
[ "MIT" ]
33
2020-07-30T02:23:10.000Z
2020-08-05T01:58:53.000Z
tests/module/input_module_tests/test_ir.py
drecali/pymodi
8edf7269104efca48f65e5a118edc9fd136d6217
[ "MIT" ]
null
null
null
import unittest from queue import Queue from modi.module.input_module.ir import Ir class TestIr(unittest.TestCase): """Tests for 'Ir' package.""" def setUp(self): """Set up test fixtures, if any.""" self.send_q = Queue() mock_args = (-1, -1, self.send_q) self.ir = Ir(*mock_ar...
23.066667
63
0.598266
import unittest from queue import Queue from modi.module.input_module.ir import Ir class TestIr(unittest.TestCase): def setUp(self): self.send_q = Queue() mock_args = (-1, -1, self.send_q) self.ir = Ir(*mock_args) def tearDown(self): del self.ir def test_get_proximity(s...
true
true
f70d51c75fafe2d44ae4cda48272609de7788399
10,599
py
Python
src/django_keycloak/services/oidc_profile.py
jartieda/django-keycloak
93d6a985c8b8b0d53d1388d19edd7f0cb3c183f7
[ "MIT" ]
null
null
null
src/django_keycloak/services/oidc_profile.py
jartieda/django-keycloak
93d6a985c8b8b0d53d1388d19edd7f0cb3c183f7
[ "MIT" ]
null
null
null
src/django_keycloak/services/oidc_profile.py
jartieda/django-keycloak
93d6a985c8b8b0d53d1388d19edd7f0cb3c183f7
[ "MIT" ]
null
null
null
from datetime import timedelta import logging from django.apps import apps as django_apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.contrib.auth import get_user_model from django.db import transaction from django.utils import timezone from django.utils.module...
32.118182
98
0.694971
from datetime import timedelta import logging from django.apps import apps as django_apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.contrib.auth import get_user_model from django.db import transaction from django.utils import timezone from django.utils.module...
true
true
f70d52cba01d60566ed0f31101ea89b8ee7c500b
1,855
py
Python
azure-servicefabric/azure/servicefabric/models/restart_node_description_py3.py
AlexanderYukhanov/azure-sdk-for-python
41e37c8a10876db40697a63e828ed7cafc19c7d6
[ "MIT" ]
1
2018-07-23T08:59:24.000Z
2018-07-23T08:59:24.000Z
azure-servicefabric/azure/servicefabric/models/restart_node_description_py3.py
AlexanderYukhanov/azure-sdk-for-python
41e37c8a10876db40697a63e828ed7cafc19c7d6
[ "MIT" ]
null
null
null
azure-servicefabric/azure/servicefabric/models/restart_node_description_py3.py
AlexanderYukhanov/azure-sdk-for-python
41e37c8a10876db40697a63e828ed7cafc19c7d6
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
40.326087
99
0.650674
from msrest.serialization import Model class RestartNodeDescription(Model): _validation = { 'node_instance_id': {'required': True}, } _attribute_map = { 'node_instance_id': {'key': 'NodeInstanceId', 'type': 'str'}, 'create_fabric_dump': {'key': 'CreateFabricDump', 'type': 'str'}...
true
true
f70d5307eb5fbc5fc5d2f283d069be376809524b
108,211
py
Python
virtual/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py
vyonna6519/pitches
4fa0d56051f5f7761984fdedd61337a0a6195a17
[ "MIT" ]
null
null
null
virtual/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py
vyonna6519/pitches
4fa0d56051f5f7761984fdedd61337a0a6195a17
[ "MIT" ]
null
null
null
virtual/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py
vyonna6519/pitches
4fa0d56051f5f7761984fdedd61337a0a6195a17
[ "MIT" ]
null
null
null
# orm/strategies.py # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """sqlalchemy.orm.interfaces.LoaderStrategy implementations, and related Mappe...
34.440165
79
0.576411
from __future__ import absolute_import import collections import itertools from . import attributes from . import exc as orm_exc from . import interfaces from . import loading from . import path_registry from . import properties from . import query from . import relationships from . import unitofwork from . import u...
true
true
f70d5352668baeb2f53583297e6f357f74df3f30
4,706
py
Python
view/gui/main_function_widgets.py
galizia-lab/pyview
07bef637b0c60fae8830c1b3947e4a7bcd14bb2c
[ "BSD-3-Clause" ]
2
2021-11-07T10:17:16.000Z
2021-11-07T10:17:19.000Z
view/gui/main_function_widgets.py
galizia-lab/pyview
07bef637b0c60fae8830c1b3947e4a7bcd14bb2c
[ "BSD-3-Clause" ]
5
2021-11-03T12:43:03.000Z
2021-12-16T10:34:52.000Z
view/gui/main_function_widgets.py
galizia-lab/pyview
07bef637b0c60fae8830c1b3947e4a7bcd14bb2c
[ "BSD-3-Clause" ]
1
2021-09-23T15:46:26.000Z
2021-09-23T15:46:26.000Z
from PyQt5.QtCore import pyqtSignal, QObject, pyqtSlot from PyQt5.QtWidgets import QVBoxLayout, QHBoxLayout, QLineEdit, QLabel, QPushButton, QGroupBox, QSizePolicy, \ QFormLayout, QWidget, QCheckBox class MainFunctionAbstract(QGroupBox): send_data = pyqtSignal(str, dict) flag_update_signal = pyqtSignal(s...
33.140845
111
0.658096
from PyQt5.QtCore import pyqtSignal, QObject, pyqtSlot from PyQt5.QtWidgets import QVBoxLayout, QHBoxLayout, QLineEdit, QLabel, QPushButton, QGroupBox, QSizePolicy, \ QFormLayout, QWidget, QCheckBox class MainFunctionAbstract(QGroupBox): send_data = pyqtSignal(str, dict) flag_update_signal = pyqtSignal(s...
true
true
f70d53e5fd172f8ef4bba1cfaaf4ae15ac4ae349
5,370
py
Python
flicks/videos/migrations/0003_auto__add_field_video_upload_url__add_field_video_shortlink__add_field.py
Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695
bf6a382913901ad193d907f022086931df0de8c4
[ "BSD-3-Clause" ]
1
2015-07-13T03:29:04.000Z
2015-07-13T03:29:04.000Z
flicks/videos/migrations/0003_auto__add_field_video_upload_url__add_field_video_shortlink__add_field.py
Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695
bf6a382913901ad193d907f022086931df0de8c4
[ "BSD-3-Clause" ]
2
2015-03-03T23:02:19.000Z
2019-03-30T04:45:51.000Z
flicks/videos/migrations/0003_auto__add_field_video_upload_url__add_field_video_shortlink__add_field.py
Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695
bf6a382913901ad193d907f022086931df0de8c4
[ "BSD-3-Clause" ]
2
2016-04-15T11:43:05.000Z
2016-04-15T11:43:15.000Z
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Video.upload_url' db.add_column('videos_video', 'upload_url', self.gf(...
61.724138
182
0.564246
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column('videos_video', 'upload_url', self.gf('django.db.models.fields.URLField')(default='', max_length...
true
true
f70d5465893b8e86458c36c0af822087015052fe
4,730
py
Python
tests/parsers/test_parser.py
greschd/aiida-wannier90
747529e8c9fe2df3e65c806a9060a55eb4baa9a0
[ "MIT" ]
null
null
null
tests/parsers/test_parser.py
greschd/aiida-wannier90
747529e8c9fe2df3e65c806a9060a55eb4baa9a0
[ "MIT" ]
null
null
null
tests/parsers/test_parser.py
greschd/aiida-wannier90
747529e8c9fe2df3e65c806a9060a55eb4baa9a0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################################ # Copyright (c), AiiDA team and individual contributors. # # All rights reserved. # # This file is part of the AiiDA-wannier90 code. ...
38.145161
80
0.608245
import pytest from aiida import orm ENTRY_POINT_CALC_JOB = 'wannier90.wannier90' ENTRY_POINT_PARSER = 'wannier90.wannier90' @pytest.mark.parametrize("seedname", ("aiida", "wannier")) def test_wannier_default( fixture_localhost, generate_calc_job_node, generate_parser, generate_win_params_gaas, data_regressi...
true
true
f70d55163c7ff3001b0dcd6e15efac153f464099
3,401
py
Python
lenet.py
jinsoo9595/LeNet_5-pytorch
188cdeaf81bdd259f8a0d4686ffbaf5210ae5ce2
[ "MIT" ]
null
null
null
lenet.py
jinsoo9595/LeNet_5-pytorch
188cdeaf81bdd259f8a0d4686ffbaf5210ae5ce2
[ "MIT" ]
null
null
null
lenet.py
jinsoo9595/LeNet_5-pytorch
188cdeaf81bdd259f8a0d4686ffbaf5210ae5ce2
[ "MIT" ]
null
null
null
import torch.nn as nn from collections import OrderedDict class C1(nn.Module): def __init__(self): super(C1, self).__init__() self.c1 = nn.Sequential(OrderedDict([ ('c1', nn.Conv2d(1, 6, kernel_size=(5, 5))), ('relu1', nn.ReLU()), ('s2', nn.MaxPool2d...
24.467626
63
0.454572
import torch.nn as nn from collections import OrderedDict class C1(nn.Module): def __init__(self): super(C1, self).__init__() self.c1 = nn.Sequential(OrderedDict([ ('c1', nn.Conv2d(1, 6, kernel_size=(5, 5))), ('relu1', nn.ReLU()), ('s2', nn.MaxPool2d...
true
true
f70d554d70cccddfb624ba193b94685583fce95d
12,313
py
Python
btcde.py
HarryEuro/btcde
c645089199f2c5e0ffc4c11dc34fa825c3ff501c
[ "MIT" ]
null
null
null
btcde.py
HarryEuro/btcde
c645089199f2c5e0ffc4c11dc34fa825c3ff501c
[ "MIT" ]
null
null
null
btcde.py
HarryEuro/btcde
c645089199f2c5e0ffc4c11dc34fa825c3ff501c
[ "MIT" ]
null
null
null
#! /usr/bin/env python """API Wrapper for Bitcoin.de Trading API.""" import requests import time import json import hmac import hashlib import logging import codecs import decimal import inspect import urllib from future.standard_library import install_aliases install_aliases() from urllib.parse import urlencode lo...
38.598746
129
0.56753
import requests import time import json import hmac import hashlib import logging import codecs import decimal import inspect import urllib from future.standard_library import install_aliases install_aliases() from urllib.parse import urlencode logging.basicConfig() log = logging.getLogger(__name__) requests_log = ...
true
true
f70d55bd4db8793db37987cd494c66301226003d
1,023
py
Python
modeler/PLY_Manip.py
sahan1996/Dummy
1bbf30f1ab0239d49b2a3b26c597719a206d067b
[ "MIT" ]
null
null
null
modeler/PLY_Manip.py
sahan1996/Dummy
1bbf30f1ab0239d49b2a3b26c597719a206d067b
[ "MIT" ]
null
null
null
modeler/PLY_Manip.py
sahan1996/Dummy
1bbf30f1ab0239d49b2a3b26c597719a206d067b
[ "MIT" ]
null
null
null
ply_header = '''ply format ascii 1.0 element vertex %(vert_num)d property float x property float y property float z property uchar red property uchar green property uchar blue end_header ''' class PLY_Manip: def __init__(self, results_dir): self.dir = results_dir def insert_header(self, point_cl...
27.648649
80
0.608016
ply_header = '''ply format ascii 1.0 element vertex %(vert_num)d property float x property float y property float z property uchar red property uchar green property uchar blue end_header ''' class PLY_Manip: def __init__(self, results_dir): self.dir = results_dir def insert_header(self, point_cl...
true
true
f70d5638a21d8d8a7a7c39e0bb58ebc35f92aca5
7,336
py
Python
faker/providers/address/de_DE/__init__.py
StabbarN/faker
57882ff73255cb248d8f995b2abfce5cfee45ab3
[ "MIT" ]
4
2020-09-23T15:48:00.000Z
2021-02-25T07:55:23.000Z
faker/providers/address/de_DE/__init__.py
StabbarN/faker
57882ff73255cb248d8f995b2abfce5cfee45ab3
[ "MIT" ]
10
2020-03-24T10:47:53.000Z
2021-04-08T19:51:44.000Z
faker/providers/address/de_DE/__init__.py
StabbarN/faker
57882ff73255cb248d8f995b2abfce5cfee45ab3
[ "MIT" ]
3
2021-02-24T21:32:33.000Z
2022-03-04T14:36:48.000Z
from ..de import Provider as AddressProvider class Provider(AddressProvider): city_formats = ('{{city_name}}', ) city_with_postcode_formats = ('{{postcode}} {{city}}', ) street_name_formats = ( '{{first_name}}-{{last_name}}-{{street_suffix_long}}', '{{last_name}}{{street_suffix_short}}'...
56
79
0.614231
from ..de import Provider as AddressProvider class Provider(AddressProvider): city_formats = ('{{city_name}}', ) city_with_postcode_formats = ('{{postcode}} {{city}}', ) street_name_formats = ( '{{first_name}}-{{last_name}}-{{street_suffix_long}}', '{{last_name}}{{street_suffix_short}}'...
true
true
f70d57f711b1834c919c5aebf4291ffe951c3478
3,110
py
Python
cogs/kickban.py
oopsie1412/modbot9000
1a9e5b4d230706c4183fde1dec6d74ccc1e91898
[ "Apache-2.0" ]
null
null
null
cogs/kickban.py
oopsie1412/modbot9000
1a9e5b4d230706c4183fde1dec6d74ccc1e91898
[ "Apache-2.0" ]
1
2022-02-25T05:53:07.000Z
2022-02-25T19:22:53.000Z
cogs/kickban.py
oopsie1412/modbot9000
1a9e5b4d230706c4183fde1dec6d74ccc1e91898
[ "Apache-2.0" ]
null
null
null
import discord from discord.ext import commands from discord.ext.commands import has_permissions, MissingPermissions import datetime import json class Kickban(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() @commands.has_permissions(kick_members=True) async def kick(...
36.162791
140
0.589389
import discord from discord.ext import commands from discord.ext.commands import has_permissions, MissingPermissions import datetime import json class Kickban(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() @commands.has_permissions(kick_members=True) async def kick(...
true
true
f70d58a149f5983649fcbb34642ab6e0453a75ed
1,017
py
Python
tutorial-reference/Day 10/download_from_url.py
LilianaArguello/30-Days-of-Python
587feb0a2290043e312215d7971871a6c45b5ab5
[ "MIT" ]
2,044
2016-03-11T02:56:41.000Z
2022-03-29T16:34:58.000Z
tutorial-reference/Day 10/download_from_url.py
Tems-py/30-Days-of-Python
08316996be7c55efd56036209907568a238c26fc
[ "MIT" ]
28
2016-12-26T10:51:08.000Z
2021-12-13T20:49:47.000Z
tutorial-reference/Day 10/download_from_url.py
Tems-py/30-Days-of-Python
08316996be7c55efd56036209907568a238c26fc
[ "MIT" ]
1,448
2016-03-12T04:44:06.000Z
2022-03-28T11:43:45.000Z
import os import requests import shutil from download_util import download_file THIS_FILE_PATH = os.path.abspath(__file__) BASE_DIR = os.path.dirname(THIS_FILE_PATH) DOWNLOADS_DIR = os.path.join(BASE_DIR, "downloads") os.makedirs(DOWNLOADS_DIR, exist_ok=True) downloaded_img_path = os.path.join(DOWNLOADS_DIR, '1.jpg') ...
37.666667
279
0.79351
import os import requests import shutil from download_util import download_file THIS_FILE_PATH = os.path.abspath(__file__) BASE_DIR = os.path.dirname(THIS_FILE_PATH) DOWNLOADS_DIR = os.path.join(BASE_DIR, "downloads") os.makedirs(DOWNLOADS_DIR, exist_ok=True) downloaded_img_path = os.path.join(DOWNLOADS_DIR, '1.jpg') ...
true
true
f70d594ef748a897d3eb56ea4ecdaf63b00ab7bf
32,449
py
Python
donkeycar/templates/complete.py
naisy/donkeycar
11f7598d51c1c085db2a76943c86132bf1eb9e30
[ "MIT" ]
2
2021-09-04T07:40:25.000Z
2021-09-07T21:24:47.000Z
donkeycar/templates/complete.py
naisy/donkeycar
11f7598d51c1c085db2a76943c86132bf1eb9e30
[ "MIT" ]
null
null
null
donkeycar/templates/complete.py
naisy/donkeycar
11f7598d51c1c085db2a76943c86132bf1eb9e30
[ "MIT" ]
1
2021-06-07T10:51:46.000Z
2021-06-07T10:51:46.000Z
#!/usr/bin/env python3 """ Scripts to drive a donkey 2 car Usage: manage.py (drive) [--model=<model>] [--js] [--type=(linear|categorical)] [--camera=(single|stereo)] [--meta=<key:value> ...] [--myconfig=<filename>] manage.py (train) [--tubs=tubs] (--model=<model>) [--type=(linear|inferred|tensorrt_linear|tflit...
43.555705
317
0.627939
import os import time import logging from docopt import docopt import donkeycar as dk from donkeycar.parts.transform import TriggeredCallback, DelayedTrigger from donkeycar.parts.tub_v2 import TubWriter from donkeycar.parts.datastore import TubHandler from donkeycar.parts.controller import LocalWebController, WebFpv,...
true
true
f70d5982e09f644e25cc8e05803bc73d086132f2
421
py
Python
AtCoder/ABC122/C.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
1
2018-11-25T04:15:45.000Z
2018-11-25T04:15:45.000Z
AtCoder/ABC122/C.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
null
null
null
AtCoder/ABC122/C.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
2
2018-08-08T13:01:14.000Z
2018-11-25T12:38:36.000Z
N, Q = map(int, input().split()) S = input() items = [] for i in range(Q): items.append(tuple(map(int, input().split()))) from itertools import accumulate prev = "" acc = [0] * N for i, s in enumerate(S): if s == "C" and prev == "A": acc[i] = 1 prev = s acc = list(accumulate(acc)) ans = [] for i ...
17.541667
50
0.539192
N, Q = map(int, input().split()) S = input() items = [] for i in range(Q): items.append(tuple(map(int, input().split()))) from itertools import accumulate prev = "" acc = [0] * N for i, s in enumerate(S): if s == "C" and prev == "A": acc[i] = 1 prev = s acc = list(accumulate(acc)) ans = [] for i ...
true
true
f70d5a15ee6a6ef3f5d2aaaf9d29881f5df7fc8f
471
py
Python
env/lib/python3.8/site-packages/plotly/validators/cone/colorbar/title/font/_color.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/cone/colorbar/title/font/_color.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/cone/colorbar/title/font/_color.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="cone.colorbar.title.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name...
31.4
83
0.639066
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="color", parent_name="cone.colorbar.title.font", **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name...
true
true
f70d5cf632b84fe1fb12f43ed5ccf29e943dbad5
1,554
py
Python
billy/db/tables/company.py
balanced/billy
a723c3aca18f817829ae088f469fabc5bea9d538
[ "MIT" ]
51
2015-01-01T00:34:39.000Z
2021-12-20T16:51:49.000Z
billy/db/tables/company.py
balanced/billy
a723c3aca18f817829ae088f469fabc5bea9d538
[ "MIT" ]
6
2015-01-13T15:09:19.000Z
2015-12-29T15:59:55.000Z
billy/db/tables/company.py
balanced/billy
a723c3aca18f817829ae088f469fabc5bea9d538
[ "MIT" ]
31
2015-03-13T21:50:16.000Z
2022-03-09T23:18:43.000Z
from __future__ import unicode_literals from sqlalchemy import Column from sqlalchemy import Unicode from sqlalchemy import Boolean from sqlalchemy.orm import relationship from .base import DeclarativeBase from .base import UTCDateTime from .base import now_func class Company(DeclarativeBase): """A Company is b...
34.533333
80
0.702059
from __future__ import unicode_literals from sqlalchemy import Column from sqlalchemy import Unicode from sqlalchemy import Boolean from sqlalchemy.orm import relationship from .base import DeclarativeBase from .base import UTCDateTime from .base import now_func class Company(DeclarativeBase): __tablename__ = '...
true
true
f70d5e21d18a44173d82305f93f4afcffbcbe0bb
3,272
py
Python
build.py
krzem5/C-Hilbert_Curve_Fft_Compression
928b5fcfc80c56006f3faecf32a99197b899cecb
[ "BSD-3-Clause" ]
null
null
null
build.py
krzem5/C-Hilbert_Curve_Fft_Compression
928b5fcfc80c56006f3faecf32a99197b899cecb
[ "BSD-3-Clause" ]
null
null
null
build.py
krzem5/C-Hilbert_Curve_Fft_Compression
928b5fcfc80c56006f3faecf32a99197b899cecb
[ "BSD-3-Clause" ]
null
null
null
import subprocess import sys import os DEFAULT_ARGS=[] if (os.path.exists("build")): dl=[] for r,ndl,fl in os.walk("build"): r=r.replace("\\","/").strip("/")+"/" for d in ndl: dl.insert(0,r+d) for f in fl: os.remove(r+f) for k in dl: os.rmdir(k) else: os.mkdir("build") if (os.name=="nt"): cd=os...
52.774194
847
0.598411
import subprocess import sys import os DEFAULT_ARGS=[] if (os.path.exists("build")): dl=[] for r,ndl,fl in os.walk("build"): r=r.replace("\\","/").strip("/")+"/" for d in ndl: dl.insert(0,r+d) for f in fl: os.remove(r+f) for k in dl: os.rmdir(k) else: os.mkdir("build") if (os.name=="nt"): cd=os...
true
true
f70d5f20f0afb3470e2a8cd8a144fdd45322e0bc
93
py
Python
Dashboard/lostfound/apps.py
Gowtham1729/GNius
0bdfaddd882837b43485e424e44fa5f353f227bd
[ "MIT" ]
3
2017-08-31T15:24:50.000Z
2020-03-24T13:22:15.000Z
Dashboard/lostfound/apps.py
coding-iitgn/GNius
0bdfaddd882837b43485e424e44fa5f353f227bd
[ "MIT" ]
1
2020-11-04T03:22:47.000Z
2020-11-04T03:22:47.000Z
Dashboard/lostfound/apps.py
coding-iitgn/GNius
0bdfaddd882837b43485e424e44fa5f353f227bd
[ "MIT" ]
1
2018-10-03T14:53:55.000Z
2018-10-03T14:53:55.000Z
from django.apps import AppConfig class LostfoundConfig(AppConfig): name = 'lostfound'
15.5
33
0.763441
from django.apps import AppConfig class LostfoundConfig(AppConfig): name = 'lostfound'
true
true
f70d60662439886295b7b75b015a659fe8d175c7
10,830
py
Python
src/rnn.py
yongyuwen/mbti_rnn
3f67cd90d76ab82d65afc3c155728e3d349a1107
[ "MIT" ]
null
null
null
src/rnn.py
yongyuwen/mbti_rnn
3f67cd90d76ab82d65afc3c155728e3d349a1107
[ "MIT" ]
null
null
null
src/rnn.py
yongyuwen/mbti_rnn
3f67cd90d76ab82d65afc3c155728e3d349a1107
[ "MIT" ]
null
null
null
"""rnn.py ~~~~~~~~~~~~~~ Written by Yong Yu Wen, 2018 (Built using tensorflow-gpu 1.6.0) A TensorFlow-based many-to-one recurrent neural network specifically for the classification of MBTI types based on social media posts. Raw un-processed dataset used for this task can be found at https://www.kaggle.com/da...
46.282051
128
0.600092
import tensorflow as tf import time import pickle class RNN(object): def __init__(self, cell_type, state_size, num_steps, num_layers, num_classes, embedding=None, build_with_dropout=False): self.x = tf.placeholder(tf.int32, [None, num_steps], name='input_placeholder') s...
true
true
f70d6097f2cda216dadce709cb6f87a3a6a28f47
3,541
py
Python
test/functional/p2p_feefilter.py
BitcoinSN/BitcoinSN
a977e12af777d46a3efa0f988bc555900a366bac
[ "MIT" ]
1
2020-04-18T11:01:16.000Z
2020-04-18T11:01:16.000Z
test/functional/p2p_feefilter.py
BitcoinSN/BitcoinSN
a977e12af777d46a3efa0f988bc555900a366bac
[ "MIT" ]
null
null
null
test/functional/p2p_feefilter.py
BitcoinSN/BitcoinSN
a977e12af777d46a3efa0f988bc555900a366bac
[ "MIT" ]
1
2020-04-18T11:01:07.000Z
2020-04-18T11:01:07.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of feefilter messages.""" from decimal import Decimal import time from test_framework...
38.075269
81
0.669867
from decimal import Decimal import time from test_framework.messages import msg_feefilter from test_framework.mininode import mininode_lock, P2PInterface from test_framework.test_framework import BitcoinSNTestFramework from test_framework.util import sync_blocks, sync_mempools def hashToHex(hash): return format(...
true
true
f70d61a28e5fbee81a8995ac218978433126711f
4,624
py
Python
zconnect/_messages/sender.py
zconnect-iot/zconnect-django
5c569f54f100e23d72e2ac4de795739ea461a431
[ "MIT" ]
2
2018-08-19T16:16:39.000Z
2019-06-11T02:23:50.000Z
zconnect/_messages/sender.py
zconnect-iot/zconnect-django
5c569f54f100e23d72e2ac4de795739ea461a431
[ "MIT" ]
2
2018-07-05T09:51:54.000Z
2018-07-06T13:12:04.000Z
zconnect/_messages/sender.py
zconnect-iot/zconnect-django
5c569f54f100e23d72e2ac4de795739ea461a431
[ "MIT" ]
null
null
null
import logging from django.apps import apps from django.conf import settings from zconnect import zsettings from zconnect.util.general import load_from_module logger = logging.getLogger(__name__) class Sender: """Abstract interface for sending messages to devices This will pass a generic Message to the s...
31.671233
105
0.65917
import logging from django.apps import apps from django.conf import settings from zconnect import zsettings from zconnect.util.general import load_from_module logger = logging.getLogger(__name__) class Sender: def __init__(self): sender_settings = dict(zsettings.SENDER_SETTINGS) cls_name = se...
true
true
f70d61a9d1b932d0d6a5edb9e2395bd6bb371243
2,392
py
Python
tests/h/services/list_organizations_test.py
kevinjalbert/h
0f260bf59847f27eff720eeb3c3b2468571412b2
[ "BSD-2-Clause" ]
1
2020-06-19T01:49:39.000Z
2020-06-19T01:49:39.000Z
tests/h/services/list_organizations_test.py
kevinjalbert/h
0f260bf59847f27eff720eeb3c3b2468571412b2
[ "BSD-2-Clause" ]
5
2019-10-31T14:23:18.000Z
2019-11-15T19:24:27.000Z
tests/h/services/list_organizations_test.py
liquidinvestigations/hypothesis-h
2eebc0b20823fc5bc42a8e8c33551a6d448ad6ba
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from h.models import Organization from h.services.list_organizations import ( ListOrganizationsService, list_organizations_factory, ) from h.services.organization import organization_factory class TestListOrganizations: def test_returns_organizations_from_all_author...
27.181818
82
0.752508
import pytest from h.models import Organization from h.services.list_organizations import ( ListOrganizationsService, list_organizations_factory, ) from h.services.organization import organization_factory class TestListOrganizations: def test_returns_organizations_from_all_authorities_if_no_authority_sp...
true
true
f70d61caec9005fef784e444bab2ff873b466070
3,742
py
Python
dcnn/demo/demo2/simu.py
wzthu/NeuronMotif
0f7f786e4b75916039388824d04d2041747fd299
[ "MIT" ]
null
null
null
dcnn/demo/demo2/simu.py
wzthu/NeuronMotif
0f7f786e4b75916039388824d04d2041747fd299
[ "MIT" ]
null
null
null
dcnn/demo/demo2/simu.py
wzthu/NeuronMotif
0f7f786e4b75916039388824d04d2041747fd299
[ "MIT" ]
2
2021-09-13T06:59:36.000Z
2021-11-10T00:17:25.000Z
import h5py import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import keras import h5py import numpy as np from keras.layers import Input, Dense, Conv1D, MaxPooling2D, MaxPooling1D, BatchNormalization from keras.layers.core import Dropout, Activation, Flatten from keras.layers.merge import...
24.946667
93
0.698557
import h5py import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import keras import h5py import numpy as np from keras.layers import Input, Dense, Conv1D, MaxPooling2D, MaxPooling1D, BatchNormalization from keras.layers.core import Dropout, Activation, Flatten from keras.layers.merge import...
true
true
f70d624c7430f1ea59ab437321a72a7459d7dac8
6,644
py
Python
src/movements.py
pally2409/viral-diseases-simulator
488168a481c277d99d758d2a9851df6524a9a57b
[ "MIT" ]
1
2022-02-24T11:40:52.000Z
2022-02-24T11:40:52.000Z
src/movements.py
pally2409/viral-diseases-simulator
488168a481c277d99d758d2a9851df6524a9a57b
[ "MIT" ]
null
null
null
src/movements.py
pally2409/viral-diseases-simulator
488168a481c277d99d758d2a9851df6524a9a57b
[ "MIT" ]
null
null
null
''' Created on Nov 29, 2020 @author: manik ''' ''' File with classes and code which control how a particular person will move and to where ''' from src.population import Population import numpy as np import src.person_properties_util as idx class Movement(): """ Class providing abstraction into each movement o...
44.293333
132
0.50587
from src.population import Population import numpy as np import src.person_properties_util as idx class Movement(): def update_persons(self, persons: np.ndarray, size: int, speed: float = 0.1, heading_update_chance: float = 0.02) -> np.ndarray: update = np.random.random(size=(size,)) ...
true
true
f70d634e13095a3f8e640e17bab451820af4955f
6,125
py
Python
mapswipe_workers/mapswipe_workers/project_types/arbitrary_geometry/project.py
mapswipe/python-mapswipe-workers
16b0254c905eb44448080c451eb5d894c9d31cd9
[ "Apache-2.0" ]
16
2018-03-05T13:18:35.000Z
2022-02-16T17:19:00.000Z
mapswipe_workers/mapswipe_workers/project_types/arbitrary_geometry/project.py
mapswipe/python-mapswipe-workers
16b0254c905eb44448080c451eb5d894c9d31cd9
[ "Apache-2.0" ]
367
2018-02-14T22:54:39.000Z
2022-03-29T14:23:26.000Z
mapswipe_workers/mapswipe_workers/project_types/arbitrary_geometry/project.py
mapswipe/python-mapswipe-workers
16b0254c905eb44448080c451eb5d894c9d31cd9
[ "Apache-2.0" ]
8
2018-05-12T16:16:32.000Z
2022-02-16T17:14:54.000Z
import os import urllib.request from osgeo import ogr from mapswipe_workers.definitions import DATA_PATH, CustomError, logger from mapswipe_workers.project_types.arbitrary_geometry import grouping_functions as g from mapswipe_workers.project_types.arbitrary_geometry.group import Group from mapswipe_workers.project_ty...
37.808642
88
0.603102
import os import urllib.request from osgeo import ogr from mapswipe_workers.definitions import DATA_PATH, CustomError, logger from mapswipe_workers.project_types.arbitrary_geometry import grouping_functions as g from mapswipe_workers.project_types.arbitrary_geometry.group import Group from mapswipe_workers.project_ty...
true
true
f70d63e75c43b01a73b930f830ae88fad3d08fde
3,873
py
Python
sdk/python/pulumi_azure_nextgen/datalakeanalytics/latest/list_storage_account_sas_tokens.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/datalakeanalytics/latest/list_storage_account_sas_tokens.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/datalakeanalytics/latest/list_storage_account_sas_tokens.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
43.033333
224
0.700232
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'ListStorageAccountSasTokensResult', 'AwaitableListStorageAccountSasTokensResult', 'list_storage_account_sas_tokens', ] warn...
true
true
f70d6484886492af1dd41c14813beca79604e32a
1,228
py
Python
jdcloud_sdk/services/openjrtc/models/RoomUserInfosObj.py
jdcloud-apigateway/jdcloud-sdk-python
0886769bcf1fb92128a065ff0f4695be099571cc
[ "Apache-2.0" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
jdcloud_sdk/services/openjrtc/models/RoomUserInfosObj.py
jdcloud-apigateway/jdcloud-sdk-python
0886769bcf1fb92128a065ff0f4695be099571cc
[ "Apache-2.0" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
jdcloud_sdk/services/openjrtc/models/RoomUserInfosObj.py
jdcloud-apigateway/jdcloud-sdk-python
0886769bcf1fb92128a065ff0f4695be099571cc
[ "Apache-2.0" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
34.111111
106
0.706026
class RoomUserInfosObj(object): def __init__(self, pageNumber=None, pageSize=None, totalElements=None, totalPages=None, content=None): self.pageNumber = pageNumber self.pageSize = pageSize self.totalElements = totalElements self.totalPages = totalPages self.content = con...
true
true
f70d6488d7e7f95919861f3d5353ab4f1af39bc8
642
py
Python
backend/controller/starter/__init__.py
vertex-ai-now/crmint
dc6b66a0b24b98c295fe22c04dbd3d7119c1fd46
[ "Apache-2.0" ]
null
null
null
backend/controller/starter/__init__.py
vertex-ai-now/crmint
dc6b66a0b24b98c295fe22c04dbd3d7119c1fd46
[ "Apache-2.0" ]
null
null
null
backend/controller/starter/__init__.py
vertex-ai-now/crmint
dc6b66a0b24b98c295fe22c04dbd3d7119c1fd46
[ "Apache-2.0" ]
1
2022-02-15T04:24:17.000Z
2022-02-15T04:24:17.000Z
# Copyright 2020 Google Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
29.181818
74
0.744548
from . import views __all__ = ['views']
true
true
f70d64dcaac2e055b92609c647beb2f6b51a95cc
3,065
py
Python
iridauploader/core/logger.py
COMBAT-SARS-COV-2/irida-uploader
b9d04d187d6a5a9fdcaef5b27135965ffac99db0
[ "Apache-2.0" ]
7
2019-01-25T16:56:11.000Z
2021-01-12T15:32:08.000Z
iridauploader/core/logger.py
COMBAT-SARS-COV-2/irida-uploader
b9d04d187d6a5a9fdcaef5b27135965ffac99db0
[ "Apache-2.0" ]
80
2019-01-29T14:54:26.000Z
2022-03-25T18:51:51.000Z
iridauploader/core/logger.py
COMBAT-SARS-COV-2/irida-uploader
b9d04d187d6a5a9fdcaef5b27135965ffac99db0
[ "Apache-2.0" ]
9
2019-03-14T09:58:05.000Z
2022-01-06T20:14:45.000Z
from appdirs import user_log_dir import os import logging.handlers # Normal base logging directory name log_directory_name = "irida-uploader" # When running tests, the Makefile creates an environment variable IRIDA_UPLOADER_TEST to 'True' # If it exists then we are running a test and should be logging to the test log...
33.681319
114
0.752692
from appdirs import user_log_dir import os import logging.handlers log_directory_name = "irida-uploader" if os.environ.get('IRIDA_UPLOADER_TEST'): log_directory_name = "irida_uploader_test" log_file_path = os.path.join(user_log_dir(log_directory_name), 'irida-uploader.log') if not os.path.exists(user_log_dir(log...
true
true
f70d652b5b1ebe5d3d95b132ac5ceac429115796
86,219
py
Python
pandas/tests/test_multilevel.py
hunterowens/pandas
bb468f86d57f4eb0e65d75c3161d9e3209ea2c05
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/tests/test_multilevel.py
hunterowens/pandas
bb468f86d57f4eb0e65d75c3161d9e3209ea2c05
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/tests/test_multilevel.py
hunterowens/pandas
bb468f86d57f4eb0e65d75c3161d9e3209ea2c05
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # pylint: disable-msg=W0612,E1101,W0141 import datetime import itertools import nose from numpy.random import randn import numpy as np from pandas.core.index import Index, MultiIndex from pandas import Panel, DataFrame, Series, notnull, isnull, Timestamp from pandas.util.testing import (asser...
37.981938
141
0.532064
import datetime import itertools import nose from numpy.random import randn import numpy as np from pandas.core.index import Index, MultiIndex from pandas import Panel, DataFrame, Series, notnull, isnull, Timestamp from pandas.util.testing import (assert_almost_equal, assert_series_e...
true
true
f70d65da5940476ea2186529513a65a51cbb74ca
34,679
py
Python
airflow/jobs/backfill_job.py
ganeshsrirams/airflow
b8c02632136320b8379956411134246cd2f6eb47
[ "Apache-2.0" ]
1
2019-10-10T23:53:01.000Z
2019-10-10T23:53:01.000Z
airflow/jobs/backfill_job.py
ganeshsrirams/airflow
b8c02632136320b8379956411134246cd2f6eb47
[ "Apache-2.0" ]
2
2021-03-11T04:23:28.000Z
2021-09-29T17:44:44.000Z
airflow/jobs/backfill_job.py
ganeshsrirams/airflow
b8c02632136320b8379956411134246cd2f6eb47
[ "Apache-2.0" ]
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 #...
43.676322
109
0.556014
import time from collections import OrderedDict from datetime import datetime from sqlalchemy.orm.session import Session, make_transient from airflow import executors, models from airflow.exceptions import ( AirflowException, DagConcurrencyLimitReached, NoAvailablePoolSlot, PoolNotFound, TaskConcurrencyLimit...
true
true
f70d665365f9fbca0806503980819bca86b29897
1,169
py
Python
api/src/VoiceManagerApi.py
SamuelJansen/ai-voice-api
5752fb9b1287945c0b074687552b0fcb205ed27a
[ "MIT" ]
null
null
null
api/src/VoiceManagerApi.py
SamuelJansen/ai-voice-api
5752fb9b1287945c0b074687552b0fcb205ed27a
[ "MIT" ]
null
null
null
api/src/VoiceManagerApi.py
SamuelJansen/ai-voice-api
5752fb9b1287945c0b074687552b0fcb205ed27a
[ "MIT" ]
null
null
null
from flask import send_file from python_helper import Constant as c from python_helper import EnvironmentHelper, log from python_framework import ResourceManager, FlaskUtil, HttpStatus, LogConstant from queue_manager_api import QueueManager import ModelAssociation app = ResourceManager.initialize(__name__, ModelAss...
36.53125
146
0.725406
from flask import send_file from python_helper import Constant as c from python_helper import EnvironmentHelper, log from python_framework import ResourceManager, FlaskUtil, HttpStatus, LogConstant from queue_manager_api import QueueManager import ModelAssociation app = ResourceManager.initialize(__name__, ModelAss...
true
true
f70d6773e06829f0a7389306c1e7e457b931df0e
3,002
py
Python
tests/test_put_no_body.py
nstapelbroek/fastapi
5592fa0f6f6b9c9b3ae774d80adb8163fcdedfdf
[ "MIT" ]
1
2021-10-13T08:53:44.000Z
2021-10-13T08:53:44.000Z
tests/test_put_no_body.py
nstapelbroek/fastapi
5592fa0f6f6b9c9b3ae774d80adb8163fcdedfdf
[ "MIT" ]
1
2019-11-02T22:03:59.000Z
2019-11-02T22:03:59.000Z
tests/test_put_no_body.py
nstapelbroek/fastapi
5592fa0f6f6b9c9b3ae774d80adb8163fcdedfdf
[ "MIT" ]
1
2020-03-02T05:55:31.000Z
2020-03-02T05:55:31.000Z
from fastapi import FastAPI from starlette.testclient import TestClient app = FastAPI() @app.put("/items/{item_id}") def save_item_no_body(item_id: str): return {"item_id": item_id} client = TestClient(app) openapi_schema = { "openapi": "3.0.2", "info": {"title": "Fast API", "version": "0.1.0"}, ...
30.632653
86
0.391073
from fastapi import FastAPI from starlette.testclient import TestClient app = FastAPI() @app.put("/items/{item_id}") def save_item_no_body(item_id: str): return {"item_id": item_id} client = TestClient(app) openapi_schema = { "openapi": "3.0.2", "info": {"title": "Fast API", "version": "0.1.0"}, ...
true
true
f70d6880fd28bf2961ce5845ba990493e70e4ccd
5,743
py
Python
Scripts/ExternalServer/CustomThreads/ManageClientConnection.py
Sk3pper/AASSS-PoC
67630221f029df0f1fbc598ad3c791d0cd429544
[ "CC-BY-4.0" ]
null
null
null
Scripts/ExternalServer/CustomThreads/ManageClientConnection.py
Sk3pper/AASSS-PoC
67630221f029df0f1fbc598ad3c791d0cd429544
[ "CC-BY-4.0" ]
null
null
null
Scripts/ExternalServer/CustomThreads/ManageClientConnection.py
Sk3pper/AASSS-PoC
67630221f029df0f1fbc598ad3c791d0cd429544
[ "CC-BY-4.0" ]
null
null
null
import threading from Utils.Utils_function import logMsg from Sharing.Sharing import sharing1ES, sharing2ES from Reconstruction.Reconstruction import reconstructionES1, reconstructionES2 from groups import parametres par = parametres() PATH_DATA_USERS = par.PATH_DATA_USERS CHAR_DATA_SPLIT = par.CHAR_DATA_SPLIT CHAR_M...
37.782895
117
0.595159
import threading from Utils.Utils_function import logMsg from Sharing.Sharing import sharing1ES, sharing2ES from Reconstruction.Reconstruction import reconstructionES1, reconstructionES2 from groups import parametres par = parametres() PATH_DATA_USERS = par.PATH_DATA_USERS CHAR_DATA_SPLIT = par.CHAR_DATA_SPLIT CHAR_M...
false
true
f70d689091719b4832fea7b7f7d9424569e47bde
8,190
py
Python
plotly/graph_objs/heatmapgl/colorbar/_tickfont.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
1
2018-07-16T01:51:47.000Z
2018-07-16T01:51:47.000Z
plotly/graph_objs/heatmapgl/colorbar/_tickfont.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/graph_objs/heatmapgl/colorbar/_tickfont.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType import copy class Tickfont(BaseTraceHierarchyType): # color # ----- @property def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string ...
37.058824
79
0.568132
from plotly.basedatatypes import BaseTraceHierarchyType import copy class Tickfont(BaseTraceHierarchyType): @property def color(self): return self['color'] @color.setter def color(self, val): self['color'] = val @property def family(self): return self...
true
true
f70d6933943a1b1b7340c86bb127b3d1e7904cc1
316
py
Python
inscricoes/urls.py
6135/dia-aberto-r2
4da884ae668a597e662f72ceab6b1ccdefd3b227
[ "MIT" ]
null
null
null
inscricoes/urls.py
6135/dia-aberto-r2
4da884ae668a597e662f72ceab6b1ccdefd3b227
[ "MIT" ]
3
2021-03-19T01:26:42.000Z
2021-06-04T22:45:41.000Z
inscricoes/urls.py
6135/dia-aberto-r2
4da884ae668a597e662f72ceab6b1ccdefd3b227
[ "MIT" ]
null
null
null
from django.urls import path from .views import CriarInscricaoIndividual, CriarInscricaoColetiva urlpatterns = [ path('criarinscricaoindividual', CriarInscricaoIndividual, name='criar-inscricao-individual'), path('criarinscricaocoletiva',CriarInscricaoColetiva, name='criar-inscricao-coletiva'), ]
35.111111
91
0.791139
from django.urls import path from .views import CriarInscricaoIndividual, CriarInscricaoColetiva urlpatterns = [ path('criarinscricaoindividual', CriarInscricaoIndividual, name='criar-inscricao-individual'), path('criarinscricaocoletiva',CriarInscricaoColetiva, name='criar-inscricao-coletiva'), ]
true
true
f70d69ae7d7bb3bde5f78f85186b741ae111bcee
586
py
Python
tdrs-backend/tdpservice/core/migrations/0001_initial.py
amilash/TANF-app
09ef2baa854e41250c5761fa66aa665e112a53cf
[ "CC0-1.0" ]
18
2020-03-25T19:57:12.000Z
2021-07-26T15:37:50.000Z
tdrs-backend/tdpservice/core/migrations/0001_initial.py
amilash/TANF-app
09ef2baa854e41250c5761fa66aa665e112a53cf
[ "CC0-1.0" ]
1,465
2020-07-22T21:16:53.000Z
2022-03-31T16:04:22.000Z
tdrs-backend/tdpservice/core/migrations/0001_initial.py
amilash/TANF-app
09ef2baa854e41250c5761fa66aa665e112a53cf
[ "CC0-1.0" ]
15
2020-07-22T14:58:37.000Z
2021-06-22T17:29:55.000Z
# Generated by Django 3.1.1 on 2020-10-09 12:30 from django.db import migrations class Migration(migrations.Migration): initial = True dependencies = [ ("auth", "0012_alter_user_first_name_max_length"), ] operations = [ migrations.CreateModel( name="GlobalPermission", ...
21.703704
58
0.508532
from django.db import migrations class Migration(migrations.Migration): initial = True dependencies = [ ("auth", "0012_alter_user_first_name_max_length"), ] operations = [ migrations.CreateModel( name="GlobalPermission", fields=[], options={ ...
true
true
f70d69e6ae49cf43ccafd69ba1b80f36ce123af6
3,113
py
Python
src/helpers.py
kevinbluett/cs4032_chat_server
5156e51ccf591fe3d6f2a5054ffcc4af7ea24810
[ "MIT" ]
null
null
null
src/helpers.py
kevinbluett/cs4032_chat_server
5156e51ccf591fe3d6f2a5054ffcc4af7ea24810
[ "MIT" ]
null
null
null
src/helpers.py
kevinbluett/cs4032_chat_server
5156e51ccf591fe3d6f2a5054ffcc4af7ea24810
[ "MIT" ]
null
null
null
from collections import OrderedDict __author__ = 'kevin' import socket from threading import Lock class LithiumHelper(object): @staticmethod def recv_all(sock): read = '' try: data = sock.recv(1024) read += data except socket.error, e: if isinstance(...
26.836207
83
0.460328
from collections import OrderedDict __author__ = 'kevin' import socket from threading import Lock class LithiumHelper(object): @staticmethod def recv_all(sock): read = '' try: data = sock.recv(1024) read += data except socket.error, e: if isinstance(...
false
true
f70d6b3c7a3936a8821c25d96497c42bba1ebcd2
1,500
py
Python
MainPage.py
Azraelxx/easydownload_py
ef8b12e18b7afb7db2b809ebc1db0383704f28c6
[ "MIT" ]
null
null
null
MainPage.py
Azraelxx/easydownload_py
ef8b12e18b7afb7db2b809ebc1db0383704f28c6
[ "MIT" ]
null
null
null
MainPage.py
Azraelxx/easydownload_py
ef8b12e18b7afb7db2b809ebc1db0383704f28c6
[ "MIT" ]
1
2018-07-25T03:04:05.000Z
2018-07-25T03:04:05.000Z
#Author:Azrael import sys from PyQt5.QtWidgets import QApplication, QDialog, QStackedWidget,QListWidget,\ QTextEdit,QVBoxLayout,QListWidgetItem class MainPage(QDialog): def __init__(self, parent=None): super(MainPage, self).__init__(parent) self.initUI() def initUI(self): self.se...
28.846154
79
0.674667
import sys from PyQt5.QtWidgets import QApplication, QDialog, QStackedWidget,QListWidget,\ QTextEdit,QVBoxLayout,QListWidgetItem class MainPage(QDialog): def __init__(self, parent=None): super(MainPage, self).__init__(parent) self.initUI() def initUI(self): self.setWindowTitle("s...
true
true
f70d6c07f2ef0eea1802f08272c6aae8dc96f558
4,568
py
Python
property_prediction/predict_with_RF.py
driesvr/The-Photoswitch-Dataset
fbc7858343b56ed8526ed6a3feeed260fac1963c
[ "MIT" ]
null
null
null
property_prediction/predict_with_RF.py
driesvr/The-Photoswitch-Dataset
fbc7858343b56ed8526ed6a3feeed260fac1963c
[ "MIT" ]
null
null
null
property_prediction/predict_with_RF.py
driesvr/The-Photoswitch-Dataset
fbc7858343b56ed8526ed6a3feeed260fac1963c
[ "MIT" ]
null
null
null
# Copyright Ryan-Rhys Griffiths and Aditya Raymond Thawani 2020 # Author: Ryan-Rhys Griffiths """ Property prediction on the photoswitch dataset using Random Forest. """ import argparse import numpy as np from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split from skle...
43.09434
127
0.670534
import argparse import numpy as np from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import train_test_split from sklearn.metrics import r2_score, mean_squared_error, mean_absolute_error from data_utils import TaskDataLoader, transform_data, featurise_mols def main(path, task, represe...
true
true
f70d6c41c295d6aae71f3461ffd3bd8c0b387158
14,042
py
Python
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/discussion/tests/test_tasks.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
3
2021-12-15T04:58:18.000Z
2022-02-06T12:15:37.000Z
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/discussion/tests/test_tasks.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
null
null
null
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/discussion/tests/test_tasks.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
1
2019-01-02T14:38:50.000Z
2019-01-02T14:38:50.000Z
""" Tests the execution of forum notification tasks. """ import json import math from datetime import datetime, timedelta from unittest import mock import ddt from django.contrib.sites.models import Site from edx_ace.channel import ChannelType, get_channel_for_message from edx_ace.recipient import Recipient from edx...
42.295181
161
0.636733
import json import math from datetime import datetime, timedelta from unittest import mock import ddt from django.contrib.sites.models import Site from edx_ace.channel import ChannelType, get_channel_for_message from edx_ace.recipient import Recipient from edx_ace.renderers import EmailRenderer from edx_ace.utils im...
true
true
f70d6f13bca6429a6dce45b39c73442b4d5a45e7
2,541
py
Python
src/spaceone/inventory/connector/aws_sqs_connector/schema/resource.py
khl6235/plugin-aws-cloudservices
e13554df78ff97daefa7011559c00adc44fa10ea
[ "Apache-2.0" ]
null
null
null
src/spaceone/inventory/connector/aws_sqs_connector/schema/resource.py
khl6235/plugin-aws-cloudservices
e13554df78ff97daefa7011559c00adc44fa10ea
[ "Apache-2.0" ]
null
null
null
src/spaceone/inventory/connector/aws_sqs_connector/schema/resource.py
khl6235/plugin-aws-cloudservices
e13554df78ff97daefa7011559c00adc44fa10ea
[ "Apache-2.0" ]
null
null
null
from schematics.types import DictType, ListType, ModelType, PolyModelType, StringType from spaceone.inventory.connector.aws_sqs_connector.schema.data import QueData from spaceone.inventory.libs.schema.resource import CloudServiceMeta, CloudServiceResource, CloudServiceResponse from spaceone.inventory.libs.schema.dynami...
50.82
125
0.765447
from schematics.types import DictType, ListType, ModelType, PolyModelType, StringType from spaceone.inventory.connector.aws_sqs_connector.schema.data import QueData from spaceone.inventory.libs.schema.resource import CloudServiceMeta, CloudServiceResource, CloudServiceResponse from spaceone.inventory.libs.schema.dynami...
true
true
f70d6fe0a3ef503fce9141bd9dab87c358f61756
11,772
py
Python
cyclecount/views.py
Svtter/GreaterWMS
e0a91f3be0f94ae8856664062a653fa60e2c2c9a
[ "Apache-2.0" ]
null
null
null
cyclecount/views.py
Svtter/GreaterWMS
e0a91f3be0f94ae8856664062a653fa60e2c2c9a
[ "Apache-2.0" ]
null
null
null
cyclecount/views.py
Svtter/GreaterWMS
e0a91f3be0f94ae8856664062a653fa60e2c2c9a
[ "Apache-2.0" ]
null
null
null
from dateutil.relativedelta import relativedelta from django.http import StreamingHttpResponse from django.utils import timezone from rest_framework import viewsets from rest_framework.settings import api_settings from .files import FileRenderCN, FileRenderEN from .models import CyclecountModeDayModel from . import ser...
41.450704
138
0.578321
from dateutil.relativedelta import relativedelta from django.http import StreamingHttpResponse from django.utils import timezone from rest_framework import viewsets from rest_framework.settings import api_settings from .files import FileRenderCN, FileRenderEN from .models import CyclecountModeDayModel from . import ser...
true
true
f70d722dd62cee44e68dad20c71f2b110f5a9a5a
161
py
Python
python/die.py
karandiip/PythonCrashCourse
8b699447d6e0595e62000640ba64a81174f37127
[ "MIT" ]
null
null
null
python/die.py
karandiip/PythonCrashCourse
8b699447d6e0595e62000640ba64a81174f37127
[ "MIT" ]
null
null
null
python/die.py
karandiip/PythonCrashCourse
8b699447d6e0595e62000640ba64a81174f37127
[ "MIT" ]
null
null
null
from random import randint class Die(): def __init__(self, sides): self.sides = sides def roll_die(self): print(randint(1,self.sides))
17.888889
36
0.63354
from random import randint class Die(): def __init__(self, sides): self.sides = sides def roll_die(self): print(randint(1,self.sides))
true
true
f70d72982b5eac395fae3573dc1dd2d3d7fab933
6,726
py
Python
test.py
nickie/emsdk
41adfea99dd4af48c9d068f572d42bb6606384f1
[ "MIT" ]
null
null
null
test.py
nickie/emsdk
41adfea99dd4af48c9d068f572d42bb6606384f1
[ "MIT" ]
null
null
null
test.py
nickie/emsdk
41adfea99dd4af48c9d068f572d42bb6606384f1
[ "MIT" ]
null
null
null
#!/usr/bin/env python import json import os import shutil import subprocess import sys import tempfile # Utilities def listify(x): if type(x) == list or type(x) == tuple: return x return [x] def check_call(cmd, **args): if type(cmd) != list: cmd = cmd.split() print('running: %s' % cmd) subprocess...
32.970588
140
0.711121
import json import os import shutil import subprocess import sys import tempfile def listify(x): if type(x) == list or type(x) == tuple: return x return [x] def check_call(cmd, **args): if type(cmd) != list: cmd = cmd.split() print('running: %s' % cmd) subprocess.check_call(cmd, **args) def che...
true
true
f70d74e668814bd9af060e2f6104d9c94e031054
4,281
py
Python
defacto_zips/w9s1_ros_tutorial/devel/lib/python2.7/dist-packages/turtlesim/msg/_Pose.py
Psyf/WincentPanzer
da546042ce5b22f45e84f3568a9d0825695d5aaa
[ "MIT" ]
null
null
null
defacto_zips/w9s1_ros_tutorial/devel/lib/python2.7/dist-packages/turtlesim/msg/_Pose.py
Psyf/WincentPanzer
da546042ce5b22f45e84f3568a9d0825695d5aaa
[ "MIT" ]
null
null
null
defacto_zips/w9s1_ros_tutorial/devel/lib/python2.7/dist-packages/turtlesim/msg/_Pose.py
Psyf/WincentPanzer
da546042ce5b22f45e84f3568a9d0825695d5aaa
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from turtlesim/Pose.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class Pose(genpy.Message): _md5sum = "863b248d5016ca62ea2e895ae5265cf9" _type = "turtlesim/Pose" ...
33.708661
145
0.66106
import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class Pose(genpy.Message): _md5sum = "863b248d5016ca62ea2e895ae5265cf9" _type = "turtlesim/Pose" _has_header = False _full_text = """float32 x float32 y float32 theta float32 linear_velocity float32 angular_velocit...
true
true
f70d76305e8d3c104e2bef74d2bdd49c856e815a
9,100
py
Python
data/utils.py
Zhiquan-Wen/D-VQA
688c4dcc811f49b431daea81406e628ec71a7247
[ "BSD-3-Clause" ]
25
2021-11-09T07:05:18.000Z
2022-03-30T19:37:49.000Z
data/utils.py
Zhiquan-Wen/D-VQA
688c4dcc811f49b431daea81406e628ec71a7247
[ "BSD-3-Clause" ]
7
2021-11-16T15:53:18.000Z
2022-03-29T03:46:35.000Z
data/utils.py
Zhiquan-Wen/D-VQA
688c4dcc811f49b431daea81406e628ec71a7247
[ "BSD-3-Clause" ]
2
2021-12-16T04:35:57.000Z
2022-03-06T06:08:06.000Z
from __future__ import print_function import errno import os from PIL import Image import torch import torch.nn as nn import re import json import pickle as cPickle import numpy as np import utils import h5py import operator import functools from torch._six import string_classes import torch.nn.func...
31.487889
108
0.609121
from __future__ import print_function import errno import os from PIL import Image import torch import torch.nn as nn import re import json import pickle as cPickle import numpy as np import utils import h5py import operator import functools from torch._six import string_classes import torch.nn.func...
true
true
f70d77bf4f300c03c65295930f7cc42f25e99f50
2,804
py
Python
cms/utils/helpers.py
jrutila/django-cms
798889104fcda59e82941986eadf46d4f08147f2
[ "BSD-3-Clause" ]
2
2016-02-19T04:19:22.000Z
2016-02-19T04:19:36.000Z
cms/utils/helpers.py
jrutila/django-cms
798889104fcda59e82941986eadf46d4f08147f2
[ "BSD-3-Clause" ]
5
2021-03-19T15:49:27.000Z
2022-03-12T00:52:58.000Z
cms/utils/helpers.py
jrutila/django-cms
798889104fcda59e82941986eadf46d4f08147f2
[ "BSD-3-Clause" ]
1
2016-11-07T01:42:14.000Z
2016-11-07T01:42:14.000Z
# -*- coding: utf-8 -*- from django.conf import settings # modify reversions to match our needs if required... def reversion_register(model_class, fields=None, follow=(), format="json", exclude_fields=None): """CMS interface to reversion api - helper function. Registers model for reversion only if reversion...
40.637681
146
0.700428
from django.conf import settings def reversion_register(model_class, fields=None, follow=(), format="json", exclude_fields=None): if not 'reversion' in settings.INSTALLED_APPS: return from reversion.models import VERSION_CHANGE if fields and exclude_fields: raise ValueError(...
true
true
f70d7815313c1feafc923ff350c20a9e26b6e96f
30,653
py
Python
samples/python/yolov3_onnx/yolov3_to_onnx.py
leo0519/TensorRT
498dcb009fe4c2dedbe9c61044d3de4f3c04a41b
[ "Apache-2.0" ]
5,249
2019-06-17T17:20:34.000Z
2022-03-31T17:56:05.000Z
samples/python/yolov3_onnx/yolov3_to_onnx.py
leo0519/TensorRT
498dcb009fe4c2dedbe9c61044d3de4f3c04a41b
[ "Apache-2.0" ]
1,721
2019-06-17T18:13:29.000Z
2022-03-31T16:09:53.000Z
samples/python/yolov3_onnx/yolov3_to_onnx.py
leo0519/TensorRT
498dcb009fe4c2dedbe9c61044d3de4f3c04a41b
[ "Apache-2.0" ]
1,414
2019-06-18T04:01:17.000Z
2022-03-31T09:16:53.000Z
#!/usr/bin/env python3 # # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
40.761968
103
0.636055
from __future__ import print_function from collections import OrderedDict import sys import os import onnx from onnx import helper from onnx import TensorProto import numpy as np sys.path.insert(1, os.path.join(sys.path[0], os.path.pardir)) from downloader import getFilePath class DarkNetParser(object): def _...
true
true
f70d7867f481a6804aa88d68e218fd72fc1e6e44
17,444
py
Python
env/lib/python3.8/site-packages/plotly/graph_objs/box/_marker.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
2
2021-07-07T20:16:23.000Z
2021-07-14T14:03:09.000Z
env/lib/python3.8/site-packages/plotly/graph_objs/box/_marker.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
5
2020-06-05T20:56:21.000Z
2021-09-22T19:12:42.000Z
env/lib/python3.8/site-packages/plotly/graph_objs/box/_marker.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
2
2020-07-05T12:57:14.000Z
2020-07-05T12:58:00.000Z
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "box" _path_str = "box.marker" _valid_props = {"color", "line", "opacity", "outliercolor", "s...
40.37963
82
0.53881
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): _parent_path_str = "box" _path_str = "box.marker" _valid_props = {"color", "line", "opacity", "outliercolor", "size", "symbol"} @property ...
true
true
f70d7954d7d78d715f5c19484ebdf9cca71c4f96
4,163
py
Python
src/pybel_tools/selection/group_nodes.py
cthoyt/pybel-tools
0bc9f9267178d164dab210f24255793cf4e32ab0
[ "MIT" ]
6
2017-03-09T14:28:19.000Z
2019-11-21T00:00:15.000Z
src/pybel_tools/selection/group_nodes.py
pybel/pybel-tools
0bc9f9267178d164dab210f24255793cf4e32ab0
[ "MIT" ]
134
2016-11-24T11:10:03.000Z
2020-09-10T17:03:13.000Z
src/pybel_tools/selection/group_nodes.py
cthoyt/pybel-tools
0bc9f9267178d164dab210f24255793cf4e32ab0
[ "MIT" ]
5
2017-03-08T13:28:02.000Z
2020-04-05T02:23:17.000Z
# -*- coding: utf-8 -*- """Node grouping utilities.""" from collections import defaultdict from typing import Callable, Iterable, List, Mapping, Optional, Set, TypeVar from pybel import BELGraph, BaseEntity from pybel.constants import ANNOTATIONS, HAS_VARIANT, IS_A, ORTHOLOGOUS, PART_OF, RELATION from pybel.dsl impo...
32.023077
117
0.674994
from collections import defaultdict from typing import Callable, Iterable, List, Mapping, Optional, Set, TypeVar from pybel import BELGraph, BaseEntity from pybel.constants import ANNOTATIONS, HAS_VARIANT, IS_A, ORTHOLOGOUS, PART_OF, RELATION from pybel.dsl import BaseConcept from pybel.struct.filters import concate...
true
true
f70d798ce5af69bfa710cc401731ba2da023437c
6,645
py
Python
bindings/python/ensmallen_graph/datasets/string/yersiniapestisco92.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/yersiniapestisco92.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/yersiniapestisco92.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Yersinia pestis CO92. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-0...
35.15873
223
0.701129
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def YersiniaPestisCo92( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: retu...
true
true
f70d79ab0201be3515a20d05d51ca7c878db8fde
5,201
py
Python
python/computational-biology/_10-boyer-moore/rules.py
iktefish/_s
0e7866191cb679e2c5fead9f46a2ec84da205cbb
[ "MIT" ]
null
null
null
python/computational-biology/_10-boyer-moore/rules.py
iktefish/_s
0e7866191cb679e2c5fead9f46a2ec84da205cbb
[ "MIT" ]
null
null
null
python/computational-biology/_10-boyer-moore/rules.py
iktefish/_s
0e7866191cb679e2c5fead9f46a2ec84da205cbb
[ "MIT" ]
null
null
null
import string def z_array(s): # NOTE: # Use Z algorithm (Gusfield theorem 1.4.1) to preprocess s. assert len(s) > 1 z = [len(s)] + [0] * (len(s) - 1) # Initial comparison for s[1:] with prefix for i in range(1, len(s)): if s[i] == s[i - 1]: z[1] += 1 else: ...
25.004808
77
0.523553
import string def z_array(s): assert len(s) > 1 z = [len(s)] + [0] * (len(s) - 1) for i in range(1, len(s)): if s[i] == s[i - 1]: z[1] += 1 else: break r, l = 0, 0 if z[l] > 0: r, l = z[1], 1 for k in range(2, len(s)): as...
true
true