Skip to content

Instantly share code, notes, and snippets.

Shlomi Fish shlomif

Block or report user

Report or block shlomif

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pari.gp
\\ Proposed PARI/GP slution for https://projecteuler.net/problem=483
\\ Based on https://oeis.org/A060014
\\ Contact: https://www.shlomifish.org/
T(n, k)={n!*polcoeff(sumdiv(k, i, moebius(k/i)*exp(sumdiv(i, j, x^j/j) + O(x*x^n))), n)}
Tlog(n, k)={log(0.000000000001+n!*polcoeff(sumdiv(k, i, moebius(k/i)*exp(sumdiv(i, j, x^j/j) + O(x*x^n))), n))}
a(n)=sum(k=1,n*n,k*T(n,k))
b(n)=sum(k=1,n*n,k*k*T(n,k))
for(n=1, 22,print(b(n)))
d(n,k,s)={t=k*k*exp(Tlog(n,k));s+=t;printp(" ",n," ",n*n," ",k," ",t," ",s);s}
View version-file.cmake
#.rst:
# ECMExportSymbols
# ----------------
#
# This module provides the ``ecm_export_symbols`` function for providing
# versioned symbols within libraries.
#
# ::
#
# ecm_export_symbols(<target_name>
View 8 Basics of Programming
Licensed under the Creative Commons Attribution licence (CC-BY), either
version 4.0 or at your option, any later version. See:
https://creativecommons.org/licenses/by/4.0/
Author:Usmar A. Padow (amigojapan), contact: usmpadow@gmail.com
Written in 2017.
8 Basics of Programming
View foo.cpp
#include <iostream>
#include <vector>
using namespace std;
enum _tile_state
{
empty = 0,
X,
Y
};
View github-dashboard
#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
use utf8;
use Carp;
use Net::GitHub;
use List::Util qw/max/;
my $org = "dagolden";
View JSX.html
<script type="text/javascript">
var settid = "sitelocked";
var status2 = false;
var data = { "sitelocked":true, "officelocked":false, "paging":20 };
if(status2 === true){
console.log('ITS TRUE');
View gist:c4aebe783aa72826777f
<rindolf> Hi all. I'm seeking advice for a problem I'm having. I have created a fanfic world - http://buffyfanfiction.wikia.com/wiki/Selinaverse - where my conception of Star Trek TNG/DS9 is real and Buffy is presumed to be fictional. However, now it is a parallel world called the Beckyverse where my conception of Buffy is real and Star Trek is presumed to be fictional.
<fischma01> Buffy deals with vampires and such, Star Trek deals with the final frontier
<rindolf> Moreover, then in a typical https://en.wikipedia.org/wiki/Last_Action_Hero or https://en.wikipedia.org/wiki/G%C3%B6del,_Escher,_Bach style, the Selinaverse's Q Continuum finds a way to reach the Beckyverse, and they help them. My question is: in which wiki do both worlds belong? http://buffyfanfiction.wikia.com/wiki/Buffy_Fanfiction_Wiki or http://stexpanded.wikia.com/wiki/Main_Page ? My main problem with keeping it in the Buffy wikia is that it's very
<rindolf> inactive, and Buffy quite went into obscurity ("Sarah Michelle Gellar? Who is she?")
View gist:7f263b1a80448450be9c
@shlomif
shlomif / Bar_Refaeli.markdown
Created Jul 29, 2014
IRC log with Bar Refaeli.
View Bar_Refaeli.markdown

EdwardIII: :-) EdwardIII: yes. EdwardIII: Bar Refaeli is the Israeli alpha female. EdwardIII: https://en.wikipedia.org/wiki/Bar_Refaeli EdwardIII: I wonder if I should add her Twitter to the ext. links. EdwardIII: http://www.washingtonpost.com/blogs/celebritology/post/bar-refaeli-naya-rivera-and-stephen-colbert-make-maxims-hot-100-list/2012/05/22/gIQAt8X3hU_blog.html - No. 1! EdwardIII: hmm... the reporter who wrote that story is called "Sarah Anne Hughes" similarly to my https://github.com/shlomif/Buffy--a-Few-Good-Slayers/blob/262b65be468016da2eef89a599862d27ae914136/buffy--a-few-good-slayers/ideas/ideas.pod#sarah-anne-eisenman .

@shlomif
shlomif / gist:11385356
Created Apr 28, 2014
Equivalent Perl+Shell and Ruby One-Liners (For learning Ruby)
View gist:11385356
C=50 perl -plE 's/^[^\[]+//;$_=substr($_,0, $ENV{C});' < fc-solve-pseudo-dfs.log.txt | uniq -c | perl -plE 's/\d\K /\t\t/'
C=50 ruby -lne 'BEGIN{$C=0}; sub(/^[^\[]+/,""); $_= $_[0,ENV["C"].to_i]; $P ||= ""; f = lambda { printf("%10d\t\t%s\n", $C, $P) if$C>0; $P=$_;$C=1; }; if ($P != $_) then f.call() ;else $C += 1 end ; END{ f.call()}' < fc-solve-pseudo-dfs.log.txt
You can’t perform that action at this time.