blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29afa6286ed62ea50b6c5c7058b06d924626062a | f5c6c0a7036fae1878f17c1262469e8df0387391 | /polls/views.py | d2c56a57f5ab8689b91882cdac841cf8281c12bd | [] | no_license | Ilyabuk/django1 | 1733c6f469e5b7a7340b2ecb04df1f16c8c2d972 | 1bbf5bfc32969d5f004b431a3533a5a8337b6b2d | refs/heads/master | 2021-09-02T04:40:23.579808 | 2017-12-30T11:52:17 | 2017-12-30T11:52:17 | 115,792,905 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse("HttpResponse") | [
"ilyabuk@gmail.com"
] | ilyabuk@gmail.com |
5a20c1124e3ec671a9fe3d3225fe84106e044deb | ef339cfc51184ecd95b92e198994f54ef3001656 | /section2/beautifulsoup/beautifulsoup1.py | 69e7338d6b2e521cfd9d35d785aecf233a9be875 | [] | no_license | akmris00/pythoncrowring | a03385e92fb276d3a87a703da9017de1e3ce0db1 | 6b676debce3acab9856f0b7411942218b11583e7 | refs/heads/master | 2020-05-05T13:21:09.069117 | 2019-04-29T02:18:03 | 2019-04-29T02:18:03 | 180,073,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | from bs4 import BeautifulSoup
import sys
import io
sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding = 'utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding = 'utf-8')
html = """
<html><body>
<ul>
<li><a href="http://www.naver.com">naver</a></li>
<li><a href="http://www.da... | [
"31494886+akmris00@users.noreply.github.com"
] | 31494886+akmris00@users.noreply.github.com |
8c63ae9a0ae5a2f7dad10eff114d3314b1fefcc5 | 452e027d23fa443c0ec54bc9dd9ef50dbe7820b9 | /grader/configfile.py | 220d3677e6e49282ab5504a78758acc8f392ee8a | [] | no_license | jakobj/grader | af3859b35a3e569d4dd841097d6a64e8162a5431 | c69b9a6d638cc4fe78986d7a0ec15bed512b98f6 | refs/heads/master | 2021-01-21T03:31:06.952052 | 2015-05-05T08:15:06 | 2015-05-05T08:15:06 | 35,836,901 | 0 | 0 | null | 2015-05-18T19:02:41 | 2015-05-18T19:02:41 | null | UTF-8 | Python | false | false | 2,341 | py | import configparser
import operator
import collections
class _Section:
def __init__(self, configparser, section, type=str):
self.cp = configparser
self.section = section
self.type = type
def __getitem__(self, item):
try:
value = self.cp.get(self.section, item)
... | [
"zbyszek@in.waw.pl"
] | zbyszek@in.waw.pl |
cff6e57b065a2b0a1025d8fa362771af3f2d5a3f | 316e094af6a43cf1d1a50dc741583e166516fda1 | /lappd/spectra/pickle_data_lcwp_single_dir.py | ec92fd75796933aec04a7e564488a9e05428e9e6 | [
"MIT"
] | permissive | jbenito3/hyperk | 650fb9a12418b2bcdfeada076c98c8a748f12f00 | b75ca789d51b239d1d97221b024782c927aaa09a | refs/heads/master | 2020-05-21T02:28:49.065421 | 2017-02-22T17:00:45 | 2017-02-22T17:00:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,381 | py | #!/usr/bin/env ipython
import pandas as pd
import sys
import os
from scipy import signal
# Defaults come from TekTronix 'scope
def filter_signal(data, nSamples = 1000, frameSize = 40e-9):
'''Butterworth filter of signal.'''
fs = float(nSamples)/frameSize # sample rate (1000 samples in 40ns)
nyq = fs*0.5 # ... | [
"greig.cowan@gmail.com"
] | greig.cowan@gmail.com |
8b2ab66af68481455a92b01c01544ecda55282c0 | a8d4f5601272a7f3ced564ac822745ca460e77d8 | /learn_prophet/outlier.py | 13adf79c7421a190ce97e45f0dd70ca070938919 | [] | no_license | 631068264/learn_science | cc2962e54e61e7d2d5a338b19c2046aa92743edf | 6bf33da5d40b1d8d72bb63d4a7b11031dd74329b | refs/heads/master | 2022-10-08T18:14:08.281828 | 2022-09-24T13:00:53 | 2022-09-24T13:00:53 | 82,647,091 | 0 | 0 | null | 2022-09-09T17:58:48 | 2017-02-21T06:55:43 | Python | UTF-8 | Python | false | false | 865 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author = 'wyx'
@time = 2017/6/22 11:20
@annotation = ''
"""
import numpy as np
import pandas as pd
from fbprophet import Prophet
from matplotlib import pyplot as plot
df = pd.read_csv('example_wp_R_outliers1.csv')
df['y'] = np.log(df['y'])
print df.head()
print df.tai... | [
"l631068264@gmail.com"
] | l631068264@gmail.com |
44e421c442c37ca6f99ea92a51ed39af07a99133 | ee7ca0fed1620c3426fdfd22e5a82bba2a515983 | /dsn_product_category_etc/__openerp__.py | 1f8392a509a4099e8874d1954698391fad0dd020 | [] | no_license | disna-sistemas/odoo | 318d0e38d9b43bea56978fe85fc72850d597f033 | 0826091462cc10c9edc3cc29ea59c417f8e66c33 | refs/heads/8.0 | 2022-03-08T19:01:21.162717 | 2022-02-15T13:06:26 | 2022-02-15T13:06:26 | 99,210,381 | 0 | 5 | null | 2019-07-24T08:49:58 | 2017-08-03T08:36:55 | Python | UTF-8 | Python | false | false | 1,560 | py | ##########################################################################
# Copyright (C) 2014 Victor Martin #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms... | [
"sistemas@disna.com"
] | sistemas@disna.com |
2915e90d9a68a5eec8ab00f6f90ee83d406d9ed0 | a5c29f0985f0a6bf64131928af0d732e5e3960a6 | /Map Matching/route_matching_quadtree.py | 36ade6394dfa14fe366bb2b90b6c75a17cb20cca | [] | no_license | JackSmith156403/KDD2021_guizu | 6c4379824fad1f151d4998a257d6f89e9c09e0a1 | bb6391cd65d013fcf13d0162fd566b599231b89a | refs/heads/main | 2023-07-26T17:12:16.007574 | 2021-09-12T11:49:05 | 2021-09-12T11:49:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,494 | py | from viterbi import run_viterbi
import numpy as np
import networkx as nx
import csv
import psycopg2
from geopy.distance import great_circle
from utils import reverse_coordinate
import osmgraph
import geog
import time
import sys
import math
radius = 50
states = 10
sigma = 5
dataset = "urecaTestData.csv"
output_matched... | [
"caochuntu@gmail.com"
] | caochuntu@gmail.com |
9599100cda07d29f3eaeb8432bfe6710bb9b354b | a74b980fd95d5d810315f181449fc9d1710e6923 | /savecode/threeyears/idownclient/scan/plugin/zgrab2/zgrab2scanner/zgrab2scannerhttp.py | 5962809ec41cc9835857020f7ecd4321d0f27b59 | [
"Apache-2.0"
] | permissive | cbbbbbbbb/sspywork | b70f5539203b47b21eec2f0514ddca155affc2b8 | 8f05a6b91fc205960edd57f9076facec04f49a1a | refs/heads/master | 2023-03-22T19:45:13.024076 | 2021-03-08T01:24:21 | 2021-03-08T01:24:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,009 | py | """zgrab2 scanner http"""
# -*- coding:utf-8 -*-
import json
import signal
import os
import traceback
import uuid
import psutil
from datacontract.iscandataset.iscantask import IscanTask
from .zgrab2scannerbase import Zgrab2ScannerBase
from ..zgrab2parser import Zgrab2ParserHttp, Zgrab2ParserTls
from .....clientdataf... | [
"shiyuegege@qq.com"
] | shiyuegege@qq.com |
641ddc30ca583d7d31b730a032de503e692c58cd | e580a8ccad49c20a6a8ca924369a7ed7c7b85274 | /nbgrader/preprocessors/base.py | 5fb73f68151a0649c54a0fc66fc10a07d3fe33bd | [
"BSD-3-Clause"
] | permissive | jdfreder/nbgrader | b06cec1ca7dc7633a36ee18859c9509fafbf63d5 | a6773f27ad2be44505071bbfbfacbbbffe1b0d0d | refs/heads/master | 2021-01-18T11:53:18.017422 | 2015-04-09T22:17:56 | 2015-04-09T22:17:56 | 32,471,870 | 1 | 0 | null | 2015-03-25T16:08:14 | 2015-03-18T16:53:33 | Python | UTF-8 | Python | false | false | 376 | py | from IPython.nbconvert.preprocessors import Preprocessor
from IPython.utils.traitlets import List, Unicode, Bool
class NbGraderPreprocessor(Preprocessor):
default_language = Unicode('ipython')
display_data_priority = List(['text/html', 'application/pdf', 'text/latex', 'image/svg+xml', 'image/png', 'image/jpeg... | [
"jhamrick@berkeley.edu"
] | jhamrick@berkeley.edu |
ca3c12f88f54fc83cd8fa7acc26917a0dd72e788 | 23768b6975dd0d34d732684d482f51ff24281288 | /trial/migrations/0006_auto_20210929_1133.py | ea1d61252675f9cadb92a05f84ee91137bf43dae | [] | no_license | LintaPaul/2021_IBM_Code_Challenge_Surround360 | 65b3bac21c068a557a1e5895780da69bcab3f638 | 11c5aaa3c27cadd63a4efb6b2073bd50dd4a9ac2 | refs/heads/main | 2023-08-14T16:26:53.582652 | 2021-10-01T07:06:46 | 2021-10-01T07:06:46 | 410,780,902 | 0 | 4 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | # Generated by Django 3.2.7 on 2021-09-29 06:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('trial', '0005_tourist'),
]
operations = [
migrations.RemoveField(
model_name='public',
name='id',
),
... | [
"lintapaultkr1107@gmail.com"
] | lintapaultkr1107@gmail.com |
defaf6b765da9866005d5019a16256c7441117ed | ee263bbfcff49ef84e0e8eaa840be36406edfedf | /api/views.py | 5f6c1ecd5e15bfb164b6f69db9a181508d195903 | [] | no_license | JaySiu/Investment-Information-Feed-System | b8764e2f64c8e1f3695ffc90af7ec06979cb0111 | fceeacea717511240745a7dc9d0221dc5e5aa3ee | refs/heads/master | 2020-03-23T14:36:29.911624 | 2019-07-15T03:58:10 | 2019-07-15T03:58:10 | 141,687,290 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 353 | py | from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework.response import Response
from .models import TA
from .serializers import TASerializer
class TAPlots(APIView):
def get(self):
plots = TA.objects.all()
serializer = TASerializer(plots, many=True)
... | [
"jay.siu@ifshk.com"
] | jay.siu@ifshk.com |
65ac40b9d3a1462ad37421ea9814fe2e10e98aee | 7a2782ace9c2f4d7c87c1c40049873db491a0600 | /FFX_Logs.py | f15f6e960076f9d9840e71add80daf3041f487e1 | [] | no_license | Inverted/FFX_TAS_Python | 44793f0cbd412adf3b0c033d739622a36ca3596e | d31280206eed045dc33dc0cc674dc8f44678466b | refs/heads/main | 2023-08-08T04:44:35.759031 | 2021-09-19T16:12:05 | 2021-09-19T16:12:05 | 408,278,174 | 0 | 0 | null | 2021-09-20T01:29:11 | 2021-09-20T01:29:10 | null | UTF-8 | Python | false | false | 2,731 | py | import datetime
import time
game = "FFX_"
ext = ".txt"
fileName = "none"
fileStats = "none"
filePlot = "none"
def writeLog(message):
global logFile
global fileName
logFile = open(fileName, "a")
logFile.write(message)
logFile.write("\n")
logFile.close()
def nextFile():
... | [
"noreply@github.com"
] | Inverted.noreply@github.com |
174b11fbdd2080049e4d7ea3c1f40dea127a2cd8 | 54bf243bd670576a53a3afb6c8b70e1cfa55d943 | /ScotlandPYard/spyengine/humanmrx.py | ec797a75899c8cffcfc716893aec0bcc73f88a37 | [
"CC-BY-3.0",
"MIT"
] | permissive | AhmadZakaria/ScotlandPYard | 20d13114815f2cc50e1525d6b5d6a4d1ee788c19 | 131e4b5c884319cb01a0c666dd54519986e515fa | refs/heads/master | 2023-08-10T17:06:56.013082 | 2020-11-01T13:47:48 | 2020-11-01T13:47:48 | 113,901,930 | 7 | 3 | MIT | 2023-09-01T15:01:37 | 2017-12-11T19:53:06 | Python | UTF-8 | Python | false | false | 151 | py | from .abstractmrx import AbstractMrX
class HumanMrX(AbstractMrX):
def play_next(self):
"""TODO: insert human prompt here"""
pass
| [
"ahmadz1991@gmail.com"
] | ahmadz1991@gmail.com |
48e60a05f222102e719311be1a90a1be88b93574 | 78b82749360a90f74f6af2f94f9976d39d094663 | /homeassistant/components/bond/config_flow.py | 5996cd03baed1a2ecfbc573854ff27e9568e8d2f | [
"Apache-2.0"
] | permissive | klaashoekstra94/core | 0ef2d44a6dce5a93000c3085e042fa7b81e2e93e | 47b6755177b47b721cc077b4b182f2a2a491a785 | refs/heads/dev | 2023-02-13T21:25:38.068552 | 2021-11-10T18:40:49 | 2021-11-10T18:40:49 | 248,250,407 | 2 | 0 | Apache-2.0 | 2021-04-06T10:33:09 | 2020-03-18T14:14:00 | Python | UTF-8 | Python | false | false | 7,170 | py | """Config flow for Bond integration."""
from __future__ import annotations
from http import HTTPStatus
import logging
from typing import Any
from aiohttp import ClientConnectionError, ClientResponseError
from bond_api import Bond
import voluptuous as vol
from homeassistant import config_entries, exceptions
from home... | [
"noreply@github.com"
] | klaashoekstra94.noreply@github.com |
cdc4ca08ae44286d2d239b72735acddccf8aac07 | 350db570521d3fc43f07df645addb9d6e648c17e | /0338_Counting_Bits/solution_test.py | 7724ba269c5cf844f2d1619dfea305095cf3e247 | [] | no_license | benjaminhuanghuang/ben-leetcode | 2efcc9185459a1dd881c6e2ded96c42c5715560a | a2cd0dc5e098080df87c4fb57d16877d21ca47a3 | refs/heads/master | 2022-12-10T02:30:06.744566 | 2022-11-27T04:06:52 | 2022-11-27T04:06:52 | 236,252,145 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 360 | py |
'''
338. Counting Bits
Level: Medium
https://leetcode.com/problems/counting-bits
'''
import unittest
class TestSum(unittest.TestCase):
def test_sum(self):
self.assertEqual(sum([1, 2, 3]), 6, "Should be 6")
def test_sum_tuple(self):
self.assertEqual(sum((1, 2, 2)), 6, "Should be 6")
if __n... | [
"bhuang@rms.com"
] | bhuang@rms.com |
94cc5cee17c3a943c6200503898a5fee24c4b210 | 35e58fd370d26aa3b13a24e94f7f296a5a72e729 | /nfl_web_scraper_v1.py | 859dc797751387c39271794ad5b5551ddb3c6ec7 | [] | no_license | kanerhee/miscellaneous-code | 099ee09445238a306820c0928d62b89ccf3ce314 | b830122ffbf6509c7d478a69e7cc5042cde692c7 | refs/heads/main | 2023-05-07T11:43:00.367110 | 2021-05-26T03:03:31 | 2021-05-26T03:03:31 | 370,578,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,366 | py | import pandas as pd
import numpy as np
import time
import datetime
import html5lib
import requests
from bs4 import BeautifulSoup, SoupStrainer
import httplib2
pd.set_option('display.max_rows', None)
pd.set_option('display.max_columns', None)
pd.set_option('display.width', None)
pd.set_option('display.max_colwidth', -1... | [
"kanerhee@gmail.com"
] | kanerhee@gmail.com |
3c797fe5b44b6c379bf7b9f24fb25eccdde31f0a | d700b9ad1e0b7225871b65ce0dafb27fb408c4bc | /students/k3342/kursoviks/Salnikova_Nadezhda/alpinism-server/Lr3/settings.py | a8a620419b2f15386ce6df96cc1499b273f97ca9 | [
"MIT"
] | permissive | TonikX/ITMO_ICT_WebProgramming_2020 | a8c573ed467fdf99327777fb3f3bfeee5714667b | ba566c1b3ab04585665c69860b713741906935a0 | refs/heads/master | 2023-01-11T22:10:17.003838 | 2020-10-22T11:22:03 | 2020-10-22T11:22:03 | 248,549,610 | 10 | 71 | MIT | 2023-01-28T14:04:21 | 2020-03-19T16:18:55 | Python | UTF-8 | Python | false | false | 4,929 | py | """
Django settings for Lr3 project.
Generated by 'django-admin startproject' using Django 3.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# Bui... | [
"uninadia@yandex.ru"
] | uninadia@yandex.ru |
027e34753a5633d392d90e6a3351c2c1ee646140 | 0fd66a4a28bdc7d967ec18d90eca5cc54b5cbdd4 | /middleware/legato/library/plugins/scripts/generator/fontsource.py | 85e614f4f6ad2d71a1b35a15aabe28e38d391989 | [
"LicenseRef-scancode-unknown-license-reference",
"ISC",
"LicenseRef-scancode-public-domain"
] | permissive | fb321/gfx | b865539ea6acd9c99d11a3968424ae03b5dea438 | e59a8d65ef77d4b017fdc523305d4d29a066d92a | refs/heads/master | 2020-06-27T14:20:24.209933 | 2019-07-31T22:01:05 | 2019-07-31T22:01:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,638 | py | def generateFontSourceFile(font):
name = font.getName()
antialias = font.getAntialias()
height = font.getAdjustedHeight()
baseline = font.getBaseline()
style = ""
if antialias == True:
style += "Antialias"
if len(style) == 0:
style = "Plain"
if style.endswith(",") == True:
styl... | [
"http://support.microchip.com"
] | http://support.microchip.com |
14076432efe1e114fe9c26e59250ad20b2cd0070 | 2086fb4adee17692b41a5431fcab663bed407028 | /mnist/quantize_icml.py | ce5592c67bc8cd6e972b07d697de0c50726a9577 | [] | no_license | charbel-sakr/Precision-Analysis-of-Neural-Networks | 482bc6e959aeee806d2e76a24a5506b214aa4a1c | 18eb7d3f19ebf6569e4d4082a0f24a21e6ea232e | refs/heads/master | 2021-05-06T12:10:14.118298 | 2018-03-27T00:06:23 | 2018-03-27T00:06:23 | 113,064,121 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,325 | py | import theano
import theano.tensor as T
import numpy as np
import layers
import load_mnist
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
x_test, t_test, x_valid, t_valid, x_train, t_train = load_mnist.load()
x_train = np.concatenate((x_train,x_valid),axis=0)
t_train = np.concatenate((t_train,t... | [
"noreply@github.com"
] | charbel-sakr.noreply@github.com |
686a6b61c56e2ebc9b0eb54718bd8ea9f10202ce | 6571ba31ee91c1e24073231a1625f2a6fe2d426f | /mysite/settings.py | 5d0ee942a0904886f2646a95579995da063cd816 | [] | no_license | alyasamba/django-journal | 41376efbcbcd6b148af7783c6d83289aa8bd6131 | 00447d88102e5c546dd96ee5d8cd1fcc524635fb | refs/heads/master | 2021-06-08T14:06:16.125870 | 2016-12-14T17:01:22 | 2016-12-14T17:01:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,648 | py | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 1.10.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
... | [
"kaushikskalmady@gmail.com"
] | kaushikskalmady@gmail.com |
544cf17289d4bea37ac89d89533a462b179ec1c5 | e15f7d0a672950b90baab0eacf6b476c9bf551ff | /sqlite_database/clientTable2_db.py | 4303dd7420ab2f4f6e0a27b48f7572d4cc243b3b | [] | no_license | oomintrixx/EC500-hackthon | b75d46c9984411e49664bc1878ae9c5f8b7b6897 | 18eec9b138d86f7e77363e37c7afed1e7df21942 | refs/heads/main | 2023-05-01T00:26:30.646119 | 2021-05-05T21:24:25 | 2021-05-05T21:24:25 | 354,972,784 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,330 | py | import sqlite3
# table two: table used for store friends
# primary ID, username(string), ip address(string), port(int), public key(string)
def client_database2():
conn = sqlite3.connect('client_table2.db') #Opens Connection to SQLite database file.
conn.cursor().execute('''CREATE TABLE client_table2
... | [
"p.nuwapa@gmail.com"
] | p.nuwapa@gmail.com |
f570a5c1b0ce18a9e2fa4a56a7c722c82e83f31a | 67d7d29a9d1ae9de131f8c6307b7401d69e7318f | /miscs/restore_dynamic_range.py | fea2bf4b3b736adf3deda6c9c67a04ca0ec7b70f | [] | no_license | YuelongWu/xradia_scripts | 966e6e09a97fb13ad2f0fbb5accb3e89ccd81bf7 | 10b192d79d90265797539600c96b72c299867930 | refs/heads/master | 2023-08-06T18:58:41.908799 | 2021-09-16T21:18:07 | 2021-09-16T21:18:07 | 357,687,575 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,307 | py | import os
import SimpleITK as sitk
import numpy as np
import h5py
import glob
rootpath = '/n/boslfs02/LABS/lichtman_lab/uct/P0_20210223/P0_02232'
ext = '.nrrd'
moveonly = True
if not moveonly:
max_file = os.path.join(rootpath, 'workdir', 'blk_max.h5')
max_scl = 0.60
with h5py.File(max_file, mode='r') as f... | [
"yuelongwu@fas.harvard.edu"
] | yuelongwu@fas.harvard.edu |
fdea7829b90e545db6411ba84cdd2f00eaeccee9 | bb49872151e598a78116fa0a5faaa34de6ddafa8 | /functions/review-post.py | 4b7209348c944807b3a7e51a8441e86061a27cf7 | [
"Apache-2.0"
] | permissive | ChristelleJolly/agfzb-CloudAppDevelopment_Capstone | 1c1f5654ce26feb0d53224a031662fe24c460920 | e0f7352fbc1b19aab3d14b436cd6311dfbde3cbb | refs/heads/master | 2023-08-29T14:25:14.145562 | 2021-10-25T13:56:51 | 2021-10-25T13:56:51 | 417,084,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,458 | py | #
#
# main() will be run when you invoke this action
#
# @param Cloud Functions actions accept a single parameter, which must be a JSON object.
#
# @return The output of this action, which must be a JSON object.
#
#
from cloudant.client import Cloudant
from cloudant.error import CloudantException
from cloudant.result i... | [
"christelle.jolly@gmail.com"
] | christelle.jolly@gmail.com |
dc580277f4275a016c1fbbc518488290b5413fe6 | bb21aba4c5e445c00958aca1840338a300d93a0e | /blog/admin.py | af598b1dfa7f95bd6cf9a3169b7d5e81b79e5b27 | [] | no_license | mahdiazadipython/django-jajali-authenticated-by-github | 5ec90943046a90c78602dd52a0d36bc6b92bccbf | f66cf61949883128f5921fd1b9da0684229cd2d0 | refs/heads/master | 2023-02-05T08:05:58.090703 | 2020-12-20T21:41:19 | 2020-12-20T21:41:19 | 323,170,509 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py | from django.contrib import admin
from .models import Post ,Comment
class PostAdmin(admin.ModelAdmin):
list_display = ('title', "author", 'publish')
admin.site.register(Post, PostAdmin)
admin.site.register(Comment) | [
"mahdi@gmail.com"
] | mahdi@gmail.com |
84223190f9fa6ce27b1641ee53ef42b67d36f770 | 6bcb44e305bb89a704555ce92ff4281071b4a248 | /main.py | 00b65ad70bf564ae5bd1124524a6c6b07d3ae2c3 | [] | no_license | rFriso/Geometry_and_mesh | b856dfb81d0fd76d36317d3b6203a2b6286502ac | 35740902bab319efaa8f1d6f3ca949d0f1957da4 | refs/heads/main | 2023-02-20T10:39:22.390131 | 2021-01-20T14:31:51 | 2021-01-20T14:31:51 | 331,297,336 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,463 | py | #!/usr/bin/env python
## Description: airfoil geometry and mesh generator code based on salome library
import CST ## Parameterisation technique
## Geometry generation inputs
wl = [-0.17, 0.5, 0.5, 1.3, 1.4] ## CST weights of lower surface
wu = [0.8, 1.8, 2, 3.3, 2.9] ## CST weights of upper surface
dz = 0.08 ... | [
"noreply@github.com"
] | rFriso.noreply@github.com |
d597cb77ad0b3c478898bcf937ccdebef106cd20 | 168c6412acb7cdf144e93ce73bcdc6c4d8618444 | /lidarnet_fei/simladar_eval.py | 8d2ddd5cd0256f0b6e9befde00d6032132f8b0fa | [] | no_license | ZhenghaoFei/camera_simulate_lidar | c0e2cfa1a664401450e5705b6b5d9b22f0f62040 | b30391386cf4b0b7580dd4b5f5b961693c543fac | refs/heads/master | 2021-01-11T03:54:46.198327 | 2017-01-15T20:16:13 | 2017-01-15T20:16:13 | 71,275,543 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,296 | py | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"penchen@ucdavis.edu"
] | penchen@ucdavis.edu |
14697cc4414a8387a1626f00a4cb76d3282d340a | bbdf1680df26a74fe5a906715c6fc27055d0629d | /Gaurab/file.py | 2bc0d6fc281cb81fe4255ae0ed9e208949bc01ce | [] | no_license | LMS-Learnvista/LB_DSC_SEPT_WKND_20 | 49d85069db6e550331c8eee0bfba400144a04c50 | c7d05e892dbedcd70d47aee82572b62cd2de1cb9 | refs/heads/master | 2023-04-01T22:40:02.709136 | 2020-10-03T10:22:53 | 2020-10-03T10:22:53 | 298,772,998 | 1 | 81 | null | 2022-09-21T23:25:48 | 2020-09-26T08:42:36 | Python | UTF-8 | Python | false | false | 143 | py | a = 7
p = "PYTHON"
for x in range(a):
for i in range(x):
print(" ",p[i], end=" ")
print(" ")
print("\r\n\tHello World!!!\r\n")
| [
"gaurabdutta8@gmail.com"
] | gaurabdutta8@gmail.com |
76931673e3db556c89f0c03fa5617acd77989b43 | 03acfdb33a5a5b256b2e9b6c5f019c6150fc5765 | /productivityProject/activities/urls.py | 74cbe6bd28d53623fce9f54e83904dee29044116 | [] | no_license | argoebel/ProductivityApp | 251a9c6c2f0c3c124d41c39adccd822637607a9e | dcbc3db838e653eda2c6042624bd89c138e756ea | refs/heads/master | 2022-12-10T18:26:48.441363 | 2020-08-25T22:03:24 | 2020-08-25T22:03:24 | 285,477,562 | 0 | 0 | null | 2020-08-25T22:03:25 | 2020-08-06T04:58:26 | JavaScript | UTF-8 | Python | false | false | 512 | py | from rest_framework import routers
from django.urls import path
from .api import TaskAPIView, CreateTaskAPIView, CreateActivityAPIView, ActivityAPIView
urlpatterns = [
path('api/activities',
ActivityAPIView.as_view(), name='get_activities'),
path('api/activities/create',
CreateActivityAPIView... | [
"argoebel@ualberta.ca"
] | argoebel@ualberta.ca |
3731094ab99923201e31d46122ad87ceee945bfb | 0364bd3bfa82153b5d9e5b92894936390a1972ae | /inqoire/connection/admin.py | a640d1d10332b5e1fddd582bf9658971e0e1ea77 | [] | no_license | kraft99/inQoire | 8e9a05d8f033c302380ab7dceba48242f2fe57f3 | 5a88ce2e21cb45ec7b7412010157c716c864d825 | refs/heads/master | 2020-12-04T16:04:16.549607 | 2020-03-02T07:16:00 | 2020-03-02T07:16:00 | 231,828,965 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 98 | py | from django.contrib import admin
from .models import Connection
admin.site.register(Connection)
| [
"kraft.developer@gmail.com"
] | kraft.developer@gmail.com |
0d03fc791409f0a5c97a2b1af3d06de5bca7c727 | 228c54822400aaf033679fa49f2a7475e64b5a73 | /setup.py | a62e8fba4aa9b92759beae4d264dd203160b80a1 | [
"MIT"
] | permissive | kuangmeng/MRIUtils | 3111da0c212b8bd74b4b35bb6a5fbf641c4d28ff | 3a79e8104071deb0dc17c402ac878f94161d9b4a | refs/heads/master | 2023-06-01T14:51:24.547215 | 2021-06-23T07:22:15 | 2021-06-23T07:22:15 | 322,794,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 787 | py | #!/usr/bin/env python
import setuptools
readme = 'README.md'
setuptools.setup(
name="mriutils",
version="1.2.18",
author="Mengmeng Kuang",
keywords="MRI-Analysis",
author_email="kuangmeng@msn.com",
description="A simple common utils and models package",
long_description=open(readme, 'r').... | [
"kuangmeng@msn.com"
] | kuangmeng@msn.com |
d5e939d7cc1fcb5358ac62026cdf76abfe52da49 | 53d7ed315fa6133a7302b22210a8771ebbfd7e34 | /DCP_063 ! Word Matrix.py | faf4c3b1d6080387ae5cca33dd5b30b3f2fbdc1f | [] | no_license | MaxTechniche/dcp | 64300bba48cbe7117aa7c7f2b879f20f5915e1ba | 3a8f4667ee82c591927deed7768faa481f4902f0 | refs/heads/master | 2023-01-02T05:08:48.261468 | 2020-10-25T02:19:49 | 2020-10-25T02:19:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 597 | py | """
Good morning! Here's your coding interview problem for today.
This problem was asked by Microsoft.
Given a 2D matrix of characters and a target word, write a function that returns whether the word can be found in the matrix by going left-to-right, or up-to-down.
For example, given the following matrix:
... | [
"Max.Techniche@gmail.com"
] | Max.Techniche@gmail.com |
f0b918fd25848e32e351ba35139e4151c98faf97 | dd8ed0972bf55ae0ed76aa3cc47fd2b905318ff8 | /scholars.py | b08ca187bfb83613c95249996b6d761a1c147ee0 | [] | no_license | sky121/178ML | 55b61d612f7aefadddf562994df911ae53afd4ec | ebef8186a9e4a7a1d80130215779477e18291067 | refs/heads/main | 2023-01-25T04:07:07.553581 | 2020-12-11T04:19:48 | 2020-12-11T04:19:48 | 320,407,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,542 | py | import mltools as ml
import numpy as np
import matplotlib.pyplot as plt
from sklearn.ensemble import AdaBoostClassifier, GradientBoostingClassifier
from sklearn.linear_model import LogisticRegression
from mltools import kernel
class RandomForest:
def __init__(self, X, Y, nFeatures, maxDepth, minLeaf, number_of_lea... | [
"skylarooz@gmail.com"
] | skylarooz@gmail.com |
16473cbfdf7536d42e5ac55f5e31c8de2f2cc785 | f92a545c2b4db694bb82415c5385672c89ccbea2 | /tests/test_time_interval.py | 77381eab4c4a5fe9ec7eccbc270d1ee8681df425 | [] | no_license | fenixguard/candyshop_api | 28f21cb01ace8c12df04d143c4ed15ee1f95e550 | 60900fd4c8382c5e5ebf92adc19b5b0fb5be27aa | refs/heads/master | 2023-04-02T15:38:41.453440 | 2021-04-02T16:15:14 | 2021-04-02T16:15:14 | 349,173,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 491 | py | import unittest
from application.model.time_interval import convert_time_str_to_int, convert_time_int_to_str
class TestConvertTime(unittest.TestCase):
def test_str_to_int(self): # "09:00-18:00" -> [540, 1080]
self.assertEqual(convert_time_str_to_int(["09:00", "18:00"]), [540, 1080])
def test_int_to... | [
"fenixguard1993@gmail.com"
] | fenixguard1993@gmail.com |
198ed41b5675e5534cc3b177590fa2b0b589576d | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/10/usersdata/132/9933/submittedfiles/testes.py | 7261bb0dd0a251c9ed449627f60c5cd59e8963a4 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | # -*- coding: utf-8 -*-
from __future__ import division
maior=0
dia=1
for i in range(1,31,1):
n=input('numero de discos vendidos')
if n>maior:
maior=n
dia=i
print(dia)
print(maior)
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
2d90bff06855f9bae090f63724ebaf7df1c195fc | f077cc46fea261ea5d76342877229721c8e5b44a | /bin/main.py | adcad06e2d91b56a1687fbc7a56e86cefe095d42 | [] | no_license | bjherger/ticketfly_data_challenge | c95d3ad72c692b8decc49977263614a278ea3ff8 | 9cf5aeeda51787189ce994995fb6b58b04bd05d9 | refs/heads/master | 2021-01-24T11:08:30.047655 | 2016-11-22T22:11:41 | 2016-11-22T22:11:41 | 70,256,616 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,637 | py | #!/usr/bin/env python
"""
coding=utf-8
Response to Ticketfly data challenge
"""
import logging
import numpy as np
import pandas as pd
import patsy
import statsmodels.api as sm
logging.basicConfig(level=logging.DEBUG)
def create_training_df():
"""
Read in tables from file, and join them to create a single ... | [
"brendan.herger@capitalone.com"
] | brendan.herger@capitalone.com |
2dea0bfd55ce4a3bff0ce13ca881d5ded7316f0a | 2f29702bfa169509ef166228afcf4c167c09decd | /BOJ_Python/Math1/BOJ_2839_SugarDilivery.py | 25aa74780be6febb23645667f713d82b8e0dbb0c | [] | no_license | maroro0220/PythonStudy | 53b2721c000fc6f86e1184772a3e837e47c250c1 | 985ff7f8ddf93ad25d8b3d46d1c7a740e37225ea | refs/heads/master | 2020-12-21T02:21:43.198573 | 2020-05-10T06:28:21 | 2020-05-10T06:28:21 | 236,277,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,515 | py | '''
문제
상근이는 요즘 설탕공장에서 설탕을 배달하고 있다. 상근이는 지금 사탕가게에 설탕을 정확하게 N킬로그램을 배달해야 한다. 설탕공장에서 만드는 설탕은 봉지에 담겨져 있다. 봉지는 3킬로그램 봉지와 5킬로그램 봉지가 있다.
상근이는 귀찮기 때문에, 최대한 적은 봉지를 들고 가려고 한다. 예를 들어, 18킬로그램 설탕을 배달해야 할 때, 3킬로그램 봉지 6개를 가져가도 되지만, 5킬로그램 3개와 3킬로그램 1개를 배달하면, 더 적은 개수의 봉지를 배달할 수 있다.
상근이가 설탕을 정확하게 N킬로그램 배달해야 할 때, 봉지 몇 개를 가져가면 되는지 그 수를 구... | [
"maro1339@gmail.com"
] | maro1339@gmail.com |
720b5a826589b2a2d5604841f4151d6cc8627e71 | 0c4309d55acb30fb3270400ba9243764193573a0 | /parte_2/semana_3/tipo_triangulo.py | 41c2700a6416da1c51e7a021d3d6f6a33feaa62f | [] | no_license | mwoitek/python-coursera | 8936e39eece19bb40caa1dab98b14529dc836db7 | 90d5d390868d0d0147d837939ee0fab2450c646c | refs/heads/master | 2022-04-25T20:02:45.984640 | 2020-04-30T01:16:57 | 2020-04-30T01:16:57 | 244,276,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 537 | py | class Triangulo:
def __init__(self, lado1, lado2, lado3):
self.a = lado1
self.b = lado2
self.c = lado3
def perimetro(self):
return self.a + self.b + self.c
def tipo_lado(self):
teste1 = self.a == self.b
teste2 = self.a == self.c
teste3 = self.b == s... | [
"woitek@usp.br"
] | woitek@usp.br |
0a30aaf77f75e4687957aa58e4ba2fd7b68f29b2 | 058d94f394a985627d3953fc06d8581edea886fd | /src/dvtests/__init__.py | 3d3d923c67fecaf20093ae106634d6f866795b51 | [
"MIT"
] | permissive | gdcc/dataverse_tests | 7c3d01158a4ba8f519509b312decaf81dbea5441 | d37791f588969973f1bb651e83154247ffdb9d49 | refs/heads/master | 2023-04-15T08:48:32.037168 | 2022-07-20T08:18:42 | 2022-07-20T08:18:42 | 233,846,862 | 2 | 4 | MIT | 2022-07-20T08:08:31 | 2020-01-14T13:24:51 | Python | UTF-8 | Python | false | false | 494 | py | """Find out more at https://github.com/AUSSDA/dataverse_tests.
Copyright 2022 Stefan Kasberger
Licensed under the MIT License.
"""
from requests.packages import urllib3
urllib3.disable_warnings() # noqa
__author__ = "Stefan Kasberger"
__email__ = "mail@stefankasberger.at"
__copyright__ = "Copyright (c) 2022 Stefan... | [
"mail@stefankasberger.at"
] | mail@stefankasberger.at |
e7d5f58ceda88c84bc2cf87e7f99fecb837cf9b3 | 49fbdb00e0ce9775974442c9f09fad29fab77a02 | /rest_api/urls.py | 27454a45284747b21c2e70e0acd37c934b2e690b | [] | no_license | Macaulayfamous/Basic_api_app | 9d009f627632ca247e6224aa4ea8ff8fde288421 | 625668f703334b2b9aa58710938fb8baceff9fff | refs/heads/main | 2023-06-18T04:00:43.649749 | 2021-07-15T06:39:42 | 2021-07-15T06:39:42 | 386,176,684 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 554 | py |
from django.contrib import admin
from django.urls import path, include
from rest_framework import routers
from api.views import MovieViewSet, ActionViewSet, ComedyViewSet
from django.conf import settings
from django.conf.urls.static import static
router = routers.SimpleRouter()
router.register('', MovieViewSet)
route... | [
"pythonfamous@gmail.com"
] | pythonfamous@gmail.com |
98ba95f8dbff24f9396d835c83b3232a91d917cc | 83dab2b5adaf537c525a04584e21501871fc8a4e | /model/write_data.py | e0fff521dd14697fc28f71a5ea1191330a5d6955 | [] | no_license | Najah-Shanableh/lead-public | 7852e2371d186c9e097fde01b3e0d7c1b2fc044e | f538249c43e0444b45b5ef4e58aa46811e825a58 | refs/heads/master | 2021-05-30T06:47:44.511409 | 2015-04-21T15:33:08 | 2015-04-21T15:33:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | #!/usr/bin/python
import sys
import yaml
import util
import os
directory = sys.argv[1]
if not os.path.exists(directory):
os.makedirs(directory)
with open(sys.argv[2]) as f:
params = yaml.load(f)
params['data']['directory'] = directory
engine = util.create_engine()
data_name = params['data'].pop('name'... | [
"eric@k2co3.net"
] | eric@k2co3.net |
90db8927ca3b2e6e98fbb58229d85981f53b2c12 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03583/s935139311.py | 7cb09551156a49be9231f099550afb736cbc3172 | [] | 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 | 362 | py | N = int(input())
flag = 0
for a in range(1,3501):
if flag ==1:
break
for b in range(1,3501):
if 4*a*b - a*N - b*N != 0:
if a*b*N // (4*a*b - a*N - b* N) > 0 and a*b*N % (4*a*b - a*N - b* N) ==0:
c = int(a*b*N / (4*a*b - a*N - b* N))
print(a, b, c)
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
0a9fa1d2e3e4513278a11b5942e704c8b477555b | 1bf4cf8c61c5399979838e12beccd207a363396a | /tests/druid_import_test.py | cad352c0ee2da88f233720dd9035312793238d9b | [
"Apache-2.0"
] | permissive | moshebeeri/datap | 2da33e6eeed21c441a19c56e5acc59ad198af499 | 9ff99bb435728cd69f2589e3ee858a06768ea85e | refs/heads/main | 2023-08-19T07:35:32.917031 | 2021-09-25T07:42:14 | 2021-09-25T07:42:14 | 312,567,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | from service.druid import Druid
class TestImport:
def test_it(self):
druid = Druid(start=None, end=None)
assert True | [
"moshe.beeri@gmail.com"
] | moshe.beeri@gmail.com |
0bf39985c39b47434a9632b18b956c25b3069897 | eb7afa613940f5a3f202352a94dd996edcb6bed5 | /boto3_type_annotations/boto3_type_annotations/s3control/__init__.py | 4045ce4f030398c8486740f70ed511fb671b3a79 | [
"MIT"
] | permissive | alliefitter/boto3_type_annotations | e4da614e27a1d2ad3c9c653c50b8e30108180da5 | 2a88aa562b1aee6e8a6cc30402980884b3707fbb | refs/heads/master | 2020-04-05T22:05:12.689913 | 2019-11-28T03:32:13 | 2019-11-28T03:32:13 | 157,244,330 | 131 | 11 | MIT | 2023-04-21T17:17:03 | 2018-11-12T16:38:57 | Python | UTF-8 | Python | false | false | 91 | py | from boto3_type_annotations.s3control.client import Client
__all__ = (
'Client'
)
| [
"afitter@cellcontrol.com"
] | afitter@cellcontrol.com |
62b681e01ba371318445c3f5ce2d06bd47fea7e4 | 87ac19d29284e0ec46e5f8f57bc23bf3901827e6 | /Week_07/libs/union_find.py | 72476257020849472a6803ef420a26da2d0e3398 | [] | no_license | ws2823147532/algorithm008-class01 | c0939aedc91b6f2f52df117430c8066ecc6c28ca | dd00020d013ad7bf594341fe60f7229f3ea08930 | refs/heads/master | 2022-11-12T15:14:55.699458 | 2020-07-04T00:37:24 | 2020-07-04T00:37:24 | 255,079,618 | 0 | 0 | null | 2020-04-12T12:40:13 | 2020-04-12T12:40:13 | null | UTF-8 | Python | false | false | 1,042 | py | class UnionFind:
"""
并查集
"""
def __init__(self, n):
self.p = [i for i in range(n)]
self.count = n
def union(self, i, j):
"""
把j当做i的parent
"""
p1 = self.parent(i)
p2 = self.parent(j)
if p1 != p2:
self.p[p1] = p2
... | [
"shang.wang@renren-inc.com"
] | shang.wang@renren-inc.com |
e488527b0e94108d5d12c1cd9ba81d6348b88f36 | 7ccafccf2f52708386592ff03609a01495078976 | /p0-titanic-survival-exploration/titanic_survival_rev01.py | cee2f7f7cdb654ba13c3cec154e4b073593a5d2a | [] | no_license | nitin2016/machine-learning-nd-1 | 09e9c82b44254e5b4ae3d05f34eb466e1cb3d2a7 | 69ec26e3e0ead5d878f19ba7e306f005340eee89 | refs/heads/master | 2020-04-23T08:51:29.123252 | 2019-02-13T15:49:30 | 2019-02-13T15:49:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 84 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 13 14:17:59 2018
@author: User
"""
| [
"niall@changex.org"
] | niall@changex.org |
0b5bbe3d5d84622d94ea279b1eb39216ea4a5707 | c49a6e67a63a541f8d420e725af155505d1e7f84 | /Design/lru-cache*.py | 8d4594e47dd5afbac9564423dc042919a58233fb | [] | no_license | wttttt-wang/leetcode_withTopics | b41ed0f8a036fd00f3b457e5b56efe32f872ca13 | e2837f3d6c23f012148a2d1f9d0ef6d34d4e6912 | refs/heads/master | 2021-09-05T05:03:47.519344 | 2018-01-24T08:28:58 | 2018-01-24T08:28:58 | 112,893,345 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,800 | py | """
LRU Cache
@ Design: 1. Two hashMap + One linkedList
2. should be careful when dealing with hashMap in case of 'keyError'
3. reminder to update self.tail
"""
class ListNode(object):
def __init__(self, val):
self.val, self.next = val, None
class LRUCache(object):
def __init__(s... | [
"wttttt@Wttttt-de-MacBookPro.local"
] | wttttt@Wttttt-de-MacBookPro.local |
bed8f7ef017694c7daa9fefa05467436adf4e1cf | 77588c0b2905f76896d221f18dc5e4b4e6338b42 | /standart_methods/method__new__.py | 5c0e0fd8be1a6f42730b3b6636404f51c4e5ffd0 | [] | no_license | konstantin1985/learn_python | 702a96ed171ce9fd27f51b0c0356b981bfed5f8b | ecc0d79b0bd5cda9846287da4c815ddb173c6ada | refs/heads/master | 2021-01-10T08:28:27.178267 | 2015-11-16T14:33:24 | 2015-11-16T14:33:24 | 46,173,683 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 91 | py | #http://stackoverflow.com/questions/674304/pythons-use-of-new-and-init - Great explanation
| [
"konstantin@linux-rswc.site"
] | konstantin@linux-rswc.site |
94b3e93b823ead0b984d54042c90c619c2be22f8 | 873c87eb406fb0c8320c47431fc6d696c40dd29a | /Lecture9/sqlite_demo.py | c46affce7151571f415edf8679876bc5102e9d72 | [] | no_license | borislavtotev/SoftUni-Python | ae16d0ab07168529963c307e7612d4ad6b071b35 | 76e59ef698f50bec1c8fe2f4b48cf59fb0ee243b | refs/heads/master | 2021-01-10T14:19:21.871744 | 2016-02-16T18:21:28 | 2016-02-16T18:21:28 | 51,778,128 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,274 | py | import sys
import os
import csv
import sqlite3
from product import Product
from sale import Sale
def main():
product_catalog = load_product_catalog('./catalog.csv')
sales = load_sells('./sales-example.csv')
print(product_catalog)
print(sales)
db_filname = "sales-example.db"
... | [
"borislav.totev@gmail.com"
] | borislav.totev@gmail.com |
466f0141c621c5aa74cf85f313b58d9f62a6e995 | 6ab9a3229719f457e4883f8b9c5f1d4c7b349362 | /leetcode/00098_validate_binary_search_tree.py | 68b7dceaba479602951e0e5e99a36a25a8abc2fc | [] | no_license | ajmarin/coding | 77c91ee760b3af34db7c45c64f90b23f6f5def16 | 8af901372ade9d3d913f69b1532df36fc9461603 | refs/heads/master | 2022-01-26T09:54:38.068385 | 2022-01-09T11:26:30 | 2022-01-09T11:26:30 | 2,166,262 | 33 | 15 | null | null | null | null | UTF-8 | Python | false | false | 569 | py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def isValidBST(self, root: TreeNode, left: int = None, right: int = None) -> bool:
if not root:
return True
i... | [
"mistermarin@gmail.com"
] | mistermarin@gmail.com |
c88e8ccfcfc48ac220ee895c1127e4d392ed80c4 | f9f350f77ad134da266a2be1c9fba0c61b302e41 | /Brightness changing/src/BrightnessChange.py | 1a01dc5de2983d93f43a0566e3ad20c433569a3d | [] | no_license | shriyagayatri/Image-Manipulation | 440d849c6e85de0e9ad619cc8219b514ef54dada | 975cece2596bdd81c788d25873eb1f4a441463a2 | refs/heads/master | 2020-04-01T04:06:05.048755 | 2018-12-06T08:47:51 | 2018-12-06T08:47:51 | 152,849,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 420 | py | from PIL import Image
image = Image.open("colourful.jpg")
# image.point creates a new copy of the original image
image.point(lambda x: x*0).save("dark.jpg")
image.point(lambda x: x*0.1).save("darkest.jpg")
image.point(lambda x: x*0.5).save("darker.jpg")
image.point(lambda x: x*1.5).save("bright.jpg")
image... | [
"noreply@github.com"
] | shriyagayatri.noreply@github.com |
18665ea34c033295b8e4700a027f68063c854ab4 | dc99adb79f15b3889a7ef6139cfe5dfc614889b8 | /Aplikace_1_0/Source/libs/datastore/permanent_datastore.py | 6935c3ec09a6f86e8c847f2670ed1d8ef4f13de6 | [] | no_license | meloun/ew_aplikace | 95d1e4063a149a10bb3a96f372691b5110c26b7b | f890c020ad8d3d224f796dab3f1f222c1f6ba0eb | refs/heads/master | 2023-04-28T06:43:12.252105 | 2023-04-18T19:59:36 | 2023-04-18T19:59:36 | 2,674,595 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,752 | py | # -*- coding: utf-8 -*-
import libs.datastore.datastore as datastore
import libs.db.db_json as db_json
class PermanentDatastore(datastore.Datastore):
def __init__(self, filename, default_data):
#create datastore, default dictionary
datastore.Datastore.__init__(self, default_d... | [
"lubos.melichar@gmail.com"
] | lubos.melichar@gmail.com |
0e03ddfe7452fb12cceb00307946b405aad8bcab | 88dbfaa5134199ecb75b5220dbd1aa2d91f80d56 | /tests/test_encodings.py | 6e00b86ea702be04bab8fd0efe11cf141ff593a5 | [
"MIT"
] | permissive | AMDmi3/jsonslicer | 60f4ce71eb54f50f713a1315540ff1c38e8fbec8 | 2d72bf2fc52a210123e6145fed5a1bcf2ce6300f | refs/heads/master | 2022-10-28T02:13:28.527564 | 2022-10-25T16:43:47 | 2022-10-25T16:59:05 | 165,882,846 | 48 | 7 | MIT | 2020-05-20T07:19:48 | 2019-01-15T16:14:51 | C++ | UTF-8 | Python | false | false | 3,908 | py | # Copyright (c) 2019 Dmitry Marakasov <amdmi3@amdmi3.ru>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify,... | [
"amdmi3@amdmi3.ru"
] | amdmi3@amdmi3.ru |
f475dbb8fbc4a6317422ec3ccc14a64b41538747 | cd2ce3913595d68e57411123bcfdc89e2be0f9d8 | /pages/views.py | d21f9d049ec9038d10168288e3aab5bc071ad24b | [] | no_license | hotblaze18/django_btredb_realtor_app | 43007b25947b9a242b62a21b1bbfb13af4e4eaa2 | ec5eafc6a8475f3a955210e6dbdfcb8208420ff3 | refs/heads/master | 2022-07-21T15:28:56.687110 | 2020-05-14T09:35:59 | 2020-05-14T09:35:59 | 263,867,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 922 | py | from django.shortcuts import render
from django.http import HttpResponse
from listings.models import Listing
from realtors.models import Realtor
from listings.choices import state_choices, bedroom_choices, price_choices
# Create your views here.
def index(request):
listings = Listing.objects.all().order_by(
... | [
"arora.pranav.2000@gmail.com"
] | arora.pranav.2000@gmail.com |
c49df3b7148427ccab8d418470e85866a904febc | 82395399e18144a2f495c47cf33517c44df2364e | /backend/rpi/sms_receive.py | 1c6530077397156df13dc96d629eb6268cd46fa9 | [] | no_license | roxana-andreea/BachelorProject | 945218f7ec6c34a988b6b1d4ad306c8b4dcb58ac | 44ce97466ec82fd23cddcc2b2531994c828882d3 | refs/heads/master | 2021-01-01T05:57:36.481475 | 2017-07-23T08:13:03 | 2017-07-23T08:13:03 | 97,319,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,181 | py | #!/usr/bin/python3
import sys
import logging
import requests
ERROR_SMS_FORMAT = 101
ERROR_PINCODE_VALIDATION = 102
ERROR_UNKNOWN_ACTION = 103
ERROR_UNKNOWN_PARAMETER = 104
ERROR_FEATURE_ACTIVATION = 105
URL = 'http://vss.lupu.online:8080'
LOGIN = 'test@domain1'
PASSWORD = 'secret1'
USER_ID = 1
DEVICE_ID = 1
def debu... | [
"roxana.cazacu93@gmail.com"
] | roxana.cazacu93@gmail.com |
7d905ed750c1b7499c31f6b380eb109e6df3bde0 | cea16e5eedf3a562bf908940fae49649121be7b7 | /env/lib/python3.7/site-packages/geocodio/__init__.py | 3da58b71986497e00240932d3d306ee341416625 | [] | no_license | petlgunjr/afterwardzazurefunction | f896ac799030688443f8eb7b226a95908e755743 | 823a9187f0ef29208ae43de59bd60c09f52bba67 | refs/heads/master | 2020-12-23T21:51:48.951790 | 2020-03-06T16:40:01 | 2020-03-06T16:40:01 | 237,285,522 | 0 | 0 | null | 2020-01-30T19:32:05 | 2020-01-30T19:09:12 | Python | UTF-8 | Python | false | false | 185 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'David Stanley'
__email__ = 'davidstanley01@gmail.com'
__version__ = '1.0.0'
from . client import Client
__all__ = [Client] | [
"petlgunjr@gmail.com"
] | petlgunjr@gmail.com |
9a1baa646b31fef3fc681bd1e82233b44d8cf874 | 0e3c196a4fcf83a5fac79181911633945b9e2029 | /firstsecond.py | 546a694ecbd7da8044ef1f2b465aed3146bae3a2 | [] | no_license | eesa-syed/Python-assignments | 4a46e8b2f4b718e5dec428eece629ba74856943a | ba4917e9bedbfc03468a750262c4a64dec140504 | refs/heads/master | 2023-08-10T22:48:43.525097 | 2021-10-02T01:49:49 | 2021-10-02T01:49:49 | 281,324,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 68 | py | x=lambda n: str(n)+'tsnrhtdd'[n%5*(n%100^15>4>n%10)::4]
print(x(22)) | [
"syedeesa2000@gmail.com"
] | syedeesa2000@gmail.com |
8fe3bd1dd3226d26dac5e8615714e7b61fbb87a2 | 261fa90a0ab6b844682465356fee1d5f490774d7 | /02_matplotlib/06_axis.py | 7a085813afb58ff177ab889e8c38e236fd44e6b6 | [] | no_license | lofues/Data_Science | 85d7fcd6e2e7f3dad6392010b30272bb8ca9d1b3 | d91a05325bf597f641d9af1afcf26575489c4960 | refs/heads/master | 2020-09-03T12:43:01.998302 | 2019-11-07T09:17:19 | 2019-11-07T09:17:19 | 219,464,996 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 421 | py | import numpy as np
import matplotlib.pyplot as mp
ax = mp.gca()
ax.xaxis.set_major_locator(mp.MultipleLocator(1))
ax.xaxis.set_minor_locator(mp.MultipleLocator(0.1))
# 只查看x轴的1 到 10
mp.xlim(1,10)
# 不查看y轴
mp.yticks([])
ax.spines['left'].set_color('none')
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('n... | [
"junfuwang@163.com"
] | junfuwang@163.com |
5f481220f5ee531759795b3696ba705afea9bc70 | ba0e8b50564ae5a3c4548c01516792c6512a0a08 | /smartcab/simulator.py | f0b7fd6888a42754da73e2972108637b282d4679 | [] | no_license | joshnewnham/udacity_smartcab | 7ff7027fc79fbbe0f375132b887cb0145de9f7f2 | f339c80e016992e9496d268a7b7ff547488c4eff | refs/heads/master | 2016-09-12T20:38:19.017417 | 2016-04-27T21:59:21 | 2016-04-27T21:59:21 | 57,077,256 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,667 | py | import os
import time
import random
import pygame
class Simulator(object):
"""PyGame-based simulator to create a dynamic environment."""
colors = {
'black' : ( 0, 0, 0),
'white' : (255, 255, 255),
'red' : (255, 0, 0),
'green' : ( 0, 255, 0),
'blue'... | [
"josh@wemakeplay.com"
] | josh@wemakeplay.com |
0e9d7d2932323728b9a906cd927a4f90ec8474e4 | 5faeeef55289a7499009a15814b6e786d3872d17 | /Day 8/better_caeser_cypher.py | abf3f0cac7a857701654aeffeb742bf8204ea8d7 | [] | no_license | sanskarlather/100-days-of-code-with-python | 1536c6dcf6e4b9a8dd8ca64631e762f941c29508 | 2c6d2f2b655650b9aaecdb0e4005f6e59708384d | refs/heads/master | 2023-03-02T18:05:23.559453 | 2021-02-09T05:19:01 | 2021-02-09T05:19:01 | 325,955,981 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 641 | py | from caeser_cypher_logo import logo
print(logo)
n=0
def salad(n):
test=""
if n==3:
print("Thank You for trying this out")
elif n==1:
s=input("Enter the string\n")
a=int(input("by how much\n"))
for i in range(0,len(s)):
if ord(s[i])+a>122:
test+=chr(ord(s[i])+a-26)
else:
test+=chr(ord(s[i])+... | [
"lathersanskar@gmail.com"
] | lathersanskar@gmail.com |
3aef8b9e1763961935e6b39d7220c0188eb8a48e | 0bb8d664064ceead1d18f6b2ddbd6b59df42caab | /object_detection_3.py | 4844bfd6441ac3fe877175562e3ee20e45fdfd98 | [] | no_license | pavan3175/Streaming-Data-Face-Recognition | cd508fb05dc02b94e07fc1e4f2192fb25fafd630 | d4e06f1950ff6ce5fc73f3fe5a33fde59b7de930 | refs/heads/master | 2020-06-09T23:25:28.937390 | 2019-06-24T15:14:08 | 2019-06-24T15:14:08 | 193,526,955 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 621 | py | import numpy
from imageai.Detection import VideoObjectDetection
import os
import cv2
execution_path = 'C:/Users/pparepal/Documents/vc_python'
c1=cv2.VideoCapture(0)
detector = VideoObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath( os.path.join(execution_path , "yolo.h5"))
detector.... | [
"noreply@github.com"
] | pavan3175.noreply@github.com |
24de50616429b8a6e2fbfb2b1db5e0a18e75c0cd | de7596dc6a55592ca9ce925086e194b81733fd37 | /backend/chk_shared_screen1__14206/settings.py | cea2dbec60f4c6dbaa6a2c5133c04f2c01283f2f | [] | no_license | crowdbotics-apps/chk-shared-screen1--14206 | 666f9eb4a8622062676312d2309e81214275d41d | 74e4672c57fa78e90f5ddabef384dfb55e068975 | refs/heads/master | 2023-01-01T00:13:30.182764 | 2020-10-29T12:46:23 | 2020-10-29T12:46:23 | 308,324,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,125 | py | """
Django settings for chk_shared_screen1__14206 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
857a7552a4d0c642273110e00bb8e7a7fefad271 | 48c9615d646ba9e44ec7b6d2f2b977b92d3e2db7 | /MainRequest.py | 45d314d6deccc76c14f3b5fd8826d11390c6a3a5 | [] | no_license | yukunqi/ProxySpider | 8ca5780360b66fed14d9e2f0cce7c1fb02fad504 | 1ef72a83f82e6791f8c1ece064d349d1f01fb204 | refs/heads/master | 2020-03-09T23:11:39.901841 | 2018-04-11T09:53:52 | 2018-04-11T09:53:52 | 129,052,998 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,285 | py | import pymongo
import random
import time
import requests
from config import *
from ip_spider.log_format import logger
from pymongo.errors import ServerSelectionTimeoutError
from pymongo.errors import ConnectionFailure
from ip_spider.UAS import *
from ip_proxy.delete_not_update_ip import check
from ip_proxy.work_spider ... | [
"372563150@qq.com"
] | 372563150@qq.com |
ae90dcd8b47936e8e2df0f50925d7909def355c7 | 27d2e5298d91cca2b7ab01382080b38ab9f65fa4 | /download_and_preprocess/index_db.py | c0d06bca5bd35f3e11fbed0ccdfb0d27de5dfa2c | [] | no_license | jhabib/midsmumbler | 6a67ffd05d65f59cfc8038ac43d3515287f18f5c | 5463b62a32e34c5873def493947cd3ec93deaff7 | refs/heads/master | 2021-01-12T14:25:19.071624 | 2016-09-26T04:16:49 | 2016-09-26T04:16:49 | 69,205,473 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 979 | py | import sqlite3 as sq
import pickle
import cPickle as cp
import sys
import os
import time
if __name__ == '__main__':
if len(sys.argv) != 2:
print 'enter database directory path'
else:
db_path_prefix = sys.argv[1]
db_names = ['gpfs1_bigrams.db',
'gpfs2_bigrams.db',
... | [
"mjawadhabib@gmail.com"
] | mjawadhabib@gmail.com |
0e91cee1855fba255ec0b1aea83b7a10dc18e972 | ee85dbdd084da9efef362ec866718596c1bc1de0 | /code/probesim/strategy/mwscapprox.py | 0d56bebe05c57fa1f9b2f0e8cd873b4a1774d6df | [
"BSD-3-Clause",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | carolinegsun/NetPAS | 2eea5feaf7f28fb8d608dd7f3e13db4d3a93694d | 8070af340091336a99c7503f88a0750b25b5811c | refs/heads/master | 2022-04-09T14:33:50.586359 | 2020-03-04T21:37:53 | 2020-03-04T21:37:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,214 | py | import random
import sys
from .. import util as ps
from ..heapqup import heapqup
# ---- helper functions ----
def number_path_set(path_list):
'''
This function takes a path list and numbers it (that is, add
a unique integer ID to each of the path in the set).
This function returns a hash map (dictio... | [
"noreply@github.com"
] | carolinegsun.noreply@github.com |
ad3dcefde33d8c112e1d0d30f7c3f571c95ded40 | 3e9245f87debdfa1c322d3fb94c559b386b59440 | /Ex37.py | e1fcb1e4ef28c01834ddcb94dae168931f50bb09 | [] | no_license | Keikoyao/learnpythonthehardway | cb33328202f59b43df94ff158eabdb42c9e2a593 | dee000340757b8d11c3685eb6496999e56764840 | refs/heads/master | 2020-06-26T12:04:36.542227 | 2017-07-27T20:49:12 | 2017-07-27T20:49:12 | 97,019,490 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | # -- coding: utf-8 --
#while-loop:when you want to loop non-stop, when you have limited target, use for-loop
#The best way to adjust your code is to print out the key variables and see what's wrong.
#run and test your code step by step, don't debug till you have a very long script.
#Keywords
#remove the first matchin... | [
"noreply@github.com"
] | Keikoyao.noreply@github.com |
179495f51c0ca3686b172e62eca34a2ff82cb3eb | 5883449aa14eb5e8b3fa6ad4d03d1dfacc40ccee | /Amazon_Framework/DentOsTestbedLib/src/dent_os_testbed/lib/iptables/linux/linux_ip_tables_impl.py | 48c2c6fbe7b5cc156f72e7c3ec5682b0261dd382 | [
"Apache-2.0"
] | permissive | tld3daniel/testing | 826183f30d65f696e8476d4a584c4668355e0cb3 | e4c8221e18cd94e7424c30e12eb0fb82f7767267 | refs/heads/master | 2023-09-01T12:39:26.845648 | 2021-08-11T15:53:16 | 2021-08-11T15:53:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,339 | py | from dent_os_testbed.lib.iptables.linux.linux_ip_tables import LinuxIpTables
class LinuxIpTablesImpl(LinuxIpTables):
"""
iptables [-t table] {-A|-C|-D} chain rule-specification
ip6tables [-t table] {-A|-C|-D} chain rule-specification
iptables [-t table] -I chain [rulenum] rule-specification
iptabl... | [
"muchetan@amazon.com"
] | muchetan@amazon.com |
baff32f8d4e959a29d65143fcf22a0cd1dad34df | b913dee6f00862aa64b0320a8ec2a4bd10b657cf | /book/migrations/0001_initial.py | f7f8c0e3a058d75ccfb452dd048ec35f72bf7bbe | [] | no_license | carolinamaciel1/API_BOOKS-DJANGO_REST | ffb116975fbe72046a45d0119ec34193fa30276c | 48dbf1d64a4e4408790452f966a5e36dd8787fa0 | refs/heads/master | 2022-12-11T08:28:04.598906 | 2019-07-04T16:19:59 | 2019-07-04T16:19:59 | 194,790,373 | 0 | 0 | null | 2022-12-08T05:50:28 | 2019-07-02T04:52:12 | Python | UTF-8 | Python | false | false | 1,851 | py | # Generated by Django 2.2.3 on 2019-07-02 05:06
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | [
"carolinamaciel37@gmail.com"
] | carolinamaciel37@gmail.com |
a3724100878ac05f674751bd7c7e91ab5a262726 | 7191eedd5ecbf39854864decfa3415ff32a2e644 | /DataDashboard/pagination.py | 4223ec7f96a54f37b8c096f997469fee80c31009 | [] | no_license | GID-Dashboard/GISDashboard | 385755c4d7b886af80fce084ed11217980ee8e62 | c382f4ae0b2b16de8be66e40262a8e5c61000b69 | refs/heads/master | 2022-07-14T22:23:15.288757 | 2020-05-12T02:54:24 | 2020-05-12T02:54:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | from rest_framework import pagination
class StandardResultsSetPagination(pagination.PageNumberPagination):
page_size = 7 # change the records per page from here
page_size_query_param = 'page_size' | [
"jdjwright@gmail.com"
] | jdjwright@gmail.com |
bea089a19723769c6d90932cf4642c10f5085e80 | dc82ab2928c5a357acf6294097fcd07b21d061a2 | /dtreesc.py | dbd362f19f2508a396e2800857c2a988eaa78eb4 | [] | no_license | akshat-khare/mlass3 | ab6b32c650459c8b117626bb3447c8f0064294ba | 4691c5dab68eb67b4eeb6aa9bab7d4036aa4f1e2 | refs/heads/master | 2020-05-04T20:21:57.138520 | 2019-04-16T00:59:59 | 2019-04-16T00:59:59 | 179,435,027 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,213 | py | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import sys
trainfname = open(sys.argv[1], 'r')
xarrtrainori = []
yarrtrain = []
xidentifier= [3,1,2,2,3,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3]
medianarr = [0.0]*23
xnumchildhelper=[]
for i in range(23):
if(xidentifier[i]!=2):
xnumchildhelper.append(2)
else... | [
"akshat.khare08@gmail.com"
] | akshat.khare08@gmail.com |
db04e4251289a2b13df6f327d687283cde1e585e | aaa762ce46fa0347cdff67464f56678ea932066d | /AppServer/lib/django-0.96/django/core/mail.py | b9966c2af023eea017e2bf5a0f22fe9c3067243a | [
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-3-Clause",
"MIT",
"GPL-2.0-or-later",
"MPL-1.1"
] | permissive | obino/appscale | 3c8a9d8b45a6c889f7f44ef307a627c9a79794f8 | be17e5f658d7b42b5aa7eeb7a5ddd4962f3ea82f | refs/heads/master | 2022-10-01T05:23:00.836840 | 2019-10-15T18:19:38 | 2019-10-15T18:19:38 | 16,622,826 | 1 | 0 | Apache-2.0 | 2022-09-23T22:56:17 | 2014-02-07T18:04:12 | Python | UTF-8 | Python | false | false | 4,253 | py | # Use this module for e-mailing.
from django.conf import settings
from email.MIMEText import MIMEText
from email.Header import Header
from email.Utils import formatdate
import smtplib
import socket
import time
import random
# Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of
# seconds, which... | [
"root@lucid64.hsd1.ca.comcast.net"
] | root@lucid64.hsd1.ca.comcast.net |
0b6256f4cd64720d720282b2af5c3ad1b14c828a | 31164e93151ba3224672075460a73f0b86ec4341 | /scrapbook/migrations/0016_auto__del_unique_photo_entry__order__del_unique_entry__order_book.py | 54593d165bf9f671f9474a02b1c8739fa6b80e77 | [] | no_license | tylerbrandt/Scrappy | 5817414691a6a8bd4ce51f881f8378df76dd534a | d39ae9f544cd079626cf2c6ba44f6a63ba317e4a | refs/heads/master | 2021-01-22T05:16:07.785933 | 2012-05-21T17:12:36 | 2012-05-21T17:12:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,924 | py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'Entry', fields ['_order', 'book']
db.delete_unique('scrapbook_entry', ['_or... | [
"tyler@Tylers-MacBook-Air.local"
] | tyler@Tylers-MacBook-Air.local |
d5c800c6b1fa2c7ae68a564d4fff250af173b219 | 20448841fe75541d2f5b9879178e0f874daede38 | /Set .union() Operation.py | eb2344ff7dd432ac632bcd147dc8ff2a148d56e9 | [] | no_license | dnskvamsi/Hacker_rank_python_solutions | d421bfe231c3d6913fc5285c254ec67ea2c76845 | d118734f2cee1df64df02e0421fff68aa5c51cc7 | refs/heads/main | 2023-05-03T23:28:20.035678 | 2021-05-26T10:59:31 | 2021-05-26T10:59:31 | 370,945,352 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 208 | py | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
s1=int(input())
stu=list(map(int,input().split(" ")))
s2=int(input())
stu2=list(map(int,input().split(" ")))
k=set(stu).union(set(stu2))
print(len(list(k)))
| [
"noreply@github.com"
] | dnskvamsi.noreply@github.com |
d8779e568e33d24c95da2bb92c27147b6a00ed80 | 7773119bdfe6db21dac503fefe23d4456b58edb5 | /data/scripts/summarize.py | 234b16d69886455bbefba8dd3b9318d9cff0f8c3 | [
"MIT"
] | permissive | JoogsWasTaken/no-noscript | 1f87077a3fbbdbf61a51e88649b03fbb35ee144b | f423c9a3ad1a67d884c9ad51eb999a6b9bf48baa | refs/heads/master | 2022-12-16T07:06:52.922105 | 2020-09-10T07:40:47 | 2020-09-10T07:40:47 | 277,366,058 | 0 | 0 | MIT | 2020-09-10T07:41:34 | 2020-07-05T19:05:23 | Python | UTF-8 | Python | false | false | 3,061 | py | """
Creates a table containing the sanitized results of the benchmark.
This assumes that the main table has been split up.
This file is probably the jankiest out of all.
"""
from util import parse_csv_line, get_paths, as_bool, append_to_filename
from util import benchmark_columns as columns
import os
from math import... | [
"mjugl@hs-mittweida.de"
] | mjugl@hs-mittweida.de |
c6ab6b5a881525b9fd0cbc34430c66323cd4da68 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/hard.py | 22f87c30a5d7750ec2b410cb445691e2da331f1d | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 2,797 | py | ii = [('BentJDO2.py', 1), ('EmerRN.py', 2), ('LyelCPG2.py', 3), ('MarrFDI.py', 16), ('RogePAV2.py', 32), ('CoolWHM2.py', 9), ('KembFFF.py', 9), ('GodwWSL2.py', 11), ('ChanWS.py', 6), ('RogePAV.py', 41), ('SadlMLP.py', 8), ('FerrSDO3.py', 2), ('WilbRLW.py', 21), ('WilbRLW4.py', 13), ('RennJIT.py', 25), ('ProuWCM.py', 8)... | [
"prabhjyotsingh95@gmail.com"
] | prabhjyotsingh95@gmail.com |
7e401ebea09f60f6706a105e4e6ce60eaae91355 | c4c427bb2c5cf463690ea7132e95a9e7b8fe0146 | /112. Path Sum.py | 0b60340f373382a225a2cadf9816413c2acc478b | [] | no_license | taimo22/LeetCode_answers | fff572b58c70bcdf81b8eb0bd83ce9cda0e245c3 | 2132a330f5927667b9a99f90f9d58c0ffbd5904e | refs/heads/main | 2023-02-24T06:31:50.320543 | 2021-01-31T00:25:55 | 2021-01-31T00:25:55 | 334,540,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 870 | py | #112. Path Sum
#https://leetcode.com/problems/path-sum/solution/
#my ans
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def hasPathSum(self, root: TreeNode... | [
"45529701+taimo22@users.noreply.github.com"
] | 45529701+taimo22@users.noreply.github.com |
069695756d382ef840438429813535c14a8fbcd3 | bdee746158783e3daeac940cb1744486e2864355 | /geokey/core/tests/logger/test_log_videofile.py | 5603d3bc2d78c7071e1a2843ad1697fedea80413 | [
"Apache-2.0"
] | permissive | NeolithEra/geokey | c64a9bf2b5a3a9ae2f01adc60b33efd65b04395d | 16d31b5207de9f699fc01054baad1fe65ad1c3ca | refs/heads/master | 2020-12-13T18:03:53.008668 | 2019-11-02T10:12:26 | 2019-11-02T10:12:26 | 234,489,286 | 0 | 0 | NOASSERTION | 2020-01-17T06:52:14 | 2020-01-17T06:52:13 | null | UTF-8 | Python | false | false | 4,300 | py | """Tests for logger: model VideoFile."""
from django.test import TestCase
from geokey.core.models import LoggerHistory
from geokey.users.tests.model_factories import UserFactory
from geokey.projects.tests.model_factories import ProjectFactory
from geokey.categories.tests.model_factories import CategoryFactory
from ge... | [
"noreply@github.com"
] | NeolithEra.noreply@github.com |
adda6ac14ccc16b6a992911ec08f26f39d3c83e6 | d1ac319bf0249be8f147c08917720a60a08be3c2 | /knowledge/models.py | 49d279332a2e69056c218a8a1194a7ffddf03d1e | [] | no_license | eunki7/diquest_demo | 7361041df8bbd75fb2e7a6619fe5622920f2b0cc | 4ed82e5c2041251d5b8e3c6d63fabb50fbcd7278 | refs/heads/master | 2023-03-08T12:47:41.553527 | 2019-04-30T07:22:50 | 2019-04-30T07:22:50 | 172,851,287 | 0 | 3 | null | 2023-02-15T20:51:07 | 2019-02-27T05:44:31 | JavaScript | UTF-8 | Python | false | false | 2,030 | py | from django.contrib.auth.models import User
from django.core.validators import FileExtensionValidator
from django.db import models
from django.urls import reverse
from django.utils.text import slugify
import os
class Knowledge(models.Model):
title = models.CharField('TITLE', max_length=50)
slug = models.SlugF... | [
"outsider7224@hanmail.net"
] | outsider7224@hanmail.net |
6818fa3cae3acad1fdf03d2dc50d5db778b3fdb6 | ad10f4d1530fe4ededfbb93ee31042c9e5c24e9a | /Data Structure/dataframe/21_dataframe에 현재 시간 기준 column 추가하기.py | ca7472dc6d67464724dfd8b9ff597bcc767ee050 | [] | no_license | WinterBlue16/Function-for-work | 0d76ea2c326e547ad0cc3171f4a5a09d02de5a58 | 38603549b448198c12b48c95147516dbbc3f28f2 | refs/heads/master | 2022-07-15T20:30:26.178739 | 2022-07-04T13:42:01 | 2022-07-04T13:42:01 | 238,364,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 189 | py | """
dataframe에 현재 시간을 기준으로 한 column을 추가합니다.
"""
import pandas as pd
def add_datetime_col(df):
df['created_at'] = pd.to_datetime('now')
return df
| [
"leekh090163@gmail.com"
] | leekh090163@gmail.com |
bbb18f7782294604bc2614f3e8036877cec6f4c2 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startCirq1646.py | a4be0a640c12c3a50a9fd916217514b0b775b2e0 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,350 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=5
# total number=63
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
3dc4a8e1627230c5c9466c36212543c6ef2ea1d1 | 200745cbb772f0ac7122b58301575401053044f6 | /dataset/mini_imagenet.py | e6c98ce8a7aa925ea9c7cee8e66853ebf602928c | [] | no_license | kadimakipp/GAN | 7ad6c19d4b25810d8f67e84eed848703bdf3d63a | e68912469c4df8f47e2c66b64cbf468ff68005bc | refs/heads/master | 2020-07-27T13:17:19.820690 | 2019-09-24T03:41:32 | 2019-09-24T03:41:32 | 209,102,533 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,250 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: kipp
@contact: kaidma.kipp@gmail.com
@site:
@software: PyCharm
@file: mini_imagenet.py
@time: 2019/9/23 下午1:51
# Shallow men believe in luck.
Strong men believe in cause and effect.
"""
from __future__ import absolute_import
from __future__ import division
fro... | [
"kadima.kipp@gmail.com"
] | kadima.kipp@gmail.com |
216717ee4e222b17a12889ece746e76bc0bf1825 | e75479bc0ec06b726c01e7be7cb6b1326d4fa617 | /EjerciciosPythonSewan/Parte_1/Ejercicio_8.py | d2e35c3f78dc142110f1cf8fc8a38ab045a8296c | [] | no_license | alvaromartinezsanchez/EjerciciosPython | d92a0d8189710e929f6ec78258b5b3b048a21ead | cc278281498fce1037feaba1cb5b752846821da3 | refs/heads/master | 2022-11-12T22:35:39.365687 | 2020-06-22T08:57:28 | 2020-06-22T08:57:28 | 274,087,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,816 | py | """Bandeja de entrada
En este ejercicio vamos a crear una bandeja de entrada de mensajes
enviados a usuarios, así como tres funciones, una para enviar mensajes,
otra obtener los pendientes de leer y otra para leer un mensaje.
-Cada mensaje tendrá tres campos, origen (nombre del usuarios que lo envió),
contenido, y ... | [
"noreply@github.com"
] | alvaromartinezsanchez.noreply@github.com |
865c2f33699b4dea02382da9927653019fae2dfd | db57afdfe41a7497dc2fa1da53d06255a4c3a09b | /Project - Space Invaders/archive/V01.py | 3db63a18c9ab656738e85620ccfaa00a4b207f86 | [] | no_license | Varil426/AGH-Introduction-to-CS | 8a9236b33e7424446d4631404e26612d798e7896 | 0b8385f049273760b965af4a31aa523ea0459a5e | refs/heads/master | 2023-01-09T10:37:43.656832 | 2020-10-09T06:49:17 | 2020-10-09T06:49:17 | 302,556,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,960 | py | import pygame
import time
import random
pygame.init()
version = "0.1"
refreshRate = 33
process = True
bg = 0
screenWidth = 1280
screenHeight = 720
spacingVertical = 50
spacingHorizontal = 380
gameWidth = screenWidth - spacingHorizontal
gameHeight = screenHeight - spacingVertical * 2
gameArea = pygame.Surface((gameWi... | [
"bartlomiejkregielewski@gmail.com"
] | bartlomiejkregielewski@gmail.com |
d61ff3962723856798b1916d2bb9a409e310377d | feaab31dfbfe42faec531c7f29c8136c82bc8210 | /middlewares.py | 87132648e9bd2b2d0a4137f4c8c25b11fa707492 | [] | no_license | alexsanya/words-learn-assistant | fb9682847d31d4dd3987c96d52719aaee193c80b | 44e08eff47c8f8e7c5eb23ba27219cb935da04dc | refs/heads/main | 2023-06-16T07:50:02.067050 | 2021-07-17T08:17:34 | 2021-07-17T08:17:34 | 381,112,804 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 560 | py | from aiogram import types
from aiogram.dispatcher.handler import CancelHandler
from aiogram.dispatcher.middlewares import BaseMiddleware
class AccessMiddleware(BaseMiddleware):
def __init__(self, access_id: int):
self.access_id = access_id
super().__init__()
async def on_process_message(self,... | [
"alexander.koval@ix.co"
] | alexander.koval@ix.co |
b42ca631e747f23c790aa736ca62349ae55f51f3 | 7c94fef9b1dd109efb9f7851871130b3e0f27b65 | /services/spaceapps/spaceapps/mini wifi drone/py_wifi_drone-master_PYTHON3/droneconfig.py | 5f17acbb5b105303e659656807044406d79953d1 | [] | no_license | turtlesallthewayup/spaceapps_webapp | c2eb14cd1a999bbe8ead32555b4592348881afb8 | 486ed9058c5d73dd47d7e195591c63b301496b5f | refs/heads/master | 2020-08-21T16:11:18.021549 | 2019-11-04T00:04:41 | 2019-11-04T00:04:41 | 216,195,499 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,684 | py | HANDSHAKE_DATA = bytearray([0x49, 0x54, 0x64, 0x00, 0x00, 0x00, 0x5D, 0x00,
0x00, 0x00, 0x81, 0x85, 0xFF, 0xBD, 0x2A, 0x29,
0x5C, 0xAD, 0x67, 0x82, 0x5C, 0x57, 0xBE, 0x41,
0x03, 0xF8, 0xCA, 0xE2, 0x64, 0x30, 0xA3, 0xC1,
... | [
"joaopedrokaspary@hotmail.com"
] | joaopedrokaspary@hotmail.com |
441f545bbea3f22988f3da110207b42ccbea0f02 | 3c64f78ae8b0158f8365b283b64da22b710039b9 | /pset6-python/hello/hello.py | 7378cd527055237f231371d757bdfad8bcab094b | [] | no_license | tomasgoiba/cs50 | 08c58582bf0e42579fe58d9ede3af994ba44f262 | 4955f0ed6b8879cff7e21772da4ad6720c14af38 | refs/heads/master | 2023-03-24T21:33:36.627373 | 2021-03-21T14:08:41 | 2021-03-21T14:08:41 | 349,728,641 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | # Prompt user for their name
name = input("What is your name?\n")
# Print "hello" followed by the name of the user
print(f"hello, {name}") | [
"tomas_goiba@hotmail.com"
] | tomas_goiba@hotmail.com |
778cd820b7d00da1bca2f49da9c60917cf10e046 | b7236bb633e982a2ca75b5c70783d31d6b490434 | /gui_helloworld.py | 26d98996e2009fb09fe1e81672bd2c28fc0ce509 | [] | no_license | wuwenlong/Python | f88acce7b24bcc195f25c2f855183c10cfd86a63 | 1667711e24ccb3279229792be2c4a4f4ace7ff3e | refs/heads/master | 2021-03-30T22:26:08.011685 | 2018-03-13T09:11:43 | 2018-03-13T09:11:43 | 125,022,704 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 701 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from tkinter import *
import tkinter.messagebox as messagebox
class Application(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
self.createWidgets()
def createWidgets(self):
self.nameInput = Entry... | [
"noreply@github.com"
] | wuwenlong.noreply@github.com |
2dd191df2926ec7646f8237bd963367f6f5fc723 | fff333e6a307969e0ab2eecd8cd68104eaaae506 | /ex15.py | 2a553a5716b03ef23d3d3a48f0ae17bc8ef91274 | [] | no_license | anjalirmenon/pythonhardway | b01ef055755e49426eab674c56769a93b2e75a82 | e1ceeb7122605048d997e12ba9a6871c86ea3879 | refs/heads/master | 2021-01-01T18:42:15.293336 | 2012-06-30T09:41:36 | 2012-06-30T09:41:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 231 | py | from sys import argv
script, filename = argv
text = open(filename,'r')
print "here is your file %r:" % filename
print text.read()
print "type the filename again:"
filen = raw_input("->")
textn = open(filen,'r')
print textn.read()
| [
"anjali@anjali-Inspiron-1525.(none)"
] | anjali@anjali-Inspiron-1525.(none) |
5be631217ba587316fab5111465242cefa9532a0 | 6c706fb7923a560ccbc1b196799f2b81d15212e5 | /kinonh/kinonh.py | 4890f67ae775775e781e0b4c001ed54449a34292 | [] | no_license | Torak28/Misc | 99051186bd9426a5a07091c3f7d2ce5cb49e6b43 | 0c1107f9dfe1c6e4e9f8154ab81c186b45cc0da7 | refs/heads/master | 2023-06-11T15:55:06.127824 | 2023-05-30T18:25:38 | 2023-05-30T18:25:38 | 161,793,978 | 0 | 0 | null | 2023-05-29T13:39:27 | 2018-12-14T14:17:50 | HTML | UTF-8 | Python | false | false | 556 | py | import requests
import re
from bs4 import BeautifulSoup
import os
link = 'https://www.kinonh.pl/artykul.do?id=2412'
r = r'href="(.+?)"'
base = 'https://www.kinonh.pl/'
page = requests.get(link)
page.encoding = 'utf-8'
if page.status_code == 200:
soup = BeautifulSoup(page.text, 'html.parser')
scripts = soup.find_al... | [
"zelechowski28@gmail.com"
] | zelechowski28@gmail.com |
bf85a2582b197720eae98996b3d095ad30983e9a | c64658390d26702a3237ec776b9c4fa19183dd51 | /Using_TransferLearning/VGG16_Model.py | 071d8dbbfb7c244631249429bb8a179264a480b6 | [] | no_license | 5a7man/ML_Competiton | 49b4ac941276eea0457c857d17f88e043681584a | 8872216480c47f71ee63bbe54410ef247eb169db | refs/heads/master | 2023-01-20T15:08:18.189907 | 2020-12-01T16:54:58 | 2020-12-01T16:54:58 | 316,051,625 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,423 | py | # -*- coding: utf-8 -*-
"""TL_vgg16_kerasAPI.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/10QTvjCnU8hkrF7gOIaDqy2ncXYCMprmV
"""
import numpy as np
from tensorflow.keras.layers import Conv2D, MaxPool2D, Flatten, Dense, Dropout, BatchNormalizati... | [
"58083322+5a7man@users.noreply.github.com"
] | 58083322+5a7man@users.noreply.github.com |
e16dcee46b6896c565cd3e4f89addc19e1a257c8 | ce3d4ee5d9c42f72b79258ffcba3dd8625b36cec | /venv/lib/python3.7/site-packages/environs.py | 9464c16b99c45e58f9875ece81abef5e7955c981 | [
"MIT"
] | permissive | danigfavero/ada | b2be55874343a77d650dad499591ef1ebc8f0d5f | 3c3842023c22510eedf207b23c418f22389622aa | refs/heads/master | 2020-08-19T01:40:17.614537 | 2019-10-17T22:09:13 | 2019-10-17T22:09:13 | 215,860,483 | 0 | 0 | MIT | 2019-10-17T18:32:14 | 2019-10-17T18:32:11 | null | UTF-8 | Python | false | false | 10,521 | py | # -*- coding: utf-8 -*-
import contextlib
import inspect
import functools
import json as pyjson
import os
import re
try:
import urllib.parse as urlparse
except ImportError:
# Python 2
import urlparse
try:
from collections.abc import Mapping
except ImportError:
# Python 2
from collections impor... | [
"grey.pedrinho@gmail.com"
] | grey.pedrinho@gmail.com |
e1cfb7649de923193677b19c2893f29c7ad311f6 | fafa93f61ecf526c924639b4cf4a6775a388377f | /calibration.py | 2c0fa727180b59f3fc9ebe4c4d3756bed448358c | [] | no_license | Gavinwxy/Image-based-Localization-and-Tracking-of-a-Contiuum-Flexible-Robot | fbc3d34d07f13b5da704e91c5bc085f0a44a3d89 | 47aba0e2ca0bb201fe3f3417887c02645c094ae7 | refs/heads/master | 2020-04-27T08:26:05.058061 | 2019-08-23T15:07:41 | 2019-08-23T15:07:41 | 174,171,145 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,219 | py | import cv2
import numpy as np
import glob
import matplotlib.pyplot as plt
from utils import imshow, imshow2
# Construct Object Points
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)
objp = np.zeros((36, 3), np.float32)
objp[0] = (0, 0, 0)
objp[1] = (0, 2, 0)
objp[2] = (0, 4, 0)
objp[3]... | [
"xiaoyang.wong318@gmail.com"
] | xiaoyang.wong318@gmail.com |
96a7c7a80cfe0a8eee5bbb51004ddcf3219a0bae | 5eaa3e43afd9069829dfff3dc4b4a9f4072131ac | /Vize Çalışması 1.py | 944fa44f126f15c347cc5b3a305cf3e444129612 | [] | no_license | volkanyildiz/Image_Processing | d55112059b9519f7bcac65b0b136943c6594f548 | 4db59084921d117121f14e87128fcf2bd7907d44 | refs/heads/master | 2020-03-31T18:28:38.395781 | 2019-01-01T19:47:41 | 2019-01-01T19:47:41 | 152,460,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,389 | py |
# coding: utf-8
# In[1]:
liste = [0,1,2,3,4,5,6,7,8,9]
for i in range(len(liste)):
print(liste[i])
# In[2]:
print(liste)
# In[3]:
import random
# In[4]:
s= random.randint(5,10)
print(s)
# In[5]:
s
# In[6]:
for i in range(10):
print(i)
# In[12]:
liste2=[]
for i in range(10):
list... | [
"noreply@github.com"
] | volkanyildiz.noreply@github.com |
3c6920fd556e9c8e818a39d2f5644c70aa619222 | a8e8ae98c26a54a99ea840a10140e4c5c4080f27 | /external/workload-automation/wa/workloads/stress_ng/__init__.py | 9cf1a7d70eb25e29226a15e28fdd39399af418d4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only"
] | permissive | ARM-software/lisa | c51ea10d9f1ec1713a365ca0362f176c6a333191 | be8427f24d7565c0668cd51ed7ed55867fcec889 | refs/heads/main | 2023-08-30T20:55:20.646965 | 2023-08-29T15:15:12 | 2023-08-29T16:19:20 | 47,548,304 | 200 | 131 | Apache-2.0 | 2023-09-14T11:03:27 | 2015-12-07T11:32:56 | Jupyter Notebook | UTF-8 | Python | false | false | 5,840 | py | # Copyright 2015, 2018 ARM Limited
#
# 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 ... | [
"douglas.raillard@arm.com"
] | douglas.raillard@arm.com |
84cf08f129e4d543d9128851991feaf46e16f436 | dd8a536628852156f380acc89af88959d09d484e | /models/common.py | 684aff58b9c0344094f2688dcafaa1009b238c0a | [
"MIT"
] | permissive | yairkit/flowstep3d | b53c720007acc6ad5dcf5a42d3b7e5b223817e8b | d339a8872365ba5a93cce02650ce06b64b41057a | refs/heads/main | 2023-06-04T20:10:50.244276 | 2021-06-24T14:37:48 | 2021-06-24T14:37:48 | 354,534,639 | 21 | 6 | null | null | null | null | UTF-8 | Python | false | false | 7,493 | py | import torch
import torch.nn as nn
import torch.nn.functional as F
from lib.pointnet2 import pointnet2_utils as pointutils
class FlowEmbedding(nn.Module):
def __init__(self, radius, nsample, in_channel, mlp, pooling='max', corr_func='concat', knn=True, use_instance_norm=False):
super(FlowEmbedding, self).... | [
"yairkit@gmail.com"
] | yairkit@gmail.com |
4d0e6b0ee336732c1d3d260b1010a25768e65c70 | c29e2304a90b8e836c84e6cb5d85821c534197e7 | /db_monitor_query/settings.py | f36e673a302535c9c8422942830d80716f9e9f2e | [] | no_license | devin1982/MySQLGuard | f5312ff20fdd13b9ddad7610c6c665180867c46f | 3289e17a7ba20415189c27281ed1a6bd5ddf6dd7 | refs/heads/master | 2021-04-15T15:18:27.315448 | 2016-06-12T02:46:13 | 2016-06-12T02:46:13 | 60,685,929 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,526 | py | """
Django settings for db_monitor_query project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR... | [
"351430851@qq.com"
] | 351430851@qq.com |
a456e6512b512c884477e8b40179be2c3e94e3d0 | d3de9296f9ce0d881f7d44647872714cea9de1cd | /Chapter_9/Exercise_1.py | 8ebe2822b662b9afd9325511cb3ec042d1d2e0e6 | [] | no_license | NBarnfield/CS-3-Coding-Exercises | baf7ac6832ab6bf05cabc66f437dec051844985b | b7bf2216a70d57c3f39a145f0242605c49365bd7 | refs/heads/master | 2021-04-06T12:31:45.667659 | 2018-07-16T22:36:32 | 2018-07-16T22:36:32 | 125,324,488 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 856 | py | # Ask user for file name input.
file = input("Enter file: ")
# Attempt to open the file, otherwise quit on failure.
try:
fhand = open(file, 'r')
except IOError:
print("File name {} is not valid.".format(file))
quit()
# Create a dictionary
flat_land_text = dict()
# Strip each of the lines and feed it into... | [
"22405972+NBarnfield@users.noreply.github.com"
] | 22405972+NBarnfield@users.noreply.github.com |
88b3e6880ce673410ca83591864b5b4b37ea19a7 | 81407be1385564308db7193634a2bb050b4f822e | /the-python-standard-library-by-example/socket/socket_socketpair.py | 8ad13087f52f0fcdc2e9f9dab9e50f2b5dca1853 | [
"MIT"
] | permissive | gottaegbert/penter | 6db4f7d82c143af1209b4259ba32145aba7d6bd3 | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | refs/heads/master | 2022-12-30T14:51:45.132819 | 2020-10-09T05:33:23 | 2020-10-09T05:33:23 | 305,266,398 | 0 | 0 | MIT | 2020-10-19T04:56:02 | 2020-10-19T04:53:05 | null | UTF-8 | Python | false | false | 630 | py | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Parent/child communication through a socket pair.
"""
#end_pymotw_header
import socket
import os
parent, child = socket.socketpair()
pid = os.fork()
if pid:
print 'in parent, sending message'
child.close... | [
"350840291@qq.com"
] | 350840291@qq.com |
952b2a59ada3549de630d1106ce4e69903fc3d0c | dc585ad3a87189c93033a3840a5d5a677d89db0f | /ElasticBeamImpact/ElasticBeamEqns/lib/functions.py | 6d95379c017fdc76596c1043f85998a8b5154c35 | [] | no_license | obokhove/SurfsUP20142019 | cfc318445c94dcadec7737d2831bebe79d206e94 | 5bddcc42a5788c6e81e6a31a41c5bdb5da46f899 | refs/heads/master | 2023-06-24T15:18:35.479647 | 2023-06-22T08:02:31 | 2023-06-22T08:02:31 | 234,537,676 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,466 | py | """
Auxiliary functions.
"""
import firedrake as fd
from . import beam
from . import parameters as prm
import os
import numpy as np
fd.parameters["form_compiler"]["cpp_optimize"] = True
def write_energy_to_file(filename, E_tab, time_tab):
directory = os.path.dirname(filename)
if not os.path.exists(director... | [
"noreply@github.com"
] | obokhove.noreply@github.com |
86f23652ca781acfd6d1f493185c442a6d2bd25b | 9ebd37765d98c245f9e90b719b03680bbf2f69e1 | /sources/BadParser.py | fa3d4a388a31e1061161f341926078be69666e09 | [] | no_license | icYFTL/ShadowServants-Brute-Python | e25964ad1e819f3185a7c55916fcb374153245c0 | ee5d0e2fdd6dfdad57bf03e8f99607c25a2bc3c1 | refs/heads/master | 2020-04-23T17:38:01.912148 | 2019-03-15T14:07:08 | 2019-03-15T14:07:08 | 171,338,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,524 | py | # Version 1.2 alpha
'''
How to use:
Example:
type_of_proxy = 1 # 1 - http, 2 - https, 3 - socks4, 4 - socks5
proxycount = 5000 # There's a limit. Read https://www.proxy-list.download/
a = BadParser(type_of_proxy,proxycount)
data = a.Grab()
# data = [1.1.1.1:8000, ...]
'''
i... | [
"savap0@yandex.ru"
] | savap0@yandex.ru |
6559f83f0d0cbcf7125aa5a36c0b754ee5fa8a2d | a416e5d08d5623d92a7becdf287ca2bb6dcc1e37 | /Widgets/FileDialogWidget.py | d8ef54e7503ce59a819fcc1fedfcc282e1b16f44 | [] | no_license | DaGnYMilleR/DiskUsage | 7199e856e31e4f486a80510504cf09e3a13a47c4 | 6e4aab17be110a5e4b793edb335ae04d213ec232 | refs/heads/master | 2022-12-20T21:58:10.161703 | 2020-09-22T03:50:23 | 2020-09-22T03:50:23 | 265,805,864 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class FileDialogWidget(QWidget):
def __init__(self, parent=None):
super().__init__(parent, Qt.Window)
file_dialog_layout = QVBoxLayout()
self.setLayout(file_dialog_layout)
lb = QLabel('Hello! This i... | [
"danil.lunyow@mail.com"
] | danil.lunyow@mail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.