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
f766b7f330a64e516d973ad8e359a8a2d29c9d01
5,733
py
Python
dags/trends_places_to_sheets_via_value_dag.py
arbrown/starthinker
1a14664fb1a8f2a757b100363ea8958833b7754c
[ "Apache-2.0" ]
null
null
null
dags/trends_places_to_sheets_via_value_dag.py
arbrown/starthinker
1a14664fb1a8f2a757b100363ea8958833b7754c
[ "Apache-2.0" ]
1
2021-06-18T14:54:19.000Z
2021-06-18T14:54:19.000Z
dags/trends_places_to_sheets_via_value_dag.py
arbrown/starthinker
1a14664fb1a8f2a757b100363ea8958833b7754c
[ "Apache-2.0" ]
null
null
null
########################################################################### # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/l...
30.657754
145
0.503925
from starthinker.airflow.factory import DAG_Factory INPUTS = { 'auth_write': 'service', 'secret': '', 'key': '', 'places_dataset': '', 'places_query': '', 'places_legacy': False, 'destination_sheet': '', 'destination_tab': '', } RECIPE = { 'tasks': [ { 'twitter': { 'auth': { ...
true
true
f766b82a958a523a2f0fd776e4e6edbd3e93b694
1,502
py
Python
HML/chapter6/ex7.py
Zilleplus/HML
ab9510e27103bb7c14e801606bb25b7c4e17e8ea
[ "MIT" ]
null
null
null
HML/chapter6/ex7.py
Zilleplus/HML
ab9510e27103bb7c14e801606bb25b7c4e17e8ea
[ "MIT" ]
null
null
null
HML/chapter6/ex7.py
Zilleplus/HML
ab9510e27103bb7c14e801606bb25b7c4e17e8ea
[ "MIT" ]
null
null
null
# Train and fine-tune a Decision Tree for the oons dataset # by following these steps: # a. Use make_moons(n_samples=10000, noise=0.4) # # b. Use train_test_split() to split the datset in to a training # set and test set. # # c. Use grid search with cross-validation (with the help of the # GridSearchCV class) to find g...
33.377778
72
0.751664
# You should get roughtly 85% to 87% accuracy. from sklearn.datasets import make_moons from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.pipeline import Pipeline from sklearn.tree import DecisionTreeClassifier X, y = make_moons(n_samples=10000, noise=0.4) X_train, X_test, y_train, y_test...
true
true
f766b832533dc8c363422a20ac813ca8c83129ae
40,475
py
Python
Python_Scripts/simulate_materials.py
UL-Radar-Group/BLIRS
8677ab551cd26fc243eb8798c05ad87d67419c5c
[ "BSD-2-Clause-FreeBSD" ]
1
2022-03-11T12:49:18.000Z
2022-03-11T12:49:18.000Z
Python_Scripts/simulate_materials.py
UL-Radar-Group/BLIRS
8677ab551cd26fc243eb8798c05ad87d67419c5c
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
Python_Scripts/simulate_materials.py
UL-Radar-Group/BLIRS
8677ab551cd26fc243eb8798c05ad87d67419c5c
[ "BSD-2-Clause-FreeBSD" ]
2
2022-01-24T11:32:56.000Z
2022-03-11T12:52:06.000Z
bl_info = { "name": "Materials Toolbox", "author": "monika ouza", "blender": (2, 76), "location": "View3D > CTR +SHIFT+ M key", "description": "Menu of Material Tools for Simulation: Loads Predefined Materials, Change from Infrared to Radar Materials and viseversa, Define new Materials, Use paramete...
47.617647
533
0.637554
bl_info = { "name": "Materials Toolbox", "author": "monika ouza", "blender": (2, 76), "location": "View3D > CTR +SHIFT+ M key", "description": "Menu of Material Tools for Simulation: Loads Predefined Materials, Change from Infrared to Radar Materials and viseversa, Define new Materials, Use paramete...
true
true
f766baf803773a3bf68ae99212b09f898214f5ca
4,880
py
Python
treesorting.py
robert-impey/tree-sorter
976082b6ed65a822110a93de0daa359af8ebec26
[ "MIT" ]
null
null
null
treesorting.py
robert-impey/tree-sorter
976082b6ed65a822110a93de0daa359af8ebec26
[ "MIT" ]
null
null
null
treesorting.py
robert-impey/tree-sorter
976082b6ed65a822110a93de0daa359af8ebec26
[ "MIT" ]
null
null
null
import re from functools import total_ordering from typing import Sequence indentation_chars = 4 class ParsedLine: def __init__(self, orig): self._orig = orig leading_white_space_re = re.compile('^( *)(.*)') m = leading_white_space_re.match(self._orig) if m: indentat...
26.096257
77
0.592213
import re from functools import total_ordering from typing import Sequence indentation_chars = 4 class ParsedLine: def __init__(self, orig): self._orig = orig leading_white_space_re = re.compile('^( *)(.*)') m = leading_white_space_re.match(self._orig) if m: indentat...
true
true
f766bb40d5f24dc63638cfb6e27a8942668e76b3
309
py
Python
models/__init__.py
jonathandumas/generative-models-power-systems
c1eff78cd17bb943bfd79d13dbee7bdc03c66955
[ "BSD-2-Clause" ]
11
2021-09-28T11:56:44.000Z
2022-03-21T03:10:18.000Z
models/__init__.py
jonathandumas/generative-models-power-systems
c1eff78cd17bb943bfd79d13dbee7bdc03c66955
[ "BSD-2-Clause" ]
null
null
null
models/__init__.py
jonathandumas/generative-models-power-systems
c1eff78cd17bb943bfd79d13dbee7bdc03c66955
[ "BSD-2-Clause" ]
4
2021-10-20T12:37:56.000Z
2021-12-18T12:31:19.000Z
from .Utils.MLP import MLP, MNISTCNN, CIFAR10CNN, SubMNISTCNN from .Utils.NormalizingFlowFactories import * from .Conditionners import AutoregressiveConditioner, DAGConditioner, CouplingConditioner, Conditioner from .Normalizers import AffineNormalizer, MonotonicNormalizer from .Utils.Distributions import *
51.5
102
0.857605
from .Utils.MLP import MLP, MNISTCNN, CIFAR10CNN, SubMNISTCNN from .Utils.NormalizingFlowFactories import * from .Conditionners import AutoregressiveConditioner, DAGConditioner, CouplingConditioner, Conditioner from .Normalizers import AffineNormalizer, MonotonicNormalizer from .Utils.Distributions import *
true
true
f766bb86be22f19d4a8fe9558d42c15972367946
7,120
py
Python
homeassistant/components/motioneye/__init__.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
5
2018-10-23T14:15:05.000Z
2021-11-26T06:38:44.000Z
homeassistant/components/motioneye/__init__.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
79
2020-07-23T07:13:37.000Z
2022-03-22T06:02:37.000Z
homeassistant/components/motioneye/__init__.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
3
2022-01-17T20:10:54.000Z
2022-01-17T20:17:22.000Z
"""The motionEye integration.""" from __future__ import annotations import asyncio import logging from typing import Any, Callable from motioneye_client.client import ( MotionEyeClient, MotionEyeClientError, MotionEyeClientInvalidAuthError, ) from motioneye_client.const import KEY_CAMERAS, KEY_ID, KEY_NAM...
30.42735
88
0.677669
from __future__ import annotations import asyncio import logging from typing import Any, Callable from motioneye_client.client import ( MotionEyeClient, MotionEyeClientError, MotionEyeClientInvalidAuthError, ) from motioneye_client.const import KEY_CAMERAS, KEY_ID, KEY_NAME from homeassistant.components....
true
true
f766bce0c6b12979f1c4f9710e67e81bddc2638d
2,807
py
Python
meerschaum/utils/formatting/_pprint.py
bmeares/Meerschaum
37bd7a9923efce53e91c6a1d9c31f9533b9b4463
[ "Apache-2.0" ]
32
2020-09-14T16:29:19.000Z
2022-03-08T00:51:28.000Z
meerschaum/utils/formatting/_pprint.py
bmeares/Meerschaum
37bd7a9923efce53e91c6a1d9c31f9533b9b4463
[ "Apache-2.0" ]
3
2020-10-04T20:03:30.000Z
2022-02-02T21:04:46.000Z
meerschaum/utils/formatting/_pprint.py
bmeares/Meerschaum
37bd7a9923efce53e91c6a1d9c31f9533b9b4463
[ "Apache-2.0" ]
5
2021-04-22T23:49:21.000Z
2022-02-02T12:59:08.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Pretty printing wrapper """ def pprint( *args, detect_password : bool = True, nopretty : bool = False, **kw ): """ Pretty print an object according to the configured ANSI and UNICODE settings. If detect...
30.182796
91
0.565729
def pprint( *args, detect_password : bool = True, nopretty : bool = False, **kw ): from meerschaum.utils.packages import attempt_import, import_rich from meerschaum.utils.formatting import ANSI, UNICODE, get_console from meerschaum.utils.warnings import error from m...
true
true
f766bcfb33ca5eefb7a5236c5b235ec881cc27f0
29,683
py
Python
pyleecan/Classes/MagFEMM.py
stephane-eisen/pyleecan
8444b8131c9eff11a616da8277fb1f280c8f70e5
[ "Apache-2.0" ]
1
2021-07-08T01:27:24.000Z
2021-07-08T01:27:24.000Z
pyleecan/Classes/MagFEMM.py
ecs-kev/pyleecan
1faedde4b24acc6361fa1fdd4e980eaec4ca3a62
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/MagFEMM.py
ecs-kev/pyleecan
1faedde4b24acc6361fa1fdd4e980eaec4ca3a62
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Simulation/MagFEMM.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Simulation/MagFEMM """ from os import linesep from sys import getsizeof fro...
36.965131
170
0.624297
from os import linesep from sys import getsizeof from logging import getLogger from ._check import check_var, raise_ from ..Functions.get_logger import get_logger from ..Functions.save import save from ..Functions.copy import copy from ..Functions.load import load_init_dict from ..Functions.Load.import_class import im...
true
true
f766bdc6c395c82b86abefc64ebf969e5eb3b140
6,346
py
Python
accessninja/group.py
yoleri/accessninja
1985cc3b34b1d3dc5471f3104432bf3f1db3b495
[ "MIT" ]
null
null
null
accessninja/group.py
yoleri/accessninja
1985cc3b34b1d3dc5471f3104432bf3f1db3b495
[ "MIT" ]
null
null
null
accessninja/group.py
yoleri/accessninja
1985cc3b34b1d3dc5471f3104432bf3f1db3b495
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from .config import Config from inspect import currentframe, getframeinfo from netaddr import IPNetwork class HostGroup(object): @property def name(self): return self._name @property def has_inline_groups(self): return len(self._inline_hostgroups) @propert...
34.302703
118
0.49937
from .config import Config from inspect import currentframe, getframeinfo from netaddr import IPNetwork class HostGroup(object): @property def name(self): return self._name @property def has_inline_groups(self): return len(self._inline_hostgroups) @property def inline_groups...
true
true
f766bf2d6920ab14790201a0ffad9e2aff9d6ffd
482
py
Python
Factorial Finder/factorial.py
yashpatel123a/Mini-Projects
57ecd8162da5979c2a97edc85eb38bf8cb0e3788
[ "MIT" ]
null
null
null
Factorial Finder/factorial.py
yashpatel123a/Mini-Projects
57ecd8162da5979c2a97edc85eb38bf8cb0e3788
[ "MIT" ]
null
null
null
Factorial Finder/factorial.py
yashpatel123a/Mini-Projects
57ecd8162da5979c2a97edc85eb38bf8cb0e3788
[ "MIT" ]
null
null
null
# recursive def _factorial(num): if num < 0: raise ValueError("number must be positive.") if num == 0: return 1 else: return num*_factorial(num - 1) # iterative def factorial(num): result = 1 if num < 0: raise ValueError("number must be positive.") while num > 0:...
20.956522
52
0.562241
def _factorial(num): if num < 0: raise ValueError("number must be positive.") if num == 0: return 1 else: return num*_factorial(num - 1) def factorial(num): result = 1 if num < 0: raise ValueError("number must be positive.") while num > 0: result *= num ...
true
true
f766bf62eca60e16c5e19bed5d688451495b4bb4
1,255
py
Python
tests/commands/test_help.py
febuiles/two1-python
88704487dba7715f97a0980781d4c0efb2ea7fc4
[ "BSD-2-Clause-FreeBSD" ]
415
2016-06-10T00:46:55.000Z
2021-10-16T00:56:06.000Z
tests/commands/test_help.py
febuiles/two1-python
88704487dba7715f97a0980781d4c0efb2ea7fc4
[ "BSD-2-Clause-FreeBSD" ]
25
2016-06-11T13:48:59.000Z
2021-01-05T11:19:30.000Z
tests/commands/test_help.py
febuiles/two1-python
88704487dba7715f97a0980781d4c0efb2ea7fc4
[ "BSD-2-Clause-FreeBSD" ]
109
2016-06-11T05:17:05.000Z
2021-12-22T11:02:22.000Z
"""Help command unit tests """ import importlib import pytest import two1.cli @pytest.mark.unit def test_help_text_format(): """Confirm each command's help ends with a period and is <45 chars. This test uses metaprogramming to generate the list of functions of the form two1.commands.buy.buy, asserting ...
35.857143
73
0.679681
import importlib import pytest import two1.cli @pytest.mark.unit def test_help_text_format(): command_names = sorted(two1.cli.main.commands.keys()) for command_name in command_names: module = importlib.import_module('two1.commands.' + command_name) command = getattr(module, command_name) ...
true
true
f766c01a7b59aa0ca352073b8d0e686072cc0635
3,669
py
Python
accountifie/dashboard/utils.py
imcallister/accountifie
094834c9d632e0353e3baf8d924eeb10cba0add4
[ "MIT", "Unlicense" ]
4
2017-06-02T08:48:48.000Z
2021-11-21T23:57:15.000Z
accountifie/dashboard/utils.py
imcallister/accountifie
094834c9d632e0353e3baf8d924eeb10cba0add4
[ "MIT", "Unlicense" ]
3
2020-06-05T16:55:42.000Z
2021-06-10T17:43:12.000Z
accountifie/dashboard/utils.py
imcallister/accountifie
094834c9d632e0353e3baf8d924eeb10cba0add4
[ "MIT", "Unlicense" ]
4
2015-12-15T14:27:51.000Z
2017-04-21T21:42:27.000Z
""" Adapted with permission from ReportLab's DocEngine framework """ import os from datetime import timedelta from decimal import Decimal from collections import namedtuple from subprocess import Popen, PIPE from django.conf import settings from importlib import import_module def run_shell_command(command, cwd): ...
31.358974
123
0.635323
import os from datetime import timedelta from decimal import Decimal from collections import namedtuple from subprocess import Popen, PIPE from django.conf import settings from importlib import import_module def run_shell_command(command, cwd): p = Popen(command, shell=True, cwd=cwd, stdout=PIPE, stderr=PIPE)...
true
true
f766c0da6b425f9518f5e22a5111a706f67207d6
1,461
py
Python
SimTracker/SiPhase2Digitizer/python/TBeamTest_cfi.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
SimTracker/SiPhase2Digitizer/python/TBeamTest_cfi.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
SimTracker/SiPhase2Digitizer/python/TBeamTest_cfi.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms tbeamTest = cms.EDAnalyzer("TBeamTest", TopFolderName = cms.string("TBeamTest"), OuterTrackerDigiSource = cms.InputTag("mix", "Tracker"), OuterTrackerDigiSimSource = cms.InputTag("simSiPixelDigis", "Tracker"), SimTrackSource = cms.InputTag("g4SimHits"), Geom...
33.204545
123
0.542779
import FWCore.ParameterSet.Config as cms tbeamTest = cms.EDAnalyzer("TBeamTest", TopFolderName = cms.string("TBeamTest"), OuterTrackerDigiSource = cms.InputTag("mix", "Tracker"), OuterTrackerDigiSimSource = cms.InputTag("simSiPixelDigis", "Tracker"), SimTrackSource = cms.InputTag("g4SimHits"), Geom...
true
true
f766c17d80b24e24d3778ee86ca6aa23cfd3ebe0
663
py
Python
serpapi/youtube_search.py
serpapi/google_search_results_python
116b10a3e85f43cc94a4aa7f55d3d060089681fc
[ "MIT" ]
3
2018-01-10T21:41:03.000Z
2018-01-14T23:54:36.000Z
news scrapper/serpapi/youtube_search.py
Welf06/Beginnner_Projects
61e1c56f3bd7497c4b711a52053fec6f21f67fe1
[ "MIT" ]
null
null
null
news scrapper/serpapi/youtube_search.py
Welf06/Beginnner_Projects
61e1c56f3bd7497c4b711a52053fec6f21f67fe1
[ "MIT" ]
null
null
null
from serpapi.serp_api_client import * from serpapi.serp_api_client_exception import SerpApiClientException class YoutubeSearch(SerpApiClient): """YoutubeSearch enables to search google scholar and parse the result. ```python from serpapi import YoutubeSearch query = YoutubeSearch({"search_query": "chai...
33.15
90
0.730015
from serpapi.serp_api_client import * from serpapi.serp_api_client_exception import SerpApiClientException class YoutubeSearch(SerpApiClient): def __init__(self, params_dict): super(YoutubeSearch, self).__init__(params_dict, YOUTUBE_ENGINE) def get_location(self, q, limit = 5): raise SerpApiC...
true
true
f766c293813e310c306cf95f6b13eafb6ef6add5
11,303
py
Python
cla_backend/apps/core/drf/router.py
uk-gov-mirror/ministryofjustice.cla_backend
4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6
[ "MIT" ]
3
2019-10-02T15:31:03.000Z
2022-01-13T10:15:53.000Z
cla_backend/apps/core/drf/router.py
uk-gov-mirror/ministryofjustice.cla_backend
4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6
[ "MIT" ]
206
2015-01-02T16:50:11.000Z
2022-02-16T20:16:05.000Z
cla_backend/apps/core/drf/router.py
uk-gov-mirror/ministryofjustice.cla_backend
4d524c10e7bd31f085d9c5f7bf6e08a6bb39c0a6
[ "MIT" ]
6
2015-03-23T23:08:42.000Z
2022-02-15T17:04:44.000Z
from collections import namedtuple, OrderedDict from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import NoReverseMatch from rest_framework import views from rest_framework.routers import BaseRouter, flatten, replace_methodname from rest_framework.urlpatterns import format_suffix_p...
38.445578
115
0.592586
from collections import namedtuple, OrderedDict from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import NoReverseMatch from rest_framework import views from rest_framework.routers import BaseRouter, flatten, replace_methodname from rest_framework.urlpatterns import format_suffix_p...
true
true
f766c5a3197fa61c1e47f5bfef281c654b66d20b
1,078
py
Python
tests/test_gevent.py
kahkeng/graphql-ws
b21da67e752c25e033d597932d3e4768f3f2fc1b
[ "MIT" ]
null
null
null
tests/test_gevent.py
kahkeng/graphql-ws
b21da67e752c25e033d597932d3e4768f3f2fc1b
[ "MIT" ]
null
null
null
tests/test_gevent.py
kahkeng/graphql-ws
b21da67e752c25e033d597932d3e4768f3f2fc1b
[ "MIT" ]
null
null
null
try: from unittest import mock except ImportError: import mock from graphql_ws.gevent import GeventConnectionContext, GeventSubscriptionServer class TestConnectionContext: def test_receive(self): ws = mock.Mock() connection_context = GeventConnectionContext(ws=ws) connection_conte...
27.641026
79
0.686456
try: from unittest import mock except ImportError: import mock from graphql_ws.gevent import GeventConnectionContext, GeventSubscriptionServer class TestConnectionContext: def test_receive(self): ws = mock.Mock() connection_context = GeventConnectionContext(ws=ws) connection_conte...
true
true
f766c5f22ae280f72d7a209bcb4983d6c0a03aad
25,433
py
Python
layers/modules/multibox_loss.py
tjpuzhaolei/yolact
d27ab4d5150d7ca5d12a950f0075b0886d9b9171
[ "MIT" ]
null
null
null
layers/modules/multibox_loss.py
tjpuzhaolei/yolact
d27ab4d5150d7ca5d12a950f0075b0886d9b9171
[ "MIT" ]
null
null
null
layers/modules/multibox_loss.py
tjpuzhaolei/yolact
d27ab4d5150d7ca5d12a950f0075b0886d9b9171
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import torch import pdb import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from ..box_utils import match, log_sum_exp, decode, center_size, crop from data import cfg, mask_type, activation_func class MultiBoxLoss(nn.Module): """SSD Weighted Loss Funct...
45.497317
144
0.599693
import torch import pdb import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from ..box_utils import match, log_sum_exp, decode, center_size, crop from data import cfg, mask_type, activation_func class MultiBoxLoss(nn.Module): def __init__(self, num_classes, pos_threshold, ne...
true
true
f766c683b33963bff4e0375bad8839cbcbd6340b
6,472
py
Python
reto-06/Joinzar/utils.py
jlnc/reto-python
7611b5ae231812b3bde1893a303af1c22765f859
[ "MIT" ]
18
2022-02-14T19:15:21.000Z
2022-03-29T12:56:18.000Z
reto-06/Joinzar/utils.py
jlnc/reto-python
7611b5ae231812b3bde1893a303af1c22765f859
[ "MIT" ]
22
2022-03-05T23:48:04.000Z
2022-03-31T04:33:58.000Z
reto-06/Joinzar/utils.py
jlnc/reto-python
7611b5ae231812b3bde1893a303af1c22765f859
[ "MIT" ]
21
2022-02-16T17:52:05.000Z
2022-03-28T20:13:46.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################# # Modificado a partir de un fichero escrito por: # # Copyright (c) 2022 Lorenzo Carbonell <a.k.a. atareao> # ######################################...
42.578947
78
0.65992
import os import mimetypes import shutil mimetypes.init() def list_images(directory): if not directory.exists(): os.makedirs(directory) if len(os.listdir(directory)) == 0: pass else: contador = 0 images = ('image/jpeg', 'image/png', 'image/svg+xml', ...
true
true
f766c69ee14e81bb14eb3b54c3f7baf35788211b
6,495
py
Python
src/pipelines/weather/weather_pipeline.py
harrisonzhu508/data
a3b95ced4abad6653d20f67f3f285abeeb0c2b25
[ "Apache-2.0" ]
null
null
null
src/pipelines/weather/weather_pipeline.py
harrisonzhu508/data
a3b95ced4abad6653d20f67f3f285abeeb0c2b25
[ "Apache-2.0" ]
null
null
null
src/pipelines/weather/weather_pipeline.py
harrisonzhu508/data
a3b95ced4abad6653d20f67f3f285abeeb0c2b25
[ "Apache-2.0" ]
null
null
null
import re import sys import math from random import shuffle from functools import partial from typing import Any, Dict, List, Tuple from multiprocessing import cpu_count from multiprocessing.pool import ThreadPool as Pool import numpy from tqdm.contrib import concurrent from pandas import DataFrame, Series, Int64Dtype...
37.327586
100
0.627098
import re import sys import math from random import shuffle from functools import partial from typing import Any, Dict, List, Tuple from multiprocessing import cpu_count from multiprocessing.pool import ThreadPool as Pool import numpy from tqdm.contrib import concurrent from pandas import DataFrame, Series, Int64Dtype...
true
true
f766c70844a73ac671536d8a2ee5ca6dacc57ce6
43
py
Python
solarbextrapolation/data/__init__.py
sunpy/solarbextrapolation
e064466df118cd72239ec3bcdc60ba42b40f1abb
[ "MIT" ]
13
2015-09-29T12:46:58.000Z
2021-09-24T06:13:27.000Z
solarbextrapolation/data/__init__.py
dstansby/solarbextrapolation
ec77ffe42978acd4d77f51ddfce5750c7e4cffac
[ "MIT", "BSD-3-Clause" ]
24
2015-06-24T13:45:44.000Z
2020-02-15T00:06:38.000Z
solarbextrapolation/data/__init__.py
dstansby/solarbextrapolation
ec77ffe42978acd4d77f51ddfce5750c7e4cffac
[ "MIT", "BSD-3-Clause" ]
9
2015-06-04T16:35:43.000Z
2019-05-01T20:39:05.000Z
from ._sample import download_sample_data
14.333333
41
0.860465
from ._sample import download_sample_data
true
true
f766c7b683e5eb987b59ae0c076cda06d5afea81
51,238
py
Python
src/pipeline_utilities.py
DCAN-Labs/abcd-bids-tfmri-pipeline
358581a244887a7fc385bc73c3c22e4683a22ad5
[ "BSD-3-Clause" ]
null
null
null
src/pipeline_utilities.py
DCAN-Labs/abcd-bids-tfmri-pipeline
358581a244887a7fc385bc73c3c22e4683a22ad5
[ "BSD-3-Clause" ]
null
null
null
src/pipeline_utilities.py
DCAN-Labs/abcd-bids-tfmri-pipeline
358581a244887a7fc385bc73c3c22e4683a22ad5
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 """ Common source for utility functions used by ABCD-BIDS task-fmri-pipeline Greg Conan: gconan@umn.edu Created: 2021-01-15 Updated: 2021-11-12 """ # Import standard libraries import argparse from datetime import datetime # for seeing how long scripts take to run from glob impo...
44.361905
139
0.659062
import argparse from datetime import datetime from glob import glob import json import multiprocessing as mp import os import pandas as pd import random import shutil import string import subprocess import sys import time # name of the argument to get the directory containing the main wrapper script SCAN_ARG = 's...
true
true
f766c80a8de3b4d2c3494068808c07d2c29c1874
2,058
py
Python
usaspending_api/disaster/v2/views/recipient/spending.py
jbuendiallc/usaspending-api
f827870cbca4b6a6e16f1c5272bb2ff73a113d76
[ "CC0-1.0" ]
1
2020-08-14T04:14:32.000Z
2020-08-14T04:14:32.000Z
usaspending_api/disaster/v2/views/recipient/spending.py
jbuendiallc/usaspending-api
f827870cbca4b6a6e16f1c5272bb2ff73a113d76
[ "CC0-1.0" ]
null
null
null
usaspending_api/disaster/v2/views/recipient/spending.py
jbuendiallc/usaspending-api
f827870cbca4b6a6e16f1c5272bb2ff73a113d76
[ "CC0-1.0" ]
null
null
null
import re from decimal import Decimal from typing import List from usaspending_api.common.elasticsearch.json_helpers import json_str_to_dict from usaspending_api.disaster.v2.views.elasticsearch_base import ( ElasticsearchDisasterBase, ElasticsearchSpendingPaginationMixin, ) class RecipientSpendingViewSet(Ela...
38.830189
120
0.620991
import re from decimal import Decimal from typing import List from usaspending_api.common.elasticsearch.json_helpers import json_str_to_dict from usaspending_api.disaster.v2.views.elasticsearch_base import ( ElasticsearchDisasterBase, ElasticsearchSpendingPaginationMixin, ) class RecipientSpendingViewSet(Ela...
true
true
f766c9118a9fe25ba88a445ef5c91a1d1f17e8c3
7,609
py
Python
courses/machine_learning/deepdive/09_sequence_keras/temperatures/utils/utils_display.py
pranaynanda/training-data-analyst
f10ab778589129239fd5b277cfdefb41638eded5
[ "Apache-2.0" ]
null
null
null
courses/machine_learning/deepdive/09_sequence_keras/temperatures/utils/utils_display.py
pranaynanda/training-data-analyst
f10ab778589129239fd5b277cfdefb41638eded5
[ "Apache-2.0" ]
null
null
null
courses/machine_learning/deepdive/09_sequence_keras/temperatures/utils/utils_display.py
pranaynanda/training-data-analyst
f10ab778589129239fd5b277cfdefb41638eded5
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
34.90367
79
0.561178
import math import numpy as np from matplotlib import pyplot as plt from matplotlib import transforms as plttrans import utils_prettystyle def picture_this_1(data, datalen): plt.subplot(211) plt.plot(data[datalen - 512:datalen + 512]) plt.axvspan(0, 512, color='black', alpha=0.06) plt.axvspan(512, 10...
true
true
f766c9f63d8d0d790d8fb078314f75a31f6c0087
3,735
py
Python
Game/Physics.py
joaompinto/2DExplorer
1c172c208535a3121e9fee3cf6d64b6b8ec3684f
[ "MIT" ]
9
2016-07-25T04:16:46.000Z
2020-05-07T16:27:26.000Z
Game/Physics.py
joaompinto/2DExplorer
1c172c208535a3121e9fee3cf6d64b6b8ec3684f
[ "MIT" ]
null
null
null
Game/Physics.py
joaompinto/2DExplorer
1c172c208535a3121e9fee3cf6d64b6b8ec3684f
[ "MIT" ]
2
2017-03-04T09:49:02.000Z
2020-04-10T00:13:45.000Z
class physics:#universal physics(excluding projectiles because i hate them) def __init__(self,world,gravity = 2): self.gravity = gravity self.world = world def isAtScreenBottom(self,obj):#unused if obj.y + obj.size[1] <= screenSize[1]: return True else: ...
42.443182
286
0.511111
class physics: def __init__(self,world,gravity = 2): self.gravity = gravity self.world = world def isAtScreenBottom(self,obj): if obj.y + obj.size[1] <= screenSize[1]: return True else: return False def colliding(self,xy1, size1, xy2, size2): ...
true
true
f766cb6dd5c28e44e562b196355d611481f18b40
6,441
py
Python
downloaded_kernels/loan_data/parsed_kernels/kernel_107.py
josepablocam/common-code-extraction
a6978fae73eee8ece6f1db09f2f38cf92f03b3ad
[ "MIT" ]
null
null
null
downloaded_kernels/loan_data/parsed_kernels/kernel_107.py
josepablocam/common-code-extraction
a6978fae73eee8ece6f1db09f2f38cf92f03b3ad
[ "MIT" ]
null
null
null
downloaded_kernels/loan_data/parsed_kernels/kernel_107.py
josepablocam/common-code-extraction
a6978fae73eee8ece6f1db09f2f38cf92f03b3ad
[ "MIT" ]
2
2021-07-12T00:48:08.000Z
2021-08-11T12:53:05.000Z
# coding: utf-8 # **Introduction** # In this post, you will discover the Keras Python library that provides a clean and convenient way to create a range of deep learning models on top of Theano or TensorFlow. # # All creidts to -- "http://machinelearningmastery.com/tutorial-first-neural-network-python-keras/" # # L...
33.373057
327
0.73529
import os, sys, re from keras.models import Sequential from keras.layers import Dense import time import numpy as np import pandas as pd from sklearn.model_selection import train_test_split print (time.time()) dataset = pd.read_csv('../input/loan.csv', low_memory=False) dataset = dataset.fillna(0) # In[ ...
true
true
f766cb7f462422520c10043f44224845c2795fc8
6,319
py
Python
gpflow/models/gpr.py
joelberkeley/GPflow
78230b98f57c64b5ee2932ea0d2752eb9ff102ce
[ "Apache-2.0" ]
null
null
null
gpflow/models/gpr.py
joelberkeley/GPflow
78230b98f57c64b5ee2932ea0d2752eb9ff102ce
[ "Apache-2.0" ]
null
null
null
gpflow/models/gpr.py
joelberkeley/GPflow
78230b98f57c64b5ee2932ea0d2752eb9ff102ce
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2020 The GPflow Contributors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
35.301676
99
0.663396
from typing import Optional import tensorflow as tf import gpflow from .. import posteriors from ..base import InputData, MeanAndVariance, RegressionData from ..kernels import Kernel from ..logdensities import multivariate_normal from ..mean_functions import MeanFunction from ..utilities.model_utils import add_nois...
true
true
f766cd1430549d436550890c657145f4a50f3924
5,450
py
Python
main.py
gkuwanto/RBL_SK5003
7da3b95afeca2aa3413993279fe13d6bb71cd5db
[ "MIT" ]
null
null
null
main.py
gkuwanto/RBL_SK5003
7da3b95afeca2aa3413993279fe13d6bb71cd5db
[ "MIT" ]
null
null
null
main.py
gkuwanto/RBL_SK5003
7da3b95afeca2aa3413993279fe13d6bb71cd5db
[ "MIT" ]
null
null
null
import argparse import numpy as np import matplotlib.pyplot as plt from lib.file_parser import read_csv # Set random seed np.random.seed(42) # Menambahkan argumen dalam cli parser = argparse.ArgumentParser() parser.add_argument("-obj", "--objective", help="Specify objective function of the optimi...
30.79096
75
0.645688
import argparse import numpy as np import matplotlib.pyplot as plt from lib.file_parser import read_csv np.random.seed(42) parser = argparse.ArgumentParser() parser.add_argument("-obj", "--objective", help="Specify objective function of the optimization. " "Only MSE an...
true
true
f766ce1604b0bf80d1c302bbc0a07e9e60955fd8
5,996
py
Python
tests/algorithms/indexing/ssx/test_analysis.py
ammsa23/dials
d9c6cdde2ee0abb3989596c91c80ab585e47f296
[ "BSD-3-Clause" ]
1
2021-12-10T17:28:16.000Z
2021-12-10T17:28:16.000Z
tests/algorithms/indexing/ssx/test_analysis.py
ammsa23/dials
d9c6cdde2ee0abb3989596c91c80ab585e47f296
[ "BSD-3-Clause" ]
null
null
null
tests/algorithms/indexing/ssx/test_analysis.py
ammsa23/dials
d9c6cdde2ee0abb3989596c91c80ab585e47f296
[ "BSD-3-Clause" ]
1
2021-12-07T12:39:04.000Z
2021-12-07T12:39:04.000Z
from __future__ import annotations import pytest from dials.algorithms.indexing.ssx.analysis import ( combine_results_dicts, generate_html_report, generate_plots, make_cluster_plots, make_summary_table, ) def generate_test_results_dict(n_lattices=1): results = { 0: [ { ...
35.270588
125
0.546531
from __future__ import annotations import pytest from dials.algorithms.indexing.ssx.analysis import ( combine_results_dicts, generate_html_report, generate_plots, make_cluster_plots, make_summary_table, ) def generate_test_results_dict(n_lattices=1): results = { 0: [ { ...
true
true
f766ce397e06000a5a9b9ad412f37d625d931710
9,321
py
Python
src/sisterbayes/calclib.py
jeetsukumaran/SisterBayes
55ded1527860a0b11d853ef9a3cba9c86d0e3ba5
[ "BSD-3-Clause" ]
null
null
null
src/sisterbayes/calclib.py
jeetsukumaran/SisterBayes
55ded1527860a0b11d853ef9a3cba9c86d0e3ba5
[ "BSD-3-Clause" ]
null
null
null
src/sisterbayes/calclib.py
jeetsukumaran/SisterBayes
55ded1527860a0b11d853ef9a3cba9c86d0e3ba5
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python ############################################################################## ## DendroPy Phylogenetic Computing Library. ## ## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder. ## All rights reserved. ## ## See "LICENSE.rst" for terms and conditions of usage. ## ## If you use this wo...
30.361564
114
0.564532
import math from operator import itemgetter def _mean_and_variance_pop_n(values): n = 0 s = 0.0 ss = 0.0 for v in values: n += 1 s += v ss += v*v if n == 0: raise IndexError("values in mean_and_variance cannot be empty") mean = float(s)/n var = (ss - mean*...
true
true
f766cfa8e665a92da57ded1d0f17fc2bd2ce5808
2,220
py
Python
tests/test_ndmg_dwi_pipeline.py
caseypw/m2g
be29587322ab1fafb96f6afb726efbdb39b64b66
[ "Apache-2.0" ]
36
2016-02-06T14:14:50.000Z
2019-10-25T11:55:55.000Z
tests/test_ndmg_dwi_pipeline.py
caseypw/m2g
be29587322ab1fafb96f6afb726efbdb39b64b66
[ "Apache-2.0" ]
294
2016-02-04T23:27:05.000Z
2019-12-14T20:34:14.000Z
tests/test_ndmg_dwi_pipeline.py
caseypw/m2g
be29587322ab1fafb96f6afb726efbdb39b64b66
[ "Apache-2.0" ]
44
2016-02-19T23:31:19.000Z
2019-10-17T01:19:19.000Z
""" First pytest file for m2g. Basic assertions that don't mean anything for now just to make sure pytest + travis works.""" import os import pytest import m2g from m2g.utils.cloud_utils import s3_get_data from pathlib import Path from m2g.utils.gen_utils import create_datadescript, DirectorySweeper KEYWORDS = ["sub...
25.813953
124
0.64955
import os import pytest import m2g from m2g.utils.cloud_utils import s3_get_data from pathlib import Path from m2g.utils.gen_utils import create_datadescript, DirectorySweeper KEYWORDS = ["sub", "ses"] def is_graph(filename, atlas="", suffix=""): if atlas: atlas = atlas.lower() KEYWORDS.append...
true
true
f766d1645929ac73c808a0d46a10175ddbe6553b
2,350
py
Python
ogp_invalidator/twitter_card_invalidator.py
dmamira/covid19
79d4c91c2302d43cfda3a85cc834656729df36c2
[ "MIT" ]
6,890
2020-02-29T03:04:31.000Z
2022-03-31T17:59:14.000Z
ogp_invalidator/twitter_card_invalidator.py
dmamira/covid19
79d4c91c2302d43cfda3a85cc834656729df36c2
[ "MIT" ]
2,794
2020-03-01T01:49:32.000Z
2022-03-31T09:33:23.000Z
ogp_invalidator/twitter_card_invalidator.py
dmamira/covid19
79d4c91c2302d43cfda3a85cc834656729df36c2
[ "MIT" ]
2,615
2020-03-01T07:30:49.000Z
2022-03-29T14:16:35.000Z
import argparse import time import os from selenium import webdriver from selenium.webdriver.support import expected_conditions from selenium.webdriver.support.ui import WebDriverWait USERNAME = os.environ['TWITTER_USERNAME'] PASSWORD = os.environ['TWITTER_PASSWORD'] parser = argparse.ArgumentParser() parser.add_arg...
29.375
108
0.720851
import argparse import time import os from selenium import webdriver from selenium.webdriver.support import expected_conditions from selenium.webdriver.support.ui import WebDriverWait USERNAME = os.environ['TWITTER_USERNAME'] PASSWORD = os.environ['TWITTER_PASSWORD'] parser = argparse.ArgumentParser() parser.add_arg...
true
true
f766d16db601ccb30190be8acfc6b5ce5797f80f
9,432
py
Python
synapse/metrics/background_process_metrics.py
Erethon/synapse
d13863d6eb4b3a1ce1ca4a702ae30d4f8808e51f
[ "Apache-2.0" ]
null
null
null
synapse/metrics/background_process_metrics.py
Erethon/synapse
d13863d6eb4b3a1ce1ca4a702ae30d4f8808e51f
[ "Apache-2.0" ]
null
null
null
synapse/metrics/background_process_metrics.py
Erethon/synapse
d13863d6eb4b3a1ce1ca4a702ae30d4f8808e51f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018 New Vector 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 la...
34.298182
87
0.706001
import inspect import logging import threading from functools import wraps from typing import TYPE_CHECKING, Dict, Optional, Set from prometheus_client.core import REGISTRY, Counter, Gauge from twisted.internet import defer from synapse.logging.context import LoggingContext, PreserveLoggingContext if TYPE_CHECKING...
true
true
f766d237f4bb1785992a57a5714b544055a054f2
2,579
py
Python
salt/modules/pw_group.py
styro/salt
d087d94dca02ca8bf53a6c21b94944bc7957522c
[ "Apache-2.0" ]
1
2015-05-20T16:55:50.000Z
2015-05-20T16:55:50.000Z
salt/modules/pw_group.py
styro/salt
d087d94dca02ca8bf53a6c21b94944bc7957522c
[ "Apache-2.0" ]
null
null
null
salt/modules/pw_group.py
styro/salt
d087d94dca02ca8bf53a6c21b94944bc7957522c
[ "Apache-2.0" ]
1
2021-12-02T15:30:00.000Z
2021-12-02T15:30:00.000Z
# -*- coding: utf-8 -*- ''' Manage groups on FreeBSD ''' from __future__ import absolute_import # Import python libs import logging # Import salt libs import salt.utils log = logging.getLogger(__name__) try: import grp except ImportError: pass # Define the module's virtual name __virtualname__ = 'group' ...
19.390977
79
0.591314
from __future__ import absolute_import import logging import salt.utils log = logging.getLogger(__name__) try: import grp except ImportError: pass __virtualname__ = 'group' def __virtual__(): return __virtualname__ if __grains__['kernel'] == 'FreeBSD' else False def add(name, gid=None, **kwargs):...
true
true
f766d2c80d1ce2fbb52ec77fda03cb37f8e63a10
24,912
py
Python
gluoncv/model_zoo/yolo/yolo3.py
kuonangzhe/gluon-cv
f7d74019210dd0f22cb4543f061339533301c487
[ "Apache-2.0" ]
null
null
null
gluoncv/model_zoo/yolo/yolo3.py
kuonangzhe/gluon-cv
f7d74019210dd0f22cb4543f061339533301c487
[ "Apache-2.0" ]
null
null
null
gluoncv/model_zoo/yolo/yolo3.py
kuonangzhe/gluon-cv
f7d74019210dd0f22cb4543f061339533301c487
[ "Apache-2.0" ]
null
null
null
"""You Only Look Once Object Detection v3""" # pylint: disable=arguments-differ from __future__ import absolute_import from __future__ import division import os import numpy as np import mxnet as mx from mxnet import gluon from mxnet import autograd from mxnet.gluon import nn from .darknet import _conv2d, darknet53 fr...
43.100346
100
0.630259
from __future__ import absolute_import from __future__ import division import os import numpy as np import mxnet as mx from mxnet import gluon from mxnet import autograd from mxnet.gluon import nn from .darknet import _conv2d, darknet53 from .yolo_target import YOLOV3TargetMerger from ...loss import YOLOV3Loss __all_...
true
true
f766d5d280b067d93d9c67605c05249e2bbf2e1d
14,558
py
Python
pirt/gaussfun.py
almarklein/pirt
b43a57aad89ad2638a65e58079153567a49a43f2
[ "BSD-3-Clause" ]
10
2020-05-14T12:48:23.000Z
2022-03-24T15:03:00.000Z
pirt/gaussfun.py
almarklein/pirt
b43a57aad89ad2638a65e58079153567a49a43f2
[ "BSD-3-Clause" ]
1
2021-08-05T13:24:48.000Z
2021-08-09T13:01:21.000Z
pirt/gaussfun.py
almarklein/pirt
b43a57aad89ad2638a65e58079153567a49a43f2
[ "BSD-3-Clause" ]
null
null
null
""" The gaussfun module implements functions for diffusion and Gaussian derivatives for data of any dimension. Contents of this module: * gaussiankernel - Create a Gaussian kernel * gaussiankernel2 - Create a 2D Gaussian kernel * diffusionkernel - Create a discrete analog to the Gaussian kernel * gfilter - Fi...
31.173448
89
0.602693
import numpy as np import scipy.ndimage from . import Aarray def _gaussiankernel(sigma, order, t): if sigma==0: return np.array([1.0]) sigma2 = sigma**2 sqrt2 = np.sqrt(2) basegauss = np.exp(- t**2 / (2*sigma2) ) # Scale the t-vector, what we actually d...
true
true
f766d5fa7dcb948a55d8fc9d6d8395b28c22af73
250
py
Python
src/Match_Mobile_Robotics/general_hardware_helper/ps4_controller/setup.py
Grossbier/simulation_multirobots
1fe00bf81932ad6de20709ad85f677f4cf196333
[ "BSD-2-Clause" ]
null
null
null
src/Match_Mobile_Robotics/general_hardware_helper/ps4_controller/setup.py
Grossbier/simulation_multirobots
1fe00bf81932ad6de20709ad85f677f4cf196333
[ "BSD-2-Clause" ]
null
null
null
src/Match_Mobile_Robotics/general_hardware_helper/ps4_controller/setup.py
Grossbier/simulation_multirobots
1fe00bf81932ad6de20709ad85f677f4cf196333
[ "BSD-2-Clause" ]
1
2022-01-04T09:16:28.000Z
2022-01-04T09:16:28.000Z
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup # fetch values from package.xml setup_args = generate_distutils_setup( packages=['ps4_controller'], package_dir={'': 'src'}, ) setup(**setup_args)
25
60
0.776
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup setup_args = generate_distutils_setup( packages=['ps4_controller'], package_dir={'': 'src'}, ) setup(**setup_args)
true
true
f766d66b44416866ddcee4d5737d0d103ec458fe
240
py
Python
example.py
JaktensTid/true-zigzag
541a5c6af09bd3b9b10c0ef0149cf442684e587e
[ "Apache-2.0" ]
3
2021-07-26T05:55:48.000Z
2022-02-17T19:17:05.000Z
example.py
JaktensTid/true-zigzag
541a5c6af09bd3b9b10c0ef0149cf442684e587e
[ "Apache-2.0" ]
null
null
null
example.py
JaktensTid/true-zigzag
541a5c6af09bd3b9b10c0ef0149cf442684e587e
[ "Apache-2.0" ]
1
2021-08-23T02:38:48.000Z
2021-08-23T02:38:48.000Z
from yahooquery import Ticker import zz t = Ticker('AAPL') hist = t.history(period='1y') for (i_h, p_h),(i_l, p_l) in zz.zigzag(hist['high'], hist['low']): print(f'PEAK Index: {i_h}, price: {p_h}, VALLEY Index: {i_l}, price: {p_l}')
24
80
0.6375
from yahooquery import Ticker import zz t = Ticker('AAPL') hist = t.history(period='1y') for (i_h, p_h),(i_l, p_l) in zz.zigzag(hist['high'], hist['low']): print(f'PEAK Index: {i_h}, price: {p_h}, VALLEY Index: {i_l}, price: {p_l}')
true
true
f766d6e0b9fab27ac58fd1a3b3696cac4e8d26bd
1,517
py
Python
src/pyquickhelper/loghelper/process_helper.py
Pandinosaurus/pyquickhelper
326276f656cf88989e4d0fcd006ada0d3735bd9e
[ "MIT" ]
18
2015-11-10T08:09:23.000Z
2022-02-16T11:46:45.000Z
src/pyquickhelper/loghelper/process_helper.py
Pandinosaurus/pyquickhelper
326276f656cf88989e4d0fcd006ada0d3735bd9e
[ "MIT" ]
321
2015-06-14T21:34:28.000Z
2021-11-28T17:10:03.000Z
src/pyquickhelper/loghelper/process_helper.py
Pandinosaurus/pyquickhelper
326276f656cf88989e4d0fcd006ada0d3735bd9e
[ "MIT" ]
10
2015-06-20T01:35:00.000Z
2022-01-19T15:54:32.000Z
# -*- coding: utf-8 -*- """ @file @brief Helpers about processes. """ from .flog import fLOG def reap_children(timeout=3, subset=None, fLOG=fLOG): """ Terminates children processes. Copied from `psutil <http://psutil.readthedocs.io/en/latest/index.html?highlight=terminate#terminate-my-children>`_. Tri...
29.745098
120
0.602505
from .flog import fLOG def reap_children(timeout=3, subset=None, fLOG=fLOG): import psutil killed = set() def on_terminate(proc): fLOG("process {} terminated with exit code {}".format(proc, proc.returncode)) killed.add(proc.pid) procs = psutil.Process().children() if subset is no...
true
true
f766d721e2a2a2cbecf90b2fde474a9797451280
1,509
py
Python
src/atcoder/abc012/a/sol_0.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
1
2021-07-11T03:20:10.000Z
2021-07-11T03:20:10.000Z
src/atcoder/abc012/a/sol_0.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
39
2021-07-10T05:21:09.000Z
2021-12-15T06:10:12.000Z
src/atcoder/abc012/a/sol_0.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
null
null
null
from __future__ import ( annotations, ) from typing import ( Generator, NoReturn ) class StdReader: def __init__( self, ) -> NoReturn: import sys self.buf = sys.stdin.buffer self.lines = ( self.async_readlines() ) self.chunks: Generator def async_readlines( self, )...
11.607692
31
0.544732
from __future__ import ( annotations, ) from typing import ( Generator, NoReturn ) class StdReader: def __init__( self, ) -> NoReturn: import sys self.buf = sys.stdin.buffer self.lines = ( self.async_readlines() ) self.chunks: Generator def async_readlines( self, )...
true
true
f766d827686d03c8702c5ff7339931e1ed7423b4
33,742
py
Python
topi/python/topi/x86/conv2d.py
gaoxiong1/tvm
6770f6b77252cf17a89ea7aeb292a2a54190cfff
[ "Apache-2.0" ]
4
2018-09-11T05:50:03.000Z
2022-01-23T03:43:22.000Z
topi/python/topi/x86/conv2d.py
gaoxiong1/tvm
6770f6b77252cf17a89ea7aeb292a2a54190cfff
[ "Apache-2.0" ]
3
2018-09-14T05:27:13.000Z
2021-01-06T17:27:58.000Z
topi/python/topi/x86/conv2d.py
gaoxiong1/tvm
6770f6b77252cf17a89ea7aeb292a2a54190cfff
[ "Apache-2.0" ]
4
2018-09-10T23:43:51.000Z
2019-06-14T16:27:23.000Z
# pylint: disable=invalid-name,unused-variable,unused-argument,no-member """Conv2D schedule on x86""" import tvm from tvm import autotvm from tvm.autotvm.task.dispatcher import ApplyGraphBest from tvm.autotvm.task.nnvm_integration import deserialize_args from tvm.autotvm.task import register, get_config from .. import ...
45.535762
99
0.602721
import tvm from tvm import autotvm from tvm.autotvm.task.dispatcher import ApplyGraphBest from tvm.autotvm.task.nnvm_integration import deserialize_args from tvm.autotvm.task import register, get_config from .. import generic, tag from .. import nn from ..util import get_const_tuple from ..nn.conv2d import conv2d, conv...
true
true
f766d8c4bd4aabdca7ff5eb5606a9eb04eb91950
18,481
py
Python
scenegraph/exp-official/taskographyv4tiny5_ploi/ploi_test_stats.py
taskography/3dscenegraph-dev
2c261241230fbea1f1c687ff793478248f25c02c
[ "MIT" ]
1
2022-01-30T22:06:57.000Z
2022-01-30T22:06:57.000Z
scenegraph/exp-official/taskographyv4tiny5_ploi/ploi_test_stats.py
taskography/3dscenegraph-dev
2c261241230fbea1f1c687ff793478248f25c02c
[ "MIT" ]
null
null
null
scenegraph/exp-official/taskographyv4tiny5_ploi/ploi_test_stats.py
taskography/3dscenegraph-dev
2c261241230fbea1f1c687ff793478248f25c02c
[ "MIT" ]
null
null
null
STATS = [ { "num_node_expansions": 0, "search_time": 0.0380291, "total_time": 0.168408, "plan_length": 65, "plan_cost": 65, "objects_used": 281, "objects_total": 374, "neural_net_time": 0.07210159301757812, "num_replanning_steps": 22, "...
28.967085
48
0.552351
STATS = [ { "num_node_expansions": 0, "search_time": 0.0380291, "total_time": 0.168408, "plan_length": 65, "plan_cost": 65, "objects_used": 281, "objects_total": 374, "neural_net_time": 0.07210159301757812, "num_replanning_steps": 22, "...
true
true
f766d8d06e625619436bca5048698a01202e5071
31,224
py
Python
momba/moml/parser.py
koehlma/momba
68d6431d2732570696d3c67a9e23006e6e3a7740
[ "MIT" ]
12
2021-01-18T14:38:32.000Z
2022-01-17T09:16:52.000Z
momba/moml/parser.py
koehlma/momba
68d6431d2732570696d3c67a9e23006e6e3a7740
[ "MIT" ]
3
2021-05-16T15:26:34.000Z
2022-02-21T20:46:55.000Z
momba/moml/parser.py
koehlma/momba
68d6431d2732570696d3c67a9e23006e6e3a7740
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # # Copyright (C) 2019-2020, Maximilian Köhl <koehl@cs.uni-saarland.de> from __future__ import annotations import dataclasses as d import typing as t import dataclasses import fractions from .. import model from ..model import actions, expressions, types, properties, operators from . import ...
38.932668
93
0.637586
from __future__ import annotations import dataclasses as d import typing as t import dataclasses import fractions from .. import model from ..model import actions, expressions, types, properties, operators from . import lexer _IGNORE = {lexer.TokenType.WHITESPACE, lexer.TokenType.COMMENT} class MomlSyntaxError...
true
true
f766d91823040b6965da67443598842258d6bef9
881
py
Python
catkin_workspace/build/pioneer2dx_ros/cmake/pioneer2dx_ros-genmsg-context.py
valbuenaster/ROS-Codes
6a9e87b188627d23482930e891784a69b10d6a0d
[ "MIT" ]
null
null
null
catkin_workspace/build/pioneer2dx_ros/cmake/pioneer2dx_ros-genmsg-context.py
valbuenaster/ROS-Codes
6a9e87b188627d23482930e891784a69b10d6a0d
[ "MIT" ]
null
null
null
catkin_workspace/build/pioneer2dx_ros/cmake/pioneer2dx_ros-genmsg-context.py
valbuenaster/ROS-Codes
6a9e87b188627d23482930e891784a69b10d6a0d
[ "MIT" ]
null
null
null
# generated from genmsg/cmake/pkg-genmsg.context.in messages_str = "/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myPoseMessage.msg;/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myHokuyoMessage.msg;/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myGPSMessage.msg;/home/luis/catkin_workspace/src/pioneer2dx_...
73.416667
292
0.813848
messages_str = "/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myPoseMessage.msg;/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myHokuyoMessage.msg;/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myGPSMessage.msg;/home/luis/catkin_workspace/src/pioneer2dx_ros/msg/myIMUMessage.msg" services_str = "" pkg_name...
true
true
f766d989e3a67a904a77bd8d6642a807fa2631e8
44
py
Python
sessao05/01_129-IfNameMain/main.py
Ruteski/CursoPythonOM
afe5ad5e50f903dab370be2b76966a81f07e51dd
[ "MIT" ]
null
null
null
sessao05/01_129-IfNameMain/main.py
Ruteski/CursoPythonOM
afe5ad5e50f903dab370be2b76966a81f07e51dd
[ "MIT" ]
null
null
null
sessao05/01_129-IfNameMain/main.py
Ruteski/CursoPythonOM
afe5ad5e50f903dab370be2b76966a81f07e51dd
[ "MIT" ]
null
null
null
from modulo import soma print(soma(15,30))
11
23
0.75
from modulo import soma print(soma(15,30))
true
true
f766d98b3ca862efdf613623f20c5b4f204b78f4
3,571
py
Python
test/test_kernel_smooth_quantile_fn.py
reichlab/jacques
772e6f69de944f5ce19af16b24dfd76d023861f9
[ "MIT" ]
null
null
null
test/test_kernel_smooth_quantile_fn.py
reichlab/jacques
772e6f69de944f5ce19af16b24dfd76d023861f9
[ "MIT" ]
null
null
null
test/test_kernel_smooth_quantile_fn.py
reichlab/jacques
772e6f69de944f5ce19af16b24dfd76d023861f9
[ "MIT" ]
null
null
null
import os os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import numpy as np import tensorflow as tf import tensorflow_probability as tfp import unittest from jacques import kernels class Test_Kernel_Smooth_Quantile_Fn(unittest.TestCase): def test_quantile_smooth_bw(self): tau = np.concatenate( [n...
32.171171
96
0.436012
import os os.environ['CUDA_VISIBLE_DEVICES'] = '-1' import numpy as np import tensorflow as tf import tensorflow_probability as tfp import unittest from jacques import kernels class Test_Kernel_Smooth_Quantile_Fn(unittest.TestCase): def test_quantile_smooth_bw(self): tau = np.concatenate( [n...
true
true
f766da33c9fa4b6d199523af6f7f25f2a95b0cad
3,116
py
Python
src/third_party/wiredtiger/test/3rdparty/testtools-0.9.34/testtools/tests/helpers.py
EdwardPrentice/wrongo
1e7c9136f5fab7040b5bd5df51b4946876625c88
[ "Apache-2.0" ]
72
2020-06-12T06:33:41.000Z
2021-03-22T03:15:56.000Z
src/third_party/wiredtiger/test/3rdparty/testtools-0.9.34/testtools/tests/helpers.py
EdwardPrentice/wrongo
1e7c9136f5fab7040b5bd5df51b4946876625c88
[ "Apache-2.0" ]
9
2020-07-02T09:36:49.000Z
2021-03-25T23:54:00.000Z
src/third_party/wiredtiger/test/3rdparty/testtools-0.9.34/testtools/tests/helpers.py
EdwardPrentice/wrongo
1e7c9136f5fab7040b5bd5df51b4946876625c88
[ "Apache-2.0" ]
23
2017-01-22T03:35:26.000Z
2021-12-16T11:17:39.000Z
# Copyright (c) 2008-2012 testtools developers. See LICENSE for details. """Helpers for tests.""" __all__ = [ 'LoggingResult', ] import sys from extras import safe_hasattr from testtools import TestResult from testtools.content import StackLinesContent from testtools import runtest # Importing to preserv...
28.587156
78
0.689024
__all__ = [ 'LoggingResult', ] import sys from extras import safe_hasattr from testtools import TestResult from testtools.content import StackLinesContent from testtools import runtest safe_hasattr try: raise Exception except Exception: an_exc_info = sys.exc_info() # Deprecated: This classes at...
true
true
f766da5f96dcb9261f2b16f93a2110fb5f379121
2,388
py
Python
Speedo/plugins/autopost.py
aviskumar/speedo
758e8ac1fdeeb0b72c3a57742032ca5c79f0b2fa
[ "BSD-3-Clause" ]
null
null
null
Speedo/plugins/autopost.py
aviskumar/speedo
758e8ac1fdeeb0b72c3a57742032ca5c79f0b2fa
[ "BSD-3-Clause" ]
null
null
null
Speedo/plugins/autopost.py
aviskumar/speedo
758e8ac1fdeeb0b72c3a57742032ca5c79f0b2fa
[ "BSD-3-Clause" ]
3
2021-10-12T08:17:01.000Z
2021-12-21T01:17:54.000Z
from telethon import events from Speedo.sql.autopost_sql import add_post, get_all_post, is_post, remove_post from . import * @speedo.on(Speedo_cmd(pattern="autopost ?(.*)")) @speedo.on(sudo_cmd(pattern="autopost ?(.*)", allow_sudo=True)) async def _(event): if (event.is_private or event.is_group): return ...
36.738462
138
0.657035
from telethon import events from Speedo.sql.autopost_sql import add_post, get_all_post, is_post, remove_post from . import * @speedo.on(Speedo_cmd(pattern="autopost ?(.*)")) @speedo.on(sudo_cmd(pattern="autopost ?(.*)", allow_sudo=True)) async def _(event): if (event.is_private or event.is_group): return ...
true
true
f766daa74910a821774c0a7a27c38b8f39a323dc
179,362
py
Python
scripts/helpers/items.py
alex9smith/dota2stats.io
31c5c299ee88ec93625133faf1695db9b21976cc
[ "MIT" ]
null
null
null
scripts/helpers/items.py
alex9smith/dota2stats.io
31c5c299ee88ec93625133faf1695db9b21976cc
[ "MIT" ]
null
null
null
scripts/helpers/items.py
alex9smith/dota2stats.io
31c5c299ee88ec93625133faf1695db9b21976cc
[ "MIT" ]
null
null
null
items = { "blink": { "active": [ { "name": "Blink", "desc": "Teleport to a target point up to 1200 units away. \n\nBlink Dagger cannot be used for 3 seconds after taking damage from an enemy hero or Roshan." } ], "id": 1, "img": "/apps/dota2/images/items/blink_lg.png?t=1558...
26.762459
653
0.523913
items = { "blink": { "active": [ { "name": "Blink", "desc": "Teleport to a target point up to 1200 units away. \n\nBlink Dagger cannot be used for 3 seconds after taking damage from an enemy hero or Roshan." } ], "id": 1, "img": "/apps/dota2/images/items/blink_lg.png?t=1558...
true
true
f766dc02c99c74fafe61b68c1e65cd0777853322
2,045
py
Python
amatino/internal/entity_update_arguments.py
Amatino-Code/amatino-python
6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f
[ "MIT" ]
2
2018-07-20T20:00:33.000Z
2020-10-08T15:49:06.000Z
amatino/internal/entity_update_arguments.py
Amatino-Code/amatino-python
6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f
[ "MIT" ]
1
2020-05-21T02:49:29.000Z
2020-05-21T02:49:29.000Z
amatino/internal/entity_update_arguments.py
Amatino-Code/amatino-python
6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f
[ "MIT" ]
3
2018-09-03T09:31:31.000Z
2020-05-21T05:30:00.000Z
""" Amatino API Python Bindings Entity Update Arguments Author: hugh@amatino.io """ from amatino.internal.encodable import Encodable from amatino.internal.entity_create_arguments import NewEntityArguments from amatino.internal.constrained_string import ConstrainedString from typing import Optional class EntityUpdateA...
28.013699
78
0.632274
from amatino.internal.encodable import Encodable from amatino.internal.entity_create_arguments import NewEntityArguments from amatino.internal.constrained_string import ConstrainedString from typing import Optional class EntityUpdateArguments(Encodable): def __init__( self, entity_id: str, ...
true
true
f766dcb78eac26578e373d2ffa860880ae375600
2,279
py
Python
datagokr/scripts.py
uujei/datagokr
308f5151f819010f2c4e174a6ef84d83d3bea922
[ "MIT" ]
null
null
null
datagokr/scripts.py
uujei/datagokr
308f5151f819010f2c4e174a6ef84d83d3bea922
[ "MIT" ]
null
null
null
datagokr/scripts.py
uujei/datagokr
308f5151f819010f2c4e174a6ef84d83d3bea922
[ "MIT" ]
null
null
null
import json import click from .airkorea import MsrstnAcctoRltmMesureDnsty from .kma import UltraSrtFcst, UltraSrtNcst, VilageFcst, WthrDataList def _out(records): for record in records: print(record.dict()) @click.group() def datagokr(): pass @datagokr.command() @click.option("-s", "--service-ke...
30.797297
76
0.618254
import json import click from .airkorea import MsrstnAcctoRltmMesureDnsty from .kma import UltraSrtFcst, UltraSrtNcst, VilageFcst, WthrDataList def _out(records): for record in records: print(record.dict()) @click.group() def datagokr(): pass @datagokr.command() @click.option("-s", "--service-ke...
true
true
f766df3130021ef0ebc89195087c372035d19337
1,554
py
Python
python_modules/libraries/dagster-cron/setup.py
joeyfreund/dagster
e551ff4bbb2c42b497a3e1c28cfb51fd5f2b1c21
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-cron/setup.py
joeyfreund/dagster
e551ff4bbb2c42b497a3e1c28cfb51fd5f2b1c21
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-cron/setup.py
joeyfreund/dagster
e551ff4bbb2c42b497a3e1c28cfb51fd5f2b1c21
[ "Apache-2.0" ]
null
null
null
import argparse import sys from setuptools import find_packages, setup def get_version(name): version = {} with open('dagster_cron/version.py') as fp: exec(fp.read(), version) # pylint: disable=W0122 if name == 'dagster-cron': return version['__version__'] elif name == 'dagster-cron...
29.884615
102
0.623552
import argparse import sys from setuptools import find_packages, setup def get_version(name): version = {} with open('dagster_cron/version.py') as fp: exec(fp.read(), version) if name == 'dagster-cron': return version['__version__'] elif name == 'dagster-cron-nightly': retur...
true
true
f766dfb4df5ef1ebdd7f621c4863cc5706888164
4,099
py
Python
CaMelia model/Feature extraction/unionfeature_for_train.py
JxTang-bioinformatics/Tangbio
7e0f0ed45371504c65d2a7ed419aed934e26c583
[ "MIT" ]
4
2020-09-29T06:31:49.000Z
2021-10-05T07:58:08.000Z
CaMelia model/Feature extraction/unionfeature_for_train.py
JxTang-bioinformatics/Tangbio
7e0f0ed45371504c65d2a7ed419aed934e26c583
[ "MIT" ]
3
2021-03-08T12:39:26.000Z
2021-06-16T13:21:09.000Z
CaMelia model/Feature extraction/unionfeature_for_train.py
JxTang-bioinformatics/CaMelia
7e0f0ed45371504c65d2a7ed419aed934e26c583
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division from sys import argv import pandas as pd import numpy as np import os,time import warnings warnings.filterwarnings('ignore') ########################################### def reduce_mem(df): starttime = time.time() numerics = ['int16', 'int32', 'i...
43.147368
142
0.528178
from __future__ import division from sys import argv import pandas as pd import numpy as np import os,time import warnings warnings.filterwarnings('ignore') def reduce_mem(df): starttime = time.time() numerics = ['int16', 'int32', 'int64', 'float16', 'float32', 'float64'] start_mem = df.memory_usa...
true
true
f766dfbb7ebe0a37f896c951a0ef7e709586ccf9
10,387
py
Python
yt_dlp/extractor/ceskatelevize.py
Assasans/yt-dlp-service
203a93d087d88c3cee74555e1ce6e311379eb3f3
[ "Unlicense" ]
3
2021-12-21T21:54:47.000Z
2022-02-10T00:31:39.000Z
yt_dlp/extractor/ceskatelevize.py
Assasans/yt-dlp-service
203a93d087d88c3cee74555e1ce6e311379eb3f3
[ "Unlicense" ]
null
null
null
yt_dlp/extractor/ceskatelevize.py
Assasans/yt-dlp-service
203a93d087d88c3cee74555e1ce6e311379eb3f3
[ "Unlicense" ]
6
2021-12-20T05:04:50.000Z
2022-01-31T18:35:28.000Z
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, sanitized_Request, unescapeHTML, update_url_query, ...
38.613383
173
0.523346
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, sanitized_Request, unescapeHTML, update_url_query, urlencode_post...
true
true
f766dfc0776be048aab137d11250e1c0493b5d4e
1,169
py
Python
data_structures__linked_lists/solution_14.py
rikkt0r/hackerrank_python
0eb140bbf27a1da6f681f0aa05e7b169c7daf009
[ "MIT" ]
null
null
null
data_structures__linked_lists/solution_14.py
rikkt0r/hackerrank_python
0eb140bbf27a1da6f681f0aa05e7b169c7daf009
[ "MIT" ]
null
null
null
data_structures__linked_lists/solution_14.py
rikkt0r/hackerrank_python
0eb140bbf27a1da6f681f0aa05e7b169c7daf009
[ "MIT" ]
null
null
null
class DoublyLinkedListNode: def __init__(self, node_data): self.data = node_data self.next = None self.prev = None def to_str(head): # better lookup for test data :P data = [] while head: data.append(str(head.data)) head = head.next return ', '.join(data) ...
19.163934
42
0.581694
class DoublyLinkedListNode: def __init__(self, node_data): self.data = node_data self.next = None self.prev = None def to_str(head): data = [] while head: data.append(str(head.data)) head = head.next return ', '.join(data) def sortedInsert(head, data): ...
true
true
f766e092688e36ce3385c0cae0754ce977962664
71
py
Python
staticpy/site/__init__.py
toddsifleet/staticpy
09b962a7316e142ff917be47502cbfac4aed7ed6
[ "MIT" ]
1
2015-01-31T13:35:42.000Z
2015-01-31T13:35:42.000Z
staticpy/site/__init__.py
toddsifleet/staticpy
09b962a7316e142ff917be47502cbfac4aed7ed6
[ "MIT" ]
null
null
null
staticpy/site/__init__.py
toddsifleet/staticpy
09b962a7316e142ff917be47502cbfac4aed7ed6
[ "MIT" ]
null
null
null
from __future__ import absolute_import from .site import Site # noqa
17.75
38
0.802817
from __future__ import absolute_import from .site import Site
true
true
f766e0e63f77f6d33944033364b887b207981671
64
py
Python
outlookdisablespamfilter/__init__.py
jan-janssen/outlook-disable-spam-filter
264f5fb650408abbfa5736f33ae098aefc0e7fac
[ "BSD-3-Clause" ]
null
null
null
outlookdisablespamfilter/__init__.py
jan-janssen/outlook-disable-spam-filter
264f5fb650408abbfa5736f33ae098aefc0e7fac
[ "BSD-3-Clause" ]
null
null
null
outlookdisablespamfilter/__init__.py
jan-janssen/outlook-disable-spam-filter
264f5fb650408abbfa5736f33ae098aefc0e7fac
[ "BSD-3-Clause" ]
null
null
null
from outlookdisablespamfilter.shared import transfer_spam_emails
64
64
0.9375
from outlookdisablespamfilter.shared import transfer_spam_emails
true
true
f766e2214a4feb07a00dd8e1f39de4db92aed4c9
8,393
py
Python
scripts/tf_cnn_benchmarks/inception_model.py
doody1986/benchmarks
7c994d3f726a9e1b1cc46fb040135c0ffbdfd598
[ "Apache-2.0" ]
1
2020-12-14T20:11:04.000Z
2020-12-14T20:11:04.000Z
scripts/tf_cnn_benchmarks/inception_model.py
rcmendez23/benchmarks
7c994d3f726a9e1b1cc46fb040135c0ffbdfd598
[ "Apache-2.0" ]
null
null
null
scripts/tf_cnn_benchmarks/inception_model.py
rcmendez23/benchmarks
7c994d3f726a9e1b1cc46fb040135c0ffbdfd598
[ "Apache-2.0" ]
1
2019-05-02T16:45:38.000Z
2019-05-02T16:45:38.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.742718
80
0.532825
from six.moves import xrange import model class Inceptionv3Model(model.Model): def __init__(self, auxiliary=False): self._auxiliary = auxiliary super(Inceptionv3Model, self).__init__('inception3', 299, 32, 0.005) def add_inference(self, cnn): def inception_v3_a(cnn, n): cols = [[('conv', 64...
true
true
f766e2b5116ee1a1ad7ab34006f9a6ba6d2c947b
364
py
Python
scripts/setup.py
kant/sms-spam-filter-using-hortonworks
969efc8a6f985942a2c82753e24f06b4854090b3
[ "Apache-2.0" ]
6
2018-10-12T15:19:26.000Z
2021-12-03T05:34:39.000Z
scripts/setup.py
vinodhmohan91/sms-spam-filter-using-hortonworks
975f35b13525f28fe67cc8e345cd4179ab509999
[ "Apache-2.0" ]
7
2018-09-18T22:52:16.000Z
2018-11-29T15:54:20.000Z
scripts/setup.py
vinodhmohan91/sms-spam-filter-using-hortonworks
975f35b13525f28fe67cc8e345cd4179ab509999
[ "Apache-2.0" ]
8
2018-09-18T20:19:20.000Z
2020-06-29T14:19:29.000Z
from setuptools import setup, find_packages setup( name='SpamFilter', version='1.0', description='filter spam using predictive text modeling', long_description='contains libraries to build ML pipeline and predict spam messages using logistic regression', author='Vinodh Mohan', author_email='Vin...
33.090909
115
0.736264
from setuptools import setup, find_packages setup( name='SpamFilter', version='1.0', description='filter spam using predictive text modeling', long_description='contains libraries to build ML pipeline and predict spam messages using logistic regression', author='Vinodh Mohan', author_email='Vin...
true
true
f766e309ae956bfb9018874fbcb693eff54986f0
556
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractRicelampWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractRicelampWordpressCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractRicelampWordpressCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractRicelampWordpressCom(item): ''' Parser for 'ricelamp.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loitero...
25.272727
104
0.636691
def extractRicelampWordpressCom(item): vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loiterous', 'Loiterous', 'oel'), ] f...
true
true
f766e322a48ed2853638dc9b382eeed593704413
2,303
py
Python
model/contact.py
anna-inboxx/python_training
0a2c1a393894eb3d999d77a0ae1f9366ecb88185
[ "Apache-2.0" ]
null
null
null
model/contact.py
anna-inboxx/python_training
0a2c1a393894eb3d999d77a0ae1f9366ecb88185
[ "Apache-2.0" ]
null
null
null
model/contact.py
anna-inboxx/python_training
0a2c1a393894eb3d999d77a0ae1f9366ecb88185
[ "Apache-2.0" ]
null
null
null
from sys import maxsize import re class Contact: def __init__(self, name=None, firstname=None, middlename=None, lastname=None, address=None, id=None, email=None, email2=None, email3=None,all_emails_from_home_page=None, homephone=None, mobilephone=None, workphone=None, secondaryp...
39.706897
139
0.598784
from sys import maxsize import re class Contact: def __init__(self, name=None, firstname=None, middlename=None, lastname=None, address=None, id=None, email=None, email2=None, email3=None,all_emails_from_home_page=None, homephone=None, mobilephone=None, workphone=None, secondaryp...
true
true
f766e362f3c5368ddd656636100719ca22c789d0
1,473
py
Python
fei_webhook/app_webhook/views_github.py
colingong/fei_webhook
2acb8b8e36d05f87f06dcc1bf056beb92a41b157
[ "Apache-2.0" ]
null
null
null
fei_webhook/app_webhook/views_github.py
colingong/fei_webhook
2acb8b8e36d05f87f06dcc1bf056beb92a41b157
[ "Apache-2.0" ]
6
2021-03-19T09:41:23.000Z
2022-02-10T11:13:35.000Z
fei_webhook/app_webhook/views_github.py
colingong/fei_webhook
2acb8b8e36d05f87f06dcc1bf056beb92a41b157
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render, HttpResponse from django.views.decorators.csrf import csrf_exempt from share.util_file import log_event import json import hashlib, hmac, base64 import os from main_settings.settings import BASE_DIR from .models import WebhookLog from .shell_cmd import Cmds from .hook import GithubH...
29.46
78
0.697217
from django.shortcuts import render, HttpResponse from django.views.decorators.csrf import csrf_exempt from share.util_file import log_event import json import hashlib, hmac, base64 import os from main_settings.settings import BASE_DIR from .models import WebhookLog from .shell_cmd import Cmds from .hook import GithubH...
true
true
f766e3d2b19a39842d3391f2d58044ad8d824b17
428
py
Python
ports/textproc/py-readchar/dragonfly/patch-readchar_readchar.py
liweitianux/DeltaPorts
b907de0ceb9c0e46ae8961896e97b361aa7c62c0
[ "BSD-2-Clause-FreeBSD" ]
31
2015-02-06T17:06:37.000Z
2022-03-08T19:53:28.000Z
ports/textproc/py-readchar/dragonfly/patch-readchar_readchar.py
liweitianux/DeltaPorts
b907de0ceb9c0e46ae8961896e97b361aa7c62c0
[ "BSD-2-Clause-FreeBSD" ]
236
2015-06-29T19:51:17.000Z
2021-12-16T22:46:38.000Z
ports/textproc/py-readchar/dragonfly/patch-readchar_readchar.py
liweitianux/DeltaPorts
b907de0ceb9c0e46ae8961896e97b361aa7c62c0
[ "BSD-2-Clause-FreeBSD" ]
52
2015-02-06T17:05:36.000Z
2021-10-21T12:13:06.000Z
--- readchar/readchar.py.orig 2021-09-11 13:08:37 UTC +++ readchar/readchar.py @@ -6,7 +6,7 @@ import sys if sys.platform.startswith("linux"): from .readchar_linux import readchar -elif sys.platform.startswith("freebsd"): +elif sys.platform.startswith("freebsd") or sys.platform.startswith('dragonfly'): fro...
35.666667
81
0.726636
--- readchar/readchar.py.orig 2021-09-11 13:08:37 UTC +++ readchar/readchar.py @@ -6,7 +6,7 @@ import sys if sys.platform.startswith("linux"): from .readchar_linux import readchar -elif sys.platform.startswith("freebsd"): +elif sys.platform.startswith("freebsd") or sys.platform.startswith('dragonfly'): fro...
false
true
f766e3f5df5e4552be39763d54a0a05c9ba53338
904
py
Python
Modules/Core/Common/wrapping/test/itkDirectoryTest.py
HongdaZ/ITK
f5d004fa3607b8e11edc30f1ba299df35af8aff8
[ "Apache-2.0" ]
1
2021-01-10T14:19:08.000Z
2021-01-10T14:19:08.000Z
Modules/Core/Common/wrapping/test/itkDirectoryTest.py
HongdaZ/ITK
f5d004fa3607b8e11edc30f1ba299df35af8aff8
[ "Apache-2.0" ]
1
2017-03-19T12:56:50.000Z
2018-10-24T10:40:21.000Z
Modules/Core/Common/wrapping/test/itkDirectoryTest.py
HongdaZ/ITK
f5d004fa3607b8e11edc30f1ba299df35af8aff8
[ "Apache-2.0" ]
1
2020-07-24T22:58:19.000Z
2020-07-24T22:58:19.000Z
#========================================================================== # # Copyright NumFOCUS # # 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/l...
31.172414
77
0.582965
import itk itk.auto_progress(2) d = itk.Directory.New() d.Load(".") n = d.GetNumberOfFiles() i = 0 while i < n: print(d.GetFile(i)) i = i + 1
true
true
f766e4596509da0d3219da0e404d0b0ef34bf56a
4,621
py
Python
tests/unit/test_partition.py
ganik/DeepSpeed
788e1c40e83beacfc4901e7daa1e097d2efb82bb
[ "MIT" ]
1
2022-02-12T06:27:26.000Z
2022-02-12T06:27:26.000Z
tests/unit/test_partition.py
ganik/DeepSpeed
788e1c40e83beacfc4901e7daa1e097d2efb82bb
[ "MIT" ]
null
null
null
tests/unit/test_partition.py
ganik/DeepSpeed
788e1c40e83beacfc4901e7daa1e097d2efb82bb
[ "MIT" ]
null
null
null
import pytest import torch import torch.distributed as dist from deepspeed.runtime.utils import partition_uniform from deepspeed.runtime.utils import partition_balanced from deepspeed.runtime.utils import prefix_sum_inc from deepspeed.runtime.utils import PartitionedTensor from .common import distributed_test @dis...
24.193717
91
0.637524
import pytest import torch import torch.distributed as dist from deepspeed.runtime.utils import partition_uniform from deepspeed.runtime.utils import partition_balanced from deepspeed.runtime.utils import prefix_sum_inc from deepspeed.runtime.utils import PartitionedTensor from .common import distributed_test @dis...
true
true
f766e4db115e9a72e26960b566e048d62162cd19
4,725
py
Python
src/p1020k1010readText/k1010m1010readText.py
bogdanbabych/p1020pipecwb
e441d573c1b4c1023efbc5a449cb022ef6bc49cd
[ "MIT" ]
null
null
null
src/p1020k1010readText/k1010m1010readText.py
bogdanbabych/p1020pipecwb
e441d573c1b4c1023efbc5a449cb022ef6bc49cd
[ "MIT" ]
null
null
null
src/p1020k1010readText/k1010m1010readText.py
bogdanbabych/p1020pipecwb
e441d573c1b4c1023efbc5a449cb022ef6bc49cd
[ "MIT" ]
null
null
null
''' Created on 18 Dec 2017 @author: bogdan tmx file transformed into : gizapp format; tag-seg xml format tab separated HunAlign format (possible to shift around, etc. in a spreadsheet) ''' import sys, os, re import pathlib import xml.etree.ElementTree as ET from et_xmlfile.tests.common_imports import ElementTree ...
36.346154
139
0.687619
import sys, os, re import pathlib import xml.etree.ElementTree as ET from et_xmlfile.tests.common_imports import ElementTree class clGenerateOutput(object): def __init__(self, SFNTemplate, LDSDataSegs, LSTypesOut=['gizapp.txt']): self.printSegs(SFNTemplate, LDSDataSegs, LSTypesOut) return def printSegs(self, S...
true
true
f766e52381a89b390e719a971d86d2a4e15b282f
7,487
py
Python
code/genric/molecule_models/summary.py
wendazhou/reversible-inductive-construction
14815d1b5ef5a35a569c0793888bc5548acd64be
[ "MIT" ]
31
2019-07-22T23:34:43.000Z
2021-09-10T14:28:53.000Z
code/genric/molecule_models/summary.py
wendazhou/reversible-inductive-construction
14815d1b5ef5a35a569c0793888bc5548acd64be
[ "MIT" ]
null
null
null
code/genric/molecule_models/summary.py
wendazhou/reversible-inductive-construction
14815d1b5ef5a35a569c0793888bc5548acd64be
[ "MIT" ]
3
2019-12-03T14:12:45.000Z
2020-07-17T14:50:18.000Z
import io import torch import posixpath from ..model.summary import ClassificationSummary, ConditionalAccuracySummary from . import action_representation as ar def _print_summary(summary, conditional_accuracies, marginal_labels=['S', 'D', 'IA', 'IB']): result = io.StringIO() def marginal_statistics(stats): ...
45.932515
111
0.706424
import io import torch import posixpath from ..model.summary import ClassificationSummary, ConditionalAccuracySummary from . import action_representation as ar def _print_summary(summary, conditional_accuracies, marginal_labels=['S', 'D', 'IA', 'IB']): result = io.StringIO() def marginal_statistics(stats): ...
true
true
f766e53c8ba033b416817852afa2dfa424aeeee0
12,621
py
Python
format_cef/cef.py
funkyHat/format_cef
f83e4ea9954bc8be47742c675841651beae92b85
[ "MIT" ]
null
null
null
format_cef/cef.py
funkyHat/format_cef
f83e4ea9954bc8be47742c675841651beae92b85
[ "MIT" ]
null
null
null
format_cef/cef.py
funkyHat/format_cef
f83e4ea9954bc8be47742c675841651beae92b85
[ "MIT" ]
null
null
null
import re from datetime import datetime from collections import namedtuple def format_cef( vendor, product, product_version, event_id, event_name, severity, extensions): """Produces a CEF compliant message from the arguments. :parameter str vendor: Vendor part of the product type identifier ...
48.171756
105
0.681404
import re from datetime import datetime from collections import namedtuple def format_cef( vendor, product, product_version, event_id, event_name, severity, extensions): extension_strs = { valid_extensions[name].key_name: _equals_escaper(valid_extensions[name].sanitiser(value, ...
true
true
f766e569766f3ae7e6161909da12eae844abd97a
1,483
py
Python
safelearn__.py
sahabi/opt
79f82bd9e0db77dada9554950b0b95d4e1435ca0
[ "MIT" ]
null
null
null
safelearn__.py
sahabi/opt
79f82bd9e0db77dada9554950b0b95d4e1435ca0
[ "MIT" ]
null
null
null
safelearn__.py
sahabi/opt
79f82bd9e0db77dada9554950b0b95d4e1435ca0
[ "MIT" ]
null
null
null
def evaluate(operand, a, b): if operand: return a else: return b def inv_evaluate(operand, a, b): if operand: return not a else: return not b class Shield(object): def __init__(self): self.s0 = False; def move(self,i1, i2, i3, o1, o2, o3): tmp2...
29.66
47
0.55091
def evaluate(operand, a, b): if operand: return a else: return b def inv_evaluate(operand, a, b): if operand: return not a else: return not b class Shield(object): def __init__(self): self.s0 = False; def move(self,i1, i2, i3, o1, o2, o3): tmp2...
true
true
f766e5baeb97d8b590ffca51b760f91388520790
15,089
py
Python
antlir/bzl/tests/shapes/test_shape_bzl.py
baioc/antlir
e3b47407b72c4aee835adf4e68fccd9abff457f2
[ "MIT" ]
28
2020-08-11T16:22:46.000Z
2022-03-04T15:41:52.000Z
antlir/bzl/tests/shapes/test_shape_bzl.py
baioc/antlir
e3b47407b72c4aee835adf4e68fccd9abff457f2
[ "MIT" ]
137
2020-08-11T16:07:49.000Z
2022-02-27T10:59:05.000Z
antlir/bzl/tests/shapes/test_shape_bzl.py
baioc/antlir
e3b47407b72c4aee835adf4e68fccd9abff457f2
[ "MIT" ]
10
2020-09-10T00:01:28.000Z
2022-03-08T18:00:28.000Z
#!/usr/bin/env python3 # 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. import json import unittest from .shape_bzl import ( Fail, _check_type, _codegen_shape, shape, str...
36.271635
120
0.546093
import json import unittest from .shape_bzl import ( Fail, _check_type, _codegen_shape, shape, struct, structs, _recursive_copy_transform, ) TestUnionType = shape.union_t(bool, int) class TestShapeBzl(unittest.TestCase): def setUp(self): self.maxDiff = None unittest...
true
true
f766e60abcfaef42ff44ef5341fcfc72e9d9f4ff
695
py
Python
src/utils_metrics.py
takumiw/nishika-cable-classification-1st-place
6438c36fa607b79cd1b2dad195881dacc6a48e9d
[ "MIT" ]
null
null
null
src/utils_metrics.py
takumiw/nishika-cable-classification-1st-place
6438c36fa607b79cd1b2dad195881dacc6a48e9d
[ "MIT" ]
null
null
null
src/utils_metrics.py
takumiw/nishika-cable-classification-1st-place
6438c36fa607b79cd1b2dad195881dacc6a48e9d
[ "MIT" ]
null
null
null
from typing import Dict, List, Optional import numpy as np from sklearn.metrics import accuracy_score, f1_score, log_loss def calc_metrics( y_true: np.ndarray, y_pred: np.ndarray, y_prob: Optional[np.ndarray] = None, metrics: List[str] = ["loss"] ) -> Dict[str, float]: result = {} for metric in metrics: ...
33.095238
110
0.62446
from typing import Dict, List, Optional import numpy as np from sklearn.metrics import accuracy_score, f1_score, log_loss def calc_metrics( y_true: np.ndarray, y_pred: np.ndarray, y_prob: Optional[np.ndarray] = None, metrics: List[str] = ["loss"] ) -> Dict[str, float]: result = {} for metric in metrics: ...
true
true
f766e6551624296fe67dc2104158d7214718bf84
11,050
py
Python
open_context_path.py
mheinzler/OpenContextFile
a49a20155b51a1b4a75fc589ae652629d6954129
[ "MIT" ]
3
2019-11-14T01:11:21.000Z
2021-02-06T00:45:46.000Z
open_context_path.py
mheinzler/OpenContextFile
a49a20155b51a1b4a75fc589ae652629d6954129
[ "MIT" ]
3
2020-03-26T00:20:25.000Z
2020-08-30T17:17:05.000Z
open_context_path.py
mheinzler/OpenContextFile
a49a20155b51a1b4a75fc589ae652629d6954129
[ "MIT" ]
1
2020-08-30T08:25:14.000Z
2020-08-30T08:25:14.000Z
"""Open file paths at the current cursor position.""" import functools import logging import os import re from itertools import chain import sublime import sublime_plugin platform = sublime.platform() log = logging.getLogger("OpenContextPath") class OpenContextPathCommand(sublime_plugin.TextCommand): """Open ...
36.229508
79
0.570588
import functools import logging import os import re from itertools import chain import sublime import sublime_plugin platform = sublime.platform() log = logging.getLogger("OpenContextPath") class OpenContextPathCommand(sublime_plugin.TextCommand): file_parts_unix = re.compile( r"((\w+|\.\.?)/*|\W...
true
true
f766e694e8dac8393d1ce58229f0efa755fd70f6
3,389
py
Python
bika/lims/controlpanel/bika_containertypes.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
bika/lims/controlpanel/bika_containertypes.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
bika/lims/controlpanel/bika_containertypes.py
hocinebendou/bika.gsoc
85bc0c587de7f52073ae0e89bddbc77bf875f295
[ "MIT" ]
null
null
null
from AccessControl.SecurityInfo import ClassSecurityInfo from Products.ATContentTypes.content import schemata from Products.Archetypes import atapi from Products.Archetypes.ArchetypeTool import registerType from Products.CMFCore.utils import getToolByName from bika.lims.browser.bika_listing import BikaListingView from ...
38.954023
87
0.604308
from AccessControl.SecurityInfo import ClassSecurityInfo from Products.ATContentTypes.content import schemata from Products.Archetypes import atapi from Products.Archetypes.ArchetypeTool import registerType from Products.CMFCore.utils import getToolByName from bika.lims.browser.bika_listing import BikaListingView from ...
true
true
f766e82308272387efde0be115654382fe205e0a
1,142
py
Python
src/videodrone/drones/pexip_garr_chrome.py
peppelinux/airdrone
97f867bd39d9dfa4c4335487074e77a855858cd1
[ "Apache-2.0" ]
17
2020-09-26T07:42:25.000Z
2021-06-10T08:53:07.000Z
src/videodrone/drones/pexip_garr_chrome.py
peppelinux/airdrone
97f867bd39d9dfa4c4335487074e77a855858cd1
[ "Apache-2.0" ]
1
2020-10-02T14:53:09.000Z
2020-11-12T15:27:58.000Z
src/videodrone/drones/pexip_garr_chrome.py
peppelinux/videodrone
97f867bd39d9dfa4c4335487074e77a855858cd1
[ "Apache-2.0" ]
null
null
null
import random from selenium.common.exceptions import NoSuchWindowException from selenium.webdriver.common.by import By from . import * URL = "https://web.vconf.garr.it/webapp/conference" logger = logging.getLogger(__name__) warnings.filterwarnings("ignore", category=UserWarning) def run(room='videodrone', y4m='./...
29.282051
81
0.69965
import random from selenium.common.exceptions import NoSuchWindowException from selenium.webdriver.common.by import By from . import * URL = "https://web.vconf.garr.it/webapp/conference" logger = logging.getLogger(__name__) warnings.filterwarnings("ignore", category=UserWarning) def run(room='videodrone', y4m='./...
true
true
f766e8a3bd7e0a848c8753782364dc2274b31db9
119
py
Python
BEGINNER/Valid Triangles/ValidTriangle.py
Sahilkumarrr13/CODECHEF
5c9c3afd88c6a840a0063ca38f13e16a1788ab2b
[ "MIT" ]
4
2021-06-10T11:15:51.000Z
2022-01-15T05:55:45.000Z
BEGINNER/Valid Triangles/ValidTriangle.py
Sahilkumarrr13/CODECHEF
5c9c3afd88c6a840a0063ca38f13e16a1788ab2b
[ "MIT" ]
null
null
null
BEGINNER/Valid Triangles/ValidTriangle.py
Sahilkumarrr13/CODECHEF
5c9c3afd88c6a840a0063ca38f13e16a1788ab2b
[ "MIT" ]
null
null
null
n=int(input()) for i in range(n): A,B,C= map(int,input().split()) if A+B+C==180: print("YES") else: print("NO")
14.875
32
0.563025
n=int(input()) for i in range(n): A,B,C= map(int,input().split()) if A+B+C==180: print("YES") else: print("NO")
true
true
f766e9ea85ae846a0a64f107a80b7d9022defb23
11,432
py
Python
google/cloud/dataproc_v1/proto/workflow_templates_pb2_grpc.py
vam-google/python-dataproc
53b0c6b32fedb6a867398fa2ad776d43238aa602
[ "Apache-2.0" ]
null
null
null
google/cloud/dataproc_v1/proto/workflow_templates_pb2_grpc.py
vam-google/python-dataproc
53b0c6b32fedb6a867398fa2ad776d43238aa602
[ "Apache-2.0" ]
null
null
null
google/cloud/dataproc_v1/proto/workflow_templates_pb2_grpc.py
vam-google/python-dataproc
53b0c6b32fedb6a867398fa2ad776d43238aa602
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.dataproc_v1.proto import ( workflow_templates_pb2 as google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2, ) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_oper...
56.039216
211
0.784377
import grpc from google.cloud.dataproc_v1.proto import ( workflow_templates_pb2 as google_dot_cloud_dot_dataproc__v1_dot_proto_dot_workflow__templates__pb2, ) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__pb2, ) from google.protobuf import empty_pb2 as google_dot_pro...
true
true
f766ea58a1e15070c6c7c0dbef353e799ff0f503
3,226
py
Python
ninjia/preprocess/extract_term_dictionary.py
taohu88/ninjia
43e68534aa3a446b237c5dce757c02b41b2e923b
[ "MIT" ]
null
null
null
ninjia/preprocess/extract_term_dictionary.py
taohu88/ninjia
43e68534aa3a446b237c5dce757c02b41b2e923b
[ "MIT" ]
null
null
null
ninjia/preprocess/extract_term_dictionary.py
taohu88/ninjia
43e68534aa3a446b237c5dce757c02b41b2e923b
[ "MIT" ]
null
null
null
import sys import json from .field_index import FieldIndex from collections import Counter def parse_field_indexes(fields): """" :param argv: the format of argv will look like 1,3,4-7, where 1, 3, 4-7 are column indexes :return: FieldIndex(name, (1), (3), (4, 7)) """ name = 'Dummy' ...
28.803571
95
0.555797
import sys import json from .field_index import FieldIndex from collections import Counter def parse_field_indexes(fields): name = 'Dummy' return FieldIndex.to_filed_index(name, fields) def process_one_column(item, sep, weight_sep): terms = item.split(sep) r = Counter() for t in te...
true
true
f766ec6b906dd71ecb7c6971e3570af9a4cb49cd
8,359
py
Python
main.py
ZebraBonbon5990/M
c1439c35abbf7cbee50eb417c613a5bd285f94a1
[ "BSD-Source-Code" ]
null
null
null
main.py
ZebraBonbon5990/M
c1439c35abbf7cbee50eb417c613a5bd285f94a1
[ "BSD-Source-Code" ]
null
null
null
main.py
ZebraBonbon5990/M
c1439c35abbf7cbee50eb417c613a5bd285f94a1
[ "BSD-Source-Code" ]
null
null
null
import tkinter as tk import random as rd #import playsound as ps from functools import partial def initiate(mode): global flag window = tk.Tk() window.attributes("-fullscreen", True) window.title("Minesweeper - {0}".format(mode)) window.iconbitmap("mine.ico") revealedButtons = li...
38.16895
187
0.512741
import tkinter as tk import random as rd from functools import partial def initiate(mode): global flag window = tk.Tk() window.attributes("-fullscreen", True) window.title("Minesweeper - {0}".format(mode)) window.iconbitmap("mine.ico") revealedButtons = list() if mode == "e...
true
true
f766ec780f1ab2dd8cdef8c3c3eb3316506797c7
1,234
py
Python
azure/mgmt/network/v2017_10_01/models/express_route_circuits_routes_table_summary_list_result.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_10_01/models/express_route_circuits_routes_table_summary_list_result.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_10_01/models/express_route_circuits_routes_table_summary_list_result.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "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. # C...
36.294118
88
0.604538
from msrest.serialization import Model class ExpressRouteCircuitsRoutesTableSummaryListResult(Model): _attribute_map = { 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__(self, value=N...
true
true
f766ed3296b6960b1f3edeab16a573b5be0a75e2
4,449
py
Python
code.py
DipeshV/olympic-hero
73a82f36afed429b59895c68faffe838b90fc72b
[ "MIT" ]
null
null
null
code.py
DipeshV/olympic-hero
73a82f36afed429b59895c68faffe838b90fc72b
[ "MIT" ]
null
null
null
code.py
DipeshV/olympic-hero
73a82f36afed429b59895c68faffe838b90fc72b
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Path of the file path #Code starts here data = pd.read_csv(path) data.rename(columns={'Total':'Total_Medals'}, inplace=True) print(data.head()) # -------------- #Code starts here data['Bett...
24.994382
108
0.710272
import pandas as pd import numpy as np import matplotlib.pyplot as plt path data = pd.read_csv(path) data.rename(columns={'Total':'Total_Medals'}, inplace=True) print(data.head()) data['Better_Event'] = np.where(data['Total_Summer'] > data['Total_Winter'], 'Summer', 'Winter') data['Better_Event'] = np.wh...
true
true
f766ef88c2c74ee24971cd9abe8e894b51f03058
1,146
py
Python
homeassistant/components/abode/lock.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
22,481
2020-03-02T13:09:59.000Z
2022-03-31T23:34:28.000Z
homeassistant/components/abode/lock.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/abode/lock.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
11,411
2020-03-02T14:19:20.000Z
2022-03-31T22:46:07.000Z
"""Support for the Abode Security System locks.""" import abodepy.helpers.constants as CONST from homeassistant.components.lock import LockEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from...
26.045455
71
0.709424
import abodepy.helpers.constants as CONST from homeassistant.components.lock import LockEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from . import AbodeDevice from .const import DOMAIN a...
true
true
f766f045d96cd458f7b6e8dd43363222af88de77
87
py
Python
mickey/apps.py
farhapartex/mickey
6a151145d11687760eae14749b7ee150c9d5a044
[ "MIT" ]
10
2020-03-31T20:51:10.000Z
2020-08-06T00:38:41.000Z
mickey/apps.py
farhapartex/mickey
6a151145d11687760eae14749b7ee150c9d5a044
[ "MIT" ]
null
null
null
mickey/apps.py
farhapartex/mickey
6a151145d11687760eae14749b7ee150c9d5a044
[ "MIT" ]
3
2020-04-01T04:33:04.000Z
2020-05-07T19:09:14.000Z
from django.apps import AppConfig class MickeyConfig(AppConfig): name = 'mickey'
14.5
33
0.747126
from django.apps import AppConfig class MickeyConfig(AppConfig): name = 'mickey'
true
true
f766f063b3fa1b4f2efffea073b7cfcd5295648d
46,032
py
Python
sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_servers_operations.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_servers_operations.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_servers_operations.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
1
2021-12-18T20:01:22.000Z
2021-12-18T20:01:22.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.656958
198
0.661149
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
f766f0ac67e2f7d11102eff884d03e1a7671eb1c
12,425
py
Python
igibson/render/mesh_renderer/mesh_renderer_vr.py
StanfordVL/InteractiveGibsonEnv
58ac14cf62949008b6851a5a95602cd5084edffd
[ "MIT" ]
51
2019-06-17T06:01:40.000Z
2020-03-29T03:34:20.000Z
igibson/render/mesh_renderer/mesh_renderer_vr.py
StanfordVL/InteractiveGibsonEnv
58ac14cf62949008b6851a5a95602cd5084edffd
[ "MIT" ]
25
2019-06-28T18:39:03.000Z
2020-03-19T17:53:55.000Z
igibson/render/mesh_renderer/mesh_renderer_vr.py
StanfordVL/InteractiveGibsonEnv
58ac14cf62949008b6851a5a95602cd5084edffd
[ "MIT" ]
12
2019-08-01T21:03:44.000Z
2020-04-01T11:05:18.000Z
import logging import os import time from igibson.render.mesh_renderer.mesh_renderer_cpu import MeshRenderer, MeshRendererSettings from igibson.utils.constants import AVAILABLE_MODALITIES from igibson.utils.utils import dump_config, parse_config, parse_str_config class VrOverlayBase(object): """ Base class r...
40.340909
138
0.657143
import logging import os import time from igibson.render.mesh_renderer.mesh_renderer_cpu import MeshRenderer, MeshRendererSettings from igibson.utils.constants import AVAILABLE_MODALITIES from igibson.utils.utils import dump_config, parse_config, parse_str_config class VrOverlayBase(object): def __init__(self, ...
true
true
f766f0faf3cd4875039cd35c9dc82786fee31c98
449
py
Python
build/j2n6s300_ikfast/catkin_generated/pkg.develspace.context.pc.py
FProgrammerLIU/caster_man_ros
a75b503fad3a470f985072a2b3953e89074f3223
[ "MIT" ]
null
null
null
build/j2n6s300_ikfast/catkin_generated/pkg.develspace.context.pc.py
FProgrammerLIU/caster_man_ros
a75b503fad3a470f985072a2b3953e89074f3223
[ "MIT" ]
null
null
null
build/j2n6s300_ikfast/catkin_generated/pkg.develspace.context.pc.py
FProgrammerLIU/caster_man_ros
a75b503fad3a470f985072a2b3953e89074f3223
[ "MIT" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "moveit_core;pluginlib;roscpp;tf_conversions".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NA...
49.888889
88
0.739421
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "moveit_core;pluginlib;roscpp;tf_conversions".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "j2n6s300_ikfast" PROJECT_SPACE_DIR = "/home/caster/...
true
true
f766f116cab563c025451ae955aa0d07d125bce2
6,175
py
Python
command_generator/command.py
Miro-Andrin/feather
b4de9d5ce3800dcffa5d4440d68568a5f4fcc647
[ "Apache-2.0" ]
null
null
null
command_generator/command.py
Miro-Andrin/feather
b4de9d5ce3800dcffa5d4440d68568a5f4fcc647
[ "Apache-2.0" ]
1
2021-09-23T23:34:23.000Z
2021-09-23T23:34:23.000Z
command_generator/command.py
Miro-Andrin/feather
b4de9d5ce3800dcffa5d4440d68568a5f4fcc647
[ "Apache-2.0" ]
1
2021-04-26T14:15:43.000Z
2021-04-26T14:15:43.000Z
""" A command is a list of nodes that mostly terminate on a node that is executable, unless they are the start of a infinite loop. At the time of writing this that is only applicable to the execute commands. At the time i wrote this code leutenant had no way of including commands like these, so it was/is important t...
34.691011
144
0.597571
import json, os, pathlib,sys,textwrap from node import Node import parser_mapping import re def _recursive_decent(root:Node,node:Node=None,result=[],path=[],redirected=[]): if node == None: for x in root.children: _recursive_decent(root,x,result,path.copy(),redirected) return result, ...
true
true
f766f5877ca01818cc0fc0e567e9d3bdcfe03e2a
886
py
Python
PC/testpy.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
1
2018-06-21T18:21:24.000Z
2018-06-21T18:21:24.000Z
PC/testpy.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
PC/testpy.py
sireliah/polish-python
605df4944c2d3bc25f8bf6964b274c0a0d297cc3
[ "PSF-2.0" ]
null
null
null
zaimportuj sys # This jest a test module dla Python. It looks w the standard # places dla various *.py files. If these are moved, you must # change this module too. spróbuj: zaimportuj os wyjąwszy: print("""Could nie zaimportuj the standard "os" module. Please check your PYTHONPATH environment variable.""...
26.848485
77
0.677201
zaimportuj sys spróbuj: zaimportuj os wyjąwszy: print("""Could nie zaimportuj the standard "os" module. Please check your PYTHONPATH environment variable.""") sys.exit(1) spróbuj: zaimportuj symbol wyjąwszy: print("""Could nie zaimportuj the standard "symbol" module. If this jest a PC, you s...
false
true
f766f6a1318cbb39083b822836df47cdd8add02d
2,370
py
Python
dmg/realism/discriminativeModel.py
Antolin1/DMG-Python
ba3942e13006e1a32f3fe9f1b29615311f667274
[ "MIT" ]
null
null
null
dmg/realism/discriminativeModel.py
Antolin1/DMG-Python
ba3942e13006e1a32f3fe9f1b29615311f667274
[ "MIT" ]
null
null
null
dmg/realism/discriminativeModel.py
Antolin1/DMG-Python
ba3942e13006e1a32f3fe9f1b29615311f667274
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 17 10:33:24 2021 @author: Jose Antonio """ #of the paper Towards Char... using GNNs import torch_geometric.nn as pyg_nn import torch import torch.nn as nn import torch.nn.functional as F from torch_scatter.composite import scatter_softmax class ...
30
92
0.602532
import torch_geometric.nn as pyg_nn import torch import torch.nn as nn import torch.nn.functional as F from torch_scatter.composite import scatter_softmax class DiscriminativeModel(nn.Module): def __init__(self, dim_input, hidden_dim,dropout, vocab_nodes, ...
true
true
f766f6f927730954e748b04946b2b7c647b9c18e
1,186
py
Python
train/__main__.py
mitiku1/Emopy-Multi-Input-
b520eb3f3d121c9d456a52315f1fd78ef43f74fd
[ "MIT" ]
7
2018-05-04T15:15:32.000Z
2021-03-13T08:10:35.000Z
train/__main__.py
mitiku1/Emopy-Multi-Input-
b520eb3f3d121c9d456a52315f1fd78ef43f74fd
[ "MIT" ]
1
2019-03-29T13:00:14.000Z
2019-03-29T13:00:14.000Z
train/__main__.py
mitiku1/Emopy-Multi-Input-
b520eb3f3d121c9d456a52315f1fd78ef43f74fd
[ "MIT" ]
6
2018-04-26T09:17:19.000Z
2020-08-07T01:45:17.000Z
import argparse from train import start_training import cv2 from skimage import feature import numpy as np import dlib import tensorflow as tf import keras def get_cmd_args(): """ Parse user command line arguments""" parser = argparse.ArgumentParser() parser.add_argument("-d","--dataset_dir",default="dat...
29.65
109
0.684654
import argparse from train import start_training import cv2 from skimage import feature import numpy as np import dlib import tensorflow as tf import keras def get_cmd_args(): parser = argparse.ArgumentParser() parser.add_argument("-d","--dataset_dir",default="dataset",type=str) parser.add_argument("-e",...
true
true
f766f721f7cdafd39d756a360162b4fb823bd266
386
py
Python
clist/migrations/0023_auto_20191209_0955.py
horacexd/clist
9759dfea97b86514bec9825d2430abc36decacf0
[ "Apache-2.0" ]
166
2019-05-16T23:46:08.000Z
2022-03-31T05:20:23.000Z
clist/migrations/0023_auto_20191209_0955.py
horacexd/clist
9759dfea97b86514bec9825d2430abc36decacf0
[ "Apache-2.0" ]
92
2020-01-18T22:51:53.000Z
2022-03-12T01:23:57.000Z
clist/migrations/0023_auto_20191209_0955.py
VadVergasov/clist
4afcdfe88250d224043b28efa511749347cec71c
[ "Apache-2.0" ]
23
2020-02-09T17:38:43.000Z
2021-12-09T14:39:07.000Z
# Generated by Django 2.1.7 on 2019-12-09 09:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('clist', '0022_auto_20191203_1112'), ] operations = [ migrations.AlterField( model_name='contest', name='title', ...
20.315789
52
0.598446
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('clist', '0022_auto_20191203_1112'), ] operations = [ migrations.AlterField( model_name='contest', name='title', field=models.CharField(max_length=2048),...
true
true
f766f7abd6d8cc732fdb3e87d968f54995ad9e84
921
py
Python
pages/admin.py
JSotres/Academic-Group-Django-Website
38af959cb6a596642fc11c522b28224cc733e89a
[ "MIT" ]
5
2020-10-26T20:21:50.000Z
2021-12-14T11:12:39.000Z
pages/admin.py
JSotres/Academic-Group-Django-Website
38af959cb6a596642fc11c522b28224cc733e89a
[ "MIT" ]
12
2020-01-13T00:57:14.000Z
2022-03-12T00:11:34.000Z
pages/admin.py
JSotres/Academic-Group-Django-Website
38af959cb6a596642fc11c522b28224cc733e89a
[ "MIT" ]
1
2021-05-13T18:27:11.000Z
2021-05-13T18:27:11.000Z
from django.contrib import admin from .models import ContactRequest, Publications, Member, GroupInformation, ResearchField from tinymce.widgets import TinyMCE from django.db import models class PublicationsAdmin(admin.ModelAdmin): ordering = ['-year'] class MembersAdmin(admin.ModelAdmin): ordering = ['-init...
26.314286
89
0.754615
from django.contrib import admin from .models import ContactRequest, Publications, Member, GroupInformation, ResearchField from tinymce.widgets import TinyMCE from django.db import models class PublicationsAdmin(admin.ModelAdmin): ordering = ['-year'] class MembersAdmin(admin.ModelAdmin): ordering = ['-init...
true
true
f766f816109353c09c46c0f3adc8cfdd6645d624
8,848
py
Python
tests/components/modbus/test_fan.py
Nils154/core
dbb2c64d862387e19723f37c4900ede3ea940c18
[ "Apache-2.0" ]
1
2022-02-20T14:35:42.000Z
2022-02-20T14:35:42.000Z
tests/components/modbus/test_fan.py
Nils154/core
dbb2c64d862387e19723f37c4900ede3ea940c18
[ "Apache-2.0" ]
null
null
null
tests/components/modbus/test_fan.py
Nils154/core
dbb2c64d862387e19723f37c4900ede3ea940c18
[ "Apache-2.0" ]
null
null
null
"""The tests for the Modbus fan component.""" from pymodbus.exceptions import ModbusException import pytest from homeassistant.components.fan import DOMAIN as FAN_DOMAIN from homeassistant.components.modbus.const import ( CALL_TYPE_COIL, CALL_TYPE_DISCRETE, CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTE...
28.358974
81
0.510624
from pymodbus.exceptions import ModbusException import pytest from homeassistant.components.fan import DOMAIN as FAN_DOMAIN from homeassistant.components.modbus.const import ( CALL_TYPE_COIL, CALL_TYPE_DISCRETE, CALL_TYPE_REGISTER_HOLDING, CALL_TYPE_REGISTER_INPUT, CONF_FANS, CONF_INPUT_TYPE, ...
true
true
f766f94684ea08d7f2a61d17c37ba31ef3d873ed
102
py
Python
1/time.py
voodoopeople42/Vproject
349e80a0d3cfd590cb9dbe667acfbdb7393308e3
[ "MIT" ]
null
null
null
1/time.py
voodoopeople42/Vproject
349e80a0d3cfd590cb9dbe667acfbdb7393308e3
[ "MIT" ]
null
null
null
1/time.py
voodoopeople42/Vproject
349e80a0d3cfd590cb9dbe667acfbdb7393308e3
[ "MIT" ]
null
null
null
n = int(input("Input number:" )) hours = n % (60 * 24) // 60 minutes = n % 60 print(hours, minutes)
17
32
0.578431
n = int(input("Input number:" )) hours = n % (60 * 24) // 60 minutes = n % 60 print(hours, minutes)
true
true
f766f993df2bab81168b7f15dc75d2483f08e311
15,476
py
Python
defaultdol/tools/elf2bin.py
knight-ryu12/StarFoxAdventures
83648dabda9777d7de5da1bf9b83ddb82d7dd2a0
[ "MIT" ]
22
2019-11-29T21:20:59.000Z
2022-01-25T06:39:02.000Z
defaultdol/tools/elf2bin.py
knight-ryu12/StarFoxAdventures
83648dabda9777d7de5da1bf9b83ddb82d7dd2a0
[ "MIT" ]
7
2021-01-26T11:57:25.000Z
2022-02-07T11:00:06.000Z
defaultdol/tools/elf2bin.py
knight-ryu12/StarFoxAdventures
83648dabda9777d7de5da1bf9b83ddb82d7dd2a0
[ "MIT" ]
3
2021-01-03T23:47:37.000Z
2021-08-06T09:02:11.000Z
#!/usr/bin/env python3 """Read boot.bin and src.elf and produce debug.bin.""" import os import sys import struct from enum import IntEnum, IntFlag def printf(fmt, *args, **kwargs): print(fmt % args, end='', **kwargs) def readStruct(fmt, file, offset=None): """Read struct from file.""" if offset is not N...
36.672986
96
0.537736
import os import sys import struct from enum import IntEnum, IntFlag def printf(fmt, *args, **kwargs): print(fmt % args, end='', **kwargs) def readStruct(fmt, file, offset=None): if offset is not None: file.seek(offset) sLen = struct.calcsize(fmt) r = struct.unpack(fmt, file.read(sLen)) if len(r...
true
true
f766f9ef38241c31ec5d4822a871670ad0817619
16,224
py
Python
experiments/21_use_other_frequencies/train_models.py
meliao/fourier_neural_operator
216915c6f1acd0651c7203bc8f16824efc495c5f
[ "MIT" ]
null
null
null
experiments/21_use_other_frequencies/train_models.py
meliao/fourier_neural_operator
216915c6f1acd0651c7203bc8f16824efc495c5f
[ "MIT" ]
null
null
null
experiments/21_use_other_frequencies/train_models.py
meliao/fourier_neural_operator
216915c6f1acd0651c7203bc8f16824efc495c5f
[ "MIT" ]
null
null
null
""" @author: Zongyi Li This file is the Fourier Neural Operator for 1D problem such as the (time-independent) Burgers equation discussed in Section 5.1 in the [paper](https://arxiv.org/pdf/2010.08895.pdf). """ import logging import os import numpy as np import torch import torch.nn as nn import torch.nn.functional as ...
36.95672
182
0.546105
import logging import os import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter import scipy.io as sio import operator from functools import reduce from functools import partial from timeit import default_timer torch.manual_seed(0) np.random.see...
true
true
f766fa52561e9a7c1d3a91a44d7e451f7d166614
4,022
py
Python
alipay/aop/api/request/AlipayMarketingCampaignRuleCrowdCountRequest.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/request/AlipayMarketingCampaignRuleCrowdCountRequest.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/request/AlipayMarketingCampaignRuleCrowdCountRequest.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayMarketingCampaignRuleCrowdCountModel import AlipayMarketingCampaignRuleCrowdCountModel class AlipayMarketingCampaignRuleCrowdC...
27.737931
148
0.648931
import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayMarketingCampaignRuleCrowdCountModel import AlipayMarketingCampaignRuleCrowdCountModel class AlipayMarketingCampaignRuleCrowdCountRequest(object): def __init__(self, b...
true
true
f766fa6166a656127e3f797b03dbd8f21bcb63d2
1,042
py
Python
dashboard_api/widget_def/migrations/0018_auto_20150625_1327.py
data61/Openboard
aaf7ef49e05c0771094efc6be811c6ae88055252
[ "Apache-2.0" ]
2
2017-08-29T23:05:51.000Z
2019-04-02T21:11:35.000Z
dashboard_api/widget_def/migrations/0018_auto_20150625_1327.py
data61/Openboard
aaf7ef49e05c0771094efc6be811c6ae88055252
[ "Apache-2.0" ]
1
2019-04-02T21:11:26.000Z
2019-04-03T15:12:57.000Z
dashboard_api/widget_def/migrations/0018_auto_20150625_1327.py
data61/Openboard
aaf7ef49e05c0771094efc6be811c6ae88055252
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('widget_def', '0017_auto_20150622_1444'), ] operations = [ migrations.AddField( model_name='tiledefinition', ...
41.68
433
0.627639
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('widget_def', '0017_auto_20150622_1444'), ] operations = [ migrations.AddField( model_name='tiledefinition', name='template',...
true
true
f766fa73e31da11c7cb79769966139a2f1fc929a
4,385
py
Python
setup.py
kingfener/espresso
da8352a6e97c82e5d92c39972666a772e6bb508a
[ "MIT" ]
null
null
null
setup.py
kingfener/espresso
da8352a6e97c82e5d92c39972666a772e6bb508a
[ "MIT" ]
null
null
null
setup.py
kingfener/espresso
da8352a6e97c82e5d92c39972666a772e6bb508a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # 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. import os from setuptools import setup, find_packages, Extension import sys if sys.version_info < (3, 6): sys.exi...
26.737805
101
0.610718
import os from setuptools import setup, find_packages, Extension import sys if sys.version_info < (3, 6): sys.exit('Sorry, Python >= 3.6 is required for fairseq.') with open('README.md') as f: readme = f.read() if sys.platform == 'darwin': extra_compile_args = ['-stdlib=libc++', '-O3'] else: extr...
true
true
f766fac7a8a97a78a2306207cb571063b5c18a66
1,289
py
Python
scripts/snakemake/merge-sample-bg-files-stable.py
SamBryce-Smith/polyAsite_workflow
6ea639e16d176e81591339cf657201a61aebd7a8
[ "Apache-2.0" ]
10
2019-11-05T03:22:32.000Z
2021-12-17T10:05:50.000Z
scripts/snakemake/merge-sample-bg-files-stable.py
SamBryce-Smith/polyAsite_workflow
6ea639e16d176e81591339cf657201a61aebd7a8
[ "Apache-2.0" ]
null
null
null
scripts/snakemake/merge-sample-bg-files-stable.py
SamBryce-Smith/polyAsite_workflow
6ea639e16d176e81591339cf657201a61aebd7a8
[ "Apache-2.0" ]
1
2021-06-03T14:17:55.000Z
2021-06-03T14:17:55.000Z
import gzip map={} sites = [] reads = {} header_lines = [] # Get info from original 3pSites file with gzip.open(snakemake.input.raw_table, "rt") as infile: for line in infile: # Header lines if line.startswith("#"): l= line.rstrip().split(";") col=int(l[0].lstrip("#")) ...
32.225
85
0.55159
import gzip map={} sites = [] reads = {} header_lines = [] with gzip.open(snakemake.input.raw_table, "rt") as infile: for line in infile: if line.startswith("#"): l= line.rstrip().split(";") col=int(l[0].lstrip("#")) sample=l[1].split("/")[-1].split(".")[0] ...
true
true
f766fb0e84ddfb8b9d499c9850083075f323931a
771
py
Python
server/apps/poller/migrations/0003_adobecampaign.py
uktrade/legal-basis-api
a5bad3566f153859ca54dcd92832dcdc1e6eb78c
[ "MIT" ]
2
2021-07-29T08:01:44.000Z
2021-08-09T08:16:24.000Z
server/apps/poller/migrations/0003_adobecampaign.py
uktrade/legal-basis-api
a5bad3566f153859ca54dcd92832dcdc1e6eb78c
[ "MIT" ]
12
2019-12-20T12:14:00.000Z
2022-02-15T15:48:54.000Z
server/apps/poller/migrations/0003_adobecampaign.py
uktrade/legal-basis-api
a5bad3566f153859ca54dcd92832dcdc1e6eb78c
[ "MIT" ]
null
null
null
# Generated by Django 2.2.15 on 2020-08-11 00:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('poller', '0002_auto_20200217_1127'), ] operations = [ migrations.CreateModel( name='AdobeCampaign', fields=[ ...
32.125
114
0.590143
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('poller', '0002_auto_20200217_1127'), ] operations = [ migrations.CreateModel( name='AdobeCampaign', fields=[ ('id', models.AutoField(auto_created=Tr...
true
true
f766fb900298b74c910057c701abf9f5aeb583df
837
py
Python
blog/urls.py
suhail-n/django-starter-blog
e841bc57c060df1f26318ac00aa649549ef9e937
[ "MIT" ]
null
null
null
blog/urls.py
suhail-n/django-starter-blog
e841bc57c060df1f26318ac00aa649549ef9e937
[ "MIT" ]
null
null
null
blog/urls.py
suhail-n/django-starter-blog
e841bc57c060df1f26318ac00aa649549ef9e937
[ "MIT" ]
null
null
null
"""blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vi...
33.48
77
0.695341
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('rest_framework.urls')), path('', include('api.urls')), ]
true
true