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
f70d79f8e4f21bcfc37da7f16472f661413a1eb8
45,078
py
Python
scuole/states/migrations/0001_initial.py
texastribune/scuole
8ab316ee50ef0d8e71b94b50dc889d10c6e83412
[ "MIT" ]
1
2019-03-12T04:30:02.000Z
2019-03-12T04:30:02.000Z
scuole/states/migrations/0001_initial.py
texastribune/scuole
8ab316ee50ef0d8e71b94b50dc889d10c6e83412
[ "MIT" ]
616
2017-08-18T21:15:39.000Z
2022-03-25T11:17:10.000Z
scuole/states/migrations/0001_initial.py
texastribune/scuole
8ab316ee50ef0d8e71b94b50dc889d10c6e83412
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-08 00:16 from __future__ import unicode_literals import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion import localflavor.us.models import phonenumber_field.modelfields class Migration(migratio...
148.282895
1,389
0.729469
from __future__ import unicode_literals import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion import localflavor.us.models import phonenumber_field.modelfields class Migration(migrations.Migration): initial = True dependencies = [ ('sta...
true
true
f70d7b68bad3205d05eade7959132ed505598af3
2,678
py
Python
surfpy/swell.py
mjmayank1/surfpy
969b1a626db7606a42fab0eae445fcb351d6cbcd
[ "MIT" ]
46
2018-04-08T15:56:32.000Z
2022-01-05T17:36:55.000Z
surfpy/swell.py
mjmayank1/surfpy
969b1a626db7606a42fab0eae445fcb351d6cbcd
[ "MIT" ]
13
2017-08-15T13:12:10.000Z
2021-03-23T09:09:04.000Z
surfpy/swell.py
mjmayank1/surfpy
969b1a626db7606a42fab0eae445fcb351d6cbcd
[ "MIT" ]
15
2018-03-08T16:52:19.000Z
2021-12-27T21:17:37.000Z
from . import units from . import tools import math from .basedata import BaseData class Swell(BaseData): def __init__(self, unit, wave_height=float('nan'), period=float('nan'), direction=float('nan'), compass_direction=None, max_energy = 0, frequency_index = 0): super(Swell, self).__init__(unit) ...
41.84375
161
0.682226
from . import units from . import tools import math from .basedata import BaseData class Swell(BaseData): def __init__(self, unit, wave_height=float('nan'), period=float('nan'), direction=float('nan'), compass_direction=None, max_energy = 0, frequency_index = 0): super(Swell, self).__init__(unit) ...
true
true
f70d7cec720092a8dea67ad7bd981efcb4e7c031
1,795
py
Python
2016/iker/day12/leonardo_s_monorail.py
bbglab/adventofcode
65b6d8331d10f229b59232882d60024b08d69294
[ "MIT" ]
null
null
null
2016/iker/day12/leonardo_s_monorail.py
bbglab/adventofcode
65b6d8331d10f229b59232882d60024b08d69294
[ "MIT" ]
null
null
null
2016/iker/day12/leonardo_s_monorail.py
bbglab/adventofcode
65b6d8331d10f229b59232882d60024b08d69294
[ "MIT" ]
3
2016-12-02T09:20:42.000Z
2021-12-01T13:31:07.000Z
""" Jordi explained that a recursive search may not work as you might first follow an extremely long path. Thus, the process should be done by levels """ import os from collections import defaultdict class Computer: def __init__(self): self.operations = {'cpy': self.copy, 'inc': self.add, 'de...
24.930556
98
0.573816
import os from collections import defaultdict class Computer: def __init__(self): self.operations = {'cpy': self.copy, 'inc': self.add, 'dec': self.subs, 'jnz': self.jump} self.registers = defaultdict(int) self.instruction = 0 def run(self, program): while self.in...
true
true
f70d7d282ef478cf1ab83ced45acdc327b67c1fe
17,780
py
Python
tests/kafkatest/services/security/security_config.py
mtillu/kafka
78e18b575c6b4724afe6107371d70c46fb57d3d9
[ "Apache-2.0" ]
6
2021-06-11T15:06:15.000Z
2022-03-26T13:03:26.000Z
tests/kafkatest/services/security/security_config.py
mtillu/kafka
78e18b575c6b4724afe6107371d70c46fb57d3d9
[ "Apache-2.0" ]
15
2020-03-05T00:32:48.000Z
2022-02-16T00:55:24.000Z
tests/kafkatest/services/security/security_config.py
mtillu/kafka
78e18b575c6b4724afe6107371d70c46fb57d3d9
[ "Apache-2.0" ]
5
2021-06-11T15:16:25.000Z
2022-02-24T08:37:31.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
50.368272
274
0.696682
import logging import os import subprocess from tempfile import mkdtemp from shutil import rmtree from ducktape.template import TemplateRenderer from kafkatest.services.security.minikdc import MiniKdc from kafkatest.services.security.listener_security_config import ListenerSecurityConfig import itertools class SslSt...
true
true
f70d7dcace1a9a05197e4ef934f2d9da865f07e9
21,253
py
Python
pyvista_sample/VisualizeDataProcess.py
DennisHgj/pyela
bbdbf1a55b31cd2ae4dc1877d220ad32589ead4c
[ "Intel", "MIT" ]
null
null
null
pyvista_sample/VisualizeDataProcess.py
DennisHgj/pyela
bbdbf1a55b31cd2ae4dc1877d220ad32589ead4c
[ "Intel", "MIT" ]
2
2019-08-13T06:14:35.000Z
2019-10-06T08:09:19.000Z
pyvista_sample/VisualizeDataProcess.py
DennisHgj/pyela
bbdbf1a55b31cd2ae4dc1877d220ad32589ead4c
[ "Intel", "MIT" ]
null
null
null
import os import pickle import PVGeo import pyvista as pv import pandas as pd from ela.classification import GridInterpolation from ela.spatial import create_meshgrid_cartesian from ela.visual import * ''' @author: Guanjie Huang @date: Aug 16th,2019 This class is used to process data before generating the 3D images '...
50.125
123
0.632193
import os import pickle import PVGeo import pyvista as pv import pandas as pd from ela.classification import GridInterpolation from ela.spatial import create_meshgrid_cartesian from ela.visual import * class VisualizeDataProcess: def __init__(self): self.scaled_from_height_colname = 'scaled_from...
true
true
f70d7e1db529deaba507f2cc77a2eac42e9c9da5
26,813
py
Python
netbox/utilities/tests/test_filters.py
aslafy-z/netbox
a5512dd4c46c005df8752fc330c1382ac22b31ea
[ "Apache-2.0" ]
2
2021-06-02T03:00:05.000Z
2021-07-30T18:52:32.000Z
netbox/utilities/tests/test_filters.py
aslafy-z/netbox
a5512dd4c46c005df8752fc330c1382ac22b31ea
[ "Apache-2.0" ]
4
2021-06-08T22:29:06.000Z
2022-03-12T00:48:51.000Z
netbox/utilities/tests/test_filters.py
aslafy-z/netbox
a5512dd4c46c005df8752fc330c1382ac22b31ea
[ "Apache-2.0" ]
1
2020-09-16T11:31:25.000Z
2020-09-16T11:31:25.000Z
import django_filters from django.conf import settings from django.db import models from django.test import TestCase from mptt.fields import TreeForeignKey from taggit.managers import TaggableManager from dcim.choices import * from dcim.fields import MACAddressField from dcim.filters import DeviceFilterSet, SiteFilter...
51.662813
301
0.696192
import django_filters from django.conf import settings from django.db import models from django.test import TestCase from mptt.fields import TreeForeignKey from taggit.managers import TaggableManager from dcim.choices import * from dcim.fields import MACAddressField from dcim.filters import DeviceFilterSet, SiteFilter...
true
true
f70d7e36abbbaadbac053cf1270ce818d3acef9f
7,763
py
Python
volttron/drivers/file_driver.py
kwarodom/mib_ui_data_analytics
a0bc0b30ada1622e00dff41797bd07ea76d7c422
[ "Unlicense" ]
3
2018-11-25T01:09:55.000Z
2021-08-24T01:56:36.000Z
volttron/drivers/file_driver.py
kwarodom/mib_ui_data_analytics
a0bc0b30ada1622e00dff41797bd07ea76d7c422
[ "Unlicense" ]
null
null
null
volttron/drivers/file_driver.py
kwarodom/mib_ui_data_analytics
a0bc0b30ada1622e00dff41797bd07ea76d7c422
[ "Unlicense" ]
3
2018-11-09T03:38:09.000Z
2020-02-24T06:26:10.000Z
''' Copyright (c) 2013, Battelle Memorial Institute 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 ...
42.653846
126
0.669587
''' Copyright (c) 2013, Battelle Memorial Institute 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 ...
false
true
f70d7e3d03834e47c1b983c805108d7a309a34af
759
py
Python
kivyeExemplosDocumentacao/kivy_venv/Scripts/rst2html4.py
wemerson-henrique/kivy
3cb6061a2d19b01e86c3738206f30c8a853763d4
[ "MIT" ]
null
null
null
kivyeExemplosDocumentacao/kivy_venv/Scripts/rst2html4.py
wemerson-henrique/kivy
3cb6061a2d19b01e86c3738206f30c8a853763d4
[ "MIT" ]
null
null
null
kivyeExemplosDocumentacao/kivy_venv/Scripts/rst2html4.py
wemerson-henrique/kivy
3cb6061a2d19b01e86c3738206f30c8a853763d4
[ "MIT" ]
null
null
null
#!C:\Users\WEMERSON\Documents\kivy\kivy_venv\Scripts\python.exe # $Id: rst2html4.py 7994 2016-12-10 17:41:45Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing (X)HTML. The output conforms t...
28.111111
78
0.748353
try: import locale locale.setlocale(locale.LC_ALL, '') except: pass from docutils.core import publish_cmdline, default_description description = ('Generates (X)HTML documents from standalone reStructuredText ' 'sources. ' + default_description) publish_cmdline(writer_name='html4', des...
true
true
f70d7ed397a7bcf7151bee4cf4e26cefe9f07c32
4,432
py
Python
.vim/bundle/ultisnips/pythonx/UltiSnips/text_objects/_snippet_instance.py
geecoo/vim
efe3bdc2edb3419deafe9af676c4f6c9107c9edf
[ "MIT" ]
null
null
null
.vim/bundle/ultisnips/pythonx/UltiSnips/text_objects/_snippet_instance.py
geecoo/vim
efe3bdc2edb3419deafe9af676c4f6c9107c9edf
[ "MIT" ]
null
null
null
.vim/bundle/ultisnips/pythonx/UltiSnips/text_objects/_snippet_instance.py
geecoo/vim
efe3bdc2edb3419deafe9af676c4f6c9107c9edf
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """A Snippet instance is an instance of a Snippet Definition. That is, when the user expands a snippet, a SnippetInstance is created to keep track of the corresponding TextObjects. The Snippet itself is also a TextObject. """ from UltiSnips import _vim from UltiSnips.position...
32.115942
78
0.59657
from UltiSnips import _vim from UltiSnips.position import Position from UltiSnips.text_objects._base import EditableTextObject, \ NoneditableTextObject class SnippetInstance(EditableTextObject): def __init__(self, snippet, parent, initial_text, start, end, visual_content, last_re, glo...
true
true
f70d7f4078b609a962c2e557efc5fb82fa7f88e4
1,371
py
Python
finder.py
FelixPcll/Open-CV-Sandbox
1a9a304f9f209cecc3b266b54b59a460e0f4d6e8
[ "Apache-2.0" ]
null
null
null
finder.py
FelixPcll/Open-CV-Sandbox
1a9a304f9f209cecc3b266b54b59a460e0f4d6e8
[ "Apache-2.0" ]
null
null
null
finder.py
FelixPcll/Open-CV-Sandbox
1a9a304f9f209cecc3b266b54b59a460e0f4d6e8
[ "Apache-2.0" ]
null
null
null
"""Docstring """ import cv2 #import numpy as np def find_in_face(haarcascade, rec=False): """Press 'k' for quit """ face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') smile_cascade = cv2.CascadeClassifier(haarcascade) cap = cv2.VideoCapture(0) if rec: fourc...
26.882353
79
0.57841
import cv2 def find_in_face(haarcascade, rec=False): face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') smile_cascade = cv2.CascadeClassifier(haarcascade) cap = cv2.VideoCapture(0) if rec: fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter('output...
true
true
f70d7f822489ab016bc95880bbd0a5fbffc9331c
1,308
py
Python
model/protonet.py
ashblib/protocell
037c3aa6ab2250eae09889729d512c243518e282
[ "MIT" ]
null
null
null
model/protonet.py
ashblib/protocell
037c3aa6ab2250eae09889729d512c243518e282
[ "MIT" ]
null
null
null
model/protonet.py
ashblib/protocell
037c3aa6ab2250eae09889729d512c243518e282
[ "MIT" ]
null
null
null
import torch.nn as nn import torch class ProtoNetBig(nn.Module): def __init__(self, x_dim=23433, hid_dim=[2000, 1000, 500, 250], z_dim=100): super(ProtoNetBig, self).__init__() self.linear0 = nn.Linear(x_dim, hid_dim[0]) self.bn1 = nn.BatchNorm1d(hid_dim[0]) self.linear1 = nn.Linear...
48.444444
90
0.619266
import torch.nn as nn import torch class ProtoNetBig(nn.Module): def __init__(self, x_dim=23433, hid_dim=[2000, 1000, 500, 250], z_dim=100): super(ProtoNetBig, self).__init__() self.linear0 = nn.Linear(x_dim, hid_dim[0]) self.bn1 = nn.BatchNorm1d(hid_dim[0]) self.linear1 = nn.Linear...
true
true
f70d7ff4243d506dde9a8af610c28d0217c59943
464
py
Python
riverswim_variants/__init__.py
RevanMacQueen/Riverswim-Variants
a3593c6b2960185e1815b79aba5a2ccdb6ff9ea7
[ "MIT" ]
null
null
null
riverswim_variants/__init__.py
RevanMacQueen/Riverswim-Variants
a3593c6b2960185e1815b79aba5a2ccdb6ff9ea7
[ "MIT" ]
null
null
null
riverswim_variants/__init__.py
RevanMacQueen/Riverswim-Variants
a3593c6b2960185e1815b79aba5a2ccdb6ff9ea7
[ "MIT" ]
1
2022-03-08T05:29:00.000Z
2022-03-08T05:29:00.000Z
from gym.envs.registration import register register( id='scaled-riverswim-v0', entry_point='riverswim_variants.envs:ScaledRiverSwimEnv', max_episode_steps=20, ) register( id='stochastic-riverswim-v0', entry_point='riverswim_variants.envs:StochasticRiverSwimEnv', max_episode_steps=20, ) regist...
24.421053
71
0.767241
from gym.envs.registration import register register( id='scaled-riverswim-v0', entry_point='riverswim_variants.envs:ScaledRiverSwimEnv', max_episode_steps=20, ) register( id='stochastic-riverswim-v0', entry_point='riverswim_variants.envs:StochasticRiverSwimEnv', max_episode_steps=20, ) regist...
true
true
f70d80da40a72c207edfcfc1509e820846f0b731
7,620
py
Python
sold2/model/model_util.py
XiaoJake/SOLD2
ddd36788c112136be2975ee29b096df979571bb2
[ "MIT" ]
null
null
null
sold2/model/model_util.py
XiaoJake/SOLD2
ddd36788c112136be2975ee29b096df979571bb2
[ "MIT" ]
null
null
null
sold2/model/model_util.py
XiaoJake/SOLD2
ddd36788c112136be2975ee29b096df979571bb2
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.init as init from .nets.backbone import HourglassBackbone, SuperpointBackbone from .nets.junction_decoder import SuperpointDecoder from .nets.heatmap_decoder import PixelShuffleDecoder from .nets.descriptor_decoder import SuperpointDescriptor def get_model(model_cfg...
37.352941
102
0.608793
import torch import torch.nn as nn import torch.nn.init as init from .nets.backbone import HourglassBackbone, SuperpointBackbone from .nets.junction_decoder import SuperpointDecoder from .nets.heatmap_decoder import PixelShuffleDecoder from .nets.descriptor_decoder import SuperpointDescriptor def get_model(model_cfg...
true
true
f70d80f76d6e011cd307a69711f004a7e641cdc4
2,414
py
Python
dipy/reconst/tests/test_peakdf.py
JohnGriffiths/dipy
5fb38e9b77547cdaf5eb140730444535733ae01d
[ "BSD-3-Clause" ]
1
2016-09-08T19:23:51.000Z
2016-09-08T19:23:51.000Z
dipy/reconst/tests/test_peakdf.py
JohnGriffiths/dipy
5fb38e9b77547cdaf5eb140730444535733ae01d
[ "BSD-3-Clause" ]
null
null
null
dipy/reconst/tests/test_peakdf.py
JohnGriffiths/dipy
5fb38e9b77547cdaf5eb140730444535733ae01d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import numpy.testing as npt from dipy.reconst.peaks import default_sphere, peaks_from_model def test_PeaksAndMetricsDirectionGetter(): class SillyModel(object): def fit(self, data, mask=None): return SillyFit(self) class SillyFit(object): def __init__(self, m...
32.621622
76
0.555095
import numpy as np import numpy.testing as npt from dipy.reconst.peaks import default_sphere, peaks_from_model def test_PeaksAndMetricsDirectionGetter(): class SillyModel(object): def fit(self, data, mask=None): return SillyFit(self) class SillyFit(object): def __init__(self, m...
true
true
f70d822462b0e11e8a773b1e4086ec0734f75d3c
4,226
py
Python
assignment/assignment2/q3_nature.py
reactivetype/cs234-reinforcement-learning
693a90854d6548157ac8ec1c70a90b08810aec1b
[ "MIT" ]
null
null
null
assignment/assignment2/q3_nature.py
reactivetype/cs234-reinforcement-learning
693a90854d6548157ac8ec1c70a90b08810aec1b
[ "MIT" ]
null
null
null
assignment/assignment2/q3_nature.py
reactivetype/cs234-reinforcement-learning
693a90854d6548157ac8ec1c70a90b08810aec1b
[ "MIT" ]
null
null
null
import tensorflow as tf import tensorflow.contrib.layers as layers from utils.general import get_logger from utils.test_env import EnvTest from q1_schedule import LinearExploration, LinearSchedule from q2_linear import Linear from configs.q3_nature import config class NatureQN(Linear): """ Im...
42.26
96
0.505206
import tensorflow as tf import tensorflow.contrib.layers as layers from utils.general import get_logger from utils.test_env import EnvTest from q1_schedule import LinearExploration, LinearSchedule from q2_linear import Linear from configs.q3_nature import config class NatureQN(Linear): def get_q_v...
true
true
f70d82790541d8df0e5c0d0f122d90643ea30c26
8,368
py
Python
openmdao/approximation_schemes/complex_step.py
onodip/OpenMDAO
96a99806fb3a547b881d2ad3da2733bca9978567
[ "Apache-2.0" ]
null
null
null
openmdao/approximation_schemes/complex_step.py
onodip/OpenMDAO
96a99806fb3a547b881d2ad3da2733bca9978567
[ "Apache-2.0" ]
null
null
null
openmdao/approximation_schemes/complex_step.py
onodip/OpenMDAO
96a99806fb3a547b881d2ad3da2733bca9978567
[ "Apache-2.0" ]
null
null
null
"""Complex Step derivative approximations.""" from __future__ import division, print_function from itertools import groupby from six.moves import range import numpy as np from openmdao.approximation_schemes.approximation_scheme import ApproximationScheme from openmdao.utils.name_maps import abs_key2rel_key DEFAULT...
34.866667
100
0.589627
from __future__ import division, print_function from itertools import groupby from six.moves import range import numpy as np from openmdao.approximation_schemes.approximation_scheme import ApproximationScheme from openmdao.utils.name_maps import abs_key2rel_key DEFAULT_CS_OPTIONS = { 'step': 1e-15, 'form':...
true
true
f70d82ff53eaea18aadbc5b3005b76647beb287d
196
py
Python
nipy/neurospin/register/__init__.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
1
2015-08-22T16:14:45.000Z
2015-08-22T16:14:45.000Z
nipy/neurospin/register/__init__.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
nipy/neurospin/register/__init__.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
from iconic_matcher import IconicMatcher #from realign4d import TimeSeries, realign4d, resample4d import transform from numpy.testing import Tester test = Tester().test bench = Tester().bench
19.6
56
0.806122
from iconic_matcher import IconicMatcher import transform from numpy.testing import Tester test = Tester().test bench = Tester().bench
true
true
f70d83e37661707a388cc938f1d05f4e528ac00e
3,117
py
Python
scripts/hailey.py
wcdawn/dotfiles
d069b53b7f19b53767df9e8d67b38b1d6fbf4e28
[ "MIT" ]
1
2019-01-30T01:34:21.000Z
2019-01-30T01:34:21.000Z
scripts/hailey.py
wcdawn/dotfiles
d069b53b7f19b53767df9e8d67b38b1d6fbf4e28
[ "MIT" ]
null
null
null
scripts/hailey.py
wcdawn/dotfiles
d069b53b7f19b53767df9e8d67b38b1d6fbf4e28
[ "MIT" ]
null
null
null
#!/bin/python # argument processing import sys, getopt # date and time import datetime import pytz # weather from weather import weatherFormat, twoColumn from ansi import ansi_escape # graphics/image import PIL # requires python-pillow from PIL import Image # webcams import webcam # for organ import requests from ...
25.975
84
0.667629
import sys, getopt import datetime import pytz from weather import weatherFormat, twoColumn from ansi import ansi_escape import PIL from PIL import Image import webcam import requests from io import BytesIO doWeather = True doImage = True whichWebcam = 0 myopts, args = getopt.getopt(sys.argv[1:], 'w:i:c:') for ...
true
true
f70d852df7ec2783451aeb34c885f027064d3454
1,151
py
Python
tests/test_planning.py
acjackman/note-clerk
1284c41d4a0c5f4a515af188c48576299d15cda6
[ "MIT" ]
1
2020-03-18T19:45:19.000Z
2020-03-18T19:45:19.000Z
tests/test_planning.py
acjackman/note-clerk
1284c41d4a0c5f4a515af188c48576299d15cda6
[ "MIT" ]
240
2020-03-23T00:41:15.000Z
2022-03-31T20:46:04.000Z
tests/test_planning.py
acjackman/note-clerk
1284c41d4a0c5f4a515af188c48576299d15cda6
[ "MIT" ]
null
null
null
import datetime as dt import pytest from note_clerk import planning @pytest.mark.parametrize( "date, quarter", [ (dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 1)), (dt.datetime(2020, 1, 2), dt.datetime(2020, 1, 1)), (dt.datetime(2020, 4, 1), dt.datetime(2020, 4, 1)), (dt.dat...
34.878788
72
0.582971
import datetime as dt import pytest from note_clerk import planning @pytest.mark.parametrize( "date, quarter", [ (dt.datetime(2020, 1, 1), dt.datetime(2020, 1, 1)), (dt.datetime(2020, 1, 2), dt.datetime(2020, 1, 1)), (dt.datetime(2020, 4, 1), dt.datetime(2020, 4, 1)), (dt.dat...
true
true
f70d853bd60308a51a14837c119525ba68a9fc78
576
py
Python
pdc/apps/package/migrations/0003_buildimage_releases.py
tzhaoredhat/automation
a1867dc2d3591fdae1fa7f80d457c25f9705070e
[ "MIT" ]
18
2015-12-15T17:56:18.000Z
2021-04-10T13:49:48.000Z
pdc/apps/package/migrations/0003_buildimage_releases.py
tzhaoredhat/automation
a1867dc2d3591fdae1fa7f80d457c25f9705070e
[ "MIT" ]
303
2015-11-18T07:37:06.000Z
2021-05-26T12:34:01.000Z
pdc/apps/package/migrations/0003_buildimage_releases.py
tzhaoredhat/automation
a1867dc2d3591fdae1fa7f80d457c25f9705070e
[ "MIT" ]
27
2015-11-19T20:33:54.000Z
2021-03-25T08:15:28.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('release', '0002_auto_20150512_07...
22.153846
63
0.631944
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('release', '0002_auto_20150512_0719'), ('package', '0002_auto_20150512_0714'), ] operations = [ migrations.AddField( model_name='...
true
true
f70d8561e7f64d7ca452a60d51ddc95627b583d7
2,715
py
Python
openGaussBase/testcase/KEYWORDS/reloptions/Opengauss_Function_Keyword_Reloptions_Case0020.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/KEYWORDS/reloptions/Opengauss_Function_Keyword_Reloptions_Case0020.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/KEYWORDS/reloptions/Opengauss_Function_Keyword_Reloptions_Case0020.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
36.689189
126
0.669613
import unittest from testcase.utils.Logger import Logger from testcase.utils.Constant import Constant from testcase.utils.CommonSH import CommonSH logger = Logger() commonsh = CommonSH('dbuser') constant = Constant() class Hostname(unittest.TestCase): def setUp(self): logger.info("-----------------...
true
true
f70d85b46cd37f7c5bcf77fee22d4a9a8c561ef2
488
py
Python
clusterpy/core/contiguity/__init__.py
clusterpy/clusterpy
f08136b806b6c3bdba53422e1bc0e19459a983fa
[ "BSD-3-Clause" ]
48
2015-03-23T14:11:40.000Z
2022-03-25T01:55:32.000Z
clusterpy/core/contiguity/__init__.py
Pandinosaurus/clusterpy
f08136b806b6c3bdba53422e1bc0e19459a983fa
[ "BSD-3-Clause" ]
8
2015-02-22T17:49:38.000Z
2020-11-20T18:03:32.000Z
clusterpy/core/contiguity/__init__.py
Pandinosaurus/clusterpy
f08136b806b6c3bdba53422e1bc0e19459a983fa
[ "BSD-3-Clause" ]
27
2016-03-06T23:53:19.000Z
2021-11-21T19:36:20.000Z
# encoding: latin2 """Data generator module """ __author__ = "Juan C. Duque, Alejandro Betancourt" __credits__ = "Copyright (c) 2009-10 Juan C. Duque" __license__ = "New BSD License" __version__ = "1.0.0" __maintainer__ = "RiSE Group" __email__ = "contacto@rise-group.org" from weightsFromAreas import weightsFromAreas ...
28.705882
51
0.79918
__author__ = "Juan C. Duque, Alejandro Betancourt" __credits__ = "Copyright (c) 2009-10 Juan C. Duque" __license__ = "New BSD License" __version__ = "1.0.0" __maintainer__ = "RiSE Group" __email__ = "contacto@rise-group.org" from weightsFromAreas import weightsFromAreas from intersections import fixIntersections from ...
true
true
f70d86040a54ad30812690780127fc9fd94d4f71
392
py
Python
derrida/wsgi.py
making-books-ren-today/test_eval_4_derrmar
615796efeb517cd12cfb1f8b67e0150f6aaaea66
[ "Apache-2.0" ]
11
2017-04-27T19:28:54.000Z
2021-02-10T23:44:39.000Z
derrida/wsgi.py
making-books-ren-today/test_eval_4_derrmar
615796efeb517cd12cfb1f8b67e0150f6aaaea66
[ "Apache-2.0" ]
280
2017-03-02T14:23:18.000Z
2021-12-01T14:16:48.000Z
derrida/wsgi.py
making-books-ren-today/test_eval_4_derrmar
615796efeb517cd12cfb1f8b67e0150f6aaaea66
[ "Apache-2.0" ]
null
null
null
""" WSGI config for derrida project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETT...
23.058824
78
0.785714
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "derrida.settings") application = get_wsgi_application()
true
true
f70d86a4b0ce8aad33a5069f14e24dc6de5745d3
5,852
py
Python
dashboard/modules/job/tests/test_cli_integration.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
null
null
null
dashboard/modules/job/tests/test_cli_integration.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
41
2021-09-21T01:13:48.000Z
2022-03-19T07:12:22.000Z
dashboard/modules/job/tests/test_cli_integration.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
1
2019-09-24T16:24:49.000Z
2019-09-24T16:24:49.000Z
from contextlib import contextmanager import json import os import logging import sys import subprocess from typing import Optional, Tuple import pytest logger = logging.getLogger(__name__) @contextmanager def set_env_var(key: str, val: Optional[str] = None): old_val = os.environ.get(key, None) if val is no...
31.294118
84
0.626111
from contextlib import contextmanager import json import os import logging import sys import subprocess from typing import Optional, Tuple import pytest logger = logging.getLogger(__name__) @contextmanager def set_env_var(key: str, val: Optional[str] = None): old_val = os.environ.get(key, None) if val is no...
true
true
f70d8714e61a4d5271dd1487b84f2e80f3c91e72
1,783
py
Python
src/tests/ftest/util/check_for_pool.py
gczsjdy/daos
abbd900010562f3acea9c6b1dc2ca98a8d3c71fa
[ "Apache-2.0" ]
null
null
null
src/tests/ftest/util/check_for_pool.py
gczsjdy/daos
abbd900010562f3acea9c6b1dc2ca98a8d3c71fa
[ "Apache-2.0" ]
null
null
null
src/tests/ftest/util/check_for_pool.py
gczsjdy/daos
abbd900010562f3acea9c6b1dc2ca98a8d3c71fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python ''' (C) Copyright 2017-2019 Intel Corporation. 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 applic...
31.839286
79
0.690409
from __future__ import print_function import subprocess def check_for_pool(host, uuid): cmd = "test -e /mnt/daos/" + uuid resp = subprocess.call(["ssh", host, cmd]) if resp == 0: print ('%s exists' %uuid) else: print ('%s does not exist' %uuid) return resp def cleanup_pools(hosts)...
true
true
f70d8858c160355ce2e4c4e67267abae44d1517d
930
py
Python
tests/rules/test_git_rebase_no_changes.py
HiteshMah-Jan/thefuck
132c62262246824470934c2c6f46919ef6f00203
[ "MIT" ]
75,504
2015-04-08T18:22:19.000Z
2022-03-31T23:59:52.000Z
tests/rules/test_git_rebase_no_changes.py
HiteshMah-Jan/thefuck
132c62262246824470934c2c6f46919ef6f00203
[ "MIT" ]
1,160
2015-04-17T18:47:12.000Z
2022-03-30T20:42:26.000Z
tests/rules/test_git_rebase_no_changes.py
HiteshMah-Jan/thefuck
132c62262246824470934c2c6f46919ef6f00203
[ "MIT" ]
4,399
2015-04-17T18:36:04.000Z
2022-03-31T07:01:03.000Z
import pytest from thefuck.rules.git_rebase_no_changes import match, get_new_command from thefuck.types import Command @pytest.fixture def output(): return '''Applying: Test commit No changes - did you forget to use 'git add'? If there is nothing left to stage, chances are that something else already introduced t...
32.068966
77
0.727957
import pytest from thefuck.rules.git_rebase_no_changes import match, get_new_command from thefuck.types import Command @pytest.fixture def output(): return '''Applying: Test commit No changes - did you forget to use 'git add'? If there is nothing left to stage, chances are that something else already introduced t...
true
true
f70d88b536f91eeb75cbe4c3aa4f91d5651da5c2
994
py
Python
psets/pset7/houses/roster.py
malgulam/cs50x
e394f1dab3cbfc2a0c11f840fe8fb9dc8cd2b98b
[ "Apache-2.0" ]
null
null
null
psets/pset7/houses/roster.py
malgulam/cs50x
e394f1dab3cbfc2a0c11f840fe8fb9dc8cd2b98b
[ "Apache-2.0" ]
null
null
null
psets/pset7/houses/roster.py
malgulam/cs50x
e394f1dab3cbfc2a0c11f840fe8fb9dc8cd2b98b
[ "Apache-2.0" ]
null
null
null
# TODO import sys from sys import argv import sqlite3 if len(argv) != 2: print("Usage: python roster.py Gryffindor") sys.exit(1) #setting house choice house_choice = argv[1].lower() #working on database db_file = 'students.db' conn = sqlite3.connect(db_file) c = conn.cursor() #connect to db and retrieve hou...
27.611111
122
0.688129
import sys from sys import argv import sqlite3 if len(argv) != 2: print("Usage: python roster.py Gryffindor") sys.exit(1) house_choice = argv[1].lower() db_file = 'students.db' conn = sqlite3.connect(db_file) c = conn.cursor() c.execute('''SELECT DISTINCT house from students''') houses = c.fetchall() if hou...
true
true
f70d8a3d6e019d9852325e39076f9a22e675d4f4
3,833
py
Python
python/base16vlq.py
milahu/random-0bsd
ec031ad1f3e405893ead8954dfab16aecd07f809
[ "MIT" ]
null
null
null
python/base16vlq.py
milahu/random-0bsd
ec031ad1f3e405893ead8954dfab16aecd07f809
[ "MIT" ]
null
null
null
python/base16vlq.py
milahu/random-0bsd
ec031ad1f3e405893ead8954dfab16aecd07f809
[ "MIT" ]
null
null
null
""" base16vlq.py base16 unsigned variable length quantity (VLQ) based on https://gist.github.com/mjpieters/86b0d152bb51d5f5979346d11005588b https://github.com/Rich-Harris/vlq to encode *signed* integers, we would need _abc_len == 17 python -c $'from base16vlq import encode\nfor n in range(0, 64):\n print(f"{n:3d}...
29.945313
147
0.525959
from typing import List _abc_chars = b"""(,:<[$*?)~=>]@&%""" _abc_table = [None] * (max(_abc_chars) + 1) for i, b in enumerate(_abc_chars): _abc_table[b] = i #_shift_size = 5 # base64 _shift_size = 3 # base16 # one bit is needed for the carry_flag _carry_flag = 1 << _shift_size _mask = (1 << _shift_size) - 1 #...
true
true
f70d8bd6655f06912e9d1f9d9456dc8e6c6ab973
15,880
py
Python
cnld/util.py
bdshieh/cnl-dyna
9013fa11cabb6ad51aaa385b44ef99cc43bf6a2b
[ "MIT" ]
3
2020-07-08T14:42:50.000Z
2021-11-12T06:11:15.000Z
cnld/util.py
bdshieh/cnl-dyna
9013fa11cabb6ad51aaa385b44ef99cc43bf6a2b
[ "MIT" ]
null
null
null
cnld/util.py
bdshieh/cnl-dyna
9013fa11cabb6ad51aaa385b44ef99cc43bf6a2b
[ "MIT" ]
null
null
null
''' Utility functions. ''' import argparse import functools import itertools import os import sqlite3 as sql from contextlib import closing from copy import deepcopy from itertools import repeat import numpy as np import pandas as pd import scipy as sp import scipy.fftpack import scipy.signal from cnld import abstract...
26.466667
87
0.555038
import argparse import functools import itertools import os import sqlite3 as sql from contextlib import closing from copy import deepcopy from itertools import repeat import numpy as np import pandas as pd import scipy as sp import scipy.fftpack import scipy.signal from cnld import abstract from scipy.spatial.distanc...
true
true
f70d8c4e1cd557c34f07a90a39b102830d82dd0f
5,405
py
Python
tensorflow/python/kernel_tests/linalg/linear_operator_adjoint_test.py
datanonymous/TFandroid
89927e863b1ad96184ab09188f62b7e391c896d9
[ "Apache-2.0" ]
36
2016-12-17T15:25:25.000Z
2022-01-29T21:50:53.000Z
tensorflow/python/kernel_tests/linalg/linear_operator_adjoint_test.py
shekharpalit/tensorflow
6aa83398ab03bfae822f36772757097bcb98b6ed
[ "Apache-2.0" ]
59
2019-06-17T09:37:49.000Z
2022-01-19T01:21:34.000Z
tensorflow/python/kernel_tests/linalg/linear_operator_adjoint_test.py
shekharpalit/tensorflow
6aa83398ab03bfae822f36772757097bcb98b6ed
[ "Apache-2.0" ]
36
2017-07-27T21:12:40.000Z
2022-02-03T16:45:56.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...
37.797203
101
0.734135
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import dtypes from tensorflow.python.ops import array_ops from tensorflow.python.ops.linalg import linalg as linalg_lib from tensorflow.python.ops.linalg import linear_operator...
true
true
f70d8c54b493496bbe16c1729da32a19bb99f096
11,218
py
Python
main.py
christopherbugg/HEMS
fdc9c7e0e907e5473e614e0dadc5a27423f18204
[ "MIT" ]
null
null
null
main.py
christopherbugg/HEMS
fdc9c7e0e907e5473e614e0dadc5a27423f18204
[ "MIT" ]
null
null
null
main.py
christopherbugg/HEMS
fdc9c7e0e907e5473e614e0dadc5a27423f18204
[ "MIT" ]
null
null
null
# main.py # python 2.7 # Handy Employee Management System (HEMS) # Basic CLI Employee Management System that interfaces with # a database. # Chris Bugg # Created: 5/10/17 # Imports import os import re import sys from handler import Handler from employee import Employee # Main Class class HEMS: ...
26.395294
100
0.537618
import os import re import sys from handler import Handler from employee import Employee class HEMS: database_handler = Handler() def __init__(self): while True: os.system('cls' if os.name == 'nt' else 'clear') print print "Handy ...
false
true
f70d8c83df5b721001f8b07794266614e5d089a7
162
py
Python
pyrez/exceptions/SessionLimit.py
pytheous/Pyrez
85f6f27359288b5f0ad70ff543f247843ac326f9
[ "MIT" ]
25
2018-07-26T02:32:14.000Z
2021-09-20T03:26:17.000Z
pyrez/exceptions/SessionLimit.py
pytheous/Pyrez
85f6f27359288b5f0ad70ff543f247843ac326f9
[ "MIT" ]
93
2018-08-26T11:44:25.000Z
2022-03-28T08:22:18.000Z
pyrez/exceptions/SessionLimit.py
pytheous/Pyrez
85f6f27359288b5f0ad70ff543f247843ac326f9
[ "MIT" ]
13
2018-09-05T09:38:07.000Z
2021-08-16T04:39:41.000Z
from .PyrezException import PyrezException class SessionLimit(PyrezException): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)
32.4
42
0.722222
from .PyrezException import PyrezException class SessionLimit(PyrezException): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)
true
true
f70d8c900ae72ef49e6de06f8fbb1e74a0973a12
43,042
py
Python
pysnmp-with-texts/BIANCA-BRICK-SIF-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/BIANCA-BRICK-SIF-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/BIANCA-BRICK-SIF-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 BIANCA-BRICK-SIF-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BIANCA-BRICK-SIF-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:38:43 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (defau...
131.626911
4,773
0.787231
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.impo...
true
true
f70d8d3d1901c92377d3073f065701dc3eb38e40
19,185
py
Python
azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/trusted_id_providers_operations.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
1
2018-11-09T06:16:34.000Z
2018-11-09T06:16:34.000Z
azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/trusted_id_providers_operations.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
null
null
null
azure-mgmt-datalake-store/azure/mgmt/datalake/store/operations/trusted_id_providers_operations.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
1
2018-11-09T06:17:41.000Z
2018-11-09T06:17:41.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
48.082707
182
0.675319
from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError import uuid from .. import models class TrustedIdProvidersOperations(object): def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer ...
true
true
f70d8d8d0a5e10ab1459d7f03e210358d64e4181
14,027
py
Python
pytorch_lightning/callbacks/model_checkpoint.py
DanielOrtega94/pytorch-lightning
817d25b157b9e4ad1eb0f74f8583b47f31776857
[ "Apache-2.0" ]
4
2021-02-28T11:58:18.000Z
2022-02-03T03:26:45.000Z
pytorch_lightning/callbacks/model_checkpoint.py
linshaoxin-maker/taas
34e11fab167a7beb78fbe6991ff8721dc9208793
[ "MIT" ]
2
2020-06-20T07:03:34.000Z
2020-07-25T01:49:23.000Z
pytorch_lightning/callbacks/model_checkpoint.py
linshaoxin-maker/taas
34e11fab167a7beb78fbe6991ff8721dc9208793
[ "MIT" ]
1
2020-08-28T00:06:18.000Z
2020-08-28T00:06:18.000Z
""" Model Checkpointing =================== Automatically save model checkpoints during training. """ import os import re import numpy as np from typing import Optional import torch from pytorch_lightning import _logger as log from pytorch_lightning.callbacks.base import Callback from pytorch_lightning.utilities i...
39.962963
113
0.597205
import os import re import numpy as np from typing import Optional import torch from pytorch_lightning import _logger as log from pytorch_lightning.callbacks.base import Callback from pytorch_lightning.utilities import rank_zero_warn, rank_zero_only class ModelCheckpoint(Callback): def __init__(self, filepath...
true
true
f70d8e6ddc0e24af18d11f98db6e85e6d24faab2
7,862
py
Python
code/invivo/diffusion/02_analysis/dipy_atlas_target.py
sitek/subcortical-auditory-atlas
8218140c457ab97a6d897eb26aae4d6240596033
[ "BSD-3-Clause" ]
3
2019-02-27T19:17:52.000Z
2019-03-28T06:24:52.000Z
code/invivo/diffusion/02_analysis/dipy_atlas_target.py
sitek/subcortical-auditory-atlas
8218140c457ab97a6d897eb26aae4d6240596033
[ "BSD-3-Clause" ]
2
2021-04-28T22:55:14.000Z
2021-09-09T13:14:14.000Z
code/invivo/diffusion/02_analysis/dipy_atlas_target.py
sitek/subcortical-auditory-atlas
8218140c457ab97a6d897eb26aae4d6240596033
[ "BSD-3-Clause" ]
3
2019-08-19T14:22:54.000Z
2021-01-21T08:31:50.000Z
''' After creating tractography streamlines with dipy_csd.py, this workflow takes an atlas file and finds connections between each region in the atlas KRS 2018.05.04 ''' from nipype import config config.set('execution', 'remove_unnecessary_outputs', 'false') config.set('execution', 'crashfile_format', 'txt') from nipy...
38.729064
104
0.69537
from nipype import config config.set('execution', 'remove_unnecessary_outputs', 'false') config.set('execution', 'crashfile_format', 'txt') from nipype import Node, Function, Workflow, IdentityInterface, MapNode from nipype.interfaces.io import SelectFiles, DataSink import os from glob import glob out_prefix = 'dipy...
true
true
f70d8e8ea5008eddd8e7aa1c216f2f3abe2fcd32
1,815
py
Python
torch_geometric/graphgym/__init__.py
NucciTheBoss/pytorch_geometric
e220a2c08fa1b2f1672d616c22eac2a67b5c8967
[ "MIT" ]
2,350
2021-09-12T08:32:50.000Z
2022-03-31T18:09:36.000Z
torch_geometric/graphgym/__init__.py
NucciTheBoss/pytorch_geometric
e220a2c08fa1b2f1672d616c22eac2a67b5c8967
[ "MIT" ]
588
2021-09-12T08:49:08.000Z
2022-03-31T21:02:13.000Z
torch_geometric/graphgym/__init__.py
NucciTheBoss/pytorch_geometric
e220a2c08fa1b2f1672d616c22eac2a67b5c8967
[ "MIT" ]
505
2021-09-13T13:13:32.000Z
2022-03-31T15:54:00.000Z
from .contrib import * # noqa from .models import * # noqa from .utils import * # noqa from .checkpoint import load_ckpt, save_ckpt, remove_ckpt, clean_ckpt from .cmd_args import parse_args from .config import (cfg, set_cfg, load_cfg, dump_cfg, set_run_dir, set_out_dir, get_fname) from .init imp...
29.274194
77
0.672727
from .contrib import * from .models import * from .utils import * from .checkpoint import load_ckpt, save_ckpt, remove_ckpt, clean_ckpt from .cmd_args import parse_args from .config import (cfg, set_cfg, load_cfg, dump_cfg, set_run_dir, set_out_dir, get_fname) from .init import init_weights from...
true
true
f70d8fa4f84560af2015c5a1b3a2f184e9248d79
478
py
Python
env/Lib/site-packages/pylint/reporters/collecting_reporter.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
33
2020-10-05T01:04:55.000Z
2021-06-24T01:52:31.000Z
env/Lib/site-packages/pylint/reporters/collecting_reporter.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
14
2020-10-07T03:15:12.000Z
2021-01-15T11:53:29.000Z
env/Lib/site-packages/pylint/reporters/collecting_reporter.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
11
2020-07-31T08:20:43.000Z
2020-08-21T04:08:29.000Z
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING from pylint.reporters.base_reporter import BaseReporter class CollectingReporter(BaseReporter): """collects messages""" name = "collector" def __init__(sel...
23.9
80
0.700837
from pylint.reporters.base_reporter import BaseReporter class CollectingReporter(BaseReporter): name = "collector" def __init__(self): BaseReporter.__init__(self) self.messages = [] def handle_message(self, msg): self.messages.append(msg) _display = None
true
true
f70d8fd065f47a79a3a5fc37f61875b9851e4b48
995
py
Python
get_infoleg.py
crscardellino/sbwce
da39df54f666dcfa4b893bf3a1d1bfc7c801ad57
[ "MIT" ]
30
2017-05-28T05:54:58.000Z
2022-03-12T10:37:23.000Z
get_infoleg.py
NazaGara/sbwce
aea541d6bbe94d17fddb58e2466ce1d83ffae5cc
[ "MIT" ]
1
2018-01-10T12:36:59.000Z
2018-01-10T12:36:59.000Z
get_infoleg.py
NazaGara/sbwce
aea541d6bbe94d17fddb58e2466ce1d83ffae5cc
[ "MIT" ]
8
2019-07-02T05:33:28.000Z
2022-03-13T09:16:08.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import os import requests import sys import tarfile from lxml import etree from tqdm import tqdm INFOLEG_URL = 'https://cs.famaf.unc.edu.ar/~ccardellino/resources/mirel/law_text_cleaned.tar.bz2' IN...
28.428571
97
0.720603
from __future__ import absolute_import, print_function, unicode_literals import os import requests import sys import tarfile from lxml import etree from tqdm import tqdm INFOLEG_URL = 'https://cs.famaf.unc.edu.ar/~ccardellino/resources/mirel/law_text_cleaned.tar.bz2' INFOLEG_TMP = '/tmp/infoleg.tar.bz2' INFOLEG_OUT...
true
true
f70d9006df1d3358e295c37467a8911a38d78293
1,137
py
Python
setup.py
martok/py-symcircuit
c48b1ad8ae4e496306da0c0a7474b4cd968a629f
[ "MIT" ]
null
null
null
setup.py
martok/py-symcircuit
c48b1ad8ae4e496306da0c0a7474b4cd968a629f
[ "MIT" ]
null
null
null
setup.py
martok/py-symcircuit
c48b1ad8ae4e496306da0c0a7474b4cd968a629f
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages setup( name="SymCircuit", version="0.2.0", author="Martok", author_email="martok@martoks-place.de", description="Symbolic electronic circuit analysis", long_description=open("README.md","rt").read(), long_description_content...
28.425
80
0.601583
from setuptools import setup, find_packages setup( name="SymCircuit", version="0.2.0", author="Martok", author_email="martok@martoks-place.de", description="Symbolic electronic circuit analysis", long_description=open("README.md","rt").read(), long_description_content_type="text/markdown",...
true
true
f70d90d6d3226de3373ba626ee5ba1d83ff5c2ce
229
py
Python
backend/src/hatchling/builders/plugin/hooks.py
daobook/hatch
1cf39ad1a11ce90bc77fb7fdc4b9202433509179
[ "MIT" ]
null
null
null
backend/src/hatchling/builders/plugin/hooks.py
daobook/hatch
1cf39ad1a11ce90bc77fb7fdc4b9202433509179
[ "MIT" ]
null
null
null
backend/src/hatchling/builders/plugin/hooks.py
daobook/hatch
1cf39ad1a11ce90bc77fb7fdc4b9202433509179
[ "MIT" ]
null
null
null
from ...plugin import hookimpl from ..custom import CustomBuilder from ..sdist import SdistBuilder from ..wheel import WheelBuilder @hookimpl def hatch_register_builder(): return [CustomBuilder, SdistBuilder, WheelBuilder]
22.9
54
0.799127
from ...plugin import hookimpl from ..custom import CustomBuilder from ..sdist import SdistBuilder from ..wheel import WheelBuilder @hookimpl def hatch_register_builder(): return [CustomBuilder, SdistBuilder, WheelBuilder]
true
true
f70d919605a55c19587a7f0cfaa146dd71e5ac23
5,390
py
Python
python/ray/tests/test_multinode_failures.py
jacobowitz/ray
a69f2c7bf759b35fa6573329ec244a60f4d56a2a
[ "Apache-2.0" ]
1
2021-03-13T08:18:36.000Z
2021-03-13T08:18:36.000Z
python/ray/tests/test_multinode_failures.py
jacobowitz/ray
a69f2c7bf759b35fa6573329ec244a60f4d56a2a
[ "Apache-2.0" ]
null
null
null
python/ray/tests/test_multinode_failures.py
jacobowitz/ray
a69f2c7bf759b35fa6573329ec244a60f4d56a2a
[ "Apache-2.0" ]
null
null
null
import os import signal import sys import time import pytest import ray import ray.ray_constants as ray_constants from ray._private.cluster_utils import Cluster from ray.test_utils import RayTestTimeoutException, get_other_nodes SIGKILL = signal.SIGKILL if sys.platform != "win32" else signal.SIGTERM @pytest.fixtur...
31.520468
79
0.64026
import os import signal import sys import time import pytest import ray import ray.ray_constants as ray_constants from ray._private.cluster_utils import Cluster from ray.test_utils import RayTestTimeoutException, get_other_nodes SIGKILL = signal.SIGKILL if sys.platform != "win32" else signal.SIGTERM @pytest.fixtur...
true
true
f70d92ad79eb85d982080b22c087b526d599548f
4,699
py
Python
src/websockets/datastructures.py
pushp-garg/websockets
aa93c4ceca90a1798f86b2fc2b110a42f308d721
[ "BSD-3-Clause" ]
3
2021-04-02T08:35:24.000Z
2021-04-02T08:49:47.000Z
src/websockets/datastructures.py
pushp-garg/websockets
aa93c4ceca90a1798f86b2fc2b110a42f308d721
[ "BSD-3-Clause" ]
null
null
null
src/websockets/datastructures.py
pushp-garg/websockets
aa93c4ceca90a1798f86b2fc2b110a42f308d721
[ "BSD-3-Clause" ]
2
2021-04-02T08:40:50.000Z
2021-04-02T08:45:23.000Z
""" This module defines a data structure for manipulating HTTP headers. """ from typing import ( Any, Dict, Iterable, Iterator, List, Mapping, MutableMapping, Tuple, Union, ) __all__ = ["Headers", "MultipleValuesError"] class MultipleValuesError(LookupError): """ Except...
29.36875
83
0.625239
from typing import ( Any, Dict, Iterable, Iterator, List, Mapping, MutableMapping, Tuple, Union, ) __all__ = ["Headers", "MultipleValuesError"] class MultipleValuesError(LookupError): def __str__(self) -> str: if len(self.args) == 1: return repr(...
true
true
f70d92b75a6e4cfc361c5e2dd6d2c9296d030ae6
318
py
Python
__init__.py
TheXu/Inverse_Logistic_Regression_Recommender
7dcba1f240f818488382d4727c2e2c252baea9b8
[ "MIT" ]
null
null
null
__init__.py
TheXu/Inverse_Logistic_Regression_Recommender
7dcba1f240f818488382d4727c2e2c252baea9b8
[ "MIT" ]
null
null
null
__init__.py
TheXu/Inverse_Logistic_Regression_Recommender
7dcba1f240f818488382d4727c2e2c252baea9b8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Inverse Logistic Regression Recommender Created on 2019 @author: Alex Xu <ayx2@case.edu> """ from .predict_feature_values import InverseLogisticRegressionRecommender from .evaluate import validate from .evaluate import _error_metrics_ __all__ = [ 'validate', '_error_metrics_' ]
18.705882
72
0.751572
from .predict_feature_values import InverseLogisticRegressionRecommender from .evaluate import validate from .evaluate import _error_metrics_ __all__ = [ 'validate', '_error_metrics_' ]
true
true
f70d92d287bb997262dc6ea43cb19d2451852d47
1,799
py
Python
chapter_3/3_6_animal_shelter.py
elishaking/CTCi
6a91fd67e8765e5abef72c5b247f4d5444945438
[ "MIT" ]
1
2020-07-03T09:47:34.000Z
2020-07-03T09:47:34.000Z
chapter_3/3_6_animal_shelter.py
elishaking/CTCi
6a91fd67e8765e5abef72c5b247f4d5444945438
[ "MIT" ]
null
null
null
chapter_3/3_6_animal_shelter.py
elishaking/CTCi
6a91fd67e8765e5abef72c5b247f4d5444945438
[ "MIT" ]
null
null
null
import enum from queue import Queue class Animal(enum.Enum): cat = 'cat' dog = 'dog' class AnimalShelter: def __init__(self): self.cats = Queue() self.dogs = Queue() self.pos = 0 # Time complexity: O(1) # Space complexity: O(1) def enqueue(self, animal: Animal): ...
23.671053
71
0.573096
import enum from queue import Queue class Animal(enum.Enum): cat = 'cat' dog = 'dog' class AnimalShelter: def __init__(self): self.cats = Queue() self.dogs = Queue() self.pos = 0 def enqueue(self, animal: Animal): if animal == Animal.cat: self.cat...
true
true
f70d933e514a7e9af7d35401d59b56c3517a80a8
5,750
py
Python
cleverhans/future/tf2/attacks/fast_gradient_method.py
HaojieYuan/cleverhans
02a5ac27870ad8318c1e6ef3b210467e3500fdd9
[ "MIT" ]
21
2019-06-07T17:05:30.000Z
2022-02-07T03:25:15.000Z
cleverhans/future/tf2/attacks/fast_gradient_method.py
HaojieYuan/cleverhans
02a5ac27870ad8318c1e6ef3b210467e3500fdd9
[ "MIT" ]
null
null
null
cleverhans/future/tf2/attacks/fast_gradient_method.py
HaojieYuan/cleverhans
02a5ac27870ad8318c1e6ef3b210467e3500fdd9
[ "MIT" ]
8
2019-06-11T03:06:29.000Z
2022-01-18T04:18:27.000Z
"""The Fast Gradient Method attack.""" import numpy as np import tensorflow as tf def fast_gradient_method(model_fn, x, eps, ord, clip_min=None, clip_max=None, y=None, targeted=False, sanity_checks=False): """ Tensorflow 2.0 implementation of the Fast Gradient Method. :param model_fn: ...
44.573643
112
0.722087
import numpy as np import tensorflow as tf def fast_gradient_method(model_fn, x, eps, ord, clip_min=None, clip_max=None, y=None, targeted=False, sanity_checks=False): if ord not in [np.inf, 1, 2]: raise ValueError("Norm order must be either np.inf, 1, or 2.") asserts = [] if cl...
true
true
f70d937a2f3eb0c27ac1061da0f0c175ebf0e68f
1,695
py
Python
tools/ports/sdl2_net.py
talrasha/emscripten
5ece531a4bc724b133da0e1b0ce061e0c2e7bebd
[ "MIT" ]
1
2021-06-15T20:40:30.000Z
2021-06-15T20:40:30.000Z
tools/ports/sdl2_net.py
talrasha/emscripten
5ece531a4bc724b133da0e1b0ce061e0c2e7bebd
[ "MIT" ]
null
null
null
tools/ports/sdl2_net.py
talrasha/emscripten
5ece531a4bc724b133da0e1b0ce061e0c2e7bebd
[ "MIT" ]
null
null
null
# Copyright 2016 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. import os import logging TAG = 'version_2' HASH = '317b22ad9b6b2f7b4...
33.235294
141
0.703835
import os import logging TAG = 'version_2' HASH = '317b22ad9b6b2f7b40fac7b7c426da2fa2da1803bbe58d480631f1e5b190d730763f2768c77c72affa806c69a1e703f401b15a1be3ec611cd259950d5ebc3711' def needed(settings): return settings.USE_SDL_NET == 2 def get(ports, settings, shared): sdl_build = os.path.join(ports.get_build...
true
true
f70d94efdaf5515a4cd7eccef6c077140b0a5904
24
py
Python
sitgan/data/__init__.py
clintonjwang/sitgan
05210ec13073bcca9b4dbff798fb626d963082dc
[ "MIT" ]
null
null
null
sitgan/data/__init__.py
clintonjwang/sitgan
05210ec13073bcca9b4dbff798fb626d963082dc
[ "MIT" ]
null
null
null
sitgan/data/__init__.py
clintonjwang/sitgan
05210ec13073bcca9b4dbff798fb626d963082dc
[ "MIT" ]
null
null
null
from . import transforms
24
24
0.833333
from . import transforms
true
true
f70d9574d01b85f8c6cf508bbfc319ed7382d21b
4,863
py
Python
pykeyset/utils/logging.py
staticintlucas/pykeyset
8581252c85dfceebe22926af4640164a0895e7a0
[ "Apache-2.0", "MIT" ]
1
2021-07-06T16:43:25.000Z
2021-07-06T16:43:25.000Z
pykeyset/utils/logging.py
staticintlucas/pykeyset
8581252c85dfceebe22926af4640164a0895e7a0
[ "Apache-2.0", "MIT" ]
null
null
null
pykeyset/utils/logging.py
staticintlucas/pykeyset
8581252c85dfceebe22926af4640164a0895e7a0
[ "Apache-2.0", "MIT" ]
null
null
null
import inspect import sys from pathlib import Path from types import TracebackType from typing import NoReturn, Optional, Union import rich.console import typer from . import Severity, Verbosity from .config import config __all__ = ["error", "warning", "info", "debug"] COLOR_MAP = { Severity.ERROR: "red", ...
31.577922
99
0.652478
import inspect import sys from pathlib import Path from types import TracebackType from typing import NoReturn, Optional, Union import rich.console import typer from . import Severity, Verbosity from .config import config __all__ = ["error", "warning", "info", "debug"] COLOR_MAP = { Severity.ERROR: "red", ...
true
true
f70d95b29b25b745f9f62876f9ff2ab90112943d
1,234
py
Python
notebooks/project_functions.py
data301-2021-winter1/project-group25-project
203421ca91c95786de4a2fff5412693493b9371f
[ "MIT" ]
null
null
null
notebooks/project_functions.py
data301-2021-winter1/project-group25-project
203421ca91c95786de4a2fff5412693493b9371f
[ "MIT" ]
null
null
null
notebooks/project_functions.py
data301-2021-winter1/project-group25-project
203421ca91c95786de4a2fff5412693493b9371f
[ "MIT" ]
1
2021-10-31T20:46:34.000Z
2021-10-31T20:46:34.000Z
import pandas as pd import numpy as np def load_and_process_data(path): rawData = pd.read_csv(path, sep=";") rawData = rawData[rawData.columns[:-2]].dropna().rename(columns={"RH": "Relative Humidity", "AH": "Absolute Humdity", "T": "Temp"}) for col in rawData.columns: #covert strings into floa...
36.294118
135
0.60859
import pandas as pd import numpy as np def load_and_process_data(path): rawData = pd.read_csv(path, sep=";") rawData = rawData[rawData.columns[:-2]].dropna().rename(columns={"RH": "Relative Humidity", "AH": "Absolute Humdity", "T": "Temp"}) for col in rawData.columns: if rawData[col].d...
true
true
f70d95c5b7bb3ce53da0664c50022da70c4679e7
3,359
py
Python
analytical/templatetags/woopra.py
rristow/django-analytical
87fed08537174e7b018b7364ce1dade31015f1d9
[ "MIT" ]
null
null
null
analytical/templatetags/woopra.py
rristow/django-analytical
87fed08537174e7b018b7364ce1dade31015f1d9
[ "MIT" ]
null
null
null
analytical/templatetags/woopra.py
rristow/django-analytical
87fed08537174e7b018b7364ce1dade31015f1d9
[ "MIT" ]
null
null
null
""" Woopra template tags and filters. """ from __future__ import absolute_import import json import re from django.conf import settings from django.template import Library, Node, TemplateSyntaxError from analytical.utils import ( disable_html, get_identity, get_required_setting, get_user_from_contex...
32.298077
540
0.622209
from __future__ import absolute_import import json import re from django.conf import settings from django.template import Library, Node, TemplateSyntaxError from analytical.utils import ( disable_html, get_identity, get_required_setting, get_user_from_context, get_user_is_authenticated, is_i...
true
true
f70d95f727bc95acfcd6297cb018c2d395fbfd5c
1,277
py
Python
.docker/Redis/redispass.py
andersonpem/cpmr-stack
b06da6a1dce922b822cbb8884efde08ad92f3d46
[ "MIT" ]
1
2020-06-18T18:52:17.000Z
2020-06-18T18:52:17.000Z
.docker/Redis/redispass.py
andersonpem/cpmr-stack
b06da6a1dce922b822cbb8884efde08ad92f3d46
[ "MIT" ]
null
null
null
.docker/Redis/redispass.py
andersonpem/cpmr-stack
b06da6a1dce922b822cbb8884efde08ad92f3d46
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os, sys from os import path clear = lambda: os.system('clear') green = "\033[1;32;2m" greenblink = "\033[1;32;5m" yellow = "\033[1;33;2m" yellowblink = "\033[1;33;5m" redblink = "\033[1;31;5m" red = "\033[1;31;2m" white = "\033[1;37;0m" normal = "\033[0m" # ========...
41.193548
94
0.602193
import os, sys from os import path clear = lambda: os.system('clear') green = "\033[1;32;2m" greenblink = "\033[1;32;5m" yellow = "\033[1;33;2m" yellowblink = "\033[1;33;5m" redblink = "\033[1;31;5m" red = "\033[1;31;2m" white = "\033[1;37;0m" normal = "\033[0m" if not path.exists("/run/secrets/redis_secret"): pri...
true
true
f70d968be6e53e9add9f2f5cc5c6f2bcc49aa019
11,071
py
Python
octavia/tests/unit/common/tls_utils/test_cert_parser.py
lingxiankong/octavia
4a5c24ef6fcd3b5f198a20d780dedd7f7976296d
[ "Apache-2.0" ]
null
null
null
octavia/tests/unit/common/tls_utils/test_cert_parser.py
lingxiankong/octavia
4a5c24ef6fcd3b5f198a20d780dedd7f7976296d
[ "Apache-2.0" ]
null
null
null
octavia/tests/unit/common/tls_utils/test_cert_parser.py
lingxiankong/octavia
4a5c24ef6fcd3b5f198a20d780dedd7f7976296d
[ "Apache-2.0" ]
null
null
null
# # Copyright 2014 OpenStack Foundation. 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 req...
43.586614
78
0.65658
import datetime from cryptography import x509 import mock from octavia.common import data_models import octavia.common.exceptions as exceptions import octavia.common.tls_utils.cert_parser as cert_parser from octavia.tests.common import sample_certs from octavia.tests.unit import base from octavia.tests.unit.common.sa...
true
true
f70d969d2d54edc6fc7cd0ed266f778078fe1b26
2,549
py
Python
experiments/produce_images.py
hietalajulius/clothmanip
ec2ee1177d5cf31ee2367c2576c34b9cf3691501
[ "MIT" ]
null
null
null
experiments/produce_images.py
hietalajulius/clothmanip
ec2ee1177d5cf31ee2367c2576c34b9cf3691501
[ "MIT" ]
null
null
null
experiments/produce_images.py
hietalajulius/clothmanip
ec2ee1177d5cf31ee2367c2576c34b9cf3691501
[ "MIT" ]
null
null
null
from clothmanip.utils.utils import get_variant, argsparser, get_randomized_env, dump_commit_hashes, get_keys_and_dims, dump_goal from clothmanip.envs.cloth import ClothEnvPickled as ClothEnv import numpy as np from rlkit.torch.sac.policies import TanhGaussianPolicy, MakeDeterministic, TanhScriptPolicy, CustomScriptPoli...
39.215385
150
0.723029
from clothmanip.utils.utils import get_variant, argsparser, get_randomized_env, dump_commit_hashes, get_keys_and_dims, dump_goal from clothmanip.envs.cloth import ClothEnvPickled as ClothEnv import numpy as np from rlkit.torch.sac.policies import TanhGaussianPolicy, MakeDeterministic, TanhScriptPolicy, CustomScriptPoli...
true
true
f70d969e2bf0cf36ad855ee81686eb3925662821
482
py
Python
exercises/en/solution_03_09_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/en/solution_03_09_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/en/solution_03_09_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
from spacy.lang.en import English from spacy.tokens import Token nlp = English() # Register the Token extension attribute "is_country" with the default value False Token.set_extension("is_country", default=False) # Process the text and set the is_country attribute to True for the token "Spain" doc = nlp("I live in S...
32.133333
82
0.767635
from spacy.lang.en import English from spacy.tokens import Token nlp = English() Token.set_extension("is_country", default=False) doc = nlp("I live in Spain.") doc[3]._.is_country = True print([(token.text, token._.is_country) for token in doc])
true
true
f70d96bce35013ac957938e048f02f5425a2e2f2
569
bzl
Python
example/third_party/org_eclipse_jgit.bzl
wix-playground/rules_maven_third_party
ff0b486df194779d7d8e6c9102cd12138e3305c3
[ "Apache-2.0" ]
null
null
null
example/third_party/org_eclipse_jgit.bzl
wix-playground/rules_maven_third_party
ff0b486df194779d7d8e6c9102cd12138e3305c3
[ "Apache-2.0" ]
null
null
null
example/third_party/org_eclipse_jgit.bzl
wix-playground/rules_maven_third_party
ff0b486df194779d7d8e6c9102cd12138e3305c3
[ "Apache-2.0" ]
null
null
null
load("@rules_maven_third_party//:import_external.bzl", import_external = "import_external") def dependencies(): import_external( name = "org_eclipse_jgit_org_eclipse_jgit", artifact = "org.eclipse.jgit:org.eclipse.jgit:5.11.0.202103091610-r", artifact_sha256 = "b0f012105d67729a67c7fde546b6e...
40.642857
93
0.713533
load("@rules_maven_third_party//:import_external.bzl", import_external = "import_external") def dependencies(): import_external( name = "org_eclipse_jgit_org_eclipse_jgit", artifact = "org.eclipse.jgit:org.eclipse.jgit:5.11.0.202103091610-r", artifact_sha256 = "b0f012105d67729a67c7fde546b6e...
true
true
f70d97557a7fce5e61b5bf6370cefe3820b37663
5,603
py
Python
models/image_classification/inception/inception_resnet.py
tensorize/models
453165bc0cb2ed7bc1136f038458503aee6fccc3
[ "Apache-2.0" ]
null
null
null
models/image_classification/inception/inception_resnet.py
tensorize/models
453165bc0cb2ed7bc1136f038458503aee6fccc3
[ "Apache-2.0" ]
null
null
null
models/image_classification/inception/inception_resnet.py
tensorize/models
453165bc0cb2ed7bc1136f038458503aee6fccc3
[ "Apache-2.0" ]
null
null
null
from tensorize import * class InceptionResnetV1(Model): def inference(self, inputs, output): stem(inputs, outputs) for x in xrange(4): inceptionA() reductionA() for x in xrange(7): inceptionB() reductionB() for x in xrange(3): ...
23.248963
54
0.557558
from tensorize import * class InceptionResnetV1(Model): def inference(self, inputs, output): stem(inputs, outputs) for x in xrange(4): inceptionA() reductionA() for x in xrange(7): inceptionB() reductionB() for x in xrange(3): ...
true
true
f70d975dbe2f348e5ab72227d7ff4eef71b35806
2,934
py
Python
django/core/files/temp.py
indevgr/django
0247c9b08f8da4a2d93b9cede6c615011552b55a
[ "PSF-2.0", "BSD-3-Clause" ]
1
2016-05-22T08:25:51.000Z
2016-05-22T08:25:51.000Z
django/core/files/temp.py
indevgr/django
0247c9b08f8da4a2d93b9cede6c615011552b55a
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/core/files/temp.py
indevgr/django
0247c9b08f8da4a2d93b9cede6c615011552b55a
[ "PSF-2.0", "BSD-3-Clause" ]
1
2016-04-21T11:47:46.000Z
2016-04-21T11:47:46.000Z
""" The temp module provides a NamedTemporaryFile that can be reopened in the same process on any platform. Most platforms use the standard Python tempfile.NamedTemporaryFile class, but Windows users are given a custom class. This is needed because the Python implementation of NamedTemporaryFile uses the O_TEMPORARY f...
34.517647
83
0.644172
import os import tempfile from django.core.files.utils import FileProxyMixin __all__ = ('NamedTemporaryFile', 'gettempdir',) if os.name == 'nt': class TemporaryFile(FileProxyMixin): def __init__(self, mode='w+b', bufsize=-1, suffix='', prefix='', dir=None): fd, name = tempfile.mkstemp(suffi...
true
true
f70d988d5ed014b8b9c619af3b5473012ca3b7cd
2,041
py
Python
tokenswap/app/__init__.py
trinity-project/trinity
081eba1d4294a3bed33ba18c3f7b862b8803ee22
[ "MIT" ]
60
2018-01-12T07:33:15.000Z
2021-12-28T23:06:28.000Z
tokenswap/app/__init__.py
trinity-project/trinity
081eba1d4294a3bed33ba18c3f7b862b8803ee22
[ "MIT" ]
13
2018-01-23T00:14:35.000Z
2020-04-23T00:03:31.000Z
tokenswap/app/__init__.py
trinity-project/trinity
081eba1d4294a3bed33ba18c3f7b862b8803ee22
[ "MIT" ]
13
2018-01-05T07:27:29.000Z
2021-01-06T16:45:05.000Z
# -*- coding: utf-8 -*- __author__ = 'xu' import os from functools import wraps from flask import Flask, Blueprint, jsonify from flask_peewee.db import Database from flask_peewee.auth import Auth from flask_debugtoolbar import DebugToolbarExtension from flask_mail import Mail from flask_login import LoginManager fro...
27.213333
136
0.709456
__author__ = 'xu' import os from functools import wraps from flask import Flask, Blueprint, jsonify from flask_peewee.db import Database from flask_peewee.auth import Auth from flask_debugtoolbar import DebugToolbarExtension from flask_mail import Mail from flask_login import LoginManager from flask_restful import A...
false
true
f70d989095a9c5a971fdea4aa937edd891c61ae0
7,009
py
Python
python/cendalytics/report/core/dmo/ranking_report_writer.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/cendalytics/report/core/dmo/ranking_report_writer.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
python/cendalytics/report/core/dmo/ranking_report_writer.py
jiportilla/ontology
8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from openpyxl.worksheet.worksheet import Worksheet COLUMNS = {"A": 20, "B": 10, "C": 10, "D": 10, "E": 10, "F": 10, "G": 10, "H": 10, "I": 10} class RankingReportWriter(object): ...
38.938889
92
0.548723
from openpyxl.worksheet.worksheet import Worksheet COLUMNS = {"A": 20, "B": 10, "C": 10, "D": 10, "E": 10, "F": 10, "G": 10, "H": 10, "I": 10} class RankingReportWriter(object): def __init__(self, some_exce...
true
true
f70d98c16626cf822bb3cda9eb6e1159f8a17a26
393
py
Python
news-headlines/initselenium.py
OlegDurandin/Crawlers
ab9fbe7aaec43b5251762f1a04e624d440e4b0d9
[ "MIT" ]
null
null
null
news-headlines/initselenium.py
OlegDurandin/Crawlers
ab9fbe7aaec43b5251762f1a04e624d440e4b0d9
[ "MIT" ]
null
null
null
news-headlines/initselenium.py
OlegDurandin/Crawlers
ab9fbe7aaec43b5251762f1a04e624d440e4b0d9
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.common.exceptions import NoSuchElementException def selenium_initializer(): options = webdriver.ChromeOptions() options.add_argument('--ignore-certificate-errors') options.add_argument('--ignore-ssl-errors') driver = webdriver.Chrome('../chromedriver', chrom...
32.75
72
0.760814
from selenium import webdriver from selenium.common.exceptions import NoSuchElementException def selenium_initializer(): options = webdriver.ChromeOptions() options.add_argument('--ignore-certificate-errors') options.add_argument('--ignore-ssl-errors') driver = webdriver.Chrome('../chromedriver', chrom...
true
true
f70d9934f9a74adb2b61765bbae200c7051d841e
1,141
py
Python
autogit/main.py
quintenroets/gitmanager
bfe131bd23ccaaa37ad6624112fe465adff1fda0
[ "MIT" ]
null
null
null
autogit/main.py
quintenroets/gitmanager
bfe131bd23ccaaa37ad6624112fe465adff1fda0
[ "MIT" ]
null
null
null
autogit/main.py
quintenroets/gitmanager
bfe131bd23ccaaa37ad6624112fe465adff1fda0
[ "MIT" ]
null
null
null
import argparse def install(*args): from .installer import Installer # noqa: autoimport Installer.install(*args) def clone(*args): from .installer import Installer # noqa: autoimport Installer.clone(*args) def refresh(do_pull=False): from .repomanager import RepoManager # noqa: autoimport...
22.82
88
0.668712
import argparse def install(*args): from .installer import Installer Installer.install(*args) def clone(*args): from .installer import Installer Installer.clone(*args) def refresh(do_pull=False): from .repomanager import RepoManager RepoManager.refresh(do_pull=do_pull) def run_hook...
true
true
f70d99476357b7a92f0400eda44cc0bffb1a4c42
2,231
py
Python
linum/layer_list.py
chabErch/Linum
e32ec01f0b43cfb03fd33ad90cf25df9a0c6565f
[ "MIT" ]
null
null
null
linum/layer_list.py
chabErch/Linum
e32ec01f0b43cfb03fd33ad90cf25df9a0c6565f
[ "MIT" ]
null
null
null
linum/layer_list.py
chabErch/Linum
e32ec01f0b43cfb03fd33ad90cf25df9a0c6565f
[ "MIT" ]
null
null
null
from datetime import date from typing import List, Tuple, Optional from linum.exceptions import IntersectionException from linum.layer import Layer from linum.task_part import TaskPart class LayerList: def __init__(self, layers: Optional[List[Layer]] = None): """ Массив слоев. :param la...
28.240506
78
0.603765
from datetime import date from typing import List, Tuple, Optional from linum.exceptions import IntersectionException from linum.layer import Layer from linum.task_part import TaskPart class LayerList: def __init__(self, layers: Optional[List[Layer]] = None): self.layers = layers or [] def __repr__...
true
true
f70d99f39179924a992e9bdff97d615e2b14ab03
96,559
py
Python
tests/unit/gapic/dialogflow_v2/test_versions.py
googleapis/dialogflow-python-client-v2
069c71e296c94b5e1bcfb9be2abeadd7c44dcf3d
[ "Apache-2.0" ]
171
2018-09-19T21:16:18.000Z
2020-12-07T17:41:10.000Z
tests/unit/gapic/dialogflow_v2/test_versions.py
googleapis/dialogflow-python-client-v2
069c71e296c94b5e1bcfb9be2abeadd7c44dcf3d
[ "Apache-2.0" ]
150
2018-09-25T14:04:28.000Z
2020-12-09T21:45:43.000Z
tests/unit/gapic/dialogflow_v2/test_versions.py
googleapis/dialogflow-python-client-v2
069c71e296c94b5e1bcfb9be2abeadd7c44dcf3d
[ "Apache-2.0" ]
75
2018-09-22T14:12:18.000Z
2020-12-08T07:12:12.000Z
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.828942
106
0.666163
import os try: from unittest import mock from unittest.mock import AsyncMock except ImportError: import mock import grpc from grpc.experimental import aio import math import pytest from proto.marshal.rules.dates import DurationRule, TimestampRule from google.api_core import client_options from google.ap...
true
true
f70d9a641d059770d87b4867f1e577295635ca6d
356
py
Python
app/__init__.py
WebPractices/Eager
ce509dbbd65199e70b76aad82ba740e80864ac65
[ "MIT" ]
null
null
null
app/__init__.py
WebPractices/Eager
ce509dbbd65199e70b76aad82ba740e80864ac65
[ "MIT" ]
null
null
null
app/__init__.py
WebPractices/Eager
ce509dbbd65199e70b76aad82ba740e80864ac65
[ "MIT" ]
null
null
null
from flask import Flask def create_app(flask_config): app = Flask(__name__) app.config.from_object('app.config.{}'.format(flask_config)) from app.api import api_bp from app.client import client_bp app.register_blueprint(api_bp) app.register_blueprint(client_bp) app.logger.info('>>> {}'.f...
23.733333
64
0.716292
from flask import Flask def create_app(flask_config): app = Flask(__name__) app.config.from_object('app.config.{}'.format(flask_config)) from app.api import api_bp from app.client import client_bp app.register_blueprint(api_bp) app.register_blueprint(client_bp) app.logger.info('>>> {}'.f...
true
true
f70d9a737cfddc36a288fb6856a05809b5e5cfd6
910
py
Python
idm_lp/commands/disable_notifications.py
lper1/dgm-.
aae14b2758b220f42030745bb941e7012bf77ae2
[ "MIT" ]
47
2020-09-15T11:13:35.000Z
2022-03-30T06:37:52.000Z
idm_lp/commands/disable_notifications.py
lper1/dgm-.
aae14b2758b220f42030745bb941e7012bf77ae2
[ "MIT" ]
2
2020-10-27T15:30:33.000Z
2020-11-14T16:50:01.000Z
idm_lp/commands/disable_notifications.py
lper1/dgm-.
aae14b2758b220f42030745bb941e7012bf77ae2
[ "MIT" ]
111
2020-09-27T20:06:42.000Z
2022-03-19T20:29:29.000Z
from vkbottle.rule import FromMe from vkbottle.user import Blueprint, Message from idm_lp.logger import logger_decorator from idm_lp.database import Database from idm_lp.utils import edit_message user = Blueprint( name='disable_notifications_blueprint' ) @user.on.message_handler(FromMe(), text="<prefix:service...
29.354839
85
0.774725
from vkbottle.rule import FromMe from vkbottle.user import Blueprint, Message from idm_lp.logger import logger_decorator from idm_lp.database import Database from idm_lp.utils import edit_message user = Blueprint( name='disable_notifications_blueprint' ) @user.on.message_handler(FromMe(), text="<prefix:service...
true
true
f70d9a74aa623ec70705e6fa9613849704b54d16
2,646
py
Python
bot.py
Cr3atable/Brick
012fc2bb91b7950763cf8da04f11509d0e638efe
[ "Apache-2.0" ]
1
2021-03-27T06:24:25.000Z
2021-03-27T06:24:25.000Z
bot.py
Cr3atable/Brick
012fc2bb91b7950763cf8da04f11509d0e638efe
[ "Apache-2.0" ]
null
null
null
bot.py
Cr3atable/Brick
012fc2bb91b7950763cf8da04f11509d0e638efe
[ "Apache-2.0" ]
null
null
null
""" Copyright (c) 2020, creatable 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 dis...
37.8
148
0.616402
import aiohttp import asyncio import discord import html from discord.ext import commands bot = commands.Bot(command_prefix='b!', description="""A utility bot for Reddit verification. Copyright (c) 2020, creatable (https://creatable.cafe)""") @bot.event async def on_ready(): print(""" _ _ _ ...
true
true
f70d9b48a9595eaeded188e32ec69facb65e394d
12,573
py
Python
phosphor-regulators/tools/validate-regulators-config.py
smccarney/phosphor-power
39ea02bc9458f3d5a7fdd317cb546ed046eaff78
[ "Apache-2.0" ]
7
2019-10-04T01:19:49.000Z
2021-06-02T23:11:19.000Z
phosphor-regulators/tools/validate-regulators-config.py
smccarney/phosphor-power
39ea02bc9458f3d5a7fdd317cb546ed046eaff78
[ "Apache-2.0" ]
9
2019-10-23T14:22:03.000Z
2022-03-22T20:39:05.000Z
phosphor-regulators/tools/validate-regulators-config.py
smccarney/phosphor-power
39ea02bc9458f3d5a7fdd317cb546ed046eaff78
[ "Apache-2.0" ]
11
2019-10-04T01:20:01.000Z
2022-03-03T06:08:16.000Z
#!/usr/bin/env python3 import argparse import json import jsonschema import os import sys r""" Validates the phosphor-regulators configuration file. Checks it against a JSON schema as well as doing some extra checks that can't be encoded in the schema. """ def handle_validation_error(): sys.exit("Validation fail...
34.636364
81
0.638432
import argparse import json import jsonschema import os import sys def handle_validation_error(): sys.exit("Validation failed.") def get_values(json_element, key, result = None): if result is None: result = [] if type(json_element) is dict: for json_key in json_element: if j...
true
true
f70d9c25fc56a2ac4d94d2cb43a5ca522a38b635
1,607
py
Python
playrcc/src/base/http/api.py
Gloryness/playrcc
3816a935f19c786db59ba5a46a98cc527053cc29
[ "MIT" ]
4
2020-09-24T14:25:01.000Z
2020-11-02T22:18:12.000Z
playrcc/src/base/http/api.py
Gloryness/playrcc
3816a935f19c786db59ba5a46a98cc527053cc29
[ "MIT" ]
null
null
null
playrcc/src/base/http/api.py
Gloryness/playrcc
3816a935f19c786db59ba5a46a98cc527053cc29
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup class API: def __init__(self, auth): self.auth = auth self.api = 'https://api.playr.gg/api/enter' self.headers = { 'Accept': "application/json, text/plain, */*", 'Accept-Encoding': "gzip, deflate, br", 'Accept...
32.795918
136
0.549471
import requests from bs4 import BeautifulSoup class API: def __init__(self, auth): self.auth = auth self.api = 'https://api.playr.gg/api/enter' self.headers = { 'Accept': "application/json, text/plain, */*", 'Accept-Encoding': "gzip, deflate, br", 'Accept...
true
true
f70d9c4aa6bad7b33a8cb47b9785a6f7e6a8b67b
6,020
py
Python
biosys/apps/main/tests/api/test_program.py
florianm/biosys
934d06ed805b0734f3cb9a00feec6cd81a94e512
[ "Apache-2.0" ]
1
2020-08-24T02:44:36.000Z
2020-08-24T02:44:36.000Z
biosys/apps/main/tests/api/test_program.py
florianm/biosys
934d06ed805b0734f3cb9a00feec6cd81a94e512
[ "Apache-2.0" ]
19
2016-09-29T01:03:18.000Z
2021-07-02T06:54:05.000Z
biosys/apps/main/tests/api/test_program.py
florianm/biosys
934d06ed805b0734f3cb9a00feec6cd81a94e512
[ "Apache-2.0" ]
5
2018-12-20T05:36:28.000Z
2021-09-29T00:44:31.000Z
from django.urls import reverse from rest_framework import status from main.tests.api import helpers class TestPermissions(helpers.BaseUserTestCase): """ Test Permissions Get: authenticated Update: admin Create: admin Delete: admin """ def test_get(self): urls = [ ...
31.19171
80
0.47691
from django.urls import reverse from rest_framework import status from main.tests.api import helpers class TestPermissions(helpers.BaseUserTestCase): def test_get(self): urls = [ reverse('api:program-list'), reverse('api:program-detail', kwargs={'pk': self.program_1.pk}) ...
true
true
f70d9c6098dd5a6a6057d72465295bbf61a9b443
261
py
Python
movies/serializers.py
jamesbond007dj/blog-api2
b4e1170f448c27528c48c955fde5998304e239d9
[ "MIT" ]
1
2020-01-22T21:46:25.000Z
2020-01-22T21:46:25.000Z
movies/serializers.py
jamesbond007dj/blog-api2
b4e1170f448c27528c48c955fde5998304e239d9
[ "MIT" ]
8
2020-01-23T00:58:40.000Z
2021-09-22T18:31:32.000Z
movies/serializers.py
jamesbond007dj/blog-api2
b4e1170f448c27528c48c955fde5998304e239d9
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Movies class MoviesSerializer(serializers.ModelSerializer): class Meta: model = Movies fields = [ 'id' , 'user_main', 'title', 'director', 'acts', 'created_at' ]
29
73
0.643678
from rest_framework import serializers from .models import Movies class MoviesSerializer(serializers.ModelSerializer): class Meta: model = Movies fields = [ 'id' , 'user_main', 'title', 'director', 'acts', 'created_at' ]
true
true
f70d9c8948607fa6efa83a53137927b8ffedb1d3
1,705
py
Python
tests/settings.py
brmc/django-octopus
a37dbd9425f92ffbb19ce29647b6bc8d9be51598
[ "MIT" ]
36
2015-03-08T09:06:51.000Z
2021-07-31T04:19:53.000Z
tests/settings.py
brmc/django_octopus
a37dbd9425f92ffbb19ce29647b6bc8d9be51598
[ "MIT" ]
2
2017-01-21T17:25:18.000Z
2019-07-27T08:01:26.000Z
tests/settings.py
brmc/django_octopus
a37dbd9425f92ffbb19ce29647b6bc8d9be51598
[ "MIT" ]
1
2015-03-08T14:53:20.000Z
2015-03-08T14:53:20.000Z
import os INSTALLED_APPS = [ 'django.contrib.staticfiles', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.admin', 'octopus', 'test_app', 'django.contrib.sites' ] SECRET_KEY = '1' DEBUG = True STATIC_URL = '/...
26.230769
74
0.637537
import os INSTALLED_APPS = [ 'django.contrib.staticfiles', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.admin', 'octopus', 'test_app', 'django.contrib.sites' ] SECRET_KEY = '1' DEBUG = True STATIC_URL = '/...
true
true
f70d9cf7f25e83c30d0c8b68e0d3f94f33c9b726
11,212
py
Python
python/src/nnabla/utils/network.py
CeresSoft/nnabla
185b09d9dfde7d80a5c2296293b9044b74897e42
[ "Apache-2.0" ]
null
null
null
python/src/nnabla/utils/network.py
CeresSoft/nnabla
185b09d9dfde7d80a5c2296293b9044b74897e42
[ "Apache-2.0" ]
null
null
null
python/src/nnabla/utils/network.py
CeresSoft/nnabla
185b09d9dfde7d80a5c2296293b9044b74897e42
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 Sony Corporation. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
45.392713
150
0.590528
from nnabla.logger import logger import nnabla.function as F def print_network_traceback(funcs): logger.critical('Network traceback:') for i, func in enumerate(funcs): logger.critical('{}{}'.format( '->' if i == len(funcs) - 1 else ' ', func.name)) class Network: def setup_functio...
true
true
f70d9d467c7c7fa8a528741143dc4281a0fca11f
891
py
Python
thirdparty/org/apache/arrow/flatbuf/Interval.py
mrocklin/pygdf
2de9407427da9497ebdf8951a12857be0fab31bb
[ "Apache-2.0" ]
5
2018-10-17T20:28:42.000Z
2022-02-15T17:33:01.000Z
thirdparty/org/apache/arrow/flatbuf/Interval.py
mrocklin/pygdf
2de9407427da9497ebdf8951a12857be0fab31bb
[ "Apache-2.0" ]
19
2018-07-18T07:15:44.000Z
2021-02-22T17:00:18.000Z
thirdparty/org/apache/arrow/flatbuf/Interval.py
mrocklin/pygdf
2de9407427da9497ebdf8951a12857be0fab31bb
[ "Apache-2.0" ]
2
2020-05-01T09:54:34.000Z
2021-04-17T10:57:07.000Z
# automatically generated by the FlatBuffers compiler, do not modify # namespace: flatbuf import flatbuffers class Interval(object): __slots__ = ['_tab'] @classmethod def GetRootAsInterval(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = Interval...
28.741935
88
0.67789
import flatbuffers class Interval(object): __slots__ = ['_tab'] @classmethod def GetRootAsInterval(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = Interval() x.Init(buf, n + offset) return x def Init(self, buf, pos): ...
true
true
f70d9e0a3d17703610d440294f28a62f2040f948
2,209
py
Python
Backend/foodieshoot_api/users/forms.py
eamorgado/FoodieShoot
87172bc295edd93aa0448bc14ce85b2710dd4aab
[ "BSD-2-Clause" ]
null
null
null
Backend/foodieshoot_api/users/forms.py
eamorgado/FoodieShoot
87172bc295edd93aa0448bc14ce85b2710dd4aab
[ "BSD-2-Clause" ]
10
2020-06-06T01:56:57.000Z
2022-03-12T00:31:25.000Z
Backend/foodieshoot_api/users/forms.py
eamorgado/FoodieShoot
87172bc295edd93aa0448bc14ce85b2710dd4aab
[ "BSD-2-Clause" ]
1
2020-07-25T09:19:37.000Z
2020-07-25T09:19:37.000Z
import re from django import forms from django.utils.safestring import mark_safe from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, UserChangeForm, ReadOnlyPasswordHashField from .models import Profile class UserRegisterForm(UserCreationForm): email = forms.EmailFi...
38.754386
97
0.660027
import re from django import forms from django.utils.safestring import mark_safe from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, UserChangeForm, ReadOnlyPasswordHashField from .models import Profile class UserRegisterForm(UserCreationForm): email = forms.EmailFi...
true
true
f70d9f2a0ed020186d7f2a4487e673fdce38dca4
3,025
py
Python
src/logChunk/LanguageSwitcherFactory.py
saledouble/gitcproc
009d614fa1a56dc75acb0277ecc98ea27e91750b
[ "BSD-3-Clause" ]
null
null
null
src/logChunk/LanguageSwitcherFactory.py
saledouble/gitcproc
009d614fa1a56dc75acb0277ecc98ea27e91750b
[ "BSD-3-Clause" ]
3
2020-11-12T14:42:22.000Z
2021-01-13T22:30:23.000Z
src/logChunk/LanguageSwitcherFactory.py
saledouble/gitcproc
009d614fa1a56dc75acb0277ecc98ea27e91750b
[ "BSD-3-Clause" ]
2
2020-11-11T22:27:28.000Z
2021-01-13T21:07:14.000Z
import sys import os import yaml #PyYAML must be installed import languageSwitcher import CPlusPlusLanguageSwitcher import CLanguageSwitcher import JavaLanguageSwitcher import PythonLanguageSwitcher from UnsupportedLanguageException import * sys.path.append("../util") from Util import supportedLanguages class Langua...
43.84058
128
0.698843
import sys import os import yaml import languageSwitcher import CPlusPlusLanguageSwitcher import CLanguageSwitcher import JavaLanguageSwitcher import PythonLanguageSwitcher from UnsupportedLanguageException import * sys.path.append("../util") from Util import supportedLanguages class LanguageSwitcherFactory: ext...
true
true
f70da0756d9a21f26d787bc1f5bd830aee541599
566
py
Python
src/contexts/kms/cryptokeys/domain/create_one/CryptoInvalidValueError.py
parada3desu/foxy-key-broker
fc95de9e9bfd61c506a9a18aa64c5c9cbeac8a9c
[ "Apache-2.0" ]
null
null
null
src/contexts/kms/cryptokeys/domain/create_one/CryptoInvalidValueError.py
parada3desu/foxy-key-broker
fc95de9e9bfd61c506a9a18aa64c5c9cbeac8a9c
[ "Apache-2.0" ]
null
null
null
src/contexts/kms/cryptokeys/domain/create_one/CryptoInvalidValueError.py
parada3desu/foxy-key-broker
fc95de9e9bfd61c506a9a18aa64c5c9cbeac8a9c
[ "Apache-2.0" ]
null
null
null
from typing import Union, Dict, List from src.contexts.shared.domain.errors.DomainError import DomainError class CryptoKeyInvalidValueError(DomainError): ERROR_ID = '8fd818c5-10dc-4639-82ac-d4b37394517d' def __init__(self, msg: str = None): if msg is None: msg = 'Invalid value for Crypto...
25.727273
69
0.634276
from typing import Union, Dict, List from src.contexts.shared.domain.errors.DomainError import DomainError class CryptoKeyInvalidValueError(DomainError): ERROR_ID = '8fd818c5-10dc-4639-82ac-d4b37394517d' def __init__(self, msg: str = None): if msg is None: msg = 'Invalid value for Crypto...
true
true
f70da14696e1d9db2fc019e8d79d9e4912df1421
122
py
Python
pycolfin/__init__.py
patpatpatpatpat/pycolfin
80ca7c226db6352ac9d0dd062ff02dc85d629f51
[ "MIT" ]
2
2016-08-29T03:14:38.000Z
2017-11-03T13:07:02.000Z
pycolfin/__init__.py
patpatpatpatpat/pycolfin
80ca7c226db6352ac9d0dd062ff02dc85d629f51
[ "MIT" ]
10
2016-07-18T08:47:31.000Z
2020-12-09T10:23:58.000Z
pycolfin/__init__.py
patpatpatpatpat/pycolfin
80ca7c226db6352ac9d0dd062ff02dc85d629f51
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'Ed Patrick Tan' __email__ = 'pat.keeps.looking.up@gmail.com' __version__ = '0.1.0'
20.333333
44
0.655738
__author__ = 'Ed Patrick Tan' __email__ = 'pat.keeps.looking.up@gmail.com' __version__ = '0.1.0'
true
true
f70da2799444bc2f78a541b418d0dfd6472ce7be
1,312
py
Python
auth/setup.py
tombriden/google-music-manager
fcdd69eef51cffd65cc1ad8616ff15cb55619a07
[ "MIT" ]
null
null
null
auth/setup.py
tombriden/google-music-manager
fcdd69eef51cffd65cc1ad8616ff15cb55619a07
[ "MIT" ]
null
null
null
auth/setup.py
tombriden/google-music-manager
fcdd69eef51cffd65cc1ad8616ff15cb55619a07
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages __version__ = '1.0.1' setup( name='google_music_manager_auth', python_requires=">=3", version=__version__, packages=find_packages(), author="Jay MOULIN", author_email="jaymoulin@gmail.com", descripti...
32
105
0.625762
from setuptools import setup, find_packages __version__ = '1.0.1' setup( name='google_music_manager_auth', python_requires=">=3", version=__version__, packages=find_packages(), author="Jay MOULIN", author_email="jaymoulin@gmail.com", description="Google MusicManager package to manage your...
true
true
f70da28ac6692ac932239b685896870375bd2ff4
49,635
py
Python
src/licensedcode/models.py
abhi27-web/scancode-toolk
66f59168fb7824ab9be332712dcaf16340e1aa22
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/licensedcode/models.py
abhi27-web/scancode-toolk
66f59168fb7824ab9be332712dcaf16340e1aa22
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
src/licensedcode/models.py
abhi27-web/scancode-toolk
66f59168fb7824ab9be332712dcaf16340e1aa22
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
# # Copyright (c) 2018 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
37.207646
128
0.633223
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import Counter from collections import defaultdict from collections import OrderedDict from functools import partial from itertools import chain import ...
true
true
f70da33491ac3a433cbf0d0075a23b55629b38de
4,722
py
Python
OBLib/Model.py
stevenkfirth/OBLib
12ab46ca2c24d28d8ed5b14be0978fb5dacae394
[ "MIT" ]
1
2022-03-28T13:06:00.000Z
2022-03-28T13:06:00.000Z
OBLib/Model.py
stevenkfirth/OBLib
12ab46ca2c24d28d8ed5b14be0978fb5dacae394
[ "MIT" ]
null
null
null
OBLib/Model.py
stevenkfirth/OBLib
12ab46ca2c24d28d8ed5b14be0978fb5dacae394
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pandas as pd class Model(): """Abstract model class. This is the top-level class and should not be used directly. Instead this class is inherited by other more specialised model classes. """ def __init__(self): "" self._inputs=Inputs() ...
24.466321
89
0.498306
import pandas as pd class Model(): def __init__(self): self._inputs=Inputs() def run(self): outputs=Outputs() outputs._timestamps=self._inputs._timestamps return outputs @property def inpu...
true
true
f70da3d54ecbd05f1e5054b3cc945d5b62ae323c
4,133
py
Python
homeassistant/components/alarm_control_panel/__init__.py
instantchow/home-assistant
6797365d4fd74328a0c9e961f652cfb37f48bc7d
[ "MIT" ]
null
null
null
homeassistant/components/alarm_control_panel/__init__.py
instantchow/home-assistant
6797365d4fd74328a0c9e961f652cfb37f48bc7d
[ "MIT" ]
null
null
null
homeassistant/components/alarm_control_panel/__init__.py
instantchow/home-assistant
6797365d4fd74328a0c9e961f652cfb37f48bc7d
[ "MIT" ]
null
null
null
""" Component to interface with an alarm control panel. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/alarm_control_panel/ """ import logging import os from homeassistant.components import verisure from homeassistant.const import ( ATTR_CODE, ATTR_...
27.370861
74
0.681829
import logging import os from homeassistant.components import verisure from homeassistant.const import ( ATTR_CODE, ATTR_CODE_FORMAT, ATTR_ENTITY_ID, SERVICE_ALARM_TRIGGER, SERVICE_ALARM_DISARM, SERVICE_ALARM_ARM_HOME, SERVICE_ALARM_ARM_AWAY) from homeassistant.config import load_yaml_config_file from homeassi...
true
true
f70da40a6cff9b86074093df34904d86d9ac8793
3,570
py
Python
sample/sample_advection.py
ZoneTsuyoshi/pyassim
1b40ce914a7b1e4ec6e240a6d67a19a22e431137
[ "MIT" ]
null
null
null
sample/sample_advection.py
ZoneTsuyoshi/pyassim
1b40ce914a7b1e4ec6e240a6d67a19a22e431137
[ "MIT" ]
null
null
null
sample/sample_advection.py
ZoneTsuyoshi/pyassim
1b40ce914a7b1e4ec6e240a6d67a19a22e431137
[ "MIT" ]
null
null
null
""" sample code for LLOCK, SLOCK, LSLOCK application the method to advection model (periodic boundary condition) """ import os, sys import numpy as np import matplotlib.pyplot as plt import seaborn as sns sys.path.append("..") from pyassim import KalmanFilter, LocalLOCK, SpatiallyUniformLOCK, LSLOCK,\ ...
31.875
97
0.604482
import os, sys import numpy as np import matplotlib.pyplot as plt import seaborn as sns sys.path.append("..") from pyassim import KalmanFilter, LocalLOCK, SpatiallyUniformLOCK, LSLOCK,\ PeriodicAdvection, EulerScheme def main(): result_dir = "figures/advection" if not os.path.exists(res...
true
true
f70da43a235cc40f7aed50d280517caead9baa9c
1,104
py
Python
metric.py
jdgwartney/sdk
2a3b57b572ba5e8ad3a61b1d3da0ab328d3981fe
[ "Apache-2.0" ]
null
null
null
metric.py
jdgwartney/sdk
2a3b57b572ba5e8ad3a61b1d3da0ab328d3981fe
[ "Apache-2.0" ]
null
null
null
metric.py
jdgwartney/sdk
2a3b57b572ba5e8ad3a61b1d3da0ab328d3981fe
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2014 Boundary, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
26.926829
74
0.661232
class Metric: def __init__(self): pass def setSource(self,source): self.source = source def getSource(self): return self.source def setName(self, name): self.name = name def getName(self): return self.name def setValue(self, ...
true
true
f70da53b99db345a63b3ea4cccc150aeb279c10a
38,891
py
Python
ostep-homework/file-raid/raid-graphics.py
lalitsom/ostep
8c83806a274a5596281b8c7eb142d9a68137f8fb
[ "Apache-2.0" ]
null
null
null
ostep-homework/file-raid/raid-graphics.py
lalitsom/ostep
8c83806a274a5596281b8c7eb142d9a68137f8fb
[ "Apache-2.0" ]
null
null
null
ostep-homework/file-raid/raid-graphics.py
lalitsom/ostep
8c83806a274a5596281b8c7eb142d9a68137f8fb
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python from Tkinter import * from types import * import math, random, time, sys, os from optparse import OptionParser # states that a request/disk go through STATE_NULL = 0 STATE_SEEK = 1 STATE_XFER = 2 STATE_DONE = 3 # request states REQ_NOT_STARTED = 0 REQ_DO_READ = 1 REQ_DO_WRITE = 2 # use...
41.50587
182
0.567921
from Tkinter import * from types import * import math, random, time, sys, os from optparse import OptionParser STATE_NULL = 0 STATE_SEEK = 1 STATE_XFER = 2 STATE_DONE = 3 REQ_NOT_STARTED = 0 REQ_DO_READ = 1 REQ_DO_WRITE = 2 REQ_PARITY_READ_PHASE_DONE = 4 REQ_PARITY_WRITE_PHASE_BEGIN = 5 REQ_DONE = 10 OP_REA...
false
true
f70da5d5d5e7329b2bc1b2ba27f8e1e4a75f979e
20,260
py
Python
tensorflow_probability/python/distributions/mixture.py
jihunchoi/probability
685c5012eba03a23d1b849d35f5e8efe7fdc402d
[ "Apache-2.0" ]
1
2018-11-07T16:31:11.000Z
2018-11-07T16:31:11.000Z
tensorflow_probability/python/distributions/mixture.py
jihunchoi/probability
685c5012eba03a23d1b849d35f5e8efe7fdc402d
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/mixture.py
jihunchoi/probability
685c5012eba03a23d1b849d35f5e8efe7fdc402d
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
41.178862
80
0.666091
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow_probability.python.distributions import categorical from tensorflow_probability.python.distributions import distribution from tensorflow_probability....
true
true
f70da7a4c157cdaccffb4cddb141f3fce3c4578b
3,690
py
Python
tests/selenium/test_scrolling.py
jbampton/dash-table
1e25a1296ccbe0f061cc791e259a3f37ed3fbed9
[ "MIT" ]
null
null
null
tests/selenium/test_scrolling.py
jbampton/dash-table
1e25a1296ccbe0f061cc791e259a3f37ed3fbed9
[ "MIT" ]
null
null
null
tests/selenium/test_scrolling.py
jbampton/dash-table
1e25a1296ccbe0f061cc791e259a3f37ed3fbed9
[ "MIT" ]
null
null
null
import dash import dash.testing.wait as wait from dash_table import DataTable import pandas as pd import pytest from selenium.webdriver.common.keys import Keys df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/solar.csv") base_props = dict( id="table", columns=[{"name": i, "id": i} f...
26.73913
101
0.663957
import dash import dash.testing.wait as wait from dash_table import DataTable import pandas as pd import pytest from selenium.webdriver.common.keys import Keys df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/solar.csv") base_props = dict( id="table", columns=[{"name": i, "id": i} f...
true
true
f70da8d03af30456f249aa0bd8107f864cb6503c
860
py
Python
fabfile/france.local.py
cryptobioz/addok
4a6b2e935b144f3672a6ae66c9bdf4c0b321976d
[ "MIT" ]
215
2016-01-29T08:37:56.000Z
2022-03-28T06:28:41.000Z
fabfile/france.local.py
bendathierrycom/addok
07346046ed53993d8e2b66262f52d505f26f5ba9
[ "MIT" ]
487
2016-01-13T10:11:34.000Z
2022-03-31T10:56:24.000Z
fabfile/france.local.py
bendathierrycom/addok
07346046ed53993d8e2b66262f52d505f26f5ba9
[ "MIT" ]
52
2016-01-12T13:10:28.000Z
2022-03-24T15:45:39.000Z
QUERY_PROCESSORS_PYPATHS = [ 'addok.helpers.text.check_query_length', "addok_france.extract_address", "addok_france.clean_query", "addok_france.remove_leading_zeros", ] SEARCH_RESULT_PROCESSORS_PYPATHS = [ "addok.helpers.results.match_housenumber", "addok_france.make_labels", "addok.helpers....
33.076923
59
0.752326
QUERY_PROCESSORS_PYPATHS = [ 'addok.helpers.text.check_query_length', "addok_france.extract_address", "addok_france.clean_query", "addok_france.remove_leading_zeros", ] SEARCH_RESULT_PROCESSORS_PYPATHS = [ "addok.helpers.results.match_housenumber", "addok_france.make_labels", "addok.helpers....
true
true
f70da9883e7bde35729298c9faac1caca164c89e
418
py
Python
samples/python/54.teams-task-module/models/__init__.py
Aliacf21/BotBuilder-Samples
be48548edafd4efdc074f5a59ef2bb3af735ad9a
[ "MIT" ]
1,998
2019-05-07T06:33:22.000Z
2022-03-31T12:59:15.000Z
samples/python/54.teams-task-module/models/__init__.py
Aliacf21/BotBuilder-Samples
be48548edafd4efdc074f5a59ef2bb3af735ad9a
[ "MIT" ]
1,526
2020-09-05T18:57:14.000Z
2020-12-03T01:45:40.000Z
samples/python/54.teams-task-module/models/__init__.py
stevkan/BotBuilder-Samples
75a21b412d8873906bed3460f7c5f0940a067d58
[ "MIT" ]
2,820
2016-09-21T03:47:43.000Z
2019-05-03T15:12:46.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from .task_module_ids import TaskModuleIds from .task_module_response_factory import TaskModuleResponseFactory from .task_module_ui_constants import TaskModuleUIConstants from .ui_settings import UISettings __all__ = [ "...
27.866667
67
0.803828
from .task_module_ids import TaskModuleIds from .task_module_response_factory import TaskModuleResponseFactory from .task_module_ui_constants import TaskModuleUIConstants from .ui_settings import UISettings __all__ = [ "TaskModuleIds", "TaskModuleResponseFactory", "TaskModuleUIConstants", "UISettings"...
true
true
f70da99aaeb151784da471888218b15cb30313ac
4,494
py
Python
azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/application_resource.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/application_resource.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/application_resource.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2020-07-25T20:36:02.000Z
2020-07-25T20:36:02.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
44.49505
103
0.653761
from .proxy_resource import ProxyResource class ApplicationResource(ProxyResource): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, 'minimum_nodes': {'minimum': 0}, 'maximum_nodes': ...
true
true
f70da9d0ab8c8e17aac85abd7b420df5cbce14f0
32,820
py
Python
front-end/testsuite-python-lib/Python-2.4.3/Lib/test/test_unicode.py
MalloyPower/parsing-python
b2bca5eed07ea2af7a2001cd4f63becdfb0570be
[ "MIT" ]
1
2020-11-26T18:53:46.000Z
2020-11-26T18:53:46.000Z
front-end/testsuite-python-lib/Python-2.4.3/Lib/test/test_unicode.py
MalloyPower/parsing-python
b2bca5eed07ea2af7a2001cd4f63becdfb0570be
[ "MIT" ]
null
null
null
front-end/testsuite-python-lib/Python-2.4.3/Lib/test/test_unicode.py
MalloyPower/parsing-python
b2bca5eed07ea2af7a2001cd4f63becdfb0570be
[ "MIT" ]
1
2019-04-11T11:27:01.000Z
2019-04-11T11:27:01.000Z
# -*- coding: iso-8859-1 -*- """ Test script for the Unicode implementation. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import unittest, sys, string, codecs, new from test import test_support, string_tests # Error handling (bad decoder return) def se...
43.184211
122
0.55262
""" Test script for the Unicode implementation. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """import unittest, sys, string, codecs, new from test import test_support, string_tests # Error handling (bad decoder return) def search_function(encoding): def...
false
true
f70daa0be86e858ce0a00ff6a9d7ce0503ecbc63
3,143
py
Python
ImageNet/benchmark-dataflow.py
tensorpack/benchmarks
7c97174f9a00e440d60c38b54d4c45f58271fc3e
[ "Unlicense" ]
93
2017-09-28T00:48:47.000Z
2022-03-31T07:25:06.000Z
ImageNet/benchmark-dataflow.py
tensorpack/benchmarks
7c97174f9a00e440d60c38b54d4c45f58271fc3e
[ "Unlicense" ]
8
2018-02-26T14:18:50.000Z
2019-12-12T00:15:26.000Z
ImageNet/benchmark-dataflow.py
tensorpack/benchmarks
7c97174f9a00e440d60c38b54d4c45f58271fc3e
[ "Unlicense" ]
38
2017-09-28T01:43:34.000Z
2022-02-11T09:23:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: benchmark-dataflow.py import argparse import cv2 from tensorpack import * from tensorpack.dataflow.imgaug import * from tensorpack.dataflow.parallel import PlasmaGetData, PlasmaPutData # noqa from tensorpack.utils.serialize import loads import augmentors def t...
29.101852
79
0.647471
import argparse import cv2 from tensorpack import * from tensorpack.dataflow.imgaug import * from tensorpack.dataflow.parallel import PlasmaGetData, PlasmaPutData from tensorpack.utils.serialize import loads import augmentors def test_orig(dir, name, augs, batch): ds = dataset.ILSVRC12(dir, name, shuffle=True...
true
true
f70dab9e7f2aa449224fcbce100d80d3ed025ca8
918
py
Python
hummingbot/strategy/dev_1_get_order_book/start.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
3,027
2019-04-04T18:52:17.000Z
2022-03-30T09:38:34.000Z
hummingbot/strategy/dev_1_get_order_book/start.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
4,080
2019-04-04T19:51:11.000Z
2022-03-31T23:45:21.000Z
hummingbot/strategy/dev_1_get_order_book/start.py
BGTCapital/hummingbot
2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242
[ "Apache-2.0" ]
1,342
2019-04-04T20:50:53.000Z
2022-03-31T15:22:36.000Z
#!/usr/bin/env python from hummingbot.connector.exchange_base import ExchangeBase from hummingbot.strategy.dev_1_get_order_book import GetOrderBookStrategy from hummingbot.strategy.dev_1_get_order_book.dev_1_get_order_book_config_map import dev_1_get_order_book_config_map def start(self): try: exchange: ...
39.913043
116
0.6939
from hummingbot.connector.exchange_base import ExchangeBase from hummingbot.strategy.dev_1_get_order_book import GetOrderBookStrategy from hummingbot.strategy.dev_1_get_order_book.dev_1_get_order_book_config_map import dev_1_get_order_book_config_map def start(self): try: exchange: str = dev_1_get_order_...
true
true
f70dac7a361dd95663ebe981f4c4b619c042eb36
2,347
py
Python
tests/msk_test.py
vigorIv2/spot
55e3a5a0b99fe959e95d7225a3bada857752e9fa
[ "MIT" ]
1
2021-05-03T18:35:30.000Z
2021-05-03T18:35:30.000Z
tests/msk_test.py
vigorIv2/spot
55e3a5a0b99fe959e95d7225a3bada857752e9fa
[ "MIT" ]
1
2022-02-16T00:55:15.000Z
2022-02-16T00:55:15.000Z
tests/msk_test.py
vigorIv2/spot
55e3a5a0b99fe959e95d7225a3bada857752e9fa
[ "MIT" ]
null
null
null
import logging import sys import time import datetime import unittest import spot_db from spot_msk import SpotMsk import json, requests import logging, logging.config, yaml logging.config.dictConfig(yaml.load(open('logging.conf'))) logfl = logging.getLogger('file') logconsole = logging.getLogger('console') logfl.de...
32.597222
159
0.668087
import logging import sys import time import datetime import unittest import spot_db from spot_msk import SpotMsk import json, requests import logging, logging.config, yaml logging.config.dictConfig(yaml.load(open('logging.conf'))) logfl = logging.getLogger('file') logconsole = logging.getLogger('console') logfl.de...
true
true
f70dacbfa4317925c8e12fd040862ec22b3790b3
12,105
py
Python
robinhoodbot/main.py
connorkerry/RobinhoodBot
6a1e1733d900abfc00a8e6fff1cf48184af4edc3
[ "MIT" ]
null
null
null
robinhoodbot/main.py
connorkerry/RobinhoodBot
6a1e1733d900abfc00a8e6fff1cf48184af4edc3
[ "MIT" ]
null
null
null
robinhoodbot/main.py
connorkerry/RobinhoodBot
6a1e1733d900abfc00a8e6fff1cf48184af4edc3
[ "MIT" ]
null
null
null
import robin_stocks as r import pandas as pd import numpy as np import ta as ta from pandas.plotting import register_matplotlib_converters from ta import * from misc import * from tradingstats import * #Log in to Robinhood login = r.login('YOUR_EMAIL','YOUR_PASSWORD') #Safe divide by zero division function def safe_d...
45.852273
162
0.656258
import robin_stocks as r import pandas as pd import numpy as np import ta as ta from pandas.plotting import register_matplotlib_converters from ta import * from misc import * from tradingstats import * login = r.login('YOUR_EMAIL','YOUR_PASSWORD') def safe_division(n, d): return n / d if d else 0 def get_watchli...
true
true
f70dae80edd19835c2bcdbcc5bb719a245bf79aa
7,066
py
Python
cca/scripts/diffinfo.py
mstmhsmt/cca
0dc69b0f0da1def4e8404e5f7b7fe35b6ac3198a
[ "Apache-2.0" ]
null
null
null
cca/scripts/diffinfo.py
mstmhsmt/cca
0dc69b0f0da1def4e8404e5f7b7fe35b6ac3198a
[ "Apache-2.0" ]
null
null
null
cca/scripts/diffinfo.py
mstmhsmt/cca
0dc69b0f0da1def4e8404e5f7b7fe35b6ac3198a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' diffinfo.py Copyright 2012-2017 Codinuum Software Lab <http://codinuum.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licen...
33.808612
170
0.5
import re import os import logging import pathsetup from fragment import Fragment import gzip logger = logging.getLogger() read_delete_insert_info_size_threshold = 4 excl_L_pat = re.compile('\) \[') excl_R_pat = re.compile('(?P<list>.*)\]') num_pat = re.compile('(?P<num>[0-9]+);?') def get_excluded(s): resu...
true
true
f70daf6e0c7e8b592b22fc07d4c633555bc31157
4,010
py
Python
old/ROC_foldx.py
TheGlobalExpert/protein-stability
b5cc6efaaa6a2f7784729420b746a7ec07bd0d97
[ "MIT" ]
null
null
null
old/ROC_foldx.py
TheGlobalExpert/protein-stability
b5cc6efaaa6a2f7784729420b746a7ec07bd0d97
[ "MIT" ]
null
null
null
old/ROC_foldx.py
TheGlobalExpert/protein-stability
b5cc6efaaa6a2f7784729420b746a7ec07bd0d97
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import math import matplotlib.pyplot as plt data = pd.read_csv("../results/master.csv") data = pd.read_csv("../data/FoldX_predictions.csv") x = list(data["ddG"]) y = list(data["FoldX_dGG"]) #clean # XXX: import itertools #lists = sorted(zip(*[x, y])) #x, y = list(zip(*li...
22.655367
109
0.600499
import pandas as pd import numpy as np import math import matplotlib.pyplot as plt data = pd.read_csv("../results/master.csv") data = pd.read_csv("../data/FoldX_predictions.csv") x = list(data["ddG"]) y = list(data["FoldX_dGG"]) import itertools for i in range(len(x)): x[i] = float(x[i]) print(y) print(...
true
true
f70db04da37eb5520229d18abbe9dbe1fae56e06
4,119
py
Python
train.py
fancybian/ner-crf2
e4f4fe973057ee5f6ffcc87c8dddc502c981b9bf
[ "MIT" ]
122
2016-06-07T16:25:34.000Z
2021-04-06T14:01:00.000Z
train.py
fancybian/ner-crf2
e4f4fe973057ee5f6ffcc87c8dddc502c981b9bf
[ "MIT" ]
1
2018-04-12T19:16:14.000Z
2018-04-12T19:16:14.000Z
train.py
fancybian/ner-crf2
e4f4fe973057ee5f6ffcc87c8dddc502c981b9bf
[ "MIT" ]
41
2015-11-22T06:17:44.000Z
2021-04-02T09:12:09.000Z
# -*- coding: utf-8 -*- """ Main training file for the CRF. This file trains a CRF model and saves it under the filename provided via an 'identifier' command line argument. Usage example: python train.py --identifier="my_experiment" """ from __future__ import absolute_import, division, print_function, unicode_lite...
42.90625
100
0.686574
from __future__ import absolute_import, division, print_function, unicode_literals import argparse import random import pycrfsuite from model.datasets import load_windows, load_articles, generate_examples import model.features as features import config as cfg random.seed(42) def main(): parser = argparse.Argume...
true
true
f70db16a2b9bb8472d5847e7ac204d8017366ff5
2,618
py
Python
ciw/network.py
CiwPython/Ciw
8d5978108f797a6c3e42d8f70f31510f889f2dd0
[ "MIT" ]
107
2016-11-18T22:44:58.000Z
2022-03-29T01:38:12.000Z
ciw/network.py
CiwPython/Ciw
8d5978108f797a6c3e42d8f70f31510f889f2dd0
[ "MIT" ]
117
2016-09-25T19:12:39.000Z
2022-03-31T14:01:47.000Z
ciw/network.py
CiwPython/Ciw
8d5978108f797a6c3e42d8f70f31510f889f2dd0
[ "MIT" ]
34
2016-12-21T12:04:29.000Z
2022-03-29T10:46:29.000Z
class ServiceCentre(object): """ An information store for each service centre in the queueing network. Contains all information that is independent of customer class: - number of servers - queueing capacity - server schedules + preemtion status - class change matrix """ def _...
36.361111
105
0.651642
class ServiceCentre(object): def __init__(self, number_of_servers, queueing_capacity, class_change_matrix=None, schedule=None, preempt=False, ps_threshold=1): self.number_of_servers = number_of_servers ...
true
true
f70db18cb43c8477d2ce3de474b7e364be5012b3
19,374
py
Python
src/player.py
allineandric/progmind
6333ff3b76626c395d62fc2b6e96e99fe6e93061
[ "MIT" ]
1
2022-03-29T18:26:35.000Z
2022-03-29T18:26:35.000Z
src/player.py
henrikbeck95/progmind
6333ff3b76626c395d62fc2b6e96e99fe6e93061
[ "MIT" ]
null
null
null
src/player.py
henrikbeck95/progmind
6333ff3b76626c395d62fc2b6e96e99fe6e93061
[ "MIT" ]
1
2020-12-04T18:18:04.000Z
2020-12-04T18:18:04.000Z
"" "Este módulo implementa o objeto jogador (sprite) para o Progmind" "" from src.animation import Animation from src.animated_sprite import AnimatedSprite from src.time_bonus import TimeBonus import src.game_functions as gf import pygame import time class Player(AnimatedSprite): """Objeto de jogador""" def ...
50.453125
158
0.532879
from src.animation import Animation from src.animated_sprite import AnimatedSprite from src.time_bonus import TimeBonus import src.game_functions as gf import pygame import time class Player(AnimatedSprite): def __init__(self, settings, screen, images, initial_bounding_rect, tile_map): super().__...
true
true