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
f7741b841ea951fec20b7329d03fe2513c66e260
63
py
Python
dp/edit_distance.py
santoshmano/pybricks
bcb3ab80417e8e896280062494ce6c046329b7e8
[ "MIT" ]
null
null
null
dp/edit_distance.py
santoshmano/pybricks
bcb3ab80417e8e896280062494ce6c046329b7e8
[ "MIT" ]
null
null
null
dp/edit_distance.py
santoshmano/pybricks
bcb3ab80417e8e896280062494ce6c046329b7e8
[ "MIT" ]
null
null
null
def edit_distance(s1, s2): if __name__ = "__main__":
5.727273
26
0.603175
def edit_distance(s1, s2): if __name__ = "__main__":
false
true
f7741c0c742be04d7cb060f02e7d75a6ed00f1cc
8,301
py
Python
lux_ai/effnetv2_configs.py
limash/lux-ai
c9f0ccd659e03919b0b80d84b770a9ba506b041a
[ "Apache-2.0" ]
null
null
null
lux_ai/effnetv2_configs.py
limash/lux-ai
c9f0ccd659e03919b0b80d84b770a9ba506b041a
[ "Apache-2.0" ]
null
null
null
lux_ai/effnetv2_configs.py
limash/lux-ai
c9f0ccd659e03919b0b80d84b770a9ba506b041a
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google Research. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
33.607287
80
0.644019
import functools import re import lux_ai.hparams as hparams cfg_register = functools.partial(hparams.register, prefix='cfg:') class BlockDecoder(object): def _decode_block_string(self, block_string): assert isinstance(block_string, str) ops = block_string.split('_') options = {} for op in ops: ...
true
true
f7741c31a4d1a9781cc571b2787c60af7ac1752a
936
py
Python
test/test_suggestions_response.py
CoveoWhisper/WhisperAutomaticTest
7575d5958a4c10b8230c0440f67e40a19e85118a
[ "MIT" ]
null
null
null
test/test_suggestions_response.py
CoveoWhisper/WhisperAutomaticTest
7575d5958a4c10b8230c0440f67e40a19e85118a
[ "MIT" ]
4
2018-04-11T18:11:22.000Z
2018-08-31T02:38:34.000Z
test/test_suggestions_response.py
CoveoWhisper/WhisperAutomaticTest
7575d5958a4c10b8230c0440f67e40a19e85118a
[ "MIT" ]
null
null
null
import unittest from datetime import timedelta from whisper_automatic_test.suggestion import Suggestion from whisper_automatic_test.suggestions_response import SuggestionsResponse class TestSuggestionsResponse(unittest.TestCase): def test_getters(self): suggestions = [ Suggestion('link', 'som...
44.571429
99
0.747863
import unittest from datetime import timedelta from whisper_automatic_test.suggestion import Suggestion from whisper_automatic_test.suggestions_response import SuggestionsResponse class TestSuggestionsResponse(unittest.TestCase): def test_getters(self): suggestions = [ Suggestion('link', 'som...
true
true
f7741f75c025365ce4046e0e743e03f62aa0fc3d
328
py
Python
Notes/IMO21/img/Matplotlib/sephp.py
FunByJohn/QaDiL
9e22bb061c5a2c32473c7ab3aa9b9cce4e98c963
[ "MIT" ]
7
2021-05-31T08:27:09.000Z
2022-03-20T22:05:28.000Z
Notes/IMO21/img/Matplotlib/sephp.py
FunByJohn/QaDiL
9e22bb061c5a2c32473c7ab3aa9b9cce4e98c963
[ "MIT" ]
12
2021-06-05T20:37:11.000Z
2022-02-13T16:38:52.000Z
Notes/IMO21/img/Matplotlib/sephp.py
FunByJohn/QaDiL
9e22bb061c5a2c32473c7ab3aa9b9cce4e98c963
[ "MIT" ]
2
2021-06-10T08:26:46.000Z
2021-12-25T02:04:32.000Z
#import numpy as np import matplotlib #matplotlib.rcParams['text.usetex'] = True import matplotlib.pyplot as plt plt.plot([1.35, 1.42, 1.45, 1.52], [35, 50, 40, 45], 'ro') plt.plot([1.68, 1.70, 1.73, 1.73], [65, 70, 60, 80], 'bo') plt.axis([1.3, 1.8, 30, 90]) plt.xlabel("height (m)") plt.ylabel("weight (kg)") plt...
19.294118
58
0.618902
import matplotlib import matplotlib.pyplot as plt plt.plot([1.35, 1.42, 1.45, 1.52], [35, 50, 40, 45], 'ro') plt.plot([1.68, 1.70, 1.73, 1.73], [65, 70, 60, 80], 'bo') plt.axis([1.3, 1.8, 30, 90]) plt.xlabel("height (m)") plt.ylabel("weight (kg)") plt.show()
true
true
f7742161a31a66e660b8b2ca2d37dd1ab014dbd7
17,511
py
Python
tensorflow_probability/python/internal/special_math.py
timudk/probability
8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/special_math.py
timudk/probability
8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/special_math.py
timudk/probability
8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # 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 o...
36.179752
80
0.632802
# > not misusing your important software. In former conversation with Eugene # > Brevdo (ebrevdo@google.com), you wrote "If your licensing is similar to BSD, # > the formal way that has been handled is simply to add a statement to the # > effect that you are incorporating the Cephes software by permission of the # > au...
true
true
f7742214f1ca4278c0975d078fd6d97772d75c5a
13,656
py
Python
Questionnaire_type1/models.py
AdityaKapoor74/Supervised_Categorization_Study_Pt2
abedfa64d708360694e5cc00cfae866c5cfaebe8
[ "MIT" ]
null
null
null
Questionnaire_type1/models.py
AdityaKapoor74/Supervised_Categorization_Study_Pt2
abedfa64d708360694e5cc00cfae866c5cfaebe8
[ "MIT" ]
null
null
null
Questionnaire_type1/models.py
AdityaKapoor74/Supervised_Categorization_Study_Pt2
abedfa64d708360694e5cc00cfae866c5cfaebe8
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class UserDetails(models.Model): class Meta: verbose_name_plural = "User Details" first_name = models.CharField(max_length=100,blank=True,null=True,default=None) last_name = models.CharField(max_length=100,blank=True,null=True,default=None) ...
38.576271
93
0.756298
from django.db import models class UserDetails(models.Model): class Meta: verbose_name_plural = "User Details" first_name = models.CharField(max_length=100,blank=True,null=True,default=None) last_name = models.CharField(max_length=100,blank=True,null=True,default=None) email = models.EmailFie...
true
true
f7742236f1176073eae84fdc7c3a3a1a2e294fe0
9,208
py
Python
PaddleCV/video/metrics/youtube8m/eval_util.py
suytingwan/models
ccdbfe77d071cc19b55fb9f4b738912e35d982ef
[ "Apache-2.0" ]
7
2020-03-03T03:17:54.000Z
2021-11-11T15:53:45.000Z
PaddleCV/video/metrics/youtube8m/eval_util.py
suytingwan/models
ccdbfe77d071cc19b55fb9f4b738912e35d982ef
[ "Apache-2.0" ]
2
2019-06-26T03:21:49.000Z
2019-09-19T09:43:42.000Z
PaddleCV/video/metrics/youtube8m/eval_util.py
suytingwan/models
ccdbfe77d071cc19b55fb9f4b738912e35d982ef
[ "Apache-2.0" ]
6
2021-01-06T03:55:54.000Z
2021-11-25T03:24:20.000Z
# Copyright 2016 Google Inc. 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 applicable law or ...
37.430894
89
0.683753
import datetime import numpy from . import mean_average_precision_calculator as map_calculator from . import average_precision_calculator as ap_calculator def flatten(l): return [item for sublist in l for item in sublist] def calculate_hit_at_one(predictions, actuals): top_prediction = numpy.argmax(predict...
true
true
f7742287f9159c2a7b806d8f7b2b8f4fcd5708db
7,382
py
Python
models/resnet.py
Faiz99khan/ISL_hand_gesture_recognition_in_real-time
dade99478e9b37440ebe7fb7842d451582132f0a
[ "MIT" ]
3
2021-01-01T06:07:23.000Z
2021-02-05T08:45:04.000Z
models/resnet.py
Faiz99khan/ISL_hand_gesture_recognition_in_real-time
dade99478e9b37440ebe7fb7842d451582132f0a
[ "MIT" ]
null
null
null
models/resnet.py
Faiz99khan/ISL_hand_gesture_recognition_in_real-time
dade99478e9b37440ebe7fb7842d451582132f0a
[ "MIT" ]
2
2021-01-17T22:06:36.000Z
2022-01-05T02:51:00.000Z
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import math from functools import partial __all__ = [ 'ResNet', 'resnet10', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnet200' ] def conv3x3x3(in_planes, out_planes, stride=1): # ...
28.068441
87
0.56421
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import math from functools import partial __all__ = [ 'ResNet', 'resnet10', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnet200' ] def conv3x3x3(in_planes, out_planes, stride=1): ...
true
true
f774234c53718ff32688b13a5561b3c6518d707f
3,747
py
Python
export/anki/anki_connect.py
patarapolw/HanziSRS
50f84a9171b61df3305e8922b645b553e895a509
[ "Apache-2.0" ]
10
2018-03-31T05:06:15.000Z
2022-03-17T13:31:38.000Z
export/anki/anki_connect.py
patarapolw/HanziSRS
50f84a9171b61df3305e8922b645b553e895a509
[ "Apache-2.0" ]
null
null
null
export/anki/anki_connect.py
patarapolw/HanziSRS
50f84a9171b61df3305e8922b645b553e895a509
[ "Apache-2.0" ]
3
2018-09-20T08:32:09.000Z
2020-06-02T02:33:24.000Z
from itertools import chain from AnkiTools import AnkiConnect as ac import re from analyze.user_db import User from analyze.tag import HskVocab, Category, HanziLevelProject from analyze.lookup import Cedict, SpoonFed class AnkiConnect(): def __init__(self): self.user = User() self.hsk = HskVocab(...
37.09901
104
0.536963
from itertools import chain from AnkiTools import AnkiConnect as ac import re from analyze.user_db import User from analyze.tag import HskVocab, Category, HanziLevelProject from analyze.lookup import Cedict, SpoonFed class AnkiConnect(): def __init__(self): self.user = User() self.hsk = HskVocab(...
true
true
f774236d2b47606a68b535742d0bf800deac2183
3,233
py
Python
PhysicsTools/PatAlgos/python/slimming/slimming_cff.py
WMass/cmssw
64a27aa2d79065cbf8ea74aa7c0be885b8bc7a16
[ "Apache-2.0" ]
null
null
null
PhysicsTools/PatAlgos/python/slimming/slimming_cff.py
WMass/cmssw
64a27aa2d79065cbf8ea74aa7c0be885b8bc7a16
[ "Apache-2.0" ]
null
null
null
PhysicsTools/PatAlgos/python/slimming/slimming_cff.py
WMass/cmssw
64a27aa2d79065cbf8ea74aa7c0be885b8bc7a16
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms from PhysicsTools.PatAlgos.slimming.packedPFCandidates_cff import * from PhysicsTools.PatAlgos.slimming.isolatedTracks_cfi import * from PhysicsTools.PatAlgos.slimming.lostTracks_cfi import * from PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVertices_cfi import * from Ph...
44.287671
115
0.832663
import FWCore.ParameterSet.Config as cms from PhysicsTools.PatAlgos.slimming.packedPFCandidates_cff import * from PhysicsTools.PatAlgos.slimming.isolatedTracks_cfi import * from PhysicsTools.PatAlgos.slimming.lostTracks_cfi import * from PhysicsTools.PatAlgos.slimming.offlineSlimmedPrimaryVertices_cfi import * from Ph...
true
true
f774254553821036ded0f215f0f617e12ee5f694
7,228
py
Python
api/models.py
OpenTreeHole/backend
50d63e06f16e6a4d18d80be768048bdea9e593fa
[ "Apache-2.0" ]
6
2021-10-01T13:45:23.000Z
2022-03-27T11:57:29.000Z
api/models.py
OpenTreeHole/backend
50d63e06f16e6a4d18d80be768048bdea9e593fa
[ "Apache-2.0" ]
67
2021-10-01T13:47:30.000Z
2022-03-30T09:12:36.000Z
api/models.py
OpenTreeHole/backend
50d63e06f16e6a4d18d80be768048bdea9e593fa
[ "Apache-2.0" ]
5
2021-11-25T16:18:27.000Z
2022-03-14T08:46:26.000Z
from datetime import datetime from django.conf import settings from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager from django.db import models from django.utils.dateparse import parse_datetime from rest_framework.authtoken.models import Token from utils.auth import encrypt_email, many_hashes ...
33.934272
86
0.666159
from datetime import datetime from django.conf import settings from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager from django.db import models from django.utils.dateparse import parse_datetime from rest_framework.authtoken.models import Token from utils.auth import encrypt_email, many_hashes ...
true
true
f774278b250d1ee89af57ad5cff137fe6632643e
2,782
py
Python
testes.py
felipeaq/trab1_redes
69b102a5509ff8edfabc47ee70a82fb2a5ecd06f
[ "Apache-2.0" ]
null
null
null
testes.py
felipeaq/trab1_redes
69b102a5509ff8edfabc47ee70a82fb2a5ecd06f
[ "Apache-2.0" ]
null
null
null
testes.py
felipeaq/trab1_redes
69b102a5509ff8edfabc47ee70a82fb2a5ecd06f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import sys from mininet.net import Mininet from mininet.node import Controller, RemoteController, OVSController from mininet.node import CPULimitedHost, Host, Node from mininet.node import OVSKernelSwitch, UserSwitch from mininet.node import IVSSwitch from mininet.cli import CLI from mininet.log impor...
32.348837
88
0.584472
import sys from mininet.net import Mininet from mininet.node import Controller, RemoteController, OVSController from mininet.node import CPULimitedHost, Host, Node from mininet.node import OVSKernelSwitch, UserSwitch from mininet.node import IVSSwitch from mininet.cli import CLI from mininet.log import setLogLevel, inf...
true
true
f77427a1bf5a8e50bc2d4bdec06716497c4e0e60
2,536
py
Python
plaso/cli/helpers/virustotal_analysis.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
2
2016-02-18T12:46:29.000Z
2022-03-13T03:04:59.000Z
plaso/cli/helpers/virustotal_analysis.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
null
null
null
plaso/cli/helpers/virustotal_analysis.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
6
2016-12-18T08:05:36.000Z
2021-04-06T14:19:11.000Z
# -*- coding: utf-8 -*- """The arguments helper for the VirusTotal analysis plugin.""" from plaso.lib import errors from plaso.cli.helpers import interface from plaso.cli.helpers import manager from plaso.analysis import virustotal class VirusTotalAnalysisHelper(interface.ArgumentsHelper): """CLI arguments helper ...
38.424242
80
0.724763
from plaso.lib import errors from plaso.cli.helpers import interface from plaso.cli.helpers import manager from plaso.analysis import virustotal class VirusTotalAnalysisHelper(interface.ArgumentsHelper): NAME = u'virustotal_analysis' CATEGORY = u'analysis' DESCRIPTION = u'Argument helper for the VirusTotal an...
true
true
f77428c2d728ab15530405fa0237588c84cebeba
533
py
Python
03/evaluation.py
ghmagazine/python_ml_book
57e874fd4fa86abaa2e2d032d18946942cf50c42
[ "BSD-3-Clause" ]
9
2019-04-30T13:20:34.000Z
2021-07-17T14:26:40.000Z
03/evaluation.py
ghmagazine/python_ml_book
57e874fd4fa86abaa2e2d032d18946942cf50c42
[ "BSD-3-Clause" ]
null
null
null
03/evaluation.py
ghmagazine/python_ml_book
57e874fd4fa86abaa2e2d032d18946942cf50c42
[ "BSD-3-Clause" ]
11
2019-05-30T13:30:55.000Z
2021-08-31T15:44:35.000Z
from sklearn import tree from sklearn.datasets import load_wine from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report wine = load_wine() data = wine.data target = wine.target X_train, X_test, Y_train, Y_test = train_test_split(data, target, test_size=0.2, random_state=0...
29.611111
96
0.812383
from sklearn import tree from sklearn.datasets import load_wine from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report wine = load_wine() data = wine.data target = wine.target X_train, X_test, Y_train, Y_test = train_test_split(data, target, test_size=0.2, random_state=0...
true
true
f774290457eb26bb0390d6de8559a2feb21e6b8f
8,840
py
Python
addon.py
stefanides/plugin.video.dmd-czech.aktualne
40215cf23591a5d32f226e1e3fc5abf1986c76a8
[ "MIT" ]
null
null
null
addon.py
stefanides/plugin.video.dmd-czech.aktualne
40215cf23591a5d32f226e1e3fc5abf1986c76a8
[ "MIT" ]
null
null
null
addon.py
stefanides/plugin.video.dmd-czech.aktualne
40215cf23591a5d32f226e1e3fc5abf1986c76a8
[ "MIT" ]
null
null
null
# coding: utf-8 import os import sys import xbmc import xbmcgui import xbmcplugin import xbmcaddon import urllib import urllib2 import re from stats import * import HTMLParser import xml.etree.ElementTree as ET import email.utils as eut import time import json reload(sys) sys.setdefaultencoding("utf-8") _rssUrl_ = 'h...
32.740741
132
0.64491
import os import sys import xbmc import xbmcgui import xbmcplugin import xbmcaddon import urllib import urllib2 import re from stats import * import HTMLParser import xml.etree.ElementTree as ET import email.utils as eut import time import json reload(sys) sys.setdefaultencoding("utf-8") _rssUrl_ = 'http://video.aktu...
false
true
f7742a2735142e442ab944cad75ec584849af4c5
4,433
py
Python
src/sd_ixp/switch.py
SD-RSiX/Controller
b1cf62841f8b2593443c321a921b7819698d9905
[ "Apache-2.0" ]
null
null
null
src/sd_ixp/switch.py
SD-RSiX/Controller
b1cf62841f8b2593443c321a921b7819698d9905
[ "Apache-2.0" ]
null
null
null
src/sd_ixp/switch.py
SD-RSiX/Controller
b1cf62841f8b2593443c321a921b7819698d9905
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2018 [SD]RSiX Project # # 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 writ...
34.905512
80
0.642905
from ryu.controller import ofp_event from ryu.ofproto import ofproto_v1_3 class Switch: def __init__(self, datapath): self._ports = {} self._datapath = datapath self._of_version = self._datapath.ofproto.OFP_VERSION self._table_miss() def _table_miss(self)...
true
true
f7742a3cfc19134f19fc33508b2b832796f10fcc
2,762
py
Python
scripts/plot_forecasting_comparison.py
cdbethune/d3m-primitives
5530da1b8efba7de8cec6890401c5d4091acd45a
[ "MIT" ]
null
null
null
scripts/plot_forecasting_comparison.py
cdbethune/d3m-primitives
5530da1b8efba7de8cec6890401c5d4091acd45a
[ "MIT" ]
null
null
null
scripts/plot_forecasting_comparison.py
cdbethune/d3m-primitives
5530da1b8efba7de8cec6890401c5d4091acd45a
[ "MIT" ]
null
null
null
from typing import List import pandas as pd import seaborn as sns import matplotlib.pyplot as plt sns.set(style="whitegrid") from compare_forecasting_methods import pred_lengths def to_query( elements: List[str], ): if len(elements) == 1: return elements[0] else: return '(' + ' or '.join(...
27.346535
83
0.628168
from typing import List import pandas as pd import seaborn as sns import matplotlib.pyplot as plt sns.set(style="whitegrid") from compare_forecasting_methods import pred_lengths def to_query( elements: List[str], ): if len(elements) == 1: return elements[0] else: return '(' + ' or '.join(...
true
true
f7742b2c769a818e8b42dfb6a78623ba277904e8
7,661
py
Python
scripts/annotate_vcf_bam.py
willrockout/metasv
b46f15cbe8a28941661855da6587451c971dc2e3
[ "BSD-2-Clause" ]
43
2015-01-12T20:58:24.000Z
2021-11-24T07:30:06.000Z
scripts/annotate_vcf_bam.py
willrockout/metasv
b46f15cbe8a28941661855da6587451c971dc2e3
[ "BSD-2-Clause" ]
80
2015-01-08T00:34:55.000Z
2022-02-16T08:30:34.000Z
scripts/annotate_vcf_bam.py
willrockout/metasv
b46f15cbe8a28941661855da6587451c971dc2e3
[ "BSD-2-Clause" ]
25
2015-04-30T06:30:28.000Z
2022-02-22T02:48:20.000Z
#!/usr/bin/env python import sys import argparse import multiprocessing import logging import vcf import random import math import pysam def annotate_vcfs(bam, chromosomes, vcfs): func_logger = logging.getLogger("%s-%s" % (annotate_vcfs.__name__, multiprocessing.current_process())) random.seed(0) # Load ...
38.497487
110
0.587913
import sys import argparse import multiprocessing import logging import vcf import random import math import pysam def annotate_vcfs(bam, chromosomes, vcfs): func_logger = logging.getLogger("%s-%s" % (annotate_vcfs.__name__, multiprocessing.current_process())) random.seed(0) sam_file = pysam.Samfile(...
true
true
f7742c93699f1e35d7ce95927094eda8e429eb98
623
py
Python
gennav/planners/base.py
archit2604/gennav
c17056e163995a14b90d0d03d7f4640f4e02f1d1
[ "MIT" ]
1
2020-08-04T12:00:13.000Z
2020-08-04T12:00:13.000Z
gennav/planners/base.py
archit2604/gennav
c17056e163995a14b90d0d03d7f4640f4e02f1d1
[ "MIT" ]
null
null
null
gennav/planners/base.py
archit2604/gennav
c17056e163995a14b90d0d03d7f4640f4e02f1d1
[ "MIT" ]
null
null
null
class Planner(object): """ Base class for path planning algorithms. """ def plan(self, start, goal, env): """Plan path from start to goal in given environment. This method needs to be implemented in the specific path planner. Args: start (gennav.utils.common.R...
29.666667
74
0.629213
class Planner(object): def plan(self, start, goal, env): raise NotImplementedError
true
true
f7742cef7b7845759b40452da6ca5004508f7f4f
1,182
py
Python
interspeechmi/src/interspeechmi/constants.py
philips-labs/interspeech2022-motivational-interviewing
c8195a2aae82860e0019af40c20b21bcdeed6e36
[ "MIT" ]
null
null
null
interspeechmi/src/interspeechmi/constants.py
philips-labs/interspeech2022-motivational-interviewing
c8195a2aae82860e0019af40c20b21bcdeed6e36
[ "MIT" ]
null
null
null
interspeechmi/src/interspeechmi/constants.py
philips-labs/interspeech2022-motivational-interviewing
c8195a2aae82860e0019af40c20b21bcdeed6e36
[ "MIT" ]
null
null
null
import os import logging from interspeechmi.standalone_utils import full_path from pathlib import Path REPO_DIR = Path(os.path.dirname(full_path(__file__))).parent.parent.parent WANDB_LOGS_DIR_PARENT_DIR = str(REPO_DIR) INTERSPEECHMI_CODE_DIR = os.path.join(REPO_DIR, "interspeechmi") TMP_FILES_DIR = os.path.join(REPO_...
38.129032
120
0.76819
import os import logging from interspeechmi.standalone_utils import full_path from pathlib import Path REPO_DIR = Path(os.path.dirname(full_path(__file__))).parent.parent.parent WANDB_LOGS_DIR_PARENT_DIR = str(REPO_DIR) INTERSPEECHMI_CODE_DIR = os.path.join(REPO_DIR, "interspeechmi") TMP_FILES_DIR = os.path.join(REPO_...
true
true
f7742dd224f99c8404ce1d3d3b5c26ffbce6dc8e
1,483
py
Python
azure/mgmt/network/v2017_06_01/models/express_route_circuit_sku.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
azure/mgmt/network/v2017_06_01/models/express_route_circuit_sku.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_06_01/models/express_route_circuit_sku.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "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. # Changes ...
37.075
79
0.608901
from msrest.serialization import Model class ExpressRouteCircuitSku(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'tier': {'key': 'tier', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, } def __init__(self, name=None, tier=None, family=None): ...
true
true
f7742ea6bdf96cde602b3bde6ca7a189dc456070
769
py
Python
src/ci_workflow/ci_check_npm_package_version.py
asifsmohammed/opensearch-build
f78859000d676d35c29b15e08bbf4310c4df05b9
[ "Apache-2.0" ]
1
2022-01-29T17:48:00.000Z
2022-01-29T17:48:00.000Z
src/ci_workflow/ci_check_npm_package_version.py
asifsmohammed/opensearch-build
f78859000d676d35c29b15e08bbf4310c4df05b9
[ "Apache-2.0" ]
1
2022-02-07T23:43:53.000Z
2022-02-10T19:56:41.000Z
src/ci_workflow/ci_check_npm_package_version.py
tianleh/opensearch-build
460ad6b978c034d1dac672766c8dff67f51e4cd7
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. import logging from ci_workflow.ci_check_package import CiCheckPackage class CiCheckNpmPackageVersion(CiCheckPackage): @...
33.434783
80
0.719116
import logging from ci_workflow.ci_check_package import CiCheckPackage class CiCheckNpmPackageVersion(CiCheckPackage): @property def checked_version(self) -> str: if self.component.name == "OpenSearch-Dashboards": return self.target.opensearch_version.replace("-SNAPSHOT", "") els...
true
true
f7742f4694f9eeaa44720c2ed0a9c203720262c2
25,869
py
Python
python/ccxt/mercado.py
Joukahainen/ccxt
82823a85b96cee336853f0deb353474df2122b88
[ "MIT" ]
2
2022-03-10T15:21:49.000Z
2022-03-10T15:22:01.000Z
python/ccxt/mercado.py
Joukahainen/ccxt
82823a85b96cee336853f0deb353474df2122b88
[ "MIT" ]
4
2021-12-14T06:19:10.000Z
2022-03-19T02:39:29.000Z
python/ccxt/mercado.py
Joukahainen/ccxt
82823a85b96cee336853f0deb353474df2122b88
[ "MIT" ]
2
2022-03-08T20:43:26.000Z
2022-03-14T19:28:27.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import ArgumentsReq...
38.668161
308
0.480034
from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import InvalidOrder class mercado(Exchange): def describe(self): return self.deep_extend(super(mercado, self).describe(), { ...
true
true
f7742f829579329db6b200a1f793726de1741756
309
py
Python
2-Python-Fundamentals (Jan 2021)/Course-Exercises-and-Exams/03-Lists-Basics/01_Lab/01_Strange-Zoo.py
karolinanikolova/SoftUni-Software-Engineering
7891924956598b11a1e30e2c220457c85c40f064
[ "MIT" ]
null
null
null
2-Python-Fundamentals (Jan 2021)/Course-Exercises-and-Exams/03-Lists-Basics/01_Lab/01_Strange-Zoo.py
karolinanikolova/SoftUni-Software-Engineering
7891924956598b11a1e30e2c220457c85c40f064
[ "MIT" ]
null
null
null
2-Python-Fundamentals (Jan 2021)/Course-Exercises-and-Exams/03-Lists-Basics/01_Lab/01_Strange-Zoo.py
karolinanikolova/SoftUni-Software-Engineering
7891924956598b11a1e30e2c220457c85c40f064
[ "MIT" ]
null
null
null
# 1. Strange Zoo # You are at the zoo and the meerkats look strange. You will receive 3 strings: (tail, body, head). # You have to re-arrange the elements in a list, so that the animal looks normal again: (head, body, tail) tail = input() body = input() head = input() zoo = [head, body, tail] print(zoo)
23.769231
106
0.68932
tail = input() body = input() head = input() zoo = [head, body, tail] print(zoo)
true
true
f7742fcf2ab221f93e1c59eef93c47b09cad9213
8,045
py
Python
docs/conf.py
duczen/pynsq
0ae5875928430e9ee3997463b543703939f877ec
[ "MIT" ]
308
2015-09-02T03:03:08.000Z
2022-03-07T00:59:11.000Z
docs/conf.py
duczen/pynsq
0ae5875928430e9ee3997463b543703939f877ec
[ "MIT" ]
125
2015-08-31T03:48:13.000Z
2022-03-15T07:34:37.000Z
docs/conf.py
duczen/pynsq
0ae5875928430e9ee3997463b543703939f877ec
[ "MIT" ]
96
2015-09-30T22:52:56.000Z
2022-03-27T10:34:48.000Z
# -*- coding: utf-8 -*- # # pynsq documentation build configuration file, created by # sphinx-quickstart on Sun Jun 16 16:18:30 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
32.18
88
0.714978
import sys import os sys.path.insert(0, os.path.abspath('..')) extensions = ['sphinx.ext.autodoc'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'pynsq' copyright = u'2020, Matt Reiferson and Jehiah Czebotar' # |version| and |release|, also used in various other place...
true
true
f7742fd87fbe057e5029a86dea24ffc0a654cfe0
341
py
Python
pycozmo/CozmoAnim/__init__.py
gimait/pycozmo
601d9c09903b9300e8990723cae95974212afb09
[ "MIT" ]
123
2019-08-25T21:28:23.000Z
2022-03-12T13:54:59.000Z
pycozmo/CozmoAnim/__init__.py
solosito/pycozmo
5d28118eb8f7a625ae4a66054dabf19b4fe27483
[ "MIT" ]
41
2019-08-25T21:21:37.000Z
2022-02-09T14:20:54.000Z
pycozmo/CozmoAnim/__init__.py
solosito/pycozmo
5d28118eb8f7a625ae4a66054dabf19b4fe27483
[ "MIT" ]
51
2019-09-04T13:30:02.000Z
2022-01-09T01:20:24.000Z
from . import AnimClip from . import AnimClips from . import BackpackLights from . import BodyMotion from . import Event from . import FaceAnimation from . import HeadAngle from . import Keyframes from . import LiftHeight from . import ProceduralFace from . import RecordHeading from . import RobotAudio from . import T...
22.733333
35
0.806452
from . import AnimClip from . import AnimClips from . import BackpackLights from . import BodyMotion from . import Event from . import FaceAnimation from . import HeadAngle from . import Keyframes from . import LiftHeight from . import ProceduralFace from . import RecordHeading from . import RobotAudio from . import T...
true
true
f774309edc84ad65018349a2eec2a3444cbc3a41
2,736
py
Python
api/v2alpha1/python/setup.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
1
2021-08-23T19:09:56.000Z
2021-08-23T19:09:56.000Z
api/v2alpha1/python/setup.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
2
2021-06-01T10:02:51.000Z
2021-06-07T07:19:14.000Z
api/v2alpha1/python/setup.py
Strasser-Pablo/pipelines
a1d513eb412f3ffd44edf82af2fa7edb05c3b952
[ "Apache-2.0" ]
1
2021-10-17T07:27:10.000Z
2021-10-17T07:27:10.000Z
# Copyright 2020 The Kubeflow Authors # # 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...
30.065934
75
0.698465
import os import subprocess import sys import setuptools try: from distutils.spawn import find_executable except ImportError: from shutil import which as find_executable NAME = "kfp-pipeline-spec" VERSION = "0.1.8" PROTO_DIR = os.path.realpath( os.path.join(os.path.dirname(__file__), os.pardir)) PKG_DIR = o...
true
true
f7743131fc18b49648e72c14bf52f5b3204832a3
18,286
py
Python
docker/wp-base/install-plugins-and-themes.py
epfl-idevelop/wp-infrastructure
f6bec38fa20294873bdc14dc6c1b29f2a61c0d8d
[ "MIT" ]
null
null
null
docker/wp-base/install-plugins-and-themes.py
epfl-idevelop/wp-infrastructure
f6bec38fa20294873bdc14dc6c1b29f2a61c0d8d
[ "MIT" ]
null
null
null
docker/wp-base/install-plugins-and-themes.py
epfl-idevelop/wp-infrastructure
f6bec38fa20294873bdc14dc6c1b29f2a61c0d8d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Install WordPress plugins and themes from various locations.""" import atexit import getopt import io import json import os import re import requests import shutil from six import string_types import subprocess import sys import tempfile import yaml from zipfile import ZipFile import operato...
34.567108
128
0.580335
import atexit import getopt import io import json import os import re import requests import shutil from six import string_types import subprocess import sys import tempfile import yaml from zipfile import ZipFile import operator from distutils.version import LooseVersion AUTO_MANIFEST_URL = 'https://raw.githubuserc...
true
true
f774320a47385235e29a36eb34a5f57bdc04feeb
490
py
Python
src/configurations.py
martinmartinchan/cookbook
361d2470971d3700118542de28726117ed5b175e
[ "MIT" ]
null
null
null
src/configurations.py
martinmartinchan/cookbook
361d2470971d3700118542de28726117ed5b175e
[ "MIT" ]
null
null
null
src/configurations.py
martinmartinchan/cookbook
361d2470971d3700118542de28726117ed5b175e
[ "MIT" ]
null
null
null
class Config(object): DEBUG = False TESTING = False class ProductionConfig(Config): HOST = "MartinChan.mysql.pythonanywhere-services.com" USER = "MartinChan" PASSWORD = "Aweki2235zxc" DATABASE = "MartinChan$cookbook" class DevelopmentConfig(Config): DEBUG = True HOST = "localhost" USER = "root" PASSWORD = "...
19.6
54
0.728571
class Config(object): DEBUG = False TESTING = False class ProductionConfig(Config): HOST = "MartinChan.mysql.pythonanywhere-services.com" USER = "MartinChan" PASSWORD = "Aweki2235zxc" DATABASE = "MartinChan$cookbook" class DevelopmentConfig(Config): DEBUG = True HOST = "localhost" USER = "root" PASSWORD = "...
true
true
f7743292fcad760026d30132e8c60d7599f4b75b
3,838
py
Python
train_data.py
YZ-Zheng/AI-Learns-Handwritten-Digits
6ce2dcce7ed6e4689b3f7d0da3ddcf8ad06ce6ce
[ "MIT" ]
null
null
null
train_data.py
YZ-Zheng/AI-Learns-Handwritten-Digits
6ce2dcce7ed6e4689b3f7d0da3ddcf8ad06ce6ce
[ "MIT" ]
null
null
null
train_data.py
YZ-Zheng/AI-Learns-Handwritten-Digits
6ce2dcce7ed6e4689b3f7d0da3ddcf8ad06ce6ce
[ "MIT" ]
null
null
null
import numpy as np import torch import torch.nn.functional as F import torch.nn as nn # check if gpu is available device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') class Flatten(nn.Module): """ performs the flatten operation """ def forward(self, input): return input.view...
31.983333
151
0.627931
import numpy as np import torch import torch.nn.functional as F import torch.nn as nn device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') class Flatten(nn.Module): def forward(self, input): return input.view(input.size(0), -1) def batchify_data(x_data, y_data, batch_size): N = i...
true
true
f77432ec69e5f8508ee992b6304b92109e140c91
13,488
py
Python
workflows/diagnostics/fv3net/diagnostics/prognostic_run/computed_diagnostics.py
ai2cm/fv3net
e62038aee0a97d6207e66baabd8938467838cf51
[ "MIT" ]
1
2021-12-14T23:43:35.000Z
2021-12-14T23:43:35.000Z
workflows/diagnostics/fv3net/diagnostics/prognostic_run/computed_diagnostics.py
ai2cm/fv3net
e62038aee0a97d6207e66baabd8938467838cf51
[ "MIT" ]
195
2021-09-16T05:47:18.000Z
2022-03-31T22:03:15.000Z
workflows/diagnostics/fv3net/diagnostics/prognostic_run/computed_diagnostics.py
ai2cm/fv3net
e62038aee0a97d6207e66baabd8938467838cf51
[ "MIT" ]
null
null
null
"""Utilities for loading computed diagnostics """ import json from typing import Iterable, Hashable, Sequence, Tuple, Any, Set, Mapping import os import xarray as xr import numpy as np import fsspec import pandas as pd from pathlib import Path from dataclasses import dataclass import tempfile from .metrics import met...
33.303704
85
0.654434
import json from typing import Iterable, Hashable, Sequence, Tuple, Any, Set, Mapping import os import xarray as xr import numpy as np import fsspec import pandas as pd from pathlib import Path from dataclasses import dataclass import tempfile from .metrics import metrics_registry from .derived_diagnostics import deri...
true
true
f774340a37b701171ffb5d852838bd6407bd9050
3,679
py
Python
module.py
cybercamp18isecurity/iSecurityDetection
df17ca3a54b882a534a09230b7c895f1c5233984
[ "MIT" ]
null
null
null
module.py
cybercamp18isecurity/iSecurityDetection
df17ca3a54b882a534a09230b7c895f1c5233984
[ "MIT" ]
null
null
null
module.py
cybercamp18isecurity/iSecurityDetection
df17ca3a54b882a534a09230b7c895f1c5233984
[ "MIT" ]
null
null
null
from elasticsearch_sdk.elasticsearcher import ElasticSearcher from pusher_push_notifications import PushNotifications from configparser import ConfigParser import os import logging class Module: def __init__(self): self.elk_controler = self.init_elastic() self.init_pusher() self.logger =...
30.155738
102
0.438706
from elasticsearch_sdk.elasticsearcher import ElasticSearcher from pusher_push_notifications import PushNotifications from configparser import ConfigParser import os import logging class Module: def __init__(self): self.elk_controler = self.init_elastic() self.init_pusher() self.logger =...
true
true
f77434101dcd47e01772dad341e3d66b6959b670
384
py
Python
src/basic_test.py
Noumena-bcn/bcn-energy
8c60bfc6cb31d165c5e04bdf7534e08af982e06f
[ "BSD-2-Clause" ]
null
null
null
src/basic_test.py
Noumena-bcn/bcn-energy
8c60bfc6cb31d165c5e04bdf7534e08af982e06f
[ "BSD-2-Clause" ]
8
2019-09-19T15:19:49.000Z
2021-12-13T20:10:10.000Z
src/basic_test.py
Noumena-bcn/bcn-energy
8c60bfc6cb31d165c5e04bdf7534e08af982e06f
[ "BSD-2-Clause" ]
1
2019-04-04T09:56:47.000Z
2019-04-04T09:56:47.000Z
from geomeppy import IDF IDF.setiddname('/Applications/EnergyPlus-8-8-0/Energy+.idd') idf = IDF('/Users/soroush/Desktop/Noumena/bcn-energy/src/gh_template.idf') idf.epw = '/Users/soroush/Desktop/Noumena/bcn-energy/src/ESP_Barcelona.081810_IWEC.epw' constructions = idf.getobject("CONSTRUCTION", ...
29.538462
88
0.684896
from geomeppy import IDF IDF.setiddname('/Applications/EnergyPlus-8-8-0/Energy+.idd') idf = IDF('/Users/soroush/Desktop/Noumena/bcn-energy/src/gh_template.idf') idf.epw = '/Users/soroush/Desktop/Noumena/bcn-energy/src/ESP_Barcelona.081810_IWEC.epw' constructions = idf.getobject("CONSTRUCTION", ...
true
true
f77435cd348012ef38b5c78589215e9b5182f236
5,905
py
Python
mwach/settings_base.py
I-TECH-UW/mwachx
e191755c3369208d678fceec68dbb4f5f51c453a
[ "Apache-2.0" ]
null
null
null
mwach/settings_base.py
I-TECH-UW/mwachx
e191755c3369208d678fceec68dbb4f5f51c453a
[ "Apache-2.0" ]
1
2017-11-21T07:37:53.000Z
2017-11-21T07:37:53.000Z
mwach/settings_base.py
I-TECH-UW/mwachx
e191755c3369208d678fceec68dbb4f5f51c453a
[ "Apache-2.0" ]
null
null
null
""" Django settings for mwach project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # This is the name of the application shown in the title and on login and va...
27.337963
117
0.682303
APP_NAME = 'mWaChX' APP_FLAVOR = 'x' import os ON_OPENSHIFT = True if os.environ.has_key('OPENSHIFT_REPO_DIR') else False PROJECT_ROOT = os.path.dirname(os.path.dirname(__file__)) # wsgi.py, fixtures, etc. PROJECT_PATH = os.path.join(PROJECT_ROOT, 'mwach') # Quick-start development settings - unsuitable for pro...
true
true
f77435f81488b60511f057a20c9d30c3ab044cb7
21,228
py
Python
sklearn/cross_decomposition/tests/test_pls.py
karen-pal/scikit-learn
d936b1b0f74cba6e90eec9590a301aa0edf777c1
[ "BSD-3-Clause" ]
1
2021-09-20T02:58:56.000Z
2021-09-20T02:58:56.000Z
sklearn/cross_decomposition/tests/test_pls.py
ryanyu9/scikit-learn
2a67d88258264eb2b6dfad221be8f8d61684dcba
[ "BSD-3-Clause" ]
6
2021-07-05T15:38:00.000Z
2022-02-27T13:35:19.000Z
sklearn/cross_decomposition/tests/test_pls.py
ryanyu9/scikit-learn
2a67d88258264eb2b6dfad221be8f8d61684dcba
[ "BSD-3-Clause" ]
null
null
null
import pytest import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_allclose from sklearn.datasets import load_linnerud from sklearn.cross_decomposition._pls import ( _center_scale_xy, _get_first_singular_vectors_power_method, _get_first_singular_vectors_svd, ...
35.20398
88
0.661202
import pytest import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_allclose from sklearn.datasets import load_linnerud from sklearn.cross_decomposition._pls import ( _center_scale_xy, _get_first_singular_vectors_power_method, _get_first_singular_vectors_svd, ...
true
true
f774367cd2d297f7030d1d2a9eb3aa47593f844a
378
py
Python
pipelinewise/fastsync/commons/errors.py
ashalitkin/pipelinewise
52901c801ccd591c01cf7a2e5e3309db121d027d
[ "Apache-2.0" ]
null
null
null
pipelinewise/fastsync/commons/errors.py
ashalitkin/pipelinewise
52901c801ccd591c01cf7a2e5e3309db121d027d
[ "Apache-2.0" ]
null
null
null
pipelinewise/fastsync/commons/errors.py
ashalitkin/pipelinewise
52901c801ccd591c01cf7a2e5e3309db121d027d
[ "Apache-2.0" ]
null
null
null
class ExportError(Exception): """Raised when export fails""" class TableNotFoundError(Exception): """Raised when configured table doesn't exist in source""" class MongoDBInvalidDatetimeError(Exception): """Raised when a bson datetime is invalid and cannot be serialized""" class UnsupportedKeyTypeExceptio...
31.5
73
0.753968
class ExportError(Exception): class TableNotFoundError(Exception): class MongoDBInvalidDatetimeError(Exception): class UnsupportedKeyTypeException(Exception):
true
true
f774373d94a087473033d209c98ccc63b0a019fe
14,379
py
Python
tests/tests/test_compressor.py
jnis77diver/django-pipeline
8bac57adae84615d9d79ad19b2b591c2e46879f9
[ "MIT" ]
1
2019-10-20T02:58:27.000Z
2019-10-20T02:58:27.000Z
tests/tests/test_compressor.py
jnis77diver/django-pipeline
8bac57adae84615d9d79ad19b2b591c2e46879f9
[ "MIT" ]
1
2021-09-20T22:02:21.000Z
2021-09-21T13:55:41.000Z
tests/tests/test_compressor.py
jnis77diver/django-pipeline
8bac57adae84615d9d79ad19b2b591c2e46879f9
[ "MIT" ]
1
2021-09-18T01:39:48.000Z
2021-09-18T01:39:48.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import base64 import io import os import sys try: from mock import patch except ImportError: from unittest.mock import patch # noqa from unittest import skipIf, skipUnless from django.conf import settings from django.test import TestCase from ...
51.537634
1,213
0.685792
from __future__ import unicode_literals import base64 import io import os import sys try: from mock import patch except ImportError: from unittest.mock import patch from unittest import skipIf, skipUnless from django.conf import settings from django.test import TestCase from django.test.client import Reque...
true
true
f7743741bdc1b7bb13c520655467962ab1540549
5,943
py
Python
examples/simple/unstable_binary.py
egpbos/amuse
64b3bc5b7fef9496012b023578c4d71cecef92b7
[ "Apache-2.0" ]
null
null
null
examples/simple/unstable_binary.py
egpbos/amuse
64b3bc5b7fef9496012b023578c4d71cecef92b7
[ "Apache-2.0" ]
null
null
null
examples/simple/unstable_binary.py
egpbos/amuse
64b3bc5b7fef9496012b023578c4d71cecef92b7
[ "Apache-2.0" ]
2
2021-11-19T04:41:37.000Z
2021-11-20T02:11:17.000Z
""" Evolves two stars dynamically (hermit, nbody code) each star will lose mass during the evolution (evtwin, stellar evolution code) We start with two stars, one 10.0 and one 1.0 solar mass star. These stars start orbiting with a stable kepler orbit. After 2 orbital periods the stars will begin to lose mass and the...
36.237805
169
0.690056
from amuse.plot import scatter, xlabel, ylabel, plot from matplotlib import pyplot from math import pi from amuse.units.optparse import OptionParser from amuse.units import units from amuse.units import constants from amuse.units.nbody_system import nbody_to_si from amuse.community.evtwin.interface import EVtwin from...
true
true
f77437d4131f1830bbb162759000f950caf5cc4f
1,218
py
Python
Day Pogress - 18~100/Day 19/Turtle Racing Game/race.py
Abbhiishek/Python
3ad5310ca29469f353f9afa99531f01273eec6bd
[ "MIT" ]
1
2022-02-04T07:04:34.000Z
2022-02-04T07:04:34.000Z
Day Pogress - 18~100/Day 19/Turtle Racing Game/race.py
Abbhiishek/Python
3ad5310ca29469f353f9afa99531f01273eec6bd
[ "MIT" ]
12
2022-02-13T12:10:32.000Z
2022-02-17T09:36:49.000Z
Day Pogress - 18~100/Day 19/Turtle Racing Game/race.py
Abbhiishek/Python
3ad5310ca29469f353f9afa99531f01273eec6bd
[ "MIT" ]
null
null
null
import random from turtle import Turtle, Screen screen = Screen() screen.setup(width=500, height=400) screen.title("Welcome to the Turtle Game") colors = ["red", "blue", "green", "yellow", "orange", "purple"] y_pos = [-70, -40, -10, 20, 50, 80] all_turtles = [] is_race_on = True for i in range(len(colors)): ne...
25.914894
86
0.623153
import random from turtle import Turtle, Screen screen = Screen() screen.setup(width=500, height=400) screen.title("Welcome to the Turtle Game") colors = ["red", "blue", "green", "yellow", "orange", "purple"] y_pos = [-70, -40, -10, 20, 50, 80] all_turtles = [] is_race_on = True for i in range(len(colors)): ne...
true
true
f7743893ce57d20a6f748188deb499f94b59f079
1,397
py
Python
takepicture.py
andrewleader/cafe-wait-times
331c1e9dc64d5cf14ae4323dc57e050fac444956
[ "MIT" ]
null
null
null
takepicture.py
andrewleader/cafe-wait-times
331c1e9dc64d5cf14ae4323dc57e050fac444956
[ "MIT" ]
2
2018-07-23T21:41:34.000Z
2018-08-10T22:28:52.000Z
takepicture.py
andrewleader/cafe-wait-times
331c1e9dc64d5cf14ae4323dc57e050fac444956
[ "MIT" ]
null
null
null
import cv2 def take_picture(filePath): # Camera 0 is the integrated web cam on my netbook camera_port = 0 #Number of frames to throw away while the camera adjusts to light levels ramp_frames = 30 # Now we can initialize the camera capture object with the cv2.VideoCapture class. # ...
35.820513
86
0.687187
import cv2 def take_picture(filePath): camera_port = 0 ramp_frames = 30 camera = cv2.VideoCapture(camera_port) def get_image(): retval, im = camera.read() return im for i in xrange(ramp_frames): temp = get_image() print("...
true
true
f7743d04a6d9f01a14d04c76433129bbb0f3d560
2,267
py
Python
homeassistant/components/opnsense/device_tracker.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
1
2021-11-13T23:06:27.000Z
2021-11-13T23:06:27.000Z
homeassistant/components/opnsense/device_tracker.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
44
2020-07-23T07:14:37.000Z
2022-03-31T06:01:48.000Z
homeassistant/components/opnsense/device_tracker.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
null
null
null
"""Device tracker support for OPNSense routers.""" import logging from homeassistant.components.device_tracker import DeviceScanner from homeassistant.components.opnsense import CONF_TRACKER_INTERFACE, OPNSENSE_DATA _LOGGER = logging.getLogger(__name__) async def async_get_scanner(hass, config, discovery_info=None)...
33.835821
83
0.662109
import logging from homeassistant.components.device_tracker import DeviceScanner from homeassistant.components.opnsense import CONF_TRACKER_INTERFACE, OPNSENSE_DATA _LOGGER = logging.getLogger(__name__) async def async_get_scanner(hass, config, discovery_info=None): interface_client = hass.data[OPNSENSE_DATA]["...
true
true
f7743d6baa36227352b9cdb0b0b5018d29d99556
52,154
py
Python
graphql_compiler/compiler/compiler_frontend.py
evantey14/graphql-compiler
8481ae505149587b8887153825ebd744bb601ba8
[ "Apache-2.0" ]
null
null
null
graphql_compiler/compiler/compiler_frontend.py
evantey14/graphql-compiler
8481ae505149587b8887153825ebd744bb601ba8
[ "Apache-2.0" ]
null
null
null
graphql_compiler/compiler/compiler_frontend.py
evantey14/graphql-compiler
8481ae505149587b8887153825ebd744bb601ba8
[ "Apache-2.0" ]
null
null
null
# Copyright 2017-present Kensho Technologies, LLC. """Front-end for GraphQL to database queries compiler. High-level overview of the GraphQL ingestion process that outputs the compiler's internal representation (IR) via the graphql_to_ir() function: - The function receives a GraphQL string and a GraphQL schema. ...
49.016917
100
0.6792
from collections import namedtuple from graphql import ( GraphQLInt, GraphQLInterfaceType, GraphQLList, GraphQLObjectType, GraphQLUnionType ) from graphql.error import GraphQLSyntaxError from graphql.language.ast import Field, InlineFragment from graphql.language.parser import parse from graphql.validation import ...
true
true
f7743ed703a2afd6c0865090ce38a2167adf9873
29,938
py
Python
sweetpea/blocks.py
musslick/sweetpea-py
b0d9769025022936d57d71a501c9ab5f51b4a4ef
[ "MIT" ]
1
2022-03-13T10:28:08.000Z
2022-03-13T10:28:08.000Z
sweetpea/blocks.py
musslick/sweetpea-py
b0d9769025022936d57d71a501c9ab5f51b4a4ef
[ "MIT" ]
null
null
null
sweetpea/blocks.py
musslick/sweetpea-py
b0d9769025022936d57d71a501c9ab5f51b4a4ef
[ "MIT" ]
null
null
null
from abc import abstractmethod from functools import reduce from itertools import combinations, accumulate, repeat, product, chain from networkx import has_path from typing import List, Union, Tuple, cast, Any, Dict, Set from math import ceil from sweetpea.backend import BackendRequest from sweetpea.internal import ge...
44.091311
195
0.645634
from abc import abstractmethod from functools import reduce from itertools import combinations, accumulate, repeat, product, chain from networkx import has_path from typing import List, Union, Tuple, cast, Any, Dict, Set from math import ceil from sweetpea.backend import BackendRequest from sweetpea.internal import ge...
true
true
f7743f0769bebcee4dc0e2100e8832cf1a270833
6,478
py
Python
grr/client/grr_response_client/poolclient.py
tsehori/grr
048506f22f74642bfe61749069a45ddf496fdab3
[ "Apache-2.0" ]
1
2020-06-25T14:25:51.000Z
2020-06-25T14:25:51.000Z
grr/client/grr_response_client/poolclient.py
tsehori/grr
048506f22f74642bfe61749069a45ddf496fdab3
[ "Apache-2.0" ]
44
2021-05-14T22:49:24.000Z
2022-03-13T21:54:02.000Z
grr/client/grr_response_client/poolclient.py
tsehori/grr
048506f22f74642bfe61749069a45ddf496fdab3
[ "Apache-2.0" ]
1
2020-06-25T14:25:54.000Z
2020-06-25T14:25:54.000Z
#!/usr/bin/env python # Lint as: python3 """This is the GRR client for thread pools.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import base64 import logging import threading import time from absl import app from absl import flags # pylint: disabl...
29.715596
80
0.686786
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import base64 import logging import threading import time from absl import app from absl import flags from grr_response_client import client_plugins from grr_response_client import client_startup from grr_...
true
true
f7743f4d7f404185d243fcb20cc6afc4cee0778b
38,939
py
Python
tests/network/test_reaction_network.py
samblau/mrnet
a07a032801a202b164d30d37a587e391a1725f15
[ "BSD-3-Clause-LBNL" ]
1
2020-12-04T18:06:17.000Z
2020-12-04T18:06:17.000Z
tests/network/test_reaction_network.py
samblau/mrnet
a07a032801a202b164d30d37a587e391a1725f15
[ "BSD-3-Clause-LBNL" ]
null
null
null
tests/network/test_reaction_network.py
samblau/mrnet
a07a032801a202b164d30d37a587e391a1725f15
[ "BSD-3-Clause-LBNL" ]
1
2021-04-13T22:28:33.000Z
2021-04-13T22:28:33.000Z
# coding: utf-8 import io import os import sys import unittest import copy import pickle from itertools import permutations from ast import literal_eval from monty.serialization import dumpfn, loadfn from networkx.readwrite import json_graph from pymatgen.util.testing import PymatgenTest from pymatgen.core.structure ...
35.723853
169
0.520121
import io import os import sys import unittest import copy import pickle from itertools import permutations from ast import literal_eval from monty.serialization import dumpfn, loadfn from networkx.readwrite import json_graph from pymatgen.util.testing import PymatgenTest from pymatgen.core.structure import Molecule ...
true
true
f7743f768a2ef18e533a9ee602ee99c29816419d
7,077
py
Python
yaaredis/commands/sentinel.py
ProjectHentai/yaaredis
be6fcaf4c66f98272bfdeae33d34bb4e6fc13f1f
[ "MIT" ]
null
null
null
yaaredis/commands/sentinel.py
ProjectHentai/yaaredis
be6fcaf4c66f98272bfdeae33d34bb4e6fc13f1f
[ "MIT" ]
5
2021-11-26T17:18:07.000Z
2021-12-07T06:07:54.000Z
yaaredis/commands/sentinel.py
ProjectHentai/yaaredis
be6fcaf4c66f98272bfdeae33d34bb4e6fc13f1f
[ "MIT" ]
null
null
null
from yaaredis.utils import bool_ok, dict_merge, list_keys_to_dict, nativestr, NodeFlag SENTINEL_STATE_TYPES = { 'can-failover-its-master': int, 'config-epoch': int, 'down-after-milliseconds': int, 'failover-timeout': int, 'info-refresh': int, 'last-hello-message': int, 'last-ok-ping-reply':...
38.048387
89
0.652678
from yaaredis.utils import bool_ok, dict_merge, list_keys_to_dict, nativestr, NodeFlag SENTINEL_STATE_TYPES = { 'can-failover-its-master': int, 'config-epoch': int, 'down-after-milliseconds': int, 'failover-timeout': int, 'info-refresh': int, 'last-hello-message': int, 'last-ok-ping-reply':...
true
true
f77440f5309b4151a9baac8015e10742dd9defc5
9,339
py
Python
Bot/src/passive/dashboard.py
AryamanSrii/Mecha-Karen
4a5c7318f8c458495eee72a13be5db8a0113ed28
[ "Apache-2.0" ]
181
2021-05-26T17:37:40.000Z
2022-02-26T08:36:07.000Z
Bot/src/passive/dashboard.py
AryamanSrii/Mecha-Karen
4a5c7318f8c458495eee72a13be5db8a0113ed28
[ "Apache-2.0" ]
24
2021-05-14T19:47:34.000Z
2021-09-06T17:16:17.000Z
Bot/src/passive/dashboard.py
AryamanSrii/Mecha-Karen
4a5c7318f8c458495eee72a13be5db8a0113ed28
[ "Apache-2.0" ]
16
2021-07-02T09:40:56.000Z
2022-01-21T10:07:08.000Z
# !/usr/bin/python """ Copyright ©️: 2020 Seniatical / _-*™#7519 License: Apache 2.0 A permissive license whose main conditions require preservation of copyright and license notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed under differe...
34.208791
167
0.537959
import discord from discord.ext import commands, ipc import datetime import time as tme from utility import abbrev_denary class Constructor: pass class Dashboard(commands.Cog): def __init__(self, bot): self.bot = bot self.last_logged = { 'joins': {}, } @ipc.serv...
true
true
f774413e1d3b15b9268a4aca138775911b229ddb
23
py
Python
fe621/black_scholes/asian/__init__.py
rukmal/FE-621-Homework
9c7cef7931b58aed54867acd8e8cf1928bc6d2dd
[ "MIT" ]
4
2020-04-29T04:34:50.000Z
2021-11-11T07:49:08.000Z
fe621/black_scholes/asian/__init__.py
rukmal/FE-621-Homework
9c7cef7931b58aed54867acd8e8cf1928bc6d2dd
[ "MIT" ]
null
null
null
fe621/black_scholes/asian/__init__.py
rukmal/FE-621-Homework
9c7cef7931b58aed54867acd8e8cf1928bc6d2dd
[ "MIT" ]
1
2020-04-23T07:32:44.000Z
2020-04-23T07:32:44.000Z
from .call import call
11.5
22
0.782609
from .call import call
true
true
f77441a564365d6c95e54c35e452603dd9491b6a
1,789
py
Python
app/app.py
rohithdesikan/evprediction
3ea5a2b3db350397385c9c9835483eb7dfb2773b
[ "MIT" ]
1
2021-03-23T01:25:21.000Z
2021-03-23T01:25:21.000Z
app/app.py
rohithdesikan/evprediction
3ea5a2b3db350397385c9c9835483eb7dfb2773b
[ "MIT" ]
null
null
null
app/app.py
rohithdesikan/evprediction
3ea5a2b3db350397385c9c9835483eb7dfb2773b
[ "MIT" ]
null
null
null
# %% import os import numpy as np import pandas as pd import flask from flask import Flask, jsonify, request, make_response import tensorflow as tf from evprediction import convert_to_array # %% # Load saved model # model_path = os.path.abspath(os.path.join(os.getcwd(), 'models')) model_name = 'evmodel.h5' model = t...
29.327869
106
0.677473
import os import numpy as np import pandas as pd import flask from flask import Flask, jsonify, request, make_response import tensorflow as tf from evprediction import convert_to_array model_name = 'evmodel.h5' model = tf.keras.models.load_model(model_name) app = Flask(__name__) @app.route('/') def hello(): ...
true
true
f77441d9ce8ae9f649042c2602cbc98df81db6fe
2,131
py
Python
scripts/logreg_iris_bayes_2d_pymc3.py
vipavlovic/pyprobml
59a2edc682d0163955db5e2f27491ad772b60141
[ "MIT" ]
4,895
2016-08-17T22:28:34.000Z
2022-03-31T17:07:15.000Z
scripts/logreg_iris_bayes_2d_pymc3.py
vipavlovic/pyprobml
59a2edc682d0163955db5e2f27491ad772b60141
[ "MIT" ]
446
2016-09-17T14:35:29.000Z
2022-03-31T19:59:33.000Z
scripts/logreg_iris_bayes_2d_pymc3.py
vipavlovic/pyprobml
59a2edc682d0163955db5e2f27491ad772b60141
[ "MIT" ]
1,160
2016-08-18T23:19:27.000Z
2022-03-31T12:44:07.000Z
# Bayesian Binary logistic regression in 2d for iris flwoers # Code is based on # https://github.com/aloctavodia/BAP/blob/master/code/Chp4/04_Generalizing_linear_models.ipynb import superimport import pymc3 as pm import numpy as np import pandas as pd import theano.tensor as tt #import seaborn as sns import scipy.s...
26.308642
94
0.658376
import superimport import pymc3 as pm import numpy as np import pandas as pd import theano.tensor as tt import scipy.stats as stats from scipy.special import expit as logistic import matplotlib.pyplot as plt import arviz as az from sklearn.datasets import load_iris import pyprobml_utils as pml iris = load_iris() X ...
true
true
f774432d1be2c92da83d53dd931a4fa4051cf5fc
3,610
py
Python
python/interpret-core/interpret/glassbox/ebm/test/test_internal.py
prateekiiest/interpret
b5530a587251a77516ab443037fc37f71708564c
[ "MIT" ]
null
null
null
python/interpret-core/interpret/glassbox/ebm/test/test_internal.py
prateekiiest/interpret
b5530a587251a77516ab443037fc37f71708564c
[ "MIT" ]
null
null
null
python/interpret-core/interpret/glassbox/ebm/test/test_internal.py
prateekiiest/interpret
b5530a587251a77516ab443037fc37f71708564c
[ "MIT" ]
null
null
null
# Copyright (c) 2019 Microsoft Corporation # Distributed under the MIT software license from ..internal import Native, NativeEBMBooster import numpy as np import ctypes as ct from contextlib import closing def test_booster_internals(): with closing( NativeEBMBooster( model_type="classificatio...
35.392157
77
0.605817
from ..internal import Native, NativeEBMBooster import numpy as np import ctypes as ct from contextlib import closing def test_booster_internals(): with closing( NativeEBMBooster( model_type="classification", n_classes=2, features_categorical=np.array([0], dtype=ct.c_i...
true
true
f7744493553562f91b4142b707974e3ce616bfa0
5,641
py
Python
src/opnsense/scripts/systemhealth/queryLog.py
nowstuseeit/core
522c21e780342567c41fe262a99d73f4c0c37c2c
[ "BSD-2-Clause" ]
null
null
null
src/opnsense/scripts/systemhealth/queryLog.py
nowstuseeit/core
522c21e780342567c41fe262a99d73f4c0c37c2c
[ "BSD-2-Clause" ]
null
null
null
src/opnsense/scripts/systemhealth/queryLog.py
nowstuseeit/core
522c21e780342567c41fe262a99d73f4c0c37c2c
[ "BSD-2-Clause" ]
null
null
null
#!/usr/local/bin/python3 """ Copyright (c) 2019-2020 Ad Schellevis <ad@opnsense.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain th...
47.403361
135
0.585889
import sys import os.path import re import sre_constants import ujson import datetime import glob from logformats import FormatContainer sys.path.insert(0, "/usr/local/opnsense/site-python") from log_helper import reverse_log_reader, fetch_clog import argparse if __name__ == '__main__': parser = argparse.Arg...
true
true
f77444c4337f5b175ed35f7052aae21641db6ad2
2,927
py
Python
holographic_memory.py
mohammadpz/Associative_LSTM
5094829ed8432be738c79c6a87396e0edf63b008
[ "MIT" ]
127
2016-04-11T19:43:19.000Z
2020-12-16T09:16:25.000Z
holographic_memory.py
sxjscience/Associative_LSTM
5094829ed8432be738c79c6a87396e0edf63b008
[ "MIT" ]
8
2016-04-30T20:07:08.000Z
2017-02-13T22:50:36.000Z
holographic_memory.py
mohammadpz/Associative_LSTM
5094829ed8432be738c79c6a87396e0edf63b008
[ "MIT" ]
28
2016-04-15T20:16:29.000Z
2019-12-10T15:40:28.000Z
import numpy as np import theano import theano.tensor as T # import matplotlib # matplotlib.use('Agg') import matplotlib.pyplot as plt B = 10 F = 110 * 110 * 3 C = 20 # shape: C x F/2 permutations = [] indices = np.arange(F / 2) for i in range(C): np.random.shuffle(indices) permutations.append(np.concatenate(...
26.369369
76
0.570208
import numpy as np import theano import theano.tensor as T import matplotlib.pyplot as plt B = 10 F = 110 * 110 * 3 C = 20 permutations = [] indices = np.arange(F / 2) for i in range(C): np.random.shuffle(indices) permutations.append(np.concatenate( [indices, [ind + F / 2 for ind in indices]]...
true
true
f7744687be11cafff85c0bcffe3ba5a4b64f39e6
2,902
py
Python
survol/sources_types/win32/tcp_sockets_windows.py
AugustinMascarelli/survol
7a822900e82d1e6f016dba014af5741558b78f15
[ "BSD-3-Clause" ]
null
null
null
survol/sources_types/win32/tcp_sockets_windows.py
AugustinMascarelli/survol
7a822900e82d1e6f016dba014af5741558b78f15
[ "BSD-3-Clause" ]
null
null
null
survol/sources_types/win32/tcp_sockets_windows.py
AugustinMascarelli/survol
7a822900e82d1e6f016dba014af5741558b78f15
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ TCP Windows sockets with netstat """ # Many advantages compared to psutil: # The Python module psutil is not needed # psutil gives only sockets if the process is accessible. # It is much faster. # On the other it is necessary to run netstat in the shell. import re import sys import so...
27.638095
104
0.698828
import re import sys import socket import lib_util import lib_common from lib_properties import pc from sources_types import addr as survol_addr def Main(): cgiEnv = lib_common.CgiEnv() args = ["netstat", '-on', ] p = lib_common.SubProcPOpen(args) grph = cgiEnv.GetGraph() (netstat_last_output, netstat_err...
true
true
f77446dcbf45141b16fb503d4c822247f3a59251
13,163
py
Python
result_scripts/generate_predictions.py
NooneBug/adapter_on_entity_typing
b8d2850dbed47adbf21c9a8021cef69a9b5d60dd
[ "MIT" ]
null
null
null
result_scripts/generate_predictions.py
NooneBug/adapter_on_entity_typing
b8d2850dbed47adbf21c9a8021cef69a9b5d60dd
[ "MIT" ]
null
null
null
result_scripts/generate_predictions.py
NooneBug/adapter_on_entity_typing
b8d2850dbed47adbf21c9a8021cef69a9b5d60dd
[ "MIT" ]
1
2021-05-27T10:01:26.000Z
2021-05-27T10:01:26.000Z
import configparser from adapter_entity_typing.network_classes.classifiers import EarlyStoppingWithColdStart from torch.utils.data.dataloader import DataLoader from adapter_entity_typing.network import load_model from collections import defaultdict import torch import json import numpy as np from tqdm import tqdm impo...
42.324759
144
0.498519
import configparser from adapter_entity_typing.network_classes.classifiers import EarlyStoppingWithColdStart from torch.utils.data.dataloader import DataLoader from adapter_entity_typing.network import load_model from collections import defaultdict import torch import json import numpy as np from tqdm import tqdm impo...
true
true
f77447709d0d36121bf8e5293a2415f5a1308d6a
433
py
Python
Pi_Python_Code/buck.py
buvnswrn/Smart-Home-Manager
6426a5f9d279e1938acc08d1799f65119c139524
[ "MIT" ]
2
2018-04-20T05:39:48.000Z
2021-05-15T09:36:36.000Z
Pi_Python_Code/buck.py
buvnswrn/Smart-Home-Manager
6426a5f9d279e1938acc08d1799f65119c139524
[ "MIT" ]
null
null
null
Pi_Python_Code/buck.py
buvnswrn/Smart-Home-Manager
6426a5f9d279e1938acc08d1799f65119c139524
[ "MIT" ]
1
2018-04-20T06:16:51.000Z
2018-04-20T06:16:51.000Z
import os import imagebot as imgbot from cv2 import * # initialize the camera cam = VideoCapture(0) # 0 -> index of camera s, img = cam.read() if s: # frame captured without any errors # namedWindow("cam-test",CV_WINDOW_AUTOSIZE) imshow("cam-test",img) waitKey(0) destroyWindow("cam-test") ...
27.0625
48
0.672055
import os import imagebot as imgbot from cv2 import * cam = VideoCapture(0) s, img = cam.read() if s: imshow("cam-test",img) waitKey(0) destroyWindow("cam-test") imwrite("tmp/guest.jpg",img) cam.release() imgbot.sendimage("tmp/guest.jpg") os.remove("tmp/guest.jpg")
true
true
f77448453912f0f9016133f2ef149c3df037166e
614
py
Python
tests/__init__.py
dohop/supervisord-syslog-notifier
999d440903cec9d03ddbab7cb917fb8770884fdc
[ "Apache-2.0" ]
18
2016-02-25T16:47:12.000Z
2020-06-20T08:47:21.000Z
tests/__init__.py
dohop/supervisord-syslog-notifier
999d440903cec9d03ddbab7cb917fb8770884fdc
[ "Apache-2.0" ]
11
2016-02-19T15:01:24.000Z
2018-04-16T11:09:47.000Z
tests/__init__.py
dohop/supervisord-syslog-notifier
999d440903cec9d03ddbab7cb917fb8770884fdc
[ "Apache-2.0" ]
6
2016-03-28T23:14:10.000Z
2021-10-06T03:05:35.000Z
# # Copyright 2016 Dohop hf. # # 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, ...
32.315789
74
0.750814
true
true
f7744882fdbe89a8d8898a69ffa7c9184b8b1ef8
4,097
py
Python
python/src/hashtable.py
marvincolgin/data-structures-and-algorythms
967eaa61d8e80355e1bde653c349e64ec849d794
[ "MIT" ]
5
2019-07-16T22:05:49.000Z
2022-02-07T15:41:59.000Z
python/src/hashtable.py
Leary-x/data-structures-and-algorithms
4f1133455ddd7a0093fa88726a693b58401f0485
[ "MIT" ]
4
2019-08-13T16:36:30.000Z
2021-06-02T00:40:48.000Z
python/src/hashtable.py
Leary-x/data-structures-and-algorithms
4f1133455ddd7a0093fa88726a693b58401f0485
[ "MIT" ]
3
2019-10-18T12:08:54.000Z
2021-07-19T15:24:24.000Z
import sys sys.path.insert(0, '../linked_list') from link_list import LinkList # noqa E402 import json # noqa E402 class HashTable(): # Big O time == O(1) # :: worst case is O(n), if small hash array or terrible collisions # storage for HashTable _data = [] def __init__(self, hashtableSize=102...
29.056738
80
0.587259
import sys sys.path.insert(0, '../linked_list') from link_list import LinkList import json class HashTable(): _data = [] def __init__(self, hashtableSize=1024): self._data = [None] * hashtableSize def _makePayload(self, name, value) -> dict: return({'name':...
true
true
f774497be208d0c3b1cfcb7d1fcd8be8e61ae125
7,923
py
Python
event/views.py
GroSte/feumgmt
181f047093eb69e1139012c8615decbd3886f8dc
[ "Apache-2.0" ]
null
null
null
event/views.py
GroSte/feumgmt
181f047093eb69e1139012c8615decbd3886f8dc
[ "Apache-2.0" ]
null
null
null
event/views.py
GroSte/feumgmt
181f047093eb69e1139012c8615decbd3886f8dc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin from django.core.urlresolvers import reverse_lazy from django.http import HttpResponseRedirect from django.utils import timezone from django.utils.encoding import force_tex...
37.023364
82
0.739114
from __future__ import unicode_literals from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin from django.core.urlresolvers import reverse_lazy from django.http import HttpResponseRedirect from django.utils import timezone from django.utils.encoding import force_text from django.views.gene...
true
true
f77449e4375371211ee800eba03111dba732fc5e
703
py
Python
python/asyncss/07async_thread.py
edgells/dev_coms
a7e50c32bcb45c6b6781e6d0514fda6ddf8aef02
[ "MIT" ]
null
null
null
python/asyncss/07async_thread.py
edgells/dev_coms
a7e50c32bcb45c6b6781e6d0514fda6ddf8aef02
[ "MIT" ]
null
null
null
python/asyncss/07async_thread.py
edgells/dev_coms
a7e50c32bcb45c6b6781e6d0514fda6ddf8aef02
[ "MIT" ]
null
null
null
import asyncio import time """ """ async def main(): def consuming(delay): time.sleep(delay) print("time consuming....") # 在不同一线程中, 执行 blocking code # TODO: 这里也可以直接使用 Thread 对象执行任务。 ft = loop.run_in_executor(None, consuming, 5) ft1 = loop.run_in_executor(None, consuming, 5) ...
25.107143
72
0.647226
import asyncio import time async def main(): def consuming(delay): time.sleep(delay) print("time consuming....") ft = loop.run_in_executor(None, consuming, 5) ft1 = loop.run_in_executor(None, consuming, 5) ft2 = loop.run_in_executor(None, consuming, 5) ft3 = loop.run_in_e...
true
true
f7744a34dc0c0ddb3d4cb447e4c9c01d81a6161e
669
py
Python
tacotron/utils/symbols.py
thangvu8948/Tacotron-2-Vietnamese
164748c5fcdeb2f07ec9aaf31a6458cfb835e79b
[ "MIT" ]
null
null
null
tacotron/utils/symbols.py
thangvu8948/Tacotron-2-Vietnamese
164748c5fcdeb2f07ec9aaf31a6458cfb835e79b
[ "MIT" ]
null
null
null
tacotron/utils/symbols.py
thangvu8948/Tacotron-2-Vietnamese
164748c5fcdeb2f07ec9aaf31a6458cfb835e79b
[ "MIT" ]
null
null
null
''' Defines the set of symbols used in text input to the model. The default is a set of ASCII characters that works well for English or text that has been run through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details. ''' from . import cmudict _pad = '_' _eos = '~' ...
37.166667
120
0.753363
from . import cmudict _pad = '_' _eos = '~' _characters = '0123456789aáảàãạâấẩầẫậăắẳằẵặbcdđeéẻèẽẹêếểềễệfghiíỉìĩịjklmnoóỏòõọôốổồỗộơớởờỡợpqrstuúủùũụưứửừữựvwxyýỷỳỹỵz ' symbols = [_pad, _eos] + list(_characters)
true
true
f7744ae48286169fedcdcef2854b124a9635b626
5,061
py
Python
bin/awdm2components.py
rickmark/awdd_decode
d53e0eb52b9b5aabe11b30fd2fa4e403e3c08fd0
[ "MIT" ]
3
2021-10-02T17:59:13.000Z
2022-01-12T20:25:55.000Z
bin/awdm2components.py
rickmark/awdd_decode
d53e0eb52b9b5aabe11b30fd2fa4e403e3c08fd0
[ "MIT" ]
null
null
null
bin/awdm2components.py
rickmark/awdd_decode
d53e0eb52b9b5aabe11b30fd2fa4e403e3c08fd0
[ "MIT" ]
1
2022-03-25T19:14:05.000Z
2022-03-25T19:14:05.000Z
#!/usr/bin/env python import io import os.path import glob from enum import IntEnum from typing import * import struct import sys # Primal metadata parser that simply shreds into regions for analysis # this likely wont be useful beyond the reverse engineering of this format or # when new variations occur, you probably...
33.296053
131
0.639597
import io import os.path import glob from enum import IntEnum from typing import * import struct import sys ROOT_MANIFEST_PATH = '/System/Library/PrivateFrameworks/WirelessDiagnostics.framework/Support/AWDMetadata.bin' EXTENSION_MANIFEST_PATH = '/System/Library/AWD/Metadata/*.bin' def copy_io(io_from: BinaryIO, io_...
true
true
f7744b42226dfb69c0cd1b2a5e63ff9a0a14f219
359
py
Python
30_days_of_code_9.py
sercangul/HackerRank
e6d7056babe03baafee8d7f1cacdca7c28b72ded
[ "Apache-2.0" ]
null
null
null
30_days_of_code_9.py
sercangul/HackerRank
e6d7056babe03baafee8d7f1cacdca7c28b72ded
[ "Apache-2.0" ]
null
null
null
30_days_of_code_9.py
sercangul/HackerRank
e6d7056babe03baafee8d7f1cacdca7c28b72ded
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jun 3 19:06:31 2019 @author: sercangul """ import math import os def factorial(n): return math.factorial(n) if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') n = int(input()) result = factorial(n) fptr.writ...
15.608696
47
0.607242
import math import os def factorial(n): return math.factorial(n) if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') n = int(input()) result = factorial(n) fptr.write(str(result) + '\n') fptr.close()
true
true
f7744b6e655032fb01f3cd1af31d5b20ac73a44e
225
py
Python
modules/getText/fromPDF.py
BurraAbhishek/lipyplagiarism
6a7d468dacf42ece410038aaee8103fbccee6299
[ "Apache-2.0" ]
null
null
null
modules/getText/fromPDF.py
BurraAbhishek/lipyplagiarism
6a7d468dacf42ece410038aaee8103fbccee6299
[ "Apache-2.0" ]
null
null
null
modules/getText/fromPDF.py
BurraAbhishek/lipyplagiarism
6a7d468dacf42ece410038aaee8103fbccee6299
[ "Apache-2.0" ]
null
null
null
import PyPDF2 def getTextFromPDF(PDFIn): pdfReader = PyPDF2.PdfFileReader(PDFIn) s = "" for i in range(0, pdfReader.numPages): page = pdfReader.getPage(i) s += page.extractText() return PDFIn
22.5
43
0.644444
import PyPDF2 def getTextFromPDF(PDFIn): pdfReader = PyPDF2.PdfFileReader(PDFIn) s = "" for i in range(0, pdfReader.numPages): page = pdfReader.getPage(i) s += page.extractText() return PDFIn
true
true
f7744b84b83c49081be56e70635d9a0d96d7c4e7
4,182
py
Python
yandex/cloud/apploadbalancer/v1/tls_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
36
2018-12-23T13:51:50.000Z
2022-03-25T07:48:24.000Z
yandex/cloud/apploadbalancer/v1/tls_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
15
2019-02-28T04:55:09.000Z
2022-03-06T23:17:24.000Z
yandex/cloud/apploadbalancer/v1/tls_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
18
2019-02-23T07:10:57.000Z
2022-03-28T14:41:08.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/apploadbalancer/v1/tls.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _re...
44.967742
448
0.795552
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from yandex.cloud import validation_pb2 as yandex_dot_cloud_...
true
true
f7744c405c33e1e64f6124344fab0a94effb66bc
551
py
Python
conftest.py
aquichita/awesome-pytest-playwright
ce4299d9f12d7ee08ae1606aae558eaf7d666d14
[ "MIT" ]
1
2021-08-20T01:26:34.000Z
2021-08-20T01:26:34.000Z
conftest.py
aquichita/awesome-pytest-playwright
ce4299d9f12d7ee08ae1606aae558eaf7d666d14
[ "MIT" ]
null
null
null
conftest.py
aquichita/awesome-pytest-playwright
ce4299d9f12d7ee08ae1606aae558eaf7d666d14
[ "MIT" ]
null
null
null
import pytest from service.common.login import LoginPage """ function:每一个函数或方法都会调用 class:每一个类调用一次,一个类可以有多个方法 module:每一个.py文件调用一次,该文件内又有多个function和class session:是多个文件调用一次,可以跨.py文件调用,每个.py文件就是module """ @pytest.fixture() def session(page): return LoginPage(page).login( username='18886885', password...
17.21875
56
0.715064
import pytest from service.common.login import LoginPage @pytest.fixture() def session(page): return LoginPage(page).login( username='18886885', password='Admin@123', base_url='http://172.23.16.13:8888/oauth/login', ) def pytest_sessionstart(): ... def pytest_sessionfinish(ses...
true
true
f7744c42f77c956fc78d051e0c96d0b38ea42ccb
2,066
py
Python
spinsys/time_dependent.py
macthecadillac/Interacting-Fermions
6122d2a7e67533b28e581929995ce8e2a2ad41fc
[ "BSD-3-Clause" ]
1
2020-07-29T06:06:12.000Z
2020-07-29T06:06:12.000Z
spinsys/time_dependent.py
macthecadillac/Interacting-Fermions
6122d2a7e67533b28e581929995ce8e2a2ad41fc
[ "BSD-3-Clause" ]
null
null
null
spinsys/time_dependent.py
macthecadillac/Interacting-Fermions
6122d2a7e67533b28e581929995ce8e2a2ad41fc
[ "BSD-3-Clause" ]
null
null
null
""" This file is part of spinsys. Spinsys is free software: you can redistribute it and/or modify it under the terms of the BSD 3-clause license. See LICENSE.txt for exact terms and conditions. """ import numpy as np class TimeMachine(): def __init__(self, eigvs, eigvecs, psi): """ Time evolves...
33.868852
78
0.615198
import numpy as np class TimeMachine(): def __init__(self, eigvs, eigvecs, psi): self.eigenenergies = eigvs self.back_transform_matrix = eigvecs self.initial_state = self._convert_to_eigenbasis(eigvecs, psi) self.curr_state = self.initial_state.copy() self.coeffs = 1 ...
true
true
f7744cf3cf1124060921c2ec5015cf8507cd9f86
2,210
py
Python
tools/tsne.py
indutny/gradtype
0e7e1290e6b4e669126e42339a739ec58dc1154e
[ "Unlicense" ]
72
2018-04-07T06:01:35.000Z
2020-04-27T15:01:36.000Z
tools/tsne.py
indutny/gradtype
0e7e1290e6b4e669126e42339a739ec58dc1154e
[ "Unlicense" ]
15
2018-03-26T15:43:28.000Z
2022-01-22T01:53:32.000Z
tools/tsne.py
indutny/gradtype
0e7e1290e6b4e669126e42339a739ec58dc1154e
[ "Unlicense" ]
2
2019-05-12T10:44:14.000Z
2019-05-19T19:30:15.000Z
import matplotlib import sys import json import matplotlib.pyplot as plt import matplotlib.patches as mpatches import matplotlib.axes as axes import numpy as np import sklearn.decomposition import sklearn.preprocessing from sklearn.manifold import TSNE COLOR_MAP = plt.cm.gist_rainbow SEED = 0x37255c25 USE_TSNE = True...
24.831461
80
0.654751
import matplotlib import sys import json import matplotlib.pyplot as plt import matplotlib.patches as mpatches import matplotlib.axes as axes import numpy as np import sklearn.decomposition import sklearn.preprocessing from sklearn.manifold import TSNE COLOR_MAP = plt.cm.gist_rainbow SEED = 0x37255c25 USE_TSNE = True...
true
true
f7744d487dee87e0827ba1353279d25a7bc7671e
5,750
py
Python
_participantes/jogoDaVelha.py
viiisemef/minicursogit
512fb7b0bffb48383296f312f4c3ccf47ce3b064
[ "MIT" ]
6
2021-09-27T22:26:39.000Z
2021-09-28T23:14:18.000Z
_participantes/jogoDaVelha.py
viiisemef/minicursogit
512fb7b0bffb48383296f312f4c3ccf47ce3b064
[ "MIT" ]
null
null
null
_participantes/jogoDaVelha.py
viiisemef/minicursogit
512fb7b0bffb48383296f312f4c3ccf47ce3b064
[ "MIT" ]
6
2021-09-27T22:28:08.000Z
2021-09-28T23:36:33.000Z
#jogo da velha para terminal import random def drawBoard(board): # Esta funcao imprime o tabuleiro do jogo #"board" e uma lista de 12 strings representando o tabuleiro (ignorando o indice 0) print(' ' + board[7] + ' | ' + board[8] + ' | ' + board[9]) print('===========') print(' ' + board[4] + ' |...
33.045977
399
0.577739
import random def drawBoard(board): print(' ' + board[7] + ' | ' + board[8] + ' | ' + board[9]) print('===========') print(' ' + board[4] + ' | ' + board[5] + ' | ' + board[6]) print('===========') print(' ' + board[1] + ' | ' + board[2] + ' | ' + board[3]) def inputPlayerLetter(): ...
true
true
f7744d4d2d39fffb17218a5445bdfda5130b24dd
19,753
py
Python
test/functional/wallet.py
Calipson/denemecoin-core
e27e068d2eaee888bd70534a08c7fbf0bded473a
[ "MIT" ]
null
null
null
test/functional/wallet.py
Calipson/denemecoin-core
e27e068d2eaee888bd70534a08c7fbf0bded473a
[ "MIT" ]
null
null
null
test/functional/wallet.py
Calipson/denemecoin-core
e27e068d2eaee888bd70534a08c7fbf0bded473a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet.""" from test_framework.test_framework import BitcoinTestFramework from test_framework....
47.143198
181
0.64294
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class WalletTest(BitcoinTestFramework): def check_fee_amount(self, curr_balance, balance_with_fee, fee_per_byte, tx_size): fee = balance_with_fee - curr_balance assert_fee_amount(fee, tx_size, fee_per_...
true
true
f7744db5236572cd5aeec538c6befabba4b41013
28,896
py
Python
tests/test-module.py
pgrimaud/cumulus-message-adapter
3d8db241261add21369f22fc31667544984c3069
[ "Apache-2.0" ]
5
2018-10-17T09:30:18.000Z
2022-01-16T11:23:04.000Z
tests/test-module.py
pgrimaud/cumulus-message-adapter
3d8db241261add21369f22fc31667544984c3069
[ "Apache-2.0" ]
12
2018-09-06T23:04:38.000Z
2022-01-05T13:57:42.000Z
tests/test-module.py
pgrimaud/cumulus-message-adapter
3d8db241261add21369f22fc31667544984c3069
[ "Apache-2.0" ]
9
2019-07-21T02:40:41.000Z
2021-11-29T22:17:32.000Z
# pylint: disable=R1732 """ Tests for cumulus-message-adapter """ import os import json import unittest from mock import patch from jsonschema.exceptions import ValidationError from message_adapter import aws, message_adapter class Test(unittest.TestCase): # pylint: disable=too-many-public-methods # pylint: disa...
44.04878
100
0.62628
import os import json import unittest from mock import patch from jsonschema.exceptions import ValidationError from message_adapter import aws, message_adapter class Test(unittest.TestCase): s3_object = {'input': ':blue_whale:'} config_s3_object = {'task_config': 'bad value', 'input': ':blue_whale:'} ...
true
true
f7744f01652da135b65c3c2b1e0787453cafdae0
675
py
Python
prettyqt/syntaxhighlighters/__init__.py
phil65/PrettyQt
26327670c46caa039c9bd15cb17a35ef5ad72e6c
[ "MIT" ]
7
2019-05-01T01:34:36.000Z
2022-03-08T02:24:14.000Z
prettyqt/syntaxhighlighters/__init__.py
phil65/PrettyQt
26327670c46caa039c9bd15cb17a35ef5ad72e6c
[ "MIT" ]
141
2019-04-16T11:22:01.000Z
2021-04-14T15:12:36.000Z
prettyqt/syntaxhighlighters/__init__.py
phil65/PrettyQt
26327670c46caa039c9bd15cb17a35ef5ad72e6c
[ "MIT" ]
5
2019-04-17T11:48:19.000Z
2021-11-21T10:30:19.000Z
"""syntaxhighlighters module. contains some custom syntax highlighers """ from .highlightrule import HighlightRule from .jsonhighlighter import JsonHighlighter from .pythonhighlighter import PythonHighlighter from .yamlhighlighter import YamlHighlighter from .xmlhighlighter import XmlHighlighter from .regexmatchhighl...
25.961538
56
0.807407
from .highlightrule import HighlightRule from .jsonhighlighter import JsonHighlighter from .pythonhighlighter import PythonHighlighter from .yamlhighlighter import YamlHighlighter from .xmlhighlighter import XmlHighlighter from .regexmatchhighlighter import RegexMatchHighlighter from .markdownhighlighter import Markdo...
true
true
f7745082787641b4b17d63c1cfe118bb2cc286ae
969
py
Python
backend/buyer/migrations/0001_initial.py
mariaeid/Examensarbete
3b04d404f399ecd5e9e0011bbbe81e715d45fa62
[ "MIT" ]
null
null
null
backend/buyer/migrations/0001_initial.py
mariaeid/Examensarbete
3b04d404f399ecd5e9e0011bbbe81e715d45fa62
[ "MIT" ]
14
2020-06-06T00:21:31.000Z
2022-03-12T00:10:08.000Z
backend/buyer/migrations/0001_initial.py
mariaeid/Examensarbete
3b04d404f399ecd5e9e0011bbbe81e715d45fa62
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-11-03 17:14 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Buyer', fields=[ ('id', models.AutoField(au...
33.413793
114
0.574819
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Buyer', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=Fal...
true
true
f774519609005dface41fd15021c7f237f091341
6,019
py
Python
pipenv/vendor/pexpect/utils.py
Enzime/pipenv
d4f710be4a39e09a82a5133b7b3a277ee9bfb13a
[ "MIT" ]
18,636
2017-12-06T14:53:18.000Z
2022-03-31T13:12:34.000Z
pipenv/vendor/pexpect/utils.py
Enzime/pipenv
d4f710be4a39e09a82a5133b7b3a277ee9bfb13a
[ "MIT" ]
3,740
2019-01-23T15:36:48.000Z
2022-03-31T22:01:13.000Z
pipenv/vendor/pexpect/utils.py
Enzime/pipenv
d4f710be4a39e09a82a5133b7b3a277ee9bfb13a
[ "MIT" ]
1,987
2017-12-06T15:04:51.000Z
2022-03-26T10:05:15.000Z
import os import sys import stat import select import time import errno try: InterruptedError except NameError: # Alias Python2 exception to Python3 InterruptedError = select.error if sys.version_info[0] >= 3: string_types = (str,) else: string_types = (unicode, str) def is_executable_file(path)...
32.015957
93
0.563383
import os import sys import stat import select import time import errno try: InterruptedError except NameError: InterruptedError = select.error if sys.version_info[0] >= 3: string_types = (str,) else: string_types = (unicode, str) def is_executable_file(path): fpath = os.path.realpath(pa...
true
true
f77451c9e464c0aa2b5b31ce1e0a7a384dbf9873
2,460
py
Python
Spark/PySpark/1.0 Data Algorithms with Spark - Recipes and Design Patterns for Scaling Up using PySpark (with code)/Code/chap04/python/exact_median_by_key_use_reducebykey.py
okara83/Becoming-a-Data-Scientist
f09a15f7f239b96b77a2f080c403b2f3e95c9650
[ "MIT" ]
null
null
null
Spark/PySpark/1.0 Data Algorithms with Spark - Recipes and Design Patterns for Scaling Up using PySpark (with code)/Code/chap04/python/exact_median_by_key_use_reducebykey.py
okara83/Becoming-a-Data-Scientist
f09a15f7f239b96b77a2f080c403b2f3e95c9650
[ "MIT" ]
null
null
null
Spark/PySpark/1.0 Data Algorithms with Spark - Recipes and Design Patterns for Scaling Up using PySpark (with code)/Code/chap04/python/exact_median_by_key_use_reducebykey.py
okara83/Becoming-a-Data-Scientist
f09a15f7f239b96b77a2f080c403b2f3e95c9650
[ "MIT" ]
2
2022-02-09T15:41:33.000Z
2022-02-11T07:47:40.000Z
#!/usr/bin/python #----------------------------------------------------- # This program find median per key using # the reduceByKey() transformation. # # To find median(values), we use Python's statistics package: # # >>> # Import statistics Library # >>> import statistics # >>> # >>> # Calculate middle values # >>> pr...
24.848485
85
0.502033
# # >>> # Import statistics Library # >>> import statistics # >>> # >>> # Calculate middle values # >>> print(statistics.median([1, 3, 5, 7, 9, 11, 13])) # 7 # >>> print(statistics.median([1, 3, 5, 7, 9, 11])) # 6.0 # >>> print(statistics.median([-11, 5.5, -3.4, 7.1, -9, 22])) # 1.05 #----------------------------------...
true
true
f774523c1a0320a4838acd7905a92428e852a192
553
py
Python
rockiot/app/apps.py
isocserbia/rockiot
fc0c52cca4ca862ba570d6b2c64b8d30f8989f05
[ "Apache-2.0" ]
2
2022-01-23T11:03:37.000Z
2022-02-26T10:54:10.000Z
rockiot/app/apps.py
isocserbia/rockiot
fc0c52cca4ca862ba570d6b2c64b8d30f8989f05
[ "Apache-2.0" ]
null
null
null
rockiot/app/apps.py
isocserbia/rockiot
fc0c52cca4ca862ba570d6b2c64b8d30f8989f05
[ "Apache-2.0" ]
null
null
null
import os import sys from django.apps import AppConfig class AppConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'app' def ready(self): from app.models import AlertScheme, MAX_MINUTES_NO_METADATA, MAX_TERMINATED_CONNECTIONS_PER_HOUR, \ MAX_MINUTES_NO_IN...
21.269231
107
0.674503
import os import sys from django.apps import AppConfig class AppConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'app' def ready(self): from app.models import AlertScheme, MAX_MINUTES_NO_METADATA, MAX_TERMINATED_CONNECTIONS_PER_HOUR, \ MAX_MINUTES_NO_IN...
true
true
f7745350ef090d955ce3be84a6b7b1c1fb12f542
976
py
Python
Python/palindrome-number.py
ShuaiWangGit/LeetCode
d85a4cb23f8f85059691994e7ad89001c6e4f3f6
[ "MIT" ]
4
2019-08-06T01:55:23.000Z
2021-12-12T21:04:01.000Z
Python/palindrome-number.py
ShuaiWangGit/LeetCode
d85a4cb23f8f85059691994e7ad89001c6e4f3f6
[ "MIT" ]
null
null
null
Python/palindrome-number.py
ShuaiWangGit/LeetCode
d85a4cb23f8f85059691994e7ad89001c6e4f3f6
[ "MIT" ]
8
2020-02-20T08:21:12.000Z
2022-02-17T05:53:21.000Z
# Time: O(1) # Space: O(1) # # Determine whether an integer is a palindrome. Do this without extra space. # # Some hints: # Could negative integers be palindromes? (ie, -1) # # If you are thinking of converting the integer to string, note the restriction of using extra space. # # You could also try reversing an int...
27.885714
102
0.63832
class Solution: def isPalindrome(self, x): if x < 0: return False copy, reverse = x, 0 while copy: reverse *= 10 reverse += copy % 10 copy //= 10 return x == reverse if __name__ == "__main__": print Solution(...
false
true
f774542e12a2af03b70ac2aeabd6a9faa3cd4bbd
5,128
py
Python
VisualBERT/tests/models/test_mmbt.py
Fostereee/Transformer-MM-Explainability
6dc4925b83a38e39069369da599b11d548128eb5
[ "MIT" ]
322
2021-03-29T20:42:57.000Z
2022-03-28T12:26:47.000Z
VisualBERT/tests/models/test_mmbt.py
Fostereee/Transformer-MM-Explainability
6dc4925b83a38e39069369da599b11d548128eb5
[ "MIT" ]
14
2021-04-23T23:45:58.000Z
2022-03-15T02:46:01.000Z
VisualBERT/tests/models/test_mmbt.py
Fostereee/Transformer-MM-Explainability
6dc4925b83a38e39069369da599b11d548128eb5
[ "MIT" ]
51
2021-04-05T15:44:52.000Z
2022-03-25T02:28:49.000Z
# Copyright (c) Facebook, Inc. and its affiliates. import unittest import tests.test_utils as test_utils import torch from VisualBERT.mmf.common.sample import Sample, SampleList from VisualBERT.mmf.models.mmbt import MMBT from VisualBERT.mmf.modules.encoders import ( ImageEncoderFactory, ImageEncoderTypes, ...
37.15942
88
0.659321
import unittest import tests.test_utils as test_utils import torch from VisualBERT.mmf.common.sample import Sample, SampleList from VisualBERT.mmf.models.mmbt import MMBT from VisualBERT.mmf.modules.encoders import ( ImageEncoderFactory, ImageEncoderTypes, ResNet152ImageEncoder, TextEncoderFactory, ...
true
true
f774548141aadc29811cd76790ab0d5426537643
944
py
Python
kubernetes_asyncio/test/test_v1_node_status.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1_node_status.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1_node_status.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.13.5 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import kube...
23.6
124
0.71928
from __future__ import absolute_import import unittest import kubernetes_asyncio.client from kubernetes_asyncio.client.models.v1_node_status import V1NodeStatus from kubernetes_asyncio.client.rest import ApiException class TestV1NodeStatus(unittest.TestCase): def setUp(self): pass def tearDown...
true
true
f774572fceaad9440f14f6e2a025f86ebd2767ed
505
py
Python
Course 1 - Introduction to Python/Unit6_Algorithmic_Complexity/Problem_Set_6/Problem 3.py
Odzen/MIT_React_DataScience
3b82ef75dab1880cdbf0136a7b716e90cb27a9cb
[ "MIT" ]
null
null
null
Course 1 - Introduction to Python/Unit6_Algorithmic_Complexity/Problem_Set_6/Problem 3.py
Odzen/MIT_React_DataScience
3b82ef75dab1880cdbf0136a7b716e90cb27a9cb
[ "MIT" ]
null
null
null
Course 1 - Introduction to Python/Unit6_Algorithmic_Complexity/Problem_Set_6/Problem 3.py
Odzen/MIT_React_DataScience
3b82ef75dab1880cdbf0136a7b716e90cb27a9cb
[ "MIT" ]
null
null
null
# For each of the following expressions, select the order of growth class that # best describes it from the following list: O(1) O(log(n)), O(n), O(n log (n)), # O(nc) or O(cn. Assume c is some constant. # 0.0000001n + 1000000 # O(n) # 0.0001n2 + 20000n - 90000 # O(n^c) # 20n + 900log(n) + 100000 # O(n) # (log(n))2...
15.30303
80
0.552475
true
true
f77457b827000c8c1866ed478dc83f26be53df48
772
py
Python
hc/api/tests/test_admin.py
andela/hc-aces-kla-
f07136055f73ad6221619aaa7c7e1eef55446d4c
[ "BSD-3-Clause" ]
null
null
null
hc/api/tests/test_admin.py
andela/hc-aces-kla-
f07136055f73ad6221619aaa7c7e1eef55446d4c
[ "BSD-3-Clause" ]
26
2018-06-23T18:00:44.000Z
2018-07-23T17:58:24.000Z
hc/api/tests/test_admin.py
andela/hc-aces-kla
f07136055f73ad6221619aaa7c7e1eef55446d4c
[ "BSD-3-Clause" ]
null
null
null
from hc.api.models import Channel, Check from hc.test import BaseTestCase class ApiAdminTestCase(BaseTestCase): def setUp(self): super(ApiAdminTestCase, self).setUp() self.check = Check.objects.create(user=self.alice, tags="foo bar") # Set Alice to be staff and superuser self.ali...
30.88
76
0.670984
from hc.api.models import Channel, Check from hc.test import BaseTestCase class ApiAdminTestCase(BaseTestCase): def setUp(self): super(ApiAdminTestCase, self).setUp() self.check = Check.objects.create(user=self.alice, tags="foo bar") self.alice.is_staff = True self.alice....
true
true
f774580ac52e8df4ad47a7fcb5a69d16bc13c66f
2,968
py
Python
gym/envs/wlan/SingleAP.py
zachary2wave/UAV-aid-communication
801fe22d839261af43127e31db00f166ed6484a0
[ "MIT" ]
2
2019-12-02T15:36:55.000Z
2022-02-10T11:55:10.000Z
gym/envs/wlan/SingleAP.py
zachary2wave/UAV-aid-communication
801fe22d839261af43127e31db00f166ed6484a0
[ "MIT" ]
null
null
null
gym/envs/wlan/SingleAP.py
zachary2wave/UAV-aid-communication
801fe22d839261af43127e31db00f166ed6484a0
[ "MIT" ]
2
2019-12-10T00:10:38.000Z
2021-01-07T03:31:38.000Z
import gym from gym import spaces import numpy as np from gym.envs.wlan import env_simulated as env from gym.envs.wlan import thought_out as tho from gym.utils import seeding class ApEnv(gym.Env): def __init__(self): self.Num_AP = 1 self.Num_UE = 50 self.channel = [1] self.oriTHO =...
39.573333
99
0.577493
import gym from gym import spaces import numpy as np from gym.envs.wlan import env_simulated as env from gym.envs.wlan import thought_out as tho from gym.utils import seeding class ApEnv(gym.Env): def __init__(self): self.Num_AP = 1 self.Num_UE = 50 self.channel = [1] self.oriTHO =...
true
true
f77458f8303b90b8780e0b9b17d56ed6b1aa50b9
62,123
py
Python
pennyspec/scripts/helpers.py
mattjshannon/mattpy
52278419fcf56a5a0c25efb1bbc3ffe0f037c1bb
[ "BSD-3-Clause" ]
null
null
null
pennyspec/scripts/helpers.py
mattjshannon/mattpy
52278419fcf56a5a0c25efb1bbc3ffe0f037c1bb
[ "BSD-3-Clause" ]
6
2018-07-22T20:50:38.000Z
2019-09-19T17:41:24.000Z
pennyspec/scripts/helpers.py
mattjshannon/mattpy
52278419fcf56a5a0c25efb1bbc3ffe0f037c1bb
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """ helpers.py Helpers functions for analyze_pahs.py """ import errno import os import pickle import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np from gaussfitter import onedgaussian, multigaussfit from scipy.integrate import simps from mattpy.utils impor...
34.303147
79
0.474237
import errno import os import pickle import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np from gaussfitter import onedgaussian, multigaussfit from scipy.integrate import simps from mattpy.utils import to_sigma, to_fwhm, quant_str def ensure_exists(path): try: os.mak...
true
true
f77458fcd19ffe84869b321ea61d0414f33b6ace
2,146
py
Python
vendor-local/lib/python/factory/compat.py
Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695
bf6a382913901ad193d907f022086931df0de8c4
[ "BSD-3-Clause" ]
1
2015-07-13T03:29:04.000Z
2015-07-13T03:29:04.000Z
vendor-local/lib/python/factory/compat.py
Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695
bf6a382913901ad193d907f022086931df0de8c4
[ "BSD-3-Clause" ]
2
2015-03-03T23:02:19.000Z
2019-03-30T04:45:51.000Z
vendor-local/lib/python/factory/compat.py
Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695
bf6a382913901ad193d907f022086931df0de8c4
[ "BSD-3-Clause" ]
2
2016-04-15T11:43:05.000Z
2016-04-15T11:43:15.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2010 Mark Sandstrom # Copyright (c) 2011-2013 Raphaël Barrois # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without ...
31.101449
79
0.675676
import datetime import sys PY2 = (sys.version_info[0] == 2) if PY2: def is_string(obj): return isinstance(obj, (str, unicode)) from StringIO import StringIO as BytesIO else: def is_string(obj): return isinstance(obj, str) from io import BytesIO try: UTC = datetime.tim...
true
true
f7745a348fc7e9affea625ab9bda06298308eebf
4,627
py
Python
openGaussBase/testcase/SQL/DML/upsert/Opengauss_Function_DML_Upsert_Case0131.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SQL/DML/upsert/Opengauss_Function_DML_Upsert_Case0131.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SQL/DML/upsert/Opengauss_Function_DML_Upsert_Case0131.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
39.211864
84
0.653555
import time import unittest from testcase.utils.ComThread import ComThread from testcase.utils.CommonSH import CommonSH from testcase.utils.Constant import Constant from testcase.utils.Logger import Logger class UpsertCase131(unittest.TestCase): def setUp(self): self.log = Logger() self.log.info(...
true
true
f7745a6f2dc8652a52b7d81cda6d4014fc2e5a47
61
py
Python
algorithms/ch10graph/__init__.py
yidao620c/core-algorithm
af0fe78ef83324d4e0a708489ffb8678237b7c0c
[ "Apache-2.0" ]
819
2015-01-19T02:59:34.000Z
2022-03-30T06:53:35.000Z
algorithms/ch10graph/__init__.py
yidao620c/core-algorithm
af0fe78ef83324d4e0a708489ffb8678237b7c0c
[ "Apache-2.0" ]
3
2017-06-28T12:00:59.000Z
2018-12-10T08:44:45.000Z
algorithms/ch10graph/__init__.py
yidao620c/core-algorithm
af0fe78ef83324d4e0a708489ffb8678237b7c0c
[ "Apache-2.0" ]
331
2015-01-19T03:23:02.000Z
2022-03-24T03:09:34.000Z
# -*- encoding: utf-8 -*- """图算法 Some of description... """
10.166667
25
0.52459
true
true
f7745af3fbbd168382b9b7f648ca05cdb97e78c2
331
py
Python
file_separator/setup.py
yoshikawat64m/python-packages
862034d88965fdaf73d363f52ce6e7cc83448255
[ "MIT" ]
null
null
null
file_separator/setup.py
yoshikawat64m/python-packages
862034d88965fdaf73d363f52ce6e7cc83448255
[ "MIT" ]
null
null
null
file_separator/setup.py
yoshikawat64m/python-packages
862034d88965fdaf73d363f52ce6e7cc83448255
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='file_separator', version='0.1.0', license='mit', description='Separate python mudule', author='Tomoya Yoshikawa', author_email='yoshikawat.64m@gmail.com', url='None.com', packages=find_packages(where='src'), package_dir={'':...
20.6875
44
0.661631
from setuptools import setup, find_packages setup( name='file_separator', version='0.1.0', license='mit', description='Separate python mudule', author='Tomoya Yoshikawa', author_email='yoshikawat.64m@gmail.com', url='None.com', packages=find_packages(where='src'), package_dir={'':...
true
true
f7745b0ea7b484d9a7a1bfb0f7574a214bd9d333
1,804
py
Python
qa/rpc-tests/disablewallet.py
diablax2/bts
fe3c727ce607e11bee64bb03afadb653e9bd23fd
[ "MIT" ]
null
null
null
qa/rpc-tests/disablewallet.py
diablax2/bts
fe3c727ce607e11bee64bb03afadb653e9bd23fd
[ "MIT" ]
null
null
null
qa/rpc-tests/disablewallet.py
diablax2/bts
fe3c727ce607e11bee64bb03afadb653e9bd23fd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Exercise API with -disablewallet. # from test_framework.test_framework import BTSTestFramework from ...
36.816327
91
0.680155
from test_framework.test_framework import BTSTestFramework from test_framework.util import * class DisableWalletTest (BTSTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 1 def setup_network(self, split=False): self.nodes ...
true
true
f7745b216c104e899029213547528fc8367c0172
22,332
py
Python
allennlp/data/fields/knowledge_graph_field.py
entslscheia/allennlp
eeba62e34c8e211ed5963f830528c957f178607b
[ "Apache-2.0" ]
null
null
null
allennlp/data/fields/knowledge_graph_field.py
entslscheia/allennlp
eeba62e34c8e211ed5963f830528c957f178607b
[ "Apache-2.0" ]
null
null
null
allennlp/data/fields/knowledge_graph_field.py
entslscheia/allennlp
eeba62e34c8e211ed5963f830528c957f178607b
[ "Apache-2.0" ]
1
2021-09-21T12:03:27.000Z
2021-09-21T12:03:27.000Z
""" ``KnowledgeGraphField`` is a ``Field`` which stores a knowledge graph representation. """ from typing import Callable, Dict, List, Set from collections import defaultdict import editdistance from overrides import overrides import torch from allennlp.common import util from allennlp.common.checks import Configurat...
46.236025
128
0.653412
from typing import Callable, Dict, List, Set from collections import defaultdict import editdistance from overrides import overrides import torch from allennlp.common import util from allennlp.common.checks import ConfigurationError from allennlp.data.fields.field import Field from allennlp.data.token_indexers.token_...
true
true
f7745b587f37e300fa0c56b21bf8ba2349805c85
5,997
py
Python
BioClients/iuphar/Client.py
jeremyjyang/BioClients
b78ab2b948c79616fed080112e31d383346bec58
[ "CC0-1.0" ]
10
2020-05-26T07:29:14.000Z
2021-12-06T21:33:40.000Z
BioClients/iuphar/Client.py
jeremyjyang/BioClients
b78ab2b948c79616fed080112e31d383346bec58
[ "CC0-1.0" ]
1
2021-10-05T12:25:30.000Z
2021-10-05T17:05:56.000Z
BioClients/iuphar/Client.py
jeremyjyang/BioClients
b78ab2b948c79616fed080112e31d383346bec58
[ "CC0-1.0" ]
2
2021-03-16T03:20:24.000Z
2021-08-08T20:17:10.000Z
#!/usr/bin/env python3 """ See http://www.guidetopharmacology.org/webServices.jsp """ import sys,os,re,argparse,time,logging,urllib.parse,json # from .. import iuphar # API_HOST='www.guidetopharmacology.org' API_BASE_PATH='/services' # ############################################################################# if __n...
44.095588
369
0.730032
import sys,os,re,argparse,time,logging,urllib.parse,json from .. import iuphar API_HOST='www.guidetopharmacology.org' API_BASE_PATH='/services' if __name__=='__main__': SEARCH_TYPE='substructure'; epilog='''\ operations: list_targets: list targets (selected by type, db, accessionId); list_target_families: list...
true
true
f7745c0d0dc37dbec47604496e434b50f2b2e79f
100
py
Python
insecure-crypto-test.py
boost-entropy-python/GetOldTweets-python
e64e0f12a4dda40762679f06e216e015be96d8dd
[ "MIT" ]
null
null
null
insecure-crypto-test.py
boost-entropy-python/GetOldTweets-python
e64e0f12a4dda40762679f06e216e015be96d8dd
[ "MIT" ]
null
null
null
insecure-crypto-test.py
boost-entropy-python/GetOldTweets-python
e64e0f12a4dda40762679f06e216e015be96d8dd
[ "MIT" ]
null
null
null
import hashlib m = hashlib.md5() m.update(b"message for cryptographic signature") print(m.digest())
20
48
0.76
import hashlib m = hashlib.md5() m.update(b"message for cryptographic signature") print(m.digest())
true
true
f7745e1cad9cbb3f8b96d2c35bb639d193131762
1,828
py
Python
setup.py
licface/make_colors
110072eb3af929ac03f62455edbf89ef75166be7
[ "BSD-3-Clause" ]
1
2021-12-05T03:08:05.000Z
2021-12-05T03:08:05.000Z
setup.py
licface/make_colors
110072eb3af929ac03f62455edbf89ef75166be7
[ "BSD-3-Clause" ]
null
null
null
setup.py
licface/make_colors
110072eb3af929ac03f62455edbf89ef75166be7
[ "BSD-3-Clause" ]
null
null
null
import io import re from setuptools import setup import os import shutil try: os.remove(os.path.join('make_colors', '__version__.py')) except: pass shutil.copy2('__version__.py', 'make_colors') with io.open("README.rst", "rt", encoding="utf8") as f: readme = f.read() # with io.open("__version__.py", "rt"...
32.642857
73
0.628009
import io import re from setuptools import setup import os import shutil try: os.remove(os.path.join('make_colors', '__version__.py')) except: pass shutil.copy2('__version__.py', 'make_colors') with io.open("README.rst", "rt", encoding="utf8") as f: readme = f.read() import __version__ version = __ve...
true
true
f7745f0974bcd10239e665ee3d07d68742f881a8
14,804
py
Python
tests/test_wavefunction.py
trbromley/pennylane-forest
6ab1d48fda4cbc6f11673c3a02c2fc40be90d5bb
[ "BSD-3-Clause" ]
1
2020-07-12T18:06:25.000Z
2020-07-12T18:06:25.000Z
tests/test_wavefunction.py
trbromley/pennylane-forest
6ab1d48fda4cbc6f11673c3a02c2fc40be90d5bb
[ "BSD-3-Clause" ]
null
null
null
tests/test_wavefunction.py
trbromley/pennylane-forest
6ab1d48fda4cbc6f11673c3a02c2fc40be90d5bb
[ "BSD-3-Clause" ]
null
null
null
""" Unit tests for the wavefunction simulator device. """ import logging import pytest import pennylane as qml from pennylane import numpy as np from conftest import BaseTest from conftest import I, Z, H, U, U2, SWAP, CNOT, U_toffoli, H, test_operation_map import pennylane_forest as plf log = logging.getLogger(__...
35.163895
97
0.550932
import logging import pytest import pennylane as qml from pennylane import numpy as np from conftest import BaseTest from conftest import I, Z, H, U, U2, SWAP, CNOT, U_toffoli, H, test_operation_map import pennylane_forest as plf log = logging.getLogger(__name__) class TestWavefunctionBasic(BaseTest): def ...
true
true
f7745f2a589f961d8f677a4bbe40f919fa4f4a8e
7,209
py
Python
pybbn/graph/factory.py
vishalbelsare/py-bbn
fe6848b4e0fe78d78af13cd06c0d29980ecd5d7f
[ "Apache-2.0" ]
48
2017-03-21T21:13:39.000Z
2022-03-11T08:13:01.000Z
pybbn/graph/factory.py
vishalbelsare/py-bbn
fe6848b4e0fe78d78af13cd06c0d29980ecd5d7f
[ "Apache-2.0" ]
7
2018-07-18T16:01:15.000Z
2022-02-10T14:42:33.000Z
pybbn/graph/factory.py
vishalbelsare/py-bbn
fe6848b4e0fe78d78af13cd06c0d29980ecd5d7f
[ "Apache-2.0" ]
14
2017-09-19T18:34:08.000Z
2022-03-04T11:52:51.000Z
import itertools import json from itertools import product import networkx as nx import pandas as pd from networkx.algorithms.dag import topological_sort from pybbn.graph.dag import Bbn from pybbn.graph.edge import Edge, EdgeType from pybbn.graph.node import BbnNode from pybbn.graph.variable import Variable class F...
32.04
112
0.497711
import itertools import json from itertools import product import networkx as nx import pandas as pd from networkx.algorithms.dag import topological_sort from pybbn.graph.dag import Bbn from pybbn.graph.edge import Edge, EdgeType from pybbn.graph.node import BbnNode from pybbn.graph.variable import Variable class F...
true
true
f7745f552f57cca6253c76a21374e954d36e964a
4,946
py
Python
venv/lib/python3.6/site-packages/django/contrib/gis/gdal/prototypes/geom.py
xiegudong45/typeidea
db6504a232d120d6ffa185730bd35b9b9ecffa6c
[ "Apache-2.0" ]
61,676
2015-01-01T00:05:13.000Z
2022-03-31T20:37:54.000Z
checkerista/.env/Lib/site-packages/django/contrib/gis/gdal/prototypes/geom.py
LybaFatimaNasir/CS311S20PID02
bc29a8c4c9ee508c74d231c015a57b1ca4dfcb39
[ "MIT" ]
8,884
2015-01-01T00:12:05.000Z
2022-03-31T19:53:11.000Z
checkerista/.env/Lib/site-packages/django/contrib/gis/gdal/prototypes/geom.py
LybaFatimaNasir/CS311S20PID02
bc29a8c4c9ee508c74d231c015a57b1ca4dfcb39
[ "MIT" ]
33,143
2015-01-01T02:04:52.000Z
2022-03-31T19:42:46.000Z
from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope from django.contrib.gis.gdal.libgdal import lgdal from django.contrib.gis.gdal.prototypes.errcheck import check_envelope from django.contrib.gis.gdal.prototypes.generation import ( const_string_...
44.963636
110
0.801051
from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope from django.contrib.gis.gdal.libgdal import lgdal from django.contrib.gis.gdal.prototypes.errcheck import check_envelope from django.contrib.gis.gdal.prototypes.generation import ( const_string_...
true
true
f7746001d5f89f7418b92bab28a281a421e0564a
6,892
py
Python
multi_traductor.py
Jalagarto/translator
d35cde0934c4ab94204d6dfdf4e7d6c0bcd6291b
[ "Apache-2.0" ]
null
null
null
multi_traductor.py
Jalagarto/translator
d35cde0934c4ab94204d6dfdf4e7d6c0bcd6291b
[ "Apache-2.0" ]
null
null
null
multi_traductor.py
Jalagarto/translator
d35cde0934c4ab94204d6dfdf4e7d6c0bcd6291b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import tkinter as tk from tkinter import messagebox as msg from tkinter.ttk import Notebook from tkinter import ttk import tkinter.font as font import requests class LanguageTab(tk.Frame): def __init__(self, master, lang_name, lang_code): super().__init__(master) # fonts for ...
43.075
130
0.642339
import tkinter as tk from tkinter import messagebox as msg from tkinter.ttk import Notebook from tkinter import ttk import tkinter.font as font import requests class LanguageTab(tk.Frame): def __init__(self, master, lang_name, lang_code): super().__init__(master) self.option_add("*Font"...
true
true
f77460e6c75ab014b268fb174f74e7061054f9de
12,133
py
Python
setup_app/utils/crypto64.py
duttarnab/community-edition-setup
cc87861440397648216af899f87d6868a8064190
[ "MIT" ]
178
2015-02-18T19:36:13.000Z
2022-03-27T19:38:58.000Z
setup_app/utils/crypto64.py
duttarnab/community-edition-setup
cc87861440397648216af899f87d6868a8064190
[ "MIT" ]
640
2015-01-02T16:54:56.000Z
2022-03-30T18:51:08.000Z
setup_app/utils/crypto64.py
duttarnab/community-edition-setup
cc87861440397648216af899f87d6868a8064190
[ "MIT" ]
76
2015-02-04T21:55:09.000Z
2022-03-11T19:24:47.000Z
import os import re import base64 import json from collections import OrderedDict from pathlib import Path from setup_app.pylib.pyDes import triple_des, ECB, PAD_PKCS5 from setup_app import paths from setup_app import static from setup_app.config import Config class Crypto64: def get_ssl_subject(self, ssl_fn):...
37.332308
157
0.506552
import os import re import base64 import json from collections import OrderedDict from pathlib import Path from setup_app.pylib.pyDes import triple_des, ECB, PAD_PKCS5 from setup_app import paths from setup_app import static from setup_app.config import Config class Crypto64: def get_ssl_subject(self, ssl_fn):...
true
true
f7746159295c1cfad0290b1da946c461fd3d21e8
29,337
py
Python
rllib/evaluation/sampler.py
harrisonfeng/ray
7b08db9f8cd85d185879e5bef778e8855f2a06cf
[ "Apache-2.0" ]
null
null
null
rllib/evaluation/sampler.py
harrisonfeng/ray
7b08db9f8cd85d185879e5bef778e8855f2a06cf
[ "Apache-2.0" ]
null
null
null
rllib/evaluation/sampler.py
harrisonfeng/ray
7b08db9f8cd85d185879e5bef778e8855f2a06cf
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict, namedtuple import logging import numpy as np import queue import threading import time from ray.util.debug import log_once from ray.rllib.evaluation.episode import MultiAgentEpisode, _flatten_action from ray.rllib.evaluation.rollout_metrics import RolloutMetrics from ray.rllib.eval...
40.745833
79
0.598289
from collections import defaultdict, namedtuple import logging import numpy as np import queue import threading import time from ray.util.debug import log_once from ray.rllib.evaluation.episode import MultiAgentEpisode, _flatten_action from ray.rllib.evaluation.rollout_metrics import RolloutMetrics from ray.rllib.eval...
true
true
f77461744b2a7403935412fa6d5f93715a6466a0
20,504
py
Python
upconvert/parser/t/eaglexml_t.py
lehaianh1986/schematic-file-converter
ed67274511a5b0e1b378e4e0fd3943ec8a189f43
[ "Apache-2.0" ]
29
2016-05-19T02:04:51.000Z
2021-09-16T06:25:59.000Z
upconvert/parser/t/eaglexml_t.py
84ace/schematic-file-converter
a5975a521d842396605c05a9f197bfe088906bb4
[ "Apache-2.0" ]
null
null
null
upconvert/parser/t/eaglexml_t.py
84ace/schematic-file-converter
a5975a521d842396605c05a9f197bfe088906bb4
[ "Apache-2.0" ]
24
2016-05-19T02:05:00.000Z
2022-01-14T18:20:01.000Z
#!/usr/bin/python # encoding: utf-8 #pylint: disable=R0904 """ The eaglexml parser test class """ # upconvert - A universal hardware design file format converter using # Format: upverter.com/resources/open-json-format/ # Development: github.com/upverter/schematic-file-converter # # Copyright 2011 Upverter, Inc....
42.102669
98
0.623439
from upconvert.parser.eaglexml import EagleXML from upconvert.parser.eaglexml.generated_g import wire import unittest from functools import wraps from os.path import dirname, join TEST_DIR = join(dirname(__file__), '..', '..', '..', 'test', 'eaglexml') EAGLE_SCALE = 10.0/9.0 _cache = {} def get_design(filename):...
true
true
f774623ad9d55c3fe10f9805a3179fcd79029184
4,350
py
Python
frappe/modules/import_file.py
marwand/frappe
59691496375d64c8a8a579b69aeadd76e1326468
[ "MIT" ]
null
null
null
frappe/modules/import_file.py
marwand/frappe
59691496375d64c8a8a579b69aeadd76e1326468
[ "MIT" ]
50
2020-10-21T10:36:20.000Z
2022-03-22T12:17:01.000Z
frappe/modules/import_file.py
marwand/frappe
59691496375d64c8a8a579b69aeadd76e1326468
[ "MIT" ]
1
2021-02-06T10:38:18.000Z
2021-02-06T10:38:18.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function import frappe, os, json from frappe.modules import get_module_path, scrub_dt_dn from frappe.utils import get_datetime_str from frappe.model.base_document import g...
30.208333
117
0.726897
from __future__ import unicode_literals, print_function import frappe, os, json from frappe.modules import get_module_path, scrub_dt_dn from frappe.utils import get_datetime_str from frappe.model.base_document import get_controller ignore_values = { "Report": ["disabled", "prepared_report", "add_total_row"], "Prin...
true
true