blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
283
content_id
stringlengths
40
40
detected_licenses
listlengths
0
91
license_type
stringclasses
2 values
repo_name
stringlengths
3
135
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
68
visit_date
timestamp[ns]date
2015-07-25 20:53:29
2023-09-06 10:46:05
revision_date
timestamp[ns]date
1970-01-01 00:00:00
2037-05-03 13:00:00
committer_date
timestamp[ns]date
1970-01-01 00:00:00
2036-02-09 17:40:36
github_id
int64
1.61k
691M
⌀
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
24 values
gha_event_created_at
timestamp[ns]date
2012-06-03 10:21:33
2023-09-14 21:59:50
⌀
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-09-13 22:40:33
⌀
gha_language
stringclasses
250 values
src_encoding
stringclasses
27 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
6
10M
extension
stringclasses
289 values
filename
stringlengths
1
218
content
stringlengths
6
10M
382f14e352abc2d42c25c091f5717463d5ba41e1
c9a86abbd6ed31fa2e99d17574ba2bba5204559f
/day-1.py
e48bec023e017b085462528dad86b15f5870f3d3
[]
no_license
heyitstowler/advent-of-code-2019
956d8e95bf9a55c6d1735fdf6edb89c6806467c4
9b9554e888ea4dc8be6825ab156babc5d33f9eec
refs/heads/master
2020-09-23T11:58:54.588576
2019-12-16T00:50:33
2019-12-16T00:50:33
225,496,108
0
0
null
null
null
null
UTF-8
Python
false
false
1,036
py
day-1.py
# Part 1 def calculate_fuel_requirement(mass): return (mass // 3) - 2 def get_module_masses(file): input = open(file, 'r') string_masses = input.readlines() input.close() return [ int(mass) for mass in string_masses ] masses = get_module_masses('day-1-input.txt') fuel_requirements = [ calculate_fuel_requir...
da5bd082bd244fdbda91676d85b69dc27ed6ae94
2ad75c91fc0c3f9ed953a5acd0c168bdb84d7ee0
/tests/integrated/kink_test/generate_ic.py
142bb71007954006de25cfbe23de42b46a2d647e
[ "MIT" ]
permissive
kiranhegde/cato
9f4f1d1adfaab3b0e4d49da00d0338d6a8de1a66
b79d59807b8b005a25d7cc25a9fe3d192ecd15a0
refs/heads/master
2023-04-15T00:58:29.616414
2021-04-09T15:19:25
2021-04-09T15:19:25
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,291
py
generate_ic.py
# -*- coding: utf-8 -*- """Make the 1D Sod shocktube initial conditions""" try: import matplotlib.pyplot as plt except ImportError: pass from configparser import ConfigParser import numpy as np import sys import os sys.path.append(os.path.abspath("../../..")) from pycato import * xmax = 100 shell_width = 3....
81f03df14beba8619ad0cbc65a80031107101107
be947a654c1eed4352cf6808f0ee61227a01470d
/grad_descent/grad_descent.py
5daaab90db7a81841c424b5908598573e9599032
[]
no_license
chirjeev94/Machine-Learning
c3b9bf177741ec6ebb83b1dceff79f09dfa2f8b4
0e1c79d46fbc797232221f11ef568aa061088cc6
refs/heads/master
2021-05-01T03:01:37.818963
2018-04-21T23:46:18
2018-04-21T23:46:18
121,185,004
0
0
null
null
null
null
UTF-8
Python
false
false
1,948
py
grad_descent.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Apr 17 00:42:53 2018 @author: chintandoshi """ import numpy as np import numpy.linalg as la import matplotlib.pyplot as plt D = [[0,206,429,1504,963,2976,3095,2979,1949], [206,0,233,1308,802,2815,2934,2786,1771], [429,233,0,1075,671,2684,2799,2631,161...
e1828b02350b271108d8664109fe572a09917df4
074934d84f0f276737e3fec237a55d13f0df5e0e
/cardinal/weather.py
02ed93038953ff31980cb913839d40c8582df7ef
[]
no_license
eLopez6/Cardinal
8efdb5419314fc00a80e70ee23d26bf315139f67
f1d27007aee79738cd870ea496e8d790c817eeb4
refs/heads/master
2020-04-03T03:11:37.835517
2018-10-29T22:59:27
2018-10-29T22:59:27
154,979,260
0
1
null
null
null
null
UTF-8
Python
false
false
1,395
py
weather.py
import requests import decimal import webbrowser WEATHER_URL = 'http://api.openweathermap.org/data/2.5/weather' decimal.getcontext().rounding = decimal.ROUND_DOWN def __get_weather_request(city, owm_api): city_string = '?q=' + city app_id = 'APPID=' + owm_api request_url = WEATHER_URL + city_string + '&'...
35067eb1d08143df2b8ab9ee4662ac1cac3f33d4
7aecab27c231c5207f26a1682543b0d6c5093c06
/server/dancedeets/sitemaps/events.py
c0eb0e3144eaacfd89ef264464de4b05326c83a3
[]
no_license
mikelambert/dancedeets-monorepo
685ed9a0258ea2f9439ae4ed47ebf68bb5f89256
4eff1034b9afd3417d168750ea3acfaecd20adc6
refs/heads/master
2022-08-10T07:16:32.427913
2018-04-15T22:05:58
2018-04-15T22:05:58
75,126,334
24
2
null
2022-07-29T22:28:45
2016-11-29T22:04:44
Python
UTF-8
Python
false
false
3,705
py
events.py
import datetime from lxml import etree import logging # local from dancedeets import app from dancedeets import base_servlet from dancedeets.util import fb_mapreduce from dancedeets.util import urls def yield_sitemap_event(fbl, all_events): # Don't really need fbl, but makes everything easier for event in a...
a880039ab26c894528bb2931e38fa76f813385e1
d376040897b8eecb9eab566c09f58435cd576f28
/010_Generadores.py
e95eb65e1be6357c8ac296bf22af159d8f8a04a3
[]
no_license
angegon/Python
210804bf38215994e632f915f8c0d4df11aa67dd
d1b94debf53ad2df91c57cbe6a3348d5529f2da1
refs/heads/master
2023-06-05T18:13:43.699782
2021-06-24T19:56:24
2021-06-24T19:56:24
379,018,990
1
0
null
null
null
null
UTF-8
Python
false
false
1,897
py
010_Generadores.py
# Estructuras que extraen valores de una función que se guardarán en objetos iterables # Cada generador permanecera en pausa, hasta que se solicite el siguiente # son más eficientes que las funciones tradicionales, y en determinadas condiciones en las # que se necesita valores de uno en uno def generaPares(Limite): ...
5dadb77cf3755610e34442052b450ee3ef7c1c7c
062fa6891dfe2278bcfa36a00cc8bed4356e9f5b
/mlflow/sagemaker/container/__init__.py
5acd30991af51a9ab116216292c3ded99570a0ca
[ "Apache-2.0" ]
permissive
sepidehhosseinzadeh/mlflow-cpp
f43ffb1dba0e57b9b67fad696966bae683328527
724eeaeafbee829201859033315a9d2ebf314844
refs/heads/master
2022-12-12T13:41:28.825923
2020-06-10T20:42:55
2020-06-10T20:42:55
158,026,349
2
0
Apache-2.0
2022-12-08T05:37:42
2018-11-17T21:27:07
Makefile
UTF-8
Python
false
false
5,674
py
__init__.py
""" Initialize the environment and start model serving on Sagemaker or local Docker container. To be executed only during the model deployment. """ from __future__ import print_function import multiprocessing import os import shutil import signal from subprocess import check_call, Popen import sys import yaml from ...
854223ff0b0e99b72c4290fea2a317457f67366a
c2acfe7b3655f357bc2f196a2fc34ffde5b7d05b
/yyetsweb/handlers/base.py
9c7d2343c79f6adb4ee974e355f4e42b1129b578
[ "MIT" ]
permissive
Vincentlz/YYeTsBot
fff5a4c134b2f3136a382ce6cee7c4523779c677
2aa81c014308de4993824a70af0a9d4fb795a9c8
refs/heads/master
2023-08-31T13:59:13.319540
2023-05-30T16:21:07
2023-05-30T16:21:07
374,557,305
0
0
MIT
2023-07-09T16:54:52
2021-06-07T06:23:08
Python
UTF-8
Python
false
false
3,529
py
base.py
#!/usr/bin/env python3 # coding: utf-8 import contextlib import importlib import json import logging import pathlib from concurrent.futures import ThreadPoolExecutor from http import HTTPStatus from pathlib import Path from tornado import gen, web from tornado.concurrent import run_on_executor from databases.base imp...
3220ecdd23ea92633de2a52ac762e3ade27d5ed0
7530391c07a1776d43fb0d7f734ecfb9993c4637
/search/unittests/unittests/__init__.py
86ff69d98c44fdc1d72fe254c66b9773cf9cbcbd
[ "Apache-2.0" ]
permissive
zags4life/search
25b7f872b81a2152575cd819aaafabe958ccd30e
859c882dfd193d927fb35d21e91ddfe4f8972fc0
refs/heads/master
2023-01-23T09:58:20.241476
2023-01-21T16:36:25
2023-01-21T16:36:25
193,734,414
2
0
Apache-2.0
2023-01-21T16:36:26
2019-06-25T15:25:34
Python
UTF-8
Python
false
false
136
py
__init__.py
# __init__.py import logging from .utils import run_unittest_and_verify_results, validate_results logger = logging.getLogger(__name__)
f500208a25294bf723acc3c072a26472773bba4c
20078d9ff4e9ef0d659c6149602ca7a30010fe27
/wadium/story/tests/test_get_comments.py
d7ccdbdc0d3a32e5845f6c50ba10c229601eb496
[]
no_license
wafflestudio18-5/team2-server
3b0895434c2778cdc346afec7c4c9d7a347c26bd
0a4fe124e2ca572d8c508dfd761d9d2ea3d4655f
refs/heads/main
2023-03-15T05:12:41.001069
2021-02-12T18:39:02
2021-02-12T18:39:02
314,742,062
3
0
null
2021-03-19T12:34:53
2020-11-21T05:40:33
Python
UTF-8
Python
false
false
3,640
py
test_get_comments.py
from django.test import TestCase, Client from rest_framework.authtoken.models import Token from rest_framework import status import json from story.models import Story, StoryComment from django.contrib.auth.models import User from .utils import body_example, make_comment_URI class EditCommentTestCase(TestCase): c...
c117860cb36df1bece5d867478e3f289178592c1
7a9050667b774c6f3cd1b835e58ebe68b72babbe
/manager/urls.py
afb72e994487c5607811ed73729f1c25f9965f3c
[]
no_license
jfmatth/FishtankServer
fe3c563e98d245883a5f79162d5163375bbd6ca8
55c9bf762d12534e4e24652b2a2af841445a55de
refs/heads/master
2021-01-13T02:36:05.612532
2012-01-02T20:49:36
2012-01-02T20:49:36
null
0
0
null
null
null
null
UTF-8
Python
false
false
412
py
urls.py
from django.conf.urls.defaults import patterns urlpatterns = patterns('manager.views', # Main menu (r'^$', 'main'), # client download link (r'^download/$', 'download'), # provides to register a new client to be managed. (r'^register/$', 'register'), # read / write setting...
6d20b6e93ba96d239aceab781c6b2c50c9f9b69b
2ecada6a7976c3af77a64b4bccf15a5b1b1c9ff3
/web_scripts/edit.py
8422eebeec5ca9462d1bc17a9ab645b00cd09a00
[]
no_license
hroest/buchliste
68324190166af93cb6d748ccb6b3db69757520ec
22db0a1bdf95a6b049114ebf1136d6944305c0ea
refs/heads/master
2016-09-05T09:03:13.133590
2014-02-23T11:47:59
2014-02-23T11:58:45
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,326
py
edit.py
#!/usr/bin/python # -*- coding: utf-8 -*- import cgitb; cgitb.enable() import MySQLdb, sys import cgi import shared form = cgi.FieldStorage() db = MySQLdb.connect(read_default_file="/home/hroest_admin/.buch.cnf") cursor = db.cursor() print "Content-type: text/html; charset=utf-8" print "" print "<title>Buch hinzuf...
30d33c512946200064e51cd59d37207c1318f561
ac3c08707695e90396e12d74b3f373a88583c9fa
/tpltesttime.py
3c2345370117735a780465688f7ce9e1e512676f
[ "MIT" ]
permissive
CurryEleison/elblogreader
d0df5ff5f47c3a8c1f3c2da9f2651aaee586371f
5fff3f3d44352d54d1b35b0e3b7cdf161d8bf14c
refs/heads/master
2020-06-30T08:15:34.056701
2017-02-01T13:37:53
2017-02-01T13:37:53
74,383,016
0
0
null
null
null
null
UTF-8
Python
false
false
1,506
py
tpltesttime.py
import pandas as pd from AwsElbLogUtil import LogDataFrame import boto3 import datetime def main(): foldername = "~/junk" s3 = boto3.resource('s3') dfmaker = LogDataFrame(s3) df = dfmaker.make_dataframe_fromfolder(foldername, lambda l: hasattr(l, 'path') and l.path.startswith('/tpltest')) mean...
2df0f840f07831ad21c1342c39dd6eec89112f18
bfaccdf39e4f7574f12b465a08e614c4836c952d
/anomaly.py
dd029f48af2051df1ac9c94d3082963a0967a50b
[]
no_license
yuyttenhove/AnomalyDetection
56f9bc7c3f38783a19053f6dfde5679c55e2b625
8fcdbe07c84c13807a25967ae5eb87a6b033c527
refs/heads/master
2020-05-05T11:59:27.920539
2019-04-07T20:10:33
2019-04-07T20:10:33
180,010,848
0
0
null
null
null
null
UTF-8
Python
false
false
10,226
py
anomaly.py
import matplotlib.pyplot as plt import numpy as np import numpy.ma as ma import os from sklearn.utils import shuffle, resample from sklearn.mixture import GaussianMixture from sklearn.model_selection import KFold from matplotlib.colors import LogNorm from sklearn.cluster import KMeans script_dir = os.path.dirname(__fi...
e31decf5fd8581bf1911cbc9724f4cc4eb2b5eac
49854ee9b6c3f20a89f17ffdb2dab14ac8a1cc13
/tests/conftest.py
269d859acc1afc8c2f4c672a15656746b8aa84a4
[]
no_license
phantie/fastapi-ext
2a4e11138daeba528b5f941bf6845c8343e719d9
8469ab2c02a7491fa07404b215ca1ded0c4954f6
refs/heads/master
2023-04-10T07:24:22.259246
2021-04-16T10:03:28
2021-04-16T10:03:28
351,770,749
1
1
null
2021-03-26T19:00:41
2021-03-26T12:12:10
Python
UTF-8
Python
false
false
270
py
conftest.py
from sys import version_info import pytest def pytest_ignore_collect(path, config): if 'py3_9' in str(path): if version_info < (3, 9, 0): return True if 'py3_$' in str(path): if version_info >= (3, 9, 0): return True
96df33497f596f8ee51d24b0a172a5e5c22bae51
9939b5e3282aaba4e3919882d78051cdaeec2e5b
/InterviewPrep_Mediumquestions/zigzaglevelOrder.py
655b28b7a870135a84fb03ecede29a0a495e3a6c
[]
no_license
lalitha1201/Leetcode
354fe13fe37899add8dbffcc1f7499333dfe9699
07dc21b26f5f63f985dac7f947af0ad06f4ed804
refs/heads/master
2021-02-08T05:18:22.963339
2020-06-17T21:48:06
2020-06-17T21:48:06
244,113,264
0
0
null
null
null
null
UTF-8
Python
false
false
672
py
zigzaglevelOrder.py
ERROR: type should be string, got "https://leetcode.com/explore/interview/card/top-interview-questions-medium/108/trees-and-graphs/787/\nclass Solution:\n def zigzagLevelOrder(self, root: TreeNode) -> List[List[int]]:\n \n res = collections.defaultdict(collections.deque)\n \n def helper(root,level,res):\n if not root:\n return None\n if level % 2 == 0:\n res[level].append(root.val)\n else:\n res[level].appendleft(root.val)\n \n helper(root.left,level+1,res)\n helper(root.right,level+1,res)\n \n helper(root,0,res)\n return res.values()\n \n"
5f50c690015bfddb40ea9dbe05490f2486a95821
09630fcab1b1c4739010a389438bf174182fa42e
/NewProblemSprint/IntervalListIntersections.py
22baf385db8fe342ce57b26df510fb50a7a23903
[]
no_license
zanewebb/codebreakerspractice
1e28bd6b9c1f78fd5306784848edfb5dd746e235
e8e2834f8edcd8c9732be603b0b6038c8fd88fa0
refs/heads/master
2021-04-23T03:17:40.229930
2020-10-07T02:11:14
2020-10-07T02:11:14
249,893,478
0
0
null
2020-06-22T21:34:05
2020-03-25T05:20:35
Python
UTF-8
Python
false
false
1,698
py
IntervalListIntersections.py
# worse than my first time, works though class Solution: def intervalIntersection(self, A: List[List[int]], B: List[List[int]]) -> List[List[int]]: ans = deque() while A and B: # pop while a's end is less than b's start while A and B and A[-1][1] < B[-1][0]: ...
19c14beffc780bc783ac13ed03a90e8d20ebeaa6
dd337cea809049bf23a83e7c5400c9731b7326c6
/code/unused/run_knn.py
36baa31ec13c3f7a5682c5277a45d17086b0b5bf
[ "MIT" ]
permissive
ljmartin/dockop
56f3b32a9ae6a316de2c0b4181e81a624a3bdfa9
6ac0a6390c85feaffc21369f94c8beecc4a6a1df
refs/heads/master
2023-04-01T22:12:29.661949
2021-04-07T05:34:35
2021-04-07T05:34:35
294,600,106
19
5
null
null
null
null
UTF-8
Python
false
false
3,003
py
run_knn.py
import sys from set_up import Setup import json import numpy as np import tqdm from scipy import sparse from joblib import Parallel, delayed from sklearn.metrics import average_precision_score def fast_dice(X, Y=None): """Calculates Dice distance between a bunch of molecules, utilising sparse calculations for...
707f6a712c98bcbb28d24e5ee0812f72054a4d2b
e0701a3fb1b2f5d6acde6800f2fc7c2c20cc31a1
/server/app.py
d85b74136508aa7b2411c177fdfe787de1677bc2
[]
no_license
terminal-bash/Connect-4Linguals
229510c4ee95d1289f2bf62c507c72c7f50496f7
5cfbb92761b382379dc0963351224fa6989af64e
refs/heads/master
2022-09-29T06:35:06.072119
2020-06-09T04:03:19
2020-06-09T04:03:19
null
0
0
null
null
null
null
UTF-8
Python
false
false
847
py
app.py
from flask import Flask, render_template, jsonify from flask_socketio import SocketIO, send, emit import requests from topicsAPI import topics_api from authAPI import auth_api from gameplayAPI import gameplay_api app = Flask(__name__, static_folder="./dist/static", template_folder="./dist" ...
ce1adb174743f892943417c13077218f488645d5
f36e60bc6f9b6974c18a621286798b32422709dc
/game/views.py
ff0f9f07f66ba4b71f276d31cdd301e8a2838533
[]
no_license
dager8989/my
827e448b7460de8907be0e8698ca61174c0c5faf
9b0d878d3a1fa453afe8edf75bb3ee839a6f09f5
refs/heads/master
2022-11-12T16:39:44.481352
2020-07-03T17:32:53
2020-07-03T17:32:53
276,946,368
0
0
null
null
null
null
UTF-8
Python
false
false
161
py
views.py
from django.shortcuts import render def index(request): return render(request, 'game/index.html') def my(request): return render(request, 'game/my.html')
b1b7ada085acd2c1274b2a67af3e30eb6436053a
7067750d28eab14e86189cac5627b741e486b355
/load_csv.py
f550bf35f677cce37df49a7bfadd6098b0f4eaa2
[]
no_license
myociss/psirbase-utdallas
40385f2f6824cc180377dddb88907f6a8333a537
374717d3ca6b8a3e45dcae0529923e81ba4ec400
refs/heads/master
2020-04-01T05:44:32.740186
2019-03-15T18:23:48
2019-03-15T18:23:48
152,917,838
0
0
null
null
null
null
UTF-8
Python
false
false
2,218
py
load_csv.py
import sys, os, django, csv sys.path.append('psirbase') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'psirbase.settings') django.setup() from resource.models import Sequence, Species def validate(obj): try: obj.clean() return None except ValidationError as e: return "\n".join(e.mess...
749c3c7cfbbb4824019e2f6ef5766eba52f5b0fa
352b650c10636afd971fae428438fc23108ab680
/back-end/STTEAPI/controllers/tramite.py
85f2122e7d47f2714fa2ae8d2db83b74e4bab5a5
[ "MIT" ]
permissive
ProyectoIntegrador2018/STTA
15add8c2760e3e5c4c451cdcc7f3df13a9269d4c
723dc79b6c9deb4c8ca523f8a82dab3234bce8f0
refs/heads/master
2023-01-11T05:45:18.818942
2019-12-05T03:55:08
2019-12-05T03:55:08
175,549,059
1
2
MIT
2023-01-04T09:18:58
2019-03-14T04:38:08
JavaScript
UTF-8
Python
false
false
3,722
py
tramite.py
from django.db import transaction from rest_framework.decorators import api_view, permission_classes from STTEAPI.controllers.utils import * from STTEAPI.settings.authentication import IsAuthenticated # CREATE # READ @api_view(["GET"]) @permission_classes((IsAuthenticated, EsAdmin)) def get_tramites(request): """...
a9633d891b6edbf491fa2c5e4e68cfbbf1b6a091
79993790e7901083cf0c1bcc51ddcf667873dae6
/s.py
165243a965fd6779ec222e0afc564b7be68053fb
[]
no_license
paintedcenterkeys/99
d8e490400868dadec59280f0cb715bdf590aa7a1
474478c09f1f4ccc5166bda0bb59fc2436ec7912
refs/heads/master
2023-04-05T14:48:18.596190
2021-04-04T07:27:42
2021-04-04T07:27:42
354,485,145
0
0
null
null
null
null
UTF-8
Python
false
false
1,616
py
s.py
from g import datanode as dn from g.datanode import socknode as sn from g.datanode.replnode import ReplNode import socket import time NUM_CLIENTS = 3 server = sn.SockNodeServer("10.0.0.85", 14517) server.run(max_clients=NUM_CLIENTS) data = [None,None,None] def savedata0(msg): data[0] = msg def savedata1(msg): ...
e0fc03068d96f8ce9781cf011db8b905d5328dd5
8af4b3961a9a2cd2fa6f6e6f985ca31b062a7dd9
/modules/haarCascade/haarCascade.py
22601809947a3e3e559871263ab45e81363e3db4
[]
no_license
vladbidyuk/oculi_domus
bbf6a34e13c0cabefc022764601d648a8451b6bd
479c31ca84135f1f488aef1163ec48c9d8c3458f
refs/heads/master
2022-11-26T01:43:55.803639
2020-07-24T20:07:22
2020-07-24T20:07:28
128,683,435
0
0
null
null
null
null
UTF-8
Python
false
false
597
py
haarCascade.py
#!/usr/bin/env python import numpy import cv2 import os face_cascade = cv2.CascadeClassifier('Modules/haarCascade/haarcascade_frontalface_default.xml') #face_cascade = cv2.CascadeClassifier('Modules/haarCascade/haarcascade_frontalface_alt_tree.xml') cap = cv2.VideoCapture(0) while(True): ret, frame = cap.read()...
77811558eed6e55279dcfa4ac990dabc05456601
21369707aedcec259b08468298fedfc6379a4c54
/剑指Offer/22_输出链表中倒数第k个节点.py
c2bbbbaa333b28991c6e5808aee26c2090f468b1
[]
no_license
z3ero/Leetcode
355256231d713841645d5317f1820bdb49b83337
d173a8cbb5afc431120733641549f3395ce9da11
refs/heads/master
2020-06-07T06:42:42.011639
2019-10-21T12:47:53
2019-10-21T12:47:53
192,952,299
0
0
null
null
null
null
UTF-8
Python
false
false
1,600
py
22_输出链表中倒数第k个节点.py
# -*- coding:utf-8 -*- # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # 思路:不使用额外的存储空间 # 遍历两遍,第二遍正向找出第 n-k 个节点,即为倒数第k个节点 # 考虑异常条件,这三种情况都返回 None # 1. k <= 0 # 2. 链表为空 # 3. 链表总长 < k def FindKthToTail(self, head, k): ...
ea59c36b0a93d69b412ae7d0ba91c6f683cf5059
b8dc5eaf9146916a05b8971b3f68325b12ab3f1b
/show_cg_kpi
e2dc02f1d98a248f37c5b879a5f6184deb72dd41
[]
no_license
echochenyueyang/-
3bb5d6581f1a9ce6292cb40a000547b1438bb921
2139176bcfdb231eafe18e4f4ac9a0508c97f5c8
refs/heads/master
2020-03-18T19:31:04.747524
2018-05-28T12:42:28
2018-05-28T12:42:28
135,159,252
0
0
null
null
null
null
UTF-8
Python
false
false
3,922
show_cg_kpi
#!/usr/bin/python import os,subprocess,time import threading,fnmatch def readcfg(p): cfgList = [] with open(p,'r') as f: lineList = f.readlines() for line in lineList: if len(line.strip()) == 0 or line.strip()[0] == "#": continue cfgList.append(line) return cfgList ...
ed1b1caa94ef6e92b9a9fc3a70974e5e48902e49
cbda67ab650780b3ffc3d627ac7e8b1d36f3c4c8
/ads_board/ads/migrations/0010_alter_ads_content.py
10405a997051a16420a994caf0227bb5c5b6079a
[]
no_license
crazyYoda/Ads_board
6b731b24ea1496b94d38e3752e9298be8415bee6
68b5358a3dc272d67385ff299c1c8cd0361d9d1e
refs/heads/master
2023-08-13T23:23:16.936285
2021-09-29T06:15:30
2021-09-29T06:15:30
411,551,908
0
0
null
null
null
null
UTF-8
Python
false
false
467
py
0010_alter_ads_content.py
# Generated by Django 3.2.7 on 2021-09-27 09:07 import ckeditor_uploader.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ads', '0009_alter_ads_content'), ] operations = [ migrations.AlterField( model_name='ads', n...
b6a402637e2ffc7a28397abdd8243036e690b7b7
e4696ca414641171515a6a6401fe3c1accb1ad7e
/curso 1/semanas 1 e 2/cliente.py
78ef1c5fac2e9502bfcd6ec1a18b75f2864c3e9e
[]
no_license
Lucass-Adriano/Projetos
3cb9776860a3ff8b7888b73c29836b43d5e77ab8
ffa651a99458e7c200eecc9863a37ce573d41968
refs/heads/master
2022-04-22T19:27:29.733443
2020-04-26T01:13:36
2020-04-26T01:13:36
258,890,039
0
0
null
null
null
null
UTF-8
Python
false
false
326
py
cliente.py
cliente = input("Digite o nome do cliente:") vencimento_dia = input("Digite o dia de vencimento:") Venci_mes = input("Digite o mês de vencimento:") valor = input("Digite o valor da fatura:") print("Olá,",cliente) print("A sua fatura com vencimento em",vencimento_dia,"de",Venci_mes,"no valor de R$",valor,"está fechada....
506611c877aba7c3c5ca3822deab0a509d219600
22b52ba8774dfb80529f148a250086f6e1109f8e
/code/cache.py
da13e2c204bb48a21774b5278e8a584290155b1d
[]
no_license
sillyemperor/chronicle
c7f08f43609b515652fb7d174c34688917ca342b
f101d4cf22c0f897a6dab7722a60c03a1817c3b3
refs/heads/master
2021-06-22T13:56:41.059977
2019-06-11T23:33:02
2019-06-11T23:33:02
26,044,026
6
0
null
2021-06-10T18:01:34
2014-11-01T06:51:34
JavaScript
UTF-8
Python
false
false
5,892
py
cache.py
#!/usr/bin/python # -*- coding: utf-8 -*- import os,os.path,imp,sys,urllib2,json,urllib from xml.sax.saxutils import escape import zlib from http import * import thread,threading from xml.dom import minidom from xml.dom.minidom import parse, parseString import json import re import datetime import traceba...
339fd26cf1c89964af31170df6dfa4ab20b985e0
c5f41ddf1ec32f0d36c99bc5467902556424c0c1
/appmgmt/static.py
bd695c904516ae25c559df1fa883809683bb4b3b
[ "Apache-2.0" ]
permissive
ekivemark/BlueButtonFHIR_API
a43a122285913beb03101a9746c10041a9b5453c
9b5d9ca92b1e5ff0e9de046c87596ff3d5e66eef
refs/heads/master
2022-12-12T21:33:40.625326
2018-10-30T20:09:50
2018-10-30T20:09:50
46,750,368
5
4
Apache-2.0
2022-11-22T01:16:26
2015-11-23T21:54:56
HTML
UTF-8
Python
false
false
1,393
py
static.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 """ BlueButtonFHIR_API FILE: static Created: 1/27/16 10:35 PM """ __author__ = 'Mark Scrimshire:@ekivemark' REDIRECT_URI = 'http://localhost:8002/appmanagement/poet_callback/' POET_BUNDLE_INFO = { 'TEST': {'bundle_ref': "T001", ...
6eb47467c53f8b38fffe68f33b64c39285b71024
4f8141e9f0da8959c5da68c7cd7aae09aee5f630
/ex_11_regex.py
a797026124387d1acaf99a9568ecb454e205021e
[]
no_license
abhishekmishrain/py4e
a635ac2099acbb17d78c8388f21d3ff19057a847
50a6722e8503d11a2ea64b136f32f1bf79d7d105
refs/heads/master
2022-11-17T13:54:17.674097
2020-07-08T12:23:35
2020-07-08T12:23:35
266,482,523
0
0
null
null
null
null
UTF-8
Python
false
false
277
py
ex_11_regex.py
import re #fname = input("Enter file name: ") #if len(fname) < 1 : fname = "ex_11_file2.txt" #fh = open(fname, "r") #print(sum([int(i) for i in re.findall(r"[0-9]+", fh.read())])) print(sum([int(i) for i in re.findall(r"[0-9]+", open(input("Enter file name: ")).read())]))
f1881f642b85120af6dcc104a0b5f85a4fffce01
6056be5b8b28d8810f61fed576ac152f1f3c4a3c
/class1.py
e49128921685ac962574d8f4b119756d9f44695f
[]
no_license
dbsdk0070/python
e59e86f259eee4ce433f52285212a78d7726eb26
42a6924d98de9ed925d0c0de229dd7f8834e2663
refs/heads/master
2023-05-05T05:26:03.356801
2021-05-11T13:15:44
2021-05-11T13:15:44
354,692,260
0
0
null
null
null
null
UTF-8
Python
false
false
685
py
class1.py
#class1.py class Person: #클래스에 소소된 멤버변수(주로 데이터를 공유) #클래스 안에 있으면 class 변수 num_person = 0 def __init__(self): #인스턴스는 여기에서 초기화 self.name = "default name" Person.num_person += 1 def print(self): print("My name is {0}".format(self.name)) #인스턴스 생성 p1 = Person() p2 = Person() ...
b8c71a0a68ebbecea8b64972884c024ad7b5830b
3ad9c87289e4bcaef71623553e0564885c9f2d13
/Selenium_test/add_item_to_catalog_test.py
48cb2673caaa44a015420066415e98e884880105
[]
no_license
Ezhvsalate/selenium_training
5c63f56997ece69daed3628231ad4eef14337590
08797ec7a0dfa73901e43a2956fa04c09f58e995
refs/heads/master
2020-07-25T00:11:32.282491
2018-02-11T13:02:04
2018-02-11T13:02:04
73,784,317
0
0
null
null
null
null
UTF-8
Python
false
false
3,475
py
add_item_to_catalog_test.py
import pytest from selenium import webdriver from random import randint @pytest.fixture def driver(request): wd = webdriver.Chrome() print(wd.capabilities) request.addfinalizer(wd.quit) return wd def test_add_item_to_catalog(driver): # генерируем рандомное число, будет использовано для создани...
17aefece3974960cf24df3f44a6b7185f63e0c57
c6f7e7fbb9bba08e4021c415ebc924997b8e32b0
/slapos/promise/plugin/check_lopcomm_lof.py
a8337f6a7c3d26ac253489686173fa10c862599f
[]
no_license
SlapOS/slapos.toolbox
241dd65cdda778c304652cd5dbaefd880c9343af
c2ebc7265f47f80d7bc8b4af7589635b8047ab5a
refs/heads/master
2023-08-16T19:33:16.930978
2023-06-15T11:59:52
2023-06-15T11:59:52
19,693,487
0
2
null
null
null
null
UTF-8
Python
false
false
2,081
py
check_lopcomm_lof.py
import errno import json import logging import os from dateutil import parser from .util import iter_logrotate_file_handle from .util import iter_reverse_lines from .util import JSONPromise from zope.interface import implementer from slapos.grid.promise import interface @implementer(interface.IPromise) class RunProm...
a98686d91a440d1231dd08cf9921f8ac6c3b2855
b0b3923ff96e7ecb99e5fae6ee2c5707e7c3afcf
/tests/context.py
c929a05ca6e29215bec7acebe30fc4db28a85c96
[ "MIT" ]
permissive
rach-sharp/playlist-bot
3101dba36da3875cbe6945e9ab4a43dce94d52e2
4b8ac6ff556853e8fc0bc6a4d300ce6ce09f1779
refs/heads/master
2021-06-05T08:20:04.739494
2016-09-27T15:21:15
2016-09-27T15:21:15
67,500,345
1
0
null
null
null
null
UTF-8
Python
false
false
137
py
context.py
import os import sys sys.path.insert(0, os.path.abspath('..')) import connections # make sure tests use: "from .context import sample"
2c7cfae7f49b51d30b983297b402d64f61cd4c2d
990b7d2822d54c4d35c4c0c70853a98a4cdd4aec
/hack/NmapScan.py
c736a6874bf30464e543a696428646a6b0ecb238
[]
no_license
zhangjunxiao/python_hack
7bcfbeadfeaa5767cc51b93f1aa7d965483c6180
d7c52c0ec687bb497d28e8da7c7e0fcca35154fd
refs/heads/master
2021-01-11T12:26:48.544091
2017-06-13T02:50:49
2017-06-13T02:50:49
76,660,005
0
0
null
null
null
null
UTF-8
Python
false
false
965
py
NmapScan.py
#!/usr/bin/python # coding = utf-8 import nmap import optparse from threading import * def nmapScan(tgtHost, tgtPort): nmScan = nmap.PortScanner() nmScan.scan(tgtHost, tgtPort) state = nmScan[tgtHost]['tcp'][int(tgtPort)]['state'] print "[*] " + tgtHost + " tcp/"+tgtPort +" "+state def main(): ...
5005ef9e158307262ffad5495b9e3c923cdc952e
863324b98c455bdbc0b7c4c59727cb1ce55432f2
/algo.py
3dfcc32a40709f78d0feed7eab99e65d725346d0
[]
no_license
JeromeRocheEnsta/Genetic-Algorithm
f7d3f4d63bf8033fdb21ec4522b2ef3d128c35ce
c9d957e561b95e2ab4b3a8ce209bfbae8b5f7e73
refs/heads/main
2023-05-17T17:23:29.485664
2021-06-06T19:21:57
2021-06-06T19:21:57
374,444,875
1
0
null
null
null
null
UTF-8
Python
false
false
3,066
py
algo.py
#coding=utf-8 from main import Individual, Population import time import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation def main(input_array, pop_size, selection_method, renew_rate, win_rate, MAX_GEN=1000): """ Main algorithm to seek the solution: the longest zero-sum sub...
8bb6df7dc2f40178fcf6fa4ec4e61b9f79a910da
085360078d443bf22814c9fe33e71f0358d50360
/git_wos.py
a54fc509e3ff60cf83751a0be3d3a6adcfcd85d7
[]
no_license
kaixietemp/web_of_science
6c8ee31e48689fe76516f8a0083c926bcbf8e9a1
dbcd7c1ef32a52513e04d797beb46ebb6324dbea
refs/heads/master
2021-01-19T23:15:59.577090
2017-04-21T07:19:40
2017-04-21T07:19:40
88,954,191
1
0
null
null
null
null
UTF-8
Python
false
false
8,111
py
git_wos.py
import re import requests from lxml import html import pandas as pd import time import os #import pickle os.chdir(r'K:\\wos') class SpiderMain(object): def __init__(self,sid,startYear,endYear,journal): self.headers={ 'Origin':'https://apps.webofknowledge.com', 'Referer...
4240a93e3a224a3333e12814580a27be32aa1fd8
998d0ed4e2b4e6affc11e788b1cda55769055565
/test/test.py
69a27fdba1fa1486ae1c7bd117fd924d784f3bac
[]
no_license
mrokiriko/napoleon_pali
afbb442464e7f76b9941e8c5ba760e8ad1684d6b
34a0524f32517d6aed5909c26ffe5e025aa0f808
refs/heads/main
2023-01-06T23:28:34.282368
2020-11-06T17:10:41
2020-11-06T17:10:41
310,659,378
0
0
null
null
null
null
UTF-8
Python
false
false
666
py
test.py
import unittest from run import Tenet class TddInPythonExample(unittest.TestCase): def bench(self, num, answer): guess = Tenet.is_palindrome(num) self.assertEqual(answer, guess) def test_basic_false(self): self.bench(123, False) def test_basic_true(self): self.bench(1221...
703acd2ae195894f631d09f18acb0160c4766180
2eccb64d4391a389a6d4cf766d7b79d3a5f21ec2
/Neuron-network/main.py
a948bd29c04aee161df578d2d5b8f332349eaf20
[ "MIT" ]
permissive
Jeanchichi/Python
2f8eeb49700effe5264e0ba5829abe2f6525d85b
4bbedbbd9a519feb03d0996303dec72f23f1d48d
refs/heads/master
2023-03-21T11:41:10.665861
2021-03-16T11:14:50
2021-03-16T11:14:50
269,710,010
0
0
null
null
null
null
UTF-8
Python
false
false
9,678
py
main.py
from functions import sigmoide, tangente class Network: def __init__(self, name='Unknown', learn='sigmoide', error=0.001): """ # On initialise le réseau, avec pour paramètres : - un nom, à titre purement informatif - la fonction d'activation voulu au déb...
95e6b0982fb4436fef1ca7ddbe43fd0567563c5b
aa83d694ed02ca5be7568f925843ebbcb048ad38
/tests/integration/test_chalicelib/database/test_redis.py
353bad6f113ea8bddf519b7217403965c119a863
[ "MIT" ]
permissive
andersoncontreira/aws-lambda-chalice-skeleton-python
4dc525d90a6aa0fdc50bcf334af0aaa33e23d3d8
7b2f83c24c86fadabfd20cbebeecbc20d28899e4
refs/heads/master
2021-07-07T06:31:09.412504
2021-06-25T00:58:50
2021-06-25T00:58:50
245,667,920
3
0
null
null
null
null
UTF-8
Python
false
false
1,340
py
test_redis.py
import unittest from chalicelib.config import get_config from chalicelib.database.redis import get_connection, reset from tests.integration.integrationtestutils import BaseIntegrationTestCase from tests.unit.testutils import get_function_name class RedisTestCase(BaseIntegrationTestCase): def setUp(self): ...
0ada470746bcb27be9f2465c8580777c7910ffa7
a48d82ef66fd15b4b8fae313df7713247e12dc27
/homework2.py
2885e8917d63962433201d1a4473a3b0fce9f483
[]
no_license
kirushpeter/functions-homework2
425c6dcf5975f500e2fbb3306e80e51a58511fee
0bc2e8b6961df1fc4bca519f792c38a267146988
refs/heads/master
2020-04-16T19:57:39.927628
2019-01-15T17:15:37
2019-01-15T17:15:37
165,880,677
0
0
null
null
null
null
UTF-8
Python
false
false
569
py
homework2.py
"""homework on functions""" #functions with return def Artist(): name = "Octoppizo" return name def Genre(): name = "trap music" return name def Texture(): name = "Mezzo plano" return name def Duration_time(): name = 300.90 return name #calling each function and storing it in a var...
b52b652e5b00f2525a546929a7ab2230f5413321
c97b9ae1bf06757ba61f90905e4d9b9dd6498700
/venv/Lib/site-packages/tensorflow/_api/v2/compat/v1/test/__init__.py
50b0d60d9976f6ac0a63d3a09b475365fc9bdfee
[]
no_license
Rahulk1p/image-processor
f7ceee2e3f66d10b2889b937cdfd66a118df8b5d
385f172f7444bdbf361901108552a54979318a2d
refs/heads/main
2023-03-27T10:09:46.080935
2021-03-16T13:04:02
2021-03-16T13:04:02
348,115,443
0
0
null
null
null
null
UTF-8
Python
false
false
129
py
__init__.py
version https://git-lfs.github.com/spec/v1 oid sha256:c736b7313ffed687c03d9342a4abbab2c1eb521406eddb58ac69a77f9d87b7d0 size 1492
9b88ca46578a399b09124de5ee4dcfdaee05dc4f
9f5c72910336b9744698166e3772a17ef4a33da2
/ravem/indico_ravem/__init__.py
bae4769fe8cb02a032952ed43da35cd9e4843224
[ "MIT" ]
permissive
indico/indico-plugins-cern
3c86103a4201258c4aa86dbec4a54874de738f63
3f7b0dd2ae5f3600e2cc894d449ded78cdddf4ad
refs/heads/master
2023-08-29T06:53:01.208041
2023-07-28T09:15:04
2023-07-28T09:15:04
109,959,841
6
20
MIT
2023-09-06T15:27:21
2017-11-08T10:12:34
Python
UTF-8
Python
false
false
335
py
__init__.py
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2023 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. from indico.util.i18n import make_bound_gettext _ = make_bound_ge...
2c219bc65b0757f2e8162dd2e26eb4c48c2fe076
05829c79fb48fa95e072c3b92223b4e3188be052
/HelloPython/code/11. DatabaseHandling/InsertNUpdateTable.py
8e81b3ec869f8f6bc437d5bdcce53f59a1e44935
[]
no_license
waikei1917/HelloPython
ebc41ad7465e851f2bb8bc18671982bad3af41c2
c2d5eb8912c31f2b949b8fe666a0549e1f40f8c3
refs/heads/master
2020-04-12T01:26:30.129325
2016-09-13T23:49:28
2016-09-13T23:49:28
65,275,449
0
0
null
null
null
null
UTF-8
Python
false
false
238
py
InsertNUpdateTable.py
import sqlite3 db = sqlite3.connect('database.db') #db.execute('insert into person(firstname, secondname, age) values("Alex", "Bowers", 17)') db.execute('update person set firstname = "AlexAss" where secondname = "Bowers"') db.commit()
561aa687d4479e515a777a68d6a1016edac0842c
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03730/s307715030.py
694c27ea52c2657cfd8928fa31fd22cc0baf6784
[]
no_license
Aasthaengg/IBMdataset
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
refs/heads/main
2023-04-22T10:22:44.763102
2021-05-13T17:27:22
2021-05-13T17:27:22
367,112,348
0
0
null
null
null
null
UTF-8
Python
false
false
140
py
s307715030.py
a,b,c=map(int,input().split()) f=False for i in range(10**4): if (i*a)%b==c: f=True break if f: print('YES') else: print('NO')
d138417d58c946e9cdeb298488a516e25c0bc599
38433574de70ccc0472daeabb614b491ac8526c0
/sqlalchemy-stubs/dialects/sybase/__init__.pyi
8f10f122bc1f5f5cbc37576db5c86121ba0bfec7
[ "MIT" ]
permissive
Parnassius/sqlalchemy2-stubs
28fd7611a50b60415062fdb6d367da14c9a69462
68f8417888456588714fcced1c6799f3eb00ff2d
refs/heads/main
2023-09-01T18:03:58.568139
2021-10-14T17:54:15
2021-10-14T17:54:15
363,415,451
0
0
MIT
2021-10-14T20:29:03
2021-05-01T13:22:32
Python
UTF-8
Python
false
false
888
pyi
__init__.pyi
from typing import Any from .base import BIGINT as BIGINT from .base import BINARY as BINARY from .base import BIT as BIT from .base import CHAR as CHAR from .base import DATE as DATE from .base import DATETIME as DATETIME from .base import FLOAT as FLOAT from .base import IMAGE as IMAGE from .base import INT as INT f...
9c20b8b1e170795ecf910ed94889fd3b76e7272f
1ce1fa8751e2abdd179102999b0d0ae1153efa68
/mirengine/mirbase.py
c65e1e475987625304dccaa0774cadfce4d9590e
[]
no_license
zentails/miss_mirror
3cf6b28f67bcd9890affb862d69032620542c8c2
76a7500360ba18b837e4ac283eb16a44443d577d
refs/heads/master
2021-08-29T02:13:04.617989
2021-08-19T14:57:36
2021-08-19T14:57:36
124,383,620
1
2
null
2018-03-14T09:27:48
2018-03-08T11:45:55
Python
UTF-8
Python
false
false
9,126
py
mirbase.py
import ast import multiprocessing import os import random import traceback import pyrebase import mirtools # firebase.conf file must be like this # _____________________________________________________________ # # { # "apiKey": "apiKey", # "authDomain": "projectId.firebaseapp.com", # "databaseURL": "https://d...
1b2fb639a1499d8e57f00e9b4d57a35643001b3a
7ec04a925d5180e677dd8b4306ccd4a1ea0d96a5
/leetcode/111_Minimum_Depth_of_Binary_Tree.py
533500cf4bb10d8046940c421c255e550ab9dde3
[]
no_license
JianxiangWang/python-journey
883e6a9f0b03ce2bd6fd71f272728dfc65c363b0
f2c4f727689567e00ee06560132fca55a6fd9286
refs/heads/master
2020-03-25T22:54:23.462961
2019-02-06T07:55:03
2019-02-06T07:55:03
144,249,290
1
0
null
null
null
null
UTF-8
Python
false
false
1,797
py
111_Minimum_Depth_of_Binary_Tree.py
# coding=utf-8 # # Copyright (c) 2018 Baidu.com, Inc. All Rights Reserved # """ The 111_Minimum_Depth_of_Binary_Tree file. Authors: Wang Jianxiang (wangjianxiang01@baidu.com) """ """ Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down ...
b96b9ce354e395c078f68416f436bb66da946298
f1adf97e7208f0b781ef2d73d9af95c48476e902
/ui.py
67b87f7384b368b0a3f899dff609ba9119b088cd
[]
no_license
kaidn28/PyQt5Mediaplayer
cef7a916797ee72fbbd30cceae59ce06d716af8a
bc43b1ab5a83cac4a1e09edd7cf3cd0a12b80c25
refs/heads/master
2023-03-18T16:39:51.566773
2021-03-14T15:53:26
2021-03-14T15:53:26
347,387,937
0
0
null
null
null
null
UTF-8
Python
false
false
6,463
py
ui.py
from PyQt5.QtCore import * from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtMultimedia import QMediaContent, QMediaPlayer from PyQt5.QtMultimediaWidgets import QVideoWidget from FrameGrabber import * import sys class VideoWindow(QMainWindow): def __init__(self): super().__init__() ...
403447677430d079637e0fb853937c0587da873f
c715ccffe4239660970d97291bd8c67c713e5d6f
/save.py
76c8c3b537e26783950a0faedd6f12c836f13f08
[]
no_license
whisperlynd/Search-color
815cb087124e04d30b8be3c2f1e9cd887cfb6e9c
062c58b317f7400dcafb35bf2371a7ad9469f5b5
refs/heads/master
2022-11-07T06:19:55.986723
2020-06-28T19:40:56
2020-06-28T19:40:56
275,654,065
0
0
null
null
null
null
UTF-8
Python
false
false
1,861
py
save.py
import pymysql from bs4 import BeautifulSoup as BS import requests def saverec(url,ntitle,nfrom,ndate,ncontent,ncount): # pymysql.connect(数据库url,用户名,密码,数据库名 ) db = pymysql.connect("localhost", "root", "luoyujia990210", "cuc", charset = 'utf8') cursor = db.cursor() #for d in data: cursor.e...
a291fc9759795fe34d898ec1eb25e8e6643f3b47
97e0229ff3b0bb48f6d04c850529841265f506b7
/dash_test.py
0458764df9fa2a1f90fa25f9df9e05200eb10653
[ "MIT" ]
permissive
tensorchief/dash
5e33182627dce8f2f9fd6f58e2a7daa3c6197485
d7e2e6186b169df9125b8f291932f92a9534c072
refs/heads/master
2020-03-22T14:16:37.623117
2018-07-19T19:26:51
2018-07-19T19:26:51
140,166,402
0
0
null
null
null
null
UTF-8
Python
false
false
2,946
py
dash_test.py
# -*- coding: utf-8 -*- import dash import dash_core_components as dcc import dash_html_components as html import pandas as pd import plotly.graph_objs as go df = pd.read_csv('https://gist.githubusercontent.com/chriddyp/' + '5d1ea79569ed194d432e56108a04d188/raw/' + 'a9f9e8076b837d5413...
90a68434d5f9c0d8377ce02275e41418b7994888
ea3755214ccb81e4b7e45a4059868efba18f3b29
/downstream/next_loc.py
8af52ae1ac53b278fe49f36e56e9670a6c1cb1cf
[]
no_license
crystal22/TALE
dc07af20ea4b3eeab018b76bede367a2b64e2d0d
05e4c4aa00f00fca180f310bb7f643ad49ab0f89
refs/heads/master
2023-03-17T12:48:53.711495
2021-02-10T02:43:10
2021-02-10T02:43:10
null
0
0
null
null
null
null
UTF-8
Python
false
false
12,345
py
next_loc.py
import os import math from itertools import zip_longest import numpy as np import torch from torch import nn from torch.nn.utils.rnn import pack_padded_sequence from torch.nn import functional as F from sklearn.utils import shuffle from sklearn.metrics import accuracy_score import nni from utils import w...
a841b206cda3412396c31356bfa3b6c9199044f7
0f129876be15fde0884e0b1b206da360c19524ef
/models/hierarchical_dan.py
da3263685c01121b2cbc3a2582c3a5833e357f24
[]
no_license
uhauha2929/YelpRating
17091fd75274f0d608d72ea1037a59dbef74919f
4fca90d60db390e07506cbcff50fe89d6fe34cdd
refs/heads/master
2020-05-31T15:23:08.546413
2020-02-21T11:07:29
2020-02-21T11:07:29
190,355,760
0
0
null
null
null
null
UTF-8
Python
false
false
3,154
py
hierarchical_dan.py
from typing import Tuple import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from models.dan import DeepAveragingNetworks class HierarchicalJointModelDAN(nn.Module): def __init__(self, vocab_size: int, embedding_size: int, hid...
e411383519ac39c8e4a6ed25c1c4e7f7628f6df5
ff2952f38c7acada5e21b51c1494c7b63b55aed6
/motion_planner.py
9c7a7c688cd376830de622ca05c4ea5a68809aa1
[ "MIT" ]
permissive
grassit/first2017mp
4acbb373be65c2582b8ffb83c2cf96d080193852
a5b510485cf223b302946a4179d540fe378febb1
refs/heads/master
2020-03-25T06:20:05.767378
2017-04-04T20:41:47
2017-04-04T20:41:47
null
0
0
null
null
null
null
UTF-8
Python
false
false
155,102
py
motion_planner.py
#!/usr/bin/env python # coding: utf-8 import numpy as np import os,sys import matplotlib.pyplot as plt import matplotlib.ticker as plticker from matplotlib import patches import time import argparse import operator from math import acos from collections import defaultdict,namedtuple import pylab import random import lo...
212fce0fc0390b3ae712c336c305e99df8ada3d9
4f6e2d74c71b2cce63ec9f92a86f4eb1faf51fea
/hadoop/src/quantreg.py
0389edaaf195ed58f31f97b799a1eba706172fef
[ "Apache-2.0" ]
permissive
chocjy/randomized-quantile-regression-solvers
7188c26f21776c42d265afa0a57eb7282e8865f6
a757e88fce884e1515c60c912a7a18772d700bc9
refs/heads/master
2020-06-26T09:35:52.724168
2015-09-03T03:32:18
2015-09-03T03:32:18
32,097,749
10
3
null
null
null
null
UTF-8
Python
false
false
948
py
quantreg.py
import numpy as np import numpy.linalg as npl def quantreg_ipm(A, b, tau): """ IPM for quantile regression """ from rqfnb import rqfnb n, p = A.shape rhs = np.sum(A, 0) u = np.ones(n) d = np.ones(n) beta = 0.99995 eps = 1e-6 wn = 0.5 * np.ones([n, 9]) wp...
ac536aa019920b88b46dfaab4514bb8a39ef5d4b
217711c6ecd21eb951974d83560d8b82648f972d
/ts_log/__init__.py
28c2eba6206f49ef1b691e8b39a2ec66716f2814
[ "BSD-2-Clause" ]
permissive
zengxs/ts_log
180effe86bacafb326356bad351c695e8d763854
5a87f88fc1c307324610df373d5320e012e77326
refs/heads/master
2020-04-07T15:27:20.087877
2018-11-23T02:33:00
2018-11-23T02:33:00
158,486,218
0
0
null
null
null
null
UTF-8
Python
false
false
5,394
py
__init__.py
import logging import os import socket import threading import time from collections import namedtuple from queue import Empty as QueueEmptyException from queue import Queue import psutil import requests from influxdb.line_protocol import make_lines TsRequest = namedtuple('TsRequest', ['endpoint', 'data']) __influx_...
06f7e34aea1468eac252a1243051c82301fdf812
54d6395dfdc46b326fa6f12613562295841c9489
/home_work(10.02)/task_1.py
7623601f0226f5087bcc767d5e88d1812ae51fba
[]
no_license
linkoln09/diablo_projects
800ff74febc2e1edc9b802d3c7f5384e256a3363
4e5c1b3a9d652a9ae81256f1b9802e4f57226f57
refs/heads/master
2021-04-30T06:06:02.202452
2018-02-25T12:53:00
2018-02-25T12:55:05
121,434,758
0
0
null
null
null
null
UTF-8
Python
false
false
372
py
task_1.py
x = 0 y = ['*'] while x < 4: print(' '.join(y)) y.append('*') x += 1 while x > -1: print(' '.join(y)) y.pop() x -= 1 n=5; for i in range(n): for j in range(i): print ('* ', end="") print('') for i in range(n,0,-1): for j in range(i): print('* ', end="") print('') for i...
a47dca3169ca1266241b16c51c17d51c705c8db7
88ec79636bdefe21e8ac4f655623e72eb3c69e96
/Project-Test/Python-Test-Answers/Answer-5.py
9bd7ba01ed10ff765b7bdc726501cdb771441904
[]
no_license
guharayshamik/Project-Test
79871f54a3bd61e8a665650a7d54b76914689fba
ae75504e27440eed55dc91461050d18f0f673018
refs/heads/main
2023-06-15T21:53:31.981884
2021-07-13T14:10:42
2021-07-13T14:10:42
385,515,074
0
0
null
null
null
null
UTF-8
Python
false
false
1,557
py
Answer-5.py
import csv, requests import pandas as pd import pandas.io.common print("Qust 5: Write a python script to extract all usernames from the email addresses present in a given text file. Ex: username@domain.com. Display all user names, by sorting/ordering based on their domain names.") print("Ans: ") #Place a fil...
35dd97a6a4607fa3fabb2e45aea8c1af13a975c2
485437b4b668828b5b68bcfb287ad013b30dee55
/2.5-sum-lists.py
80940758dc1c59b548eec4df0c94e2853f54b3f4
[ "MIT" ]
permissive
rithvikp1998/ctci
be6cd602323e19bd0590e5d13175fb5647866489
52068e94449e61aef6bac9646a7863260acc7a05
refs/heads/master
2020-04-04T10:28:07.957428
2018-12-05T04:15:47
2018-12-05T04:15:47
155,856,098
0
0
null
null
null
null
UTF-8
Python
false
false
2,603
py
2.5-sum-lists.py
class Node: def __init__(self,value): self.value=value self.next=None class LinkedList: def __init__(self,head): self.head=head self.tail=head def addNode(self,node): self.tail.next=node self.tail=node def printList(self): curr=self.head ...
e601208a3fffab83c3961f6ea1e4a60d917e24e5
314a687b50622e0377f9829b824b046a18f2421d
/passbook/core/views/authentication.py
4749beeda54e6e6d10e39a17b029de2cdc827c91
[ "MIT" ]
permissive
fossabot/passbook
a4d13b31bb831adb6392d434cfde3080b7fc797e
cba17f6659404445ac3025f11657d89368cc8b4f
refs/heads/master
2021-02-14T23:35:52.249963
2020-03-04T08:22:04
2020-03-04T08:22:04
244,845,185
0
0
MIT
2020-03-04T08:21:59
2020-03-04T08:21:59
null
UTF-8
Python
false
false
9,133
py
authentication.py
"""passbook core authentication views""" from typing import Dict, Optional from django.contrib import messages from django.contrib.auth import login, logout from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from django.forms.utils import ErrorList from django.http import HttpRequest, HttpR...
453ae7d1dfde2f0c3878cb930430970c27617b20
6d2e090664f745469818400a32656f9f0173dbe3
/profile_app/forms.py
232e7ace0fb133cc645edf208c1a0b9832eae4bc
[]
no_license
evana27perveen/d-learning
e88ad3a0583a0be4228440f1c164c1f0fa497148
1057db1111286aa177aae1fe555ec722fec0e3f3
refs/heads/main
2023-03-13T16:36:25.846305
2021-03-06T08:03:49
2021-03-06T08:03:49
345,035,431
0
0
null
null
null
null
UTF-8
Python
false
false
556
py
forms.py
from django.contrib.auth.forms import forms from profile_app.models import ProfileAddOnModel class ProfileAddOnForm(forms.ModelForm): my_bio = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'some words that defines you'})) class Meta: model = ProfileAddOnModel exclude = ('owner'...
a640499a677fea653f5dc2be8cd64767417ac035
9aa526eb604e6c84997a6c8d3a8482b3989dba5c
/explorer.py
6d1fda7a0e9ee8afacfd3b965d1e383e97bf96a8
[]
no_license
goelshivam1210/explorer
f0b13a516454a67e3219512fe1ebb25023b2bad5
90208cb00e469ca007aa1029f09122e7bdb7935c
refs/heads/master
2023-02-13T06:03:49.180238
2021-01-06T18:44:22
2021-01-06T18:44:22
319,480,196
0
0
null
null
null
null
UTF-8
Python
false
false
12,007
py
explorer.py
""" The goal of this class is to find the state space initialize the new environment modify the network initialize the weights with similarity to the existing object weights use sampled trajectories to generate optimal action set use the optimal action set to perform reasoning over exploration over current observed ...
85d5b01dd9730b118dc08158fe160f337a266df4
07a34bae26354b61b9ddcc61bc2f53731c4a890e
/setup.py
59ee4970bc03c814978e0d9c42a1f0f4a798e01a
[]
no_license
Hotsteppers/zamboni
821dcd74c8dc195c9c69fb48de7d1e07b3270199
7b3c1e94a53a720f5239e0d6373f89482a4e7bb3
refs/heads/master
2022-12-10T22:04:23.609275
2018-12-11T18:45:03
2018-12-11T18:45:03
129,802,913
0
0
null
2022-12-08T02:02:52
2018-04-16T20:40:14
Python
UTF-8
Python
false
false
394
py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='zamboni', version='0.0.1c1', license='MIT', author='John Mav', author_email='jackmavroudis@gmail.com', maintainer='Hotsteppers Team', description='A Simple connector to the NHLs Public APIs', packages=['zamboni'], incl...
3325037dfd259e62a5ca028c7d3beeb21fb643d0
c4b4815a170f86b2e22a9cf4dc3e61403622cdf8
/task08/task08.py
e2df97d98938d7f4ef05de1baa46a4d498ca4fb8
[]
no_license
liroy3000/euler_tasks
1a8f9f9bbd0b5b3ce69183a4a0314d0f254970af
d213d7673cc2d89630c55419610dbc68c3f27fd7
refs/heads/master
2023-01-28T15:18:27.225676
2019-07-16T13:52:34
2019-07-16T13:52:34
166,671,870
0
0
null
null
null
null
UTF-8
Python
false
false
1,637
py
task08.py
""" Задача проекта Эйлера https://projecteuler.net/problem=8 Наибольшее произведение четырех последовательных цифр в нижеприведенном 1000-значном числе равно 9 × 9 × 8 × 9 = 5832. Найдите наибольшее произведение тринадцати последовательных цифр в данном числе. """ data = 7316717653133062491922511967442657474235534919...
25dc9db0929415cc5038cfe71eddeb25e443ef0a
2340171b801f1e0d5c2a43b624b8d4795691a25f
/veicoli/views.py
041436842e70add2192033546b82a359e9d230fe
[]
no_license
vad/django-tutorial
9a039d3e957878199eb10a3ed008868d4f15a025
f35c752e5f15b5a3a39f12783dbd17c177dd37fc
refs/heads/master
2020-04-12T11:01:06.385186
2018-12-24T10:01:30
2018-12-24T10:01:30
162,447,491
0
0
null
null
null
null
UTF-8
Python
false
false
381
py
views.py
from django.http import JsonResponse from .models import Veicolo def index(request): veicoli = Veicolo.objects.all() for filtername, value in request.GET: veicoli = veicoli.filter(**{filtername: value}) out = [] for veicolo in veicoli: out.append({ 'comune': veicolo.comun...
238dae6c6fd2857056c10757754f512048a7a535
5aab2bc0b284a35b316b77c8fd45084d63a7853e
/src/main.py
c26ee09009633268710377bb3e4756ed0bcf44aa
[]
no_license
rest76x/PRAC1-WEB_SCRAPING
e97b0cbbbad1fe97f536039fe40d2f2e493ff3f7
995e63f3d71a6c90042fe8b3af57d16a419dafdc
refs/heads/master
2022-04-18T12:18:40.979161
2020-04-12T15:03:38
2020-04-12T15:03:38
254,155,169
0
0
null
null
null
null
UTF-8
Python
false
false
172
py
main.py
#!/usr/bin/env python # coding: utf-8 from scraper import ACO_Scraper fileName="ACO_PVPs.csv" scraper = ACO_Scraper(); scraper.scrape(); scraper.data2csv(fileName);
3f92f10dd0d23100976167fcef7ef6200303c35e
86383f9eda2bab7c2883ecb41b5be23380dfd20a
/guess.py
095d7f9ad5a419662dda4f9b18f15f0314371d38
[]
no_license
asimMahat/Advanced-python
eff530d0f4798d6b1916ba0bcbac2beb62fff375
33c6e4020e96156da070cf48e86679951fe2b193
refs/heads/master
2023-02-26T14:42:31.423050
2021-02-05T15:01:31
2021-02-05T15:01:31
317,211,482
0
0
null
null
null
null
UTF-8
Python
false
false
387
py
guess.py
user_word = "" accurate_word = "asim" limit = 4 count = 0 out_of_guesses = False while (user_word != accurate_word ) and not (out_of_guesses): if count < limit : user_word = input("Guess the right word : \n ") count = count + 1 else : out_of_guesses = True if out_of_guesses...
3ccfefdfd2a3e15b5c34939171b11e0454de6ba9
755fc5675df0b4ecda28484b3e4042ae5fd98061
/silence/migrations/0001_initial.py
4716178eb3ea5e1e7c56bd53f851dc638b39a202
[]
no_license
zsu13579/silence_project
e088ad1543bd641f7b15899a17f9717c2d283faf
18e59b1a746ac392681fba98546b85aacf0f082a
refs/heads/master
2020-12-25T14:33:35.251321
2016-08-28T09:07:50
2016-08-28T09:07:50
66,758,933
0
0
null
null
null
null
UTF-8
Python
false
false
5,788
py
0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Activateuserinfo', fields=[ ('id', models.AutoF...
b14d0beed5ee829a28861f6563ec18922e7b32a9
b4ff1cae8c80253ed20e70f3b5d005358cee1465
/main.py
ac9e64689076d13014060bcdd5cdf8bd302feb4c
[]
no_license
psolikov/Data-driven-hyper-optimization
8b3a51efe3af5b174a87f328bea15a455974043b
a11c01484c74cef16491828d20ca408e94987dd9
refs/heads/master
2022-12-16T03:11:51.475845
2020-09-16T16:06:26
2020-09-18T13:43:03
296,059,860
0
1
null
null
null
null
UTF-8
Python
false
false
5,746
py
main.py
import re import ast from statistics import mean, stdev from collections import defaultdict def add_missing_newlines(line: str): return line def parse_data_item(item: str): check_beginning_re = re.compile('^Модель [1-9][0-9]*:') match = re.match(check_beginning_re, item) if not match: raise ...
f7c8b8f9457fb3acef26cbe3f0d40b06be4dc676
3ae93bb2f5874d32e35cfbe727fd9d04b03f12ee
/Streamlit-Deployment/LR/StreamlitApp.py
6a0a216eb175198c78814f7a0942c068115ce690
[ "MIT" ]
permissive
Harsh188/100-Days-of-ML-Pt2
6526186511ec6878bdc6665497b024dbed4e116d
cc9698103e2f4cc59cc3f3322fcd46dd6280b29c
refs/heads/master
2023-07-02T04:16:40.515326
2021-08-19T03:00:27
2021-08-19T03:00:27
366,367,396
6
0
null
null
null
null
UTF-8
Python
false
false
944
py
StreamlitApp.py
import pandas as pd import numpy as np import joblib import streamlit model = open("linear_regression_model.pkl", "rb") lr_model = joblib.load(model) def lr_prediction(alc, vol, sul, dio): pred_arr = np.array([alc, vol, sul, dio]) preds = pred_arr.reshape(1, -1) preds = preds.astype(np.float64) model...
032c9134d99ee989f05885068025b0c2da39e919
cde096ba977b63becc1b9066677331ef4594a797
/csfieldguide/chapters/translation.py
0e2c1919025520924262aa05ae970b94c0efbe26
[ "CC-BY-NC-SA-4.0", "BSD-3-Clause", "CC0-1.0", "ISC", "Unlicense", "LicenseRef-scancode-secret-labs-2011", "WTFPL", "Apache-2.0", "LGPL-3.0-only", "MIT", "CC-BY-SA-4.0", "LicenseRef-scancode-public-domain", "CC-BY-NC-2.5", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unknown...
permissive
uccser/cs-field-guide
655524b161fab0ab422679dd80720f660f2cfa98
ea3281ec6f4d17538f6d3cf6f88d74fa54581b34
refs/heads/develop
2023-08-28T14:33:58.789843
2023-08-28T08:24:03
2023-08-28T08:24:03
34,356,619
364
97
MIT
2023-09-14T08:58:55
2015-04-21T23:00:26
JavaScript
UTF-8
Python
false
false
1,135
py
translation.py
"""Translation options for localised models. Utilised by django-modeltranslation. See http://django-modeltranslation.readthedocs.io """ from modeltranslation.translator import translator, TranslationOptions from chapters.models import ( Chapter, ChapterSection, GlossaryTerm, ) class ChapterTranslationOp...
574ab1a7fe0e7309cbb23884d351848e75d50e2c
2bd9de0a8a79c8258e43bf218ddc2bc230993c84
/lane_detector.py
d720d76919cab1f725b2dd4bee64730a69dda673
[]
no_license
uboot/CarND-Advanced-Lane-Lines
1dbfc9b9aef465a5539617294115409f1bda6bd6
e09b855703652c192b606e3e23a3832077522fc1
refs/heads/master
2021-01-20T05:48:41.877962
2017-06-08T19:35:47
2017-06-08T19:35:47
89,811,309
0
0
null
2017-04-29T20:34:50
2017-04-29T20:34:50
null
UTF-8
Python
false
false
13,272
py
lane_detector.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import cv2 import matplotlib.pyplot as plt import numpy as np ym_per_pix = 30/720 # meters per pixel in y dimension xm_per_pix = 3.7/700 # meters per pixel in x dimension def undistort(img, mtx, dist): return cv2.undistort(img, mtx, dist) def combined_thresh(img, ...
ccecf07265c711e39522db085fa82371861d14b4
9a0ca21805f03707713bd27e3f5290abda1764de
/filprofiler/_script.py
e98312d4f0a100141d760399ad13389d3fdb72d0
[ "BSD-3-Clause", "0BSD", "Zlib", "LicenseRef-scancode-generic-trademark", "LicenseRef-scancode-warranty-disclaimer", "LLVM-exception", "APSL-1.0", "CDDL-1.0", "ISC", "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "APSL-2.0", "BSD-2-Clause", "Unlicense", "LicenseRe...
permissive
pythonspeed/filprofiler
35070bc7581eff06b7be01683c4c43482181e73a
dbad391adeb087e5b03011da8f3d7d0b817af429
refs/heads/master
2023-09-05T13:36:41.669352
2023-03-18T11:59:50
2023-03-18T11:59:50
273,254,841
792
25
Apache-2.0
2023-06-12T19:02:27
2020-06-18T14:06:37
Rust
UTF-8
Python
false
false
9,367
py
_script.py
""" Command-line tools. Because of LD_PRELOAD, it's actually a two stage setup: 1. Sets ups the necessary environment variables, and then execve() stage 2. 2. Run the actual profiler CLI script. """ import json import sys import os from os import environ, execve, getpid, makedirs from os.path import abspath, dirname,...
2d52718ff68ee0f987cb110e049bb1343783cd52
119a85a388fe436361530fbb47932e704d749557
/PEAK-0.5a4dev_r2085/build/lib.macosx-10.6-x86_64-2.7/peak/metamodels/ASDL.py
cb976fc485c0e81ea8d6f581827276800691dc96
[ "Python-2.0" ]
permissive
chrisrgunn/cs156project
014d5b05c6bf0e08ab8bd0dea525057d0e65b9a7
e5414a37f9793c8b0674695b948482b559b18ea6
refs/heads/master
2021-01-19T14:09:49.046539
2017-05-24T02:10:29
2017-05-24T02:10:29
88,128,762
0
2
null
2017-05-04T23:49:09
2017-04-13T05:36:10
Python
UTF-8
Python
false
false
4,967
py
ASDL.py
"""peak.model ASDL for ASDL""" from peak.api import * from peak.util.fmtparse import * from peak.metamodels.asdl_model import * ws = MatchString('(?m)(\s*--[^\n]*)*\s*') # eat whitespace + comments class TypeID(model.Name): mdl_syntax = ExtractString(MatchString('[a-z][A-Za-z0-9_]+')) class Identifier(model.Na...
add618eadbc29a5cdbdcb035add7ccacf5c710df
8baa8b5d05f2c4538e3eaaf8dd535b52170eafa9
/bin/data_reduce.py
4a6845a15040749ac7ababf195f10324caf6ebca
[ "MIT" ]
permissive
Souldestroyer/OpenTsiolkovsky
851ca29a3310a13bddaed3ae4fdb14d0b3f35283
aecabcab6d266f363ad2476c0d8c9e9fe8f34729
refs/heads/master
2021-08-24T11:37:06.910462
2017-12-09T14:52:10
2017-12-09T14:52:10
null
0
0
null
null
null
null
UTF-8
Python
false
false
971
py
data_reduce.py
# -*- coding: utf-8 -*- # データ削減 csvファイルを第1引数、データ間引き量を第2引数 # python data_reduce.py (csv_file) ([int]間引き量) # 例えば # python data_reduce.py param_test_dynamics_1st.csv 10 # # Copyright (c) 2016 Interstellar Technologies Inc. Takahiro Inagawa # Released under the MIT license import sys import pandas as pd argvs = sys.argv ...
a27387c284977808abdda39665f63266402122be
68af06ffbba4d49cc7e6946302525a2f63d54d70
/experiments/launch_utils.py
f75ee8c3530dd638cf965de0ccdca48cb84f7c57
[]
no_license
lcalem/partial-labels
0632d44c639bb58caad43e313f4aaf07033c6be9
c6698ee33736a3281d1eee07fe89b693bdb60fbe
refs/heads/master
2022-11-30T20:12:13.435972
2020-02-14T15:26:07
2020-02-14T15:26:07
191,608,042
8
2
null
2022-11-22T03:34:16
2019-06-12T16:30:35
Jupyter Notebook
UTF-8
Python
false
false
1,513
py
launch_utils.py
import datetime import os import shutil import yaml from config.config import cfg from model.utils import log from pprint import pprint def exp_init(cmd, exps_folder=None, exp_name=None): ''' common actions for setuping an experiment: - create experiment folder - dump config in it - create cmd ...
a7b70a1665ec72d8e628d2ed524e18beeb6ffc62
d0c506e7de953b066f1531b12b70ea33437dc3e1
/hw5/dataframe-c.py
3ab363a2d77efcb508b0f5514fbc9c0987cb2123
[]
no_license
ynaik16/DSCI-551
d1fbce7d5a70bacc1b0c070cc2c2c15cfcf3e4e1
f5c2c43f5bca2924111507d2975f3ec45872b23a
refs/heads/main
2023-04-23T17:03:49.745848
2021-05-14T06:25:17
2021-05-14T06:25:17
343,668,023
1
1
null
null
null
null
UTF-8
Python
false
false
423
py
dataframe-c.py
from pyspark.sql import SparkSession import json import sys spark = SparkSession \ .builder \ .appName("HW5") \ .getOrCreate() from pyspark import SparkContext country_file = sys.argv[1] # country file country_df = spark.read.json(country_file) sc = spark.sparkContext country_df.select(country_df['...
af693bb98ca6a593eb198a52eb234f58b35c55ba
0925e6174db7585ff0aafc5b8894b4a53a06513d
/model.py
26669508c0aa10e7492f95c8b394f5607fd69747
[]
no_license
goha111/785-hw4
39729fb1a96c23531948eb8cbd27c1bd36dcfa36
270b7329ca7c8ef58ee3befad1ddcb197a5a6386
refs/heads/master
2023-03-26T03:24:36.425683
2018-04-24T13:28:41
2018-04-24T13:28:41
351,320,923
0
0
null
null
null
null
UTF-8
Python
false
false
12,501
py
model.py
from char_list import * import numpy as np import torch import torch.nn as nn from torch.autograd import Variable from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import torch.nn.functional as F def initializer(m): for name, param in m.named_parameters(): if 'weight' in name and p...
fc07982dd02524d5c9f85ef7b4cbeb20a204327e
d02ebdcb0dbc9b2f85dcd4064ab93c647e976b03
/rca/events/migrations/0002_auto_20210713_1218.py
3bce08cff7673600ed9b9d310b307137fa80e9d6
[]
no_license
torchbox/rca-wagtail-2019
5deb298815478d0be98057bdd7d5c082aaaa1cb0
d73ea183031bb1bc72f3c6890a02814f32926082
refs/heads/master
2023-09-04T03:14:30.369016
2023-08-22T07:15:02
2023-08-22T07:15:02
200,079,441
9
3
null
2023-08-22T08:07:16
2019-08-01T15:52:38
Python
UTF-8
Python
false
false
4,508
py
0002_auto_20210713_1218.py
# Generated by Django 3.1.10 on 2021-07-13 11:18 from django.db import migrations import wagtail.blocks import wagtail.fields import wagtail.images.blocks class Migration(migrations.Migration): dependencies = [ ("events", "0001_initial"), ] operations = [ migrations.AddField( ...
e5d16ca2e55131fa84ae61f1623f8cd5c5fbcec2
792fbb3e7822a914e96067381045b5e95ca63c71
/Assets/BgAndTxtClasses.py
b7d334a493cdce0c7a037c92b0f3e1db0cd39559
[]
no_license
Jaabi/Maze31213
8ac38369e1aaa35d403970a2acbde3c3a9a181fb
b304641281b3996f63d274a68298d878507ecb5e
refs/heads/master
2020-12-25T18:22:51.088258
2013-03-22T02:35:54
2013-03-22T02:35:54
null
0
0
null
null
null
null
UTF-8
Python
false
false
858
py
BgAndTxtClasses.py
''' Created on Mar 20, 2013 Background class and all classes that have to do with showing text on the screen @author: Abdiel "Jaabi" Rodriguez ''' import pygame class BackgroundSprite(pygame.sprite.Sprite): ''' classdocs ''' def __init__(self): ''' Constructor ''' py...
e36a1080861de099dfd382e5c4fec17ee1178e2a
63a0a3cc2933c3d071c874c47494a82c591aa76e
/remove_Nth_node_from_endof_link_19.py
8a18e3ce23e877213502a0b97752510f1c0694bd
[]
no_license
jwzh222/leetcode_kill
fe3afc6fce0a2367f4c160ea293886e24e431f1b
bb164eec536f818cadebfd625b468e535da0eb9c
refs/heads/master
2021-01-12T14:32:28.510173
2016-11-27T02:29:21
2016-11-27T02:29:21
72,003,979
0
0
null
null
null
null
UTF-8
Python
false
false
569
py
remove_Nth_node_from_endof_link_19.py
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def removeNthFromEnd(self, head, n): """ :type head: ListNode :type n: int :rtype: ListNode """ d = L...
f416db945555553522a89397ae22db7b2bf2e4d0
99b784550a6d306147c022c8d829800b0fbb8c68
/Part_2_Projects/Project_1_Alien_Invasion/Chapter_13_Aliens/exercise13_5.py
5272373c863fd7efe0e0bb3781825d97e2718e5b
[]
no_license
apuya/python_crash_course
116d6598f656d8fed0b4184edbce8e996cd0f564
0b2e8a6e9849a198cfb251706500a919d6f51fe7
refs/heads/main
2023-06-03T22:41:03.203889
2021-06-16T04:07:28
2021-06-16T04:07:28
367,812,531
0
0
null
null
null
null
UTF-8
Python
false
false
622
py
exercise13_5.py
# Python Crash Course: A Hands-On, Project-Based Introduction To Programming # # Name: Mark Lester Apuya # Date: # # Chapter 13: ALiens! # # Exercise 13.5 Sideways Shooter Part 2: # We’ve come a long way since Exercise 12-6, Sideways Shooter. For this exercise, try to develop Sideways Shooter to the same # point we’ve...
c833b159e76d991afe43ae113e8a380e572b309a
ae79547e19561e6b17b80af6bab6a35a987a4c8d
/humanfriendly/decorators.py
d53cc98a8f8aaaa3fcd5f02e26f9091421cc3ae3
[ "MIT" ]
permissive
crocs-muni/cm_factorization
582fdedf32de7142fa64e4b06dea120df6387556
bef85394257dc39b451c9eec9c67019ed3224e1a
refs/heads/master
2022-03-13T04:32:06.106434
2022-02-21T15:10:53
2022-02-21T15:10:53
162,490,338
34
8
MIT
2021-02-11T10:03:40
2018-12-19T21:01:29
Jupyter Notebook
UTF-8
Python
false
false
1,466
py
decorators.py
# Human friendly input/output in Python. # # Author: Peter Odding <peter@peterodding.com> # Last Change: October 20, 2018 # URL: https://humanfriendly.readthedocs.io """Simple function decorators to make Python programming easier.""" # Public identifiers that require documentation. __all__ = ('RESULTS_ATTRIBUTE', 'ca...
181edbccb68c8f847419ad5bd49a14a606f663fa
ae41c7461688d8d8c96f9452f87e2874883fc490
/event/migrations/0004_eventimage.py
72198d570de6940389d01ec35b34b3ca2685c2b0
[]
no_license
jeremyruizacevedo/beacon-assistance
33e09b3044b7392f2e90e7d7cbd3990d555027cc
e5170befe41b4320101e58a4359a827aeb7eddf9
refs/heads/master
2022-12-15T22:46:43.856125
2019-07-10T22:22:53
2019-07-10T22:22:53
192,350,844
0
0
null
2022-12-08T05:51:56
2019-06-17T13:18:48
Python
UTF-8
Python
false
false
686
py
0004_eventimage.py
# Generated by Django 2.2.2 on 2019-06-30 14:42 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('event', '0003_auto_20190624_0127'), ] operations = [ migrations.CreateModel( name='EventImage',...
06263893370a3faba901e0129048d7e481ce672c
8692688ff6c9cfd0b6a107da25d3106b04ae9fb5
/number.py
2aa1f00d856ec2fba116bc9b0738246d7db8c3ab
[]
no_license
rvinayak1997/first
4aa7df32cf73ceb431495858cfff44f4f55a2b97
a2547bcca854d53648ff12e77c3dfe098fc37df1
refs/heads/master
2021-07-17T13:41:06.783646
2017-10-24T10:27:16
2017-10-24T10:27:16
107,939,822
0
0
null
null
null
null
UTF-8
Python
false
false
64
py
number.py
varone=1 vartwo=2.2 varthree=3+5j print(varone,vartwo,varthree)
bd13b01d1b5feea857d01d9881d33d6beaf9c6cb
2262ff757e99b7fb22e6988ed2508a620bbebeae
/main.py
9495541ab6dbcdbf63f3c04aada56e2f43dc4434
[]
no_license
spl0i7/programming_task
22526cf48c9da3fddb06fa1991e9216d93488f36
6dbe88727596548e3c351c78e94da46b76bdd415
refs/heads/master
2020-05-22T14:27:38.578715
2019-05-13T09:14:51
2019-05-13T09:14:51
186,384,727
0
0
null
null
null
null
UTF-8
Python
false
false
2,898
py
main.py
import csv import sys import datetime from fuzzywuzzy import process from stock import Stock def read_csv_data(filename): raw_data = list() try: with open(filename) as csvfile: reader = csv.reader(csvfile, delimiter=',') next(reader, None) for row in reader: ...
56c59418ea012761fca00bdd49ace0fc64ce0f86
7c35064aa969a2dea6ca04a9cacbe3de380d19b8
/anisotropy_luigi/agus.py
fcb5bfe6689314463428688af8b555b349a73c41
[]
no_license
maurosilber/anisotropy-luigi
ee55a4d0aa5efb35270a3736c22d0c9bed78a584
d2143a5ca637a01b7f72699df7b5d0f35fcbcef9
refs/heads/master
2022-02-26T01:04:55.487488
2021-04-19T22:37:54
2021-04-19T22:37:54
213,287,200
0
0
null
null
null
null
UTF-8
Python
false
false
2,690
py
agus.py
from donkeykong.target import LocalPandasPickle import numpy as np import pandas as pd from scipy import stats from .cell import CellsSummary class AgusDF(CellsSummary): def output(self): return LocalPandasPickle(self.results_path / "Agus_shaped.pandas") def run(self): df = [] for cu...
34963ca8599965f1252351d45ba38ffe22b2f4c5
8abaff9494cbe592df4ae10d0671cbb5903925cd
/utils/arguments/train_arguments.py
a74aa7e009a09f13bc46eafac43e54ffc1b4a270
[]
no_license
MarioProjects/bengali_graphemes
84b5df145774b26c437c832a13abd0a5631c0c30
58727c70cbe29de2c469c14095aba4750772de39
refs/heads/master
2022-04-11T07:06:27.720595
2020-03-20T09:22:43
2020-03-20T09:22:43
234,417,484
0
0
null
null
null
null
UTF-8
Python
false
false
5,265
py
train_arguments.py
import argparse class SmartFormatter(argparse.HelpFormatter): def _split_lines(self, text, width): if text.startswith('R|'): return text[2:].splitlines() # this is the RawTextHelpFormatter._split_lines return argparse.HelpFormatter._split_lines(self, text, width) parser = ar...
53a50b86005cc9ab3425594b69eb82f5f91713ec
f1544ce40f93def4d55fd6b3b76fbf9a30932cdc
/foo.py
20e63d6a6a3cbf4ee12bbf9974b36857160adcfa
[]
no_license
lmwbxxx/rec
59a3325db3c5a05f938cb3536885f3839bdcaade
fe63ae3f07763c82b4a74eb8c813d4bc427705f6
refs/heads/master
2020-03-14T21:19:48.245047
2018-05-16T10:06:43
2018-05-16T10:06:43
131,793,990
0
0
null
null
null
null
UTF-8
Python
false
false
1,536
py
foo.py
from util import * user_anchor_pair={} anchors = set(load_pickle_file(path='../huajiao/anchor_sample')) users = set(load_pickle_file(path='../huajiao/user_sample')) def load_daily(filename): f = open(filename, 'r') lines = f.readlines() for line in lines: attr = line.strip('\n').split() ...
c4b29a4425d1decaae621c06092ced57c7416dad
a628bb7d6c0ba279a59e0b441176043205062694
/tests/test_is_palindrome.py
2a772f25e8fe8bcc310a62f6d4a74fe2d98625c4
[]
no_license
SubhamSubhasisPatra/Data-Structure-Interview-Probelm-Solution-in-Python
9b34ed2128e81338f2594821ea20784a6ced5d9f
a28c3850e446e6dfe4e12ea3efcea7b356b20b77
refs/heads/master
2023-09-01T11:54:59.680426
2023-08-29T16:03:02
2023-08-29T16:03:02
261,970,244
0
0
null
null
null
null
UTF-8
Python
false
false
425
py
test_is_palindrome.py
from src.recursion.is_palindrome import is_palindrome from unittest import TestCase class TestRecursion(TestCase): def test_is_palindrome(self): arr1 = [1, 2, 3, 2, 1] arr2 = [1, 2, 3, 4, 5] arr3 = [1, 2, 3, 3, 2, 1] self.assertTrue(is_palindrome(arr1, 0, len(arr1))) self.a...
2f7a96745089876a38729d6490eb1f56a60593b8
5a1edf8ec4e876c7068a38f8c841bce87309e5f1
/logscaling.py
24681cc37a8ec1ce8bb3e0926d045540c593207b
[]
no_license
akumar01/uoicorr_run
041a1e24b8446a7d688ca6a29fdadc56e5904d7a
d59550abd55789d9a11468807e79d1385bddc671
refs/heads/master
2021-06-23T12:54:39.130019
2019-12-26T05:25:42
2019-12-26T05:25:42
209,154,747
0
0
null
null
null
null
UTF-8
Python
false
false
1,608
py
logscaling.py
import sys, os import numpy as np import matplotlib.pyplot as plt import time import pdb import argparse import itertools import pickle from mpi4py import MPI from dchisq import DChiSq from mpi_utils.ndarray import Gatherv_rows # No scaling # Provide n, S, and the savepath through command line arguments ###### Comm...
46a1f8fbb7099b40c169b1cbbe48f7ef50818291
82ae7fefea6d9aab40cc8558cc4c5e6efa274fb0
/OneTimePad-Tp/permutacao.py
5a09d91b0287e745e891b50e1c4615f382565788
[]
no_license
GustavoSilvaFerreira/Python
bcc06fcf5db87294ddf07aedf2be3c883482b80e
d432ec1fb4f30ac3d5e4768fc2d6f26e46647072
refs/heads/master
2021-01-01T04:39:31.682959
2016-04-13T02:57:08
2016-04-13T02:57:08
56,113,612
0
0
null
null
null
null
UTF-8
Python
false
false
813
py
permutacao.py
c11="604d75392535262d336453554a10400710151a2c233729363733011409142f5f41483c477f2d2c2e6a202024212c382f2d41044d0d232c0827685a213a253c69262a21252c392535693a207732303a2b3069253d2334693a2a6939222b3e3d2f463f702f652a3f27212f21643f203128212c752346537b".decode('hex') caracter=")#UIPWJD803uienCEHF_-h4*$(j9ABGKLMNOQRSTXYZabcdfg...
7590325a4e173ae3029ff9a345517e303d380f23
19c5949f04ae14ba988697871cf3d54f8f868d84
/backend_project/backend/chefs/migrations/0011_create_basic_user.py
998866772cbe31df052df92fae7757a5bedf38d6
[]
no_license
khoaanh2212/nextChef
01e514826a2eea8c33d97caebd03e603cc6e7788
70f38f8c3f1bca2050e077b4430385ffc1477ebb
refs/heads/master
2021-01-11T08:22:32.304992
2016-10-28T04:31:58
2016-10-28T04:32:10
72,173,303
0
0
null
null
null
null
UTF-8
Python
false
false
2,108
py
0011_create_basic_user.py
# -*- coding: utf-8 -*- from south.v2 import DataMigration from chefs.models import Chefs import os class Migration(DataMigration): def forwards(self, orm): ##create dev super user ## devSuperUser = self.checkUserExists('developer-1@apiumtech.com') if not devSuperUser: devSupe...
a6a763969a8c8eef956b5362b9b006b8e5778834
10cef19d1b8bfd7330ee3c0797c07edf476b3d77
/app.py
5a3f78c617d0f297f8a21b97d81f397a0e6c1bf9
[]
no_license
replystudents/Flask_Muehle
02ebf3fb0298b820964aed171fbad193982d924f
424bf52c2a4c4b0faae64a763b1949adaa9e4498
refs/heads/main
2023-06-06T02:41:02.159888
2021-06-28T08:57:56
2021-06-28T08:57:56
369,182,608
0
0
null
null
null
null
UTF-8
Python
false
false
11,836
py
app.py
""" Author: Gideon Weber & Lorenz Adomat """ from flask import Flask, render_template, request, session, redirect from flask_socketio import SocketIO, send, emit, join_room, leave_room from controller.DatabaseModels import db, User, getLeaderboard, getFinishedUserGames, getUserStatistics from controller.GameHandler im...
ee8aa4707ebc2d02c62c3c2ae6613ec3e6cfce98
41f541c2addec3409e766733ba6f1285a88f7837
/ecg_medical_research/data_reader/pytorch_dataset.py
a7dc5df8d7a027ff79637c36600a0b67a552053e
[]
no_license
tomerGolany/ecg_medical_research
07bc4f4a8231c621019cc32bff6fa8f46a7c5e4d
b6a9165bcfd7ecb0505096c32a9868ca449516d9
refs/heads/master
2023-01-02T10:58:43.113315
2020-11-01T08:54:35
2020-11-01T08:54:35
256,435,874
2
1
null
null
null
null
UTF-8
Python
false
false
4,648
py
pytorch_dataset.py
"""Parse the excel file and create a pytorch dataset.""" import os import numpy as np import io from typing import Optional import pandas as pd import torch from torch.utils.data import Dataset from ecg_medical_research.data_reader import patient import logging import torch.nn.functional as F def collate_fn_pad(batch...
c0a5b7b62834aed117ea103e297041a95d2543a0
cad8e5ab5fb8f314946b92c82e93766039150d45
/pyit600/const.py
7064c507a077aa37f02f0c16e6753205b544cdbd
[ "MIT" ]
permissive
beosro/pyit600
cc55b1c888b4e1b4b0c261c5cdd7c4b2c1ca2d4b
e9603936b6ad2265289e23efbbe6d32e9b42d0c8
refs/heads/master
2022-11-07T10:22:57.330634
2020-05-05T22:44:04
2020-05-05T22:44:04
null
0
0
null
null
null
null
UTF-8
Python
false
false
452
py
const.py
"""Constants for the Salus iT600 smart devices.""" # Temperature units TEMP_CELSIUS = "°C" # Supported features SUPPORT_TARGET_TEMPERATURE = 1 SUPPORT_PRESET_MODE = 16 # HVAC modes HVAC_MODE_OFF = "off" HVAC_MODE_HEAT = "heat" # HVAC states CURRENT_HVAC_OFF = "off" CURRENT_HVAC_HEAT = "heating" CURRENT_HVAC_IDLE = ...
2f8fb6fab0b4a2d688e59349b338a9ccddb236e8
a6c6335111bcd7263ee06c7b05c46dccc0174301
/scripts/utils.py
0536626cc5bd2a3159b54e797a2759e224309d45
[]
no_license
zhanymkanov/hyperSkill
9cee095ba02dd8d977cfca868ec022485cfb6894
7a6ca5cf5f22de175d14e9625dcc4d1101cd03f3
refs/heads/master
2023-05-08T16:02:12.230444
2021-05-18T10:27:41
2021-05-18T10:27:41
362,481,050
0
0
null
null
null
null
UTF-8
Python
false
false
924
py
utils.py
import datetime import random import string import pytz IS_REGISTERED_CHANCE = 0.4 STEPIK_FOUNDED_DATE = datetime.date(2013, 9, 1) STEPIK_FOUNDED_DATETIME = datetime.datetime(2013, 9, 1, tzinfo=pytz.UTC) MAX_RANDOM_REG_DAYS = 365 * 7 def random_text(length: int = 16) -> str: return "".join(random.choices(strin...
6bd9111a9e5cd12105a043c48993926b69ebc056
dca48a105eb467c1c92bfe7e49c0f0666ff7d5a3
/python/stocks/checkstockprice.py
b75436de0c7e96539f5c3dcf11dfa3e955e6c640
[]
no_license
hbqdev/code
a97233456ad75df5552a003698cfcb99c6f7836d
7012d203aaf8fdc753491603f9a35dc69ca3286a
refs/heads/master
2023-06-25T13:06:01.851720
2023-06-13T00:11:54
2023-06-13T00:11:54
184,701,167
0
0
null
2019-05-03T05:02:08
2019-05-03T05:02:08
null
UTF-8
Python
false
false
4,760
py
checkstockprice.py
import json import matplotlib.pyplot as plt import requests from datetime import datetime, timedelta # Define the API endpoint endpoint = "https://www.alphavantage.co/query" # Define the API key api_key = "S5U2C83F3400JXNG" def get_data(time_period, ticker): # Set the function and interval to get the stock data...
94bbc4549c30c8b727749ae9aad199dcb9408060
10c0202ad9c42d1442a869f58971f30f8ecc24b9
/src/groups/views.py
4d59fc0cb2d237847177f26b99b2372b9046e4b0
[]
no_license
charitymarani/AdminPortal
02fd140825bc767ba0b6381f476e2db298e25e48
4a4e123f70689bfed2ffc539799de381bbd25f15
refs/heads/master
2022-06-22T02:34:32.030978
2020-02-17T00:16:31
2020-02-17T00:16:31
240,554,982
0
0
null
2022-05-25T04:09:25
2020-02-14T16:43:59
Python
UTF-8
Python
false
false
3,743
py
views.py
from django.shortcuts import render from rest_framework.generics import ( RetrieveUpdateDestroyAPIView, ListCreateAPIView) from rest_framework.response import Response from rest_framework import status, generics from .serializers import GroupSerializer from django.contrib.auth.models import Permission,Group from dj...