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
1c00f9a3422f1bf11c82c480287ebb51534ea2fc
2,780
py
Python
Liang-Barsky-stright-line-clipping-algorithm.py
HHN0609/fundamental-computer-graphic-algorithm
cb38887e2fe9e0290f6efc369b5dc4ce84da55b7
[ "MIT" ]
1
2022-02-28T01:41:47.000Z
2022-02-28T01:41:47.000Z
Liang-Barsky-stright-line-clipping-algorithm.py
HHN0609/fundamental-computer-graphic-algorithm
cb38887e2fe9e0290f6efc369b5dc4ce84da55b7
[ "MIT" ]
null
null
null
Liang-Barsky-stright-line-clipping-algorithm.py
HHN0609/fundamental-computer-graphic-algorithm
cb38887e2fe9e0290f6efc369b5dc4ce84da55b7
[ "MIT" ]
null
null
null
from PIL import Image import time import math def midpoint_line(img,x0,y0,x1,y1,color): #用中点算法画一条直线 if x0>x1 or (x0==x1 and y0>y1): t=x0 x0=x1 x1=t t=y0 y0=y1 y1=t steep=abs(y1-y0)>abs(x1-x0) if steep == True: t=x0 x0=y0 ...
20.746269
54
0.415468
from PIL import Image import time import math def midpoint_line(img,x0,y0,x1,y1,color): if x0>x1 or (x0==x1 and y0>y1): t=x0 x0=x1 x1=t t=y0 y0=y1 y1=t steep=abs(y1-y0)>abs(x1-x0) if steep == True: t=x0 x0=y0 y0=t ...
true
true
1c00fb85e0ca9c4f3fdefb4eac4aabbac99e870e
2,531
py
Python
test/tools_for_tests.py
cw-tan/deft
abb4d23fa0bb53031c13daef9942bceba4afd655
[ "MIT" ]
1
2019-08-29T23:30:38.000Z
2019-08-29T23:30:38.000Z
test/tools_for_tests.py
cw-tan/deft
abb4d23fa0bb53031c13daef9942bceba4afd655
[ "MIT" ]
3
2022-02-24T20:00:40.000Z
2022-03-07T12:05:27.000Z
test/tools_for_tests.py
cw-tan/deft
abb4d23fa0bb53031c13daef9942bceba4afd655
[ "MIT" ]
1
2019-04-05T15:07:36.000Z
2019-04-05T15:07:36.000Z
import numpy as np from scipy.special import sph_harm def get_box_geometry(vectors): """expects box vectors in rows of 'vectors'""" # get box lengths, angles, and volume lengths = np.linalg.norm(vectors, axis=1) angles = np.empty(3) angles[0] = np.arccos( vectors[1,:].dot(vectors[2,:])...
38.938462
78
0.615172
import numpy as np from scipy.special import sph_harm def get_box_geometry(vectors): lengths = np.linalg.norm(vectors, axis=1) angles = np.empty(3) angles[0] = np.arccos( vectors[1,:].dot(vectors[2,:])/(lengths[1]*lengths[2])) angles[1] = np.arccos( vectors[0,:].dot(vectors...
true
true
1c00fbfe809da27f9079f2546d0d0aa8a4fd243e
9,809
py
Python
single_cell_power.py
npirvin/Radiative-Transport-PV
d5236bfae5789fd2be5bb0190e962a83c24b3ae7
[ "MIT" ]
null
null
null
single_cell_power.py
npirvin/Radiative-Transport-PV
d5236bfae5789fd2be5bb0190e962a83c24b3ae7
[ "MIT" ]
null
null
null
single_cell_power.py
npirvin/Radiative-Transport-PV
d5236bfae5789fd2be5bb0190e962a83c24b3ae7
[ "MIT" ]
null
null
null
""" Created on Thu Jun 21 14:31:46 2018 Author: Nicholas Irvin This module determines the output power of a cell. If using the diffusion model, then spectral.py calculates the total current, and this module calcualtes the power. If not using the diffusion model, then spectral.py calculates photogeneration cu...
43.211454
251
0.57957
import numpy as np from scipy.optimize import minimize_scalar, brentq import matplotlib.pyplot as plt import spectral, recombination, sunlight, carrier_models c = 2.99792458e8 h = 6.6260755e-34 k = 1.38064852e-23 # J/K Boltzmann's constant q = 1.60217653e-19 ...
true
true
1c00fcd72f64d812dffaf0fd0a5b8611d3005524
1,730
py
Python
torchaudio/_backend.py
astaff/audio
27a0f7653bc2918e314b4225782d2b29ef31ae4a
[ "BSD-2-Clause" ]
null
null
null
torchaudio/_backend.py
astaff/audio
27a0f7653bc2918e314b4225782d2b29ef31ae4a
[ "BSD-2-Clause" ]
null
null
null
torchaudio/_backend.py
astaff/audio
27a0f7653bc2918e314b4225782d2b29ef31ae4a
[ "BSD-2-Clause" ]
null
null
null
from functools import wraps from typing import Any, List, Union import platform import torch from torch import Tensor from . import _soundfile_backend, _sox_backend _audio_backend = "soundfile" if platform.system() == "Windows" else "sox" _audio_backends = {"sox": _sox_backend, "soundfile": _soundfile_backend} de...
26.615385
115
0.655491
from functools import wraps from typing import Any, List, Union import platform import torch from torch import Tensor from . import _soundfile_backend, _sox_backend _audio_backend = "soundfile" if platform.system() == "Windows" else "sox" _audio_backends = {"sox": _sox_backend, "soundfile": _soundfile_backend} de...
true
true
1c00fdf06425b0f0e1ab173f6f4ea81b0604af0e
8,881
py
Python
pyxrf/core/xrf_utils.py
dmgav/test_doc
2e3b8faf55364c5b3f7e2897b8d6bfe61f5b4664
[ "BSD-3-Clause" ]
null
null
null
pyxrf/core/xrf_utils.py
dmgav/test_doc
2e3b8faf55364c5b3f7e2897b8d6bfe61f5b4664
[ "BSD-3-Clause" ]
null
null
null
pyxrf/core/xrf_utils.py
dmgav/test_doc
2e3b8faf55364c5b3f7e2897b8d6bfe61f5b4664
[ "BSD-3-Clause" ]
null
null
null
import re import xraylib from skbeam.core.constants import XrfElement as Element from skbeam.core.fitting.xrf_model import K_LINE, L_LINE, M_LINE def get_element_atomic_number(element_str): r""" A wrapper to ``SymbolToAtomicNumber`` function from ``xraylib``. Returns atomic number for the sybmolic element...
29.702341
98
0.632136
import re import xraylib from skbeam.core.constants import XrfElement as Element from skbeam.core.fitting.xrf_model import K_LINE, L_LINE, M_LINE def get_element_atomic_number(element_str): xraylib.SetErrorMessages(0) try: val = xraylib.SymbolToAtomicNumber(element_str) except ValueError: ...
true
true
1c00fe03a27336ba3881a5f375f858cfc207529b
2,273
py
Python
api/tasks.py
LuoBingjun/lab-reservation-backend
20688a1651c6bc077a92db5fe2f071c1762a3886
[ "MIT" ]
null
null
null
api/tasks.py
LuoBingjun/lab-reservation-backend
20688a1651c6bc077a92db5fe2f071c1762a3886
[ "MIT" ]
null
null
null
api/tasks.py
LuoBingjun/lab-reservation-backend
20688a1651c6bc077a92db5fe2f071c1762a3886
[ "MIT" ]
null
null
null
from api.models import ReserveRecord, BreachRecord, UseRecord from django.utils import timezone import datetime def update_AM(): breach = ReserveRecord.objects.filter(date=datetime.date.today(), time='AM', checked=True) for item in breach: BreachRecord.objects.create(user=item.user, operator=ite...
42.092593
154
0.676199
from api.models import ReserveRecord, BreachRecord, UseRecord from django.utils import timezone import datetime def update_AM(): breach = ReserveRecord.objects.filter(date=datetime.date.today(), time='AM', checked=True) for item in breach: BreachRecord.objects.create(user=item.user, operator=ite...
true
true
1c00fe8795f6f9b48a4d693415cd4efbbbe036c4
4,037
py
Python
genanki/model.py
SteveSapuko/genanki
1717b116ec84a659858e4138b1ea5d4d891ff6b0
[ "MIT" ]
1
2020-06-05T14:04:04.000Z
2020-06-05T14:04:04.000Z
genanki/model.py
SteveSapuko/genanki
1717b116ec84a659858e4138b1ea5d4d891ff6b0
[ "MIT" ]
null
null
null
genanki/model.py
SteveSapuko/genanki
1717b116ec84a659858e4138b1ea5d4d891ff6b0
[ "MIT" ]
null
null
null
from copy import copy from cached_property import cached_property import pystache import yaml class Model: FRONT_BACK = 0 CLOZE = 1 def __init__(self, model_id=None, name=None, fields=None, templates=None, css='', model_type=FRONT_BACK): self.model_id = model_id self.name = name self.set_fields(fie...
33.090164
119
0.642061
from copy import copy from cached_property import cached_property import pystache import yaml class Model: FRONT_BACK = 0 CLOZE = 1 def __init__(self, model_id=None, name=None, fields=None, templates=None, css='', model_type=FRONT_BACK): self.model_id = model_id self.name = name self.set_fields(fie...
true
true
1c00fecf2b2845c9b7e22ced7a72085ba9bfd174
1,220
py
Python
tools/BlenderProc/src/writer/ObjectStateWriter.py
GeorgSchenzel/pose-detector
32aff471e2591726bbe52140915255af6dc4f1a1
[ "MIT" ]
null
null
null
tools/BlenderProc/src/writer/ObjectStateWriter.py
GeorgSchenzel/pose-detector
32aff471e2591726bbe52140915255af6dc4f1a1
[ "MIT" ]
null
null
null
tools/BlenderProc/src/writer/ObjectStateWriter.py
GeorgSchenzel/pose-detector
32aff471e2591726bbe52140915255af6dc4f1a1
[ "MIT" ]
null
null
null
from src.utility.BlenderUtility import get_all_mesh_objects from src.utility.ItemWriter import ItemWriter from src.writer.WriterInterface import WriterInterface class ObjectStateWriter(WriterInterface): """ Writes the state of all objects for each frame to a numpy file if no hfd5 file is available. """ def _...
40.666667
104
0.681967
from src.utility.BlenderUtility import get_all_mesh_objects from src.utility.ItemWriter import ItemWriter from src.writer.WriterInterface import WriterInterface class ObjectStateWriter(WriterInterface): def __init__(self, config): WriterInterface.__init__(self, config) self.object_writer = ItemWr...
true
true
1c00ff05a26178a4e671a6221c39f992aa177952
1,172
py
Python
video_recorder.py
abhi526691/Covid-Guard
9c050ef44201c01f512169ffb146ad0da5278ec1
[ "MIT" ]
5
2020-08-26T18:39:29.000Z
2020-11-16T13:05:11.000Z
video_recorder.py
abhi526691/Covid-Guard
9c050ef44201c01f512169ffb146ad0da5278ec1
[ "MIT" ]
null
null
null
video_recorder.py
abhi526691/Covid-Guard
9c050ef44201c01f512169ffb146ad0da5278ec1
[ "MIT" ]
2
2020-10-07T15:12:51.000Z
2020-10-22T08:49:13.000Z
# import the necessary packages import tensorflow import numpy as np import pyautogui import cv2 import os def start(): output = "Output/video.avi" img = pyautogui.screenshot() img = cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR) # get info from img height, width, channels = img.s...
26.044444
75
0.607509
import tensorflow import numpy as np import pyautogui import cv2 import os def start(): output = "Output/video.avi" img = pyautogui.screenshot() img = cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR) height, width, channels = img.shape fourcc = cv2.VideoWriter_fourcc(*'mp4v')...
true
true
1c01003b2c1594448da840f945a87cd1de9bd011
8,029
py
Python
app/server/bowling/api/scoring.py
bhimeshchauhan/bowling-score
cfb3e8740344bb2d5744a5b2088c143bcdcf889a
[ "MIT" ]
null
null
null
app/server/bowling/api/scoring.py
bhimeshchauhan/bowling-score
cfb3e8740344bb2d5744a5b2088c143bcdcf889a
[ "MIT" ]
null
null
null
app/server/bowling/api/scoring.py
bhimeshchauhan/bowling-score
cfb3e8740344bb2d5744a5b2088c143bcdcf889a
[ "MIT" ]
null
null
null
#!/url/bin/python # Filename: bowling.py # To run this code: python bowling.py ../data/test.csv import sys import csv import logging class Bowling(object): """ A class used to represent bowling games ... Attributes ---------- cases : dict a tally dictionary that converts from strin...
37.518692
139
0.545149
import sys import csv import logging class Bowling(object): def __init__(self): self.cases = { 'X' : 10, '/' : 10, '-' : 0, '0' : 0, '1' : 1, '2' : 2, '3' : 3, '4' : 4, '5' : 5, '6' : ...
true
true
1c0100b390beae3ebb97ecfb17d8f55a16b3e8cc
1,816
py
Python
src/app.py
rayanht/UK-Biobank-Visualisation
d4eb00f194b6452cbd2164d87b433e71ab1783f6
[ "MIT" ]
3
2021-03-03T20:11:04.000Z
2021-12-20T12:38:47.000Z
src/app.py
rayanht/UK-Biobank-Visualisation
d4eb00f194b6452cbd2164d87b433e71ab1783f6
[ "MIT" ]
16
2020-10-28T16:08:47.000Z
2022-02-13T23:46:09.000Z
src/app.py
rayanht/UK-Biobank-Visualisation
d4eb00f194b6452cbd2164d87b433e71ab1783f6
[ "MIT" ]
1
2021-01-07T01:43:11.000Z
2021-01-07T01:43:11.000Z
import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import layout.pages.index import layout.pages.plotting_tool from src.dash_app import app, dash server = app.server app.layout = html.Div( [dcc.Location(id="url", refresh=False, href="/plot"),...
25.222222
86
0.67511
import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import layout.pages.index import layout.pages.plotting_tool from src.dash_app import app, dash server = app.server app.layout = html.Div( [dcc.Location(id="url", refresh=False, href="/plot"),...
true
true
1c01012dc37d73e23094ecf22a4fdf30fb537562
617
py
Python
torch/_C/CudaSparseShortTensorBase.py
binh-vu/pytorch-stub
2067c75457c66fd4fd40fde091b5da971f8ea838
[ "MIT" ]
21
2019-01-25T08:53:51.000Z
2021-05-29T05:19:57.000Z
torch/_C/CudaSparseShortTensorBase.py
binh-vu/pytorch-stub
2067c75457c66fd4fd40fde091b5da971f8ea838
[ "MIT" ]
1
2020-11-19T03:22:24.000Z
2021-03-22T14:48:55.000Z
torch/_C/CudaSparseShortTensorBase.py
binh-vu/pytorch-stub
2067c75457c66fd4fd40fde091b5da971f8ea838
[ "MIT" ]
4
2019-03-02T05:59:19.000Z
2019-10-05T11:38:55.000Z
# encoding: utf-8 # module torch._C # from /Users/rook/anaconda/lib/python3.6/site-packages/torch/_C.cpython-36m-darwin.so # by generator 1.145 # no doc # imports import torch._C._functions as _functions # <module 'torch._C._functions'> from .object import object class CudaSparseShortTensorBase(object): # no doc...
24.68
101
0.688817
import torch._C._functions as _functions from .object import object class CudaSparseShortTensorBase(object): def __init__(self): pass __weakref__ = property(lambda self: object(), lambda self, v: None, lambda self: None) __dict__ = None
true
true
1c010149e59b8d216c2b44d38643c7c67aa09c12
7,925
py
Python
exam/utils/utils.py
fabiorodp/IN5550_Neural_Methods_in_Natural_Language_Processing
4d3b2ed56b56e016413ae1544e19ad2a2c0ef047
[ "MIT" ]
null
null
null
exam/utils/utils.py
fabiorodp/IN5550_Neural_Methods_in_Natural_Language_Processing
4d3b2ed56b56e016413ae1544e19ad2a2c0ef047
[ "MIT" ]
null
null
null
exam/utils/utils.py
fabiorodp/IN5550_Neural_Methods_in_Natural_Language_Processing
4d3b2ed56b56e016413ae1544e19ad2a2c0ef047
[ "MIT" ]
null
null
null
from sklearn.metrics import precision_score, recall_score, f1_score def binary_tp(gold, pred): """ for each member in pred, if it overlaps with any member of gold, return 1 else return 0 """ tps = 0 for p in pred: tp = False for word in p: for span in gold: ...
31.200787
101
0.556341
from sklearn.metrics import precision_score, recall_score, f1_score def binary_tp(gold, pred): tps = 0 for p in pred: tp = False for word in p: for span in gold: if word in span: tp = True if tp is True: tps += 1 return tps...
true
true
1c0102b6711f7a99c76efcfe4c25b65057a0633a
3,257
py
Python
test.py
OmerRe/Zero_DCE_TF
457c28751ccedd343a5bcdc750306d6f7501a3bc
[ "MIT" ]
null
null
null
test.py
OmerRe/Zero_DCE_TF
457c28751ccedd343a5bcdc750306d6f7501a3bc
[ "MIT" ]
null
null
null
test.py
OmerRe/Zero_DCE_TF
457c28751ccedd343a5bcdc750306d6f7501a3bc
[ "MIT" ]
null
null
null
import keras import tensorflow as tf import keras.backend as K import os import sys import argparse import time import src.model import numpy as np import glob from PIL import Image from src.loss import * from src.model import DCE_x from keras import Model, Input from keras.layers import Concatenate, Conv2D tf.compat...
41.75641
159
0.642309
import keras import tensorflow as tf import keras.backend as K import os import sys import argparse import time import src.model import numpy as np import glob from PIL import Image from src.loss import * from src.model import DCE_x from keras import Model, Input from keras.layers import Concatenate, Conv2D tf.compat...
true
true
1c0102f4eeee9e7dba956ba4525fa84596544956
215
py
Python
Controller/ChooseFactory.py
RLeDEV/AutoJob
8fa45f464b3cd5c92dffef0c57d6c64ab46012d2
[ "MIT" ]
2
2020-08-11T01:04:00.000Z
2020-08-24T13:58:39.000Z
Controller/ChooseFactory.py
RLeDEV/AutoJob
8fa45f464b3cd5c92dffef0c57d6c64ab46012d2
[ "MIT" ]
null
null
null
Controller/ChooseFactory.py
RLeDEV/AutoJob
8fa45f464b3cd5c92dffef0c57d6c64ab46012d2
[ "MIT" ]
null
null
null
from Model.Glassdoor import Glassdoor from Model.Indeed import Indeed def WebChooser(website, url): websites = { "indeed": Indeed, "glassdoor": Glassdoor } return websites[website](url)
21.5
37
0.674419
from Model.Glassdoor import Glassdoor from Model.Indeed import Indeed def WebChooser(website, url): websites = { "indeed": Indeed, "glassdoor": Glassdoor } return websites[website](url)
true
true
1c01034a9a423082a9205f7f8d7389d82e1b9bcf
3,389
py
Python
stockticker-i2c-oled.py
vishbin/raspberrypi-tinker
21dbcbf18e7e01adb860a739568670c10d5ac2db
[ "MIT" ]
null
null
null
stockticker-i2c-oled.py
vishbin/raspberrypi-tinker
21dbcbf18e7e01adb860a739568670c10d5ac2db
[ "MIT" ]
null
null
null
stockticker-i2c-oled.py
vishbin/raspberrypi-tinker
21dbcbf18e7e01adb860a739568670c10d5ac2db
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import time import subprocess import board import digitalio import busio import adafruit_ssd1306 from PIL import Image, ImageDraw, ImageFont from yahoo_fin import stock_info # which stock to track TICKER_SYMBOL = 'AAPL' TICKER_SYMBOL_ARR = ["AAPL", "MA", "COF","PLTR","TSLA","GOOGL","AFRM","C","...
37.655556
150
0.621127
import time import subprocess import board import digitalio import busio import adafruit_ssd1306 from PIL import Image, ImageDraw, ImageFont from yahoo_fin import stock_info TICKER_SYMBOL = 'AAPL' TICKER_SYMBOL_ARR = ["AAPL", "MA", "COF","PLTR","TSLA","GOOGL","AFRM","C","NFLX","CCL","MSFT","NVDA","V","ABNB","AI","DAS...
true
true
1c0103706f89d4cd59c07bc6e099f58b63414a8e
215
py
Python
deui/html/attribute/step_attr.py
urushiyama/DeUI
14530d2dae7d96a3dee30759f85e02239fb433c5
[ "MIT" ]
1
2021-10-17T01:54:18.000Z
2021-10-17T01:54:18.000Z
deui/html/attribute/step_attr.py
urushiyama/DeUI
14530d2dae7d96a3dee30759f85e02239fb433c5
[ "MIT" ]
null
null
null
deui/html/attribute/step_attr.py
urushiyama/DeUI
14530d2dae7d96a3dee30759f85e02239fb433c5
[ "MIT" ]
null
null
null
from .attribute_builder import AttributeBuilder class Step(AttributeBuilder): """ Represents 'step' attribute. """ def __init__(self): super().__init__() self.attributes = ["step"]
19.545455
47
0.637209
from .attribute_builder import AttributeBuilder class Step(AttributeBuilder): def __init__(self): super().__init__() self.attributes = ["step"]
true
true
1c0104d3d42ae9c7be25f036d0c19010fca3ea2d
3,414
py
Python
tests/test-global.py
ZoneTangible/python-spidermonkey
6e3d647f7b04e5ea325d28d2e00fda5df40ea72c
[ "MIT" ]
129
2015-02-03T06:59:02.000Z
2022-01-26T11:03:19.000Z
tests/test-global.py
ZoneTangible/python-spidermonkey
6e3d647f7b04e5ea325d28d2e00fda5df40ea72c
[ "MIT" ]
3
2015-03-26T14:38:21.000Z
2020-06-19T10:53:19.000Z
tests/test-global.py
ZoneTangible/python-spidermonkey
6e3d647f7b04e5ea325d28d2e00fda5df40ea72c
[ "MIT" ]
41
2015-03-18T11:59:26.000Z
2022-03-06T15:04:23.000Z
# Copyright 2009 Paul J. Davis <paul.joseph.davis@gmail.com> # # This file is part of the python-spidermonkey package released # under the MIT license. import t @t.cx() def test_bind_global(cx): cx.add_global("foo", "yay spring!") t.eq(cx.execute("foo;"), "yay spring!") @t.cx() def test_use_global(cx): cx...
23.874126
63
0.617458
import t @t.cx() def test_bind_global(cx): cx.add_global("foo", "yay spring!") t.eq(cx.execute("foo;"), "yay spring!") @t.cx() def test_use_global(cx): cx.add_global("biz", 3) t.eq(cx.execute("biz * biz;"), 9) @t.cx() def test_unicode_in_global(cx): cx.add_global(u"\u00FC", 234) t.eq(cx.execu...
true
true
1c0104f340f75d2f957159491b18d142d65cb1bd
8,946
py
Python
pandas/tests/indexes/timedeltas/test_constructors.py
Japanuspus/pandas
e38e987160c792f315685dc74fc1fc33d9389a71
[ "BSD-3-Clause" ]
1
2021-01-06T00:28:03.000Z
2021-01-06T00:28:03.000Z
pandas/tests/indexes/timedeltas/test_constructors.py
Japanuspus/pandas
e38e987160c792f315685dc74fc1fc33d9389a71
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/indexes/timedeltas/test_constructors.py
Japanuspus/pandas
e38e987160c792f315685dc74fc1fc33d9389a71
[ "BSD-3-Clause" ]
1
2022-03-08T15:07:11.000Z
2022-03-08T15:07:11.000Z
from datetime import timedelta import numpy as np import pytest import pandas as pd from pandas import Timedelta, TimedeltaIndex, timedelta_range, to_timedelta import pandas._testing as tm from pandas.core.arrays import TimedeltaArray class TestTimedeltaIndex: @pytest.mark.parametrize("unit", ["Y", "y", "M"]) ...
35.359684
85
0.597809
from datetime import timedelta import numpy as np import pytest import pandas as pd from pandas import Timedelta, TimedeltaIndex, timedelta_range, to_timedelta import pandas._testing as tm from pandas.core.arrays import TimedeltaArray class TestTimedeltaIndex: @pytest.mark.parametrize("unit", ["Y", "y", "M"]) ...
true
true
1c010630d9e0049439c33532beef6401fd6a3445
4,879
py
Python
agent/DDPG_agent.py
sboominathan/DeepRL
a415f23b9fff2f7179b1bd3c42ee46df64a605d4
[ "Apache-2.0" ]
null
null
null
agent/DDPG_agent.py
sboominathan/DeepRL
a415f23b9fff2f7179b1bd3c42ee46df64a605d4
[ "Apache-2.0" ]
null
null
null
agent/DDPG_agent.py
sboominathan/DeepRL
a415f23b9fff2f7179b1bd3c42ee46df64a605d4
[ "Apache-2.0" ]
null
null
null
####################################################################### # Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) # # Permission given to modify the code as long as you keep this # # declaration at the top # ################################...
37.244275
96
0.59172
import numpy as np import torch.multiprocessing as mp from network import * from utils import * from component import * import pickle import os import time class DDPGAgent: def __init__(self, config): self.config = config self.task = config.task_fn() self.worker_network = config.network_fn...
true
true
1c010750ae1f0fd3ad86884edefaf57030e685d6
1,854
py
Python
tests/optimization_test.py
hzhwcmhf/pytorch-pretrained-BERT
485adde74244f9b614263420d1f823660e0f96fe
[ "Apache-2.0" ]
58
2019-09-16T07:24:23.000Z
2021-12-30T09:04:38.000Z
tests/optimization_test.py
hzhwcmhf/pytorch-pretrained-BERT
485adde74244f9b614263420d1f823660e0f96fe
[ "Apache-2.0" ]
1
2021-05-06T10:10:28.000Z
2021-05-06T10:10:28.000Z
tests/optimization_test.py
hzhwcmhf/pytorch-pretrained-BERT
485adde74244f9b614263420d1f823660e0f96fe
[ "Apache-2.0" ]
32
2019-07-30T17:47:21.000Z
2022-03-29T22:33:29.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
36.352941
93
0.659115
from __future__ import absolute_import from __future__ import division from __future__ import print_function import unittest import torch from pytorch_pretrained_bert import BertAdam class OptimizationTest(unittest.TestCase): def assertListAlmostEqual(self, list1, list2, tol): self.assertEqual(len(list...
true
true
1c0107a491c6a98c169e74fbf0f99e074876dd35
842
py
Python
Process Sheduling/process.py
VictorCampelo/TSO_algorithms
e3c4e828048b66c5d0cf85cff5991d7a61780290
[ "MIT" ]
null
null
null
Process Sheduling/process.py
VictorCampelo/TSO_algorithms
e3c4e828048b66c5d0cf85cff5991d7a61780290
[ "MIT" ]
null
null
null
Process Sheduling/process.py
VictorCampelo/TSO_algorithms
e3c4e828048b66c5d0cf85cff5991d7a61780290
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- class Process: """ this class is representing the process""" def __init__(self, idt, arr, exc): self.idt = idt self.arr = arr self.arr_aux = arr self.exc = exc self.prt = -1 self.start_exc = -1 def idt(self): return self.idt def arr(self): return self....
16.84
46
0.652019
class Process: def __init__(self, idt, arr, exc): self.idt = idt self.arr = arr self.arr_aux = arr self.exc = exc self.prt = -1 self.start_exc = -1 def idt(self): return self.idt def arr(self): return self.arr def arr_aux(self): return self.arr_aux def arr_to_pair(self): self.arr_aux += 1...
true
true
1c0108cb6b90fde44a71d8104f16d768ad3c4c7e
695
py
Python
leetcode/938. Range Sum of BST.py
isaiahnields/algorithms
065b95a007dab3f5e375e73a681e7a6e344b41f1
[ "MIT" ]
null
null
null
leetcode/938. Range Sum of BST.py
isaiahnields/algorithms
065b95a007dab3f5e375e73a681e7a6e344b41f1
[ "MIT" ]
null
null
null
leetcode/938. Range Sum of BST.py
isaiahnields/algorithms
065b95a007dab3f5e375e73a681e7a6e344b41f1
[ "MIT" ]
null
null
null
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def __init__(self): self.result = 0 def rangeSumBST(self, root, L, R): """ :type root: TreeNode ...
23.965517
55
0.500719
class Solution: def __init__(self): self.result = 0 def rangeSumBST(self, root, L, R): self.helper(root, L, R) return self.result def helper(self, root, L, R): if not root: return if L <= root.val <= R: self.result += root.val if L ...
true
true
1c0109c0d6837cb97163d6eb4630d938d0b5015b
9,210
py
Python
homeassistant/components/airvisual/sensor.py
MDM-General/home-assistant
5ec7d072831bc01a3d045884f86fad13850c231d
[ "Apache-2.0" ]
null
null
null
homeassistant/components/airvisual/sensor.py
MDM-General/home-assistant
5ec7d072831bc01a3d045884f86fad13850c231d
[ "Apache-2.0" ]
null
null
null
homeassistant/components/airvisual/sensor.py
MDM-General/home-assistant
5ec7d072831bc01a3d045884f86fad13850c231d
[ "Apache-2.0" ]
1
2020-02-24T16:17:42.000Z
2020-02-24T16:17:42.000Z
"""Support for AirVisual air quality sensors.""" from datetime import timedelta from logging import getLogger from pyairvisual import Client from pyairvisual.errors import AirVisualError import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATT...
33.613139
88
0.630727
from datetime import timedelta from logging import getLogger from pyairvisual import Client from pyairvisual.errors import AirVisualError import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_LATITUDE, ATTR_LONGITUDE, ...
true
true
1c010b058c6944a5a82babbaa2371dcda61b2455
3,516
py
Python
UMass_Map_dgl/settings.py
akethu/UMass-Map-DGL
db634c25f0bc465959d2252218fa41039b0b8a97
[ "MIT" ]
1
2021-09-15T20:42:02.000Z
2021-09-15T20:42:02.000Z
UMass_Map_dgl/settings.py
akethu/UMass-Map-DGL
db634c25f0bc465959d2252218fa41039b0b8a97
[ "MIT" ]
null
null
null
UMass_Map_dgl/settings.py
akethu/UMass-Map-DGL
db634c25f0bc465959d2252218fa41039b0b8a97
[ "MIT" ]
1
2021-09-21T03:24:32.000Z
2021-09-21T03:24:32.000Z
""" Django settings for UMass_Map_dgl project. Generated by 'django-admin startproject' using Django 3.2.3. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ import...
26.636364
91
0.709329
import os import django_heroku from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-a6n)m5p@qz&nyy2wn#!#ehgct%70ji$s5!dlmksr^pi!ux-$at' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contri...
true
true
1c010b280b1ed8545db74ec71836014177268392
56
py
Python
tensorbreeze/engine/__init__.py
mingruimingrui/TensorBreeze
5373ab1d10f276b1e9c08c75af471ff74da635fe
[ "MIT" ]
null
null
null
tensorbreeze/engine/__init__.py
mingruimingrui/TensorBreeze
5373ab1d10f276b1e9c08c75af471ff74da635fe
[ "MIT" ]
null
null
null
tensorbreeze/engine/__init__.py
mingruimingrui/TensorBreeze
5373ab1d10f276b1e9c08c75af471ff74da635fe
[ "MIT" ]
null
null
null
from ._do_train import do_train __all__ = ['do_train']
14
31
0.75
from ._do_train import do_train __all__ = ['do_train']
true
true
1c010c2dee2dd6231b944ecaf56cc2e8791fec19
1,436
py
Python
fomu/blink/hw/blink_hacker.py
TomKeddie/prj-litex
cc79c041d22ad552a12b49f531d007491b536521
[ "MIT" ]
2
2019-08-26T13:49:22.000Z
2019-11-11T18:43:29.000Z
fomu/blink/hw/blink_hacker.py
TomKeddie/prj-litex
cc79c041d22ad552a12b49f531d007491b536521
[ "MIT" ]
null
null
null
fomu/blink/hw/blink_hacker.py
TomKeddie/prj-litex
cc79c041d22ad552a12b49f531d007491b536521
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse from migen import * from litex.boards.platforms import fomu_hacker from litex.soc.cores import * from litex.soc.integration import soc_core from litex.soc.cores import gpio from litex.soc.integration.builder import * from gateware import up5kspram # Build --------------------...
31.911111
100
0.603064
import argparse from migen import * from litex.boards.platforms import fomu_hacker from litex.soc.cores import * from litex.soc.integration import soc_core from litex.soc.cores import gpio from litex.soc.integration.builder import * from gateware import up5kspram def main(): platform = fomu_hacker.Platform() ...
true
true
1c010dd6eff77bfdade877bd272edf65eb82573a
6,161
py
Python
src/bnn_priors/bnn_priors/models/dense_nets.py
activatedgeek/uncertainty-da-bayesian-classification
a270fb095f4790dea15327145897d09d0ba9c80b
[ "Apache-2.0" ]
31
2021-02-16T09:35:03.000Z
2022-03-31T17:18:54.000Z
src/bnn_priors/bnn_priors/models/dense_nets.py
activatedgeek/understanding-bayesian-classification
a270fb095f4790dea15327145897d09d0ba9c80b
[ "Apache-2.0" ]
1
2021-05-10T15:25:48.000Z
2021-05-10T15:25:48.000Z
src/bnn_priors/bnn_priors/models/dense_nets.py
activatedgeek/understanding-bayesian-classification
a270fb095f4790dea15327145897d09d0ba9c80b
[ "Apache-2.0" ]
4
2021-02-21T03:38:00.000Z
2021-12-24T15:13:29.000Z
from torch import nn, Tensor from .layers import Linear from .base import RegressionModel, RaoBRegressionModel, ClassificationModel from .. import prior __all__ = ('LinearNealNormal', 'LinearPrior', 'DenseNet', 'RaoBDenseNet', 'ClassificationDenseNet', 'LinearRegression', 'LogisticRegression', '...
51.773109
102
0.631716
from torch import nn, Tensor from .layers import Linear from .base import RegressionModel, RaoBRegressionModel, ClassificationModel from .. import prior __all__ = ('LinearNealNormal', 'LinearPrior', 'DenseNet', 'RaoBDenseNet', 'ClassificationDenseNet', 'LinearRegression', 'LogisticRegression', '...
true
true
1c010f3dc2c9d3e9f3931e63f52da6798cb2f02a
1,468
py
Python
funboost/consumers/udp_consumer.py
DJMIN/funboost
7570ca2909bb0b44a1080f5f98aa96c86d3da9d4
[ "Apache-2.0" ]
120
2021-12-26T03:27:12.000Z
2022-03-31T16:20:44.000Z
funboost/consumers/udp_consumer.py
mooti-barry/funboost
2cd9530e2c4e5a52fc921070d243d402adbc3a0e
[ "Apache-2.0" ]
18
2021-12-31T06:26:37.000Z
2022-03-31T16:16:33.000Z
funboost/consumers/udp_consumer.py
mooti-barry/funboost
2cd9530e2c4e5a52fc921070d243d402adbc3a0e
[ "Apache-2.0" ]
27
2021-12-26T16:12:31.000Z
2022-03-26T17:43:08.000Z
# -*- coding: utf-8 -*- # @Author : ydf # @Time : 2019/8/8 0008 13:32 import json import socket from funboost.consumers.base_consumer import AbstractConsumer class UDPConsumer(AbstractConsumer, ): """ socket 实现消息队列,不支持持久化,但不需要安装软件。 """ BROKER_KIND = 21 BUFSIZE = 10240 # noinspection PyA...
31.913043
80
0.63624
import json import socket from funboost.consumers.base_consumer import AbstractConsumer class UDPConsumer(AbstractConsumer, ): BROKER_KIND = 21 BUFSIZE = 10240 def custom_init(self): self.__udp_client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) ip__port_str = self.queue_name....
true
true
1c010f936b5ff512f4f3f74266db91c7f32faaad
1,370
py
Python
tests/utils/test_auto_umap.py
fariasfc/solo-learn
f53ff40edbc7e96e06db5238d8c3a44f7b8965c1
[ "MIT" ]
3
2021-08-23T12:47:50.000Z
2022-01-16T02:06:34.000Z
tests/utils/test_auto_umap.py
damilu1/solo-learn
b75ba6faf5269b0849120bfb89593f9bc23e09bc
[ "MIT" ]
null
null
null
tests/utils/test_auto_umap.py
damilu1/solo-learn
b75ba6faf5269b0849120bfb89593f9bc23e09bc
[ "MIT" ]
null
null
null
import argparse import shutil from pytorch_lightning import Trainer from solo.methods import BarlowTwins from solo.utils.auto_umap import AutoUMAP from ..methods.utils import DATA_KWARGS, gen_base_kwargs, prepare_dummy_dataloaders def test_auto_umap(): method_kwargs = { "name": "barlow_twins", "...
25.37037
89
0.678832
import argparse import shutil from pytorch_lightning import Trainer from solo.methods import BarlowTwins from solo.utils.auto_umap import AutoUMAP from ..methods.utils import DATA_KWARGS, gen_base_kwargs, prepare_dummy_dataloaders def test_auto_umap(): method_kwargs = { "name": "barlow_twins", "...
true
true
1c010ff328ab17cf52ac1ff67701494cfb93097d
797
py
Python
mowgli_etl/pipeline/eat/eat_pipeline.py
tetherless-world/mowgli
28c19eba41e03e053ae4addff56a313d926e18d7
[ "MIT" ]
4
2021-01-15T15:36:23.000Z
2021-09-01T06:52:05.000Z
mowgli_etl/pipeline/eat/eat_pipeline.py
tetherless-world/mowgli
28c19eba41e03e053ae4addff56a313d926e18d7
[ "MIT" ]
63
2020-05-04T13:48:04.000Z
2020-06-06T02:32:58.000Z
mowgli_etl/pipeline/eat/eat_pipeline.py
tetherless-world/mowgli-etl
28c19eba41e03e053ae4addff56a313d926e18d7
[ "MIT" ]
null
null
null
from mowgli_etl._pipeline import _Pipeline from mowgli_etl.pipeline.eat.eat_extractor import EatExtractor from mowgli_etl.pipeline.eat.eat_transformer import EatTransformer from mowgli_etl.paths import DATA_DIR default_eat_file_path = str(DATA_DIR / 'eat' / 'eat100.xml') class EatPipeline(_Pipeline): def __init_...
33.208333
108
0.708908
from mowgli_etl._pipeline import _Pipeline from mowgli_etl.pipeline.eat.eat_extractor import EatExtractor from mowgli_etl.pipeline.eat.eat_transformer import EatTransformer from mowgli_etl.paths import DATA_DIR default_eat_file_path = str(DATA_DIR / 'eat' / 'eat100.xml') class EatPipeline(_Pipeline): def __init_...
true
true
1c0110568549afc53a91d34a14b923d7f2f15ef5
2,755
py
Python
capser.py
lstorchi/fmoutiler
04269e8f816ab5d7e81c6b2721ae0feeee5e185d
[ "Apache-2.0" ]
null
null
null
capser.py
lstorchi/fmoutiler
04269e8f816ab5d7e81c6b2721ae0feeee5e185d
[ "Apache-2.0" ]
null
null
null
capser.py
lstorchi/fmoutiler
04269e8f816ab5d7e81c6b2721ae0feeee5e185d
[ "Apache-2.0" ]
null
null
null
import argparse import pybel import numpy import sys import os.path import openbabel as ob from scipy.spatial import distance parser = argparse.ArgumentParser() parser.add_argument("-i","--inputfile", help="Specify PDB input file", required=True, type=str, default="test.pdb") parser.add_argument("-l...
30.955056
92
0.630853
import argparse import pybel import numpy import sys import os.path import openbabel as ob from scipy.spatial import distance parser = argparse.ArgumentParser() parser.add_argument("-i","--inputfile", help="Specify PDB input file", required=True, type=str, default="test.pdb") parser.add_argument("-l...
false
true
1c0111bb2c26311c3bb79621b726f84ec1578453
1,927
py
Python
face_recognition/project/utils/get_images_from_hdf5.py
dgr113/face-recognition
edda6ca8fef567d24ae740afd2399b66166f3431
[ "MIT" ]
null
null
null
face_recognition/project/utils/get_images_from_hdf5.py
dgr113/face-recognition
edda6ca8fef567d24ae740afd2399b66166f3431
[ "MIT" ]
null
null
null
face_recognition/project/utils/get_images_from_hdf5.py
dgr113/face-recognition
edda6ca8fef567d24ae740afd2399b66166f3431
[ "MIT" ]
null
null
null
# coding: utf-8 import cv2 import json import h5py import numpy as np from functools import partial from pathlib import Path from typing import Union, Sequence, Hashable, Dict, Any from more_itertools import always_iterable def write_image(save_path: str, img: np.array) -> None: """ Write image from numpy arra...
30.109375
183
0.652309
import cv2 import json import h5py import numpy as np from functools import partial from pathlib import Path from typing import Union, Sequence, Hashable, Dict, Any from more_itertools import always_iterable def write_image(save_path: str, img: np.array) -> None: cv2.imwrite(save_path, img) def _json_data_h...
true
true
1c011259a352cf30eca01c53f4f3b428a8ace8f2
1,876
py
Python
plugins/CVE-2017-15944.py
mehrdad-shokri/ZEROScan
bbb3e6234c6b45512e54df67ba672a8eca882922
[ "MIT" ]
60
2017-03-15T12:41:14.000Z
2021-11-19T02:59:30.000Z
plugins/CVE-2017-15944.py
mehrdad-shokri/ZEROScan
bbb3e6234c6b45512e54df67ba672a8eca882922
[ "MIT" ]
null
null
null
plugins/CVE-2017-15944.py
mehrdad-shokri/ZEROScan
bbb3e6234c6b45512e54df67ba672a8eca882922
[ "MIT" ]
19
2016-08-11T06:55:21.000Z
2021-05-14T15:42:57.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- from thirdparty import requests from lib.core import log def expInfo(): expInfo={} expInfo["appName"] = "Palo Alto Networks firewalls" expInfo["appVersion"] = "PAN-OS 6.1.19,PAN-OS 7.0.19,PAN-OS 7.1.14,PAN-OS 8.0.6" expInfo["author"] = "Z3r0yu" expInfo[...
29.777778
110
0.554371
from thirdparty import requests from lib.core import log def expInfo(): expInfo={} expInfo["appName"] = "Palo Alto Networks firewalls" expInfo["appVersion"] = "PAN-OS 6.1.19,PAN-OS 7.0.19,PAN-OS 7.1.14,PAN-OS 8.0.6" expInfo["author"] = "Z3r0yu" expInfo["description"] = "remote root code execution"...
true
true
1c0112a981625c9e0f8bc5470992d368904d3b47
51,914
py
Python
interferogram/sentinel/create_ifg_standard_product_do_not_use.py
earthobservatory/ariamh-pub
f33731e127f38ff33b02e02c07b16793c07651a6
[ "Apache-2.0" ]
4
2019-11-19T03:35:35.000Z
2020-12-07T18:43:11.000Z
interferogram/sentinel/create_ifg_standard_product_do_not_use.py
earthobservatory/ariamh-pub
f33731e127f38ff33b02e02c07b16793c07651a6
[ "Apache-2.0" ]
3
2019-06-05T03:35:55.000Z
2020-04-09T14:16:08.000Z
interferogram/sentinel/create_ifg_standard_product_do_not_use.py
earthobservatory/ariamh-pub
f33731e127f38ff33b02e02c07b16793c07651a6
[ "Apache-2.0" ]
6
2019-08-23T22:53:11.000Z
2021-11-06T15:15:30.000Z
#!/usr/bin/env python3 from __future__ import division from builtins import str from builtins import range from past.utils import old_div import os, sys, re, requests, json, shutil, traceback, logging, hashlib, math from itertools import chain from zipfile import ZipFile from subprocess import check_call, CalledProces...
38.032234
171
0.614728
from __future__ import division from builtins import str from builtins import range from past.utils import old_div import os, sys, re, requests, json, shutil, traceback, logging, hashlib, math from itertools import chain from zipfile import ZipFile from subprocess import check_call, CalledProcessError from glob import ...
true
true
1c01136ba3c8c1d415776ae8293219763a9c0bff
458
py
Python
task/admin.py
soltanoff/dj_task_queue
b219756d607d7b42bd33d8d603cad7a425962011
[ "MIT" ]
null
null
null
task/admin.py
soltanoff/dj_task_queue
b219756d607d7b42bd33d8d603cad7a425962011
[ "MIT" ]
1
2018-12-03T11:32:52.000Z
2018-12-03T11:32:52.000Z
task/admin.py
soltanoff/dj_task_queue
b219756d607d7b42bd33d8d603cad7a425962011
[ "MIT" ]
null
null
null
from django.contrib import admin from task.models import TaskModel class TaskAdmin(admin.ModelAdmin): search_fields = ('status',) list_display = ('id', 'create_time', 'start_time', 'exec_time', 'status') fieldsets = [ ('Date information', {'fields': ['create_time', 'start_time', 'exec_time'], 'cl...
28.625
108
0.641921
from django.contrib import admin from task.models import TaskModel class TaskAdmin(admin.ModelAdmin): search_fields = ('status',) list_display = ('id', 'create_time', 'start_time', 'exec_time', 'status') fieldsets = [ ('Date information', {'fields': ['create_time', 'start_time', 'exec_time'], 'cl...
true
true
1c011556c01e210f004143d172c99776aaa1e42e
7,402
py
Python
model-optimizer/mo/middle/passes/fusing/fuse_linear_ops.py
monroid/openvino
8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6
[ "Apache-2.0" ]
2,406
2020-04-22T15:47:54.000Z
2022-03-31T10:27:37.000Z
model-optimizer/mo/middle/passes/fusing/fuse_linear_ops.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
4,948
2020-04-22T15:12:39.000Z
2022-03-31T18:45:42.000Z
model-optimizer/mo/middle/passes/fusing/fuse_linear_ops.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
991
2020-04-23T18:21:09.000Z
2022-03-31T18:40:57.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import logging as log import numpy as np from mo.graph.graph import Node, Graph from mo.middle.passes.fusing.helpers import backward_bfs, forward_bfs, get_value_in_port, \ get_tensor_in_port from mo.ops.const import Const def _fu...
41.122222
117
0.638071
import logging as log import numpy as np from mo.graph.graph import Node, Graph from mo.middle.passes.fusing.helpers import backward_bfs, forward_bfs, get_value_in_port, \ get_tensor_in_port from mo.ops.const import Const def _fuse_mul(graph: Graph, node: Node, fuse_nodes: list, backward: bool = True): is_...
true
true
1c0117487e2c52e7b1086c9d18bcad23206a236b
8,918
py
Python
ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
fangxingli/mambari
6da9f6090d4d42623529b73413c8feb8b7f6fe45
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
fangxingli/mambari
6da9f6090d4d42623529b73413c8feb8b7f6fe45
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
fangxingli/mambari
6da9f6090d4d42623529b73413c8feb8b7f6fe45
[ "Apache-2.0", "MIT" ]
null
null
null
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
40.536364
176
0.704418
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
false
true
1c0119013195bb1fb690fd0b929673b1eba8e5e6
524
py
Python
examples/functionfeeder.py
bstienen/high-dimensional-sampling
5326938c6d2af3b167b396d31069cc1405ee2175
[ "MIT" ]
2
2021-05-24T13:37:59.000Z
2021-12-16T10:35:15.000Z
examples/functionfeeder.py
bstienen/high-dimensional-sampling
5326938c6d2af3b167b396d31069cc1405ee2175
[ "MIT" ]
29
2019-09-16T13:03:13.000Z
2020-12-24T18:17:44.000Z
examples/functionfeeder.py
bstienen/high-dimensional-sampling
5326938c6d2af3b167b396d31069cc1405ee2175
[ "MIT" ]
10
2019-08-18T23:11:44.000Z
2020-11-08T23:16:51.000Z
""" Show testfunctions available in the functions module, grouped per function group. Functions can be part of multiple groups. """ from high_dimensional_sampling import functions feeder = functions.FunctionFeeder() groups = [ 'optimisation', 'posterior', 'with_derivative', 'no_derivative', 'bounded', 'unboun...
23.818182
79
0.692748
from high_dimensional_sampling import functions feeder = functions.FunctionFeeder() groups = [ 'optimisation', 'posterior', 'with_derivative', 'no_derivative', 'bounded', 'unbounded' ] for group in groups: print(group.upper()) print('-' * 32) feeder.load_function_group(group) for f in feeder:...
true
true
1c0119627c3d07ea4f4e7e65073c52b31a128925
92
py
Python
interpacf/__init__.py
bmorris3/interp-acf
ea0ca38ab1f5cd4d4ad1863c2b88d2f9aa3803ee
[ "MIT" ]
7
2017-05-29T11:35:15.000Z
2021-09-10T05:58:06.000Z
interpacf/__init__.py
bmorris3/interp-acf
ea0ca38ab1f5cd4d4ad1863c2b88d2f9aa3803ee
[ "MIT" ]
6
2016-04-25T23:14:05.000Z
2020-08-17T15:18:28.000Z
interpacf/__init__.py
bmorris3/interp-acf
ea0ca38ab1f5cd4d4ad1863c2b88d2f9aa3803ee
[ "MIT" ]
3
2016-04-25T20:46:31.000Z
2021-09-10T06:28:55.000Z
from .interpacf import * __version__ = "0.1" __author__ = "Brett Morris (bmmorris@uw.edu)"
18.4
45
0.717391
from .interpacf import * __version__ = "0.1" __author__ = "Brett Morris (bmmorris@uw.edu)"
true
true
1c01199f3f35d5cd194140f50c7b53cbe34d8425
3,351
py
Python
17/main.py
pylaligand/advent_code_2020
b6a25ed828a4b7936a1f73c2a9be34180a8e6b90
[ "Apache-2.0" ]
null
null
null
17/main.py
pylaligand/advent_code_2020
b6a25ed828a4b7936a1f73c2a9be34180a8e6b90
[ "Apache-2.0" ]
null
null
null
17/main.py
pylaligand/advent_code_2020
b6a25ed828a4b7936a1f73c2a9be34180a8e6b90
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import argparse class DimensionState(object): def __init__(self, with_4th): self._cubes = {} self._with_4th = with_4th def is_active(self, x, y, z, w): return self._cubes.setdefault((x, y, z, w), False) def set_active(self, x, y, z, w, active): self....
31.027778
94
0.551776
import argparse class DimensionState(object): def __init__(self, with_4th): self._cubes = {} self._with_4th = with_4th def is_active(self, x, y, z, w): return self._cubes.setdefault((x, y, z, w), False) def set_active(self, x, y, z, w, active): self._cubes[(x, y, z, w...
true
true
1c011aae94e4db16f6009f26b05a7206f77d8749
2,896
py
Python
main/main_feat_baseline_reddit.py
khangtran2020/contentDP
d0d83c387f2d21fce342d0c445eb06ec928c1414
[ "MIT" ]
null
null
null
main/main_feat_baseline_reddit.py
khangtran2020/contentDP
d0d83c387f2d21fce342d0c445eb06ec928c1414
[ "MIT" ]
null
null
null
main/main_feat_baseline_reddit.py
khangtran2020/contentDP
d0d83c387f2d21fce342d0c445eb06ec928c1414
[ "MIT" ]
null
null
null
import os import warnings os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "1" warnings.filterwarnings("ignore", category=DeprecationWarning) warnings.simplefilter(action='ignore', category=FutureWarning) import dgl import numpy as np from tqdm import tqdm from Utils.DataProcessing im...
32.539326
121
0.663329
import os import warnings os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "1" warnings.filterwarnings("ignore", category=DeprecationWarning) warnings.simplefilter(action='ignore', category=FutureWarning) import dgl import numpy as np from tqdm import tqdm from Utils.DataProcessing im...
true
true
1c011afd590ad683a888a0211dfce9b0fae224c9
1,108
py
Python
examples/research/read_umat.py
fishjojo/pydmfe
93cfc655314933d3531b5733521a1f95a044f6cb
[ "MIT" ]
3
2021-02-26T06:26:00.000Z
2022-02-20T08:58:20.000Z
examples/research/read_umat.py
fishjojo/pydmfet
93cfc655314933d3531b5733521a1f95a044f6cb
[ "MIT" ]
null
null
null
examples/research/read_umat.py
fishjojo/pydmfet
93cfc655314933d3531b5733521a1f95a044f6cb
[ "MIT" ]
null
null
null
import numpy as np from argparse import ArgumentParser def read_umat(nrow,filename): f = open(filename, "r") mat = np.ndarray((nrow,nrow),dtype = np.double) vec = [] index = 0 nline = 0 for line in f: nline += 1 elemts = line.split() if(nline%(nrow+1) == 1): ...
22.612245
60
0.49278
import numpy as np from argparse import ArgumentParser def read_umat(nrow,filename): f = open(filename, "r") mat = np.ndarray((nrow,nrow),dtype = np.double) vec = [] index = 0 nline = 0 for line in f: nline += 1 elemts = line.split() if(nline%(nrow+1) == 1): ...
true
true
1c011b02880635c1e131af37046e09ad3462dacb
12,357
py
Python
dashboard/modules/job/sdk.py
willfrey/ray
288a81b42ef0186ab4db33b30191614a7bdb69f6
[ "Apache-2.0" ]
1
2019-06-19T02:23:43.000Z
2019-06-19T02:23:43.000Z
dashboard/modules/job/sdk.py
willfrey/ray
288a81b42ef0186ab4db33b30191614a7bdb69f6
[ "Apache-2.0" ]
73
2021-09-25T07:11:39.000Z
2022-03-26T07:10:59.000Z
dashboard/modules/job/sdk.py
willfrey/ray
288a81b42ef0186ab4db33b30191614a7bdb69f6
[ "Apache-2.0" ]
1
2019-09-24T16:24:49.000Z
2019-09-24T16:24:49.000Z
import dataclasses import logging from typing import Any, Dict, Iterator, Optional try: import aiohttp import requests except ImportError: aiohttp = None requests = None from ray.dashboard.modules.job.common import ( JobStatus, JobSubmitRequest, JobSubmitResponse, JobStopResponse, ...
36.344118
87
0.589383
import dataclasses import logging from typing import Any, Dict, Iterator, Optional try: import aiohttp import requests except ImportError: aiohttp = None requests = None from ray.dashboard.modules.job.common import ( JobStatus, JobSubmitRequest, JobSubmitResponse, JobStopResponse, ...
true
true
1c011c30fc29ab08c8cd14499882d719a5efec85
811
py
Python
PYTHON/setup.py
joan2937/picod
2caddb6ca33e8a0be25858b3a507881360cb76a0
[ "Unlicense" ]
13
2021-04-13T08:54:04.000Z
2022-03-26T16:44:03.000Z
PYTHON/setup.py
joan2937/picod
2caddb6ca33e8a0be25858b3a507881360cb76a0
[ "Unlicense" ]
1
2021-05-06T14:12:15.000Z
2021-05-06T17:02:52.000Z
PYTHON/setup.py
joan2937/picod
2caddb6ca33e8a0be25858b3a507881360cb76a0
[ "Unlicense" ]
7
2021-04-19T15:01:49.000Z
2022-03-27T19:51:43.000Z
#!/usr/bin/env python from setuptools import setup with open('README.md') as f: long_description = f.read() setup(name='picod', version='0.0.6.0', zip_safe=False, author='joan', author_email='joan@abyz.me.uk', maintainer='joan', maintainer_email='joan@abyz.me.uk', url='h...
27.965517
64
0.612824
from setuptools import setup with open('README.md') as f: long_description = f.read() setup(name='picod', version='0.0.6.0', zip_safe=False, author='joan', author_email='joan@abyz.me.uk', maintainer='joan', maintainer_email='joan@abyz.me.uk', url='http://abyz.me.uk/picod...
true
true
1c011d42702c61d354fb9ca9e6c8311dae2bff04
2,290
py
Python
content/safely-parse-arguments-to-eval/example.py
root-11/root-11.github.io
8099f32abb46a21fce51dac326be78ea1e613d79
[ "MIT" ]
2
2021-12-20T11:03:04.000Z
2022-02-23T23:53:36.000Z
content/safely-parse-arguments-to-eval/example.py
root-11/root-11.github.io
8099f32abb46a21fce51dac326be78ea1e613d79
[ "MIT" ]
null
null
null
content/safely-parse-arguments-to-eval/example.py
root-11/root-11.github.io
8099f32abb46a21fce51dac326be78ea1e613d79
[ "MIT" ]
null
null
null
# our initial table: table = { 0: ['A', 'B', 'C', 'D'], 1: [123, 2, 32, 321], 2: [133, 2.1, 33, 123], 3: [143, 3.1e4, 34, 111], 4: [163, 3, 35, 222], 5: [143, 4, 36, 333], 6: [123, 4, 37, 444], } # our function provided by the user: func = "(int(round(('A'*'B)+('C'*'A') + 4, 0)) + max('D, '...
31.369863
116
0.599127
table = { 0: ['A', 'B', 'C', 'D'], 1: [123, 2, 32, 321], 2: [133, 2.1, 33, 123], 3: [143, 3.1e4, 34, 111], 4: [163, 3, 35, 222], 5: [143, 4, 36, 333], 6: [123, 4, 37, 444], } func = "(int(round(('A'*'B)+('C'*'A') + 4, 0)) + max('D, 'B))/'A'" new_column_name = "E" # our filters: operators =...
true
true
1c011d858e073fb0a2587d80e69fdd8d79276c12
3,853
py
Python
ad_examples/ad/kde_outlier.py
snad-space/ad_examples
7c62a81f52e79874d6215b262f5a849d56eeae4f
[ "MIT" ]
6
2019-02-28T13:33:30.000Z
2020-04-23T18:12:57.000Z
ad_examples/ad/kde_outlier.py
snad-space/ad_examples
7c62a81f52e79874d6215b262f5a849d56eeae4f
[ "MIT" ]
null
null
null
ad_examples/ad/kde_outlier.py
snad-space/ad_examples
7c62a81f52e79874d6215b262f5a849d56eeae4f
[ "MIT" ]
1
2019-11-18T12:53:41.000Z
2019-11-18T12:53:41.000Z
import numpy.random as rnd from ..common.gen_samples import * from ..common.gen_samples import * """ pythonw -m ad_examples.ad.kde_outlier """ if __name__ == "__main__": logger = logging.getLogger(__name__) args = get_command_args(debug=True, debug_args=["--debug", ...
37.77451
99
0.520114
import numpy.random as rnd from ..common.gen_samples import * from ..common.gen_samples import * if __name__ == "__main__": logger = logging.getLogger(__name__) args = get_command_args(debug=True, debug_args=["--debug", "--plot", ...
true
true
1c011e7d8c6da3fac215c31432d7e9030120d39d
1,512
py
Python
dags/exercise2.py
Fabricc/airflow-training-skeleton
900cb12842ae0035d97d6bdec23541462335def3
[ "Apache-2.0" ]
null
null
null
dags/exercise2.py
Fabricc/airflow-training-skeleton
900cb12842ae0035d97d6bdec23541462335def3
[ "Apache-2.0" ]
null
null
null
dags/exercise2.py
Fabricc/airflow-training-skeleton
900cb12842ae0035d97d6bdec23541462335def3
[ "Apache-2.0" ]
null
null
null
"""Example DAG demonstrating the usage of the BashOperator.""" from datetime import timedelta import airflow from airflow.models import DAG from airflow.operators.bash_operator import BashOperator from airflow.operators.dummy_operator import DummyOperator args = { "owner": "Airflow", "start_date": airflow.ut...
27.490909
75
0.71164
from datetime import timedelta import airflow from airflow.models import DAG from airflow.operators.bash_operator import BashOperator from airflow.operators.dummy_operator import DummyOperator args = { "owner": "Airflow", "start_date": airflow.utils.dates.days_ago(2), } dag = DAG( dag_id="my_second_dag"...
true
true
1c011f6587dc03fdf4bbe6fd220b58519681176e
1,792
py
Python
app/main.py
JCkshone/ueb-affine
5e26f0b9875e3351dcccdf769b3f01b04a111a09
[ "MIT" ]
null
null
null
app/main.py
JCkshone/ueb-affine
5e26f0b9875e3351dcccdf769b3f01b04a111a09
[ "MIT" ]
null
null
null
app/main.py
JCkshone/ueb-affine
5e26f0b9875e3351dcccdf769b3f01b04a111a09
[ "MIT" ]
null
null
null
from fastapi import FastAPI from pydantic import BaseModel from typing import Optional from app.affine.Affine import executeFact, encrypt_text, get_force_keys, build_decrypt_text, \ normalize_msg, build_decrypt_text_with_keys, force_decrypt app = FastAPI() class KeysModel(BaseModel): a: int b: int cla...
31.438596
117
0.72433
from fastapi import FastAPI from pydantic import BaseModel from typing import Optional from app.affine.Affine import executeFact, encrypt_text, get_force_keys, build_decrypt_text, \ normalize_msg, build_decrypt_text_with_keys, force_decrypt app = FastAPI() class KeysModel(BaseModel): a: int b: int cla...
true
true
1c012001d2625e5d33131b1fff19b474e16fc36c
6,885
py
Python
kubernetes/client/models/v1_pod_list.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1_pod_list.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1_pod_list.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "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 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
33.42233
312
0.619172
import pprint import re import six from kubernetes.client.configuration import Configuration class V1PodList(object): openapi_types = { 'api_version': 'str', 'items': 'list[V1Pod]', 'kind': 'str', 'metadata': 'V1ListMeta' } attribute_map = { 'api_version': '...
true
true
1c01200983c56094fae89b81235d3942267a941e
29,036
py
Python
c7n/resources/redshift.py
troylar/cloud-custodian
dd1b72bcdc2eef75ef88b9af3d88cb6e739b7293
[ "Apache-2.0" ]
null
null
null
c7n/resources/redshift.py
troylar/cloud-custodian
dd1b72bcdc2eef75ef88b9af3d88cb6e739b7293
[ "Apache-2.0" ]
null
null
null
c7n/resources/redshift.py
troylar/cloud-custodian
dd1b72bcdc2eef75ef88b9af3d88cb6e739b7293
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
32.661417
83
0.581829
from __future__ import absolute_import, division, print_function, unicode_literals import functools import json import logging import itertools from botocore.exceptions import ClientError from concurrent.futures import as_completed from c7n.actions import ActionRegistry, BaseAction, ModifyVpcSecurityGroupsAction fro...
true
true
1c01207a23336bc9d045b9a5236b5a1b32b1a490
1,564
py
Python
pyexcel_ods3/__init__.py
vinraspa/pyexcel-ods3
2a63df15a340ab38d857159c7b75224091b2098a
[ "BSD-3-Clause" ]
64
2016-01-10T12:13:03.000Z
2022-02-05T09:14:21.000Z
pyexcel_ods3/__init__.py
vinraspa/pyexcel-ods3
2a63df15a340ab38d857159c7b75224091b2098a
[ "BSD-3-Clause" ]
26
2016-01-11T09:47:14.000Z
2022-02-23T13:37:32.000Z
pyexcel_ods3/__init__.py
vinraspa/pyexcel-ods3
2a63df15a340ab38d857159c7b75224091b2098a
[ "BSD-3-Clause" ]
16
2016-01-10T12:13:08.000Z
2021-09-27T11:47:41.000Z
""" pyexcel_ods3 ~~~~~~~~~~~~~~~~~~~ The lower level ods file format handler using ezodf :copyright: (c) 2015-2017 by Onni Software Ltd & its contributors :license: New BSD License """ # flake8: noqa from pyexcel_io.io import get_data as read_data from pyexcel_io.io import isstream from pyexcel_i...
30.666667
75
0.726343
from pyexcel_io.io import get_data as read_data from pyexcel_io.io import isstream from pyexcel_io.io import store_data as write_data from pyexcel_io.plugins import IOPluginInfoChain, IOPluginInfoChainV2 __FILE_TYPE__ = "ods" IOPluginInfoChainV2(__name__).add_a_reader( relative_plugin_class_path="odsr.ODSBook", ...
true
true
1c01213e104ac35f001624ef2646b57f11d6bd13
8,812
py
Python
esmvaltool/diag_scripts/cvdp/cvdp_wrapper.py
cffbots/ESMValTool
a9b6592a02f2085634a214ff5f36a736fa18ff47
[ "Apache-2.0" ]
148
2017-02-07T13:16:03.000Z
2022-03-26T02:21:56.000Z
esmvaltool/diag_scripts/cvdp/cvdp_wrapper.py
cffbots/ESMValTool
a9b6592a02f2085634a214ff5f36a736fa18ff47
[ "Apache-2.0" ]
2,026
2017-02-03T12:57:13.000Z
2022-03-31T15:11:51.000Z
esmvaltool/diag_scripts/cvdp/cvdp_wrapper.py
cffbots/ESMValTool
a9b6592a02f2085634a214ff5f36a736fa18ff47
[ "Apache-2.0" ]
113
2017-01-27T13:10:19.000Z
2022-02-03T13:42:11.000Z
"""wrapper diagnostic for the NCAR CVDP (p)ackage.""" import logging import os import re import shutil import subprocess from esmvaltool.diag_scripts.shared import (group_metadata, run_diagnostic) from esmvaltool.diag_scripts.shared import ProvenanceLogger logger = logging.getLogger(os.path.basename(__file__)) clas...
27.886076
79
0.570586
import logging import os import re import shutil import subprocess from esmvaltool.diag_scripts.shared import (group_metadata, run_diagnostic) from esmvaltool.diag_scripts.shared import ProvenanceLogger logger = logging.getLogger(os.path.basename(__file__)) class DiagnosticError(Exception): def setup_driver(cfg):...
true
true
1c0121bacf8db73f145856faf365791454754a9e
454
py
Python
data/scripts/templates/object/static/particle/shared_pt_light_streetlamp_green.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/static/particle/shared_pt_light_streetlamp_green.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/static/particle/shared_pt_light_streetlamp_green.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/particle/shared_pt_light_streetlamp_green.iff" result.attribute_templat...
26.705882
80
0.731278
from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/particle/shared_pt_light_streetlamp_green.iff" result.attribute_template_id = -1 result.stfName("obj_n","unknown_object") return result
true
true
1c0122746b21a2350d0dde3014b0777010e09cd6
6,027
py
Python
octopus/arch/evm/cfg.py
SillyTin/octopus
5ad30f4affaa209a6ccc03c406c41c820dab62dc
[ "MIT" ]
212
2018-06-29T10:13:42.000Z
2020-02-16T07:55:47.000Z
octopus/arch/evm/cfg.py
b-mueller/octopus
249f2afa37859bf645bc0251502ac104c4b37ec7
[ "MIT" ]
12
2018-07-05T08:50:12.000Z
2020-01-16T08:41:49.000Z
octopus/arch/evm/cfg.py
b-mueller/octopus
249f2afa37859bf645bc0251502ac104c4b37ec7
[ "MIT" ]
34
2018-06-28T11:49:02.000Z
2020-02-05T07:42:33.000Z
from octopus.analysis.cfg import CFG from octopus.analysis.graph import CFGGraph from octopus.core.function import Function from octopus.core.basicblock import BasicBlock from octopus.arch.evm.disassembler import EvmDisassembler import json import os from logging import getLogger logging = getLogger(__name__) SIGN...
31.06701
97
0.585366
from octopus.analysis.cfg import CFG from octopus.analysis.graph import CFGGraph from octopus.core.function import Function from octopus.core.basicblock import BasicBlock from octopus.arch.evm.disassembler import EvmDisassembler import json import os from logging import getLogger logging = getLogger(__name__) SIGN...
true
true
1c0125d44c5945d1567536e8a5641f4feebc2504
2,469
py
Python
var/spack/repos/builtin/packages/py-poetry/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
3
2021-09-29T02:14:40.000Z
2022-01-27T20:50:36.000Z
var/spack/repos/builtin/packages/py-poetry/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2022-02-28T11:30:18.000Z
2022-03-23T19:34:56.000Z
var/spack/repos/builtin/packages/py-poetry/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPoetry(PythonPackage): """Python dependency management and packaging made easy.""" ...
56.113636
100
0.629405
from spack import * class PyPoetry(PythonPackage): homepage = "https://python-poetry.org/" pypi = "poetry/poetry-1.1.12.tar.gz" version('1.1.12', sha256='5c66e2357fe37b552462a88b7d31bfa2ed8e84172208becd666933c776252567') depends_on('python@2.7,3.5:3', type=('build', 'run')) depends_on('py-...
true
true
1c0127278c6d0ec7999fdb4846d0bc34999e42a3
3,959
py
Python
pymatgen/alchemy/tests/test_transmuters.py
JiQi535/pymatgen
9dc1a8e3658da846e79c25d55c399c13ec25646b
[ "MIT" ]
null
null
null
pymatgen/alchemy/tests/test_transmuters.py
JiQi535/pymatgen
9dc1a8e3658da846e79c25d55c399c13ec25646b
[ "MIT" ]
null
null
null
pymatgen/alchemy/tests/test_transmuters.py
JiQi535/pymatgen
9dc1a8e3658da846e79c25d55c399c13ec25646b
[ "MIT" ]
1
2020-10-20T02:09:02.000Z
2020-10-20T02:09:02.000Z
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os import unittest import warnings from pymatgen.alchemy.filters import ContainsSpecieFilter from pymatgen.alchemy.transmuters import CifTransmuter, PoscarTransmuter from pymatgen.transformations.advan...
34.12931
93
0.60874
import os import unittest import warnings from pymatgen.alchemy.filters import ContainsSpecieFilter from pymatgen.alchemy.transmuters import CifTransmuter, PoscarTransmuter from pymatgen.transformations.advanced_transformations import SuperTransformation from pymatgen.transformations.standard_transformations import ...
true
true
1c01278197df30b5dfe90447da15e98d16fad503
27,795
py
Python
homeassistant/components/light/mqtt.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
1
2021-04-08T06:02:25.000Z
2021-04-08T06:02:25.000Z
homeassistant/components/light/mqtt.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
1
2022-03-12T01:05:00.000Z
2022-03-12T01:05:00.000Z
homeassistant/components/light/mqtt.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
1
2019-04-16T14:07:20.000Z
2019-04-16T14:07:20.000Z
""" Support for MQTT lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.mqtt/ """ import logging import voluptuous as vol from homeassistant.core import callback from homeassistant.components import mqtt, light from homeassistant.components.l...
40.814978
79
0.645979
import logging import voluptuous as vol from homeassistant.core import callback from homeassistant.components import mqtt, light from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_HS_COLOR, ATTR_WHITE_VALUE, Light, SUPPORT_BRIGHTNESS, SUPPORT_COLOR_TEMP, SUPPO...
true
true
1c0127a9604361007ac7d35f52388c31a9910e4a
12,972
py
Python
config/build.py
scudette/grr
d4257c5259af881e28a7d62e9837fa13352e2bf6
[ "Apache-2.0" ]
6
2015-04-03T02:25:28.000Z
2021-11-17T21:42:59.000Z
config/build.py
defaultnamehere/grr
ba1648b97a76f844ffb8e1891cc9e2680f9b1c6e
[ "Apache-2.0" ]
null
null
null
config/build.py
defaultnamehere/grr
ba1648b97a76f844ffb8e1891cc9e2680f9b1c6e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Configuration parameters for client builder and server packaging.""" import os import time from grr.lib import config_lib from grr.lib import rdfvalue from grr.lib import type_info # Windows Memory driver information. config_lib.DEFINE_string("MemoryDriver.driver_service_name", ...
34.5
80
0.676611
import os import time from grr.lib import config_lib from grr.lib import rdfvalue from grr.lib import type_info config_lib.DEFINE_string("MemoryDriver.driver_service_name", "Pmem", "The SCCM service name for the driver.") config_lib.DEFINE_string("MemoryDriver.drive...
true
true
1c0128351e10983aaa58d7f554e6593cc3b0cc55
27,507
py
Python
fuzzers/007-timing/bel/tim2json.py
betrusted-io/prjxray
bdb876caec1385953821bc8b5f28ac395c944ebe
[ "ISC" ]
null
null
null
fuzzers/007-timing/bel/tim2json.py
betrusted-io/prjxray
bdb876caec1385953821bc8b5f28ac395c944ebe
[ "ISC" ]
null
null
null
fuzzers/007-timing/bel/tim2json.py
betrusted-io/prjxray
bdb876caec1385953821bc8b5f28ac395c944ebe
[ "ISC" ]
null
null
null
#!/usr/bin/env python3 import argparse import json def check_sequential(speed_model): # combinational path models do not contain # the following keywords timing_keywords = { 'setup': 'setup', 'remov': 'removal', 'hold': 'hold', 'recov': 'recovery', 'removal': 'remo...
40.570796
136
0.479223
import argparse import json def check_sequential(speed_model): timing_keywords = { 'setup': 'setup', 'remov': 'removal', 'hold': 'hold', 'recov': 'recovery', 'removal': 'removal', 'recovery': 'recovery' } tmp = speed_model.split('_') for keyword...
true
true
1c0129ae5f7fcd2465be2e564a8f2b024da7b4a0
1,639
py
Python
backend/db/create.py
Dangandy/covid
2c8b9f4ab365c5b460e7d7e28273d7966e382b77
[ "MIT" ]
2
2020-04-22T13:28:18.000Z
2021-09-24T08:07:00.000Z
backend/db/create.py
Dangandy/covid
2c8b9f4ab365c5b460e7d7e28273d7966e382b77
[ "MIT" ]
4
2020-04-27T21:07:08.000Z
2022-02-10T01:40:33.000Z
backend/db/create.py
Dangandy/covid
2c8b9f4ab365c5b460e7d7e28273d7966e382b77
[ "MIT" ]
null
null
null
# 3rd party imports from datetime import datetime, timedelta import requests # local imports from model import db, Stat class Create: def __init__(self): # variables self.url = "https://pomber.github.io/covid19/timeseries.json" def extract(self): # get json data response = re...
23.084507
73
0.533862
from datetime import datetime, timedelta import requests from model import db, Stat class Create: def __init__(self): self.url = "https://pomber.github.io/covid19/timeseries.json" def extract(self): response = requests.get(self.url) json = response.json() ...
true
true
1c012bcd2d5706fbf1209ad4fe3b7cc1835c4429
5,901
py
Python
allennlp_optuna/commands/tune.py
himkt/optuna-allennlp-subcommand
8d907e46e4424c8f0c67819c7cdef3a4a84e9698
[ "MIT" ]
null
null
null
allennlp_optuna/commands/tune.py
himkt/optuna-allennlp-subcommand
8d907e46e4424c8f0c67819c7cdef3a4a84e9698
[ "MIT" ]
null
null
null
allennlp_optuna/commands/tune.py
himkt/optuna-allennlp-subcommand
8d907e46e4424c8f0c67819c7cdef3a4a84e9698
[ "MIT" ]
null
null
null
""" The `train` subcommand can be used to train a model. It requires a configuration file and a directory in which to write the results. """ import argparse import json import logging import os from functools import partial import optuna from allennlp.commands.subcommand import Subcommand from optuna import Trial fro...
30.107143
117
0.601932
import argparse import json import logging import os from functools import partial import optuna from allennlp.commands.subcommand import Subcommand from optuna import Trial from optuna.integration import AllenNLPExecutor from overrides import overrides logger = logging.getLogger(__name__) def tune(args: argparse....
true
true
1c012c7e26824207edda716d42e1584a961747d9
517
py
Python
hansberger/users/admin.py
097475/hansberger
bb4ba1cbc410e7242a12f841e447b4d68f4298f6
[ "MIT" ]
1
2019-04-03T13:44:38.000Z
2019-04-03T13:44:38.000Z
hansberger/users/admin.py
097475/hansberger
bb4ba1cbc410e7242a12f841e447b4d68f4298f6
[ "MIT" ]
4
2020-06-06T00:19:57.000Z
2022-03-11T23:56:24.000Z
hansberger/users/admin.py
097475/hansberger
bb4ba1cbc410e7242a12f841e447b4d68f4298f6
[ "MIT" ]
2
2019-04-17T09:23:32.000Z
2019-05-03T10:38:16.000Z
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from hansberger.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChangeForm ...
28.722222
83
0.748549
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from hansberger.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChangeForm ...
true
true
1c012ce095da8fcd6a563f2ad06242e6ed6da1d6
3,356
py
Python
train.py
wjy199708/my_point_painting
32dd845b08a94e222e913471e42e9d9e128ba213
[ "Apache-2.0" ]
1
2021-03-05T02:52:16.000Z
2021-03-05T02:52:16.000Z
train.py
wjy199708/my_point_painting
32dd845b08a94e222e913471e42e9d9e128ba213
[ "Apache-2.0" ]
3
2020-11-22T12:20:05.000Z
2021-03-12T08:50:47.000Z
train.py
wjy199708/my_point_painting
32dd845b08a94e222e913471e42e9d9e128ba213
[ "Apache-2.0" ]
1
2021-03-05T03:23:55.000Z
2021-03-05T03:23:55.000Z
import torch import copy from model import SSD, MultiBoxLoss from dataset import KittiDataset from torch.utils.data import DataLoader import time def train_model(model, dataloaders, criterion, optimizer, num_epochs=1): device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") since = time.time()...
39.482353
126
0.585221
import torch import copy from model import SSD, MultiBoxLoss from dataset import KittiDataset from torch.utils.data import DataLoader import time def train_model(model, dataloaders, criterion, optimizer, num_epochs=1): device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") since = time.time()...
true
true
1c012d149c2cca8f677e018a2f2ea304c9890d6f
523
py
Python
insrunner/colors.py
MatejKastak/insrunner
6c99b7c4c6768003ea5822d03b916f2f17ee5900
[ "MIT" ]
null
null
null
insrunner/colors.py
MatejKastak/insrunner
6c99b7c4c6768003ea5822d03b916f2f17ee5900
[ "MIT" ]
null
null
null
insrunner/colors.py
MatejKastak/insrunner
6c99b7c4c6768003ea5822d03b916f2f17ee5900
[ "MIT" ]
null
null
null
# Colors support # Author: Matej Kastak class Color: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' BLACK = '\u001b[30m' RED = '\u001b[31m' GREEN = '\u001b[32m' ...
20.115385
34
0.523901
class Color: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' BLACK = '\u001b[30m' RED = '\u001b[31m' GREEN = '\u001b[32m' YELLOW = '\u001b[33m' BLUE = '\u001b...
true
true
1c012f928bd52942a89b57a42811305e6b59b7d5
318
py
Python
utils/__init__.py
DewMaple/head_box
27ac90511344bfa75b340d1db960365e9eb148c7
[ "Apache-2.0", "MIT" ]
null
null
null
utils/__init__.py
DewMaple/head_box
27ac90511344bfa75b340d1db960365e9eb148c7
[ "Apache-2.0", "MIT" ]
null
null
null
utils/__init__.py
DewMaple/head_box
27ac90511344bfa75b340d1db960365e9eb148c7
[ "Apache-2.0", "MIT" ]
null
null
null
from distutils.version import LooseVersion import tensorflow as tf TENSORFLOW_VERSION = LooseVersion(tf.__version__) def tf_concat(axis, values, **kwargs): if TENSORFLOW_VERSION >= LooseVersion('1.0'): return tf.concat(values, axis, **kwargs) else: return tf.concat(axis, values, **kwargs)
24.461538
49
0.713836
from distutils.version import LooseVersion import tensorflow as tf TENSORFLOW_VERSION = LooseVersion(tf.__version__) def tf_concat(axis, values, **kwargs): if TENSORFLOW_VERSION >= LooseVersion('1.0'): return tf.concat(values, axis, **kwargs) else: return tf.concat(axis, values, **kwargs)
true
true
1c013108080a96845e1bcc9f69bdb45ba1a70b38
6,124
py
Python
sdk/python/pulumi_azure_nextgen/network/v20200501/get_route_table.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20200501/get_route_table.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20200501/get_route_table.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
35.398844
174
0.647616
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetRouteTableResult', 'AwaitableGetRouteTableResult', 'get_route_table', ] @pulumi.output_type class GetRouteTableResult: ...
true
true
1c013109ed625d211e8b9d9a8939031062aafa0b
3,504
py
Python
ofagent/loxi/of14/util.py
sathishms77/test
bf8df6fc16c41720c7d99ed1ff17a64b543e9672
[ "Apache-2.0" ]
72
2017-01-18T02:36:34.000Z
2022-02-12T15:28:30.000Z
ofagent/loxi/of14/util.py
sathishms77/test
bf8df6fc16c41720c7d99ed1ff17a64b543e9672
[ "Apache-2.0" ]
11
2017-03-03T17:56:09.000Z
2022-02-11T03:38:03.000Z
ofagent/loxi/of14/util.py
sathishms77/test
bf8df6fc16c41720c7d99ed1ff17a64b543e9672
[ "Apache-2.0" ]
120
2017-02-02T23:26:11.000Z
2022-03-13T05:30:23.000Z
# Copyright 2017-present Open Networking Foundation # # 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 agr...
25.576642
92
0.62871
import struct import loxi import const import common import action import instruction import oxm import action_id import instruction_id import meter_band def pretty_mac(mac): return ':'.join(["%02x" % x for x in mac]) def pretty_ipv4(v): return "%d.%d.%d.%d" % ((v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & ...
false
true
1c01311c73ef1a36fa3e09de0c0d7d95e605b037
268
py
Python
club_crm/club_crm/doctype/club_services_category/club_services_category.py
VivekChamp/clubcrm
82036360d867d3dc5406bc71445a98841b5bffbf
[ "MIT" ]
null
null
null
club_crm/club_crm/doctype/club_services_category/club_services_category.py
VivekChamp/clubcrm
82036360d867d3dc5406bc71445a98841b5bffbf
[ "MIT" ]
null
null
null
club_crm/club_crm/doctype/club_services_category/club_services_category.py
VivekChamp/clubcrm
82036360d867d3dc5406bc71445a98841b5bffbf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, Blue Lynx and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class ClubServicesCategory(Document): pass
24.363636
49
0.779851
from __future__ import unicode_literals from frappe.model.document import Document class ClubServicesCategory(Document): pass
true
true
1c01316a93ab192788f7164f4ac60dd013516ca6
149
py
Python
pgu/__init__.py
danomagnum/fallingsand
b2b16637e85f9e4b0c0acd67f4be3ac504d8fd00
[ "MIT" ]
null
null
null
pgu/__init__.py
danomagnum/fallingsand
b2b16637e85f9e4b0c0acd67f4be3ac504d8fd00
[ "MIT" ]
1
2018-11-21T04:50:57.000Z
2018-11-21T04:50:57.000Z
pgu/__init__.py
danomagnum/fallingsand
b2b16637e85f9e4b0c0acd67f4be3ac504d8fd00
[ "MIT" ]
null
null
null
"""PGU is a collection of modules for writing games with PyGame. * gui - A module for creating widget-based interfaces """ __version__ = '0.16'
14.9
64
0.711409
__version__ = '0.16'
true
true
1c013475eb080c070a1641ea3af88027e274513b
9,633
py
Python
glance/registry/db/migrate_repo/versions/012_id_to_uuid.py
rcbops/glance-buildpackage
13e52178fb25d6062db6c7fad9df122d279320ab
[ "Apache-2.0" ]
2
2015-09-30T09:43:37.000Z
2017-06-26T14:36:21.000Z
glance/registry/db/migrate_repo/versions/012_id_to_uuid.py
rcbops/glance-buildpackage
13e52178fb25d6062db6c7fad9df122d279320ab
[ "Apache-2.0" ]
null
null
null
glance/registry/db/migrate_repo/versions/012_id_to_uuid.py
rcbops/glance-buildpackage
13e52178fb25d6062db6c7fad9df122d279320ab
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
33.447917
78
0.630229
import copy import migrate import sqlalchemy import glance.common.utils meta = sqlalchemy.MetaData() def upgrade(migrate_engine): meta.bind = migrate_engine t_images = _get_table('images', meta) t_image_members = _get_table('image_members', meta) t_image_properties = _get_table('image_propertie...
true
true
1c0134e6db1deb561f99ea1325cf81328c975b65
1,249
py
Python
scripts/comicsherpa.py
littauer/dosagetest
731e02e750780cf7d85a8428333758bb6a9443be
[ "MIT" ]
null
null
null
scripts/comicsherpa.py
littauer/dosagetest
731e02e750780cf7d85a8428333758bb6a9443be
[ "MIT" ]
null
null
null
scripts/comicsherpa.py
littauer/dosagetest
731e02e750780cf7d85a8428333758bb6a9443be
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2017 Tobias Gruetzmacher """ Script to get a list of ComicSherpa and save the info in a JSON file for further processing. """ from __future__ im...
27.152174
87
0.627702
from __future__ import absolute_import, division, print_function from scriptutil import ComicListUpdater class ComicSherpaUpdater(ComicListUpdater): excluded_comics = ( 'Pi', 'Rufus', 'BeneathTheFerns', 'BillyAndCo', 'BuffaloChips', 'Crawdiddy'...
true
true
1c01352481b48b59704d1b92592869568405549a
841
py
Python
setup.py
rubsal/muDIC
f884da36eae03633efd017db67955f93ef8e93c8
[ "MIT" ]
7
2021-01-17T13:16:22.000Z
2021-12-24T02:51:38.000Z
setup.py
rubsal/muDIC
f884da36eae03633efd017db67955f93ef8e93c8
[ "MIT" ]
null
null
null
setup.py
rubsal/muDIC
f884da36eae03633efd017db67955f93ef8e93c8
[ "MIT" ]
4
2020-05-03T16:28:42.000Z
2021-03-12T19:34:29.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="muDIC", version="0.1.2", author="PolymerGuy", author_email="sindre.n.olufsen@ntnu.no", description="A digital image correlation toolkit", long_description=long_description, long_de...
24.735294
54
0.586207
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="muDIC", version="0.1.2", author="PolymerGuy", author_email="sindre.n.olufsen@ntnu.no", description="A digital image correlation toolkit", long_description=long_description, long_de...
true
true
1c0135266d4b4d1d4d6851449e87d924ac0fe87b
1,892
py
Python
divergence_measures/mmd.py
cvsubmittemp/BraVL
784e3df6a8b6cf9f19bd28d0e0a2d21eede47ebd
[ "MIT" ]
3
2021-05-06T18:29:09.000Z
2022-01-13T03:23:25.000Z
divergence_measures/mmd.py
cvsubmittemp/BraVL
784e3df6a8b6cf9f19bd28d0e0a2d21eede47ebd
[ "MIT" ]
1
2022-02-02T07:49:59.000Z
2022-02-16T08:16:20.000Z
divergence_measures/mmd.py
thomassutter/MoPoE
477a441ecb6c735a0b8af4d643fe3ac04c58171f
[ "MIT" ]
2
2021-05-13T02:20:42.000Z
2022-03-30T04:05:43.000Z
def mmd_loss(z_tilde, z, z_var): r"""Calculate maximum mean discrepancy described in the WAE paper. Args: z_tilde (Tensor): samples from deterministic non-random encoder Q(Z|X). 2D Tensor(batch_size x dimension). z (Tensor): samples from prior distributions. same shape with z_tilde. ...
44
107
0.682875
def mmd_loss(z_tilde, z, z_var): assert z_tilde.size() == z.size() assert z.ndimension() == 2 n = z.size(0) im_kernel_z_z = im_kernel_sum(z, z, z_var, exclude_diag=True).div(n*(n-1)) im_kernel_ztilde_ztilde = im_kernel_sum(z_tilde, z_tilde, z_var, exclude_diag=True).div(n*(n-1)) im_kernel_z_zti...
true
true
1c0135f2ff8758aae9c0da5228d2d98afcf840e6
7,487
py
Python
superbench/benchmarks/micro_benchmarks/tcp_connectivity.py
yangpanMS/superbenchmark
4d85630abba0fe45b8cd3a51e79c15e6ac87a1e6
[ "MIT" ]
59
2021-04-12T09:44:23.000Z
2022-03-27T14:33:46.000Z
superbench/benchmarks/micro_benchmarks/tcp_connectivity.py
yangpanMS/superbenchmark
4d85630abba0fe45b8cd3a51e79c15e6ac87a1e6
[ "MIT" ]
275
2021-03-29T06:40:34.000Z
2022-03-30T07:35:49.000Z
superbench/benchmarks/micro_benchmarks/tcp_connectivity.py
yangpanMS/superbenchmark
4d85630abba0fe45b8cd3a51e79c15e6ac87a1e6
[ "MIT" ]
24
2021-04-09T12:42:27.000Z
2022-03-16T08:26:34.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """Module of the TCP connectivity benchmarks.""" import tcping from joblib import Parallel, delayed from superbench.common.utils import logger from superbench.benchmarks import BenchmarkRegistry, ReturnCode from superbench.benchmarks.micro_benc...
37.064356
117
0.573127
import tcping from joblib import Parallel, delayed from superbench.common.utils import logger from superbench.benchmarks import BenchmarkRegistry, ReturnCode from superbench.benchmarks.micro_benchmarks import MicroBenchmark def run_tcping(host, port, count, timeout): ping_obj = tcping.Ping(host, port, timeout)...
true
true
1c0136f26fe9bade7a4533b28384c52dedc52231
2,187
py
Python
base_model.py
akjindal53244/text_classification_hierarchical_cnn
ac6de211cc8f0004279a86c435b4904e8884ed52
[ "Apache-2.0" ]
7
2017-12-07T04:12:57.000Z
2019-03-20T09:19:59.000Z
base_model.py
akjindal53244/text_classification_hierarchical_cnn
ac6de211cc8f0004279a86c435b4904e8884ed52
[ "Apache-2.0" ]
1
2017-12-07T14:55:33.000Z
2018-11-18T16:52:47.000Z
base_model.py
akjindal53244/text_classification_hierarchical_cnn
ac6de211cc8f0004279a86c435b4904e8884ed52
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf class Model(object): """Abstracts a Tensorflow graph for a learning task. We use various Model classes as usual abstractions to encapsulate tensorflow computational graphs. Each algorithm you will construct in this homework will inherit from a Model object. """ def a...
33.646154
90
0.682213
import tensorflow as tf class Model(object): """Abstracts a Tensorflow graph for a learning task. We use various Model classes as usual abstractions to encapsulate tensorflow computational graphs. Each algorithm you will construct in this homework will inherit from a Model object. """ def a...
false
true
1c01392cc3d7b6daafacb3a52387ae24ba387730
15,929
py
Python
tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/pagers.py
Kache/gapic-generator-python
dcfcb32a60ac6243932304d757e7ef86008d5729
[ "Apache-2.0" ]
null
null
null
tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/pagers.py
Kache/gapic-generator-python
dcfcb32a60ac6243932304d757e7ef86008d5729
[ "Apache-2.0" ]
null
null
null
tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/pagers.py
Kache/gapic-generator-python
dcfcb32a60ac6243932304d757e7ef86008d5729
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
41.590078
95
0.672924
from typing import Any, AsyncIterator, Awaitable, Callable, Sequence, Tuple, Optional, Iterator from google.cloud.asset_v1.types import asset_service from google.cloud.asset_v1.types import assets class ListAssetsPager: def __init__(self, method: Callable[..., asset_service.ListAssetsResponse], ...
true
true
1c01393440f6ce03b7cce8e52d363725bab04231
622
py
Python
setup.py
zcutlip/py-dict-repr
823bf255a6c7a40fa42e7e319831b1c2dc6d0635
[ "MIT" ]
null
null
null
setup.py
zcutlip/py-dict-repr
823bf255a6c7a40fa42e7e319831b1c2dc6d0635
[ "MIT" ]
null
null
null
setup.py
zcutlip/py-dict-repr
823bf255a6c7a40fa42e7e319831b1c2dc6d0635
[ "MIT" ]
null
null
null
from setuptools import setup about = {} with open("py_dict_repr/__about__.py") as fp: exec(fp.read(), about) with open("README.md", "r") as fp: long_description = fp.read() setup(name='py-dict-repr', version=about["__version__"], description=about["__summary__"], long_description=long_descri...
28.272727
52
0.654341
from setuptools import setup about = {} with open("py_dict_repr/__about__.py") as fp: exec(fp.read(), about) with open("README.md", "r") as fp: long_description = fp.read() setup(name='py-dict-repr', version=about["__version__"], description=about["__summary__"], long_description=long_descri...
true
true
1c0139d93dce716487e6bbfe24bd2944f26893a8
2,815
py
Python
scripts/radlab-installer/terraform_installer.py
Floosey/rad-lab
7748b88cf9be3e8049458bb5204e68639021a290
[ "Apache-2.0" ]
null
null
null
scripts/radlab-installer/terraform_installer.py
Floosey/rad-lab
7748b88cf9be3e8049458bb5204e68639021a290
[ "Apache-2.0" ]
null
null
null
scripts/radlab-installer/terraform_installer.py
Floosey/rad-lab
7748b88cf9be3e8049458bb5204e68639021a290
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 ''' Copyright 2021 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
38.561644
450
0.662167
import os import platform import requests from bs4 import BeautifulSoup def main(): system = platform.system().lower() machine = platform.machine().lower() url = 'https://www.terraform.io/downloads.html' reqs = requests.get(url) soup = BeautifulSoup(reqs.text, 'html.parser') if('darw...
true
true
1c013a27eb734e5e3e8b5f318aed5210cc67065f
1,835
py
Python
aiotdlib/api/functions/send_payment_form.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
37
2021-05-04T10:41:41.000Z
2022-03-30T13:48:05.000Z
aiotdlib/api/functions/send_payment_form.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
13
2021-07-17T19:54:51.000Z
2022-02-26T06:50:00.000Z
aiotdlib/api/functions/send_payment_form.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
7
2021-09-22T21:27:11.000Z
2022-02-20T02:33:19.000Z
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # ...
34.622642
93
0.581471
from __future__ import annotations from pydantic import Field from ..base_object import BaseObject from ..types import InputCredentials class SendPaymentForm(BaseObject): ID: str = Field("sendPaymentForm", alias="@type") chat_id: int message_id: int payment_form_id: int order_info_id: str s...
true
true
1c013a62ab9ea4739ae5f4d5d014b2914db0250d
3,636
py
Python
Reuters/metrics.py
dheeraj7596/SCDV
e83fc81e1b59bebfa2fa1e334097caa44f9e7f48
[ "MIT" ]
60
2017-05-25T14:08:50.000Z
2022-02-04T19:29:44.000Z
Reuters/metrics.py
vgupta123/SCDV
329b13a413318262f1888d872d8e33b30217cbc7
[ "MIT" ]
2
2020-03-27T14:01:12.000Z
2020-07-16T14:33:31.000Z
Reuters/metrics.py
vgupta123/SCDV
329b13a413318262f1888d872d8e33b30217cbc7
[ "MIT" ]
19
2017-11-10T01:06:28.000Z
2021-09-25T19:31:25.000Z
import time import pandas as pd import numpy as np import math import sys from sklearn.model_selection import train_test_split from sklearn.preprocessing import MultiLabelBinarizer from pandas import DataFrame from sklearn.multiclass import OneVsRestClassifier from sklearn.linear_model import LogisticRegression from sk...
33.981308
137
0.65099
import time import pandas as pd import numpy as np import math import sys from sklearn.model_selection import train_test_split from sklearn.preprocessing import MultiLabelBinarizer from pandas import DataFrame from sklearn.multiclass import OneVsRestClassifier from sklearn.linear_model import LogisticRegression from sk...
true
true
1c013af4381884eeadc75cc427cf5b5adc535284
2,485
py
Python
read_tweets.py
rwsharp/statement_collector
610780d7c6d207d876bfdb1b1b310aba9ce9c934
[ "MIT" ]
null
null
null
read_tweets.py
rwsharp/statement_collector
610780d7c6d207d876bfdb1b1b310aba9ce9c934
[ "MIT" ]
null
null
null
read_tweets.py
rwsharp/statement_collector
610780d7c6d207d876bfdb1b1b310aba9ce9c934
[ "MIT" ]
null
null
null
import json import tweepy import sys import os.path import argparse import datetime def get_file_name(data_path, file_name, create_path=False, warn=False): # check the data path and file data_file_name = os.path.join(data_path, file_name) if create_path: if not os.path.isdir(data_path): ...
32.272727
120
0.608048
import json import tweepy import sys import os.path import argparse import datetime def get_file_name(data_path, file_name, create_path=False, warn=False): data_file_name = os.path.join(data_path, file_name) if create_path: if not os.path.isdir(data_path): if not os.path.exists(data_p...
false
true
1c013af98e51c8cfa36f2b636f8e1b88dff7eaef
8,678
py
Python
src/azure-cli/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/custom.py
mourackb/azure-cli
c40194fe2868eed04f9391e581ed865a382e2eaa
[ "MIT" ]
1
2022-02-18T00:16:46.000Z
2022-02-18T00:16:46.000Z
src/azure-cli/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/custom.py
mourackb/azure-cli
c40194fe2868eed04f9391e581ed865a382e2eaa
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/custom.py
mourackb/azure-cli
c40194fe2868eed04f9391e581ed865a382e2eaa
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
61.546099
170
0.729776
from knack.util import CLIError from .resource_providers import GeneralPrivateEndpointClient from .resource_providers.batch_provider import BatchPrivateEndpointClient TYPE_CLIENT_MAPPING = { 'Microsoft.Batch/batchAccounts': BatchPrivateEndpointClient } def register_providers(): _register_one_provider(...
true
true
1c013b1a285f800b4a8b7d885ee5fce8660fa4c0
1,124
py
Python
zabbix-whois-check.py
Arkasian/zabbix-whois-expiry
600df3ce5d33fbc88c4ce7d8bea223e61b5c8964
[ "WTFPL" ]
null
null
null
zabbix-whois-check.py
Arkasian/zabbix-whois-expiry
600df3ce5d33fbc88c4ce7d8bea223e61b5c8964
[ "WTFPL" ]
null
null
null
zabbix-whois-check.py
Arkasian/zabbix-whois-expiry
600df3ce5d33fbc88c4ce7d8bea223e61b5c8964
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python3 # checks when a domain is going to expire # and sends the time to zabbix # new version that reads from a json file import sys import os import json import whois from pyzabbix import ZabbixMetric, ZabbixSender wwwhost = sys.argv[1] dir_path = os.path.dirname(os.path.realpath(__file__)) with op...
31.222222
123
0.631673
import sys import os import json import whois from pyzabbix import ZabbixMetric, ZabbixSender wwwhost = sys.argv[1] dir_path = os.path.dirname(os.path.realpath(__file__)) with open(dir_path+'/whois/'+wwwhost+'.json', 'r') as read_file: domains = json.load(read_file) for domain in domains['domains']: try:...
false
true
1c013cf25b8a542fc90cbf72e6b0c32077f1457e
92,595
py
Python
11_stream/archive/spark/spark/spark-2.4.6-bin-without-hadoop/python/pyspark/sql/dataframe.py
dpai/workshop
d4936da77dac759ba2bac95a9584fde8e86c6b2b
[ "Apache-2.0" ]
2,327
2020-03-01T09:47:34.000Z
2021-11-25T12:38:42.000Z
11_stream/archive/spark/spark/spark-2.4.6-bin-without-hadoop/python/pyspark/sql/dataframe.py
trideau/Data-Science-with-AWS-Workshop
7dbe7989fa99e88544da8bf262beec907c536093
[ "Apache-2.0" ]
209
2020-03-01T17:14:12.000Z
2021-11-08T20:35:42.000Z
11_stream/archive/spark/spark/spark-2.4.6-bin-without-hadoop/python/pyspark/sql/dataframe.py
trideau/Data-Science-with-AWS-Workshop
7dbe7989fa99e88544da8bf262beec907c536093
[ "Apache-2.0" ]
686
2020-03-03T17:24:51.000Z
2021-11-25T23:39:12.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
39.020228
100
0.573109
import sys import random if sys.version >= '3': basestring = unicode = str long = int from functools import reduce from html import escape as html_escape else: from itertools import imap as map from cgi import escape as html_escape from collections import Counter import warnings from pyspark...
true
true
1c013e19b8cfc362437cb5f7b2fa088e2400b025
1,896
py
Python
src/aspectize/aspectize.py
amogorkon/aspectize
ee414f220c81f19de0c31f7391aaf6ff4f75097f
[ "MIT" ]
null
null
null
src/aspectize/aspectize.py
amogorkon/aspectize
ee414f220c81f19de0c31f7391aaf6ff4f75097f
[ "MIT" ]
null
null
null
src/aspectize/aspectize.py
amogorkon/aspectize
ee414f220c81f19de0c31f7391aaf6ff4f75097f
[ "MIT" ]
null
null
null
import re from enum import Flag from inspect import isclass, isfunction, ismethod, ismodule from time import monotonic try: import q # type: ignore except ImportError: q = print ASPECT = Flag("Aspect", "property_set property_get property_del class function method") last_called = 0 def logged(func): de...
32.689655
94
0.565401
import re from enum import Flag from inspect import isclass, isfunction, ismethod, ismodule from time import monotonic try: import q except ImportError: q = print ASPECT = Flag("Aspect", "property_set property_get property_del class function method") last_called = 0 def logged(func): def wrapper(*args...
true
true
1c013e38611a3c8da5b833a1656113a7262cd4b3
9,182
py
Python
data/gdb-pre7.0/mono-gdb.py
lefb766/mono
4f458a4ff72bc6c5e07f82aec9040d355cbb8f5c
[ "Apache-2.0" ]
469
2019-01-23T12:21:59.000Z
2022-03-10T15:50:42.000Z
data/gdb-pre7.0/mono-gdb.py
lefb766/mono
4f458a4ff72bc6c5e07f82aec9040d355cbb8f5c
[ "Apache-2.0" ]
83
2015-07-16T01:31:41.000Z
2016-01-13T02:15:47.000Z
data/gdb-pre7.0/mono-gdb.py
lefb766/mono
4f458a4ff72bc6c5e07f82aec9040d355cbb8f5c
[ "Apache-2.0" ]
36
2019-01-23T22:17:09.000Z
2022-01-20T15:41:34.000Z
# # Author: Zoltan Varga (vargaz@gmail.com) # License: MIT/X11 # # # This is a mono support mode for a python-enabled gdb: # http://sourceware.org/gdb/wiki/PythonGdb # Usage: # - copy/symlink this file, plus mono-gdbinit to the directory where the mono # executable lives. # - run mono under gdb, or attach to a mono...
36.875502
174
0.578414
from __future__ import print_function import os class StringPrinter: "Print a C# string" def __init__(self, val): self.val = val def to_string(self): if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0: return "null" obj = self.val.cast (gdb.lookup_type ("MonoS...
false
true
1c013efe94217e44feed1429c8f10f2d332fe49d
466
py
Python
tests/system/test_base.py
hmschreck/netbeat
1e4ea96740b5dfe3248ef82a60f29ce7802a380c
[ "Apache-2.0" ]
1
2021-06-02T18:27:25.000Z
2021-06-02T18:27:25.000Z
tests/system/test_base.py
hmschreck/netbeat
1e4ea96740b5dfe3248ef82a60f29ce7802a380c
[ "Apache-2.0" ]
null
null
null
tests/system/test_base.py
hmschreck/netbeat
1e4ea96740b5dfe3248ef82a60f29ce7802a380c
[ "Apache-2.0" ]
1
2020-12-01T16:19:33.000Z
2020-12-01T16:19:33.000Z
from netbeat import BaseTest import os class Test(BaseTest): def test_base(self): """ Basic test with exiting Netbeat normally """ self.render_config_template( path=os.path.abspath(self.working_dir) + "/log/*" ) netbeat_proc = self.start_beat() ...
23.3
72
0.622318
from netbeat import BaseTest import os class Test(BaseTest): def test_base(self): self.render_config_template( path=os.path.abspath(self.working_dir) + "/log/*" ) netbeat_proc = self.start_beat() self.wait_until(lambda: self.log_contains("netbeat is running")) ...
true
true
1c0141221fb50f349f6d7f48fcca0605b1061c29
6,207
py
Python
venv/lib/python3.8/site-packages/spaceone/api/statistics/plugin/storage_pb2_grpc.py
choonho/plugin-prometheus-mon-webhook
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/spaceone/api/statistics/plugin/storage_pb2_grpc.py
choonho/plugin-prometheus-mon-webhook
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/spaceone/api/statistics/plugin/storage_pb2_grpc.py
choonho/plugin-prometheus-mon-webhook
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from spaceone.api.statistics.plugin import storage_pb2 as spaceone_dot_api_dot_statis...
46.320896
129
0.693572
import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from spaceone.api.statistics.plugin import storage_pb2 as spaceone_dot_api_dot_statistics_dot_plugin_dot_storage__pb2 class StorageStub(object): def __init__(self, channel): self.init = channel.unary_unary( ...
true
true
1c0141c60e6991c9ab9f5e09dbdd90c744bcf77f
5,032
py
Python
SLAM/robot_class.py
trivediavinash/Landmark-Detection-And-Tracking-System
997bc60db74068f8d3e07ba34daacc8e1df66b3a
[ "MIT" ]
null
null
null
SLAM/robot_class.py
trivediavinash/Landmark-Detection-And-Tracking-System
997bc60db74068f8d3e07ba34daacc8e1df66b3a
[ "MIT" ]
null
null
null
SLAM/robot_class.py
trivediavinash/Landmark-Detection-And-Tracking-System
997bc60db74068f8d3e07ba34daacc8e1df66b3a
[ "MIT" ]
null
null
null
from math import * import random ### ------------------------------------- ### # Below, is the robot class # # This robot lives in 2D, x-y space, and its motion is # pointed in a random direction, initially. # It moves in a straight line until it comes close to a wall # at which point it stops. # # For m...
41.245902
111
0.600159
from math import * import random class robot: def __init__(self, world_size = 100.0, measurement_range = 30.0, motion_noise = 1.0, measurement_noise = 1.0): self.measurement_noise = 0.0 self.world_size = world_size self.measurement_range ...
true
true
1c0142441ac43d25ecc9bd0532d5c10a52964ebb
945
py
Python
gallery/ising-square-tc/plot.py
todo-group/exact
ee76421fab9b2b1eaf77d6b01830a18e66f7180a
[ "Apache-2.0" ]
1
2021-07-27T14:45:49.000Z
2021-07-27T14:45:49.000Z
gallery/ising-square-tc/plot.py
todo-group/exact
ee76421fab9b2b1eaf77d6b01830a18e66f7180a
[ "Apache-2.0" ]
1
2018-11-30T14:48:41.000Z
2018-11-30T14:48:41.000Z
gallery/ising-square-tc/plot.py
todo-group/exact
ee76421fab9b2b1eaf77d6b01830a18e66f7180a
[ "Apache-2.0" ]
null
null
null
import math import matplotlib.pyplot as plt filename = "result-p15.dat" with open(filename, 'r') as f: for line in f: data = line.split() if (data[0] == "inf"): free_energy_inf = float(data[6]) energy_inf = float(data[7]) L = [] free_energy = [] energy = [] with open(filen...
25.540541
90
0.6
import math import matplotlib.pyplot as plt filename = "result-p15.dat" with open(filename, 'r') as f: for line in f: data = line.split() if (data[0] == "inf"): free_energy_inf = float(data[6]) energy_inf = float(data[7]) L = [] free_energy = [] energy = [] with open(filen...
true
true
1c0142e94160d63688513f4426b6b38016f86415
3,404
py
Python
wat/wat.py
brandons209/FlapJack-Cogs
9a959d27b543b5e4ad321979f1c80fbff7556a02
[ "MIT" ]
null
null
null
wat/wat.py
brandons209/FlapJack-Cogs
9a959d27b543b5e4ad321979f1c80fbff7556a02
[ "MIT" ]
null
null
null
wat/wat.py
brandons209/FlapJack-Cogs
9a959d27b543b5e4ad321979f1c80fbff7556a02
[ "MIT" ]
null
null
null
import os import re from redbot.core import checks, Config, commands class Wat(command.Cog): """Repeat messages when other users are having trouble hearing""" default_global_settings = { "channels_ignored": [], "guilds_ignored": [] } def __init__(self, bot): self.bot = bot ...
35.831579
81
0.564336
import os import re from redbot.core import checks, Config, commands class Wat(command.Cog): default_global_settings = { "channels_ignored": [], "guilds_ignored": [] } def __init__(self, bot): self.bot = bot self.conf = Config.get_conf(self, identifier=527690525) ...
true
true
1c01439a361f79ffd0b0eb65c25e1d209c8fb45b
4,602
py
Python
pydifact/message.py
qwyk/pydifact
ccb8907e443764c3ae981b4642ef1db3b0c81c7f
[ "MIT" ]
null
null
null
pydifact/message.py
qwyk/pydifact
ccb8907e443764c3ae981b4642ef1db3b0c81c7f
[ "MIT" ]
null
null
null
pydifact/message.py
qwyk/pydifact
ccb8907e443764c3ae981b4642ef1db3b0c81c7f
[ "MIT" ]
null
null
null
# Pydifact - a python edifact library # # Copyright (c) 2019 Christian González # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights ...
35.129771
97
0.669709
import collections from pydifact.parser import Parser from pydifact.segments import Segment from pydifact.serializer import Serializer from pydifact.control import Characters import codecs class Message: def __init__(self): self.segments = [] self.has_una_segment = False ...
true
true
1c014462410882f9ef829e29876dab14bb172fec
5,753
py
Python
pysigview/core/source_manager.py
ICRC-BME/PySigView
8ac60960dea0e5c70757c76545a896c76a95f68d
[ "Apache-2.0" ]
1
2021-03-26T12:48:49.000Z
2021-03-26T12:48:49.000Z
pysigview/core/source_manager.py
ICRC-BME/PySigView
8ac60960dea0e5c70757c76545a896c76a95f68d
[ "Apache-2.0" ]
39
2018-09-06T21:32:54.000Z
2020-10-12T09:04:52.000Z
pysigview/core/source_manager.py
ICRC-BME/PySigView
8ac60960dea0e5c70757c76545a896c76a95f68d
[ "Apache-2.0" ]
2
2019-12-24T02:57:47.000Z
2022-02-28T22:22:09.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 22 13:14:09 2017 Ing.,Mgr. (MSc.) Jan Cimbálník, PhD. Biomedical engineering International Clinical Research Center St. Anne's University Hospital in Brno Czech Republic & Mayo systems electrophysiology lab Mayo Clinic 200 1st St SW Rochester, MN Un...
24.377119
79
0.54024
import numpy as np class DataMap: def __init__(self): super(DataMap, self).__init__() self._map = np.array([], dtype=[('channels', object), ('ch_set', np.bool), ('uutc_ss', np.int64, 2)]) def __getitem__(self...
true
true
1c0144bee1f129e2e883facbba1effdfb225ae44
6,773
py
Python
telethon/events/userupdate.py
yeung1704/Telethon
4562ba9ccfb1aef33facd5ca1a2675705d390e1c
[ "MIT" ]
null
null
null
telethon/events/userupdate.py
yeung1704/Telethon
4562ba9ccfb1aef33facd5ca1a2675705d390e1c
[ "MIT" ]
null
null
null
telethon/events/userupdate.py
yeung1704/Telethon
4562ba9ccfb1aef33facd5ca1a2675705d390e1c
[ "MIT" ]
null
null
null
import datetime from .common import EventBuilder, EventCommon, name_inner_event from ..tl import types @name_inner_event class UserUpdate(EventBuilder): """ Represents a user update (gone online, offline, joined Telegram). """ @classmethod def build(cls, update): if isinstance(update, typ...
38.925287
79
0.544367
import datetime from .common import EventBuilder, EventCommon, name_inner_event from ..tl import types @name_inner_event class UserUpdate(EventBuilder): @classmethod def build(cls, update): if isinstance(update, types.UpdateUserStatus): event = cls.Event(update.user_id, ...
true
true
1c014510cdebb4fbc4c70db7e785dc4375d391ca
194
py
Python
Python/Grocery Shop.py
hakerarena/OS-SRM-eLab
06bf4e8eba79efe1f7cb493c14bb5e6fe84a58b3
[ "MIT" ]
5
2020-05-17T11:47:05.000Z
2022-03-20T13:29:20.000Z
Python/Grocery Shop.py
hakerarena/OS-SRM-eLab
06bf4e8eba79efe1f7cb493c14bb5e6fe84a58b3
[ "MIT" ]
1
2020-05-18T11:49:44.000Z
2020-05-18T12:06:42.000Z
Python/Grocery Shop.py
hakerarena/OS-SRM-eLab
06bf4e8eba79efe1f7cb493c14bb5e6fe84a58b3
[ "MIT" ]
4
2020-04-21T05:21:52.000Z
2021-09-19T06:21:35.000Z
item=input() cost=float(input()) quant=int(input()) print("Product Details") print(item) print(cost) print(quant) print("Bill:",round((cost*quant),2)) #Code by hakerarenatutorials.wordpress.com
19.4
42
0.742268
item=input() cost=float(input()) quant=int(input()) print("Product Details") print(item) print(cost) print(quant) print("Bill:",round((cost*quant),2))
true
true
1c014548a86cd23347e66b7ff4dd7e4c2094f7c8
2,533
py
Python
test/Dask/test_Dask_numpy.py
Lyncs-API/lyncs.io
9925435f29a2ffbdcffaaab9a1fff24a831b84ea
[ "BSD-3-Clause" ]
null
null
null
test/Dask/test_Dask_numpy.py
Lyncs-API/lyncs.io
9925435f29a2ffbdcffaaab9a1fff24a831b84ea
[ "BSD-3-Clause" ]
15
2021-03-28T09:20:54.000Z
2022-03-24T17:18:16.000Z
test/Dask/test_Dask_numpy.py
Lyncs-API/lyncs.io
9925435f29a2ffbdcffaaab9a1fff24a831b84ea
[ "BSD-3-Clause" ]
1
2021-07-19T10:48:28.000Z
2021-07-19T10:48:28.000Z
import os import numpy from lyncs_utils import prod import lyncs_io as io from lyncs_io.testing import ( client, dtype_loop, shape_loop, workers_loop, chunksize_loop, tempdir, generate_rand_arr, mark_dask, ) try: import dask.array as da except ImportError: pass @mark_dask @d...
23.896226
78
0.673115
import os import numpy from lyncs_utils import prod import lyncs_io as io from lyncs_io.testing import ( client, dtype_loop, shape_loop, workers_loop, chunksize_loop, tempdir, generate_rand_arr, mark_dask, ) try: import dask.array as da except ImportError: pass @mark_dask @d...
true
true
1c0145f63ec19d5ef2209de5955c01a80c6f2fc3
123
py
Python
solutions/codeforces/228A.py
forxhunter/ComputingIntro
50fa2ac030748626c694ec5c884c5ac32f0b42a8
[ "Apache-2.0" ]
1
2021-01-02T04:31:34.000Z
2021-01-02T04:31:34.000Z
solutions/codeforces/228A.py
forxhunter/ComputingIntro
50fa2ac030748626c694ec5c884c5ac32f0b42a8
[ "Apache-2.0" ]
null
null
null
solutions/codeforces/228A.py
forxhunter/ComputingIntro
50fa2ac030748626c694ec5c884c5ac32f0b42a8
[ "Apache-2.0" ]
null
null
null
''' Is your horseshoe on the other hoof? ''' colors = set(map(int, input().split(' '))) left = 4 - len(colors) print(left)
17.571429
42
0.626016
colors = set(map(int, input().split(' '))) left = 4 - len(colors) print(left)
true
true
1c01462e7e439e5f78236cd19180d281eb8be904
335
py
Python
NPTEL-Course-Lecture Programmes/Colorpicker.py
Slow-Rain/NPTEL-The-Joy-of-Computing-using-Python
e4bd830ef7a3f171a14a88f94df626c766a7649b
[ "MIT" ]
29
2021-01-25T16:13:17.000Z
2022-03-23T16:34:06.000Z
NPTEL-Course-Lecture Programmes/Colorpicker.py
Slow-Rain/NPTEL-The-Joy-of-Computing-using-Python
e4bd830ef7a3f171a14a88f94df626c766a7649b
[ "MIT" ]
12
2021-02-11T13:47:07.000Z
2021-10-10T04:26:45.000Z
NPTEL-Course-Lecture Programmes/Colorpicker.py
Slow-Rain/NPTEL-The-Joy-of-Computing-using-Python
e4bd830ef7a3f171a14a88f94df626c766a7649b
[ "MIT" ]
30
2021-02-10T05:54:31.000Z
2022-02-25T11:24:36.000Z
# -*- coding: utf-8 -*- """ Created on Mon Feb 22 16:33:53 2021 @author: Lakhan Kumawat """ #here we will write a program to pick a RGB format from an image #import image library from PIL from PIL import Image as i im=i.open("RGB-Format.png"); rgb_im=im.convert('RGB') r,g,b=rgb_im.getpixel((150,1)) ...
18.611111
65
0.650746
from PIL import Image as i im=i.open("RGB-Format.png"); rgb_im=im.convert('RGB') r,g,b=rgb_im.getpixel((150,1)) print(r,g,b)
true
true
1c01464f6e04c7cff9e9ebc3bcaeac23c3712578
4,799
py
Python
docs/conf.py
volodymyrss/bibtags
2716759824330221db957942e3902685bf159887
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
volodymyrss/bibtags
2716759824330221db957942e3902685bf159887
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
volodymyrss/bibtags
2716759824330221db957942e3902685bf159887
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # bibtags documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # 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...
29.441718
77
0.685351
import os import sys sys.path.insert(0, os.path.abspath('..')) import bibtags extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'bibtags' copyright = "2019, Volodymyr SAVCHENKO" author = "Volodymyr SAVCHENKO" # for ...
true
true