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
f710f93ca310a569f1514937b149a28f034cb42f
949
py
Python
warehouse_manager/main/migrations/0007_remove_warehousereply_files_alter_ticketimage_ticket_and_more.py
dzhigaev/warehouse_manager
3f81d2d889f3bec3cb0f9fd9c5aa053e34d4740f
[ "MIT" ]
null
null
null
warehouse_manager/main/migrations/0007_remove_warehousereply_files_alter_ticketimage_ticket_and_more.py
dzhigaev/warehouse_manager
3f81d2d889f3bec3cb0f9fd9c5aa053e34d4740f
[ "MIT" ]
null
null
null
warehouse_manager/main/migrations/0007_remove_warehousereply_files_alter_ticketimage_ticket_and_more.py
dzhigaev/warehouse_manager
3f81d2d889f3bec3cb0f9fd9c5aa053e34d4740f
[ "MIT" ]
null
null
null
# Generated by Django 4.0 on 2022-01-25 21:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0006_ticketimage_external_url_alter_warehousereply_files'), ] operations = [ migrations.RemoveField( model_name='warehouse...
30.612903
117
0.584826
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0006_ticketimage_external_url_alter_warehousereply_files'), ] operations = [ migrations.RemoveField( model_name='warehousereply', name='files', ), ...
true
true
f710f9e7c439c261ad1bf7d1d5b544451f4cc069
1,042
py
Python
stubs.min/System/Windows/Forms/__init___parts/ProgressBarStyle.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/System/Windows/Forms/__init___parts/ProgressBarStyle.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/Forms/__init___parts/ProgressBarStyle.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class ProgressBarStyle(Enum,IComparable,IFormattable,IConvertible): """ Specifies the style that a System.Windows.Forms.ProgressBar uses to indicate the progress of an operation. enum ProgressBarStyle,values: Blocks (0),Continuous (1),Marquee (2) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx....
29.771429
215
0.676583
class ProgressBarStyle(Enum,IComparable,IFormattable,IConvertible): pass """ __format__(formattable: IFormattable,format: str) -> str """ pass pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initial...
true
true
f710fa23050dd716d54383573b4029851899a772
2,989
py
Python
data_fill/banks_closest.py
hhalim/TargetBanks
8febd7300f3b01e92641e0f63355d3f66bfe674c
[ "MIT" ]
null
null
null
data_fill/banks_closest.py
hhalim/TargetBanks
8febd7300f3b01e92641e0f63355d3f66bfe674c
[ "MIT" ]
null
null
null
data_fill/banks_closest.py
hhalim/TargetBanks
8febd7300f3b01e92641e0f63355d3f66bfe674c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import config as cfg import pyodbc """ Fill in closest Police Stations within 10 miles If there is no closest PS, then ClosestPSDistance = MeanPSDistance = 10.5 miles Latitude/Longitude distance coefficients: --Miles 3958.75 --Kilometers 6367.45 --Feet 20890584 --Meters 6367450 """ def calc...
29.594059
119
0.557042
import config as cfg import pyodbc def calculate_distance(bankID, lat, lng): query = """ DECLARE @latitude float, @longitude float SELECT @latitude = ?, @longitude = ? SELECT [StationID] ,[Name] , [Address1] , [City] , [State] ...
true
true
f710fa5a92f614c0777cb6aba993ac7565e062df
80
py
Python
tests/test_gc1.py
lazyxu/pythonvm
8c25acc6ee1e01a0bb65bb35aae987264d6876aa
[ "MIT" ]
null
null
null
tests/test_gc1.py
lazyxu/pythonvm
8c25acc6ee1e01a0bb65bb35aae987264d6876aa
[ "MIT" ]
null
null
null
tests/test_gc1.py
lazyxu/pythonvm
8c25acc6ee1e01a0bb65bb35aae987264d6876aa
[ "MIT" ]
null
null
null
i = 0 while i < 21474826: i = i + 1 if i % 1000000 == 0: print i
16
24
0.45
i = 0 while i < 21474826: i = i + 1 if i % 1000000 == 0: print i
false
true
f710fa70daba0358925a0155ad3cb8fdb4671af0
4,050
py
Python
train.py
Wesley-Tse/Road-Detection
c3b444287d9b41ccc4234e737e4421b5d1b3c3da
[ "Apache-2.0" ]
null
null
null
train.py
Wesley-Tse/Road-Detection
c3b444287d9b41ccc4234e737e4421b5d1b3c3da
[ "Apache-2.0" ]
null
null
null
train.py
Wesley-Tse/Road-Detection
c3b444287d9b41ccc4234e737e4421b5d1b3c3da
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @author: Wesley # @time: 2020-12-11 10:47 import os import time import torch from torch import nn from models.dinknet34 import DinkNet34 from loss import dice_bce_loss from models.unet import UNet from dataset import MyDataset from torch.utils.data import DataLoader im...
33.471074
114
0.564691
import os import time import torch from torch import nn from models.dinknet34 import DinkNet34 from loss import dice_bce_loss from models.unet import UNet from dataset import MyDataset from torch.utils.data import DataLoader img_path = r'E:\PyCharmProject\datasets\5k\train_set\JPEGImages' mask_path = r'E:\PyCharmProj...
true
true
f710fa824dd142658303167ff27d7e85e9f7eece
2,813
py
Python
clamm/streams/plot_big_stft.py
p5a0u9l/clamm
a41ce2526e9792ce08263bf27eb9c417608d1f5d
[ "MIT" ]
1
2021-05-26T03:55:23.000Z
2021-05-26T03:55:23.000Z
clamm/streams/plot_big_stft.py
p5a0u9l/clamm
a41ce2526e9792ce08263bf27eb9c417608d1f5d
[ "MIT" ]
null
null
null
clamm/streams/plot_big_stft.py
p5a0u9l/clamm
a41ce2526e9792ce08263bf27eb9c417608d1f5d
[ "MIT" ]
null
null
null
""" Convert a large audio wav file (album length, i.e. > 30 minutes typically) into a series of videos consisting of the audio synchronized with images of the spectrogram. """ import os import sys import multiprocessing as mp import subprocess import tqdm import numpy as np import librosa.core import librosa.display i...
27.048077
79
0.618557
import os import sys import multiprocessing as mp import subprocess import tqdm import numpy as np import librosa.core import librosa.display import librosa.feature import matplotlib.pyplot as plt plt.switch_backend("agg") SAMPLERATE = 44.1e3 WAVPATH = sys.argv[1] BASENAME = os.path.basename(WAVPATH).replace(".wa...
true
true
f710fad258d902d6f03329a00440cfd3df370e4a
964
py
Python
quiz_data.py
ashutoshkrris/GUI-Quiz-Tkinter
4d88fa9543b52d83b398c5f4796bc7e10f6c6f33
[ "MIT" ]
10
2021-10-31T04:28:43.000Z
2022-02-27T20:10:31.000Z
quiz_data.py
ashutoshkrris/GUI-Quiz-Tkinter
4d88fa9543b52d83b398c5f4796bc7e10f6c6f33
[ "MIT" ]
null
null
null
quiz_data.py
ashutoshkrris/GUI-Quiz-Tkinter
4d88fa9543b52d83b398c5f4796bc7e10f6c6f33
[ "MIT" ]
2
2021-11-25T20:36:54.000Z
2021-12-26T04:26:48.000Z
import requests parameters = { "amount": 10, "type": "multiple" } response = requests.get(url="https://opentdb.com/api.php", params=parameters) question_data = response.json()["results"] """ Sample Response [ { 'category': 'Sports', 'type': 'multiple', 'difficulty': 'medium', ...
22.952381
88
0.51971
import requests parameters = { "amount": 10, "type": "multiple" } response = requests.get(url="https://opentdb.com/api.php", params=parameters) question_data = response.json()["results"]
true
true
f710fada49d8e202c88e0310925e822723cb3e6e
890
py
Python
mglearn/plot_animal_tree.py
mbooali/introduction-to-machine
3f75f9897f1f63f07bb6eace312fa35e16786623
[ "MIT" ]
51
2019-02-01T19:43:37.000Z
2022-03-16T09:07:03.000Z
mglearn/plot_animal_tree.py
mbooali/introduction-to-machine
3f75f9897f1f63f07bb6eace312fa35e16786623
[ "MIT" ]
2
2019-02-23T18:54:22.000Z
2019-11-09T01:30:32.000Z
mglearn/plot_animal_tree.py
mbooali/introduction-to-machine
3f75f9897f1f63f07bb6eace312fa35e16786623
[ "MIT" ]
35
2019-02-08T02:00:31.000Z
2022-03-01T23:17:00.000Z
from imageio import imread import matplotlib.pyplot as plt def plot_animal_tree(ax=None): import graphviz if ax is None: ax = plt.gca() mygraph = graphviz.Digraph(node_attr={'shape': 'box'}, edge_attr={'labeldistance': "10.5"}, format="...
31.785714
67
0.55618
from imageio import imread import matplotlib.pyplot as plt def plot_animal_tree(ax=None): import graphviz if ax is None: ax = plt.gca() mygraph = graphviz.Digraph(node_attr={'shape': 'box'}, edge_attr={'labeldistance': "10.5"}, format="...
true
true
f710fc68e45a37cce5c656828378d0930abb6dd0
688
py
Python
migrations/0002_auto_20161121_1848.py
WPRDC/property-api
980f541b07bef3c8842994cfb903b42cc2c25064
[ "MIT" ]
1
2021-10-01T18:35:46.000Z
2021-10-01T18:35:46.000Z
migrations/0002_auto_20161121_1848.py
WPRDC/property-api
980f541b07bef3c8842994cfb903b42cc2c25064
[ "MIT" ]
null
null
null
migrations/0002_auto_20161121_1848.py
WPRDC/property-api
980f541b07bef3c8842994cfb903b42cc2c25064
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-21 23:48 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('property_api', '0001_initial'), ] operations = [ migrations.RemoveField( ...
23.724138
63
0.581395
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('property_api', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='ckanresource', name='ckan_instance', ...
true
true
f710fc9750183ff8de75d9d019041bf7217e7cc6
494
py
Python
packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemode.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemode.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemode.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattercarpet.marker", **kwargs ): super(SizemodeValidator, self).__init__( plotly_name=plotly_name, p...
32.933333
82
0.645749
import _plotly_utils.basevalidators class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattercarpet.marker", **kwargs ): super(SizemodeValidator, self).__init__( plotly_name=plotly_name, p...
true
true
f710fcfe271b86745020637094a542da9581bfff
3,083
py
Python
src/dispatch/team/views.py
contractshark/dispatch
32226d89b306ac2979d916c87eeba567efaac4d3
[ "Apache-2.0" ]
1
2022-02-23T02:42:10.000Z
2022-02-23T02:42:10.000Z
src/dispatch/team/views.py
contractshark/dispatch
32226d89b306ac2979d916c87eeba567efaac4d3
[ "Apache-2.0" ]
1
2021-04-08T10:03:36.000Z
2021-04-08T10:03:36.000Z
src/dispatch/team/views.py
AlexaKelley/dispatch
b46d8416a0e4ec9badb76f6f3d1765c6093203f8
[ "Apache-2.0" ]
1
2021-04-08T10:02:57.000Z
2021-04-08T10:02:57.000Z
from typing import List from fastapi import APIRouter, Depends, HTTPException, Query from sqlalchemy.orm import Session from dispatch.database import get_db, search_filter_sort_paginate from .models import ( TeamContactCreate, TeamContactRead, TeamContactUpdate, TeamPagination, ) from .service import...
31.141414
95
0.693156
from typing import List from fastapi import APIRouter, Depends, HTTPException, Query from sqlalchemy.orm import Session from dispatch.database import get_db, search_filter_sort_paginate from .models import ( TeamContactCreate, TeamContactRead, TeamContactUpdate, TeamPagination, ) from .service import...
true
true
f710fd96673d5984891916ed0869543983fb7de1
3,520
py
Python
controller.py
Shihao-Feng-98/RRP_Hopper_simulation
444dbcce90d5ffb6bf577ed03adc9717183e21ae
[ "MIT" ]
4
2021-11-12T06:11:13.000Z
2022-03-30T12:10:47.000Z
controller.py
Shihao-Feng-98/RRP_Hopper_simulation
444dbcce90d5ffb6bf577ed03adc9717183e21ae
[ "MIT" ]
null
null
null
controller.py
Shihao-Feng-98/RRP_Hopper_simulation
444dbcce90d5ffb6bf577ed03adc9717183e21ae
[ "MIT" ]
3
2021-12-09T02:27:38.000Z
2022-03-29T06:48:08.000Z
''' only for RRP Hopper Shihao Feng 2021.10.28 ''' import numpy as np import pybullet as p from leg_kinematics import LegKinematicsRRP import pinocchio as pin class JointPDController(object): def __init__ (self): self.kp = np.array([70, 70, 1500]) self.kd = np.array([2, 2, 10]) def solve(self...
35.2
92
0.505114
import numpy as np import pybullet as p from leg_kinematics import LegKinematicsRRP import pinocchio as pin class JointPDController(object): def __init__ (self): self.kp = np.array([70, 70, 1500]) self.kd = np.array([2, 2, 10]) def solve(self, q_d, dq_d, q_state, dq_state): q = q_stat...
true
true
f710fdc0e254ef0ce35311f43c26d937585b5b27
13,741
py
Python
pynucastro/networks/rate_collection.py
XinlongSBU/pynucastro
4f1547e99208ad03d8f79d748601219591a157b5
[ "BSD-3-Clause" ]
null
null
null
pynucastro/networks/rate_collection.py
XinlongSBU/pynucastro
4f1547e99208ad03d8f79d748601219591a157b5
[ "BSD-3-Clause" ]
null
null
null
pynucastro/networks/rate_collection.py
XinlongSBU/pynucastro
4f1547e99208ad03d8f79d748601219591a157b5
[ "BSD-3-Clause" ]
null
null
null
"""A collection of classes and methods to deal with collections of rates that together make up a network.""" # Common Imports from __future__ import print_function import functools import math from operator import mul import os from collections import OrderedDict from ipywidgets import interact import matplotlib as...
35.50646
112
0.543774
from __future__ import print_function import functools import math from operator import mul import os from collections import OrderedDict from ipywidgets import interact import matplotlib as mpl import matplotlib.pyplot as plt import networkx as nx from pynucastro.rates import Rate, Nucleus, Library mpl.rcParams[...
true
true
f710fdd4366bd507e11c7c6ac41919ea1576386b
10,667
py
Python
notebooks/static_simulation.py
MGIMM/dynamic_balancing
74482a970996ec75f5fb3f433b8285420787ccd7
[ "MIT" ]
null
null
null
notebooks/static_simulation.py
MGIMM/dynamic_balancing
74482a970996ec75f5fb3f433b8285420787ccd7
[ "MIT" ]
null
null
null
notebooks/static_simulation.py
MGIMM/dynamic_balancing
74482a970996ec75f5fb3f433b8285420787ccd7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: import torch import numpy as np import matplotlib.pyplot as plt # from MMDBalancing import MMDBalancing as MMDB # from OptimalTransportBalancing import OptimalTransportBalancing as OTB # from NeuralAdversarialBalancing import NeuralAdversarialBalancing as NAB #get_ipyth...
29.713092
627
0.524609
import torch import numpy as np import matplotlib.pyplot as plt import pandas as pd from utils_balancing import * def static_simulation(): n = 5000 m = 5000 d = 1 r = lambda x:(x-3).square() + (x>-2)*(x+3).square() +x.abs() def get_data(n = 500,m = 500, r = r, d = d): def pi(x):...
true
true
f710fe105613de2bff1cca2a11388db455eb4ef3
6,442
py
Python
povary/apps/articles/models.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/articles/models.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/articles/models.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from django.db.models import Count import os from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.db.models.signals import post_save from djang...
34.265957
100
0.703043
import datetime from django.db.models import Count import os from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.db.models.signals import post_save from django.dispatch import receiv...
true
true
f710fe740f06cd1ce7d6e17259b4673874db184d
315
py
Python
app/thumbnails/utils.py
zybex86/pics
4ae4dcc0610ac37b5dae16a15328740e78868e50
[ "MIT" ]
null
null
null
app/thumbnails/utils.py
zybex86/pics
4ae4dcc0610ac37b5dae16a15328740e78868e50
[ "MIT" ]
null
null
null
app/thumbnails/utils.py
zybex86/pics
4ae4dcc0610ac37b5dae16a15328740e78868e50
[ "MIT" ]
null
null
null
from pathlib import Path from PIL import Image, ImageOps def generate_thumbnail(file_path, max_height): size = (max_height, max_height) thumbnail = ImageOps.fit(Image.open(file_path), size, Image.ANTIALIAS) thumbnail.save(f'{Path(file_path).stem}_thumb_{max_height}.jpg', 'JPEG') return thumbnail
31.5
76
0.752381
from pathlib import Path from PIL import Image, ImageOps def generate_thumbnail(file_path, max_height): size = (max_height, max_height) thumbnail = ImageOps.fit(Image.open(file_path), size, Image.ANTIALIAS) thumbnail.save(f'{Path(file_path).stem}_thumb_{max_height}.jpg', 'JPEG') return thumbnail
true
true
f710feaab45379a8bd9c845b0521809c0d560557
2,804
py
Python
tests/restapi/conftest.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
1
2016-09-12T10:51:00.000Z
2016-09-12T10:51:00.000Z
tests/restapi/conftest.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
17
2020-03-11T17:04:05.000Z
2020-05-01T09:34:45.000Z
tests/restapi/conftest.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
32.604651
93
0.617689
import pytest @pytest.fixture(scope='function') def restapi_server(): from werkzeug.serving import make_server from aiida.restapi.common.config import CLI_DEFAULTS from aiida.restapi.run_api import configure_api def _restapi_server(restapi=None): if restapi is None: flask_restapi...
true
true
f710ff32c9f3aa02f5a96ffecb083dfc2a5d990b
3,884
py
Python
xuerui_stat/analysis/random_forest/plot_tree.py
Xuerui-Yang/xuerui-stat
08b9dfedac810cbad5ee5969ca554212eb989db0
[ "MIT" ]
1
2019-11-02T03:00:52.000Z
2019-11-02T03:00:52.000Z
xuerui_stat/analysis/random_forest/plot_tree.py
Xuerui-Yang/xuerui-stat
08b9dfedac810cbad5ee5969ca554212eb989db0
[ "MIT" ]
4
2019-11-02T06:50:08.000Z
2019-11-02T06:50:18.000Z
xuerui_stat/analysis/random_forest/plot_tree.py
Xuerui-Yang/xuerui-stat
08b9dfedac810cbad5ee5969ca554212eb989db0
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import seaborn as sns class PlotTree(): def __init__(self,tree_class): self._tree_class=tree_class self._decision_node = dict(boxstyle="sawtooth", fc="0.8") self._leaf_node = dict(boxstyle="round4", fc="0.8") self._arrow_args = dict(arrows...
37.346154
114
0.523687
import matplotlib.pyplot as plt import seaborn as sns class PlotTree(): def __init__(self,tree_class): self._tree_class=tree_class self._decision_node = dict(boxstyle="sawtooth", fc="0.8") self._leaf_node = dict(boxstyle="round4", fc="0.8") self._arrow_args = dict(arrows...
true
true
f710ffa92c65c26a8bceb22d583bbb5d86dd8d0f
955
py
Python
lib/coloraide/distance/delta_e_z.py
CodeByZach/sublime_color_helper
9d881e1f036c886fedd94b026735c4727b7a34d3
[ "MIT" ]
14
2021-12-07T02:40:08.000Z
2022-01-24T19:38:17.000Z
lib/coloraide/distance/delta_e_z.py
CodeByZach/sublime_color_helper
9d881e1f036c886fedd94b026735c4727b7a34d3
[ "MIT" ]
null
null
null
lib/coloraide/distance/delta_e_z.py
CodeByZach/sublime_color_helper
9d881e1f036c886fedd94b026735c4727b7a34d3
[ "MIT" ]
null
null
null
""" Delta E z. https://www.osapublishing.org/oe/fulltext.cfm?uri=oe-25-13-15131&id=368272 """ from ..distance import DeltaE import math from .. import util from typing import TYPE_CHECKING, Any if TYPE_CHECKING: # pragma: no cover from ..color import Color class DEZ(DeltaE): """Delta E z class.""" NAM...
25.131579
79
0.57801
from ..distance import DeltaE import math from .. import util from typing import TYPE_CHECKING, Any if TYPE_CHECKING: from ..color import Color class DEZ(DeltaE): NAME = "jz" @classmethod def distance(cls, color: 'Color', sample: 'Color', **kwargs: Any) -> float: jz1, az1, bz1 = util.no_n...
true
true
f71100307ac314b71fd446938bf616987ca61fb0
40,965
py
Python
thinc/types.py
notplus/thinc
9228eba1a0af20fb0de80970791c601549b40e26
[ "MIT" ]
null
null
null
thinc/types.py
notplus/thinc
9228eba1a0af20fb0de80970791c601549b40e26
[ "MIT" ]
null
null
null
thinc/types.py
notplus/thinc
9228eba1a0af20fb0de80970791c601549b40e26
[ "MIT" ]
null
null
null
from typing import Union, Tuple, Sized, Container, Any, TypeVar, Callable from typing import Iterable, Iterator, Sequence, Dict, Generic, cast from typing import Optional, List, overload from dataclasses import dataclass import numpy import sys try: import cupy get_array_module = cupy.get_array_module except ...
41.378788
321
0.627926
from typing import Union, Tuple, Sized, Container, Any, TypeVar, Callable from typing import Iterable, Iterator, Sequence, Dict, Generic, cast from typing import Optional, List, overload from dataclasses import dataclass import numpy import sys try: import cupy get_array_module = cupy.get_array_module except ...
true
true
f711004432df38ae3c8341225cdbbae91d9826b0
10
py
Python
tasks/EPAM/python_course/foundation-python/l7/m7-19-image.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
2
2022-01-19T18:01:35.000Z
2022-02-06T06:54:38.000Z
tasks/EPAM/python_course/foundation-python/l7/m7-5-logs.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
tasks/EPAM/python_course/foundation-python/l7/m7-5-logs.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
"""Talk"""
10
10
0.4
true
true
f711004483da66e51845425fa42d359f23f0af9c
21,264
py
Python
Codes/Python32/Lib/bdb.py
eyantra/FireBird_Swiss_Knife
cac322cf28e2d690b86ba28a75e87551e5e47988
[ "MIT" ]
319
2016-09-22T15:54:48.000Z
2022-03-18T02:36:58.000Z
Codes/Python32/Lib/bdb.py
eyantra/FireBird_Swiss_Knife
cac322cf28e2d690b86ba28a75e87551e5e47988
[ "MIT" ]
9
2016-11-03T21:56:41.000Z
2020-08-09T19:27:37.000Z
Codes/Python32/Lib/bdb.py
eyantra/FireBird_Swiss_Knife
cac322cf28e2d690b86ba28a75e87551e5e47988
[ "MIT" ]
27
2016-10-06T16:05:32.000Z
2022-03-18T02:37:00.000Z
"""Debugger basics""" import fnmatch import sys import os __all__ = ["BdbQuit", "Bdb", "Breakpoint"] class BdbQuit(Exception): """Exception to give up completely.""" class Bdb: """Generic Python debugger base class. This class takes care of details of the trace facility; a derived class should imp...
33.486614
80
0.581358
import fnmatch import sys import os __all__ = ["BdbQuit", "Bdb", "Breakpoint"] class BdbQuit(Exception): class Bdb: def __init__(self, skip=None): self.skip = set(skip) if skip else None self.breaks = {} self.fncache = {} def canonic(self, filename): if filename == "<" + f...
true
true
f71100cc93e49fc798cb8d6af96b7df25b5c0b0f
1,424
py
Python
terraform/terraform-swarm-inventory.py
swipswaps/hcloud_swarm
63f861c4daadc3a01fc646371cd71503353e7693
[ "Unlicense" ]
null
null
null
terraform/terraform-swarm-inventory.py
swipswaps/hcloud_swarm
63f861c4daadc3a01fc646371cd71503353e7693
[ "Unlicense" ]
null
null
null
terraform/terraform-swarm-inventory.py
swipswaps/hcloud_swarm
63f861c4daadc3a01fc646371cd71503353e7693
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import os ANSIBLE_SSH_PORT = '2222' def get_args(): from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('--list', action='store_true') parser.add_argument('--host') return parser.parse_args() def wd_to_scrip...
28.48
72
0.64677
import json import os ANSIBLE_SSH_PORT = '2222' def get_args(): from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('--list', action='store_true') parser.add_argument('--host') return parser.parse_args() def wd_to_script_dir(): import os path = os.path.abspa...
true
true
f71100d20d055f23e34b99c487028c18495bced0
1,954
py
Python
tcex/threat_intelligence/mappings/indicator/indicator_types/address.py
kdeltared/tcex
818c0d09256764f871e42d9ca5916f92d941d882
[ "Apache-2.0" ]
null
null
null
tcex/threat_intelligence/mappings/indicator/indicator_types/address.py
kdeltared/tcex
818c0d09256764f871e42d9ca5916f92d941d882
[ "Apache-2.0" ]
null
null
null
tcex/threat_intelligence/mappings/indicator/indicator_types/address.py
kdeltared/tcex
818c0d09256764f871e42d9ca5916f92d941d882
[ "Apache-2.0" ]
null
null
null
"""ThreatConnect TI Address""" from ..indicator import Indicator class Address(Indicator): """Unique API calls for Address API Endpoints""" def __init__(self, tcex, **kwargs): """Initialize Class Properties. Args: ip (str): The value for this Indicator. active (bool, ...
35.527273
95
0.616684
from ..indicator import Indicator class Address(Indicator): def __init__(self, tcex, **kwargs): super().__init__( tcex, sub_type='Address', api_entity='address', api_branch='addresses', **kwargs ) self.unique_id = kwargs.get('unique_id', kwargs.get('ip')) self.data['ip...
true
true
f71100eca98bd65fe173f8abaf89f414cac01ae0
11,299
py
Python
pysnmp/A3COM-HUAWEI-LswIGSP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/A3COM-HUAWEI-LswIGSP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/A3COM-HUAWEI-LswIGSP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module A3COM-HUAWEI-LswIGSP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-LswIGSP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:51:01 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7....
125.544444
1,988
0.775113
lswCommon, = mibBuilder.importSymbols("A3COM-HUAWEI-OID-MIB", "lswCommon") ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, SingleV...
true
true
f711016116d26bb42d1af55cd6be450a2aef11f5
26,311
py
Python
desktop/libs/hadoop/src/hadoop/fs/webhdfs.py
yongshengwang/builthue
c63af09d8284cc5a6f613bffd621ccdcac265ffc
[ "Apache-2.0" ]
null
null
null
desktop/libs/hadoop/src/hadoop/fs/webhdfs.py
yongshengwang/builthue
c63af09d8284cc5a6f613bffd621ccdcac265ffc
[ "Apache-2.0" ]
null
null
null
desktop/libs/hadoop/src/hadoop/fs/webhdfs.py
yongshengwang/builthue
c63af09d8284cc5a6f613bffd621ccdcac265ffc
[ "Apache-2.0" ]
1
2019-01-04T08:08:11.000Z
2019-01-04T08:08:11.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
29.696388
104
0.653415
""" Interfaces for Hadoop filesystem access via HttpFs/WebHDFS """ import errno import logging import posixpath import stat import threading import time from django.utils.encoding import smart_str from django.utils.translation import ugettext as _ from desktop.lib.rest import http_client, resource from hadoop.fs imp...
false
true
f71101a1784782e57cee2028ca80b2be898cb6d5
13,153
py
Python
libs/telegram/ext/picklepersistence.py
rocketbot-cl/Telegram
e44713f6eb15460d4609d844ed5cccbbc84d4309
[ "MIT" ]
null
null
null
libs/telegram/ext/picklepersistence.py
rocketbot-cl/Telegram
e44713f6eb15460d4609d844ed5cccbbc84d4309
[ "MIT" ]
null
null
null
libs/telegram/ext/picklepersistence.py
rocketbot-cl/Telegram
e44713f6eb15460d4609d844ed5cccbbc84d4309
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2020 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
41.755556
99
0.606402
import pickle from collections import defaultdict from copy import deepcopy from typing import Any, DefaultDict, Dict, Optional, Tuple from telegram.ext import BasePersistence from telegram.utils.types import ConversationDict class PicklePersistence(BasePersistence): def __init__( self, filename...
true
true
f71101f5b978b56c3a06bde91ef74d4fd7739c4f
1,811
py
Python
main.py
arthurvergacas/lineuzinho
6505b8b576cf6b8935fba0fab979e71bd454f8c3
[ "MIT" ]
null
null
null
main.py
arthurvergacas/lineuzinho
6505b8b576cf6b8935fba0fab979e71bd454f8c3
[ "MIT" ]
null
null
null
main.py
arthurvergacas/lineuzinho
6505b8b576cf6b8935fba0fab979e71bd454f8c3
[ "MIT" ]
null
null
null
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters import logging from lineuzinho import Lineuzinho def main(): logging.getLogger(__name__) logging.basicConfig(format='%(asctime)s [%(levelname)s]: %(message)s', level=logging.INFO) lineuzinho = Lineuzinho() updater = Updater(lin...
45.275
94
0.764771
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters import logging from lineuzinho import Lineuzinho def main(): logging.getLogger(__name__) logging.basicConfig(format='%(asctime)s [%(levelname)s]: %(message)s', level=logging.INFO) lineuzinho = Lineuzinho() updater = Updater(lin...
true
true
f711029eeb4b839cbf58c517115a6b12f9456c73
1,128
py
Python
sample-viewer-api/src/static/data/exploratory_scripts/2019-06-03_bonnie_plasmasamples.py
cvisb/cvisb_data
81ebf22782f2c44f8aa8ab9437cc4fb54248c3ed
[ "MIT" ]
2
2020-02-18T08:16:45.000Z
2021-04-11T18:58:02.000Z
sample-viewer-api/src/static/data/exploratory_scripts/2019-06-03_bonnie_plasmasamples.py
cvisb/cvisb_data
81ebf22782f2c44f8aa8ab9437cc4fb54248c3ed
[ "MIT" ]
47
2019-09-30T22:26:36.000Z
2021-11-17T00:34:38.000Z
sample-viewer-api/src/static/data/exploratory_scripts/2019-06-03_bonnie_plasmasamples.py
cvisb/cvisb_data
81ebf22782f2c44f8aa8ab9437cc4fb54248c3ed
[ "MIT" ]
1
2020-07-01T21:15:18.000Z
2020-07-01T21:15:18.000Z
# Goal: get ebola/Lassa for Bonnie's plasma samples. # Simple clean and merge import pandas as pd import os os.chdir("/Users/laurahughes/GitHub/cvisb_data/sample-viewer-api/src/static/data/") import helpers df = pd.read_excel("/Users/laurahughes/GitHub/cvisb_data/sample-viewer-api/src/static/data/input_data/sample_...
38.896552
171
0.777482
# Simple clean and merge import pandas as pd import os os.chdir("/Users/laurahughes/GitHub/cvisb_data/sample-viewer-api/src/static/data/") import helpers df = pd.read_excel("/Users/laurahughes/GitHub/cvisb_data/sample-viewer-api/src/static/data/input_data/sample_rosters/one_offs/CViSB Plasma Samples_Bonnie_2019-06-...
true
true
f711030e9cb47d589d7ef40dd62c7ee7b174a532
27,663
py
Python
src/tests/Common/scripts/run-pmi-diffs.py
pyracanda/runtime
72bee25ab532a4d0636118ec2ed3eabf3fd55245
[ "MIT" ]
9,402
2019-11-25T23:26:24.000Z
2022-03-31T23:19:41.000Z
src/tests/Common/scripts/run-pmi-diffs.py
pyracanda/runtime
72bee25ab532a4d0636118ec2ed3eabf3fd55245
[ "MIT" ]
37,522
2019-11-25T23:30:32.000Z
2022-03-31T23:58:30.000Z
src/tests/Common/scripts/run-pmi-diffs.py
pyracanda/runtime
72bee25ab532a4d0636118ec2ed3eabf3fd55245
[ "MIT" ]
3,629
2019-11-25T23:29:16.000Z
2022-03-31T21:52:28.000Z
#!/usr/bin/env python # # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. # ## # Title :run-pmi-diffs.py # # Notes: # # TODO: Instead of downloading and extracting the dotnet CLI, can we convert # to using init-tools.cmd/...
38.420833
261
0.58468
import argparse import distutils.dir_util import os import re import shutil import subprocess import urllib import sys import tarfile import zipfile if sys.version_info.major < 3: import urllib else: import urllib.request sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.ab...
true
true
f71103c169d8571edba137653f135725898352b3
4,523
py
Python
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/list_apis_binded_to_request_throttling_policy_v2_response.py
githubmilesma/huaweicloud-sdk-python-v3
9d9449ed68a609ca65f0aa50b5b2a1c28445bf03
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/list_apis_binded_to_request_throttling_policy_v2_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/list_apis_binded_to_request_throttling_policy_v2_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ListApisBindedToRequestThrottlingPolicyV2Response(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute ty...
27.412121
100
0.588547
import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ListApisBindedToRequestThrottlingPolicyV2Response(SdkResponse): sensitive_list = [] openapi_types = { 'total': 'int', 'size': 'int', 'apis': 'list[ThrottleBindingApiResp]' } ...
true
true
f71103cb3e09b1d069f05d1ab89f1c850ef5a0d5
626
py
Python
datasets/RTFM/rtfm/dynamics/item/weapon/clubs.py
kapikantzari/MultiBench
44ab6ea028682040a0c04de68239ce5cdf15123f
[ "MIT" ]
148
2021-03-06T06:54:13.000Z
2022-03-29T19:27:21.000Z
datasets/RTFM/rtfm/dynamics/item/weapon/clubs.py
kapikantzari/MultiBench
44ab6ea028682040a0c04de68239ce5cdf15123f
[ "MIT" ]
10
2021-07-19T22:57:49.000Z
2022-02-04T03:12:29.000Z
datasets/RTFM/rtfm/dynamics/item/weapon/clubs.py
kapikantzari/MultiBench
44ab6ea028682040a0c04de68239ce5cdf15123f
[ "MIT" ]
18
2021-07-22T07:17:27.000Z
2022-03-27T16:11:40.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from .base_weapon import Weapon from ... import dice as D, material as M class BaseClub(Weapon): pass class Club(Ba...
24.076923
97
0.667732
from .base_weapon import Weapon from ... import dice as D, material as M class BaseClub(Weapon): pass class Club(BaseClub): def __init__(self): super().__init__('club', weight=30, damage=D.Dice.from_str('d3'), material=M.Wood, hit=0) class Aklys(BaseClub): def __init__(self): super(...
true
true
f71104b9710f6705b538a9fe0341ae2f581c20b5
7,343
py
Python
isi_sdk_8_1_1/isi_sdk_8_1_1/models/audit_progress_progress.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_1_1/isi_sdk_8_1_1/models/audit_progress_progress.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_1_1/isi_sdk_8_1_1/models/audit_progress_progress.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 6 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class AuditProgressProgress(obje...
40.125683
144
0.669617
import pprint import re import six class AuditProgressProgress(object): swagger_types = { 'protocol_audit_cee_time': 'int', 'protocol_audit_log_time': 'int', 'protocol_audit_syslog_time': 'int' } attribute_map = { 'protocol_audit_cee_time': 'protocol_audit_cee_time',...
true
true
f711052633a45b9a3f3392f20a494f4bd70c01ab
11,316
py
Python
lorawan/lorawan_conformance/functionality/td_lorawan_fun_02.py
pablomodernell/lorawan_conformance_testing
3e6b9028ee7a6a614e52bac684e396ecd04fd10c
[ "MIT" ]
1
2020-09-10T14:12:07.000Z
2020-09-10T14:12:07.000Z
lorawan/lorawan_conformance/functionality/td_lorawan_fun_02.py
pablomodernell/lorawan_conformance_testing
3e6b9028ee7a6a614e52bac684e396ecd04fd10c
[ "MIT" ]
null
null
null
lorawan/lorawan_conformance/functionality/td_lorawan_fun_02.py
pablomodernell/lorawan_conformance_testing
3e6b9028ee7a6a614e52bac684e396ecd04fd10c
[ "MIT" ]
null
null
null
""" LoRaWAN Specification v1.0.2 Test Case Group: Functionality Test Name: FUN_02 """ ################################################################################# # MIT License # # Copyright (c) 2018, Pablo D. Modernell, Universitat Oberta de Catalunya (UOC), # Universidad de la Republica Oriental del Uruguay (Ude...
58.329897
99
0.514316
import lorawan.lorawan_conformance.lorawan_steps as lorawan_steps import conformance_testing.test_step_sequence import conformance_testing.test_errors as test_errors class ActokToPingDelay(lorawan_steps.ActokToPing): def __init__(self, ctx_test_manager, step_name, delay, next_step, default_rx1_window=True): ...
true
true
f71105cea0163d953e3acd8928b9d0414789cbfb
366
py
Python
settings.py
anirvan90/conference_central
7379022bb31ed44cd2dbe75b40ed7808c6127bd7
[ "Apache-2.0" ]
null
null
null
settings.py
anirvan90/conference_central
7379022bb31ed44cd2dbe75b40ed7808c6127bd7
[ "Apache-2.0" ]
null
null
null
settings.py
anirvan90/conference_central
7379022bb31ed44cd2dbe75b40ed7808c6127bd7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """settings.py Udacity conference server-side Python App Engine app user settings $Id$ created/forked from conference.py by wesc on 2014 may 24 """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = '1006324622497-9qlhtun5go635oe5...
21.529412
91
0.789617
WEB_CLIENT_ID = '1006324622497-9qlhtun5go635oe57l2vevfrq3f16u57.apps.googleusercontent.com'
true
true
f7110777aa0eb0df6694e887f697099eb4135fd0
130
py
Python
stuntcat/__main__.py
JTRHACKER/StuntCat
1c581df8971113838219dc98c35207925e6b9228
[ "MIT" ]
null
null
null
stuntcat/__main__.py
JTRHACKER/StuntCat
1c581df8971113838219dc98c35207925e6b9228
[ "MIT" ]
null
null
null
stuntcat/__main__.py
JTRHACKER/StuntCat
1c581df8971113838219dc98c35207925e6b9228
[ "MIT" ]
null
null
null
""" Another Main module. """ if __name__ == "__main__": import stuntcat.cli cli = stuntcat.cli.Cli() cli.cli_main()
13
28
0.615385
if __name__ == "__main__": import stuntcat.cli cli = stuntcat.cli.Cli() cli.cli_main()
true
true
f71107a94481b2d91e4b9b0c2b007c36fc01e46c
7,554
py
Python
examples/ni_vasp_test/calc_bulk_properties.py
eragasa/pypospack
21cdecaf3b05c87acc532d992be2c04d85bfbc22
[ "MIT" ]
4
2018-01-18T19:59:56.000Z
2020-08-25T11:56:52.000Z
examples/ni_vasp_test/calc_bulk_properties.py
eragasa/pypospack
21cdecaf3b05c87acc532d992be2c04d85bfbc22
[ "MIT" ]
1
2018-04-22T23:02:13.000Z
2018-04-22T23:02:13.000Z
examples/ni_vasp_test/calc_bulk_properties.py
eragasa/pypospack
21cdecaf3b05c87acc532d992be2c04d85bfbc22
[ "MIT" ]
1
2019-09-14T07:04:42.000Z
2019-09-14T07:04:42.000Z
import os, shutil, subprocess import ase.build import pypospack.io.vasp as vasp import pypospack.crystal as crystal import pypospack.io.slurm as slurm class VaspCalculateBulkProperties(object): def __init__(self,sim_dir,obj_structure): self.sim_dir = sim_dir self.sim_task_list = ['min0','conv_encu...
34.651376
95
0.53839
import os, shutil, subprocess import ase.build import pypospack.io.vasp as vasp import pypospack.crystal as crystal import pypospack.io.slurm as slurm class VaspCalculateBulkProperties(object): def __init__(self,sim_dir,obj_structure): self.sim_dir = sim_dir self.sim_task_list = ['min0','conv_encu...
false
true
f711087fc49d8d2d1e4f621050569c812ce59cb7
123
py
Python
CursoIntensivoPython/curso-intensivo-python-master/capitulo_09/my_electric_car.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
CursoIntensivoPython/curso-intensivo-python-master/capitulo_09/my_electric_car.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
CursoIntensivoPython/curso-intensivo-python-master/capitulo_09/my_electric_car.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
import electric_car my_tesla = electric_car.ElectricCar('tesla', 'roadster', 2016) print(my_tesla.get_descriptive_name())
24.6
62
0.804878
import electric_car my_tesla = electric_car.ElectricCar('tesla', 'roadster', 2016) print(my_tesla.get_descriptive_name())
true
true
f71108f2dc22cced6e0edca17dae51190cd8f33d
1,105
py
Python
build/lib/biosteam/units/_enzyme_treatment.py
rjhanes/biosteam
ee345ac0b14ce4de9b38ac5a467588d2f854da71
[ "MIT" ]
1
2019-11-17T13:14:19.000Z
2019-11-17T13:14:19.000Z
build/lib/biosteam/units/_enzyme_treatment.py
lilanyu/biosteam
b025bbe138bfd0b016af58583792fb4f3ff9186e
[ "MIT" ]
null
null
null
build/lib/biosteam/units/_enzyme_treatment.py
lilanyu/biosteam
b025bbe138bfd0b016af58583792fb4f3ff9186e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Aug 23 22:07:01 2018 @author: yoelr """ from ._tank import MixTank from ._hx import HXutility class EnzymeTreatment(MixTank): """Create an EnzymeTreatment unit that is cost as a MixTank with a heat exchanger.""" _N_outs = 1 #: Residence time (hr) _tau = ...
26.309524
89
0.567421
from ._tank import MixTank from ._hx import HXutility class EnzymeTreatment(MixTank): _N_outs = 1 _tau = 1 def __init__(self, ID='', ins=None, outs=(), *, T): super().__init__(ID, ins, outs) self.T = T self._heat_exchanger = he = HXutility(None, None, T=T) sel...
true
true
f71108f98a82dd40b3eff767d34aa0acebabcc22
72,622
py
Python
metadata/metadata_service/proxy/atlas_proxy.py
defendercrypt/amundsen
83c728b646020f60cf2270c12e766fe4af8c9948
[ "Apache-2.0" ]
2,072
2020-08-11T20:16:48.000Z
2022-03-31T07:04:05.000Z
metadata/metadata_service/proxy/atlas_proxy.py
defendercrypt/amundsen
83c728b646020f60cf2270c12e766fe4af8c9948
[ "Apache-2.0" ]
795
2020-08-11T15:24:39.000Z
2022-03-31T18:56:13.000Z
metadata/metadata_service/proxy/atlas_proxy.py
defendercrypt/amundsen
83c728b646020f60cf2270c12e766fe4af8c9948
[ "Apache-2.0" ]
671
2020-08-11T20:39:56.000Z
2022-03-31T08:39:07.000Z
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import datetime import logging import re from collections import defaultdict from operator import attrgetter from random import randint from typing import (Any, Dict, Generator, List, Optional, Set, Tuple, Type, ...
42.394629
120
0.592382
import datetime import logging import re from collections import defaultdict from operator import attrgetter from random import randint from typing import (Any, Dict, Generator, List, Optional, Set, Tuple, Type, Union) from amundsen_common.entity.resource_type import ResourceType from amundsen_com...
true
true
f71109e10fcd45e0190f2d7900c8aab146d9538e
1,281
py
Python
run.py
DataScience-MD/ABM
291911e005df8db8b764cd3f9b16b38b735207eb
[ "MIT" ]
null
null
null
run.py
DataScience-MD/ABM
291911e005df8db8b764cd3f9b16b38b735207eb
[ "MIT" ]
null
null
null
run.py
DataScience-MD/ABM
291911e005df8db8b764cd3f9b16b38b735207eb
[ "MIT" ]
6
2020-06-18T21:47:20.000Z
2021-05-05T21:25:34.000Z
# -*- coding: utf-8 -*- """ Created on Wed Mar 25 12:13:19 2020 @author: metalcorebear """ from model import propagation_model import model_params import argparse import os import pandas as pd # Specify arguments def get_path(): parser = argparse.ArgumentParser() parser.add_argument('-o', '--...
25.117647
88
0.697112
from model import propagation_model import model_params import argparse import os import pandas as pd def get_path(): parser = argparse.ArgumentParser() parser.add_argument('-o', '--output', help='Enter the output path.', required=True) args = vars(parser.parse_args()) output_path = str(arg...
true
true
f7110a3a9b918590809e75600d33ed9e69f464fc
2,103
py
Python
vision/google/cloud/vision_v1p2beta1/types.py
deryrahman/google-cloud-python
b55058c4b2328fde32f29bfd8ea04708fcc578e0
[ "Apache-2.0" ]
1
2020-10-25T04:39:41.000Z
2020-10-25T04:39:41.000Z
vision/google/cloud/vision_v1p2beta1/types.py
deryrahman/google-cloud-python
b55058c4b2328fde32f29bfd8ea04708fcc578e0
[ "Apache-2.0" ]
4
2018-11-13T22:15:36.000Z
2018-12-07T18:31:38.000Z
vision/google/cloud/vision_v1p2beta1/types.py
deryrahman/google-cloud-python
b55058c4b2328fde32f29bfd8ea04708fcc578e0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
30.042857
74
0.770804
from __future__ import absolute_import import sys from google.api_core.protobuf_helpers import get_messages from google.api import http_pb2 from google.cloud.vision_v1p2beta1.proto import geometry_pb2 from google.cloud.vision_v1p2beta1.proto import image_annotator_pb2 from google.cloud.vision_v1p2beta1.proto import ...
true
true
f7110a923f1dfdc24b38657b7ed503e0e741a094
351
py
Python
cms_bs3_theme/context_processors.py
Nekmo/djangocms-bs3-theme
1155588414164d6e5d027131e9181856f8a80d5d
[ "MIT" ]
null
null
null
cms_bs3_theme/context_processors.py
Nekmo/djangocms-bs3-theme
1155588414164d6e5d027131e9181856f8a80d5d
[ "MIT" ]
10
2018-07-30T15:09:57.000Z
2022-03-29T21:54:12.000Z
cms_bs3_theme/context_processors.py
Nekmo/djangocms-bs3-theme
1155588414164d6e5d027131e9181856f8a80d5d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # from cms_bs3_theme.models import ThemeSite def settings(request): """ """ from . import conf conf = dict(vars(conf)) # conf.update(ThemeSite.objects.get_theme_conf(request=request, fail=False)) data = request.session.get('cms_bs3_theme_conf', {}) conf.update(data)...
25.071429
80
0.655271
def settings(request): from . import conf conf = dict(vars(conf)) data = request.session.get('cms_bs3_theme_conf', {}) conf.update(data) return {'bs3_conf': conf}
true
true
f7110ac64c8d0c85f46b2cd16dd39c2282f34d40
21,458
py
Python
src/GaIA/pkgs/nmap/nmap-6.40/zenmap/zenmapCore/ScriptMetadata.py
uninth/UNItools
c8b1fbfd5d3753b5b14fa19033e39737dedefc00
[ "BSD-3-Clause" ]
null
null
null
src/GaIA/pkgs/nmap/nmap-6.40/zenmap/zenmapCore/ScriptMetadata.py
uninth/UNItools
c8b1fbfd5d3753b5b14fa19033e39737dedefc00
[ "BSD-3-Clause" ]
null
null
null
src/GaIA/pkgs/nmap/nmap-6.40/zenmap/zenmapCore/ScriptMetadata.py
uninth/UNItools
c8b1fbfd5d3753b5b14fa19033e39737dedefc00
[ "BSD-3-Clause" ]
1
2021-06-08T15:59:26.000Z
2021-06-08T15:59:26.000Z
#!/usr/bin/env python # ***********************IMPORTANT NMAP LICENSE TERMS************************ # * * # * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is * # * also a registered trademark of Insecure.Com LLC. This prog...
44.891213
117
0.537375
# * or nmap-service-probes. * # * * # * o Is designed specifically to execute Covered Software and parse the * # * results (as opposed to typical shell or execution-menu apps, which will * # * exe...
false
true
f7110d3d0d954ace027269e5f9a740eed0bbe459
772
py
Python
guestshell/script1.py
Learning-Connections/netdevops-intro
8550deed2d5c32298c299d9d225f220a482ca00c
[ "CC0-1.0" ]
1
2021-11-13T11:11:07.000Z
2021-11-13T11:11:07.000Z
guestshell/script1.py
Learning-Connections/netdevops-intro
8550deed2d5c32298c299d9d225f220a482ca00c
[ "CC0-1.0" ]
null
null
null
guestshell/script1.py
Learning-Connections/netdevops-intro
8550deed2d5c32298c299d9d225f220a482ca00c
[ "CC0-1.0" ]
null
null
null
import sys import cli intf= sys.argv[1:] intf = ''.join(intf[0]) print "\n\n *** Configuring interface %s with 'configurep' function *** \n\n" %intf cli.configurep(["interface loopback55","ip address 10.55.55.55 255.255.255.0","no shut","end"]) print "\n\n *** Configuring interface %s with 'configure' function ***...
35.090909
95
0.665803
import sys import cli intf= sys.argv[1:] intf = ''.join(intf[0]) print "\n\n *** Configuring interface %s with 'configurep' function *** \n\n" %intf cli.configurep(["interface loopback55","ip address 10.55.55.55 255.255.255.0","no shut","end"]) print "\n\n *** Configuring interface %s with 'configure' function ***...
false
true
f7110d49a2e7fea67a97fd1616c5378611856817
836
py
Python
bin/tellopro.py
hgu-sit22005/telloproject-21800130
9f9e27c64d702982795311fcabfba6a2b6d5d1f2
[ "MIT" ]
null
null
null
bin/tellopro.py
hgu-sit22005/telloproject-21800130
9f9e27c64d702982795311fcabfba6a2b6d5d1f2
[ "MIT" ]
null
null
null
bin/tellopro.py
hgu-sit22005/telloproject-21800130
9f9e27c64d702982795311fcabfba6a2b6d5d1f2
[ "MIT" ]
null
null
null
from tello import Tello import sys from datetime import datetime import time import TelloPro tello = Tello() command_lst = [] command_lst.append(TelloPro.get_instance('takeoff', -1, "")) command_lst.append(TelloPro.get_instance('up', 30, "")) command_lst.append(TelloPro.get_instance('down', 30, "")) command_lst.appen...
34.833333
60
0.752392
from tello import Tello import sys from datetime import datetime import time import TelloPro tello = Tello() command_lst = [] command_lst.append(TelloPro.get_instance('takeoff', -1, "")) command_lst.append(TelloPro.get_instance('up', 30, "")) command_lst.append(TelloPro.get_instance('down', 30, "")) command_lst.appen...
true
true
f7110ed7a1c5c6ec8eedf0cbbdad38d01af37edd
5,451
py
Python
yt/frontends/_skeleton/data_structures.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/_skeleton/data_structures.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
1
2016-04-05T22:30:14.000Z
2016-04-05T22:30:14.000Z
yt/frontends/_skeleton/data_structures.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
1
2020-12-05T05:51:09.000Z
2020-12-05T05:51:09.000Z
""" Skeleton data structures """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #------------------...
37.854167
78
0.593653
from yt.data_objects.grid_patch import \ AMRGridPatch from yt.geometry.grid_geometry_handler import \ GridIndex from yt.data_objects.static_output import \ Dataset from .fields import SkeletonFieldInfo class SkeletonGrid(AMRGridPatch): _id_offset = 0 def __init__(self, id, index, level, start, di...
true
true
f7110fbcf2ee39a52a9cf4baf18e8773ac09b93d
766
py
Python
blog/admin.py
hdzAlexander/MyDjangoBlog
4c8b0a654d8086e4c3b1bc4b8533479f79d7b834
[ "MIT" ]
null
null
null
blog/admin.py
hdzAlexander/MyDjangoBlog
4c8b0a654d8086e4c3b1bc4b8533479f79d7b834
[ "MIT" ]
null
null
null
blog/admin.py
hdzAlexander/MyDjangoBlog
4c8b0a654d8086e4c3b1bc4b8533479f79d7b834
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Article, Category, User from django import forms from pagedown.widgets import AdminPagedownWidget class ArticleForm(forms.ModelForm): text = forms.CharField(widget=AdminPagedownWidget()) class Meta: model = Article fields = '__all__' clas...
25.533333
70
0.741514
from django.contrib import admin from .models import Article, Category, User from django import forms from pagedown.widgets import AdminPagedownWidget class ArticleForm(forms.ModelForm): text = forms.CharField(widget=AdminPagedownWidget()) class Meta: model = Article fields = '__all__' clas...
true
true
f711129c9db6df7c63a7497c63fdb1ce99c0681f
463
bzl
Python
third_party/snappy/workspace.bzl
jeongukjae/nori-clone
e0f8afb842499be4d55f1fc47292fbecdbca2a86
[ "Apache-2.0" ]
38
2022-01-07T05:19:28.000Z
2022-03-27T13:44:53.000Z
third_party/snappy/workspace.bzl
jeongukjae/nori-clone
e0f8afb842499be4d55f1fc47292fbecdbca2a86
[ "Apache-2.0" ]
19
2022-01-11T14:25:03.000Z
2022-02-18T14:24:19.000Z
third_party/snappy/workspace.bzl
jeongukjae/nori-clone
e0f8afb842499be4d55f1fc47292fbecdbca2a86
[ "Apache-2.0" ]
3
2022-02-14T13:51:20.000Z
2022-03-28T06:55:38.000Z
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("//third_party:repo.bzl", "clean_dep") def configure_snappy(): http_archive( name = "com_github_google_snappy", build_file = clean_dep("//third_party/snappy:BUILD.bzl"), sha256 = "e170ce0def2c71d0403f5cda61d6e2743373f...
38.583333
84
0.691145
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("//third_party:repo.bzl", "clean_dep") def configure_snappy(): http_archive( name = "com_github_google_snappy", build_file = clean_dep("//third_party/snappy:BUILD.bzl"), sha256 = "e170ce0def2c71d0403f5cda61d6e2743373f...
true
true
f71113c1dbcd319ed876635e4cd8becd72b4fcca
748
py
Python
allennlp/__main__.py
12seetharaman/allennlp
212035f23c4642b3f3bc850316fe0119f2053ab1
[ "Apache-2.0" ]
1
2021-06-12T22:01:10.000Z
2021-06-12T22:01:10.000Z
allennlp/__main__.py
12seetharaman/allennlp
212035f23c4642b3f3bc850316fe0119f2053ab1
[ "Apache-2.0" ]
null
null
null
allennlp/__main__.py
12seetharaman/allennlp
212035f23c4642b3f3bc850316fe0119f2053ab1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import logging import os import sys if os.environ.get("ALLENNLP_DEBUG"): LEVEL = logging.DEBUG else: level_name = os.environ.get("ALLENNLP_LOG_LEVEL") LEVEL = logging._nameToLevel.get(level_name, logging.INFO) sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.join(__file__, ...
25.793103
95
0.731283
import logging import os import sys if os.environ.get("ALLENNLP_DEBUG"): LEVEL = logging.DEBUG else: level_name = os.environ.get("ALLENNLP_LOG_LEVEL") LEVEL = logging._nameToLevel.get(level_name, logging.INFO) sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.join(__file__, os.pardir)))) logging....
true
true
f71114482557985f31dbb204aaef377b0d7b4168
3,125
py
Python
vds_vault_oauth/utilities/Token.py
veeva/vds-vault-oauth-tool
91e424a673e99261d538b27a938f7f56ac154475
[ "Apache-2.0" ]
2
2019-12-19T02:10:39.000Z
2020-06-03T15:28:54.000Z
vds_vault_oauth/utilities/Token.py
veeva/vds-vault-oauth-tool
91e424a673e99261d538b27a938f7f56ac154475
[ "Apache-2.0" ]
null
null
null
vds_vault_oauth/utilities/Token.py
veeva/vds-vault-oauth-tool
91e424a673e99261d538b27a938f7f56ac154475
[ "Apache-2.0" ]
1
2022-02-17T08:09:27.000Z
2022-02-17T08:09:27.000Z
from datetime import datetime from jose import jwt from jose.utils import base64url_decode from jose.exceptions import JWTError from vds_vault_oauth.utilities import OAuthContainer # Token that stores the necessary tokens and provides the ability to decode & log them. class Token(): def __init__(self, toke...
49.603175
135
0.5552
from datetime import datetime from jose import jwt from jose.utils import base64url_decode from jose.exceptions import JWTError from vds_vault_oauth.utilities import OAuthContainer class Token(): def __init__(self, token_value, token_type, logger): self.token_value = token_value self.token...
true
true
f7111500e4a819c6afa8f433794c1e6549e9bd38
6,317
py
Python
lwb_heartbeat/child/views.py
jayadams011/lwb_heartbeat
6d9b594f317107cd26932485dd8d063e226970fa
[ "MIT" ]
1
2021-03-18T20:55:04.000Z
2021-03-18T20:55:04.000Z
lwb_heartbeat/child/views.py
jayadams011/lwb_heartbeat
6d9b594f317107cd26932485dd8d063e226970fa
[ "MIT" ]
17
2018-05-23T15:14:17.000Z
2018-05-25T23:39:38.000Z
lwb_heartbeat/child/views.py
jayadams011/lwb_heartbeat
6d9b594f317107cd26932485dd8d063e226970fa
[ "MIT" ]
2
2018-06-12T20:50:38.000Z
2021-03-18T20:55:21.000Z
from django.views.generic import (TemplateView, ListView, DetailView, CreateView, UpdateView) from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.conf import settings from .forms import ChildEditForm, ChildAddForm from .models impo...
32.901042
84
0.609467
from django.views.generic import (TemplateView, ListView, DetailView, CreateView, UpdateView) from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.conf import settings from .forms import ChildEditForm, ChildAddForm from .models impo...
true
true
f71115104cdacec380fdd3d6df84abcdf9c0321a
552
py
Python
MatchApp/migrations/0062_auto_20210511_2322.py
elizza19/django_local_library
f2dc053e44684b7a966d8bc0ff364f5251449f5b
[ "Apache-2.0" ]
null
null
null
MatchApp/migrations/0062_auto_20210511_2322.py
elizza19/django_local_library
f2dc053e44684b7a966d8bc0ff364f5251449f5b
[ "Apache-2.0" ]
null
null
null
MatchApp/migrations/0062_auto_20210511_2322.py
elizza19/django_local_library
f2dc053e44684b7a966d8bc0ff364f5251449f5b
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.7 on 2021-05-11 21:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('MatchApp', '0061_apadrinamiento'), ] operations = [ migrations.AlterField( model_name='apadrinamiento', name='tipo_i...
29.052632
205
0.632246
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('MatchApp', '0061_apadrinamiento'), ] operations = [ migrations.AlterField( model_name='apadrinamiento', name='tipo_ingreso', field=models.CharField(blan...
true
true
f71115497ba704cbabc6220d07f71e798fe5819d
589
py
Python
src/models/conv_block.py
plutasnyy/mgr
4ca5686ba7d62d0e2b8c172f17eb90bd822fdc21
[ "MIT" ]
3
2021-10-04T17:13:14.000Z
2021-10-17T21:08:26.000Z
src/models/conv_block.py
plutasnyy/mgr
4ca5686ba7d62d0e2b8c172f17eb90bd822fdc21
[ "MIT" ]
null
null
null
src/models/conv_block.py
plutasnyy/mgr
4ca5686ba7d62d0e2b8c172f17eb90bd822fdc21
[ "MIT" ]
null
null
null
from torch import nn class ConvolutionalBlock(nn.Module): def __init__(self, in_channels=128, out_channels=256, kernel_size=3, padding=1, stride=1, padding_mode='zeros'): super().__init__() self.conv1 = nn.Conv1d(in_channels, out_channels, kernel_size=kernel_size, padding=padding, stride=stride, ...
32.722222
116
0.633277
from torch import nn class ConvolutionalBlock(nn.Module): def __init__(self, in_channels=128, out_channels=256, kernel_size=3, padding=1, stride=1, padding_mode='zeros'): super().__init__() self.conv1 = nn.Conv1d(in_channels, out_channels, kernel_size=kernel_size, padding=padding, stride=stride, ...
true
true
f71115f7872ed81af5335fcea362c1a33abafa50
4,675
py
Python
LinReg/utilsLinReg.py
peterchanw/utils
26133c52ba5b0407d38371100b7b56fe2cf68149
[ "MIT" ]
null
null
null
LinReg/utilsLinReg.py
peterchanw/utils
26133c52ba5b0407d38371100b7b56fe2cf68149
[ "MIT" ]
null
null
null
LinReg/utilsLinReg.py
peterchanw/utils
26133c52ba5b0407d38371100b7b56fe2cf68149
[ "MIT" ]
null
null
null
import sklearn.metrics as metrics import pandas as pd import numpy as np def repair_chrdata(df, tCol): ### Parameters: # df: input dataframe # tCol: targeted column label with NaN ### Output # df: repaired dataframe # word: string of related dataframe column with some records have NaN in target...
39.618644
103
0.678503
import sklearn.metrics as metrics import pandas as pd import numpy as np def repair_chrdata(df, tCol): dFrm = df[df[tCol].isnull()] count = len(dFrm) tword = df[tCol].unique().tolist() wordLT = df[tCol].value_counts(dropna=False) word = '' wordCnt = 0 ...
true
true
f7111649d25110179d27bb7eae88a96fbb847598
6,173
py
Python
autotest/t024_test.py
hansonmcoombs/flopy
49398983c36d381992621d5bf698ea7f78fc0014
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
autotest/t024_test.py
hansonmcoombs/flopy
49398983c36d381992621d5bf698ea7f78fc0014
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
autotest/t024_test.py
hansonmcoombs/flopy
49398983c36d381992621d5bf698ea7f78fc0014
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
import os import numpy as np import pytest from ci_framework import FlopyTestSetup, base_test_dir import flopy base_dir = base_test_dir(__file__, rel_path="temp", verbose=True) ex_pth = os.path.join("..", "examples", "data", "mf2005_test") testmodels = [ os.path.join(ex_pth, f) for f in os.listdir(ex_pth) if f....
30.408867
86
0.61526
import os import numpy as np import pytest from ci_framework import FlopyTestSetup, base_test_dir import flopy base_dir = base_test_dir(__file__, rel_path="temp", verbose=True) ex_pth = os.path.join("..", "examples", "data", "mf2005_test") testmodels = [ os.path.join(ex_pth, f) for f in os.listdir(ex_pth) if f....
true
true
f71116abd987c23bd57eb804a843ee09589e01bb
1,039
py
Python
mkt/receipts/forms.py
muffinresearch/zamboni
045a6f07c775b99672af6d9857d295ed02fe5dd9
[ "BSD-3-Clause" ]
null
null
null
mkt/receipts/forms.py
muffinresearch/zamboni
045a6f07c775b99672af6d9857d295ed02fe5dd9
[ "BSD-3-Clause" ]
null
null
null
mkt/receipts/forms.py
muffinresearch/zamboni
045a6f07c775b99672af6d9857d295ed02fe5dd9
[ "BSD-3-Clause" ]
null
null
null
from urlparse import urlparse from django import forms from tower import ugettext_lazy as _lazy import amo from mkt.api.forms import SluggableModelChoiceField from mkt.webapps.models import Addon class ReceiptForm(forms.Form): app = SluggableModelChoiceField( queryset=Addon.objects.filter(type=amo.ADDO...
29.685714
69
0.633301
from urlparse import urlparse from django import forms from tower import ugettext_lazy as _lazy import amo from mkt.api.forms import SluggableModelChoiceField from mkt.webapps.models import Addon class ReceiptForm(forms.Form): app = SluggableModelChoiceField( queryset=Addon.objects.filter(type=amo.ADDO...
true
true
f71116b2ae769985945c817a41063eed0536271e
104
py
Python
workflow/__init__.py
upsila/Upflow
ab6238d48911685da06ff91bce9041e37fb18b3f
[ "MIT" ]
null
null
null
workflow/__init__.py
upsila/Upflow
ab6238d48911685da06ff91bce9041e37fb18b3f
[ "MIT" ]
null
null
null
workflow/__init__.py
upsila/Upflow
ab6238d48911685da06ff91bce9041e37fb18b3f
[ "MIT" ]
null
null
null
from entities.workflow import Workflow class Main(Workflow): def _run(self, job): return {}
20.8
38
0.682692
from entities.workflow import Workflow class Main(Workflow): def _run(self, job): return {}
true
true
f71117acd75dc31b4995577b36bfbfc98f686b98
3,287
py
Python
extra/include_boost_script.py
aashaka/QuantLib-1.9
25e321c516d6e11603cdd01e3750e20461f5adf3
[ "BSD-3-Clause" ]
2
2020-06-23T20:34:24.000Z
2020-06-23T20:34:32.000Z
extra/include_boost_script.py
aashaka/QuantLib-1.9
25e321c516d6e11603cdd01e3750e20461f5adf3
[ "BSD-3-Clause" ]
null
null
null
extra/include_boost_script.py
aashaka/QuantLib-1.9
25e321c516d6e11603cdd01e3750e20461f5adf3
[ "BSD-3-Clause" ]
null
null
null
import operator s1 = "#include <boost/" lines1 = {} with open('./boost_includes_1') as f: lines=f.readlines() for line in lines: if s1 in line: line1 = line[line.find('#'):line.find('\n')] if lines1.has_key(line1): lines1[line1] = lines1[line1] + 1 else: lines1[line1]=1; sorted_x = sorted(lines1....
43.25
214
0.636142
import operator s1 = "#include <boost/" lines1 = {} with open('./boost_includes_1') as f: lines=f.readlines() for line in lines: if s1 in line: line1 = line[line.find('#'):line.find('\n')] if lines1.has_key(line1): lines1[line1] = lines1[line1] + 1 else: lines1[line1]=1; sorted_x = sorted(lines1....
false
true
f7111a0e4b0ff2edf2962809ef97e273e18bb374
625
py
Python
test/example_using_relations.py
renzon/ndb_relations
90ac165aeb2a01ec89e59c1db6da9d934ca4d6ee
[ "MIT" ]
4
2016-05-27T20:01:36.000Z
2016-07-03T01:39:17.000Z
test/example_using_relations.py
renzon/ndb_relations
90ac165aeb2a01ec89e59c1db6da9d934ca4d6ee
[ "MIT" ]
7
2016-05-11T01:47:29.000Z
2016-06-11T03:32:25.000Z
test/example_using_relations.py
renzon/ndb_relations
90ac165aeb2a01ec89e59c1db6da9d934ca4d6ee
[ "MIT" ]
1
2016-09-08T19:48:06.000Z
2016-09-08T19:48:06.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from google.appengine.ext import ndb from ndb_relations.relations import OneToMany class User2(ndb.Model): name = ndb.StringProperty() class Order2(ndb.Model): pass class OrderItem2(ndb.Model): name = ndb.StringProperty...
18.939394
56
0.7264
from __future__ import absolute_import, unicode_literals from google.appengine.ext import ndb from ndb_relations.relations import OneToMany class User2(ndb.Model): name = ndb.StringProperty() class Order2(ndb.Model): pass class OrderItem2(ndb.Model): name = ndb.StringProperty() price = ndb.Float...
true
true
f7111b18c712225e31d8dae10ffb3f63df40655a
3,524
py
Python
deepvariant/python/variant_calling_wrap_test.py
tedyun/deepvariant
aba55537eec832e6cea678349422124ef50680f4
[ "BSD-3-Clause" ]
1
2018-12-07T19:48:57.000Z
2018-12-07T19:48:57.000Z
deepvariant/python/variant_calling_wrap_test.py
hcxiong/deepvariant
aba55537eec832e6cea678349422124ef50680f4
[ "BSD-3-Clause" ]
null
null
null
deepvariant/python/variant_calling_wrap_test.py
hcxiong/deepvariant
aba55537eec832e6cea678349422124ef50680f4
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2017 Google Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
37.489362
78
0.755675
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import absltest from third_party.nucleus.io import fasta from third_party.nucleus.io import sam from third_party.nucleus.util import ranges from deepvariant import testdata from deepvarian...
true
true
f7111b40a996bfc4e37a080db8cb29fe6e7081e2
4,902
py
Python
bot.py
Pdiskbot/doodurl
31cf2bef4d6e5093254e374b16029976a6c4d1ff
[ "MIT" ]
null
null
null
bot.py
Pdiskbot/doodurl
31cf2bef4d6e5093254e374b16029976a6c4d1ff
[ "MIT" ]
null
null
null
bot.py
Pdiskbot/doodurl
31cf2bef4d6e5093254e374b16029976a6c4d1ff
[ "MIT" ]
null
null
null
from os import environ import os import time from urllib.parse import urlparse import aiohttp from pyshorteners import Shortener from bs4 import BeautifulSoup import requests import re from pyrogram import Client, filters API_ID = environ.get('API_ID') API_HASH = environ.get('API_HASH') BOT_TOKEN = environ.get('BOT_TO...
35.014286
231
0.648307
from os import environ import os import time from urllib.parse import urlparse import aiohttp from pyshorteners import Shortener from bs4 import BeautifulSoup import requests import re from pyrogram import Client, filters API_ID = environ.get('API_ID') API_HASH = environ.get('API_HASH') BOT_TOKEN = environ.get('BOT_TO...
true
true
f7111b54edc96721170c65660842877a6eab505a
3,373
py
Python
discovery-provider/src/models/__init__.py
lucylow/audius-protocol
5ef93462f9dc7df01a15877c02ca79b9a7d99236
[ "Apache-2.0" ]
1
2022-03-27T21:40:36.000Z
2022-03-27T21:40:36.000Z
discovery-provider/src/models/__init__.py
abelxmendoza/audius-protocol
33757e1b722a4be97960086b98b26ae3a75ee56b
[ "Apache-2.0" ]
null
null
null
discovery-provider/src/models/__init__.py
abelxmendoza/audius-protocol
33757e1b722a4be97960086b98b26ae3a75ee56b
[ "Apache-2.0" ]
null
null
null
from .aggregate_interval_play import AggregateIntervalPlay from .milestone import Milestone from .models import ( AggregateDailyAppNameMetrics, AggregateDailyTotalUsersMetrics, AggregateDailyUniqueUsersMetrics, AggregateMonthlyAppNameMetrics, AggregateMonthlyPlays, AggregateMonthlyTotalUsersMetr...
24.266187
59
0.721613
from .aggregate_interval_play import AggregateIntervalPlay from .milestone import Milestone from .models import ( AggregateDailyAppNameMetrics, AggregateDailyTotalUsersMetrics, AggregateDailyUniqueUsersMetrics, AggregateMonthlyAppNameMetrics, AggregateMonthlyPlays, AggregateMonthlyTotalUsersMetr...
true
true
f7111b7a88487687de3ed2da70a17151db0b1ae9
824
py
Python
setup.py
patilsangram/filesystem
e5e5dc6be07ea656649f11484b072c43e3249163
[ "MIT" ]
null
null
null
setup.py
patilsangram/filesystem
e5e5dc6be07ea656649f11484b072c43e3249163
[ "MIT" ]
null
null
null
setup.py
patilsangram/filesystem
e5e5dc6be07ea656649f11484b072c43e3249163
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from pip.req import parse_requirements import re, ast # get version from __version__ variable in file_management/__init__.py _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('file_management/__init__.py', 'rb') as f: version = str(as...
30.518519
70
0.746359
from setuptools import setup, find_packages from pip.req import parse_requirements import re, ast _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('file_management/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) requirements =...
true
true
f7111bc8bd0bd3222f4299cc296a1b52711c7e58
632
py
Python
feder/letters/migrations/0010_auto_20180112_1721.py
dzemeuksis/feder
32ef7793af6256d4ecada61505c7baf334b34419
[ "MIT" ]
16
2015-08-11T17:20:26.000Z
2022-02-11T20:15:41.000Z
feder/letters/migrations/0010_auto_20180112_1721.py
dzemeuksis/feder
32ef7793af6256d4ecada61505c7baf334b34419
[ "MIT" ]
534
2015-08-04T00:10:54.000Z
2022-03-17T10:44:47.000Z
feder/letters/migrations/0010_auto_20180112_1721.py
dzemeuksis/feder
32ef7793af6256d4ecada61505c7baf334b34419
[ "MIT" ]
10
2017-08-30T13:34:32.000Z
2022-02-18T13:00:35.000Z
# Generated by Django 1.11.7 on 2018-01-12 17:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [("letters", "0009_auto_20170826_0742")] operations = [ migrations.AlterModelOptions( name="letter", options={ "ordering": ...
26.333333
65
0.509494
from django.db import migrations class Migration(migrations.Migration): dependencies = [("letters", "0009_auto_20170826_0742")] operations = [ migrations.AlterModelOptions( name="letter", options={ "ordering": ["created"], "permissions": ( ...
true
true
f7111c244cf17ed30e14fe5cad1f582a6877bbef
3,512
py
Python
ranger/commands.py
mariofrescas/configfiles
694623d9590ecc939a6ebeed8dd7806ed0dc248e
[ "MIT" ]
null
null
null
ranger/commands.py
mariofrescas/configfiles
694623d9590ecc939a6ebeed8dd7806ed0dc248e
[ "MIT" ]
null
null
null
ranger/commands.py
mariofrescas/configfiles
694623d9590ecc939a6ebeed8dd7806ed0dc248e
[ "MIT" ]
null
null
null
from ranger.api.commands import Command class paste_as_root(Command): def execute(self): if self.fm.do_cut: self.fm.execute_console('shell sudo mv %c .') else: self.fm.execute_console('shell sudo cp -r %c .') class fzf_select(Command): """ :fzf_select Find a file using fzf. With a prefix ...
33.132075
118
0.577733
from ranger.api.commands import Command class paste_as_root(Command): def execute(self): if self.fm.do_cut: self.fm.execute_console('shell sudo mv %c .') else: self.fm.execute_console('shell sudo cp -r %c .') class fzf_select(Command): def execute(self): import subprocess import os.path...
true
true
f7111c4b339a8c9a31964af5560fd7bc01cde698
18,586
py
Python
CallHome/_version.py
yinruiqing/pyannote-db-callhome
81db9c8cc611322d10e9bddb3af0d72707124ec8
[ "MIT" ]
3
2019-04-15T12:27:57.000Z
2021-06-08T20:30:55.000Z
CallHome/_version.py
yinruiqing/pyannote-db-callhome
81db9c8cc611322d10e9bddb3af0d72707124ec8
[ "MIT" ]
null
null
null
CallHome/_version.py
yinruiqing/pyannote-db-callhome
81db9c8cc611322d10e9bddb3af0d72707124ec8
[ "MIT" ]
1
2019-11-26T01:24:10.000Z
2019-11-26T01:24:10.000Z
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.537285
79
0.585494
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class VersioneerConfig: ...
true
true
f7111d7380c0da12701099921e08841c81cb9296
1,795
py
Python
test/functional/feature_filelock.py
caffeine239/bitcoin
94e5f13e62041bc299514b38a04ba1686002143e
[ "MIT" ]
null
null
null
test/functional/feature_filelock.py
caffeine239/bitcoin
94e5f13e62041bc299514b38a04ba1686002143e
[ "MIT" ]
null
null
null
test/functional/feature_filelock.py
caffeine239/bitcoin
94e5f13e62041bc299514b38a04ba1686002143e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Check that it's not possible to start a second muskcoind instance using the same datadir or wallet.""" impor...
48.513514
177
0.720891
import os from test_framework.test_framework import BitcoinTestFramework from test_framework.test_node import ErrorMatch class FilelockTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 def setup_network(self): self.add_nodes(self.n...
true
true
f7111f05c84ed4cfc811daaea97b7ff27f4879ce
6,649
py
Python
infra/config.py
szyszy/dist_test
a992ed1c007e9ec4850643e707bc803fbf5a084b
[ "Apache-2.0" ]
28
2016-05-03T21:16:48.000Z
2021-06-11T17:09:58.000Z
infra/config.py
szyszy/dist_test
a992ed1c007e9ec4850643e707bc803fbf5a084b
[ "Apache-2.0" ]
45
2016-05-03T22:16:09.000Z
2019-04-23T20:53:07.000Z
infra/config.py
szyszy/dist_test
a992ed1c007e9ec4850643e707bc803fbf5a084b
[ "Apache-2.0" ]
25
2016-04-20T00:02:08.000Z
2020-11-24T18:05:45.000Z
from ConfigParser import SafeConfigParser import errno import logging import os import urllib2 class Config(object): # S3 settings AWS_ACCESS_KEY_CONFIG = ('aws', 'access_key', 'AWS_ACCESS_KEY') AWS_SECRET_KEY_CONFIG = ('aws', 'secret_key', 'AWS_SECRET_KEY') AWS_TEST_RESULT_BUCKET_CONFIG = ('aws', 'test_result...
41.298137
98
0.719958
from ConfigParser import SafeConfigParser import errno import logging import os import urllib2 class Config(object): AWS_ACCESS_KEY_CONFIG = ('aws', 'access_key', 'AWS_ACCESS_KEY') AWS_SECRET_KEY_CONFIG = ('aws', 'secret_key', 'AWS_SECRET_KEY') AWS_TEST_RESULT_BUCKET_CONFIG = ('aws', 'test_result_bucket', 'TES...
true
true
f7111ff9d442298eb7e9b8dc90218d35c91d6141
2,107
py
Python
jodconverter-web/src/main/office/program/python-core-2.7.6/lib/ctypes/macholib/dylib.py
Congliang0229/kkFileView
1b5793c10aaa047f78c6be4abc41d807e71f71ab
[ "Apache-2.0" ]
112
2015-01-15T21:36:02.000Z
2021-12-28T19:19:01.000Z
jodconverter-web/src/main/office/program/python-core-2.7.6/lib/ctypes/macholib/dylib.py
Congliang0229/kkFileView
1b5793c10aaa047f78c6be4abc41d807e71f71ab
[ "Apache-2.0" ]
6
2017-03-14T00:42:42.000Z
2022-01-06T23:09:18.000Z
jodconverter-web/src/main/office/program/python-core-2.7.6/lib/ctypes/macholib/dylib.py
Congliang0229/kkFileView
1b5793c10aaa047f78c6be4abc41d807e71f71ab
[ "Apache-2.0" ]
41
2017-03-18T14:11:58.000Z
2021-04-14T05:06:09.000Z
###################################################################### # This file should be kept compatible with Python 2.3, see PEP 291. # ###################################################################### """ Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.comp...
31.447761
97
0.542477
import re __all__ = ['dylib_info'] DYLIB_RE = re.compile(r"""(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) """) def dylib_info(filename): is_dylib = DYLIB_RE.match(filename) if not is_dylib: ...
true
true
f711200559a829dfeddb00585fc885fd87a0e944
31,403
py
Python
nni/retiarii/nn/pytorch/api.py
ggzhang0071/nni
f4145e62d89c3ca383cf00f2de5dfd2d1025ad92
[ "MIT" ]
1
2022-03-06T12:57:08.000Z
2022-03-06T12:57:08.000Z
nni/retiarii/nn/pytorch/api.py
ggzhang0071/nni
f4145e62d89c3ca383cf00f2de5dfd2d1025ad92
[ "MIT" ]
null
null
null
nni/retiarii/nn/pytorch/api.py
ggzhang0071/nni
f4145e62d89c3ca383cf00f2de5dfd2d1025ad92
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import math import operator import warnings from typing import Any, List, Union, Dict, Optional, Callable, Iterable, NoReturn, TypeVar import torch import torch.nn as nn from nni.common.serializer import Translatable from nni.retiarii.serialize...
39.107098
134
0.613158
import math import operator import warnings from typing import Any, List, Union, Dict, Optional, Callable, Iterable, NoReturn, TypeVar import torch import torch.nn as nn from nni.common.serializer import Translatable from nni.retiarii.serializer import basic_unit from nni.retiarii.utils import STATE_DICT_PY_MAPPING_...
true
true
f711203454b2f2654e8b0af1e775e99c49b81bcf
3,176
py
Python
examples/tutorial/tutorial/spiders/rotate_useragent.py
cjymz886/crawl_examples
f8c7d31f60a4df512f83a397491b4ec498a23289
[ "MIT" ]
3
2018-02-11T16:58:48.000Z
2019-11-28T08:33:54.000Z
examples/tutorial/tutorial/spiders/rotate_useragent.py
cjymz886/crawl_examples
f8c7d31f60a4df512f83a397491b4ec498a23289
[ "MIT" ]
null
null
null
examples/tutorial/tutorial/spiders/rotate_useragent.py
cjymz886/crawl_examples
f8c7d31f60a4df512f83a397491b4ec498a23289
[ "MIT" ]
null
null
null
# -*-coding:utf-8-*- import logging """避免被ban策略之一:使用useragent池。 使用注意:需在settings.py中进行相应的设置。 """ import random from scrapy.downloadermiddlewares.useragent import UserAgentMiddleware class RotateUserAgentMiddleware(UserAgentMiddleware): def __init__(self, user_agent=''): self.user_agent = user_agent ...
47.402985
108
0.627834
import logging import random from scrapy.downloadermiddlewares.useragent import UserAgentMiddleware class RotateUserAgentMiddleware(UserAgentMiddleware): def __init__(self, user_agent=''): self.user_agent = user_agent def process_request(self, request, spider): ua = random.choice(self.user...
true
true
f7112440105b7f7dbd74bf0e92d94f8666cfac68
5,020
py
Python
third_party/blink/tools/blinkpy/style/checkers/jsonchecker_unittest.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/blink/tools/blinkpy/style/checkers/jsonchecker_unittest.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/blink/tools/blinkpy/style/checkers/jsonchecker_unittest.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright (C) 2010 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
44.424779
133
0.684462
import unittest from blinkpy.style.checkers import jsonchecker class MockErrorHandler(object): def __init__(self, handle_style_error): self.turned_off_filtering = False self._handle_style_error = handle_style_error def turn_off_line_filtering(self): self.turned_off_filtering = Tru...
true
true
f711250e17869c60f5d238e81eb16be393f3d0db
8,373
py
Python
oc_config_validate/oc_config_validate/__main__.py
wenovus/gnxi
6b0be2d26413d2467ed2ab803df61450035431b1
[ "Apache-2.0" ]
1
2019-08-06T09:25:43.000Z
2019-08-06T09:25:43.000Z
oc_config_validate/oc_config_validate/__main__.py
jihaix/gnxi
a4392bf8ac8d207c8368c69387ecc4efb29c22cb
[ "Apache-2.0" ]
null
null
null
oc_config_validate/oc_config_validate/__main__.py
jihaix/gnxi
a4392bf8ac8d207c8368c69387ecc4efb29c22cb
[ "Apache-2.0" ]
null
null
null
"""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 writing, sof...
30.67033
79
0.601696
import argparse import logging import os import sys import time from typing import Any, Dict import yaml from oc_config_validate import (context, formatter, runner, schema, target, testbase) __version__ = "2.0.0" LOGGING_FORMAT = "%(levelname)s(%(filename)s:%(lineno)d):%(message)s" ...
true
true
f7112541ccf3fa57a52b0d8b4db34cff4b6eeffa
3,607
py
Python
samples/basic/crud/models/openconfig/openconfig-mpls/nc-create-oc-mpls-54-ydk.py
maccioni/ydk-py-samples
d1758694bef97327c5477e65649326c7595ce499
[ "Apache-2.0" ]
1
2021-07-08T14:02:12.000Z
2021-07-08T14:02:12.000Z
samples/basic/crud/models/openconfig/openconfig-mpls/nc-create-oc-mpls-54-ydk.py
maccioni/ydk-py-samples
d1758694bef97327c5477e65649326c7595ce499
[ "Apache-2.0" ]
null
null
null
samples/basic/crud/models/openconfig/openconfig-mpls/nc-create-oc-mpls-54-ydk.py
maccioni/ydk-py-samples
d1758694bef97327c5477e65649326c7595ce499
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2016 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
35.712871
86
0.689215
from argparse import ArgumentParser from urlparse import urlparse from ydk.services import CRUDService from ydk.providers import NetconfServiceProvider from ydk.models.openconfig import openconfig_mpls \ as oc_mpls from ydk.models.openconfig import openconfig_mpls_types as oc_mpls_types import logging def conf...
true
true
f71126725faac245baf3d0b86e42241cb62b491f
3,155
py
Python
startupmoney/startupmoney/settings.py
RanjithaRao22/TestWebApp
581edcec8fb39001917d9132b7f371aabc506e51
[ "MIT" ]
1
2020-04-13T06:33:15.000Z
2020-04-13T06:33:15.000Z
startupmoney/startupmoney/settings.py
vatsamail/TestWebApp
581edcec8fb39001917d9132b7f371aabc506e51
[ "MIT" ]
7
2020-04-12T23:26:42.000Z
2022-02-10T12:18:08.000Z
startupmoney/startupmoney/settings.py
vatsamail/TestWebApp
581edcec8fb39001917d9132b7f371aabc506e51
[ "MIT" ]
null
null
null
""" Django settings for startupmoney project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os...
25.650407
91
0.696672
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '7_bcd_om-v=oud6403zs5#snm5(&_&d(l38#&qc2=(xb77g)^j' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f711269d3ecd4d7485d60302c52b1eb2a9b6db66
6,178
py
Python
cfgov/data_research/tests/test_forms.py
thephillipsequation/cfgov-refresh
1412dd4215fce5597c0ec704b0d480cf00aeb82c
[ "CC0-1.0" ]
37
2020-08-18T19:52:39.000Z
2022-03-23T08:08:41.000Z
cfgov/data_research/tests/test_forms.py
thephillipsequation/cfgov-refresh
1412dd4215fce5597c0ec704b0d480cf00aeb82c
[ "CC0-1.0" ]
338
2020-08-14T20:46:36.000Z
2022-03-31T20:49:32.000Z
cfgov/data_research/tests/test_forms.py
raft-tech/cfgov-refresh
7c63c31fd6bb95ed4f7d368f1e1252175f0c71ca
[ "CC0-1.0" ]
14
2020-10-21T15:27:03.000Z
2022-03-17T03:16:36.000Z
from django.test import TestCase from core.govdelivery import MockGovDelivery from data_research.forms import ConferenceRegistrationForm from data_research.models import ConferenceRegistration class ConferenceRegistrationFormTests(TestCase): capacity = 100 govdelivery_code = 'TEST-CODE' govdelivery_quest...
34.132597
76
0.621075
from django.test import TestCase from core.govdelivery import MockGovDelivery from data_research.forms import ConferenceRegistrationForm from data_research.models import ConferenceRegistration class ConferenceRegistrationFormTests(TestCase): capacity = 100 govdelivery_code = 'TEST-CODE' govdelivery_quest...
true
true
f711279795ac54742a452b547b1f96fda8fcd72e
1,218
py
Python
venv/lib/python3.6/site-packages/sqlalchemy/dialects/mysql/__init__.py
tchengatcincoai/cryptocoin-prices-compare
f295fecc7213a877bf717af0eb98414e9137b554
[ "MIT" ]
78
2017-08-19T03:46:13.000Z
2020-02-19T04:29:45.000Z
desktop/core/ext-py/SQLAlchemy-1.2.0b3/lib/sqlalchemy/dialects/mysql/__init__.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
5
2017-08-21T16:33:08.000Z
2018-06-21T18:37:18.000Z
desktop/core/ext-py/SQLAlchemy-1.2.0b3/lib/sqlalchemy/dialects/mysql/__init__.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
43
2018-02-05T23:23:46.000Z
2021-07-28T22:51:42.000Z
# mysql/__init__.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from . import base, mysqldb, oursql, \ pyodbc, zxjdbc, mysqlconnector, pymysql...
35.823529
78
0.668309
from . import base, mysqldb, oursql, \ pyodbc, zxjdbc, mysqlconnector, pymysql,\ gaerdbms, cymysql base.dialect = mysqldb.dialect from .base import \ BIGINT, BINARY, BIT, BLOB, BOOLEAN, CHAR, DATE, DATETIME, \ DECIMAL, DOUBLE, ENUM, DECIMAL,\ FLOAT, INTEGER, INTEGER, JSON, LONGBLOB, LONGTEXT, MED...
true
true
f711280a5c785c340b241002494b4c1fe5a91d99
417
py
Python
ex9.py
cohadar/learn-python-the-hard-way
10d88fe59a8abc5303661cfe91c6db9fa71bdd56
[ "MIT" ]
null
null
null
ex9.py
cohadar/learn-python-the-hard-way
10d88fe59a8abc5303661cfe91c6db9fa71bdd56
[ "MIT" ]
null
null
null
ex9.py
cohadar/learn-python-the-hard-way
10d88fe59a8abc5303661cfe91c6db9fa71bdd56
[ "MIT" ]
null
null
null
# Southrn trees bare strage fruit days = "Mon Tue Wed Thu Fri Sat Sun" months = 'Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec' print "Here are the days:", days print 'Here are the months:', months print """ There's something going on here. With the three double-quotes. We'll be able to type as much as ...
18.954545
69
0.709832
days = "Mon Tue Wed Thu Fri Sat Sun" months = 'Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec' print "Here are the days:", days print 'Here are the months:', months print """ There's something going on here. With the three double-quotes. We'll be able to type as much as we like ass. Even 4 lines if we wa...
false
true
f7112864b35d42a4077973fcef95554472aa1dad
2,769
py
Python
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ModifyFlowProjectClusterSettingRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ModifyFlowProjectClusterSettingRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ModifyFlowProjectClusterSettingRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
# 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 ...
35.050633
90
0.737811
from aliyunsdkcore.request import RpcRequest from aliyunsdkemr.endpoint import endpoint_data class ModifyFlowProjectClusterSettingRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Emr', '2016-04-08', 'ModifyFlowProjectClusterSetting','emr') if hasattr(self, "endpoint_map"): setattr(...
true
true
f71128db7d81033360ad6c8a01962fa528633b2b
822
py
Python
Chapter 10/Chap10_Example10.38.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
Chapter 10/Chap10_Example10.38.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
Chapter 10/Chap10_Example10.38.py
Anancha/Programming-Techniques-using-Python
e80c329d2a27383909d358741a5cab03cb22fd8b
[ "MIT" ]
null
null
null
from threading import Thread, Event from time import sleep def func1(): sleep(2) # Initially sleep for 2 secs myeventobj.set() # E2 print("func1 sleeping for 3 secs....") sleep(3) # E3 myeventobj.clear() # E4 def func2(): print("Initially myeventobj is: ", myeventobj.isSet()) # E1 m...
25.6875
95
0.653285
from threading import Thread, Event from time import sleep def func1(): sleep(2) myeventobj.set() print("func1 sleeping for 3 secs....") sleep(3) myeventobj.clear() def func2(): print("Initially myeventobj is: ", myeventobj.isSet()) myeventobj.wait() if myeventobj.isSet(): ...
true
true
f71129c57862d43432ef1e52df9e6edb6a786838
2,181
py
Python
package/spack-r-phantompeakqualtools/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
1
2018-07-17T07:45:09.000Z
2018-07-17T07:45:09.000Z
package/spack-r-phantompeakqualtools/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
package/spack-r-phantompeakqualtools/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
43.62
94
0.674461
from spack import * class RPhantompeakqualtools(RPackage): homepage = "https://github.com/kundajelab/phantompeakqualtools" url = "https://github.com/kundajelab/phantompeakqualtools/raw/master/spp_1.14.tar.gz" version('1.14', '4de207d570999170c1bf45bcba8c6d2d') depends_on('boost@1.41.0:') d...
true
true
f7112b1cfcd98e70b9d0057ad3b84f430dded29a
868
py
Python
tests/test_tasks/test_supervised_task.py
hp2500/openml-python
62cc534cd18e6e011a88a83816fec95a90399a9b
[ "BSD-3-Clause" ]
1
2019-09-02T00:28:26.000Z
2019-09-02T00:28:26.000Z
tests/test_tasks/test_supervised_task.py
hp2500/openml-python
62cc534cd18e6e011a88a83816fec95a90399a9b
[ "BSD-3-Clause" ]
8
2019-05-23T08:03:24.000Z
2019-09-20T10:14:43.000Z
tests/test_tasks/test_supervised_task.py
hp2500/openml-python
62cc534cd18e6e011a88a83816fec95a90399a9b
[ "BSD-3-Clause" ]
2
2019-06-19T11:10:47.000Z
2019-07-08T10:31:01.000Z
from typing import Tuple import unittest import numpy as np from openml.tasks import get_task from .test_task import OpenMLTaskTest class OpenMLSupervisedTaskTest(OpenMLTaskTest): """ A helper class. The methods of the test case are only executed in subclasses of the test case. """ __test__ = F...
24.111111
64
0.652074
from typing import Tuple import unittest import numpy as np from openml.tasks import get_task from .test_task import OpenMLTaskTest class OpenMLSupervisedTaskTest(OpenMLTaskTest): __test__ = False @classmethod def setUpClass(cls): if cls is OpenMLSupervisedTaskTest: raise unittest....
true
true
f7112c22edd7f1c3e79cb1392172dface9da9a6f
40,707
py
Python
tensorflow/python/distribute/collective_all_reduce_strategy.py
neochristou/tensorflow
50b55bfc5c9132c3bd82505181380bffbb47a5ff
[ "Apache-2.0" ]
4
2021-06-30T10:53:39.000Z
2021-09-19T16:52:00.000Z
tensorflow/python/distribute/collective_all_reduce_strategy.py
donny-stacks/tensorflow
1fb338b1c42930c0eef4d0b4d8d5fdf24a678654
[ "Apache-2.0" ]
1
2020-08-28T18:17:58.000Z
2020-08-28T18:17:58.000Z
tensorflow/python/distribute/collective_all_reduce_strategy.py
donny-stacks/tensorflow
1fb338b1c42930c0eef4d0b4d8d5fdf24a678654
[ "Apache-2.0" ]
4
2022-01-13T11:23:44.000Z
2022-03-02T11:11:42.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.271028
134
0.714717
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import threading import time import weakref from tensorflow.core.protobuf import rewriter_config_pb2 from tensorflow.core.protobuf import tensorflow_server_pb2 from tensorflow.python.distribute im...
true
true
f7112ca75afc4d177c66e264175abe37bea02fdb
1,299
py
Python
instastalk/constants.py
jjkoh95/instastalk
e16662d8b0eb22f4d80a2a760674538601f8bb00
[ "MIT" ]
4
2019-12-19T03:06:24.000Z
2020-12-08T01:59:52.000Z
instastalk/constants.py
jjkoh95/instastalk
e16662d8b0eb22f4d80a2a760674538601f8bb00
[ "MIT" ]
null
null
null
instastalk/constants.py
jjkoh95/instastalk
e16662d8b0eb22f4d80a2a760674538601f8bb00
[ "MIT" ]
2
2019-12-31T02:01:24.000Z
2020-03-13T07:41:44.000Z
QUERY_HASH = '42323d64886122307be10013ad2dcc44' STORIES_QUERY_HASH = '45246d3fe16ccc6577e0bd297a5db1ab' SHORTCODE_QUERY_HASH = 'fead941d698dc1160a298ba7bec277ac' BASE_URL = "https://www.instagram.com" LOGIN_REFERER = f'{BASE_URL}/accounts/login' LOGIN_URL = f'{BASE_URL}/accounts/login/ajax/' LOGOUT_URL = f'{BASE_URL}/...
39.363636
247
0.722864
QUERY_HASH = '42323d64886122307be10013ad2dcc44' STORIES_QUERY_HASH = '45246d3fe16ccc6577e0bd297a5db1ab' SHORTCODE_QUERY_HASH = 'fead941d698dc1160a298ba7bec277ac' BASE_URL = "https://www.instagram.com" LOGIN_REFERER = f'{BASE_URL}/accounts/login' LOGIN_URL = f'{BASE_URL}/accounts/login/ajax/' LOGOUT_URL = f'{BASE_URL}/...
true
true
f7112ccc230534981bbe0dd4d71f57e20b5aabfa
4,913
py
Python
haas_lib_bundles/python/docs/examples/smart_fan/esp32/code/main.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/smart_fan/esp32/code/main.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/smart_fan/esp32/code/main.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- ''' @File : main.py @Author : guoliang.wgl @version : 1.0 @Description: smart_fan案例 - 智能控制小风扇 board.json - 硬件资源配置文件 ''' from fan import Fan from aht21b import AHT21B from driver import PWM, I2C import time from aliyunIoT import ...
27.446927
81
0.630572
from fan import Fan from aht21b import AHT21B from driver import PWM, I2C import time from aliyunIoT import Device import json iot_connected = False wlan = None productKey = "产品密钥" deviceName = "设备名称" deviceSecret = "设备密钥" device = None wifiSsid = "请输入您的路由器名称" wifiPassword = "请输入您的路由器密码" gear1_temp = 22 gear2_temp =...
true
true
f7112d60b47eb6fb4ad1be2a0ffbcd3b4d41a3f4
21,283
py
Python
reclor_trainer_base_v2.py
SparkJiao/MERIt
e887dd11bd2969345a5fb07c47d49bd0245e41e6
[ "MIT" ]
8
2022-03-01T09:02:44.000Z
2022-03-18T14:41:56.000Z
reclor_trainer_base_v2.py
SparkJiao/MERIt
e887dd11bd2969345a5fb07c47d49bd0245e41e6
[ "MIT" ]
1
2022-03-09T12:12:22.000Z
2022-03-10T09:08:42.000Z
reclor_trainer_base_v2.py
SparkJiao/MERIt
e887dd11bd2969345a5fb07c47d49bd0245e41e6
[ "MIT" ]
2
2022-03-02T01:46:52.000Z
2022-03-02T13:51:53.000Z
# coding=utf-8 # # Copyright 2020 Heinrich Heine University Duesseldorf # # Part of this code is based on the source code of BERT-DST # (arXiv:1907.03040) # Part of this code is based on the source code of Transformers # (arXiv:1910.03771) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may no...
45.091102
137
0.644881
import glob import json import logging import os import sys from typing import Dict, Union import hydra import numpy as np import torch import transformers from fairscale.nn.data_parallel.fully_sharded_data_parallel import FullyShardedDataParallel as FullyShardedDDP from fairscale.nn.wrap.auto_wrap import auto_wrap f...
true
true
f7112f4e2a985351fa67abafbc227e54c3565741
1,599
py
Python
xlsxwriter/test/comparison/test_chart_axis17.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_axis17.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_axis17.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
25.790323
79
0.565353
from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): def setUp(self): self.maxDiff = None filename = 'chart_axis17.xlsx' test_dir = 'xlsxwriter/test/comparison/' self.got_filename = test_dir + ...
true
true
f711301c61a91d397fabaa9789e2c1cc33e29329
20,549
py
Python
log_complete_bcl2/model_17.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete_bcl2/model_17.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete_bcl2/model_17.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
95.134259
798
0.804127
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', '...
true
true
f7113193431e64e1b2be0b5b98c20cb05d9b30f6
5,751
py
Python
deblurring_celeba_algorithm_1.py
ChandreyeeB/Blind-Image-Deconvolution-using-Deep-Generative-Priors
4198bd2d325a32ffc4e714c486540e63440ab110
[ "MIT" ]
24
2019-01-10T14:18:57.000Z
2021-12-07T13:56:23.000Z
deblurring_celeba_algorithm_1.py
ChandreyeeB/Blind-Image-Deconvolution-using-Deep-Generative-Priors
4198bd2d325a32ffc4e714c486540e63440ab110
[ "MIT" ]
4
2019-02-01T22:21:05.000Z
2021-06-09T13:00:10.000Z
deblurring_celeba_algorithm_1.py
ChandreyeeB/Blind-Image-Deconvolution-using-Deep-Generative-Priors
4198bd2d325a32ffc4e714c486540e63440ab110
[ "MIT" ]
13
2019-01-28T12:23:51.000Z
2022-03-23T04:38:47.000Z
import tensorflow as tf import keras.backend as K import numpy as np from Utils import * from generators.MotionBlurGenerator import * from generators.CelebAGenerator import * K.set_learning_phase(0) from glob import glob import os # paths Orig_Path = './results/CelebA/Original Images/*.png' Range_Path = '....
40.216783
158
0.636933
import tensorflow as tf import keras.backend as K import numpy as np from Utils import * from generators.MotionBlurGenerator import * from generators.CelebAGenerator import * K.set_learning_phase(0) from glob import glob import os Orig_Path = './results/CelebA/Original Images/*.png' Range_Path = './results...
true
true
f71132d4c7e735b30abb14add36214b3cc1d70d4
23,887
py
Python
ironic/drivers/modules/pxe_base.py
calsoft-internal/ironic
6222d57a74368264b132885b6140b204f429911f
[ "Apache-2.0" ]
null
null
null
ironic/drivers/modules/pxe_base.py
calsoft-internal/ironic
6222d57a74368264b132885b6140b204f429911f
[ "Apache-2.0" ]
null
null
null
ironic/drivers/modules/pxe_base.py
calsoft-internal/ironic
6222d57a74368264b132885b6140b204f429911f
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
45.155009
79
0.618495
from futurist import periodics from ironic_lib import metrics_utils from oslo_config import cfg from oslo_log import log as logging from ironic.common import boot_devices from ironic.common import dhcp_factory from ironic.common import exception from ironic.common.glance_service import service_utils from ironic.commo...
true
true
f7113319ab5a3109c6a12ffd7309beed2c6268f7
4,269
py
Python
source/functions/encryption.py
GucciHsuan/CampusCyberInspectionTool2021
86636f777192e492f4342519e30a975a6a58b8ab
[ "MIT" ]
null
null
null
source/functions/encryption.py
GucciHsuan/CampusCyberInspectionTool2021
86636f777192e492f4342519e30a975a6a58b8ab
[ "MIT" ]
null
null
null
source/functions/encryption.py
GucciHsuan/CampusCyberInspectionTool2021
86636f777192e492f4342519e30a975a6a58b8ab
[ "MIT" ]
null
null
null
class cryto: def decryp_Vige() : cyphertext=input("cyphertext=") key=input("key=") print("plaintext=",end='') j=0 for i in cyphertext : c=ord(key[j]) if c < 97 : c=c+32 c=c-97 x=ord(i)+26 if x < 123...
27.018987
89
0.35465
class cryto: def decryp_Vige() : cyphertext=input("cyphertext=") key=input("key=") print("plaintext=",end='') j=0 for i in cyphertext : c=ord(key[j]) if c < 97 : c=c+32 c=c-97 x=ord(i)+26 if x < 123...
true
true
f71133f3b8e1efb4829caeb82d8460761e5bcacc
2,828
py
Python
crpm/pvalue.py
dmontemayor/CRPM
e896831fad7bed42d17574b137e600fc5adbf6b0
[ "MIT" ]
null
null
null
crpm/pvalue.py
dmontemayor/CRPM
e896831fad7bed42d17574b137e600fc5adbf6b0
[ "MIT" ]
null
null
null
crpm/pvalue.py
dmontemayor/CRPM
e896831fad7bed42d17574b137e600fc5adbf6b0
[ "MIT" ]
null
null
null
""" Calcualte p-values, ROC, AUC, and proportion of significant observations for a set of observations given the null hypothesis distribution Args: variable: array of observed values hypothesis: optional null hypotheis distribution (beta distribution by default) alpha: optional significance...
28.857143
94
0.640382
import numpy as np def pvalue(variable=None, hypothesis=None, alpha=.05): if variable is None: variable = np.random.beta(a=3, b=5, size=5000) else: variable = np.array(variable) if hypothesis is None: hypothesis = np.random.beta(a=5, b=5, size=1000) else: hypo...
true
true
f71133f82623f384ba4feeea0b52c7871bf3ea83
3,948
py
Python
book/linreg_poly_vs_degree.py
tywang89/pyprobml
82cfdcb8daea653cda8f77e8737e585418476ca7
[ "MIT" ]
1
2019-05-07T12:40:01.000Z
2019-05-07T12:40:01.000Z
book/linreg_poly_vs_degree.py
tywang89/pyprobml
82cfdcb8daea653cda8f77e8737e585418476ca7
[ "MIT" ]
null
null
null
book/linreg_poly_vs_degree.py
tywang89/pyprobml
82cfdcb8daea653cda8f77e8737e585418476ca7
[ "MIT" ]
null
null
null
# Plot polynomial regression on 1d problem # Based on https://github.com/probml/pmtk3/blob/master/demos/linregPolyVsDegree.m import numpy as np import matplotlib.pyplot as plt from pyprobml_utils import save_fig from sklearn.preprocessing import PolynomialFeatures from sklearn.linear_model import LinearRegression fr...
34.938053
140
0.678318
import numpy as np import matplotlib.pyplot as plt from pyprobml_utils import save_fig from sklearn.preprocessing import PolynomialFeatures from sklearn.linear_model import LinearRegression from sklearn.preprocessing import MinMaxScaler import sklearn.metrics from sklearn.metrics import mean_squared_error as mse ...
true
true
f71134778da67a8817b7931130ea8e8dcc0520e7
13,724
py
Python
logicmonitor_sdk/models/widget.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
logicmonitor_sdk/models/widget.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
logicmonitor_sdk/models/widget.py
JeremyTangCD/lm-sdk-python
2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ LogicMonitor REST API LogicMonitor is a SaaS-based performance monitoring platform that provides full visibility into complex, hybrid infrastructures, offering granular performance monitoring and actionable data and insights. logicmonitor_sdk enables you to manage your LogicMonitor account...
31.405034
336
0.600627
import pprint import re import six class Widget(object): swagger_types = { 'last_updated_by': 'str', 'user_permission': 'str', 'dashboard_id': 'int', 'name': 'str', 'description': 'str', 'last_updated_on': 'int', 'theme': 'str', 'interval': 'in...
true
true
f71134a742f050558c8c7b7b88a6923832e58fdb
2,461
py
Python
msgflow/service/webapi_service.py
colorfulscoop/msgflow
b275748afcdf3aa5aec1f80436cb7e0bd03fc69f
[ "MIT" ]
5
2021-01-01T12:34:23.000Z
2022-03-08T13:02:11.000Z
msgflow/service/webapi_service.py
colorfulscoop/msgflow
b275748afcdf3aa5aec1f80436cb7e0bd03fc69f
[ "MIT" ]
null
null
null
msgflow/service/webapi_service.py
colorfulscoop/msgflow
b275748afcdf3aa5aec1f80436cb7e0bd03fc69f
[ "MIT" ]
1
2021-01-01T12:34:27.000Z
2021-01-01T12:34:27.000Z
from pydantic import BaseModel from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware import uvicorn import pkg_resources from typing import Any def build_api(handler, endpoint): def get_version(): pkg_name = "msgflow" try: version = pkg_resources.get_distributi...
22.577982
76
0.611946
from pydantic import BaseModel from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware import uvicorn import pkg_resources from typing import Any def build_api(handler, endpoint): def get_version(): pkg_name = "msgflow" try: version = pkg_resources.get_distributi...
true
true
f71134f7f0b02eb570f36f87275fe61904ada617
1,339
py
Python
tests/test_gui.py
prosodylab/Montreal-Forced-Aligner
58e95c941924d7cb4db5672e28fb0dbbcf9c42f3
[ "MIT" ]
null
null
null
tests/test_gui.py
prosodylab/Montreal-Forced-Aligner
58e95c941924d7cb4db5672e28fb0dbbcf9c42f3
[ "MIT" ]
null
null
null
tests/test_gui.py
prosodylab/Montreal-Forced-Aligner
58e95c941924d7cb4db5672e28fb0dbbcf9c42f3
[ "MIT" ]
null
null
null
import os from montreal_forced_aligner.corpus.acoustic_corpus import AcousticCorpus def test_save_text_lab( basic_corpus_dir, generated_dir, ): output_directory = os.path.join(generated_dir, "gui_tests") corpus = AcousticCorpus( corpus_directory=basic_corpus_dir, use_mp=True, ...
27.895833
73
0.716953
import os from montreal_forced_aligner.corpus.acoustic_corpus import AcousticCorpus def test_save_text_lab( basic_corpus_dir, generated_dir, ): output_directory = os.path.join(generated_dir, "gui_tests") corpus = AcousticCorpus( corpus_directory=basic_corpus_dir, use_mp=True, ...
true
true
f711359dc17042272390f6f50314b5f2c746d6b9
934
py
Python
CHAP06/wrapper/azdo.py
dotcs/Terraform-Cookbook
16938bf044353b1552f3ffb676153f922e147700
[ "MIT" ]
86
2020-02-05T15:00:16.000Z
2022-03-28T12:06:14.000Z
CHAP06/wrapper/azdo.py
dotcs/Terraform-Cookbook
16938bf044353b1552f3ffb676153f922e147700
[ "MIT" ]
1
2021-01-14T16:49:50.000Z
2021-01-14T16:49:50.000Z
CHAP06/wrapper/azdo.py
dotcs/Terraform-Cookbook
16938bf044353b1552f3ffb676153f922e147700
[ "MIT" ]
113
2020-02-09T12:34:19.000Z
2022-03-22T18:42:59.000Z
import os def tfoutputtoAzdo(outputlist, jsonObject): """ This function convert a dict to Azure DevOps pipelines variable outputlist : dict { terraform_output : azure devpops variable} jsonOject : the terraform output in Json format (terraform output -json) """ if(len(outputlist) > 0): ...
37.36
96
0.541756
import os def tfoutputtoAzdo(outputlist, jsonObject): if(len(outputlist) > 0): for k, v in outputlist.items(): tfoutput_name = k azdovar = str(v) if tfoutput_name in jsonObject.keys(): var_value = jsonObject[tfoutput_name]["value"] ...
true
true
f71135d130be1b16ed52e91265050b1eeb02e001
2,702
py
Python
baseline/utils/mainFunctions.py
haymrpig/Pytorch_template
9a0eda43b2da27807461b305ed42e1bd7c1341dd
[ "MIT" ]
null
null
null
baseline/utils/mainFunctions.py
haymrpig/Pytorch_template
9a0eda43b2da27807461b305ed42e1bd7c1341dd
[ "MIT" ]
null
null
null
baseline/utils/mainFunctions.py
haymrpig/Pytorch_template
9a0eda43b2da27807461b305ed42e1bd7c1341dd
[ "MIT" ]
null
null
null
import numpy as np import torch import torch.nn as nn from torch.nn import functional as F from tqdm import tqdm class _BaseWrapper(): def __init__(self, model): super().__init__() self.model = model self.handlers = [] def forward(self, images): self.image_shape = images.shape[...
33.775
98
0.631384
import numpy as np import torch import torch.nn as nn from torch.nn import functional as F from tqdm import tqdm class _BaseWrapper(): def __init__(self, model): super().__init__() self.model = model self.handlers = [] def forward(self, images): self.image_shape = images.shape[...
true
true
f71135dc8e414cd1dc043aa36791209c2ac417ba
3,026
py
Python
hmc/tests/test_cox_poisson.py
JamesBrofos/Thresholds-in-Hamiltonian-Monte-Carlo
7ee1b530db0eb536666dbc872fbf8200e53dd49b
[ "MIT" ]
1
2021-11-23T15:40:07.000Z
2021-11-23T15:40:07.000Z
hmc/tests/test_cox_poisson.py
JamesBrofos/Thresholds-in-Hamiltonian-Monte-Carlo
7ee1b530db0eb536666dbc872fbf8200e53dd49b
[ "MIT" ]
null
null
null
hmc/tests/test_cox_poisson.py
JamesBrofos/Thresholds-in-Hamiltonian-Monte-Carlo
7ee1b530db0eb536666dbc872fbf8200e53dd49b
[ "MIT" ]
null
null
null
import unittest import numpy as np from hmc.applications.cox_poisson import forward_transform, inverse_transform, generate_data, gaussian_posterior_factory, hyperparameter_posterior_factory from hmc.applications.cox_poisson.prior import log_prior, grad_log_prior, hess_log_prior, grad_hess_log_prior class TestCoxPoi...
41.452055
154
0.663913
import unittest import numpy as np from hmc.applications.cox_poisson import forward_transform, inverse_transform, generate_data, gaussian_posterior_factory, hyperparameter_posterior_factory from hmc.applications.cox_poisson.prior import log_prior, grad_log_prior, hess_log_prior, grad_hess_log_prior class TestCoxPoi...
true
true