hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
66a99117c2241962a9cb4fee444ebd3e46796813
186
py
Python
HomeWorks/Rostik/string.py
PhantomMind/FamousTeamDream
1268950a2f18236f0fda364a5484b478280f39f7
[ "Apache-2.0" ]
null
null
null
HomeWorks/Rostik/string.py
PhantomMind/FamousTeamDream
1268950a2f18236f0fda364a5484b478280f39f7
[ "Apache-2.0" ]
null
null
null
HomeWorks/Rostik/string.py
PhantomMind/FamousTeamDream
1268950a2f18236f0fda364a5484b478280f39f7
[ "Apache-2.0" ]
null
null
null
someList = ['470 ', '', '', '', '', '2', '', ''] print(someList) someList.append('frdfvty') del someList[8] print(someList)
31
110
0.704301
someList = ['470 градусов по фаренгейту', 'Сталкер', 'Наруто', 'Форсаж', 'Оно', 'Оно2', 'Смешарики', 'Лунтик'] print(someList) someList.append('frdfvty') del someList[8] print(someList)
120
0
0
0
0
0
0
0
0
50fda266a3d1133cdac7672b09442bedfca50aed
3,136
py
Python
scraper/modules/pgte_patreon.py
iburinoc/kindle_scraper
0929b0aaa0ce47cbdeb845bb7724fb5390ca2e3e
[ "MIT" ]
null
null
null
scraper/modules/pgte_patreon.py
iburinoc/kindle_scraper
0929b0aaa0ce47cbdeb845bb7724fb5390ca2e3e
[ "MIT" ]
3
2020-06-06T16:16:30.000Z
2021-04-30T20:47:07.000Z
scraper/modules/pgte_patreon.py
iburinoc/kindle_scraper
0929b0aaa0ce47cbdeb845bb7724fb5390ca2e3e
[ "MIT" ]
2
2019-06-22T22:40:04.000Z
2020-06-04T22:28:32.000Z
import scraper.util AUTHOR = "Erratic Errata"
29.308411
99
0.639031
import asyncio from aiogoogle import Aiogoogle, GoogleAPI from aiogoogle.auth.creds import ClientCreds, UserCreds import base64 import bs4 import json import scraper.util import scraper.flags AUTHOR = "Erratic Errata" def _get_user_creds(creds): return UserCreds( access_token=creds.token, refresh...
0
0
1,982
0
0
796
0
18
292
d223692d0a1aa94547a58cfe2d937308586051ab
97
py
Python
invokers/python/tests/functions/http/default/func.py
andrew-su/function-buildpacks-for-knative
dcb9a8c1e07a6288dbc096e2f5270eb5e16a625a
[ "BSD-2-Clause" ]
19
2021-11-03T15:02:24.000Z
2022-03-23T04:33:56.000Z
invokers/python/tests/functions/http/default/func.py
andrew-su/function-buildpacks-for-knative
dcb9a8c1e07a6288dbc096e2f5270eb5e16a625a
[ "BSD-2-Clause" ]
36
2021-11-05T14:33:37.000Z
2022-03-24T20:13:40.000Z
invokers/python/tests/functions/http/default/func.py
andrew-su/function-buildpacks-for-knative
dcb9a8c1e07a6288dbc096e2f5270eb5e16a625a
[ "BSD-2-Clause" ]
4
2021-11-16T08:27:58.000Z
2022-02-03T02:58:24.000Z
# Copyright 2021-2022 VMware, Inc. # SPDX-License-Identifier: BSD-2-Clause
16.166667
39
0.701031
# Copyright 2021-2022 VMware, Inc. # SPDX-License-Identifier: BSD-2-Clause def main(): pass
0
0
0
0
0
-1
0
0
23
48e14c33ef3c486ff575304d354ffdceab4264fd
5,193
py
Python
birds/test_storage.py
pitkali/birds-api
2c37995898abe1bbe0dab3307af11bb508ec4cca
[ "Apache-2.0" ]
null
null
null
birds/test_storage.py
pitkali/birds-api
2c37995898abe1bbe0dab3307af11bb508ec4cca
[ "Apache-2.0" ]
null
null
null
birds/test_storage.py
pitkali/birds-api
2c37995898abe1bbe0dab3307af11bb508ec4cca
[ "Apache-2.0" ]
null
null
null
"""Storage engine sanity tests""" from . import storage ITEM_VISIBLE = {"key" : "valueA", storage.VISIBLE_KEY : True} ITEM_HIDDEN = {"key" : "valueB"} def is_same_dictionary(a, b): """Shallow dictionary comparison""" keysA = set(a.keys()) keysB = set(b.keys()) sharedKeys = keysA & keysB if len(k...
31.472727
79
0.651261
"""Storage engine sanity tests""" from pymongo import MongoClient import copy import unittest import time from . import storage ITEM_VISIBLE = {"key" : "valueA", storage.VISIBLE_KEY : True} ITEM_HIDDEN = {"key" : "valueB"} def is_same_dictionary(a, b): """Shallow dictionary comparison""" keysA = set(a.keys...
0
297
0
3,655
0
342
0
-16
272
5542929b78e5e07d174778ee5e31247b762fa0bf
45
py
Python
EmployeeSQL/Config.py
XxTopShottaxX/SQL-challenge
a560b8fb28f55396913b95b44c8bf5ffb95267a3
[ "ADSL" ]
null
null
null
EmployeeSQL/Config.py
XxTopShottaxX/SQL-challenge
a560b8fb28f55396913b95b44c8bf5ffb95267a3
[ "ADSL" ]
null
null
null
EmployeeSQL/Config.py
XxTopShottaxX/SQL-challenge
a560b8fb28f55396913b95b44c8bf5ffb95267a3
[ "ADSL" ]
null
null
null
username="postgres" password="dr@g0ngThcetaG"
22.5
25
0.822222
username="postgres" password="dr@g0ngThcetaG"
0
0
0
0
0
0
0
0
0
a3de5b6bc51701b123efaaa48340189702b53808
2,805
py
Python
src/testoob/reporting/test_info.py
sshyran/testoob
729fa6a17660d0bd8c75907a89ed6998180b5765
[ "Apache-2.0" ]
null
null
null
src/testoob/reporting/test_info.py
sshyran/testoob
729fa6a17660d0bd8c75907a89ed6998180b5765
[ "Apache-2.0" ]
null
null
null
src/testoob/reporting/test_info.py
sshyran/testoob
729fa6a17660d0bd8c75907a89ed6998180b5765
[ "Apache-2.0" ]
null
null
null
# Testoob, Python Testing Out Of (The) Box # Copyright (C) 2005-2006 The Testoob Team # # 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 # # Un...
30.16129
81
0.670945
# Testoob, Python Testing Out Of (The) Box # Copyright (C) 2005-2006 The Testoob Team # # 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 # # Un...
0
0
0
1,863
0
0
0
0
23
bf515a4686057296a620835ea20d27f153c36106
315
py
Python
cloudmesh_cmd/cygwin-install.py
cloudmesh/windows
f089e9ef83ae1cae9b29c877c462130a7b93b5e8
[ "Apache-2.0" ]
null
null
null
cloudmesh_cmd/cygwin-install.py
cloudmesh/windows
f089e9ef83ae1cae9b29c877c462130a7b93b5e8
[ "Apache-2.0" ]
1
2015-06-08T23:15:25.000Z
2015-06-08T23:15:25.000Z
cloudmesh_cmd/cygwin-install.py
cloudmesh/windows
f089e9ef83ae1cae9b29c877c462130a7b93b5e8
[ "Apache-2.0" ]
null
null
null
import urllib import os from subprocess import Popen directory = 'C:\\Temp\\cygwindownload' if not os.path.isdir(directory): os.makedirs(directory) urllib.urlretrieve("https://cygwin.com/setup-x86.exe", directory + '\\setup.exe') p = Popen("cygwin-install.bat") stdout, stderr = p.communicate()
22.5
82
0.704762
import urllib import os from subprocess import Popen directory = 'C:\\Temp\\cygwindownload' if not os.path.isdir(directory): os.makedirs(directory) urllib.urlretrieve("https://cygwin.com/setup-x86.exe", directory + '\\setup.exe') p = Popen("cygwin-install.bat") stdout, stderr = p.communicate()
0
0
0
0
0
0
0
0
0
77596c5e8f345c28d69336c3470785f0b1d58164
7,531
py
Python
availability_app/views.py
Brown-University-Library/OLD-ARCHIVED_availability_api
77ce8a557f46e195a55da93eb8985337ab0448ac
[ "MIT" ]
1
2017-06-13T16:57:48.000Z
2017-06-13T16:57:48.000Z
availability_app/views.py
Brown-University-Library/OLD-ARCHIVED_availability_api
77ce8a557f46e195a55da93eb8985337ab0448ac
[ "MIT" ]
9
2019-09-03T13:39:57.000Z
2020-09-14T20:39:44.000Z
availability_app/views.py
Brown-University-Library/availability_api
77ce8a557f46e195a55da93eb8985337ab0448ac
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import datetime, json, logging, os from availability_app.lib import view_info_helper from availability_app.lib.concurrency import AsyncHelper # temporary demo helper from availability_app.lib.ezb_v1_handler import EzbV1Helper from availability_app.lib.bib_items_v2 import BibItemsInfo from avai...
46.487654
143
0.688089
# -*- coding: utf-8 -*- import datetime, json, logging, os, pprint from availability_app import settings_app from availability_app.lib import view_info_helper from availability_app.lib.concurrency import AsyncHelper # temporary demo helper from availability_app.lib.ezb_v1_handler import EzbV1Helper from availability...
0
0
0
0
0
0
0
123
89
a8a0cc141e0d4ab8242d6a31e939794ff8719dbd
750
py
Python
selenium_basics.py
kethan1/Interacting_With_Websites
fa30aa5aa7a3c1bab7b552b1af217eff722815a9
[ "MIT" ]
null
null
null
selenium_basics.py
kethan1/Interacting_With_Websites
fa30aa5aa7a3c1bab7b552b1af217eff722815a9
[ "MIT" ]
null
null
null
selenium_basics.py
kethan1/Interacting_With_Websites
fa30aa5aa7a3c1bab7b552b1af217eff722815a9
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions import time wd = webdriver.Firefox() wd.get("https://www.google.com/search?q=python") # wd.find_element_by_css_selector("a").cl...
30
111
0.752
from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions import time wd = webdriver.Firefox() wd.get("https://www.google.com/search?q=python") # wd.find_element_by_css_selector("a").cl...
0
0
0
0
0
0
0
0
0
8912e1dc471c0edad5e00a6d7f9813c76ea52508
3,569
py
Python
elsa.py
Frostiee11/elsa
86f4c086b38ddd00ff8851e349c32dacf9df39fa
[ "MIT" ]
7
2018-11-29T13:55:43.000Z
2020-08-26T10:06:53.000Z
elsa.py
Frostiee11/elsa
86f4c086b38ddd00ff8851e349c32dacf9df39fa
[ "MIT" ]
null
null
null
elsa.py
Frostiee11/elsa
86f4c086b38ddd00ff8851e349c32dacf9df39fa
[ "MIT" ]
null
null
null
#Elsa by Frostmeister import os from discord.ext import commands bot = commands.Bot(description=" The Snow Queen " , command_prefix=("e!","E!")) ################ EVENTS ################### ############ BOT RUN ################ bot.run(os.getenv("TOKEN"))
24.958042
135
0.585318
#Elsa by Frostmeister import discord import math import time import datetime import googlesearch as gs import urbandictionary as ud import random import asyncio import os from discord.ext import commands bot = commands.Bot(description=" The Snow Queen ❄️" , command_prefix=("e!","E!")) ################ EVENTS...
42
2,936
0
0
0
0
0
-37
343
0d032fd16a7d176ee318c77e6007e9eb73906098
4,021
py
Python
Week 1/Introduction to Programming/Getting Computers to work for you/topic.py
chanchanchong/Crash-Course-On-Python
ce98bdd5c5355a582c76b864dae1c5eecdf6ea44
[ "MIT" ]
null
null
null
Week 1/Introduction to Programming/Getting Computers to work for you/topic.py
chanchanchong/Crash-Course-On-Python
ce98bdd5c5355a582c76b864dae1c5eecdf6ea44
[ "MIT" ]
null
null
null
Week 1/Introduction to Programming/Getting Computers to work for you/topic.py
chanchanchong/Crash-Course-On-Python
ce98bdd5c5355a582c76b864dae1c5eecdf6ea44
[ "MIT" ]
null
null
null
# Working in IT, a lot of what we do boils down to using a computer to perform a # certain task. In your job you might create user accounts, configure the network, # install software, backup existing data, or execute a whole range of other # computer based tasks from day to day. Back in my first IT job, I realized that...
75.867925
89
0.77518
# Working in IT, a lot of what we do boils down to using a computer to perform a # certain task. In your job you might create user accounts, configure the network, # install software, backup existing data, or execute a whole range of other # computer based tasks from day to day. Back in my first IT job, I realized that...
0
0
0
0
0
0
0
0
0
86598004b30724c1f0cdf45f58b67daa2649e2fa
11,200
py
Python
bfieldtools/integrals.py
SAFedorov/bfieldtools
7e64bc2033670f01d2b90df2210b60743731a948
[ "BSD-3-Clause" ]
17
2020-05-22T19:39:39.000Z
2022-03-15T19:03:09.000Z
bfieldtools/integrals.py
SAFedorov/bfieldtools
7e64bc2033670f01d2b90df2210b60743731a948
[ "BSD-3-Clause" ]
27
2020-05-20T14:22:41.000Z
2022-01-10T18:30:12.000Z
bfieldtools/integrals.py
SAFedorov/bfieldtools
7e64bc2033670f01d2b90df2210b60743731a948
[ "BSD-3-Clause" ]
8
2020-08-12T10:30:50.000Z
2022-03-22T12:21:33.000Z
""" Analytic integral for vectorized field / potential computation """ __all__ = [ "c_coeffs", "d_distance", "gamma0", "omega", "potential_dipoles", "potential_vertex_dipoles", "triangle_potential_approx", "triangle_potential_dipole_linear", "triangle_potential_uniform", "x_di...
30.352304
85
0.589107
""" Analytic integral for vectorized field / potential computation """ __all__ = [ "c_coeffs", "d_distance", "gamma0", "omega", "potential_dipoles", "potential_vertex_dipoles", "triangle_potential_approx", "triangle_potential_dipole_linear", "triangle_potential_uniform", "x_di...
0
0
0
0
0
0
0
0
0
5cad79a23d827aef5df6641cba6427bf158d210c
1,029
py
Python
src/python/T0/WMBS/Oracle/Tier0Feeder/GetNotClosedOutWorkflows.py
silviodonato/T0
a093729d08b31175ed35cd20e889bd7094ce152a
[ "Apache-2.0" ]
6
2016-03-09T14:36:19.000Z
2021-07-27T01:28:00.000Z
src/python/T0/WMBS/Oracle/Tier0Feeder/GetNotClosedOutWorkflows.py
silviodonato/T0
a093729d08b31175ed35cd20e889bd7094ce152a
[ "Apache-2.0" ]
193
2015-01-07T21:03:43.000Z
2022-03-31T12:22:18.000Z
src/python/T0/WMBS/Oracle/Tier0Feeder/GetNotClosedOutWorkflows.py
silviodonato/T0
a093729d08b31175ed35cd20e889bd7094ce152a
[ "Apache-2.0" ]
36
2015-01-28T19:01:54.000Z
2021-12-15T17:18:20.000Z
""" _GetNotClosedOutWorkflows_ Oracle implementation of GetNotClosedOutWorkflows Lists top level filesets not injected to monitoring """
35.482759
117
0.669582
""" _GetNotClosedOutWorkflows_ Oracle implementation of GetNotClosedOutWorkflows Lists top level filesets not injected to monitoring """ from WMCore.Database.DBFormatter import DBFormatter class GetNotClosedOutWorkflows(DBFormatter): def execute(self, conn = None, transaction = False): sql = """SELECT ...
0
0
0
815
0
0
0
30
45
9bd44b4ee14e40bcdf488c3f5373a25ced1d890a
1,071
py
Python
setup.py
CyberSolutionsTech/cst-micro-chassis
236931f91b6622702615a06810871b3106c05fcc
[ "MIT" ]
null
null
null
setup.py
CyberSolutionsTech/cst-micro-chassis
236931f91b6622702615a06810871b3106c05fcc
[ "MIT" ]
null
null
null
setup.py
CyberSolutionsTech/cst-micro-chassis
236931f91b6622702615a06810871b3106c05fcc
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages __version__ = '0.1.0' setup( name='cst-micro-chassis', version=__version__, author='CyberSolutionsTech', license='MIT', author_email='nicolae.natrapeiu@cyber-solutions.com', description='Microservices chassis pattern library', long_description=...
28.184211
75
0.637722
from setuptools import setup, find_packages __version__ = '0.1.0' def read(filename): with open(filename, "r", encoding="utf-8") as fh: return fh.read() setup( name='cst-micro-chassis', version=__version__, author='CyberSolutionsTech', license='MIT', author_email='nicolae.natrapeiu@...
0
0
0
0
0
77
0
0
23
389ce309472ac29c718061120357cbdee9284804
1,314
py
Python
src/cli/command/status.py
oVirt/ovirt-engine-cli
422d70e1dc422f0ca248abea47a472e3605caa4b
[ "Apache-2.0" ]
4
2015-11-29T08:53:03.000Z
2022-02-05T14:10:24.000Z
src/cli/command/status.py
oVirt/ovirt-engine-cli
422d70e1dc422f0ca248abea47a472e3605caa4b
[ "Apache-2.0" ]
null
null
null
src/cli/command/status.py
oVirt/ovirt-engine-cli
422d70e1dc422f0ca248abea47a472e3605caa4b
[ "Apache-2.0" ]
4
2015-02-06T02:06:53.000Z
2020-03-24T07:13:05.000Z
# # Copyright (c) 2010 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
27.957447
74
0.62481
# # Copyright (c) 2010 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
0
0
0
657
0
0
0
18
46
5f7466b0ae98c93b9b60cf0a0fffea4cf7387dd8
383
py
Python
basicfunc.py
krshubham/ecc-elgamal
9a4e14b59580a6b71d33919e5dd9adc3867bf30f
[ "MIT" ]
1
2017-10-17T07:03:51.000Z
2017-10-17T07:03:51.000Z
basicfunc.py
krshubham/ecc-elgamal
9a4e14b59580a6b71d33919e5dd9adc3867bf30f
[ "MIT" ]
null
null
null
basicfunc.py
krshubham/ecc-elgamal
9a4e14b59580a6b71d33919e5dd9adc3867bf30f
[ "MIT" ]
null
null
null
import collections Coord = collections.namedtuple("Coord", ["x", "y"])
18.238095
51
0.488251
import collections import os,sys def inv(n, q): for i in range(q): if (n * i) % q == 1: return i pass assert False, "unreached" pass def sqrt(n, q): assert n < q for i in range(1, q): if i * i % q == n: return (i, q - i) pass return (Fals...
0
0
0
0
0
251
0
-8
68
746bc1433c13361daa899e88d819fb353b116316
3,290
py
Python
site_viewer_script.py
EmilFerrariHerzum/icons_substituter
07a7cdcb06400c25090378d38ae48f46a674bf40
[ "MIT" ]
null
null
null
site_viewer_script.py
EmilFerrariHerzum/icons_substituter
07a7cdcb06400c25090378d38ae48f46a674bf40
[ "MIT" ]
null
null
null
site_viewer_script.py
EmilFerrariHerzum/icons_substituter
07a7cdcb06400c25090378d38ae48f46a674bf40
[ "MIT" ]
null
null
null
from decouple import config import os url = "https://busyliving.co.uk/" username = config("login_username") password = config("password") # Log in to the site and get the source code # Define a class to store the results needed # Finds the elements needed and put them in an array # Define the path to ...
40.617284
151
0.661702
from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium import webdriver from decouple import config import time import re import os url = "https://busyliving.co.uk/" username = config(...
0
0
0
125
0
2,145
0
86
254
946bab785021927c61c57cce0106b761b8595f91
1,461
py
Python
evan/services/events/zoom.py
eillarra/evan
befe0f8daedd1b1f629097110d92e68534e43da1
[ "MIT" ]
null
null
null
evan/services/events/zoom.py
eillarra/evan
befe0f8daedd1b1f629097110d92e68534e43da1
[ "MIT" ]
20
2021-03-31T20:10:46.000Z
2022-02-15T09:58:13.000Z
evan/services/events/zoom.py
eillarra/evan
befe0f8daedd1b1f629097110d92e68534e43da1
[ "MIT" ]
null
null
null
import csv from typing import Dict def attendee_report(csv_path: str) -> Dict: """Given a standard Zoom CSV attendee report, returns massaged information.""" report = [] field_map = { "email": ["Email", str], "first_name": ["First Name", str], "last_name": ["Last Name", str], ...
27.566038
82
0.557153
import csv from datetime import datetime from typing import Dict, Optional, Union def to_bool(val: str) -> bool: return val == "Yes" def to_datetime(dt: str) -> Optional[datetime]: return datetime.strptime(dt, "%b %d, %Y %H:%M:%S") if dt != "--" else None def to_minutes(minutes: Union[str, int]) -> int: ...
0
0
0
0
0
215
0
25
92
1c030e32a152ec1a34ad3b544ff9fd528e088b4e
4,811
py
Python
convert_model.py
NoVarlok/sova-tts-vocoder
1d44a7247341e404e503fb0de386af5f16d36806
[ "Apache-2.0" ]
45
2020-08-26T05:50:27.000Z
2021-01-27T15:40:09.000Z
convert_model.py
NoVarlok/sova-tts-vocoder
1d44a7247341e404e503fb0de386af5f16d36806
[ "Apache-2.0" ]
null
null
null
convert_model.py
NoVarlok/sova-tts-vocoder
1d44a7247341e404e503fb0de386af5f16d36806
[ "Apache-2.0" ]
3
2021-01-05T17:24:23.000Z
2022-03-31T15:20:21.000Z
# ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions...
47.166667
108
0.676782
# ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions...
0
0
0
0
0
2,699
0
-10
114
8f4588bb23009cbf6d229ec7164249f2d69ad1bd
2,878
py
Python
python/pavement.py
Oskarmal/svlab3
c9ca65e8ef2d7d7b2938229901a88fa71dbbeb7e
[ "Apache-2.0" ]
null
null
null
python/pavement.py
Oskarmal/svlab3
c9ca65e8ef2d7d7b2938229901a88fa71dbbeb7e
[ "Apache-2.0" ]
null
null
null
python/pavement.py
Oskarmal/svlab3
c9ca65e8ef2d7d7b2938229901a88fa71dbbeb7e
[ "Apache-2.0" ]
null
null
null
# # Copyright IBM Corp. 2014 # # 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, s...
31.282609
109
0.54378
# # Copyright IBM Corp. 2014 # # 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, s...
0
1,946
0
0
0
0
0
14
343
5a5680130054180b553975fb2552c8384b096654
11,166
py
Python
frontend/animation/display.py
eldstal/CTF
29ae870a362257c132ee729befbed86473cfb21d
[ "MIT" ]
null
null
null
frontend/animation/display.py
eldstal/CTF
29ae870a362257c132ee729befbed86473cfb21d
[ "MIT" ]
2
2021-02-07T21:31:09.000Z
2021-02-18T10:33:01.000Z
frontend/animation/display.py
eldstal/CTF
29ae870a362257c132ee729befbed86473cfb21d
[ "MIT" ]
null
null
null
# XXX: Should this be a Renderer?
34.462963
139
0.515135
from asciimatics.effects import Effect from asciimatics.screen import Screen from pyfiglet import Figlet import re import ftfy import unicodedata class FirstBloodDisplay(Effect): def __init__(self, screen, team, challenge, duration=None, color=None, shade_colors=None, team_color=None, chall_color=None, **kwarg...
0
75
0
10,860
0
0
0
14
179
416cbbc595a1d461047ca88d1b55531361f0ea82
10,031
py
Python
benchmarks/benchmark.py
findvid/main
dd9bd14255af8c642b39b08d59e64cbfa314d908
[ "MIT" ]
null
null
null
benchmarks/benchmark.py
findvid/main
dd9bd14255af8c642b39b08d59e64cbfa314d908
[ "MIT" ]
null
null
null
benchmarks/benchmark.py
findvid/main
dd9bd14255af8c642b39b08d59e64cbfa314d908
[ "MIT" ]
null
null
null
import pymongo import shutil import os import argparse import re import urllib2 import subprocess import time import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import kmeanstree from sys import exit # instanciate and configure an argument parser PARSER = argparse.ArgumentParser(description='')...
30.213855
165
0.692453
import pymongo import shutil import os import argparse import re import urllib2 import subprocess import time import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import kmeanstree from sys import exit # instanciate and configure an argument parser PARSER = argparse.ArgumentParser(description='')...
0
0
0
0
0
6,844
0
0
114
3fa7227dd1d0fac4716379482b210f70d2f71a80
3,534
py
Python
kombucha_monitor.py
BeefKastle/Kombucha-Monitor
5c1440876a281e3b23f877984130fa450a0ef09d
[ "MIT" ]
null
null
null
kombucha_monitor.py
BeefKastle/Kombucha-Monitor
5c1440876a281e3b23f877984130fa450a0ef09d
[ "MIT" ]
null
null
null
kombucha_monitor.py
BeefKastle/Kombucha-Monitor
5c1440876a281e3b23f877984130fa450a0ef09d
[ "MIT" ]
null
null
null
#!/usr/bin/env python import datetime import time import os from shutil import copyfile from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive SLEEP_TIME = 3 dht_sensor_port = 7 dht_sensor_type = 0 g_login = GoogleAuth() g_login.LocalWebserverAuth() drive = GoogleDrive(g_login) # set loop delay...
30.465517
127
0.667233
#!/usr/bin/env python import datetime import time import os from shutil import copyfile from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from grovepi import * SLEEP_TIME = 3 dht_sensor_port = 7 dht_sensor_type = 0 g_login = GoogleAuth() g_login.LocalWebserverAuth() drive = GoogleDrive(g_log...
0
0
0
0
0
312
0
0
45
e78cd382c98ea849d056a08763555ee519c0dc04
145
py
Python
src/colors.py
imesut/alfred-yeelight-pbc
2678a2544d200c209afaa7d6dc383466f179966d
[ "Unlicense" ]
1
2021-08-09T09:47:00.000Z
2021-08-09T09:47:00.000Z
src/colors.py
imesut/alfred-yeelight-pbc
2678a2544d200c209afaa7d6dc383466f179966d
[ "Unlicense" ]
1
2022-03-22T10:42:39.000Z
2022-03-30T19:46:53.000Z
src/colors.py
imesut/alfred-yeelight-pbc
2678a2544d200c209afaa7d6dc383466f179966d
[ "Unlicense" ]
null
null
null
colors = { "white": (255, 255, 255), "red": (255, 0, 0), "green": (0, 255, 0), "blue": (0, 0, 255), "orange": (255, 128, 0) }
20.714286
29
0.413793
colors = { "white": (255, 255, 255), "red": (255, 0, 0), "green": (0, 255, 0), "blue": (0, 0, 255), "orange": (255, 128, 0) }
0
0
0
0
0
0
0
0
0
ed0e13f65780912f9e869e7db56a098453508cf9
537
py
Python
python/ngsi_v2/ngsi_v2/api/__init__.py
orchestracities/sdk
9dd1e618d6c013ab916f3880df84c7882f6beec6
[ "Apache-2.0" ]
2
2019-12-22T01:01:34.000Z
2021-07-03T20:30:03.000Z
python/ngsi_v2/ngsi_v2/api/__init__.py
orchestracities/sdk
9dd1e618d6c013ab916f3880df84c7882f6beec6
[ "Apache-2.0" ]
2
2019-06-06T05:45:45.000Z
2019-06-06T09:03:10.000Z
python/ngsi_v2/ngsi_v2/api/__init__.py
orchestracities/sdk
9dd1e618d6c013ab916f3880df84c7882f6beec6
[ "Apache-2.0" ]
2
2021-07-03T20:30:06.000Z
2021-11-30T21:55:02.000Z
from __future__ import absolute_import # flake8: noqa # import apis into api package
38.357143
63
0.877095
from __future__ import absolute_import # flake8: noqa # import apis into api package from ngsi_v2.api.api_entry_point_api import APIEntryPointApi from ngsi_v2.api.attribute_value_api import AttributeValueApi from ngsi_v2.api.attributes_api import AttributesApi from ngsi_v2.api.batch_operations_api import BatchOperati...
0
0
0
0
0
0
0
274
176
b465cf8b3f874ec4178fbb6ee355ed6a404956a9
1,403
py
Python
cli_stryket/read_input.py
mile95/cli-stryket
3c4ea10c1937a179a17881b0b235b5daa3d6de91
[ "MIT" ]
null
null
null
cli_stryket/read_input.py
mile95/cli-stryket
3c4ea10c1937a179a17881b0b235b5daa3d6de91
[ "MIT" ]
null
null
null
cli_stryket/read_input.py
mile95/cli-stryket
3c4ea10c1937a179a17881b0b235b5daa3d6de91
[ "MIT" ]
null
null
null
from __future__ import annotations
30.5
76
0.613685
from __future__ import annotations from cli_stryket.system_exception import InvalidSystemException def read_input(filename: str) -> list(str): raw_system = parse_input_file(filename) validated_system = validate_system(raw_system) formatted_system = [format_system_row(row) for row in validated_system] ...
0
0
0
0
0
1,208
0
42
114
0d7f27fc43e340167cee28afdee347076b00555b
3,709
py
Python
politi_train/snoop.py
us241098/exif_consistency
d9bb27611564b5e566fc2b4593d3d22f967380bd
[ "Apache-2.0" ]
null
null
null
politi_train/snoop.py
us241098/exif_consistency
d9bb27611564b5e566fc2b4593d3d22f967380bd
[ "Apache-2.0" ]
5
2021-03-19T13:30:41.000Z
2022-03-12T00:35:05.000Z
politi_train/snoop.py
us241098/exif_consistency
d9bb27611564b5e566fc2b4593d3d22f967380bd
[ "Apache-2.0" ]
null
null
null
import pandas as pd import glob txt_files = glob.glob("*.txt") image_files=[] for i in txt_files: i=i.replace(".txt", ""); image_files.append(i) print(image_files) print(len(image_files)) #print((txt_files)) df=pd.read_csv('train.csv') # enter your filename with exiftags df['Assessment']='' df['Compress...
30.154472
84
0.465624
import pandas as pd import glob txt_files = glob.glob("*.txt") image_files=[] for i in txt_files: i=i.replace(".txt", ""); image_files.append(i) print(image_files) print(len(image_files)) #print((txt_files)) df=pd.read_csv('train.csv') # enter your filename with exiftags df['Assessment']='' df['Compress...
0
0
0
0
0
0
0
0
0
972f9280ed74904eaa019b25f28e79a5477d0743
1,426
py
Python
lib/modules/twitter.py
nkrios/omnibus
d73c1e720f1d97aa104a4286187f785ef0dcaae5
[ "MIT" ]
251
2018-05-08T20:40:37.000Z
2022-03-22T22:31:17.000Z
lib/modules/twitter.py
samyoyo/omnibus
65f6251137d6e38128c19120aa204a577b2cbcaf
[ "MIT" ]
33
2018-05-08T21:30:54.000Z
2020-08-19T16:24:28.000Z
lib/modules/twitter.py
samyoyo/omnibus
65f6251137d6e38128c19120aa204a577b2cbcaf
[ "MIT" ]
70
2018-05-16T12:53:05.000Z
2022-03-22T22:31:20.000Z
#!/usr/bin/env python ## # omnibus - deadbits # Twitter username search ##
30.340426
148
0.586255
#!/usr/bin/env python ## # omnibus - deadbits # Twitter username search ## from BeautifulSoup import BeautifulSoup from http import get class Plugin(object): def __init__(self, artifact): self.artifact = artifact self.artifact['data']['twitter'] = None self.headers = {'User-Agent': 'OSIN...
0
0
0
1,168
0
72
0
17
92
5e8ff68482070eb5109267cce3591f87f0e356e1
473
py
Python
tests/__main__.py
NiftyPET/NIPET
b1c3799c4a795e1db34dc36decd197ab74e95c6e
[ "Apache-2.0" ]
10
2019-12-11T07:05:07.000Z
2021-12-21T13:52:56.000Z
tests/__main__.py
NiftyPET/NIPET
b1c3799c4a795e1db34dc36decd197ab74e95c6e
[ "Apache-2.0" ]
21
2019-12-11T11:47:07.000Z
2022-02-08T19:42:40.000Z
tests/__main__.py
pjmark/NIPET
b1c3799c4a795e1db34dc36decd197ab74e95c6e
[ "Apache-2.0" ]
3
2019-02-19T21:19:00.000Z
2019-08-27T02:26:31.000Z
import logging log = logging.getLogger(__name__) DATA_URL = "https://zenodo.org/record/3877529/files/amyloidPET_FBP_TP0_extra.zip?download=1" if __name__ == "__main__": logging.basicConfig(level=logging.INFO) main()
23.65
92
0.72093
import logging from niftypet.ninst import install_tools as tls from .conftest import HOME log = logging.getLogger(__name__) DATA_URL = "https://zenodo.org/record/3877529/files/amyloidPET_FBP_TP0_extra.zip?download=1" def main(): log.info(f"Downloading {DATA_URL}\nto ${{DATA_ROOT:-~}} ({HOME})") with tls.ur...
0
0
0
0
0
145
0
31
69
26386774389ead7024b7022fe9cb7770be70ac81
466
py
Python
solution_cid_check.py
nmansard/wsmemmo_pinocchio
42722cc07e700140748f1d87a2671672d28cecc4
[ "MIT" ]
5
2019-01-28T15:02:50.000Z
2020-08-08T01:25:28.000Z
solution_cid_check.py
nmansard/wsmemmo_pinocchio
42722cc07e700140748f1d87a2671672d28cecc4
[ "MIT" ]
2
2019-01-28T13:07:48.000Z
2019-01-30T14:14:28.000Z
solution_cid_check.py
nmansard/wsmemmo_pinocchio
42722cc07e700140748f1d87a2671672d28cecc4
[ "MIT" ]
4
2019-05-05T19:29:20.000Z
2022-02-16T23:57:40.000Z
forces = pinocchio.StdVect_Force() for i in range(rmodel.njoints): forces.append(pinocchio.Force.Zero()) tau,fr,fl = pbm.x2vars(res) Mr = rmodel.frames[pbm.idR].placement jr = rmodel.frames[pbm.idR].parent forces[jr] = Mr.act(pinocchio.Force(fr)) Ml = rmodel.frames[pbm.idL].placement jl = rmodel.frames[pbm.idL].pare...
29.125
75
0.742489
forces = pinocchio.StdVect_Force() for i in range(rmodel.njoints): forces.append(pinocchio.Force.Zero()) tau,fr,fl = pbm.x2vars(res) Mr = rmodel.frames[pbm.idR].placement jr = rmodel.frames[pbm.idR].parent forces[jr] = Mr.act(pinocchio.Force(fr)) Ml = rmodel.frames[pbm.idL].placement jl = rmodel.frames[pbm.idL].pare...
0
0
0
0
0
0
0
0
0
c567ceae1a3c6867872194127272d492f0ef6adb
1,782
py
Python
boxdb/support_litebase.py
kshitij1235/boxdb
4aa121f856c148c5136368041a610a584fb1dbc6
[ "MIT" ]
1
2022-01-31T17:21:02.000Z
2022-01-31T17:21:02.000Z
boxdb/support_litebase.py
kshitij1235/boxdb
4aa121f856c148c5136368041a610a584fb1dbc6
[ "MIT" ]
null
null
null
boxdb/support_litebase.py
kshitij1235/boxdb
4aa121f856c148c5136368041a610a584fb1dbc6
[ "MIT" ]
null
null
null
''' boxdb/support_litebase -> v0.3 This file contain code for 1)get the data from file, and get row data [ ]get_content() speed optimization [ ]get_element() function added ''' def get_content(context, target): """ It gets the content from any file with data in it(auto generated) and returns in list ...
27.415385
87
0.594837
''' boxdb/support_litebase -> v0.3 This file contain code for 1)get the data from file, and get row data [ ]get_content() speed optimization [ ]get_element() function added ''' def get_content(context, target): """ It gets the content from any file with data in it(auto generated) and returns in list ...
0
0
0
0
0
0
0
0
0
5322bc5aa344a86a7e2d830119a5f46c1675a541
1,960
py
Python
city_translit.py
SergeiMinaev/city_translit
632e7c71a66e11591a41be8e6157c6d197c370ba
[ "MIT" ]
null
null
null
city_translit.py
SergeiMinaev/city_translit
632e7c71a66e11591a41be8e6157c6d197c370ba
[ "MIT" ]
null
null
null
city_translit.py
SergeiMinaev/city_translit
632e7c71a66e11591a41be8e6157c6d197c370ba
[ "MIT" ]
null
null
null
import re CITY_RE = re.compile('[^a-zA-Z- ]') DATA = { 'a': { 'anzherosudzhensk':'-', 'ashukino':'', }, 'b': { 'bronnitsy':'', 'biysk':'', }, 'c': { 'chelyabinsk':'', }, 'd': { }, 'e': { 'elektrostal':'', }, 'f': { }, 'g': ...
19.405941
56
0.448469
import re CITY_RE = re.compile('[^a-zA-Z- ]') DATA = { 'a': { 'anzherosudzhensk':'анжеро-судженск', 'ashukino':'ашукино', }, 'b': { 'bronnitsy':'бронницы', 'biysk':'бийск', }, 'c': { 'chelyabinsk':'челябинск', }, 'd': { }, 'e': { 'elektros...
688
0
0
0
0
167
0
0
23
f070a3fbb33a80cabd688d5c6bc9b192e7c3cc5b
1,168
py
Python
Gathered CTF writeups/ctf-7867/2020/cyber_security_rumble/hashfun/generate.py
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:00:41.000Z
2022-03-27T06:00:41.000Z
Gathered CTF writeups/ctf-7867/2020/cyber_security_rumble/hashfun/generate.py
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
null
null
null
Gathered CTF writeups/ctf-7867/2020/cyber_security_rumble/hashfun/generate.py
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:01:42.000Z
2022-03-27T06:01:42.000Z
# from secret import FLAG FLAG = "CSR{fuckingIdiotShitStupid}" c = hashfun(FLAG) print(c) print(len(FLAG)) print(len(c)) m = revhash(c) print(m) c = [10, 30, 31, 62, 27, 9, 4, 0, 1, 1, 4, 4, 7, 13, 8, 12, 21, 28, 12, 6, 60] m = revhash(c) print(m)
20.491228
78
0.52226
# from secret import FLAG FLAG = "CSR{fuckingIdiotShitStupid}" def hashfun(msg): digest = [] for i in range(len(msg) - 4): digest.append(ord(msg[i]) ^ ord(msg[i + 4])) return digest def revhash(cipher): msg_len = len(c) + 4 msg = ["."] * (msg_len + 1) msg[0:5] = "CSR{" ascii_st...
0
0
0
0
0
867
0
0
46
453f691706e832e723117b6a568b51a1c72e861c
164
py
Python
2019/01/part1.py
mihaip/adventofcode
3725668595bfcf619fe6c97d12e2f14b42e3f0cb
[ "Apache-2.0" ]
null
null
null
2019/01/part1.py
mihaip/adventofcode
3725668595bfcf619fe6c97d12e2f14b42e3f0cb
[ "Apache-2.0" ]
null
null
null
2019/01/part1.py
mihaip/adventofcode
3725668595bfcf619fe6c97d12e2f14b42e3f0cb
[ "Apache-2.0" ]
null
null
null
#!/usr/local/bin/python3 total_fuel = 0 with open("input.txt") as f: for line in f.readlines(): total_fuel += int(int(line) / 3) - 2 print(total_fuel)
20.5
44
0.634146
#!/usr/local/bin/python3 total_fuel = 0 with open("input.txt") as f: for line in f.readlines(): total_fuel += int(int(line) / 3) - 2 print(total_fuel)
0
0
0
0
0
0
0
0
0
915393967b0cdd20d663859048d87ba6b77ee1b8
3,134
py
Python
models/BugReport.py
SibylLab/Task-based-Bug-Report-Summerizer
2acd5d9a3d3ed6b009ab322dd5c73e39786fdfc5
[ "MIT" ]
null
null
null
models/BugReport.py
SibylLab/Task-based-Bug-Report-Summerizer
2acd5d9a3d3ed6b009ab322dd5c73e39786fdfc5
[ "MIT" ]
null
null
null
models/BugReport.py
SibylLab/Task-based-Bug-Report-Summerizer
2acd5d9a3d3ed6b009ab322dd5c73e39786fdfc5
[ "MIT" ]
null
null
null
#!/usr/bin/env python __author__ = "Akalanka Galappaththi" __email__ = "a.galappaththi@uleth.ca" __copyright__ = "Copyright 2020, The Bug Report Summarization Project @ Sybil-Lab" __license__ = "MIT" __maintainer__ = "Akalanka Galappaththi"
21.175676
82
0.49298
#!/usr/bin/env python __author__ = "Akalanka Galappaththi" __email__ = "a.galappaththi@uleth.ca" __copyright__ = "Copyright 2020, The Bug Report Summarization Project @ Sybil-Lab" __license__ = "MIT" __maintainer__ = "Akalanka Galappaththi" from models.Turn import Turn class BugReport: """Class represents a com...
0
0
0
2,838
0
0
0
7
46
5c4e6bb88bbc889fc1681cf32a3207b80306f5fe
1,540
py
Python
app_tools/tool_manager.py
planktontoolbox/plankton-toolbox
626930120329983fb9419a9aed94712148bac219
[ "MIT" ]
5
2016-12-02T08:24:35.000Z
2021-02-24T08:41:41.000Z
app_tools/tool_manager.py
planktontoolbox/plankton-toolbox
626930120329983fb9419a9aed94712148bac219
[ "MIT" ]
53
2016-11-14T13:11:41.000Z
2022-01-13T09:28:11.000Z
app_tools/tool_manager.py
planktontoolbox/plankton-toolbox
626930120329983fb9419a9aed94712148bac219
[ "MIT" ]
1
2020-11-27T01:20:10.000Z
2020-11-27T01:20:10.000Z
#!/usr/bin/python3 # -*- coding:utf-8 -*- # Project: http://plankton-toolbox.org # Copyright (c) 2010-2018 SMHI, Swedish Meteorological and Hydrological Institute # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
32.083333
91
0.601299
#!/usr/bin/python3 # -*- coding:utf-8 -*- # Project: http://plankton-toolbox.org # Copyright (c) 2010-2018 SMHI, Swedish Meteorological and Hydrological Institute # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). import app_tools import toolbox_utils @toolbox_utils.singleton ...
0
1,222
0
0
0
0
0
-6
73
127f168e8ac3a233174a2e259c95e146ff00c3c9
4,724
py
Python
sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py
romahamu/azure-sdk-for-python
a57c9f73b9121f79d317e1679b81fd460d6a25b8
[ "MIT" ]
1
2021-04-05T17:38:42.000Z
2021-04-05T17:38:42.000Z
sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py
romahamu/azure-sdk-for-python
a57c9f73b9121f79d317e1679b81fd460d6a25b8
[ "MIT" ]
null
null
null
sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py
romahamu/azure-sdk-for-python
a57c9f73b9121f79d317e1679b81fd460d6a25b8
[ "MIT" ]
1
2021-12-18T20:01:22.000Z
2021-12-18T20:01:22.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.313725
116
0.71613
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
0
0
0
3,597
0
0
0
276
276
5b4245a2b2b3e0e6cfc23ca588cf782c0dadae2d
2,254
py
Python
day14.py
davidfpc/AoC2021
b526e606dbf1cc59de4951a321aa9b98d04fde4c
[ "MIT" ]
null
null
null
day14.py
davidfpc/AoC2021
b526e606dbf1cc59de4951a321aa9b98d04fde4c
[ "MIT" ]
null
null
null
day14.py
davidfpc/AoC2021
b526e606dbf1cc59de4951a321aa9b98d04fde4c
[ "MIT" ]
null
null
null
# program to compute the time # of execution of any python code import time if __name__ == "__main__": puzzle_input = read_input("day14.txt") start = time.time() print(f"Part 1: {part1(puzzle_input)}") print(f"Part 2: {part2(puzzle_input)}") end = time.time() print(f"Took {round(end - star...
30.459459
68
0.61535
# program to compute the time # of execution of any python code import time from collections import Counter def read_input(file_name: str) -> (str, {str: str}): with open("inputFiles/" + file_name, "r") as file: lines = file.read().splitlines() rule = {} for i in lines[2:]: pai...
0
0
0
0
0
1,779
0
10
114
0768781c51dc064f20678bf1f84eed7a31493726
3,259
py
Python
models.py
aldragan0/voice-recognition
452bf9b9d1e2ad2a8e1c68ef960a82d6171708f0
[ "MIT" ]
12
2019-07-29T08:18:59.000Z
2021-09-17T09:34:25.000Z
models.py
aldragan0/voice-recognition
452bf9b9d1e2ad2a8e1c68ef960a82d6171708f0
[ "MIT" ]
null
null
null
models.py
aldragan0/voice-recognition
452bf9b9d1e2ad2a8e1c68ef960a82d6171708f0
[ "MIT" ]
4
2019-08-02T17:51:52.000Z
2022-03-12T17:59:59.000Z
BATCH_SIZE = 128
35.423913
106
0.684873
import numpy as np from sklearn.model_selection import train_test_split from file_io import features_from_file, labels_from_file, add_history from utils import labels_to_categorical, transpose_vector, get_count, get_mean_stddev, normalize_data BATCH_SIZE = 128 def train_deepnn(model_file, inputs, outputs, model, n...
0
0
0
0
0
2,923
0
156
158
84efcf3645933b64b01ee37feb768493c8936a16
6,927
py
Python
CalibrationHelpers.py
omarubilla/3D
87820b3db4ee9789fd22b89cd4a0d61868eed02f
[ "BSD-3-Clause" ]
null
null
null
CalibrationHelpers.py
omarubilla/3D
87820b3db4ee9789fd22b89cd4a0d61868eed02f
[ "BSD-3-Clause" ]
null
null
null
CalibrationHelpers.py
omarubilla/3D
87820b3db4ee9789fd22b89cd4a0d61868eed02f
[ "BSD-3-Clause" ]
null
null
null
# This function records images from the connected camera to specified directory # when the "Space" key is pressed. # directory: should be a string corresponding to the name of an existing # directory print("Hello!") folder = 'calibration_data' ####### THE FOLDER YOU CREATED GOES HERE! print(folder) # This function...
47.445205
80
0.656561
import cv2 import numpy as np import glob # This function records images from the connected camera to specified directory # when the "Space" key is pressed. # directory: should be a string corresponding to the name of an existing # directory print("Hello!") folder = 'calibration_data' ####### THE FOLDER YOU CREATED ...
0
0
0
0
0
5,912
0
-24
155
981e79f6d2a6d52ef160903b42183ea6a22283d5
260
py
Python
puzzle1/part_one.py
Tomer23/advent-of-code-2021
6781616807c9e5910cd4fe512aa9a3a9ec6738e2
[ "Apache-2.0" ]
null
null
null
puzzle1/part_one.py
Tomer23/advent-of-code-2021
6781616807c9e5910cd4fe512aa9a3a9ec6738e2
[ "Apache-2.0" ]
null
null
null
puzzle1/part_one.py
Tomer23/advent-of-code-2021
6781616807c9e5910cd4fe512aa9a3a9ec6738e2
[ "Apache-2.0" ]
null
null
null
FILENAME = './puzzle1/data/input' s = 0 previous_value = None with open(FILENAME) as file: for line in file: if previous_value: if int(line) > previous_value: s += 1 previous_value = int(line) print(s)
23.636364
43
0.565385
FILENAME = './puzzle1/data/input' s = 0 previous_value = None with open(FILENAME) as file: for line in file: if previous_value: if int(line) > previous_value: s += 1 previous_value = int(line) print(s)
0
0
0
0
0
0
0
0
0
adbf72a8eeb268e24a003c60a1b99687307e3bca
754
py
Python
Leetcode/0251-0300/0260-single-number-iii.py
MiKueen/Data-Structures-and-Algorithms
8788bde5349f326aac0267531f39ac7a2a708ee6
[ "MIT" ]
null
null
null
Leetcode/0251-0300/0260-single-number-iii.py
MiKueen/Data-Structures-and-Algorithms
8788bde5349f326aac0267531f39ac7a2a708ee6
[ "MIT" ]
null
null
null
Leetcode/0251-0300/0260-single-number-iii.py
MiKueen/Data-Structures-and-Algorithms
8788bde5349f326aac0267531f39ac7a2a708ee6
[ "MIT" ]
1
2019-10-06T15:46:14.000Z
2019-10-06T15:46:14.000Z
''' Author : MiKueen Level : Medium Problem Statement : Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. Example: Input: [1,2,1,3,2,5] Output: [3,5] Note: The order of the re...
29
172
0.655172
''' Author : MiKueen Level : Medium Problem Statement : Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. Example: Input: [1,2,1,3,2,5] Output: [3,5] Note: The order of the re...
0
0
0
214
0
0
0
0
23
cad8825299209b87e93310e4923bb67289f4e2f4
142
py
Python
HelloWord/demo1.py
smockgithub/MyPythonDemo
583d4c4da4f68e4e19ed8a926c445d46fd743d25
[ "MIT" ]
null
null
null
HelloWord/demo1.py
smockgithub/MyPythonDemo
583d4c4da4f68e4e19ed8a926c445d46fd743d25
[ "MIT" ]
null
null
null
HelloWord/demo1.py
smockgithub/MyPythonDemo
583d4c4da4f68e4e19ed8a926c445d46fd743d25
[ "MIT" ]
null
null
null
print('hello word','sub2') name = input() print('hello,', name) if name=='test': print('hello1,', name) else: print('hello2,', name)
15.777778
26
0.598592
print('hello word','sub2') name = input() print('hello,', name) if name=='test': print('hello1,', name) else: print('hello2,', name)
0
0
0
0
0
0
0
0
0
cc09c9fd8563ee68ca002bb4d2e90c0b50d291c7
53
py
Python
Modulo_1/semana3/Ciclos/package-unpackage/package-unpackage.py
rubens233/cocid_python
492ebdf21817e693e5eb330ee006397272f2e0cc
[ "MIT" ]
null
null
null
Modulo_1/semana3/Ciclos/package-unpackage/package-unpackage.py
rubens233/cocid_python
492ebdf21817e693e5eb330ee006397272f2e0cc
[ "MIT" ]
null
null
null
Modulo_1/semana3/Ciclos/package-unpackage/package-unpackage.py
rubens233/cocid_python
492ebdf21817e693e5eb330ee006397272f2e0cc
[ "MIT" ]
1
2022-03-04T00:57:18.000Z
2022-03-04T00:57:18.000Z
t = (1, 2, 3) a, b, c = t print(a) print(b) print(c)
8.833333
13
0.490566
t = (1, 2, 3) a, b, c = t print(a) print(b) print(c)
0
0
0
0
0
0
0
0
0
28365e241198cda38a59954fc4967d8d7545ac81
1,803
py
Python
datautil.py
ThorntheLetter/turbulent-guacamole
51b2541aa8dbaed1a22493289de67fbea8eaf709
[ "MIT" ]
null
null
null
datautil.py
ThorntheLetter/turbulent-guacamole
51b2541aa8dbaed1a22493289de67fbea8eaf709
[ "MIT" ]
null
null
null
datautil.py
ThorntheLetter/turbulent-guacamole
51b2541aa8dbaed1a22493289de67fbea8eaf709
[ "MIT" ]
null
null
null
import numpy as np #takes input frame and width of sample in bytes and transforms it into a number between -1 and 1 #reverses squash() vunsquash = np.vectorize(unsquash) vsquash = np.vectorize(squash) #Gets next frame in the file #Arranges the file into numpy matrix for input using every possible sequence. #Arr...
33.388889
96
0.715474
import numpy as np import wave #takes input frame and width of sample in bytes and transforms it into a number between -1 and 1 def squash(input, width = 2): return(input/(2 ** ((8 * width)-1))) #reverses squash() def unsquash(input, width = 2): return(input * (2 ** ((8 * width) - 1))) vunsquash = np.vectorize(uns...
0
0
0
0
0
1,304
0
-10
132
6de75ede73cb4358ec40e29b11707cd5219d4a6a
2,970
py
Python
polr/cli.py
kylieCat/polr-py
0cf268fad8fa979b4d76fec1a984aa4c52f8c5ca
[ "MIT" ]
null
null
null
polr/cli.py
kylieCat/polr-py
0cf268fad8fa979b4d76fec1a984aa4c52f8c5ca
[ "MIT" ]
48
2020-10-18T03:35:58.000Z
2022-03-31T19:48:03.000Z
polr/cli.py
kylieCat/polr-py
0cf268fad8fa979b4d76fec1a984aa4c52f8c5ca
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Console script for polr.""" import sys _client = None SHORTEN_HELP_STR = "Return an error if a link with the desired customending already exists" if __name__ == "__main__": sys.exit(polr()) # pragma: no cover
25.826087
103
0.662963
# -*- coding: utf-8 -*- """Console script for polr.""" import sys import click from .polr import Polr from . import utils from . import settings _client = None def get_client(): global _client if _client is None: _client = Polr(settings.POLR_URL, settings.POLR_API_KEY) return _client @click...
0
2,350
0
0
0
123
0
-9
251
a23c43bba7834ddfeda3fcc6a85fe6ae7593ab6f
2,840
py
Python
core/dbt/clients/registry.py
f1fe/dbt
e943b9fc842535e958ef4fd0b8703adc91556bc6
[ "Apache-2.0" ]
3,156
2017-03-05T09:59:23.000Z
2021-06-30T01:27:52.000Z
core/dbt/clients/registry.py
f1fe/dbt
e943b9fc842535e958ef4fd0b8703adc91556bc6
[ "Apache-2.0" ]
2,608
2017-02-27T15:39:40.000Z
2021-06-30T01:49:20.000Z
core/dbt/clients/registry.py
f1fe/dbt
e943b9fc842535e958ef4fd0b8703adc91556bc6
[ "Apache-2.0" ]
693
2017-03-13T03:04:49.000Z
2021-06-25T15:57:41.000Z
from dbt.utils import memoized import os if os.getenv('DBT_PACKAGE_HUB_URL'): DEFAULT_REGISTRY_BASE_URL = os.getenv('DBT_PACKAGE_HUB_URL') else: DEFAULT_REGISTRY_BASE_URL = 'https://hub.getdbt.com/' index_cached = memoized(index)
32.643678
91
0.737676
import functools import requests from dbt.events.functions import fire_event from dbt.events.types import ( RegistryProgressMakingGETRequest, RegistryProgressGETResponse ) from dbt.utils import memoized, _connection_exception_retry as connection_exception_retry from dbt import deprecations import os if os.gete...
0
0
0
0
0
2,139
0
158
294
6ad6d5451532f3f997a99686b38bd43e2437f651
1,273
py
Python
colorblend.py
shaunco/MoodMirror
6627ba9fb1df5d5db693cb9838a87f4c1c13a1d2
[ "Apache-2.0" ]
null
null
null
colorblend.py
shaunco/MoodMirror
6627ba9fb1df5d5db693cb9838a87f4c1c13a1d2
[ "Apache-2.0" ]
null
null
null
colorblend.py
shaunco/MoodMirror
6627ba9fb1df5d5db693cb9838a87f4c1c13a1d2
[ "Apache-2.0" ]
null
null
null
#from https://stackoverflow.com/questions/726549/algorithm-for-additive-color-mixing-for-rgb-values/726578 rgb_scale = 255 cmyk_scale = 100 def cmyk_to_rgb(c, m, y, k): """ """ r = rgb_scale*(1.0 - (c + k) / float(cmyk_scale)) g = rgb_scale*(1.0 - (m + k) / float(cmyk_scale)) b = rgb_scale*(1.0 - ...
24.480769
106
0.527101
#from https://stackoverflow.com/questions/726549/algorithm-for-additive-color-mixing-for-rgb-values/726578 rgb_scale = 255 cmyk_scale = 100 def rgb_to_cmyk(r, g, b): if (r == 0) and (g == 0) and (b == 0): # black return 0, 0, 0, cmyk_scale # rgb [0,255] -> cmy [0,1] c = 1 - r / float(rgb_...
0
0
0
0
0
482
0
0
23
b23ee3eb9a4f49b0aac4c2ffab6ce5c60165893e
12,658
py
Python
openpifpaf/plugins/apollocar3d/apollo_to_coco.py
anhvth/openpifpaf
a88edd744b50f76dfdae9dbb180d4a403cbfd060
[ "CC-BY-2.0", "CC-BY-4.0" ]
null
null
null
openpifpaf/plugins/apollocar3d/apollo_to_coco.py
anhvth/openpifpaf
a88edd744b50f76dfdae9dbb180d4a403cbfd060
[ "CC-BY-2.0", "CC-BY-4.0" ]
null
null
null
openpifpaf/plugins/apollocar3d/apollo_to_coco.py
anhvth/openpifpaf
a88edd744b50f76dfdae9dbb180d4a403cbfd060
[ "CC-BY-2.0", "CC-BY-4.0" ]
null
null
null
""" Convert txt files of ApolloCar3D into json file with COCO format """ # Packages for data processing, crowd annotations and histograms try: import matplotlib.pyplot as plt # pylint: disable=import-error except ModuleNotFoundError as err: if err.name != 'matplotlib': raise err plt = None try: ...
38.012012
99
0.55143
""" Convert txt files of ApolloCar3D into json file with COCO format """ import glob import os import time from shutil import copyfile import json import argparse import numpy as np from PIL import Image # Packages for data processing, crowd annotations and histograms try: import matplotlib.pyplot as plt # pyli...
0
514
0
9,735
0
1,497
0
62
315
40cebe3a0b3916621ef060c49209893847634a5f
1,204
py
Python
.ci/prep_azure.py
ome/mitogen
a154b7b134d954ea34de4c1beaca3aaa6f7514b9
[ "BSD-3-Clause" ]
null
null
null
.ci/prep_azure.py
ome/mitogen
a154b7b134d954ea34de4c1beaca3aaa6f7514b9
[ "BSD-3-Clause" ]
null
null
null
.ci/prep_azure.py
ome/mitogen
a154b7b134d954ea34de4c1beaca3aaa6f7514b9
[ "BSD-3-Clause" ]
1
2020-09-18T05:46:01.000Z
2020-09-18T05:46:01.000Z
#!/usr/bin/env python import os import ci_lib batches = [] if 0 and os.uname()[0] == 'Linux': batches += [ [ "sudo chown `whoami`: ~", "chmod u=rwx,g=rx,o= ~", "sudo mkdir /var/run/sshd", "sudo /etc/init.d/ssh start", "mkdir -p ~/.ssh", ...
25.617021
94
0.524917
#!/usr/bin/env python import os import sys import ci_lib batches = [] if 0 and os.uname()[0] == 'Linux': batches += [ [ "sudo chown `whoami`: ~", "chmod u=rwx,g=rx,o= ~", "sudo mkdir /var/run/sshd", "sudo /etc/init.d/ssh start", "mkdir -p ~/....
0
0
0
0
0
0
0
-11
22
a3ee50cf266ce13ddb09c4a9f165d1706e075509
1,500
py
Python
ngramchecker.py
ayimechan/writingwidgets
73e4751dfdded14206b9d53692a25f0eede2cfb6
[ "MIT" ]
null
null
null
ngramchecker.py
ayimechan/writingwidgets
73e4751dfdded14206b9d53692a25f0eede2cfb6
[ "MIT" ]
null
null
null
ngramchecker.py
ayimechan/writingwidgets
73e4751dfdded14206b9d53692a25f0eede2cfb6
[ "MIT" ]
null
null
null
# a simple Ngram finder # only feasible for 3.x version # original text file must be plain text n=1 # min N howmany = 5 # max N outlength = 200 white_list = [] white_punc = ['','','','','','','','','"',"'",'','?','!','.',','] file_raw = open('put full path to youre text file here','r',encoding='utf-8') file_out = o...
25.862069
77
0.532
# a simple Ngram finder # only feasible for 3.x version # original text file must be plain text n=1 # min N howmany = 5 # max N outlength = 200 white_list = [] white_punc = [',','。','“','”','—','?','!','…','"',"'",':','?','!','.',','] file_raw = open('put full path to youre text file here','r',encoding='utf-8') fil...
27
0
0
0
0
232
0
0
23
067862330c1fbab9370310f28ae2252927f597a0
2,585
py
Python
python/tHome/sma/report.py
ZigmundRat/T-Home
5dc8689f52d87dac890051e540b338b009293ced
[ "BSD-2-Clause" ]
18
2016-04-17T19:39:28.000Z
2020-11-19T06:55:20.000Z
python/tHome/sma/report.py
ZigmundRat/T-Home
5dc8689f52d87dac890051e540b338b009293ced
[ "BSD-2-Clause" ]
6
2016-10-31T13:53:45.000Z
2019-03-20T20:47:03.000Z
python/tHome/sma/report.py
ZigmundRat/T-Home
5dc8689f52d87dac890051e540b338b009293ced
[ "BSD-2-Clause" ]
12
2016-10-31T12:29:08.000Z
2021-12-28T12:18:28.000Z
#=========================================================================== # # Report functions # #=========================================================================== import time from ..util import Data from .Link import Link #=========================================================================== def po...
25.85
76
0.504836
#=========================================================================== # # Report functions # #=========================================================================== import time from ..util import Data from .Link import Link #=========================================================================== def po...
0
0
0
0
0
0
0
0
0
c6899828cc13d6f77a3160c032666acbf80b7ec7
6,664
py
Python
app/controllers/api/private/v1/install.py
arxcdr/silverback
212139cbc1a648d1f877d60f2d7c4d750eefc3da
[ "BSD-3-Clause" ]
null
null
null
app/controllers/api/private/v1/install.py
arxcdr/silverback
212139cbc1a648d1f877d60f2d7c4d750eefc3da
[ "BSD-3-Clause" ]
null
null
null
app/controllers/api/private/v1/install.py
arxcdr/silverback
212139cbc1a648d1f877d60f2d7c4d750eefc3da
[ "BSD-3-Clause" ]
null
null
null
""" Install API Endpoint """ # Third Party Library # Local Library
34.890052
142
0.484094
""" Install API Endpoint """ # Third Party Library from django.views import View from django.http import JsonResponse from django.utils.translation import gettext as _ # Local Library from pyvalitron.form import Form from app.modules.util.helpers import Helpers from app.modules.core.request import Request from app.mo...
0
5,458
0
565
0
0
0
306
265
eaaf40f98644521dbdb576e92beeb38100def095
2,071
py
Python
tests/test_result.py
YoRHazzz/Python_Crawler
0b46baea32c2bb74593e02b4f6b4c9534a95444d
[ "MIT" ]
null
null
null
tests/test_result.py
YoRHazzz/Python_Crawler
0b46baea32c2bb74593e02b4f6b4c9534a95444d
[ "MIT" ]
1
2021-12-13T20:55:38.000Z
2021-12-13T20:55:38.000Z
tests/test_result.py
YoRHazzz/Python_Crawler
0b46baea32c2bb74593e02b4f6b4c9534a95444d
[ "MIT" ]
null
null
null
DEFAULT_INI_PATH = "./tests/config/default.ini" CONFIG_DIR_PATH = "./tests/config" test_failed_urls = ["http://www.google.com"] test_finished_urls = ["http://www.baidu.com"] test_repeated_urls = [] for i in range(10): test_repeated_urls.append("http://www.baidu.com") test_repeated_urls.append("http://www.hubi...
36.982143
94
0.689039
import pytest from crawler.core import Downloader, Config, UrlManager import os from shutil import rmtree DEFAULT_INI_PATH = "./tests/config/default.ini" CONFIG_DIR_PATH = "./tests/config" test_failed_urls = ["http://www.google.com"] test_finished_urls = ["http://www.baidu.com"] test_repeated_urls = [] for i in range...
0
383
0
1,212
0
0
0
18
111
8bd5eaf35ce1a725bace783655316c953bf23e47
991
py
Python
backend/youngun/youngun/apps/campaigns/migrations/0004_auto_20200701_1759.py
aakashbajaj/Youngun-Campaign-Tracking
a3b4f283b22cefb92c72f7638ee2a9da72622de0
[ "Apache-2.0" ]
null
null
null
backend/youngun/youngun/apps/campaigns/migrations/0004_auto_20200701_1759.py
aakashbajaj/Youngun-Campaign-Tracking
a3b4f283b22cefb92c72f7638ee2a9da72622de0
[ "Apache-2.0" ]
1
2021-09-22T19:27:06.000Z
2021-09-22T19:27:06.000Z
backend/youngun/youngun/apps/campaigns/migrations/0004_auto_20200701_1759.py
aakashbajaj/Youngun-Campaign-Tracking
a3b4f283b22cefb92c72f7638ee2a9da72622de0
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.7 on 2020-07-01 17:59
30.030303
96
0.611504
# Generated by Django 3.0.7 on 2020-07-01 17:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('campaigns', '0003_auto_20200701_1354'), ] operations = [ migrations.RemoveField( model_name='campaign', name='storie...
0
0
0
877
0
0
0
19
46
777c1f85b5da471695d52bab6592cdc2f616c13b
1,918
py
Python
Problem Set 2 - Student Version/game.py
MuhammeedAlaa/MI-Assignemnets
c90deb44c609d55ac5f7be343fed93d32e44c1e8
[ "MIT" ]
null
null
null
Problem Set 2 - Student Version/game.py
MuhammeedAlaa/MI-Assignemnets
c90deb44c609d55ac5f7be343fed93d32e44c1e8
[ "MIT" ]
null
null
null
Problem Set 2 - Student Version/game.py
MuhammeedAlaa/MI-Assignemnets
c90deb44c609d55ac5f7be343fed93d32e44c1e8
[ "MIT" ]
null
null
null
from typing import Callable, TypeVar # S and A are used for generic typing where S represents the state type and A represents the action type S = TypeVar("S") A = TypeVar("A") # Game is a generic abstract class for game definitions # It also implements 'CacheContainer' which allows you to call the "cache" method # wh...
40.808511
121
0.715328
from abc import ABC, abstractmethod from typing import Callable, Generic, Iterable, List, Optional, Tuple, TypeVar, Union from helpers.utils import CacheContainer, with_cache # S and A are used for generic typing where S represents the state type and A represents the action type S = TypeVar("S") A = TypeVar("A") # Ga...
0
331
0
26
0
0
0
94
222
a969f8b821d12efcfc53eb351086358fc1bd1c35
325
py
Python
app/models/configuration.py
ComputeCanada/mc-hub
92b4c212ba8f7b5b1c8b8700f981275605a07067
[ "BSD-3-Clause" ]
5
2020-09-04T16:34:36.000Z
2020-09-25T19:14:59.000Z
app/models/configuration.py
ComputeCanada/mc-hub
92b4c212ba8f7b5b1c8b8700f981275605a07067
[ "BSD-3-Clause" ]
39
2020-09-12T17:37:14.000Z
2022-03-10T17:49:57.000Z
app/models/configuration.py
ComputeCanada/mc-hub
92b4c212ba8f7b5b1c8b8700f981275605a07067
[ "BSD-3-Clause" ]
1
2021-03-29T15:42:13.000Z
2021-03-29T15:42:13.000Z
from models.constants import CONFIGURATION_FILE_PATH, CONFIGURATION_FILENAME from os import path import json try: config = path.join(CONFIGURATION_FILE_PATH, CONFIGURATION_FILENAME) with open(config) as configuration_file: config = json.load(configuration_file) except FileNotFoundError: config = di...
29.545455
76
0.790769
from models.constants import CONFIGURATION_FILE_PATH, CONFIGURATION_FILENAME from os import path import json try: config = path.join(CONFIGURATION_FILE_PATH, CONFIGURATION_FILENAME) with open(config) as configuration_file: config = json.load(configuration_file) except FileNotFoundError: config = di...
0
0
0
0
0
0
0
0
0
81d2da92d3e1e8341c227c909668831664692b3d
1,613
py
Python
api/web/encoder.py
scitran/nimsapi
a4203cf6c6d29aa15d33011250ee69ff929fcb0d
[ "MIT" ]
13
2016-05-31T14:32:58.000Z
2021-09-17T07:18:11.000Z
api/web/encoder.py
scitran/core
a4203cf6c6d29aa15d33011250ee69ff929fcb0d
[ "MIT" ]
911
2016-02-16T18:40:27.000Z
2018-08-07T17:50:29.000Z
api/web/encoder.py
scitran/nimsapi
a4203cf6c6d29aa15d33011250ee69ff929fcb0d
[ "MIT" ]
16
2016-02-17T15:54:34.000Z
2021-04-07T05:30:34.000Z
import json def sse_pack(d): """ Format a map with Server-Sent-Event-meaningful keys into a string for transport. Happily borrowed from: http://taoofmac.com/space/blog/2014/11/16/1940 For reading on web usage: http://www.html5rocks.com/en/tutorials/eventsource/basics For reading on the for...
29.87037
144
0.6708
from pymongo.cursor import Cursor import bson.objectid import datetime import json import pytz from ..jobs.jobs import Job def custom_json_serializer(obj): if isinstance(obj, bson.objectid.ObjectId): return str(obj) elif isinstance(obj, datetime.datetime): return pytz.timezone('UTC').localize(...
0
0
0
0
0
366
0
1
134
ab58f25864314da53acc8ff2833933638094f80d
7,611
py
Python
kitsune/wiki/tests/test_notifications.py
jgmize/kitsune
8f23727a9c7fcdd05afc86886f0134fb08d9a2f0
[ "BSD-3-Clause" ]
null
null
null
kitsune/wiki/tests/test_notifications.py
jgmize/kitsune
8f23727a9c7fcdd05afc86886f0134fb08d9a2f0
[ "BSD-3-Clause" ]
null
null
null
kitsune/wiki/tests/test_notifications.py
jgmize/kitsune
8f23727a9c7fcdd05afc86886f0134fb08d9a2f0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from kitsune.users.tests import user from kitsune.wiki.events import (ReadyRevisionEvent) def _set_up_ready_watcher(): """Make a user who watches for revision readiness.""" ready_watcher = user(email='ready@example.com', save=True) ReadyRevisionEvent.notify(ready_watcher) re...
39.848168
79
0.637893
# -*- coding: utf-8 -*- from django.core import mail from nose.tools import eq_ from kitsune.sumo.tests import post from kitsune.users.tests import add_permission, user from kitsune.wiki.config import ( SIGNIFICANCES, MEDIUM_SIGNIFICANCE, TYPO_SIGNIFICANCE) from kitsune.wiki.events import ( ReadyRevisionEvent...
2
0
0
6,619
0
202
0
199
249
d1041f84e0b284f1c6cf9ef99386ef0b0763ac36
1,427
py
Python
demo.py
luther38/XivDbWeb
204d066232c04dce0ea5a03ec55f160cfbc62659
[ "MIT" ]
null
null
null
demo.py
luther38/XivDbWeb
204d066232c04dce0ea5a03ec55f160cfbc62659
[ "MIT" ]
null
null
null
demo.py
luther38/XivDbWeb
204d066232c04dce0ea5a03ec55f160cfbc62659
[ "MIT" ]
null
null
null
from xivdb.sql import DB, Base, Weapon, Repair, Materia, Stats from xivdb.importCsv import importCsv from typing import List from sqlalchemy.orm import sessionmaker from XivDbReader import Reader import sqlalchemy.orm d = DB(Base) session: sessionmaker = d.newSession() w = d.newWeapon() read: Reader = Reader(job='wh...
24.186441
79
0.602663
from xivdb.sql import DB, Base, Weapon, Repair, Materia, Stats from xivdb.importCsv import importCsv from typing import List from sqlalchemy.orm import sessionmaker from XivDbReader import Reader import sqlalchemy.orm d = DB(Base) session: sessionmaker = d.newSession() w = d.newWeapon() read: Reader = Reader(job='wh...
0
0
0
0
0
0
0
0
0
f8dd9101a0c14362d495693796971d912eed2201
10,854
py
Python
causallearn/search/FCMBased/lingam/multi_group_direct_lingam.py
softsys4ai/causal-config-labyrinth
4f50f9ff15429b0ac6ad0a99fbe4cfdd17e360fc
[ "MIT" ]
15
2022-01-20T12:35:35.000Z
2022-03-24T16:25:24.000Z
causallearn/search/FCMBased/lingam/multi_group_direct_lingam.py
softsys4ai/unicorn
4f50f9ff15429b0ac6ad0a99fbe4cfdd17e360fc
[ "MIT" ]
14
2022-01-23T00:20:00.000Z
2022-02-22T01:40:43.000Z
causallearn/search/FCMBased/lingam/multi_group_direct_lingam.py
softsys4ai/causal-config-labyrinth
4f50f9ff15429b0ac6ad0a99fbe4cfdd17e360fc
[ "MIT" ]
1
2022-02-23T08:59:24.000Z
2022-02-23T08:59:24.000Z
""" Python implementation of the LiNGAM algorithms. The LiNGAM Project: https://sites.google.com/site/sshimizu06/lingam """
38.626335
124
0.570849
""" Python implementation of the LiNGAM algorithms. The LiNGAM Project: https://sites.google.com/site/sshimizu06/lingam """ import itertools import numbers import warnings import numpy as np from sklearn.utils import check_array, resample from .bootstrap import BootstrapResult from .direct_lingam import DirectLiNGAM ...
0
385
0
10,049
0
0
0
72
223
7e5ca3f9e7f33bdcb4fe3780578db3eb48b9c9dc
11,476
py
Python
bravado/client.py
analogue/swagger-py
ded3a811579ea4e0d1adb3582b90d8d941b7fb17
[ "BSD-3-Clause" ]
null
null
null
bravado/client.py
analogue/swagger-py
ded3a811579ea4e0d1adb3582b90d8d941b7fb17
[ "BSD-3-Clause" ]
null
null
null
bravado/client.py
analogue/swagger-py
ded3a811579ea4e0d1adb3582b90d8d941b7fb17
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ The :class:`SwaggerClient` provides an interface for making API calls based on a swagger spec, and returns responses of python objects which build from the API response. Structure Diagram:: +---------------------+ | | | SwaggerClient | ...
35.639752
79
0.622778
# -*- coding: utf-8 -*- """ The :class:`SwaggerClient` provides an interface for making API calls based on a swagger spec, and returns responses of python objects which build from the API response. Structure Diagram:: +---------------------+ | | | SwaggerClient | ...
0
2,420
0
3,307
0
366
0
193
259
488f805ead1ea81a412115f7c6e06f8427a0411c
6,844
py
Python
Login.py
MichaelToLearn/oh_my_course
ac00f132e931422430f5f8ed2079ce0fc21cfb37
[ "Apache-2.0" ]
1
2020-01-14T01:14:27.000Z
2020-01-14T01:14:27.000Z
Login.py
MichaelToLearn/oh_my_course
ac00f132e931422430f5f8ed2079ce0fc21cfb37
[ "Apache-2.0" ]
null
null
null
Login.py
MichaelToLearn/oh_my_course
ac00f132e931422430f5f8ed2079ce0fc21cfb37
[ "Apache-2.0" ]
null
null
null
# coding:utf-8 import os BASE_DIR = os.path.dirname(__file__) # LOGIN_URL = 'http://grdms.bit.edu.cn/yjs/login_cas.jsp' # LOGIN_URL = 'https://login.bit.edu.cn/cas/login?service=https://login.bit.edu.cn/campus-account/shiro-cas' LOGIN_URL = 'https://login.bit.edu.cn/cas/login?service=http%3A%2F%2Fgrdms.bit.edu.cn%2Fyj...
30.690583
192
0.513296
# coding:utf-8 import json import pickle import requests import os import re from io import BytesIO BASE_DIR = os.path.dirname(__file__) # LOGIN_URL = 'http://grdms.bit.edu.cn/yjs/login_cas.jsp' # LOGIN_URL = 'https://login.bit.edu.cn/cas/login?service=https://login.bit.edu.cn/campus-account/shiro-cas' LOGIN_URL = 'h...
675
0
0
5,898
0
0
0
-35
134
e1aad344e44883df09767703e8496275881b91e0
2,937
py
Python
bot.py
VicOfDlt/JesStats
f787d3d87900934632ac44144760c273731565b0
[ "MIT" ]
null
null
null
bot.py
VicOfDlt/JesStats
f787d3d87900934632ac44144760c273731565b0
[ "MIT" ]
null
null
null
bot.py
VicOfDlt/JesStats
f787d3d87900934632ac44144760c273731565b0
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from discord_components import DiscordComponents from config import token, db from help_ import CustomHelpCommand config = db["config"] links = db["linked"] presence_count = 0 intents = discord.Intents.all() bot = commands.Bot( command_pref...
26.459459
86
0.607423
import discord, requests, os from discord.ext import commands, tasks from discord_components import DiscordComponents from config import token, db from typing import Union from help_ import CustomHelpCommand config = db["config"] links = db["linked"] presence_count = 0 async def get_embed(ctx: comman...
0
841
1,343
0
0
0
0
24
148
2dd3cd31fed4537a30510222bf73cf19535656b0
1,121
py
Python
Examples/Infovis/Python/boost_centrality.py
OpenGeoscience/VTK
a373e975b9284a022f43a062ebf5042bb17b4e44
[ "BSD-3-Clause" ]
1
2020-05-04T05:59:07.000Z
2020-05-04T05:59:07.000Z
Examples/Infovis/Python/boost_centrality.py
OpenGeoscience/VTK
a373e975b9284a022f43a062ebf5042bb17b4e44
[ "BSD-3-Clause" ]
null
null
null
Examples/Infovis/Python/boost_centrality.py
OpenGeoscience/VTK
a373e975b9284a022f43a062ebf5042bb17b4e44
[ "BSD-3-Clause" ]
5
2015-10-09T04:12:29.000Z
2021-12-15T16:57:11.000Z
source = vtkRandomGraphSource() source.DirectedOff() source.SetNumberOfVertices(50) source.SetEdgeProbability(0.01) source.SetUseEdgeProbability(True) source.AllowParallelEdgesOn() source.AllowSelfLoopsOn() source.SetStartWithTree(True) # Connect to the Boost centrality filter. centrality = vtkBoostBrandesCentrality...
25.477273
69
0.831401
from vtk import * source = vtkRandomGraphSource() source.DirectedOff() source.SetNumberOfVertices(50) source.SetEdgeProbability(0.01) source.SetUseEdgeProbability(True) source.AllowParallelEdgesOn() source.AllowSelfLoopsOn() source.SetStartWithTree(True) # Connect to the Boost centrality filter. centrality = vtkBoos...
0
0
0
0
0
0
0
-4
22
b8e0783ae0bf6f0f8523e6b5ddc9acc14987632e
2,731
py
Python
exam14_02/script_Davide_Abbondandolo.py
Abbodavi/programming_davide_abbondandolo
b985cb0af0c5cd46d6b643410b0e106ddf4a1148
[ "MIT" ]
null
null
null
exam14_02/script_Davide_Abbondandolo.py
Abbodavi/programming_davide_abbondandolo
b985cb0af0c5cd46d6b643410b0e106ddf4a1148
[ "MIT" ]
null
null
null
exam14_02/script_Davide_Abbondandolo.py
Abbodavi/programming_davide_abbondandolo
b985cb0af0c5cd46d6b643410b0e106ddf4a1148
[ "MIT" ]
null
null
null
import input_data #input import BLOSUM52=input_data.BLOSUM52 seq2=input_data.seq2 seq1=input_data.seq1 matrix=NW_matrix(seq1,seq2,BLOSUM52,-2) #compute 2 matrix, gap penality is set to -2 result=allign(matrix[0],matrix[1],seq1,seq2) #use matrix obtained before to get the alignment print(result[0],result[1])...
47.912281
93
0.645185
import input_data #input import BLOSUM52=input_data.BLOSUM52 seq2=input_data.seq2 seq1=input_data.seq1 def NW_matrix(s1,s2,matrix,gap): score_m=[[0] * (len(s1)+1) for i in range(len(s2)+1)] #create 2 equal matrix for score move_m=[[0] * (len(s1)+1) for i in range(len(s2)+1)] #and movement of size(n+1)*...
6
0
0
0
0
2,332
0
0
46
5c365fe033cb87c245810ffc125f74663dd50b0f
850
py
Python
2016/1/b.py
WilliamHayward/Advent-Of-Code
fdcc3677632dc79d96233f98527a1db2e41704dd
[ "MIT" ]
null
null
null
2016/1/b.py
WilliamHayward/Advent-Of-Code
fdcc3677632dc79d96233f98527a1db2e41704dd
[ "MIT" ]
null
null
null
2016/1/b.py
WilliamHayward/Advent-Of-Code
fdcc3677632dc79d96233f98527a1db2e41704dd
[ "MIT" ]
null
null
null
directions = open('input', 'r').read().strip().split(', ') x = 0 y = 0 facing = 0 #North visited = {} visited[(x, y)] = True for direction in directions: if direction[0] == 'R': facing += 1 else: facing -= 1 if facing < 0: facing = 3 elif facing > 3: facing = 0 cou...
22.368421
77
0.458824
directions = open('input', 'r').read().strip().split(', ') x = 0 y = 0 facing = 0 #North visited = {} visited[(x, y)] = True for direction in directions: if direction[0] == 'R': facing += 1 else: facing -= 1 if facing < 0: facing = 3 elif facing > 3: facing = 0 cou...
0
0
0
0
0
0
0
0
0
12c28cc46a7dcf0d0ebc53795dbe76d01de5679c
1,254
py
Python
tests/test_typing.py
lschmelzeisen/nasty-utils
d2daf2faed35d7028bf0adc7ae5a321ca3b9b4ed
[ "ECL-2.0", "Apache-2.0" ]
1
2020-05-23T19:18:45.000Z
2020-05-23T19:18:45.000Z
tests/test_typing.py
lschmelzeisen/nasty-utils
d2daf2faed35d7028bf0adc7ae5a321ca3b9b4ed
[ "ECL-2.0", "Apache-2.0" ]
1
2021-05-09T08:09:20.000Z
2021-05-09T08:09:20.000Z
tests/test_typing.py
lschmelzeisen/nasty-utils
d2daf2faed35d7028bf0adc7ae5a321ca3b9b4ed
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# # Copyright 2019-2020 Lukas Schmelzeisen # # 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 t...
29.162791
74
0.733652
# # Copyright 2019-2020 Lukas Schmelzeisen # # 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 t...
0
0
0
0
0
434
0
68
159
ec2866ff5024ac73b3d31a1f531f8625cde8f60f
485
py
Python
froide/foirequest/migrations/0009_foirequest_closed.py
xenein/froide
59bd3eeded3c3ed00fbc858fe20bfea99c8dbefa
[ "MIT" ]
198
2016-12-03T22:42:55.000Z
2022-03-25T15:08:36.000Z
froide/foirequest/migrations/0009_foirequest_closed.py
xenein/froide
59bd3eeded3c3ed00fbc858fe20bfea99c8dbefa
[ "MIT" ]
264
2016-11-30T18:53:17.000Z
2022-03-17T11:34:18.000Z
froide/foirequest/migrations/0009_foirequest_closed.py
xenein/froide
59bd3eeded3c3ed00fbc858fe20bfea99c8dbefa
[ "MIT" ]
42
2016-12-22T04:08:27.000Z
2022-02-26T08:30:38.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-12-01 14:49 from __future__ import unicode_literals
23.095238
79
0.630928
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-12-01 14:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("foirequest", "0008_auto_20171124_1508"), ] operations = [ migrations.AddFie...
0
0
0
306
0
0
0
19
46
826a663afa3c9227a3c7b8143bc752352b87b5f3
2,244
py
Python
pipedown/Tools/grpc_cisco_python/tests/test_cisco_grpc.py
cisco-ie/Pipedown
5f37435f63ccb5b1f157e333fdd441bdc0b1c8f7
[ "Apache-2.0" ]
1
2017-05-22T11:26:32.000Z
2017-05-22T11:26:32.000Z
pipedown/Tools/grpc_cisco_python/tests/test_cisco_grpc.py
cisco-ie/Pipedown
5f37435f63ccb5b1f157e333fdd441bdc0b1c8f7
[ "Apache-2.0" ]
null
null
null
pipedown/Tools/grpc_cisco_python/tests/test_cisco_grpc.py
cisco-ie/Pipedown
5f37435f63ccb5b1f157e333fdd441bdc0b1c8f7
[ "Apache-2.0" ]
1
2018-01-17T21:44:52.000Z
2018-01-17T21:44:52.000Z
import unittest import sys sys.path.insert(0, '../') if __name__ == '__main__': unittest.main()
48.782609
478
0.62656
import unittest import sys sys.path.insert(0, '../') from client.cisco_grpc_client_insecure import CiscoGRPCClient import json class CiscoGRPCClientcase(unittest.TestCase): def setUp(self): self.client = CiscoGRPCClient('192.168.1.2', 57777, 10, 'vagrant', 'vagrant') self.maxDiff = None pa...
0
0
0
2,046
0
0
0
30
67
5367f5bc6cd6abd77796f8aca47609a14b59d7cf
2,331
py
Python
exchange/rest/async_client.py
raphaelvrosa/md2-nfv
b97e28fad3236fb76344ac3ac5194ef4a94494d0
[ "Apache-2.0" ]
null
null
null
exchange/rest/async_client.py
raphaelvrosa/md2-nfv
b97e28fad3236fb76344ac3ac5194ef4a94494d0
[ "Apache-2.0" ]
null
null
null
exchange/rest/async_client.py
raphaelvrosa/md2-nfv
b97e28fad3236fb76344ac3ac5194ef4a94494d0
[ "Apache-2.0" ]
null
null
null
import logging logger = logging.getLogger(__name__) if __name__ == '__main__': import json import time client = WebClient() msg = { 'type': 'config', 'domains': [ {'id': 'B', 'address': 'http://127.0.0.1:8882'}, ] } msg_json = json.dumps(msg)...
28.084337
94
0.590305
import logging logger = logging.getLogger(__name__) import requests import _thread def request(_type, url, message, kwargs): logger.debug('sending msg %s to url %s', _type, url) # logger.debug('sending msg data \n%s', message) response = None try: if _type == 'post': response = re...
0
0
0
410
0
1,238
0
-13
114
bfe905b1326f3ed89fb3548f48848ac7a0505c7b
916
py
Python
submissions/4sum/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
null
null
null
submissions/4sum/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
1
2022-03-04T20:24:32.000Z
2022-03-04T20:31:58.000Z
submissions/4sum/solution.py
Wattyyy/LeetCode
13a9be056d0a0c38c2f8c8222b11dc02cb25a935
[ "MIT" ]
null
null
null
# https://leetcode.com/problems/4sum
28.625
69
0.434498
# https://leetcode.com/problems/4sum from collections import defaultdict class Solution: def fourSum(self, nums, target): N = len(nums) d = defaultdict(list) for i in range(N): for j in range(N): if i == j: continue key = tar...
0
0
0
818
0
0
0
14
46
fe7fc7706419bfb0980b5755b2b030e96b17e2b8
1,026
py
Python
frappe/website/serve.py
naderelabed/frappe
4d6fefaf6b5af594180c0f9f31c7e28e6f514348
[ "MIT" ]
3,755
2015-01-06T07:47:43.000Z
2022-03-31T20:54:23.000Z
frappe/website/serve.py
JMBodz/frappe
eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d
[ "MIT" ]
7,369
2015-01-01T19:59:41.000Z
2022-03-31T23:02:05.000Z
frappe/website/serve.py
JMBodz/frappe
eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d
[ "MIT" ]
2,685
2015-01-07T17:51:03.000Z
2022-03-31T23:16:24.000Z
import frappe from frappe.website.page_renderers.error_page import ErrorPage from frappe.website.page_renderers.not_permitted_page import NotPermittedPage from frappe.website.page_renderers.redirect_page import RedirectPage from frappe.website.path_resolver import PathResolver def get_response(path=None, http_status_...
34.2
79
0.807992
import frappe from frappe.website.page_renderers.error_page import ErrorPage from frappe.website.page_renderers.not_permitted_page import NotPermittedPage from frappe.website.page_renderers.redirect_page import RedirectPage from frappe.website.path_resolver import PathResolver def get_response(path=None, http_status_...
0
0
0
0
0
122
0
0
23
db46d261fd1ce7029b0a21c7afe2c9b4339b3375
2,398
py
Python
source/addition/lstm_trainer.py
smalik169/bachelor_thesis
5aa481d6e3a2f2ac82c8588ea8a9931024fa8000
[ "MIT" ]
null
null
null
source/addition/lstm_trainer.py
smalik169/bachelor_thesis
5aa481d6e3a2f2ac82c8588ea8a9931024fa8000
[ "MIT" ]
null
null
null
source/addition/lstm_trainer.py
smalik169/bachelor_thesis
5aa481d6e3a2f2ac82c8588ea8a9931024fa8000
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import rnn_cell, rnn train_set = np.load('train_set.npy') test_set = np.load('test_set.npy') x = tf.placeholder(tf.float32, shape=[None, None, 2]) y = tf.placeholder(tf.float32, shape=[1, None]) activation = lambda x: tf.maximum(x, .01*x) with tf.variable_scope('lstm'): ...
31.552632
97
0.635113
import tensorflow as tf import numpy as np import rnn_cell, rnn def weight_variable(shape): initial = tf.truncated_normal(shape, stddev=1.0/np.sqrt(shape[0])) return tf.Variable(initial) def bias_variable(shape): initial = tf.constant(0., shape=shape) return tf.Variable(initial) train_set = np.load('...
0
0
0
0
0
188
0
0
46
0716acadda46db3006308151bf26891cc22aae36
3,656
py
Python
HubblePi/viewer/DirBrowser_ui.py
scriptorron/hubblepi
402af74b537a40d0764b11d105aa8d3b0dd242f3
[ "MIT" ]
null
null
null
HubblePi/viewer/DirBrowser_ui.py
scriptorron/hubblepi
402af74b537a40d0764b11d105aa8d3b0dd242f3
[ "MIT" ]
null
null
null
HubblePi/viewer/DirBrowser_ui.py
scriptorron/hubblepi
402af74b537a40d0764b11d105aa8d3b0dd242f3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'DirBrowser_ui.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost!
50.082192
100
0.72128
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'DirBrowser_ui.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectN...
0
0
0
3,320
0
0
0
67
69
d4f7200717212225a1a93918ba5c5d4276b670ea
156
py
Python
dataent/patches/v6_20x/set_allow_draft_for_print.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
dataent/patches/v6_20x/set_allow_draft_for_print.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
6
2020-03-24T17:15:56.000Z
2022-02-10T18:41:31.000Z
dataent/patches/v6_20x/set_allow_draft_for_print.py
dataent/dataent
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
[ "MIT" ]
null
null
null
from __future__ import unicode_literals
31.2
85
0.801282
from __future__ import unicode_literals import dataent def execute(): dataent.db.set_value("Print Settings", "Print Settings", "allow_print_for_draft", 1)
0
0
0
0
0
79
0
-7
45
86bd6d50ace21215c2a04e7bfaf386521066d518
5,419
py
Python
src/python/__init__.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
1
2022-03-16T16:37:11.000Z
2022-03-16T16:37:11.000Z
src/python/__init__.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
null
null
null
src/python/__init__.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
null
null
null
''' The Sprite Curry system. This package contains everything one needs to compile and execute Curry code. The topmost module provides an instance of the Curry system and an API to interact with it. To perform a soft reset call :func:`reset`. This returns the system to its original state, with no definitions and no ...
25.92823
79
0.708987
''' The Sprite Curry system. This package contains everything one needs to compile and execute Curry code. The topmost module provides an instance of the Curry system and an API to interact with it. To perform a soft reset call :func:`reset`. This returns the system to its original state, with no definitions and no ...
0
761
0
244
0
0
0
54
136
102015a1ef62f8d52ecf5f73f79c9434dae540b2
546
py
Python
src/Advent_of_Code/2020/Day_25/Day_25_1.py
phungj/MSOE_Comp_Prog_Py
95e7521b28d3dbcb6279e7baf03067ca27acbe37
[ "MIT" ]
null
null
null
src/Advent_of_Code/2020/Day_25/Day_25_1.py
phungj/MSOE_Comp_Prog_Py
95e7521b28d3dbcb6279e7baf03067ca27acbe37
[ "MIT" ]
null
null
null
src/Advent_of_Code/2020/Day_25/Day_25_1.py
phungj/MSOE_Comp_Prog_Py
95e7521b28d3dbcb6279e7baf03067ca27acbe37
[ "MIT" ]
null
null
null
card_pub_key = 15335876 door_pub_key = 15086442 card_loop_size = find_loop_size(7, card_pub_key) door_loop_size = find_loop_size(7, door_pub_key) print(find_enc_key(door_pub_key, card_loop_size))
18.2
49
0.673993
card_pub_key = 15335876 door_pub_key = 15086442 def find_loop_size(subject_num, pub_key): value = 1 loops = 0 while value != pub_key: value *= subject_num value %= 20201227 loops += 1 return loops def find_enc_key(pub_key, loop_size): value = 1 for i in range(loop_...
0
0
0
0
0
300
0
0
46
7cd531ad1c6711dfe1dafaa01f04d7892914958b
607
py
Python
search_page_export_example/urls.py
Cantemo/SearchPageExportExample
eaa4222cf12a887b0ba0a008855aaede5e1d49e1
[ "BSD-3-Clause" ]
null
null
null
search_page_export_example/urls.py
Cantemo/SearchPageExportExample
eaa4222cf12a887b0ba0a008855aaede5e1d49e1
[ "BSD-3-Clause" ]
null
null
null
search_page_export_example/urls.py
Cantemo/SearchPageExportExample
eaa4222cf12a887b0ba0a008855aaede5e1d49e1
[ "BSD-3-Clause" ]
1
2021-08-10T13:47:43.000Z
2021-08-10T13:47:43.000Z
""" This file defined the URLs (end-points) for the plugin. """ from django.conf.urls import url from . import views # The plugin handles the request to the URL by responding with the view which is loaded # from views.py. Inside "views" is a class which responses to the # request. "name" is a shortcut name for the url...
37.9375
87
0.719934
""" This file defined the URLs (end-points) for the plugin. """ from django.conf.urls import url from . import views # The plugin handles the request to the URL by responding with the view which is loaded # from views.py. Inside "views" is a class which responses to the # request. "name" is a shortcut name for the url...
0
0
0
0
0
0
0
0
0
e6357e8a67f7f2c18a86d82e6d55d2cc0e11652c
8,218
py
Python
Chemistry/PDB/pdb_chain.py
continuous-symmetry-measure/pdb_prep
6cbd2ca43b4a52c998fdbd7e50a6ac48f991862f
[ "BSD-2-Clause" ]
null
null
null
Chemistry/PDB/pdb_chain.py
continuous-symmetry-measure/pdb_prep
6cbd2ca43b4a52c998fdbd7e50a6ac48f991862f
[ "BSD-2-Clause" ]
4
2018-12-06T08:57:24.000Z
2019-04-10T19:53:50.000Z
Chemistry/PDB/pdb_chain.py
continuous-symmetry-measure/pdb_prep
6cbd2ca43b4a52c998fdbd7e50a6ac48f991862f
[ "BSD-2-Clause" ]
1
2021-11-21T10:18:17.000Z
2021-11-21T10:18:17.000Z
""" * pdb is list of pdb_models * pdb_model is a list of pdb_chains objects * pdb _chain is a list of pdb_atom objects * atom ahs attributes such as: - atom_serial_number - atom_name - resname - resseq - chain_id ... * pdb_residue *is not* being used in the pdb object (use int in ch...
37.870968
121
0.578851
from Chemistry.PDB.pdb_atom import pdb_atom from Chemistry.PDB.pdb_constants import pdb_constants """ * pdb is list of pdb_models * pdb_model is a list of pdb_chains objects * pdb _chain is a list of pdb_atom objects * atom ahs attributes such as: - atom_serial_number - atom_name - resname -...
0
1,918
0
5,678
0
0
0
54
117
dc0d3c12e18f1dcce50a37e49185dad081433687
2,660
py
Python
pyalgotrade/optimizer/server.py
cdyfng/pyalgotrade
c9e8d950c8d911d5f1bed7d821c4cf6fd37f3a3c
[ "Apache-2.0" ]
1,000
2016-01-26T12:10:11.000Z
2022-03-01T23:59:50.000Z
pyalgotrade/optimizer/server.py
cdyfng/pyalgotrade
c9e8d950c8d911d5f1bed7d821c4cf6fd37f3a3c
[ "Apache-2.0" ]
22
2016-01-26T15:14:09.000Z
2019-01-30T02:36:38.000Z
pyalgotrade/optimizer/server.py
cdyfng/pyalgotrade
c9e8d950c8d911d5f1bed7d821c4cf6fd37f3a3c
[ "Apache-2.0" ]
613
2016-01-27T01:02:30.000Z
2022-03-21T01:38:58.000Z
# PyAlgoTrade # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # 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 ap...
37.464789
158
0.727444
# PyAlgoTrade # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # 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 ap...
0
0
0
401
0
0
0
0
23
77e9bc4463add5349ce1d5ad272d47f7ead0d6f3
8,026
py
Python
template.py
Ajasra/stylegan2
c52440e927c60d14c73185f33d26be8c99944d07
[ "BSD-Source-Code" ]
1
2021-09-02T09:41:16.000Z
2021-09-02T09:41:16.000Z
template.py
Ajasra/stylegan2
c52440e927c60d14c73185f33d26be8c99944d07
[ "BSD-Source-Code" ]
null
null
null
template.py
Ajasra/stylegan2
c52440e927c60d14c73185f33d26be8c99944d07
[ "BSD-Source-Code" ]
null
null
null
# Add relative directory Library to import path, so we can import the SpoutSDK.pyd library. # Feel free to remove these if you put the SpoutSDK.pyd file in the same directory as the python scripts. import sys sys.path.append('Library') import time import dnnlib.tflib as tflib import sys spout_type = "output" spout_si...
36.481818
212
0.672315
# Add relative directory Library to import path, so we can import the SpoutSDK.pyd library. # Feel free to remove these if you put the SpoutSDK.pyd file in the same directory as the python scripts. import sys sys.path.append('Library') import numpy as np import argparse import time import SpoutSDK import pygame from ...
0
0
0
0
0
7,206
0
-40
400
a3c1fb21e65b08f6014be032e36d657b8b8b251f
42,834
py
Python
tests/actor_tests.py
pythonprobr/pythonbirds-en
439e10828dd5241de2807f48a4b0c64ce8be69a9
[ "MIT" ]
2
2016-05-31T01:22:24.000Z
2021-09-11T18:54:05.000Z
tests/actor_tests.py
eliceiacrepaldi/pythonbirds-en
439e10828dd5241de2807f48a4b0c64ce8be69a9
[ "MIT" ]
null
null
null
tests/actor_tests.py
eliceiacrepaldi/pythonbirds-en
439e10828dd5241de2807f48a4b0c64ce8be69a9
[ "MIT" ]
5
2015-04-09T19:32:17.000Z
2022-02-09T19:15:22.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals
59.32687
115
0.694588
# -*- coding: utf-8 -*- from __future__ import unicode_literals from unittest.case import TestCase from actors import Actor, DESTROYED, ACTIVE, Obstacle, Pig, YellowBird, RedBird class ActorTestes(TestCase): def test_default_values(self): 'Test inital values of Actor' ator = Actor() self...
0
0
0
42,509
0
0
0
71
183
da781fe202b4a328cfa0731144f22ebe1d299307
3,231
py
Python
designs/peng_robinson.py
poppyi-domain/eng_app_designs
e2b9ab29346a196226c6000d4d1aa6a0d5195d2d
[ "MIT" ]
3
2021-12-25T12:56:26.000Z
2022-03-28T13:36:00.000Z
designs/peng_robinson.py
poppyi-domain/eng_app_designs
e2b9ab29346a196226c6000d4d1aa6a0d5195d2d
[ "MIT" ]
null
null
null
designs/peng_robinson.py
poppyi-domain/eng_app_designs
e2b9ab29346a196226c6000d4d1aa6a0d5195d2d
[ "MIT" ]
null
null
null
""" Peng-robinson equation of state calculator. As used: https://www.poppyi.com/app_design_form/public_render/peng%20robinson%20eq%20of%20state """ R = 8.31446 # Pa.m3/K
28.095652
117
0.547818
""" Peng-robinson equation of state calculator. As used: https://www.poppyi.com/app_design_form/public_render/peng%20robinson%20eq%20of%20state """ import numpy as np R = 8.31446 # Pa.m3/K def validate_numeric(form_data, key): try: return float(form_data[key]) except ValueError: raise Warni...
0
0
0
0
0
2,991
0
-3
68
6cbea770a05081c0aeff593d5edafdf80c804f66
1,757
py
Python
core/forms.py
dishad/ADD
51455c493a4eb433eb1d8dde44771e917efcb500
[ "MIT" ]
null
null
null
core/forms.py
dishad/ADD
51455c493a4eb433eb1d8dde44771e917efcb500
[ "MIT" ]
4
2016-11-26T19:10:01.000Z
2016-12-24T10:42:16.000Z
core/forms.py
dishad/deanslist
51455c493a4eb433eb1d8dde44771e917efcb500
[ "MIT" ]
null
null
null
# forms will go here. create account has been added, new post form will probably go here
33.788462
103
0.692089
from django import forms from django.contrib.auth.models import User from core.models import Post, Category # forms will go here. create account has been added, new post form will probably go here class CreateAccForm(forms.ModelForm): #form labels #first_name = forms.CharField(label="First Name:", max_length=30) ...
0
0
0
1,488
0
0
0
42
135
c63206845224ebcbad493a1c28d57ccb8b042d9a
259
py
Python
pycon/urls.py
tylerdave/PyCon-Website
684c7a92776e61eb2e04951199ce344616c8d814
[ "BSD-3-Clause" ]
null
null
null
pycon/urls.py
tylerdave/PyCon-Website
684c7a92776e61eb2e04951199ce344616c8d814
[ "BSD-3-Clause" ]
null
null
null
pycon/urls.py
tylerdave/PyCon-Website
684c7a92776e61eb2e04951199ce344616c8d814
[ "BSD-3-Clause" ]
1
2020-09-30T18:09:16.000Z
2020-09-30T18:09:16.000Z
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', url('program_export/', views.program_export, name='program_export'), url(r'^special_event/(?P<slug>.*)/$', views.special_event, name='special_event'), )
23.545455
85
0.694981
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', url('program_export/', views.program_export, name='program_export'), url(r'^special_event/(?P<slug>.*)/$', views.special_event, name='special_event'), )
0
0
0
0
0
0
0
0
0
4cd82bb81321c3d8774ae3cf43cbc6b214b27871
5,118
py
Python
magma_ff/parser.py
dbmi-bgm/cgap-wfl_utils
b22147555636e1b9194d4322ca148abe9fc3b8e5
[ "MIT" ]
null
null
null
magma_ff/parser.py
dbmi-bgm/cgap-wfl_utils
b22147555636e1b9194d4322ca148abe9fc3b8e5
[ "MIT" ]
1
2022-03-19T17:55:54.000Z
2022-03-19T17:55:54.000Z
magma_ff/parser.py
dbmi-bgm/magma
b22147555636e1b9194d4322ca148abe9fc3b8e5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ################################################ # # Parser to handle compatibility between # magma and portal json formats # # Michele Berselli # berselli.michele@gmail.com # ################################################ ################################################ # Libra...
30.646707
107
0.454279
#!/usr/bin/env python3 ################################################ # # Parser to handle compatibility between # magma and portal json formats # # Michele Berselli # berselli.michele@gmail.com # ################################################ ################################################ # Libra...
0
0
0
4,571
0
0
0
-17
66
4436746d4cc5c235785c9ac64cd85a23db4d6d26
360
py
Python
CSC-291/Notes/Lists_9.6.14.py
FrancesCoronel/cs-hu
ecd103a525fd312146d3b6c69ee7c1452548c5e2
[ "MIT" ]
2
2016-12-05T06:15:34.000Z
2016-12-15T10:56:50.000Z
CSC-291/Notes/Lists_9.6.14.py
fvcproductions/CS-HU
ecd103a525fd312146d3b6c69ee7c1452548c5e2
[ "MIT" ]
null
null
null
CSC-291/Notes/Lists_9.6.14.py
fvcproductions/CS-HU
ecd103a525fd312146d3b6c69ee7c1452548c5e2
[ "MIT" ]
3
2019-04-06T01:45:54.000Z
2020-04-24T16:55:32.000Z
''' FVCproductions CSC291_4 ''' # list numbers = [3, 7, 9484, 46, 67, 2.3] total = 0 for num in numbers: total += num # concanetation print "The total is", total print "hi!"*4 # tuple things = ("one", "two") # dictionary age = {"Dryfuss": 6, "Yana": 30, "Lucy", 6} #set print numbers[2] print age["Yan...
9.72973
44
0.608333
''' FVCproductions CSC291_4 ''' # list numbers = [3, 7, 9484, 46, 67, 2.3] total = 0 for num in numbers: total += num # concanetation print "The total is", total print "hi!"*4 # tuple things = ("one", "two") # dictionary age = {"Dryfuss": 6, "Yana": 30, "Lucy", 6} #set print numbers[2] print age["Yan...
0
0
0
0
0
0
0
0
0
ca4567f7905e3458f70f2047be789ac11f75eda6
604
py
Python
bundle-workflow/src/build_workflow/build_artifact_check.py
xuezhou25/opensearch-build
24ebc3e444949b4582680edc76c29a684e486120
[ "Apache-2.0" ]
1
2022-01-11T17:47:01.000Z
2022-01-11T17:47:01.000Z
bundle-workflow/src/build_workflow/build_artifact_check.py
xuezhou25/opensearch-build
24ebc3e444949b4582680edc76c29a684e486120
[ "Apache-2.0" ]
13
2021-10-02T00:22:47.000Z
2022-02-08T17:49:38.000Z
bundle-workflow/src/build_workflow/build_artifact_check.py
xuezhou25/opensearch-build
24ebc3e444949b4582680edc76c29a684e486120
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license.
26.26087
88
0.693709
# SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. import os from abc import ABC, abstractmethod class BuildArtifactCheck(ABC): class BuildArtifactInvalidError(Exception): ...
0
34
0
307
0
0
0
2
68
bd5cca04b4b2bf6803e08c2267e8c51eca8218e9
4,935
py
Python
examples/synth03_quickfit.py
cwhanse/pvpro
1e96897e70605c4a185cb93eec9075e0d92047a5
[ "BSD-3-Clause" ]
null
null
null
examples/synth03_quickfit.py
cwhanse/pvpro
1e96897e70605c4a185cb93eec9075e0d92047a5
[ "BSD-3-Clause" ]
null
null
null
examples/synth03_quickfit.py
cwhanse/pvpro
1e96897e70605c4a185cb93eec9075e0d92047a5
[ "BSD-3-Clause" ]
null
null
null
""" Example running quick estimate algorithm on synthetic data. @author: toddkarin """ import numpy as np import pandas as pd from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt from pvpro import PvProH...
29.909091
77
0.551165
""" Example running quick estimate algorithm on synthetic data. @author: toddkarin """ import numpy as np import pandas as pd from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import datetime import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt import s...
0
0
0
0
0
0
0
2
88
b6e3d8d4624010bc7aa016b4db6b27f097c10049
6,776
py
Python
home/views.py
darkun7/Evaluate-CS-Student-as-Lecture-Assistant
55ccec16c2b4146c32d5cf27f3287d0d3393478b
[ "MIT" ]
null
null
null
home/views.py
darkun7/Evaluate-CS-Student-as-Lecture-Assistant
55ccec16c2b4146c32d5cf27f3287d0d3393478b
[ "MIT" ]
null
null
null
home/views.py
darkun7/Evaluate-CS-Student-as-Lecture-Assistant
55ccec16c2b4146c32d5cf27f3287d0d3393478b
[ "MIT" ]
null
null
null
# Create your views here. # TRAINING # # DATA TRAINING # LAB #
31.516279
88
0.617621
from django.urls import reverse from django.db.models import Count from django.shortcuts import render, redirect from django.http import HttpResponse from django.forms import formset_factory, modelformset_factory from .models import * from .models import TrainingValue from .models import Training as TrainingModel from ...
0
0
0
0
0
5,962
0
138
608
4fa89a64771d27994619ff2fffa1c136934e7e1f
6,773
py
Python
target_bigquery/schema.py
tarsisazevedo/target-bigquery
da8d21305fecc1f2782eca6e5edb8f25f0c2eea3
[ "Apache-2.0" ]
null
null
null
target_bigquery/schema.py
tarsisazevedo/target-bigquery
da8d21305fecc1f2782eca6e5edb8f25f0c2eea3
[ "Apache-2.0" ]
null
null
null
target_bigquery/schema.py
tarsisazevedo/target-bigquery
da8d21305fecc1f2782eca6e5edb8f25f0c2eea3
[ "Apache-2.0" ]
null
null
null
import singer # StitchData compatible timestamp meta data # https://www.stitchdata.com/docs/data-structure/system-tables-and-columns BATCH_TIMESTAMP = "_sdc_batched_at" JSONSCHEMA_TYPES = ["object", "array", "string", "integer", "number", "boolean"] MAX_WARNING = 20 logger = singer.get_logger()
32.099526
88
0.584232
import datetime import re import simplejson as json import singer from google.cloud.bigquery import SchemaField from jsonschema import validate from jsonschema.exceptions import ValidationError # StitchData compatible timestamp meta data # https://www.stitchdata.com/docs/data-structure/system-tables-and-columns BATC...
0
0
0
0
0
6,197
0
48
225
b3ce6c9f9389a83f38d0f1128fd23d73ec7da285
5,508
py
Python
sgl/tests/api_test.py
RieksJ/sgl
49ad41b6db7c02a22046d7a20471b0d5eac1a961
[ "Apache-2.0" ]
4
2019-06-26T21:03:36.000Z
2021-10-05T10:40:10.000Z
sgl/tests/api_test.py
RieksJ/sgl
49ad41b6db7c02a22046d7a20471b0d5eac1a961
[ "Apache-2.0" ]
4
2019-07-01T21:12:09.000Z
2020-11-30T12:53:55.000Z
sgl/tests/api_test.py
RieksJ/sgl
49ad41b6db7c02a22046d7a20471b0d5eac1a961
[ "Apache-2.0" ]
3
2019-06-26T21:01:38.000Z
2021-06-06T15:43:19.000Z
# This test is the simplest one I could imagine that exercises the logic where # disjoint subsets are calculated. The next test is similar, but does much more # complex work. Hopefully the debugging can take place on this one.
32.023256
100
0.705701
import pytest from ..api import * from .examples import * from ..condition import Condition def test_bob_satisfies_id_bob(): assert satisfies(p.bob, c.bob) assert satisfies(p.bob, r.enter_to_bob) def test_carl_doesnt_satisfy_id_bob(): assert not satisfies(p.grandpa_carl, c.bob) def test_bob_matches_1...
0
0
0
0
0
4,588
0
4
663
2c866933e977776d72cb1f582327bc68c0c36f0d
1,782
py
Python
tests/test_accuracy.py
uk-gov-mirror/ONSdigital.companies-house-big-data-project
be74293b4398976696d07c6b2329d6121c9e5c6a
[ "MIT" ]
null
null
null
tests/test_accuracy.py
uk-gov-mirror/ONSdigital.companies-house-big-data-project
be74293b4398976696d07c6b2329d6121c9e5c6a
[ "MIT" ]
null
null
null
tests/test_accuracy.py
uk-gov-mirror/ONSdigital.companies-house-big-data-project
be74293b4398976696d07c6b2329d6121c9e5c6a
[ "MIT" ]
null
null
null
# Custom import
25.457143
85
0.585297
import unittest # Custom import from src.performance_metrics.binary_classifier_metrics import BinaryClassifierMetrics class TestAccuracy(unittest.TestCase): """ """ def test_accuracy_pos(self): """ Positive test case for the accuracy function. """ # Assume metrics...
0
0
0
1,639
0
0
0
58
67
e70554a4eb14bbf62db7f17c3d12988f3fce621e
5,747
py
Python
repos/system_upgrade/el7toel8/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py
AsM0DeUz/leapp-repository
b67a395ee3d67d3d628037c250a210bb52e9187c
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el7toel8/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py
AsM0DeUz/leapp-repository
b67a395ee3d67d3d628037c250a210bb52e9187c
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/el7toel8/actors/satellite_upgrade_facts/tests/unit_test_satellite_upgrade_facts.py
AsM0DeUz/leapp-repository
b67a395ee3d67d3d628037c250a210bb52e9187c
[ "Apache-2.0" ]
null
null
null
RH_PACKAGER = 'Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>' FOREMAN_RPM = fake_package('foreman') FOREMAN_PROXY_RPM = fake_package('foreman-proxy') KATELLO_INSTALLER_RPM = fake_package('foreman-installer-katello') KATELLO_RPM = fake_package('katello') POSTGRESQL_RPM = fake_package('rh-postgresql12-postgresq...
40.188811
110
0.792761
import os from leapp.libraries.common.config import mock_configs from leapp.models import ( DNFWorkaround, InstalledRPM, Module, RepositoriesSetupTasks, RPM, RpmTransactionTasks, SatelliteFacts ) from leapp.snactor.fixture import current_actor_context RH_PACKAGER = 'Red Hat, Inc. <http://b...
0
0
0
0
0
4,824
0
192
388
5072b17af5bb82ed5d711708659f63dcf1074494
6,653
py
Python
gwaripper/download.py
nilfoer/gwaripper
28492b9894973633612471094d24907b2bc47728
[ "MIT" ]
6
2021-03-12T08:57:18.000Z
2022-03-27T00:28:17.000Z
gwaripper/download.py
nilfoer/gwaripper
28492b9894973633612471094d24907b2bc47728
[ "MIT" ]
1
2020-10-05T04:25:53.000Z
2020-10-05T14:20:07.000Z
gwaripper/download.py
nilfoer/gwaripper
28492b9894973633612471094d24907b2bc47728
[ "MIT" ]
2
2021-03-12T11:05:46.000Z
2021-09-12T22:53:58.000Z
import sys import os import urllib.request import urllib.error import logging logger = logging.getLogger(__name__) DEFAULT_HEADERS = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0' } def download(url: str, dl_path: str): """ Will download the file to dl...
41.322981
118
0.640764
import sys import os import urllib.request import urllib.error import logging import subprocess from typing import Optional, Dict from urllib.error import ContentTooShortError logger = logging.getLogger(__name__) DEFAULT_HEADERS = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 F...
3
0
0
0
0
2,765
0
32
113
05dd1c658adfe935e1e7b1d4e297a0645c0809df
67
py
Python
dregel-7623/test.py
NTI-Gymnasieingenjor/AdventOfCode2020
ea74c06a2b220e227618ed841c4eb853f08d5c84
[ "MIT" ]
1
2020-12-08T12:33:36.000Z
2020-12-08T12:33:36.000Z
johan/test.py
NTI-Gymnasieingenjor/AdventOfCode2020
ea74c06a2b220e227618ed841c4eb853f08d5c84
[ "MIT" ]
null
null
null
johan/test.py
NTI-Gymnasieingenjor/AdventOfCode2020
ea74c06a2b220e227618ed841c4eb853f08d5c84
[ "MIT" ]
1
2021-01-20T15:08:12.000Z
2021-01-20T15:08:12.000Z
for count in range(6): name = input() print("hello ", name)
22.333333
25
0.58209
for count in range(6): name = input() print("hello ", name)
0
0
0
0
0
0
0
0
0
fc5bdfbf1b2237de516549522094811569272771
24,209
py
Python
src/openprocurement/api/utils.py
JrooTJunior/openprocurement.api
9f932d96c4ba096a8e0a0b570f737620c1cc95db
[ "Apache-2.0" ]
null
null
null
src/openprocurement/api/utils.py
JrooTJunior/openprocurement.api
9f932d96c4ba096a8e0a0b570f737620c1cc95db
[ "Apache-2.0" ]
null
null
null
src/openprocurement/api/utils.py
JrooTJunior/openprocurement.api
9f932d96c4ba096a8e0a0b570f737620c1cc95db
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from cornice.resource import resource, view from functools import partial from openprocurement.api.traversal import factory from openprocurement.api.interfaces import IOPContent json_view = partial(view, renderer='simplejson') def get_root(item): """ traverse back to root op content o...
40.483278
169
0.628651
# -*- coding: utf-8 -*- import os import json import decimal import simplejson import couchdb.json from couchdb import util from logging import getLogger from datetime import datetime, timedelta from base64 import b64encode, b64decode from cornice.resource import resource, view from email.header import decode_header fr...
88
4,930
0
696
0
15,799
0
532
1,331
4668e45e7b4f7aee6a860a6306fc3156761aca36
24
py
Python
interface/__init__.py
fgaspar/myhome
9942364f913870d3eed3a0a6536872ebf4c83a0c
[ "MIT" ]
null
null
null
interface/__init__.py
fgaspar/myhome
9942364f913870d3eed3a0a6536872ebf4c83a0c
[ "MIT" ]
null
null
null
interface/__init__.py
fgaspar/myhome
9942364f913870d3eed3a0a6536872ebf4c83a0c
[ "MIT" ]
null
null
null
__all__ = ['interface']
12
23
0.666667
__all__ = ['interface']
0
0
0
0
0
0
0
0
0
8bd55d55ac9289b7d0cb32cc7e44955b4be77eda
1,688
py
Python
stock_portfolio/stock_portfolio/tests/test_models_account.py
zarkle/pyramid-stocks
493ad5a5b77e99dcff8e8234bf0616db1fbb4c98
[ "MIT" ]
null
null
null
stock_portfolio/stock_portfolio/tests/test_models_account.py
zarkle/pyramid-stocks
493ad5a5b77e99dcff8e8234bf0616db1fbb4c98
[ "MIT" ]
4
2019-12-26T16:42:42.000Z
2020-01-06T18:53:34.000Z
stock_portfolio/stock_portfolio/tests/test_models_account.py
zarkle/pyramid-stocks
493ad5a5b77e99dcff8e8234bf0616db1fbb4c98
[ "MIT" ]
null
null
null
def test_account_model(db_session): """test make a new user account""" from ..models import Account assert len(db_session.query(Account).all()) == 0 user = Account( username='me', password='me', email='me@me.com', ) db_session.add(user) assert len(db_session.query(Ac...
26.793651
64
0.616706
def test_account_model(db_session): """test make a new user account""" from ..models import Account assert len(db_session.query(Account).all()) == 0 user = Account( username='me', password='me', email='me@me.com', ) db_session.add(user) assert len(db_session.query(Ac...
0
0
0
0
0
0
0
0
0